class Game_Enemy < Game_Battler
alias enemy_rough_skin_initialize initialize
def initialize(troop_id, member_index)
enemy_rough_skin_initialize(troop_id, member_index)
if @enemy_id == 1
@rough_skin = true
end
end
end
class Game_Battler
attr_accessor :rough_skin
attr_accessor :rough_skin_damage
attr_accessor :rough_skin_damage_percent
alias rough_skin_initialize initialize
def initialize
rough_skin_initialize
@rough_skin = false
@rough_skin_damage = 0
@rough_skin_damage_percent = 50
end
alias rough_skin_attack_effect attack_effect
def attack_effect(attacker)
attack = rough_skin_attack_effect(attacker)
if self.rough_skin == true
attacker.rough_skin_damage = (self.damage.to_i * self.rough_skin_damage_percent)/100
end
return attack
end
end
class Scene_Battle
alias rough_skin_update_phase4_step5 update_phase4_step5
def update_phase4_step5
rough_skin_update_phase4_step5
if @active_battler.rough_skin_damage != 0
@active_battler.damage = @active_battler.rough_skin_damage
@active_battler.hp -= @active_battler.damage
@active_battler.rough_skin_damage = 0
@active_battler.damage_pop = true
@active_battler.white_flash = true
@wait_count = 8
end
end
end