找回密码
 点一下
查看: 1415|回复: 5

全单体加血技能

[复制链接]
发表于 2010-4-21 19:00:28 | 显示全部楼层 |阅读模式
无效了 。。 似乎不知道哪有问题
[jass]
//治疗函数
function treatment takes unit  u, real member returns nothing
    local real r=GetUnitStateSwap(UNIT_STATE_LIFE, u)
    set r=r+member
    call SetUnitState(u,UNIT_STATE_LIFE,r)
    set u=null
endfunction


function gmjs_Condition takes nothing returns boolean
    return IsUnitAlly(GetFilterUnit(), GetTriggerPlayer()) == true
endfunction
function gmjs_action takes nothing returns nothing
    local unit u=GetTriggerUnit()
    call treatment(u,( ( -50 + ( GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetTriggerUnit()) * 100 ) ) + ( 5 * GetHeroInt(GetTriggerUnit(), true) ) ))
endfunction
function gmjs takes nothing returns nothing
    if GetSpellAbilityId()=='A01D' then
        call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function gmjs_Condition)),function gmjs_action)
    endif
endfunction
function IntiTrig_SKill_Billion takes nothing returns nothing
    local trigger trg =CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( trg, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddAction( trg, function gmjs )
    set trg=null
endfunction[/jass]
发表于 2010-4-21 21:58:18 | 显示全部楼层
信手写的,也不清楚有没有关键词错误什么的

[jass]

function gmjs_Condition takes nothing returns boolean
if IsUnitAlly(GetFilterUnit(), GetTriggerPlayer()) then
call SetUnitState(GetFilterUnit(),UNIT_STATE_LIFE,GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)+GetUnitAbilityLevel(GetTriggerUnit(),GetSpellAbilityId())*100+GetHeroInt(GetTriggerUnit(),true)*5)
endif
return false
endfunction

function gmjs takes nothing returns boolean
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
endif
return false
endfunction

function IntiTrig_SKill_Billion takes nothing returns nothing
    local trigger trg =CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( trg, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( trg, Condition(function gmjs))
    set trg=null
endfunction

[/jass]
回复

使用道具 举报

 楼主| 发表于 2010-4-23 19:08:21 | 显示全部楼层
不行啊
[jass]
function gmjs_Condition takes nothing returns boolean
    if IsUnitAlly(GetFilterUnit(), GetTriggerPlayer()) then
        call SetUnitState(GetFilterUnit(),UNIT_STATE_LIFE,GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)+GetUnitAbilityLevel(GetTriggerUnit(),GetSpellAbilityId())*100+GetHeroInt(GetTriggerUnit(),true)*5)
        call DisplayTextToPlayer(GetTriggerPlayer(),0.00,0.00,"1")
    endif
    return false
endfunction



function gmjs takes nothing returns boolean
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
    endif
    return false
endfunction



function IntiTrig_SKill_Billion takes nothing returns nothing
    local trigger trg =CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( trg, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( trg, Condition(function gmjs))
    set trg=null
endfunction[/jass]
回复

使用道具 举报

 楼主| 发表于 2010-4-23 22:02:30 | 显示全部楼层
没人?
回复

使用道具 举报

发表于 2010-4-27 17:06:58 | 显示全部楼层
能否直接写出你想要的效果?
没人答短消息我 我试试
回复

使用道具 举报

发表于 2010-5-6 09:38:44 | 显示全部楼层
你call了么?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-4-26 16:52 , Processed in 0.046210 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表