diff --git a/asm/macros/event.inc b/asm/macros/event.inc index b26851148..298e8eb7c 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1653,7 +1653,7 @@ goto_if TRUE, \dest .endm - .macro goto_if_undefeated trainer:req, dest:req + .macro goto_if_not_defeated trainer:req, dest:req checktrainerflag \trainer goto_if FALSE, \dest .endm @@ -1663,7 +1663,7 @@ call_if TRUE, \dest .endm - .macro call_if_undefeated trainer:req, dest:req + .macro call_if_not_defeated trainer:req, dest:req checktrainerflag \trainer call_if FALSE, \dest .endm diff --git a/data/maps/DewfordTown_Gym/scripts.inc b/data/maps/DewfordTown_Gym/scripts.inc index c38bcc906..c2da7e335 100644 --- a/data/maps/DewfordTown_Gym/scripts.inc +++ b/data/maps/DewfordTown_Gym/scripts.inc @@ -123,22 +123,22 @@ DewfordTown_Gym_EventScript_AnimateFlashFullBrightness:: @ 81FC75D DewfordTown_Gym_EventScript_CountTrainersDefeated:: @ 81FC768 setvar VAR_0x8000, 0 - goto_if_undefeated TRAINER_TAKAO, DewfordTown_Gym_EventScript_CheckJocelyn + goto_if_not_defeated TRAINER_TAKAO, DewfordTown_Gym_EventScript_CheckJocelyn addvar VAR_0x8000, 1 DewfordTown_Gym_EventScript_CheckJocelyn:: @ 81FC77B - goto_if_undefeated TRAINER_JOCELYN, DewfordTown_Gym_EventScript_CheckLaura + goto_if_not_defeated TRAINER_JOCELYN, DewfordTown_Gym_EventScript_CheckLaura addvar VAR_0x8000, 1 DewfordTown_Gym_EventScript_CheckLaura:: @ 81FC789 - goto_if_undefeated TRAINER_LAURA, DewfordTown_Gym_EventScript_CheckBrenden + goto_if_not_defeated TRAINER_LAURA, DewfordTown_Gym_EventScript_CheckBrenden addvar VAR_0x8000, 1 DewfordTown_Gym_EventScript_CheckBrenden:: @ 81FC797 - goto_if_undefeated TRAINER_BRENDEN, DewfordTown_Gym_EventScript_CheckCristian + goto_if_not_defeated TRAINER_BRENDEN, DewfordTown_Gym_EventScript_CheckCristian addvar VAR_0x8000, 1 DewfordTown_Gym_EventScript_CheckCristian:: @ 81FC7A5 - goto_if_undefeated TRAINER_CRISTIAN, DewfordTown_Gym_EventScript_CheckLilith + goto_if_not_defeated TRAINER_CRISTIAN, DewfordTown_Gym_EventScript_CheckLilith addvar VAR_0x8000, 1 DewfordTown_Gym_EventScript_CheckLilith:: @ 81FC7B3 - goto_if_undefeated TRAINER_LILITH, DewfordTown_Gym_EventScript_StopCountingTrainers + goto_if_not_defeated TRAINER_LILITH, DewfordTown_Gym_EventScript_StopCountingTrainers addvar VAR_0x8000, 1 DewfordTown_Gym_EventScript_StopCountingTrainers:: @ 81FC7C1 return diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc index e3b636a7e..2b708a386 100644 --- a/data/maps/PetalburgCity_Gym/scripts.inc +++ b/data/maps/PetalburgCity_Gym/scripts.inc @@ -823,7 +823,7 @@ PetalburgCity_Gym_EventScript_AccuracyRoomDoor:: @ 8205187 PetalburgCity_Gym_EventScript_ConfusionRoomDoor:: @ 82051BC lockall - goto_if_undefeated TRAINER_RANDALL, PetalburgCity_Gym_EventScript_DoorLocked + goto_if_not_defeated TRAINER_RANDALL, PetalburgCity_Gym_EventScript_DoorLocked setvar VAR_0x8008, 7 setvar VAR_0x8009, 46 msgbox PetalburgCity_Gym_Text_EnterConfusionRoom, MSGBOX_YESNO @@ -835,7 +835,7 @@ PetalburgCity_Gym_EventScript_ConfusionRoomDoor:: @ 82051BC PetalburgCity_Gym_EventScript_LeftDefenseRoomDoor:: @ 82051EF lockall - goto_if_undefeated TRAINER_RANDALL, PetalburgCity_Gym_EventScript_DoorLocked + goto_if_not_defeated TRAINER_RANDALL, PetalburgCity_Gym_EventScript_DoorLocked setvar VAR_0x8008, 1 setvar VAR_0x8009, 59 msgbox PetalburgCity_Gym_Text_EnterDefenseRoom, MSGBOX_YESNO @@ -847,7 +847,7 @@ PetalburgCity_Gym_EventScript_LeftDefenseRoomDoor:: @ 82051EF PetalburgCity_Gym_EventScript_RightDefenseRoomDoor:: @ 8205222 lockall - goto_if_undefeated TRAINER_MARY, PetalburgCity_Gym_EventScript_DoorLocked + goto_if_not_defeated TRAINER_MARY, PetalburgCity_Gym_EventScript_DoorLocked setvar VAR_0x8008, 7 setvar VAR_0x8009, 59 msgbox PetalburgCity_Gym_Text_EnterDefenseRoom, MSGBOX_YESNO @@ -859,7 +859,7 @@ PetalburgCity_Gym_EventScript_RightDefenseRoomDoor:: @ 8205222 PetalburgCity_Gym_EventScript_RecoveryRoomDoor:: @ 8205255 lockall - goto_if_undefeated TRAINER_MARY, PetalburgCity_Gym_EventScript_DoorLocked + goto_if_not_defeated TRAINER_MARY, PetalburgCity_Gym_EventScript_DoorLocked setvar VAR_0x8008, 1 setvar VAR_0x8009, 72 msgbox PetalburgCity_Gym_Text_EnterRecoveryRoom, MSGBOX_YESNO @@ -871,7 +871,7 @@ PetalburgCity_Gym_EventScript_RecoveryRoomDoor:: @ 8205255 PetalburgCity_Gym_EventScript_LeftStrengthRoomDoor:: @ 8205288 lockall - goto_if_undefeated TRAINER_PARKER, PetalburgCity_Gym_EventScript_DoorLocked + goto_if_not_defeated TRAINER_PARKER, PetalburgCity_Gym_EventScript_DoorLocked setvar VAR_0x8008, 1 setvar VAR_0x8009, 20 msgbox PetalburgCity_Gym_Text_EnterStrengthRoom, MSGBOX_YESNO @@ -883,7 +883,7 @@ PetalburgCity_Gym_EventScript_LeftStrengthRoomDoor:: @ 8205288 PetalburgCity_Gym_EventScript_RightStrengthRoomDoor:: @ 82052BB lockall - goto_if_undefeated TRAINER_ALEXIA, PetalburgCity_Gym_EventScript_DoorLocked + goto_if_not_defeated TRAINER_ALEXIA, PetalburgCity_Gym_EventScript_DoorLocked setvar VAR_0x8008, 7 setvar VAR_0x8009, 20 msgbox PetalburgCity_Gym_Text_EnterStrengthRoom, MSGBOX_YESNO @@ -895,7 +895,7 @@ PetalburgCity_Gym_EventScript_RightStrengthRoomDoor:: @ 82052BB PetalburgCity_Gym_EventScript_LeftOHKORoomDoor:: @ 82052EE lockall - goto_if_undefeated TRAINER_ALEXIA, PetalburgCity_Gym_EventScript_DoorLocked + goto_if_not_defeated TRAINER_ALEXIA, PetalburgCity_Gym_EventScript_DoorLocked setvar VAR_0x8008, 1 setvar VAR_0x8009, 33 msgbox PetalburgCity_Gym_Text_EnterOHKORoom, MSGBOX_YESNO @@ -907,7 +907,7 @@ PetalburgCity_Gym_EventScript_LeftOHKORoomDoor:: @ 82052EE PetalburgCity_Gym_EventScript_RightOHKORoomDoor:: @ 8205321 lockall - goto_if_undefeated TRAINER_GEORGE, PetalburgCity_Gym_EventScript_DoorLocked + goto_if_not_defeated TRAINER_GEORGE, PetalburgCity_Gym_EventScript_DoorLocked setvar VAR_0x8008, 7 setvar VAR_0x8009, 33 msgbox PetalburgCity_Gym_Text_EnterOHKORoom, MSGBOX_YESNO @@ -919,7 +919,7 @@ PetalburgCity_Gym_EventScript_RightOHKORoomDoor:: @ 8205321 PetalburgCity_Gym_EventScript_LeftGymLeadersRoomDoor:: @ 8205354 lockall - goto_if_undefeated TRAINER_JODY, PetalburgCity_Gym_EventScript_DoorLocked + goto_if_not_defeated TRAINER_JODY, PetalburgCity_Gym_EventScript_DoorLocked setvar VAR_0x8008, 1 setvar VAR_0x8009, 7 msgbox PetalburgCity_Gym_Text_EnterGymLeadersRoom, MSGBOX_YESNO @@ -931,7 +931,7 @@ PetalburgCity_Gym_EventScript_LeftGymLeadersRoomDoor:: @ 8205354 PetalburgCity_Gym_EventScript_RightGymLeadersRoomDoor:: @ 8205387 lockall - goto_if_undefeated TRAINER_BERKE, PetalburgCity_Gym_EventScript_DoorLocked + goto_if_not_defeated TRAINER_BERKE, PetalburgCity_Gym_EventScript_DoorLocked setvar VAR_0x8008, 7 setvar VAR_0x8009, 7 msgbox PetalburgCity_Gym_Text_EnterGymLeadersRoom, MSGBOX_YESNO diff --git a/data/maps/Route109_SeashoreHouse/scripts.inc b/data/maps/Route109_SeashoreHouse/scripts.inc index 3a2c70c03..641c469e1 100644 --- a/data/maps/Route109_SeashoreHouse/scripts.inc +++ b/data/maps/Route109_SeashoreHouse/scripts.inc @@ -89,9 +89,9 @@ Route109_SeashoreHouse_EventScript_Simon:: @ 8269518 end Route109_SeashoreHouse_EventScript_CheckTrainersCompletion:: @ 8269533 - goto_if_undefeated TRAINER_DWAYNE, Route109_SeashoreHouse_EventScript_TrainersNotCompleted - goto_if_undefeated TRAINER_JOHANNA, Route109_SeashoreHouse_EventScript_TrainersNotCompleted - goto_if_undefeated TRAINER_SIMON, Route109_SeashoreHouse_EventScript_TrainersNotCompleted + goto_if_not_defeated TRAINER_DWAYNE, Route109_SeashoreHouse_EventScript_TrainersNotCompleted + goto_if_not_defeated TRAINER_JOHANNA, Route109_SeashoreHouse_EventScript_TrainersNotCompleted + goto_if_not_defeated TRAINER_SIMON, Route109_SeashoreHouse_EventScript_TrainersNotCompleted setflag FLAG_DEFEATED_SEASHORE_HOUSE release end diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc index e905508de..5971dc7f9 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -48,7 +48,7 @@ Route111_OnTransition: @ 81F0D87 call_if_eq Route111_EventScript_SetMirageTowerGone call Route111_EventScript_CheckSetSandstorm call GabbyAndTy_EventScript_UpdateLocation - goto_if_undefeated TRAINER_VICKY, Route111_EventScript_SetWinstratesNotDefeated + goto_if_not_defeated TRAINER_VICKY, Route111_EventScript_SetWinstratesNotDefeated end Route111_EventScript_SetFallingPlayerGfx:: @ 81F0DC2 diff --git a/data/maps/SSTidalCorridor/scripts.inc b/data/maps/SSTidalCorridor/scripts.inc index 667328725..a276be20f 100644 --- a/data/maps/SSTidalCorridor/scripts.inc +++ b/data/maps/SSTidalCorridor/scripts.inc @@ -174,14 +174,14 @@ SSTidalCorridor_EventScript_EnjoyYourCruise:: @ 823C1BD end SSTidalCorridor_EventScript_CheckIfTrainersDefeated:: @ 823C1C7 - goto_if_undefeated TRAINER_PHILLIP, SSTidalCorridor_EventScript_TrainerNotDefeated - goto_if_undefeated TRAINER_LEONARD, SSTidalCorridor_EventScript_TrainerNotDefeated - goto_if_undefeated TRAINER_COLTON, SSTidalCorridor_EventScript_TrainerNotDefeated - goto_if_undefeated TRAINER_MICAH, SSTidalCorridor_EventScript_TrainerNotDefeated - goto_if_undefeated TRAINER_THOMAS, SSTidalCorridor_EventScript_TrainerNotDefeated - goto_if_undefeated TRAINER_LEA_AND_JED, SSTidalCorridor_EventScript_TrainerNotDefeated - goto_if_undefeated TRAINER_GARRET, SSTidalCorridor_EventScript_TrainerNotDefeated - goto_if_undefeated TRAINER_NAOMI, SSTidalCorridor_EventScript_TrainerNotDefeated + goto_if_not_defeated TRAINER_PHILLIP, SSTidalCorridor_EventScript_TrainerNotDefeated + goto_if_not_defeated TRAINER_LEONARD, SSTidalCorridor_EventScript_TrainerNotDefeated + goto_if_not_defeated TRAINER_COLTON, SSTidalCorridor_EventScript_TrainerNotDefeated + goto_if_not_defeated TRAINER_MICAH, SSTidalCorridor_EventScript_TrainerNotDefeated + goto_if_not_defeated TRAINER_THOMAS, SSTidalCorridor_EventScript_TrainerNotDefeated + goto_if_not_defeated TRAINER_LEA_AND_JED, SSTidalCorridor_EventScript_TrainerNotDefeated + goto_if_not_defeated TRAINER_GARRET, SSTidalCorridor_EventScript_TrainerNotDefeated + goto_if_not_defeated TRAINER_NAOMI, SSTidalCorridor_EventScript_TrainerNotDefeated setflag FLAG_DEFEATED_SS_TIDAL_TRAINERS goto SSTidalCorridor_EventScript_EnjoyYourCruise return