|
如题:刚刚做了个技能(用静止陷阱做的) 要求在拿到物品nspi后才有伤害,指放出来的物体爆炸时候使敌人眩晕并同时具有(敏捷/2*技能等级)的伤害值.不是释放的同时就有伤害了,而是爆炸时才就有伤害,可是我现在没有伤害。请问下高手 我下面的JASS 哪里写错了?应该要怎么写?才能达到我上面所写那样的效果? 注:(在拿到下面代号为nspi的物品后(定义为专署物品)技能具有以上所说伤害。)
[codes=jass]//===========================================================================
// Trigger: MRJ
//===========================================================================
function Trig_MRJ_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'otot' ) ) then
return false
endif
if ( not ( GetTriggerUnit() == GetKillingUnitBJ() ) ) then
return false
endif
return true
endfunction
function Trig_MRJ_Func001Func001001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_GROUND) == true )
endfunction
function Trig_MRJ_Func001Func001001003002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetFilterUnit()), GetPlayersAllies(GetOwningPlayer(GetTriggerUnit()))) == false )
endfunction
function Trig_MRJ_Func001Func001001003 takes nothing returns boolean
return GetBooleanAnd( Trig_MRJ_Func001Func001001003001(), Trig_MRJ_Func001Func001001003002() )
endfunction
function Trig_MRJ_Func001Func001A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), 0.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
endfunction
function Trig_MRJ_Func001Func002001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_GROUND) == true )
endfunction
function Trig_MRJ_Func001Func002001003002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetFilterUnit()), GetPlayersAllies(GetOwningPlayer(GetTriggerUnit()))) == false )
endfunction
function Trig_MRJ_Func001Func002001003 takes nothing returns boolean
return GetBooleanAnd( Trig_MRJ_Func001Func002001003001(), Trig_MRJ_Func001Func002001003002() )
endfunction
function Trig_MRJ_Func001Func002A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), ( ( I2R(GetHeroStatBJ(bj_HEROSTAT_AGI, GetTriggerUnit(), true)) / 2.00 ) * I2R(GetUnitAbilityLevelSwapped('Asta', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
endfunction
function Trig_MRJ_Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'nspi') == true ) ) then
return false
endif
return true
endfunction
function Trig_MRJ_Actions takes nothing returns nothing
if ( Trig_MRJ_Func001C() ) then
call ForGroupBJ( GetUnitsInRangeOfLocMatching(500.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_MRJ_Func001Func002001003)), function Trig_MRJ_Func001Func002A )
else
call ForGroupBJ( GetUnitsInRangeOfLocMatching(500.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_MRJ_Func001Func001001003)), function Trig_MRJ_Func001Func001A )
endif
endfunction
//===========================================================================
function InitTrig_MRJ takes nothing returns nothing
set gg_trg_MRJ = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MRJ, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_MRJ, Condition( function Trig_MRJ_Conditions ) )
call TriggerAddAction( gg_trg_MRJ, function Trig_MRJ_Actions )
endfunction[/codes] |
|