找回密码
 注册
搜索
查看: 950|回复: 8
收起左侧

[BUG汇报] 萤火虫之光

[复制链接]

该用户从未签到

7

威严

1253

帖子

3281

点数

白玉楼半灵

Rank: 4

积分
2297
发表于 2012-10-23 09:39:10 | 显示全部楼层
如你所知,萤火虫之光最近重置了,现在它给予1.3的回魔和14攻击,并且击杀和助攻能积累物理伤害
当我检查脚本的时候我发现有趣的事

它仍然能减免DEBUFF35%的持续时间
function DebuffDuration takes unit target, real time returns real
// . . .

elseif UnitHasItemOfTypeBJ(target, 'I07Z') then
    set time = time * 0.65
endif

// . . .
endfunction
它能减少25%晕眩
function GetUnitControlAllReduce takes unit caster, unit target returns real
// . . .

if UnitHasItemOfTypeBJ(target, 'I07Z') then
    set timeper = timeper * 0.75
endif

// . . .
endfunction
物品数据里的规定没变(跟最近版本无关)【这个意思不太对】
call ItemRegisterDataDefence('I07Z', 6000, 0, 0, 0, 0, 0, 0, 0)
call ItemRegisterDataAttack('I07Z', 0, 0, 0, 0, 0, 0)
call ItemRegisterDataStat('I07Z', 21, 21, 21)
不管怎样我没看见这件物品有对应“加回魔”和“加攻击”的项目
怎么修

移除“debuff时间”和“晕眩时间”项目中的的规定【declarations】

更改物品基本数据里的属性
call ItemRegisterDataDefence('I07Z', 2000, 0, 0, 0, 1.3, 0, 0, 0)
call ItemRegisterDataAttack('I07Z', 14, 0, 0, 0, 0, 0)
call ItemRegisterDataStat('I07Z', 0, 0, 0)
加入“给予攻击”和“给予回魔”项目的规定
function GetUnitItemAttackCharges takes unit v, integer itemr returns real
    local integer i = 0
    local real attack = 0.0
    loop
        if GetItemTypeId(UnitItemInSlot(v, i)) == itemr then
            set attack = attack + GetItemCharges(UnitItemInSlot(v, i))
        endif
        set i = i + 1
        exitwhen i > 6
    endloop
    return attack
endfunction

function GetUnitAttack takes unit v returns integer
// . . .

    set attack = attack + GetUnitItemAttack(v, 'I07Z', 14)
    set attack = attack + GetUnitItemAttackCharges(v, 'I07Z')

// . . .
endfunction
function GetUnitMagicRegen takes unit v returns real
// . . .

    set regen = regen + GetUnitItemMagicRegen_Single(v, 'I07Z', 1.30)

// . . .
endfunction
以上
回复

