[trigger]
Black Arrow
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Black Arrow
Actions
Unit - Create 1 InvisCast for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing degrees
Unit - Set level of healthsetter for (Last created unit) to (Level of Black Arrow for (Triggering unit))
Unit - Order (Last created unit) to Human Mountain King - Activate Avatar
Unit - Set life of (Target unit of ability being cast) to ((Percentage life of (Target unit of ability being cast)) x (1.00 - (0.10 + (0.10 x (Max life of (Last created unit))))))%
[/trigger]
便于检查暂时略去Hide 和 计时器
测试结果。。。
#
#
#
#
#
略作修改后的trigger:
[trigger]
Black Arrow
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Black Arrow
Actions
Set ArrowtargetUnit = (Target unit of ability being cast)
Unit - Create 1 InvisCast for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing degrees
Unit - Set level of healthsetter for (Last created unit) to (Level of Black Arrow for (Triggering unit))
Unit - Order (Last created unit) to Human Mountain King - Activate Avatar
Unit - Set life of ArrowtargetUnit to ((Percentage life of ArrowtargetUnit) x (1.00 - (0.10 + (0.10 x (Max life of (Last created unit))))))%
[/trigger]
效果:
#
#
#
#
#
#
#
但是我不明白的是 [设置生命] 的目标为[target unit of ability being cast]为什么会莫名其妙的无效化替换别的立刻解决?
[trigger]
Black Arrow
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Black Arrow
Actions
Set ArrowtargetUnit = (Target unit of ability being cast)
Unit - Set life of ArrowtargetUnit to ((Percentage life of ArrowtargetUnit) x (1.00 - (0.10 + (0.10 x (Real((Level of Black Arrow for (Triggering unit))))))))%
调整过trigger如下时
[trigger]
Black Arrow修改后
Events
Unit - A unit Starts the effect of an ability
Conditions
((Ability being cast) Equal to Black Arrow) or ((Ability being cast) Equal to Black Arrow修改后 )
Actions
Set ArrowtargetUnit = (Target unit of ability being cast)
Unit - Set life of ArrowtargetUnit to ((Percentage life of ArrowtargetUnit) x (1.00 - (0.10 + (0.10 x (Real((Level of Black Arrow修改后 for (Triggering unit))))))))%
Target unit of ability being cast在单位结束释放技能时就被销毁了,你是得不到这个值的,鉴于trigger的action属于execute型的,很有可能有一定几率得不到技能释放单位。(因为你的setlife写的太靠后,运行到那里的时候Target unit of ability being cast已经没有了)