Skip to content

Commit

Permalink
Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/lighting-expansion-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
AsparagusEduardo committed Dec 21, 2024
2 parents 05f300f + 2507523 commit dbc3cc2
Show file tree
Hide file tree
Showing 113 changed files with 1,037 additions and 349 deletions.
7 changes: 7 additions & 0 deletions asm/macros/event.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,13 @@
.4byte \products
.endm

@ Used as the endpoint for a Pokemart item list
.macro pokemartlistend
.2byte ITEM_NONE
release
end
.endm

@ Opens the Pokemart system and treats the list of items as decorations.
@ Products should be a list of .2byte decoration values preceded by an .align 2
.macro pokemartdecoration products:req
Expand Down
28 changes: 18 additions & 10 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ BattleScript_EffectTidyUp::
pause B_WAIT_TIME_MED
ppreduce
waitstate
saveattacker
savetarget
trytidyup FALSE, BattleScript_EffectTidyUpDoMoveAnimation
restoreattacker
restoretarget
goto BattleScript_EffectDragonDanceFromStatUp

BattleScript_EffectTidyUpDoMoveAnimation::
Expand All @@ -143,6 +147,8 @@ BattleScript_EffectTidyUpDoMoveAnimation::
trytidyup TRUE, NULL
printstring STRINGID_TIDYINGUPCOMPLETE
waitmessage B_WAIT_TIME_LONG
restoreattacker
restoretarget
goto BattleScript_EffectDragonDanceFromStatUp

BattleScript_EffectUpperHand::
Expand Down Expand Up @@ -1220,7 +1226,6 @@ BattleScript_StrengthSapLower:
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatDownStringIds
waitmessage B_WAIT_TIME_LONG
goto BattleScript_StrengthSapHp
@ Drain HP without lowering a stat
BattleScript_StrengthSapHp:
jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_StrengthSapManipulateDmg
Expand Down Expand Up @@ -2793,6 +2798,10 @@ BattleScript_EffectHitEscape::
jumpifbattleend BattleScript_HitEscapeEnd
jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_HitEscapeEnd
jumpifemergencyexited BS_TARGET, BattleScript_HitEscapeEnd
jumpiffainted BS_TARGET, FALSE, BattleScript_HitEscapeSwitch
setbyte sGIVEEXP_STATE, 0
getexp BS_TARGET
BattleScript_HitEscapeSwitch:
goto BattleScript_MoveSwitchPursuit
BattleScript_HitEscapeEnd:
end
Expand Down Expand Up @@ -6371,18 +6380,14 @@ BattleScript_GulpMissileGulping::
datahpupdate BS_ATTACKER
tryfaintmon BS_ATTACKER
jumpiffainted BS_ATTACKER, TRUE, BattleScript_GulpMissileNoSecondEffectGulping
jumpifholdeffect BS_ATTACKER, HOLD_EFFECT_CLEAR_AMULET, BattleScript_GulpMissileNoSecondEffectGulping
jumpifability BS_ATTACKER, ABILITY_CLEAR_BODY, BattleScript_GulpMissileNoSecondEffectGulping
jumpifability BS_ATTACKER, ABILITY_FULL_METAL_BODY, BattleScript_GulpMissileNoSecondEffectGulping
jumpifability BS_ATTACKER, ABILITY_WHITE_SMOKE, BattleScript_GulpMissileNoSecondEffectGulping
jumpifflowerveilattacker BattleScript_GulpMissileNoSecondEffectGulping
BattleScript_GulpMissileNoDmgGulping:
handleformchange BS_TARGET, 0
playanimation BS_TARGET, B_ANIM_FORM_CHANGE
waitanimation
swapattackerwithtarget @ to make gStatDownStringIds down below print the right battler
setstatchanger STAT_DEF, 1, TRUE
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_GulpMissileGorgingTargetDefenseCantGoLower
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_GulpMissileGulpingEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_GulpMissileGulpingTargetDefenseCantGoLower
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatDownStringIds
Expand All @@ -6394,9 +6399,11 @@ BattleScript_GulpMissileNoSecondEffectGulping:
playanimation BS_TARGET, B_ANIM_FORM_CHANGE
waitanimation
return
BattleScript_GulpMissileGorgingTargetDefenseCantGoLower:
BattleScript_GulpMissileGulpingTargetDefenseCantGoLower:
printstring STRINGID_STATSWONTDECREASE
waitmessage B_WAIT_TIME_LONG
BattleScript_GulpMissileGulpingEnd:
swapattackerwithtarget @ restore the battlers, just in case
return

