class Game_Battler
One_turn = 17
Two_turn = 18
Three_turn = 19
attr_accessor :exhaustion
alias old_initialize initialize
def initialize
old_initialize
@exhaustion = 0
end
def inputable?
return ((not @hidden and restriction <= 1) and @exhaustion == 0)
end
def movable?
return ((not @hidden and restriction < 4) and @exhaustion == 0)
end
alias old_skill_effect skill_effect
def skill_effect(user, skill)
effective = old_skill_effect(user, skill)
if skill.element_set.include?(One_turn)
user.exhaustion += 2
end
if skill.element_set.include?(Two_turn)
user.exhaustion += 3
end
if skill.element_set.include?(Three_turn)
user.exhaustion += 4
end
return effective
end
end
class Scene_Battle
alias old_start_phase2 start_phase2
def start_phase2
if @last_turn == nil
@last_turn = 0
end
if @last_turn != $game_temp.battle_turn
for battler in $game_party.actors + $game_troop.enemies
if battler.exhaustion > 0
battler.exhaustion -= 1
end
end
@last_turn = $game_temp.battle_turn
end
old_start_phase2
end
alias old_start_phase5 start_phase5
def start_phase5
for i in 0...$game_party.actors.size
$game_party.actors[i].exhaustion =0
end
old_start_phase5
end
end