diff --git a/Data/Scripts/011_Battle/006_Other battle types/006_PokeBattle_BattleRecord.rb b/Data/Scripts/011_Battle/006_Other battle types/006_PokeBattle_BattleRecord.rb index 55fa04226..3fba43440 100644 --- a/Data/Scripts/011_Battle/006_Other battle types/006_PokeBattle_BattleRecord.rb +++ b/Data/Scripts/011_Battle/006_Other battle types/006_PokeBattle_BattleRecord.rb @@ -61,6 +61,9 @@ module PokeBattle_RecordedBattleModule @properties["switchStyle"] = @switchStyle @properties["showAnims"] = @showAnims @properties["items"] = Marshal.dump(@items) + @properties["backdrop"] = @backdrop + @properties["backdropBase"] = @backdropBase + @properties["time"] = @time @properties["environment"] = @environment @properties["rules"] = Marshal.dump(@rules) super @@ -188,16 +191,16 @@ module PokeBattle_BattlePlayerModule @randomindex = 0 @switchindex = 0 super(scene, - Marshal.restore(StringInput.new(@properties["party1"])), - Marshal.restore(StringInput.new(@properties["party2"])), + Marshal.restore(@properties["party1"]), + Marshal.restore(@properties["party2"]), BattlePlayerHelper.pbCreateTrainerInfo(@properties["player"]), BattlePlayerHelper.pbCreateTrainerInfo(@properties["opponent"]) ) end def pbStartBattle - @party1starts = @properties["party1starts"] - @party2starts = @properties["party2starts"] + @party1starts = Marshal.restore(@properties["party1starts"]) + @party2starts = Marshal.restore(@properties["party2starts"]) @internalBattle = @properties["internalBattle"] @endSpeeches = @properties["endSpeeches"] @endSpeechesWin = @properties["endSpeechesWin"] @@ -206,9 +209,12 @@ module PokeBattle_BattlePlayerModule @canRun = @properties["canRun"] @switchStyle = @properties["switchStyle"] @showAnims = @properties["showAnims"] + @backdrop = @properties["backdrop"] + @backdropBase = @properties["backdropBase"] + @time = @properties["time"] @environment = @properties["environment"] - @items = Marshal.restore(StringInput.new(@properties["items"])) - @rules = Marshal.restore(StringInput.new(@properties["rules"])) + @items = Marshal.restore(@properties["items"]) + @rules = Marshal.restore(@properties["rules"]) super end @@ -228,7 +234,8 @@ module PokeBattle_BattlePlayerModule pbDisplay(str) end - def pbCommandPhaseCore + def pbCommandPhaseLoop(isPlayer) + return if !isPlayer @roundindex += 1 for i in 0...4 next if @rounds[@roundindex][i].length==0 diff --git a/Data/Scripts/018_Alternate battle modes/001_Battle Frontier/004_Challenge_Battles.rb b/Data/Scripts/018_Alternate battle modes/001_Battle Frontier/004_Challenge_Battles.rb index 3c54a03ef..18611a799 100644 --- a/Data/Scripts/018_Alternate battle modes/001_Battle Frontier/004_Challenge_Battles.rb +++ b/Data/Scripts/018_Alternate battle modes/001_Battle Frontier/004_Challenge_Battles.rb @@ -109,7 +109,7 @@ def pbPlayBattle(battledata) return if !battledata scene = pbNewBattleScene scene.abortable = true - lastbattle = Marshal.restore(StringInput.new(battledata)) + lastbattle = Marshal.restore(battledata) case lastbattle[0] when BattleChallenge::BattleTowerID battleplayer = PokeBattle_BattlePlayer.new(scene, lastbattle) diff --git a/Data/Scripts/020_Debug/002_Animation editor/004_AnimEditor_ExportImport.rb b/Data/Scripts/020_Debug/002_Animation editor/004_AnimEditor_ExportImport.rb index 8a49243b3..c74f2b099 100644 --- a/Data/Scripts/020_Debug/002_Animation editor/004_AnimEditor_ExportImport.rb +++ b/Data/Scripts/020_Debug/002_Animation editor/004_AnimEditor_ExportImport.rb @@ -18,7 +18,7 @@ def dumpBase64Anim(s) end def loadBase64Anim(s) - return Marshal.restore(StringInput.new(Zlib::Inflate.inflate(s.unpack("m")[0]))) + return Marshal.restore(Zlib::Inflate.inflate(s.unpack("m")[0])) end def pbExportAnim(animations)