BattleScript_SeedSowerActivates::
Expand Down Expand Up @@ -7124,7 +7131,8 @@ BattleScript_CottonDownLoop:
jumpiffainted BS_TARGET, TRUE, BattleScript_CottonDownLoopIncrement
setstatchanger STAT_SPEED, 1, TRUE
jumpifbyteequal gBattlerTarget, gEffectBattler, BattleScript_CottonDownLoopIncrement
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_CottonDownTargetSpeedCantGoLower
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_CottonDownLoopIncrement
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_CottonDownTargetSpeedCantGoLower
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatDownStringIds
Expand Down Expand Up @@ -9067,7 +9075,7 @@ BattleScript_BerryStatRaiseEnd2::
BattleScript_BerryStatRaiseEnd2_AbilityPopup:
call BattleScript_AbilityPopUp
BattleScript_BerryStatRaiseEnd2_Anim:
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_BerryStatRaiseEnd2_End
statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_BerryStatRaiseEnd2_End
setgraphicalstatchangevalues
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, sB_ANIM_ARG1
setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_ROSE_ITEM
Expand Down
4 changes: 1 addition & 3 deletions data/maps/BattleFrontier_Mart/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ BattleFrontier_Mart_Pokemart:
.2byte ITEM_ZINC
.2byte ITEM_CARBOS
.2byte ITEM_HP_UP
.2byte ITEM_NONE
release
end
pokemartlistend

BattleFrontier_Mart_EventScript_OldMan::
msgbox BattleFrontier_Mart_Text_ChaperonGrandson, MSGBOX_NPC
Expand Down
4 changes: 1 addition & 3 deletions data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ EverGrandeCity_PokemonLeague_1F_Pokemart:
.2byte ITEM_FULL_HEAL
.2byte ITEM_REVIVE
.2byte ITEM_MAX_REPEL
.2byte ITEM_NONE
release
end
pokemartlistend

@ The door guards only check for FLAG_BADGE06_GET because Winonas badge is the only one that can be skipped
@ Its assumed the player has the remaining badges
Expand Down
4 changes: 1 addition & 3 deletions data/maps/FallarborTown_Mart/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ FallarborTown_Mart_Pokemart:
.2byte ITEM_X_DEFENSE
.2byte ITEM_DIRE_HIT
.2byte ITEM_GUARD_SPEC
.2byte ITEM_NONE
release
end
pokemartlistend

FallarborTown_Mart_EventScript_Woman::
msgbox FallarborTown_Mart_Text_DecidingSkittyEvolve, MSGBOX_NPC
Expand Down
8 changes: 2 additions & 6 deletions data/maps/FortreeCity_DecorationShop/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ FortreeCity_DecorationShop_PokemartDecor_Desks:
.2byte DECOR_BRICK_DESK
.2byte DECOR_CAMP_DESK
.2byte DECOR_HARD_DESK
.2byte DECOR_NONE
release
end
pokemartlistend

FortreeCity_DecorationShop_EventScript_ClerkChairs::
lock
Expand All @@ -53,9 +51,7 @@ FortreeCity_DecorationShop_PokemartDecor_Chairs:
.2byte DECOR_BRICK_CHAIR
.2byte DECOR_CAMP_CHAIR
.2byte DECOR_HARD_CHAIR
.2byte DECOR_NONE
release
end
pokemartlistend

FortreeCity_DecorationShop_Text_MerchandiseSentToPC:
.string "Merchandise you buy here is sent to\n"
Expand Down
4 changes: 1 addition & 3 deletions data/maps/FortreeCity_Mart/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ FortreeCity_Mart_Pokemart:
.2byte ITEM_REVIVE
.2byte ITEM_SUPER_REPEL
.2byte ITEM_WOOD_MAIL
.2byte ITEM_NONE
release
end
pokemartlistend

FortreeCity_Mart_EventScript_Woman::
msgbox FortreeCity_Mart_Text_SuperRepelBetter, MSGBOX_NPC
Expand Down
4 changes: 1 addition & 3 deletions data/maps/LavaridgeTown_HerbShop/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ LavaridgeTown_HerbShop_Pokemart:
.2byte ITEM_ENERGY_ROOT
.2byte ITEM_HEAL_POWDER
.2byte ITEM_REVIVAL_HERB
.2byte ITEM_NONE
release
end
pokemartlistend

