@ On this map the player will automatically walk into the room, but the camera is supposed to remain still. @ To do this GF sets the player (LOCALID_PLAYER) invisible and creates a fake player object (LOCALID_FACTORY_BATTLE_PLAYER). @ The graphics of this fake player object are represented with VAR_OBJ_GFX_ID_F. @ The graphics of the opponent are represented with VAR_OBJ_GFX_ID_0, which will ultimately be set by factory_setopponentgfx. BattleFrontier_BattleFactoryBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleFactoryBattleRoom_OnTransition map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleFactoryBattleRoom_OnWarp map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleFactoryBattleRoom_OnFrame .byte 0 BattleFrontier_BattleFactoryBattleRoom_OnTransition: frontier_settrainers checkplayergender call_if_eq VAR_RESULT, MALE, BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxMale call_if_eq VAR_RESULT, FEMALE, BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxFemale frontier_getbrainstatus copyvar VAR_TEMP_F, VAR_RESULT goto_if_ne VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_SetUpFactoryHeadObj end BattleFrontier_BattleFactoryBattleRoom_EventScript_SetUpFactoryHeadObj:: call BattleFrontier_EventScript_SetBrainObjectGfx setobjectxyperm LOCALID_FACTORY_BATTLE_OPPONENT, 7, 9 end BattleFrontier_BattleFactoryBattleRoom_OnWarp: map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattleFactoryBattleRoom_EventScript_HideObjects .2byte 0 BattleFrontier_BattleFactoryBattleRoom_EventScript_HideObjects:: setvar VAR_TEMP_1, 1 hideobjectat LOCALID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM goto_if_ne VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_EndHideObjects hideobjectat LOCALID_FACTORY_BATTLE_OPPONENT, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM BattleFrontier_BattleFactoryBattleRoom_EventScript_EndHideObjects:: end BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxMale:: setvar VAR_OBJ_GFX_ID_F, OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL return BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxFemale:: setvar VAR_OBJ_GFX_ID_F, OBJ_EVENT_GFX_RIVAL_MAY_NORMAL return BattleFrontier_BattleFactoryBattleRoom_OnFrame: map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoom .2byte 0 BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle:: msgbox BattleFrontier_BattleFactoryBattleRoom_Text_GetAMoveOn, MSGBOX_DEFAULT closemessage applymovement LOCALID_FACTORY_BATTLE_OPPONENT, BattleFrontier_BattleFactoryBattleRoom_Movement_NolandMoveToBattle applymovement LOCALID_FACTORY_BATTLE_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom waitmovement 0 call BattleFrontier_BattleFactoryBattleRoom_EventScript_ScientistsFaceBattle goto BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleOpponent end BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoom:: goto_if_ne VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle applymovement LOCALID_FACTORY_BATTLE_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom waitmovement 0 call BattleFrontier_BattleFactoryBattleRoom_EventScript_ScientistsFaceBattle factory_setopponentgfx removeobject LOCALID_FACTORY_BATTLE_OPPONENT setobjectxyperm LOCALID_FACTORY_BATTLE_OPPONENT, 7, 1 addobject LOCALID_FACTORY_BATTLE_OPPONENT applymovement LOCALID_FACTORY_BATTLE_OPPONENT, BattleFrontier_BattleFactoryBattleRoom_Movement_OpponentEnter waitmovement 0 BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleOpponent:: goto_if_ne VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNoland palace_getopponentintro lockall msgbox gStringVar4, MSGBOX_DEFAULT waitmessage closemessage frontier_set FRONTIER_DATA_RECORD_DISABLED, FALSE special HealPlayerParty setvar VAR_0x8004, SPECIAL_BATTLE_FACTORY setvar VAR_0x8005, 0 special DoSpecialTrainerBattle waitstate switch VAR_RESULT case 1, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedOpponent BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobby BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedOpponent:: factory_get FACTORY_DATA_WIN_STREAK_SWAPS goto_if_eq VAR_RESULT, MAX_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak addvar VAR_RESULT, 1 setorcopyvar VAR_0x8006, VAR_RESULT factory_set FACTORY_DATA_WIN_STREAK_SWAPS @ uses VAR_0x8006 above BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak:: call BattleFrontier_EventScript_IncrementWinStreak BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementBattleNum:: frontier_get FRONTIER_DATA_BATTLE_NUM addvar VAR_RESULT, 1 frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT switch VAR_RESULT case 7, BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyWon setvar VAR_0x8006, 1 warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 8, 8 waitstate BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyWon:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobby BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNoland:: switch VAR_TEMP_F case FRONTIER_BRAIN_GOLD, BattleFrontier_BattleFactoryBattleRoom_EventScript_IntroNolandGold case FRONTIER_BRAIN_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver msgbox BattleFrontier_BattleFactoryBattleRoom_Text_NolandImFactoryHead, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver:: msgbox BattleFrontier_BattleFactoryBattleRoom_Text_ShakeOutKnowledgeBringItOn, MSGBOX_DEFAULT call BattleFrontier_BattleFactoryBattleRoom_EventScript_DoNolandBattle goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver:: frontier_getsymbols goto_if_ne VAR_RESULT, 0, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland msgbox BattleFrontier_BattleFactoryBattleRoom_Text_NolandLetsSeeFrontierPass, MSGBOX_DEFAULT closemessage applymovement LOCALID_FACTORY_BATTLE_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland waitmovement 0 playfanfare MUS_OBTAIN_SYMBOL message BattleFrontier_BattleFactoryBattleRoom_Text_ReceivedKnowledgeSymbol waitmessage waitfanfare frontier_givesymbol msgbox BattleFrontier_BattleFactoryBattleRoom_Text_NextTimeNoHoldsBarred, MSGBOX_DEFAULT goto BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland BattleFrontier_BattleFactoryBattleRoom_EventScript_IntroNolandGold:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold msgbox BattleFrontier_BattleFactoryBattleRoom_Text_HarderLookThanLastTime, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold:: msgbox BattleFrontier_BattleFactoryBattleRoom_Text_AllRightBringItOn, MSGBOX_DEFAULT call BattleFrontier_BattleFactoryBattleRoom_EventScript_DoNolandBattle goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandGold goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandGold:: frontier_getsymbols goto_if_eq VAR_RESULT, 2, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland msgbox BattleFrontier_BattleFactoryBattleRoom_Text_OutOfMyLeagueLetsSeePass, MSGBOX_DEFAULT waitmessage applymovement LOCALID_FACTORY_BATTLE_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland waitmovement 0 playfanfare MUS_OBTAIN_SYMBOL message BattleFrontier_BattleFactoryBattleRoom_Text_KnowledgeSymbolTookGoldenShine waitmessage waitfanfare frontier_givesymbol msgbox BattleFrontier_BattleFactoryBattleRoom_Text_LastTimeILoseToYou, MSGBOX_DEFAULT goto BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland BattleFrontier_BattleFactoryBattleRoom_EventScript_DoNolandBattle:: closemessage frontier_set FRONTIER_DATA_RECORD_DISABLED, FALSE special HealPlayerParty setvar VAR_0x8004, SPECIAL_BATTLE_FACTORY setvar VAR_0x8005, 0 special DoSpecialTrainerBattle waitstate return BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland:: factory_get FACTORY_DATA_WIN_STREAK_SWAPS goto_if_eq VAR_RESULT, MAX_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak addvar VAR_RESULT, 1 setorcopyvar VAR_0x8006, VAR_RESULT factory_set FACTORY_DATA_WIN_STREAK_SWAPS @ uses VAR_0x8006 above factory_get FACTORY_DATA_WIN_STREAK goto_if_eq VAR_RESULT, MAX_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementBattleNum addvar VAR_RESULT, 1 factory_set FACTORY_DATA_WIN_STREAK, VAR_RESULT frontier_get FRONTIER_DATA_BATTLE_NUM addvar VAR_RESULT, 1 goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyWon end BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom: walk_up walk_up walk_up walk_up walk_up face_right step_end BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland: walk_right step_end BattleFrontier_BattleFactoryBattleRoom_Movement_OpponentEnter: walk_down walk_down walk_down walk_down walk_down face_left step_end BattleFrontier_BattleFactoryBattleRoom_Movement_NolandMoveToBattle: walk_up walk_up walk_up face_left step_end BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobby:: copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE goto_if_eq VAR_RESULT, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 4, 8 waitstate end BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles:: warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 14, 8 waitstate end BattleFrontier_BattleFactoryBattleRoom_EventScript_ScientistsFaceBattle:: applymovement LOCALID_FACTORY_BATTLE_SCIENTIST_1, Common_Movement_WalkInPlaceFasterRight applymovement LOCALID_FACTORY_BATTLE_SCIENTIST_2, Common_Movement_WalkInPlaceFasterRight applymovement LOCALID_FACTORY_BATTLE_SCIENTIST_3, Common_Movement_WalkInPlaceFasterRight applymovement LOCALID_FACTORY_BATTLE_SCIENTIST_4, Common_Movement_WalkInPlaceFasterLeft applymovement LOCALID_FACTORY_BATTLE_SCIENTIST_5, Common_Movement_WalkInPlaceFasterLeft applymovement LOCALID_FACTORY_BATTLE_SCIENTIST_6, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return BattleFrontier_BattleFactoryBattleRoom_Text_GetAMoveOn: .string "嘿,嘿!\n快点动起来!$" BattleFrontier_BattleFactoryBattleRoom_Text_NolandImFactoryHead: .string "嘿,我叫达拉!\n这里基本上由我负责,\l这就是为什么我叫工厂头目!\p我看了一下你交换式对战的数据。\p你好像有正确的想法,\n但是你的头脑太过死板!\p听好了,知识可不只是读书\n或者做功课。\p仅仅做那种事……\n很可能毫无作用!\p你必须用你的身心去\n亲自体验,明白吗?\p我要在同等的条件\n下和你较量。\p我也会用租借的宝可梦!$" BattleFrontier_BattleFactoryBattleRoom_Text_ShakeOutKnowledgeBringItOn: .string "穷尽你毕生所学,\n放马过来!$" BattleFrontier_BattleFactoryBattleRoom_Text_NolandLetsSeeFrontierPass: .string "达拉:做得漂亮!\n拿出你的开拓通行证。$" BattleFrontier_BattleFactoryBattleRoom_Text_ReceivedKnowledgeSymbol: .string "知识象征被刻在了\n开拓通行证上!$" BattleFrontier_BattleFactoryBattleRoom_Text_NextTimeNoHoldsBarred: .string "哈……\n你真是个聪明的人……\p下次,我会全力以赴的。\n毫不留情,明白吗?\p继续学习吧!$" BattleFrontier_BattleFactoryBattleRoom_Text_HarderLookThanLastTime: .string "达拉:嘿,嘿!近来如何?\n你有在继续不断地学习吗?\p……哦?\p你看上去比我上次见到你\n时更坚毅了。\p那么,看起来这会很有趣!\n我开始兴奋起来了,嘿!$" BattleFrontier_BattleFactoryBattleRoom_Text_AllRightBringItOn: .string "好!\n放马过来!$" BattleFrontier_BattleFactoryBattleRoom_Text_OutOfMyLeagueLetsSeePass: .string "达拉:什么……\n你已经和我不在一个层次了!\p唉!\n拿出你的开拓通行证吧!$" BattleFrontier_BattleFactoryBattleRoom_Text_KnowledgeSymbolTookGoldenShine: .string "知识象征闪耀着\n金色的光芒!$" BattleFrontier_BattleFactoryBattleRoom_Text_LastTimeILoseToYou: .string "切!\p这绝对是我最后一次\n输给你!\p我们必须再来一次,如何?$"