|
发表于 2011-8-26 14:07:06
|
显示全部楼层
[jass]function Trig_A000_Conditions takes nothing returns boolean
    return (GetUnitAbilityLevel(GetAttacker(),'B000') > 0)
endfunction
function Trig_A000_Actions takes nothing returns nothing
    local real mana0 = GetUnitState(GetAttacker(),UNIT_STATE_MANA)
    local real mana1 = GetUnitState(GetTriggerUnit(),UNIT_STATE_MANA)
    local real slvl = I2R(GetUnitAbilityLevel(GetAttacker(),'B000'))
    call SetUnitState(GetAttacker(),UNIT_STATE_MANA,mana0 + slvl + 1.00)
    call SetUnitState(GetTriggerUnit(),UNIT_STATE_MANA,mana1 - slvl - 1.00)
endfunction
function InitTrig_A000 takes nothing returns nothing
    set gg_trg_A000 = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( gg_trg_A000, EVENT_PLAYER_UNIT_ATTACKED )
    call TriggerAddCondition(gg_trg_A000, Condition(function Trig_A000_Conditions))
    call TriggerAddAction(gg_trg_A000, function Trig_A000_Actions)
endfunction[/jass]
B000是aura的buff,技能記得別用吸血光環.不然近戰才有效...(應該不能改吧..?)
呃..順便加上被攻擊的會減mana了...不適用的話就拿掉吧..... |
|