class Game_Temp
attr_accessor :boss_data
end
Data_BattleData = Struct.new(:hp, :mp, :states, :state_turns)
class Game_Battler < Game_BattlerBase
def save_battle_data(index)
$game_temp.boss_data ||= Hash.new
$game_temp.boss_data[index] = Data_BattleData.new(@hp,@mp,@states.clone,@state_turns.clone)
end
def load_battle_data(index)
data = $game_temp.boss_data
return if (data.nil? || data[index].nil?)
@hp, @mp, @states, @state_turns = *data[index]
end
end
class Game_Temp
attr_accessor :boss_data
end
Data_BattleData = Struct.new(:hp, :mp, :states, :state_turns)
class Game_Battler < Game_BattlerBase
def save_battle_data(index)
$game_temp.boss_data ||= Hash.new
$game_temp.boss_data[index] = Data_BattleData.new(@hp,@mp,@states.clone,@state_turns.clone)
end
def load_battle_data(index)
data = $game_temp.boss_data
return if (data.nil? || data[index].nil?)
@hp, @mp, @states, @state_turns = *data[index]
end
end