class Game_Battler < Game_BattlerBase
#--------------------------------------------------------------------------
# ● 调整状态计数(回合数)
#--------------------------------------------------------------------------
def change_turns(state_id,value)
#return if !state?(state_id)
state = $data_states[state_id]
@state_turns[state_id]||=0
@state_turns[state_id] += value
if @state_turns[state_id]>0
@states.push(state_id)
@result.added_states.push(state_id).uniq!
else
@state_turns[state_id]=0
@states.delete(state_id)
@result.removed_states.push(state_id).uniq!
end
@states.uniq!
refresh
end
end
class Game_Battler < Game_BattlerBase
#--------------------------------------------------------------------------
# ● 调整状态计数(回合数)
#--------------------------------------------------------------------------
def change_turns(state_id,value)
#return if !state?(state_id)
state = $data_states[state_id]
@state_turns[state_id]||=0
@state_turns[state_id] += value
if @state_turns[state_id]>0
@states.push(state_id)
@result.added_states.push(state_id).uniq!
else
@state_turns[state_id]=0
@states.delete(state_id)
@result.removed_states.push(state_id).uniq!
end
@states.uniq!
refresh
end
end