赞 | 0 |
VIP | 77 |
好人卡 | 306 |
积分 | 1 |
经验 | 85662 |
最后登录 | 2023-11-23 |
在线时间 | 1782 小时 |
Lv1.梦旅人 虱子
- 梦石
- 0
- 星屑
- 121
- 在线时间
- 1782 小时
- 注册时间
- 2010-6-19
- 帖子
- 3597
|
- module Louse
- SELF_OVER = [] # 自爆技能ID
- end
- class Game_Battler
- def skill_effect(user, skill)
- self.critical = false
- if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
- ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
- return false
- end
- ################################################################
- # 如果发生冲突请直接将下面这段复制到定义技能伤害的相应位置
- ################################################################
- if Louse::SELF_OVER.include?(skill.id)
- user.damage = user.hp
- user.hp -= user.damage
- user.damage_pop = true
- end
- ################################################################
- # 如果发生冲突请直接将下面这段复制到定义技能伤害的相应位置
- ################################################################
- effective = false
- effective |= skill.common_event_id > 0
- hit = skill.hit
- if skill.atk_f > 0
- hit *= user.hit / 100
- end
- hit_result = (rand(100) < hit)
- effective |= hit < 100
- if hit_result == true
- power = skill.power + user.atk * skill.atk_f / 100
- if power > 0
- power -= self.pdef * skill.pdef_f / 200
- power -= self.mdef * skill.mdef_f / 200
- power = [power, 0].max
- end
- rate = 20
- rate += (user.str * skill.str_f / 100)
- rate += (user.dex * skill.dex_f / 100)
- rate += (user.agi * skill.agi_f / 100)
- rate += (user.int * skill.int_f / 100)
- self.damage = power * rate / 20
- self.damage *= elements_correct(skill.element_set)
- self.damage /= 100
- if self.damage > 0
- if self.guarding?
- self.damage /= 2
- end
- end
- if skill.variance > 0 and self.damage.abs > 0
- amp = [self.damage.abs * skill.variance / 100, 1].max
- self.damage += rand(amp+1) + rand(amp+1) - amp
- end
- eva = 8 * self.agi / user.dex + self.eva
- hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
- hit = self.cant_evade? ? 100 : hit
- hit_result = (rand(100) < hit)
- effective |= hit < 100
- end
- if hit_result == true
- if skill.power != 0 and skill.atk_f > 0
- remove_states_shock
- effective = true
- end
- last_hp = self.hp
- self.hp -= self.damage
- effective |= self.hp != last_hp
- @state_changed = false
- effective |= states_plus(skill.plus_state_set)
- effective |= states_minus(skill.minus_state_set)
- if skill.power == 0
- self.damage = ""
- unless @state_changed
- self.damage = "Miss"
- end
- end
- else
- self.damage = "Miss"
- end
- return effective
- end
- end
复制代码 |
|