赞 | 5 |
VIP | 359 |
好人卡 | 195 |
积分 | 3 |
经验 | 560179 |
最后登录 | 2024-11-20 |
在线时间 | 1374 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 280
- 在线时间
- 1374 小时
- 注册时间
- 2005-10-16
- 帖子
- 5113
|
本帖最后由 亿万星辰 于 2013-4-24 17:43 编辑
- class Game_Actor < Game_Battler
- # 1号技能恢复10%,5号技能恢复50%,注意大括号,逗号
- Recover_Skill = {1=>10,5=>50}
- # 17号状态每回合恢复15%
- Recover_State = {17=>15}
- # 1号武器恢复10%注意大括号
- Recover_Weapon = {10=>10}
- # 1号防具恢复10%注意大括号
- Recover_Armor = {10=>10}
- #--------------------------------------------------------------------------
- # ● 判断状态 [连续伤害]
- #--------------------------------------------------------------------------
- def slip_damage?
- recover = 0
- for i in @skills
- if Recover_Skill.keys.include?(i)
- # 这里最后还是改成了全部叠加恢复效果,也就是如果3个技能都有恢复HP效果,那么就全部都会算在里面
- recover += Recover_Skill[i]
- end
- end
- for i in @states
- if Recover_State.keys.include?(i)
- recover += Recover_State[i]
- end
- end
- if Recover_Weapon.keys.include?(@weapon_id)
- recover += Recover_Weapon[@weapon_id]
- end
- for i in Recover_Armor.keys & [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
- recover += Recover_Armor[i]
- end
- recover_hp = recover * self.maxhp / 100
- recover_str = self.hp
- self.hp += recover_hp
- recover_str -= self.hp
- self.damage = recover_str
- self.damage_pop = true if recover_str != 0
- super
- end
- end
复制代码 这下连被动技能、状态、武器、防具的回血效果都有了,呵呵~ |
|