|
[codes=jass]
function M_4A_Con takes nothing returns boolean
if ( GetSpellAbilityId() == 'A044' ) then
return true
endif
return false
endfunction
function M_4A takes nothing returns nothing
local integer lv = GetUnitAbilityLevel(udg_Master4, 'A044')
local unit M4A = GetSpellTargetUnit()
local integer array burn
local integer i
set burn[1] = 'A04B'
set burn[2] = 'A04C'
set burn[3] = 'A04D'
call UnitAddAbility( M4A, burn[lv] )
call DisplayTextToPlayer( Player(0), 0, 0, "你的法力被燃烧了" )
// call SetPlayerAbilityAvailable( GetOwningPlayer(M4A), burn[lv], false )
// loop
// if ( GetUnitState(M4A, UNIT_STATE_MANA) == 0.00 ) then
// call UnitRemoveAbility( M4A, burn[lv] )
// endif
// call WaitGameTime( 1 )
// set i = i + 1
// exitwhen i > 12
// endloop
endfunction
//===========================================================================
function InitTrig_MasterAbility4A takes nothing returns nothing
set gg_trg_MasterAbility4A = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MasterAbility4A, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_MasterAbility4A, Condition( function M_4A_Con ) )
call TriggerAddAction( gg_trg_MasterAbility4A, function M_4A )
endfunction
[/codes]
文字显示了
但技能并没有添加
而且所有技能ID没有问题 |
|