LavaridgeTown_HerbShop_EventScript_ExpertM::
msgbox LavaridgeTown_HerbShop_Text_HerbalMedicineWorksButMonWillDislike, MSGBOX_NPC
Expand Down
4 changes: 1 addition & 3 deletions data/maps/LavaridgeTown_Mart/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ LavaridgeTown_Mart_Pokemart:
.2byte ITEM_REVIVE
.2byte ITEM_SUPER_REPEL
.2byte ITEM_X_SPEED
.2byte ITEM_NONE
release
end
pokemartlistend

LavaridgeTown_Mart_EventScript_ExpertM::
msgbox LavaridgeTown_Mart_Text_XSpeedFirstStrike, MSGBOX_NPC
Expand Down
8 changes: 2 additions & 6 deletions data/maps/LilycoveCity_DepartmentStore_2F/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ LilycoveCity_DepartmentStore_2F_Pokemart1:
.2byte ITEM_ICE_HEAL
.2byte ITEM_AWAKENING
.2byte ITEM_FLUFFY_TAIL
.2byte ITEM_NONE
release
end
pokemartlistend

LilycoveCity_DepartmentStore_2F_EventScript_ClerkRight::
lock
Expand All @@ -62,9 +60,7 @@ LilycoveCity_DepartmentStore_2F_Pokemart2:
.2byte ITEM_MAX_REPEL
.2byte ITEM_WAVE_MAIL
.2byte ITEM_MECH_MAIL
.2byte ITEM_NONE
release
end
pokemartlistend

LilycoveCity_DepartmentStore_2F_Text_LearnToUseItemsProperly:
.string "Learn to use items properly.\n"
Expand Down
8 changes: 2 additions & 6 deletions data/maps/LilycoveCity_DepartmentStore_3F/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ LilycoveCity_DepartmentStore_3F_Pokemart_Vitamins:
.2byte ITEM_ZINC
.2byte ITEM_CARBOS
.2byte ITEM_HP_UP
.2byte ITEM_NONE
release
end
pokemartlistend

LilycoveCity_DepartmentStore_3F_EventScript_ClerkRight::
lock
Expand All @@ -42,9 +40,7 @@ LilycoveCity_DepartmentStore_3F_Pokemart_StatBoosters:
.2byte ITEM_DIRE_HIT
.2byte ITEM_GUARD_SPEC
.2byte ITEM_X_ACCURACY
.2byte ITEM_NONE
release
end
pokemartlistend

LilycoveCity_DepartmentStore_3F_EventScript_TriathleteM::
msgbox LilycoveCity_DepartmentStore_3F_Text_ItemsBestForTougheningPokemon, MSGBOX_NPC
Expand Down
8 changes: 2 additions & 6 deletions data/maps/LilycoveCity_DepartmentStore_4F/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ LilycoveCity_DepartmentStore_4F_Pokemart_AttackTMs:
.2byte ITEM_TM_THUNDER
.2byte ITEM_TM_BLIZZARD
.2byte ITEM_TM_HYPER_BEAM
.2byte ITEM_NONE
release
end
pokemartlistend

LilycoveCity_DepartmentStore_4F_EventScript_ClerkRight::
lock
Expand All @@ -49,9 +47,7 @@ LilycoveCity_DepartmentStore_4F_Pokemart_DefenseTMs:
.2byte ITEM_TM_SAFEGUARD
.2byte ITEM_TM_REFLECT
.2byte ITEM_TM_LIGHT_SCREEN
.2byte ITEM_NONE
release
end
pokemartlistend

LilycoveCity_DepartmentStore_4F_Text_AttackOrDefenseTM:
.string "Hmm…\p"
Expand Down
16 changes: 4 additions & 12 deletions data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ LilycoveCity_DepartmentStore_5F_Pokemart_Dolls:
.2byte DECOR_SKITTY_DOLL
.2byte DECOR_SWABLU_DOLL
.2byte DECOR_GULPIN_DOLL
.2byte DECOR_NONE
release
end
pokemartlistend

LilycoveCity_DepartmentStore_5F_EventScript_ClerkMidLeft::
lock
Expand All @@ -66,9 +64,7 @@ LilycoveCity_DepartmentStore_5F_Pokemart_Cushions:
.2byte DECOR_GRASS_CUSHION
.2byte DECOR_FIRE_CUSHION
.2byte DECOR_WATER_CUSHION
.2byte DECOR_NONE
release
end
pokemartlistend

