|
[jass]function Trig_xuejass_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AHtb' ) ) then
// 'AHtb' 是技能
return false
endif
return true
endfunction
function Trig_xuejass_Func002002003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_xuejass_Func003A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'h000', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
//上面一句是创建单位的.
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
//上面一句是设置最后的创建单位的生命为1
call UnitAddAbilityBJ( 'A000', GetLastCreatedUnit() )
//上面一句是给辅助技能这个单位.'A000'是技能
call SetUnitAbilityLevelSwapped( 'A000', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('AHtb', GetTriggerUnit()) )
//设置技能与技能同等级
call IssueTargetOrderById( GetLastCreatedUnit(), 852095, GetEnumUnit() )
endfunction
function Trig_xuejass_Actions takes nothing returns nothing
set udg_dian[100] = GetSpellTargetLoc()
set udg_QTJN_Dian[100] = GetUnitsInRangeOfLocMatching(500.00, udg_dian[100], Condition(function Trig_xuejass_Func002002003))
call ForGroupBJ( udg_QTJN_Dian[100], function Trig_xuejass_Func003A )
call RemoveLocation( udg_dian[100] )
call GroupClear( udg_QTJN_Dian[100] )
endfunction
//===========================================================================
function InitTrig_xuejass takes nothing returns nothing
set gg_trg_xuejass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_xuejass, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_xuejass, Condition( function Trig_xuejass_Conditions ) )
call TriggerAddAction( gg_trg_xuejass, function Trig_xuejass_Actions )
endfunction
[/jass]
以上就是把T转J的(风暴之锤),将这个J跟T一句句对着来看,一般都会明白.可是我觉得这样做我怎么理解得到J的精髓啊?
求各位告诉我怎么学啊. |
|