Remove uses of compare_var_to

This commit is contained in:
GriffinR 2019-12-18 19:22:39 -05:00
parent d137a1a0c1
commit 9e08cfe55f
8 changed files with 16 additions and 16 deletions

View File

@ -235,7 +235,7 @@
@ Generic compare macro which attempts to deduce argument types based on their values
@ Any values between 0x4000 to 0x40FF and 0x8000 to 0x8015 are considered event variable identifiers
.macro compare var:req, arg:req
.if (\arg >= VARS_START && \arg <= VARS_END) || (\arg >= SPECIAL_VARS_START && \arg <= SPECIAL_VARS_END)
.if ((\arg >= VARS_START && \arg <= VARS_END) || (\arg >= SPECIAL_VARS_START && \arg <= SPECIAL_VARS_END))
compare_var_to_var \var, \arg
.else
compare_var_to_value \var, \arg

View File

@ -1,7 +1,7 @@
MysteryEventScript_AlteringCave:: @ 86756E3
setvaddress MysteryEventScript_AlteringCave
addvar VAR_ALTERING_CAVE_WILD_SET, 1
compare_var_to_value VAR_ALTERING_CAVE_WILD_SET, 10
compare VAR_ALTERING_CAVE_WILD_SET, 10
vgoto_if_ne MysteryEventScript_AlteringCave_
setvar VAR_ALTERING_CAVE_WILD_SET, 0
MysteryEventScript_AlteringCave_: @ 86756FD

View File

@ -7,13 +7,13 @@ MysteryEventScript_AuroraTicket:: @ 867533C
checkflag FLAG_BATTLED_DEOXYS
vgoto_if_eq AuroraTicket_Obtained
checkitem ITEM_AURORA_TICKET, 1
compare_var_to_value VAR_RESULT, TRUE
compare VAR_RESULT, TRUE
vgoto_if_eq AuroraTicket_Obtained
vmessage sText_AuroraTicketForYou
waitmessage
waitbuttonpress
checkitemspace ITEM_AURORA_TICKET, 1
compare_var_to_value VAR_RESULT, FALSE
compare VAR_RESULT, FALSE
vgoto_if_eq AuroraTicket_NoBagSpace
giveitem_std ITEM_AURORA_TICKET
setflag FLAG_ENABLE_SHIP_BIRTH_ISLAND

View File

@ -4,7 +4,7 @@ MysteryEventScript_BattleCard:: @ 867513C
vgoto_if_eq MysteryEventScript_BattleCardInfo
setorcopyvar VAR_RESULT, GET_CARD_BATTLES_WON
specialvar VAR_0x8008, GetMysteryEventCardVal
compare_var_to_value VAR_0x8008, REQUIRED_CARD_BATTLES
compare VAR_0x8008, REQUIRED_CARD_BATTLES
vgoto_if_ne MysteryEventScript_BattleCardInfo
lock
faceplayer

View File

@ -9,13 +9,13 @@ MysteryEventScript_MysticTicket:: @ 867550B
checkflag FLAG_CAUGHT_HO_OH
vgoto_if_eq MysticTicket_Obtained
checkitem ITEM_MYSTIC_TICKET, 1
compare_var_to_value VAR_RESULT, TRUE
compare VAR_RESULT, TRUE
vgoto_if_eq MysticTicket_Obtained
vmessage sText_MysticTicketForYou
waitmessage
waitbuttonpress
checkitemspace ITEM_MYSTIC_TICKET, 1
compare_var_to_value VAR_RESULT, FALSE
compare VAR_RESULT, FALSE
vgoto_if_eq MysticTicket_NoBagSpace
giveitem_std ITEM_MYSTIC_TICKET
setflag FLAG_ENABLE_SHIP_NAVEL_ROCK

View File

@ -7,13 +7,13 @@ MysteryEventScript_OldSeaMap:: @ 86757F4
checkflag FLAG_CAUGHT_MEW
vgoto_if_eq OldSeaMap_Obtained
checkitem ITEM_OLD_SEA_MAP, 1
compare_var_to_value VAR_RESULT, TRUE
compare VAR_RESULT, TRUE
vgoto_if_eq OldSeaMap_Obtained
vmessage sText_MysteryGiftOldSeaMapForYou
waitmessage
waitbuttonpress
checkitemspace ITEM_OLD_SEA_MAP, 1
compare_var_to_value VAR_RESULT, FALSE
compare VAR_RESULT, FALSE
vgoto_if_eq OldSeaMap_NoBagSpace
giveitem_std ITEM_OLD_SEA_MAP
setflag FLAG_ENABLE_SHIP_FARAWAY_ISLAND

View File

@ -6,7 +6,7 @@ MysteryEventScript_SurfPichu:: @ 8674D3D
SurfPichu_GiveIfPossible: @ 8674D4C
specialvar VAR_EVENT_PICHU_SLOT, CalculatePlayerPartyCount
compare_var_to_value VAR_EVENT_PICHU_SLOT, PARTY_SIZE
compare VAR_EVENT_PICHU_SLOT, PARTY_SIZE
vgoto_if_eq SurfPichu_FullParty
setflag FLAG_MYSTERY_EVENT_DONE
vcall SurfPichu_GiveEgg
@ -33,15 +33,15 @@ SurfPichu_GiveEgg: @ 8674D7E
giveegg SPECIES_PICHU
setmonobedient VAR_EVENT_PICHU_SLOT
setmonmetlocation VAR_EVENT_PICHU_SLOT, METLOC_FATEFUL_ENCOUNTER
compare_var_to_value VAR_EVENT_PICHU_SLOT, 1
compare VAR_EVENT_PICHU_SLOT, 1
vgoto_if_eq SurfPichu_Slot1
compare_var_to_value VAR_EVENT_PICHU_SLOT, 2
compare VAR_EVENT_PICHU_SLOT, 2
vgoto_if_eq SurfPichu_Slot2
compare_var_to_value VAR_EVENT_PICHU_SLOT, 3
compare VAR_EVENT_PICHU_SLOT, 3
vgoto_if_eq SurfPichu_Slot3
compare_var_to_value VAR_EVENT_PICHU_SLOT, 4
compare VAR_EVENT_PICHU_SLOT, 4
vgoto_if_eq SurfPichu_Slot4
compare_var_to_value VAR_EVENT_PICHU_SLOT, 5
compare VAR_EVENT_PICHU_SLOT, 5
vgoto_if_eq SurfPichu_Slot5
return

View File

@ -1,7 +1,7 @@
MysteryEventScript_VisitingTrainer:: @ 8674EC1
setvaddress MysteryEventScript_VisitingTrainer
special ValidateEReaderTrainer
compare_var_to_value VAR_RESULT, 0
compare VAR_RESULT, 0
vgoto_if_eq MysteryEventScript_VisitingTrainerArrived
lock
faceplayer