LilycoveCity_DepartmentStore_5F_EventScript_ClerkMidRight::
lock
Expand All @@ -91,9 +87,7 @@ LilycoveCity_DepartmentStore_5F_Pokemart_Posters:
.2byte DECOR_LONG_POSTER
.2byte DECOR_SEA_POSTER
.2byte DECOR_SKY_POSTER
.2byte DECOR_NONE
release
end
pokemartlistend

LilycoveCity_DepartmentStore_5F_EventScript_ClerkFarRight::
lock
Expand All @@ -117,9 +111,7 @@ LilycoveCity_DepartmentStore_5F_Pokemart_Mats:
.2byte DECOR_GLITTER_MAT
.2byte DECOR_JUMP_MAT
.2byte DECOR_SPIN_MAT
.2byte DECOR_NONE
release
end
pokemartlistend

LilycoveCity_DepartmentStore_5F_EventScript_PokefanF::
msgbox LilycoveCity_DepartmentStore_5F_Text_PlaceFullOfCuteDolls, MSGBOX_NPC
Expand Down
4 changes: 1 addition & 3 deletions data/maps/MauvilleCity_Mart/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ MauvilleCity_Mart_Pokemart:
.2byte ITEM_GUARD_SPEC
.2byte ITEM_DIRE_HIT
.2byte ITEM_X_ACCURACY
.2byte ITEM_NONE
release
end
pokemartlistend

MauvilleCity_Mart_EventScript_ExpertM::
msgbox MauvilleCity_Mart_Text_ItemsToTemporarilyElevateStats, MSGBOX_NPC
Expand Down
4 changes: 1 addition & 3 deletions data/maps/MossdeepCity_Mart/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ MossdeepCity_Mart_Pokemart:
.2byte ITEM_MAX_REPEL
.2byte ITEM_X_ATTACK
.2byte ITEM_X_DEFENSE
.2byte ITEM_NONE
release
end
pokemartlistend

MossdeepCity_Mart_EventScript_Woman::
msgbox MossdeepCity_Mart_Text_ReviveIsFantastic, MSGBOX_NPC
Expand Down
8 changes: 2 additions & 6 deletions data/maps/OldaleTown_Mart/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ OldaleTown_Mart_Pokemart_Basic:
.2byte ITEM_ANTIDOTE
.2byte ITEM_PARALYZE_HEAL
.2byte ITEM_AWAKENING
.2byte ITEM_NONE
release
end
pokemartlistend

OldaleTown_Mart_ExpandedItems::
pokemart OldaleTown_Mart_Pokemart_Expanded
Expand All @@ -35,9 +33,7 @@ OldaleTown_Mart_Pokemart_Expanded:
.2byte ITEM_ANTIDOTE
.2byte ITEM_PARALYZE_HEAL
.2byte ITEM_AWAKENING
.2byte ITEM_NONE
release
end
pokemartlistend

OldaleTown_Mart_EventScript_Woman::
lock
Expand Down
8 changes: 2 additions & 6 deletions data/maps/PetalburgCity_Mart/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ PetalburgCity_Mart_Pokemart_Basic:
.2byte ITEM_X_ATTACK
.2byte ITEM_X_DEFENSE
.2byte ITEM_ORANGE_MAIL
.2byte ITEM_NONE
release
end
pokemartlistend

PetalburgCity_Mart_EventScript_ExpandedItems::
pokemart PetalburgCity_Mart_Pokemart_Expanded
Expand All @@ -50,9 +48,7 @@ PetalburgCity_Mart_Pokemart_Expanded:
.2byte ITEM_X_ATTACK
.2byte ITEM_X_DEFENSE
.2byte ITEM_ORANGE_MAIL
.2byte ITEM_NONE
release
end
pokemartlistend

PetalburgCity_Mart_EventScript_Woman::
msgbox PetalburgCity_Mart_Text_WeakWillGrowStronger, MSGBOX_NPC
Expand Down
4 changes: 1 addition & 3 deletions data/maps/Route104_PrettyPetalFlowerShop/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ Route104_PrettyPetalFlowerShop_Pokemart_Plants:
.2byte DECOR_COLORFUL_PLANT
.2byte DECOR_BIG_PLANT
.2byte DECOR_GORGEOUS_PLANT
.2byte DECOR_NONE
release
end
pokemartlistend

Route104_PrettyPetalFlowerShop_EventScript_WailmerPailGirl::
lock
Expand Down
Loading

0 comments on commit dbc3cc2

Please sign in to comment.