注册 | 登录

游侠NETSHOW论坛





查看: 2046|回复: 0
打印 上一主题 下一主题

[求助] AP求助为啥我改不好特技呢? [复制链接]

帖子
194
精华
0
积分
107
金钱
993
荣誉
1
人气
0
评议
0
跳转到指定楼层
楼主
发表于 2011-2-28 14:40:41 |显示全部楼层 |倒序浏览
为啥米我改新特技的时候,AP老是改不好,或者显示不出来,为什么呢?很头痛很困惑啊…………
例如吸蓝
  }
  gain_mana {
    class=scripted
    attack_cursor=
    warning=warning_gain_mana
    script_attack=special_gain_mana
    script_calccells=calccells_gain_mana
    anim_attack=song
    picture=BA1_Mana_Source_
    picture_small=BA1_Mana_Source_small.png
    reload=3
    hinthead=special_mana_source_head
    hint=special_mana_source_hint
    damage {
      magic=1500,1500
    }
    custom_params {
      mana_k=100
      nomiss=1
      nothorns=1


那是否应该创建一个对应的LUA?可是我加了没有用啊……我创建的也是对应角色名的啊?

function calccells_gain_mana()
    for j=0,5 do
        local t=Attack.cell_adjacent(0,j)
        if t~=nil and Attack.cell_present(t) and Attack.act_enemy(t) and Attack.act_applicable(t) then
                Attack.multiselect(0)
                break
                end
    end
    return true
end

function cur_hero_item_count(name, val)

        local func
        if Attack.act_belligerent()==1 then func = Logic.hero_lu_item
        else func = Logic.enemy_lu_item end

    if val == nil then return func(name,"count")
    else return func(name,"count",val) end

end

function special_gain_mana()

  Attack.act_aseq( 0, "special" )
  local count=Attack.act_size(0)      -- 觐腓麇耱忸 漯嚓铐钼
    local mana_k = tonumber(Attack.get_custom_param("mana_k"))
    local mana, damages = 0, 0

    for j=0,5 do
        local t=Attack.cell_adjacent(0,j)
        if t~=nil and Attack.cell_present(t) and Attack.act_enemy(t) and Attack.act_applicable(t) then
            common_cell_apply_damage(t, Attack.aseq_time(0, "x"))
                          local damage = Attack.act_damage_results(t)
                          mana = mana + math.min(Attack.act_totalhp(t),damage)
                          damages = damages + 1
                  end
        end

        mana = math.floor(mana/mana_k)

    Attack.log_label("")
        local curmana = cur_hero_item_count("mana")
        if curmana ~= nil then
            cur_hero_item_count("mana",curmana+mana)
            if damages > 1 then
                    Attack.log_label("add_blog_mana_") -- 疣犷蜞弪
                else
                    Attack.log_label("add_blog_mana1_") -- 疣犷蜞弪
                end
        end
    Attack.log_special(mana) -- 疣犷蜞弪


    return true
end

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

手机版|Archiver|游侠NETSHOW论坛 ( 苏ICP备2023007791号 )

GMT+8, 2025-8-1 18:13 , Processed in 0.383094 second(s), 13 queries , Gzip On, Memcache On.

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

分享到