|
我在论坛下载了一个澄海剑锋风暴的精演示.令我眼花缭乱的JASS代码.顿时无语.我希望做出一个伤害效果是剑圣的敏捷包括加成乘以X剑锋风暴技能等级的伤害效果.
我先看了一下演示,里面的伤害似乎是双重的.一个是剑刃风暴的技能伤害,另一个是剑刃风暴所附带出的马甲的闪电技能里面设置好的伤害.
仅仅是修改剑刃风暴自身的伤害的话,我觉得设置一个区域的选区单位进行伤害应该就可以了.可是如何让马甲的闪电技能也是属性伤害呢?当然,最重要的,我不会JASS.希望大大们能够帮忙解说一下,
如何用j写属性乘以技能等级的伤害公式呢........求解.希望高人们指点.谢谢.
我把j代码和演示也发上来.方便大家查看.
如何让属性影响剑刃的伤害呢.w3x
(17 KB, 下载次数: 24)
[jass]function Trig_Whirlwind_Conditions takes nothing returns boolean
return ((GetSpellAbilityId()=='A002'))
endfunction
function Trig_Whirlwind_Actions takes nothing returns nothing
set udg_Whirlwind_Unit=GetTriggerUnit()
call EnableTrigger(gg_trg_WhirlwindBuff)
call TriggerSleepAction(10.00)
set udg_Whirlwind_Unit=null
call DisableTrigger(gg_trg_WhirlwindBuff)
endfunction
//===========================================================================
function InitTrig_Whirlwind takes nothing returns nothing
set gg_trg_Whirlwind=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Whirlwind,gg_unit_Obla_0048,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Whirlwind,Condition(function Trig_Whirlwind_Conditions))
call TriggerAddAction(gg_trg_Whirlwind,function Trig_Whirlwind_Actions)
endfunction
[/jass]
[jass]
function Trig_WhirlwindBuff_Func001C takes nothing returns boolean
return ((IsUnitAliveBJ(udg_Whirlwind_Unit)))
endfunction
function Trig_WhirlwindBuff_Actions takes nothing returns nothing
if (Trig_WhirlwindBuff_Func001C()) then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=4
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call AddSpecialEffectTargetUnitBJ("weapon",udg_Whirlwind_Unit,"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
call DestroyEffect(bj_lastCreatedEffect)
set udg_Temp_Point=GetUnitLoc(udg_Whirlwind_Unit)
call CreateNUnitsAtLoc(1,'e000',GetOwningPlayer(udg_Whirlwind_Unit),udg_Temp_Point,GetRandomReal(0,360))
call RemoveLocation(udg_Temp_Point)
call UnitApplyTimedLifeBJ(1.00,'BHwe',bj_lastCreatedUnit)
set udg_Temp_Point=PolarProjectionBJ(GetUnitLoc(bj_lastCreatedUnit),100.00,GetRandomReal(0,360))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,852218,udg_Temp_Point)
call RemoveLocation(udg_Temp_Point)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
set udg_Whirlwind_Unit=null
call DisableTrigger(gg_trg_WhirlwindBuff)
endif
endfunction
//===========================================================================
function InitTrig_WhirlwindBuff takes nothing returns nothing
set gg_trg_WhirlwindBuff=CreateTrigger()
call DisableTrigger(gg_trg_WhirlwindBuff)
call TriggerRegisterTimerEventPeriodic(gg_trg_WhirlwindBuff,0.20)
call TriggerAddAction(gg_trg_WhirlwindBuff,function Trig_WhirlwindBuff_Actions)
endfunction
[/jass] |
|