|
[jass]
function gmjs_Condition takes nothing returns boolean
local unit u1=GetFilterUnit()
local unit u2=GetTriggerUnit()
local player p=GetTriggerPlayer()
local real r
set r=GetUnitAbilityLevel(u2,GetSpellAbilityId())*100+GetHeroInt(u2,true)*5
if IsUnitAlly(u1, p) then
call SetUnitState(u1,UNIT_STATE_LIFE,GetUnitState(u1,UNIT_STATE_LIFE)+r)
set u1=null
set u2=null
set p=null
// call DisplayTextToPlayer(Player(0),0,0,"找到一个友方单位加血之")
return true
else
set u1=null
set u2=null
set p=null
// call DisplayTextToPlayer(Player(0),0,0,"不是友方单位 放弃")
return false
endif
endfunction
function gmjs takes nothing returns nothing
local group g=null
local boolexpr b=null
if GetSpellAbilityId()=='A01D' then
set g=CreateGroup()
set b=Condition(function gmjs_Condition)
call GroupEnumUnitsInRect(g,GetPlayableMapRect(),b)
call DestroyGroup(g)
call DestroyBoolExpr(b)
set b=null
set g=null
// call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"A01D技能触发")
endif
endfunction
function IntiTrig_SKill_Billion takes nothing returns nothing
local trigger trg =CreateTrigger()
local integer index
loop
call TriggerRegisterPlayerUnitEvent(trg, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
set index = index + 1
exitwhen index == 11
endloop
call TriggerAddAction( trg, function gmjs)
// call DisplayTextToPlayer(Player(0),0,0,"A01D技能初始化完毕")
set trg=null
endfunction
function invilization_skill takes nothing returns nothing
call InitTrig_SKill_Billion()
// call DisplayTextToPlayer(Player(0),0,0,"所有技能初始化完毕")
endfunction[/jass]
这个J 没有效果也不知道哪里出了问题
急需大大们帮忙。
|
|