[codes=jass]call TriggerRegisterAnyUnitEventBJ( gg_trg_lengshang2, EVENT_PLAYER_UNIT_DAMAGE )
请问这句哪里错了?
改如何改正....
上面那句JASS 所在的JASS 内容如下:
function Trig_lengshang2_Conditions takes nothing returns boolean
if ( not ( udg_LengshangNumber != 1 ) ) then
return false
endif
if ( not ( GetEventDamageSource() == udg_Lengshang_Caster ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(udg_Lengshang_Target, 'B01U') == true ) ) then
return false
endif
return true
endfunction
function Trig_lengshang2_Func005C takes nothing returns boolean
if ( not ( GetRandomPercentageBJ() < I2R(( 3 + ( GetUnitAbilityLevelSwapped('A0E9', udg_Lengshang_Caster) * 11 ) )) ) ) then
return false
endif
return true
endfunction
function Trig_lengshang2_Actions takes nothing returns nothing
set udg_LengshangNumber = 1
if ( Trig_lengshang2_Func005C() ) then
call UnitDamageTarget( udg_Lengshang_Caster, udg_Lengshang_Target, GetEventDamage(), true, true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS )
call AddSpecialEffectTargetUnitBJ( "head", udg_Lengshang_Target, "Abilities\\Spells\\Other\\CrushingWave\\CrushingWaveDamage.mdl" )
call DestroyEffect( GetLastCreatedEffectBJ() )
call DisableTrigger( GetTriggeringTrigger() )
else
endif
endfunction
//===========================================================================
function InitTrig_lengshang2 takes nothing returns nothing
set gg_trg_lengshang2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_lengshang2, EVENT_PLAYER_UNIT_DAMAGED )
call TriggerAddCondition( gg_trg_lengshang2, Condition( function Trig_lengshang2_Conditions ) )
call TriggerAddAction( gg_trg_lengshang2, function Trig_lengshang2_Actions )
endfunction[/codes] |