使用道具 举报

  • TA的每日心情
    开心
    2012-6-6 14:38
  • 签到天数: 601 天

    [LV.9]以坛为家II

    4

    威严

    457

    帖子

    1720

    点数

    白玉楼半灵

    嗯?

    Rank: 4

    积分
    1075
    发表于 2012-10-23 09:52:33 | 显示全部楼层
    GOOD JOB

    老外真给力{:4_134:}
    回复

    使用道具 举报

    该用户从未签到

    1

    威严

    5

    帖子

    1007

    点数

    人形

    Rank: 2

    积分
    381
     楼主| 发表于 2012-10-24 15:10:54 | 显示全部楼层
    THD_988h final.w3x

    The code is still here:

    1. function GetUnitControlAllReduce takes unit caster, unit target returns real
    2.     // . . .
    3.     if UnitHasItemOfTypeBJ(target, 'I07Z') then
    4.         set timeper = timeper * 0.75
    5.     endif
    6.     // . . .
    7. endfunction
    复制代码
    It should be removed.

    Also:

    1. function GetUnitAttack takes unit v returns integer
    2.     // . . .
    3.     set attack = attack + udg_DMG_AllItemArmor[GetPlayerId(GetOwningPlayer(v))]
    4.     return R2I(attack)
    5. endfunction
    复制代码
    should be changed to:

    1. function GetUnitAttack takes unit v returns integer
    2.     // . . .
    3.     set attack = attack + udg_DMG_AllItemAttack[GetPlayerId(GetOwningPlayer(v))]
    4.     set attack = attack + UnitGetBonusDmg(v) // this is important
    5.     return R2I(attack)
    6. endfunction
    复制代码
    Adding "UnitGetBonusDmg" is important. This function returns bonus attack damage, that can be changed dynamically (bonus damage is used in [萤火虫之光], [厄运的护符], Rumia [W], Momiji [D], etc.)

    Thanks.
    回复

    使用道具 举报

    yudish 该用户已被删除
    发表于 2012-10-23 18:36:00 | 显示全部楼层
    提示: 作者被禁止或删除 内容自动屏蔽
    回复

    使用道具 举报

    该用户从未签到

    1

    威严

    5

    帖子

    1007

    点数

    人形

    Rank: 2

    积分
    381
     楼主| 发表于 2012-10-22 19:02:51 | 显示全部楼层 |阅读模式
    本帖最后由 swdn 于 2012-10-22 19:04 编辑

    Hello.

    As you know, the item "Light of the Fireflies" [萤火虫之光] (code 'I07Z') has been remade recently. Now it gives +1.3 mana regen and +14 damage. Also, killing or assisting gives stacks for attack damage.

    When I decided to check the script, I've found some interesting things.

    It still decreases duration of debuffs by 35%:

    1. function DebuffDuration takes unit target, real time returns real
    2. // . . .

    3. elseif UnitHasItemOfTypeBJ(target, 'I07Z') then
    4.     set time = time * 0.65
    5. endif

    6. // . . .
    7. endfunction
    复制代码
    It reduces stun duration by 25%:

    1. function GetUnitControlAllReduce takes unit caster, unit target returns real
    2. // . . .

    3. if UnitHasItemOfTypeBJ(target, 'I07Z') then
    4.     set timeper = timeper * 0.75
    5. endif

    6. // . . .
    7. endfunction
    复制代码
    Stats in item database have not changed (does not matter in current version):

    1. call ItemRegisterDataDefence('I07Z', 6000, 0, 0, 0, 0, 0, 0, 0)
    2. call ItemRegisterDataAttack('I07Z', 0, 0, 0, 0, 0, 0)
    3. call ItemRegisterDataStat('I07Z', 21, 21, 21)
    复制代码
    However, I did not see declarations for this item in functions "GetUnitAttack" and "GetUnitMagicRegen".

    How to fix:

    - Remove declarations from "DebuffDuration" and "GetUnitControlAllReduce" functions

    - Change stats in item database:

    1. call ItemRegisterDataDefence('I07Z', 2000, 0, 0, 0, 1.3, 0, 0, 0)
    2. call ItemRegisterDataAttack('I07Z', 14, 0, 0, 0, 0, 0)
    3. call ItemRegisterDataStat('I07Z', 0, 0, 0)
    复制代码
    - Add declarations to "GetUnitAttack" and "GetUnitMagicRegen" functions:

    1. function GetUnitItemAttackCharges takes unit v, integer itemr returns real
    2.     local integer i = 0
    3.     local real attack = 0.0
    4.     loop
    5.         if GetItemTypeId(UnitItemInSlot(v, i)) == itemr then
    6.             set attack = attack + GetItemCharges(UnitItemInSlot(v, i))
    7.         endif
    8.         set i = i + 1
    9.         exitwhen i > 6
    10.     endloop
    11.     return attack
    12. endfunction

    13. function GetUnitAttack takes unit v returns integer
    14. // . . .

    15.     set attack = attack + GetUnitItemAttack(v, 'I07Z', 14)
    16.     set attack = attack + GetUnitItemAttackCharges(v, 'I07Z')

    17. // . . .
    18. endfunction
    复制代码

    1. function GetUnitMagicRegen takes unit v returns real
    2. // . . .

    3.     set regen = regen + GetUnitItemMagicRegen_Single(v, 'I07Z', 1.30)

    4. // . . .
    5. endfunction
    复制代码
    That's all.
  • TA的每日心情
    开心
    2012-11-5 11:39
  • 签到天数: 646 天

    [LV.9]以坛为家II

    11

    威严

    1万

    帖子

    2229

    点数

    八百万神明

      \體無完膚/

    Rank: 7Rank: 7Rank: 7

    积分
    14133

    受兔啪啪啪黑兔啪啪啪永恒の笨蛋永恒の妹样永恒の小五萝莉永恒の无意识永恒の蘑菇碳永恒の半灵

    QQ
    发表于 2012-10-22 19:56:54 来自手机 | 显示全部楼层
    that i understandT_T

    my English teacher was dead Early

    回复

    使用道具 举报

    该用户从未签到

    1

    威严

    101

    帖子

    797

    点数

    人形

    Rank: 2

    积分
    216
    发表于 2012-10-22 19:57:56 | 显示全部楼层
    壓力巨大
    超大
    非常之大
    回复

    使用道具 举报

  • TA的每日心情
    开心
    2012-7-19 10:49
  • 签到天数: 733 天

    [LV.9]以坛为家II

    5

    威严

    996

    帖子

    2960

    点数

    白玉楼半灵

    约定之日

    Rank: 4

    积分
    2594
    QQ
    发表于 2012-10-22 21:00:39 | 显示全部楼层
    Good job~~~~~~~~
    回复

    使用道具 举报

    该用户从未签到

    41

    威严

    1438

    帖子

    6022

    点数

    版主

    Rank: 10Rank: 10Rank: 10

    积分
    7150
    发表于 2012-10-23 10:38:55 | 显示全部楼层
    Thanks for your report
    回复

    使用道具 举报

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

    本版积分规则

    手机版|Archiver| ( ICP15046467-1 )

    GMT+8, 2024-5-1 09:26 , Processed in 0.043713 second(s), 30 queries .