Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into gen_9_move_effects_batch2

This commit is contained in:
LOuroboros 2023-04-18 07:35:59 -03:00
commit 28ce87f6d3
283 changed files with 2528 additions and 1398 deletions

View File

@ -3,6 +3,14 @@
## Description
<!--- Describe your changes in detail -->
## Images
<!-- Please provide with relevant GIFs or images to make it easier for reviewers to accept your PR quicker.-->
<!-- If it doesn't apply, feel free to remove this section. -->
## Issue(s) that this PR fixes
<!-- Format: "Fixes #2345, fixes #4523, fixes #2222." -->
<!-- If it doesn't apply, feel free to remove this section. -->
## **Discord contact info**
<!--- formatted as name#numbers, e.g. PikalaxALT#5823 -->
<!--- Contributors must join https://discord.gg/d5dubZ3 -->
<!--- formatted as name#numbers, e.g. Lunos#4026 -->
<!--- Contributors must join https://discord.gg/6CzjAG6GZk -->

View File

@ -1330,6 +1330,22 @@
.4byte \jumpInstr
.endm
.macro itemrestorehp
callnative BS_ItemRestoreHP
.endm
.macro itemcurestatus
callnative BS_ItemCureStatus
.endm
.macro itemincreasestat
callnative BS_ItemIncreaseStat
.endm
.macro itemrestorepp
callnative BS_ItemRestorePP
.endm
@ various command changed to more readable macros
.macro cancelmultiturnmoves battler:req
various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES
@ -2263,3 +2279,8 @@
.macro hitswitchtargetfailed
various 0, VARIOUS_HIT_SWITCH_TARGET_FAILED
.endm
.macro tryrevivalblessing, jumpInstr:req
various 0, VARIOUS_TRY_REVIVAL_BLESSING
.4byte \jumpInstr
.endm

View File

@ -423,6 +423,7 @@ gBattleScriptsForMoveEffects::
.4byte BattleScript_EffectHitSetEntryHazard @ EFFECT_HIT_SET_ENTRY_HAZARD
.4byte BattleScript_EffectDireClaw @ EFFECT_DIRE_CLAW
.4byte BattleScript_EffectBarbBarrage @ EFFECT_BARB_BARRAGE
.4byte BattleScript_EffectRevivalBlessing @ EFFECT_REVIVAL_BLESSING
.4byte BattleScript_EffectTripleArrows @ EFFECT_TRIPLE_ARROWS
.4byte BattleScript_EffectInfernalParade @ EFFECT_INFERNAL_PARADE
.4byte BattleScript_EffectTakeHeart @ EFFECT_TAKE_HEART
@ -501,6 +502,24 @@ BattleScript_EffectTripleArrows::
setmoveeffect MOVE_EFFECT_TRIPLE_ARROWS
goto BattleScript_EffectHit
BattleScript_EffectRevivalBlessing::
attackcanceler
attackstring
ppreduce
attackanimation
waitanimation
tryrevivalblessing BattleScript_ButItFailed
printstring STRINGID_PKMNREVIVEDREADYTOFIGHT
waitmessage B_WAIT_TIME_LONG
jumpifbyte CMP_EQUAL, gBattleCommunication, TRUE, BattleScript_EffectRevivalBlessingSendOut
goto BattleScript_MoveEnd
BattleScript_EffectRevivalBlessingSendOut:
switchinanim BS_SCRIPTING, FALSE
waitstate
switchineffects BS_SCRIPTING
goto BattleScript_MoveEnd
BattleScript_StealthRockActivates::
setstealthrock BattleScript_MoveEnd
printfromtable gDmgHazardsStringIds
@ -2699,8 +2718,7 @@ BattleScript_EffectPsychicTerrain:
printfromtable gTerrainStringIds
waitmessage B_WAIT_TIME_LONG
playanimation BS_ATTACKER, B_ANIM_RESTORE_BG
call BattleScript_ActivateTerrainAbilities
call BattleScript_TerrainSeedLoop
call BattleScript_ActivateTerrainEffects
goto BattleScript_MoveEnd
BattleScript_EffectTopsyTurvy:
@ -5684,7 +5702,7 @@ BattleScript_EffectStockpileSpDef::
BattleScript_EffectStockpileEnd:
stockpile 1
goto BattleScript_MoveEnd
BattleScript_MoveEffectStockpileWoreOff::
.if B_STOCKPILE_RAISES_DEFS >= GEN_4
dostockpilestatchangeswearoff BS_ATTACKER, BattleScript_StockpileStatChangeDown
@ -5692,7 +5710,7 @@ BattleScript_MoveEffectStockpileWoreOff::
waitmessage B_WAIT_TIME_SHORT
.endif
return
BattleScript_StockpileStatChangeDown:
statbuffchange MOVE_EFFECT_AFFECTS_USER, BattleScript_StockpileStatChangeDown_Ret
setgraphicalstatchangevalues
@ -6958,7 +6976,7 @@ BattleScript_OverworldTerrain::
printfromtable gTerrainStringIds
waitmessage B_WAIT_TIME_LONG
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG
call BattleScript_TerrainSeedLoop
call BattleScript_ActivateTerrainEffects
end3
BattleScript_SideStatusWoreOff::
@ -7016,7 +7034,7 @@ BattleScript_MagicRoomEnds::
printstring STRINGID_MAGICROOMENDS
waitmessage B_WAIT_TIME_LONG
end2
BattleScript_GrassyTerrainEnds:
setbyte cMULTISTRING_CHOOSER, B_MSG_TERRAINENDS_GRASS
BattleScript_TerrainEnds_Ret::
@ -7024,7 +7042,7 @@ BattleScript_TerrainEnds_Ret::
waitmessage B_WAIT_TIME_LONG
playanimation BS_ATTACKER, B_ANIM_RESTORE_BG
return
BattleScript_TerrainEnds::
call BattleScript_TerrainEnds_Ret
end2
@ -7437,8 +7455,7 @@ BattleScript_SeedSowerActivates::
printstring STRINGID_TERRAINBECOMESGRASSY
waitmessage B_WAIT_TIME_LONG
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG
call BattleScript_ActivateTerrainAbilities
call BattleScript_TerrainSeedLoop
call BattleScript_ActivateTerrainEffects
return
BattleScript_AngerShellActivates::
@ -7570,7 +7587,7 @@ BattleScript_StealthRockFree::
printstring STRINGID_PKMNBLEWAWAYSTEALTHROCK
waitmessage B_WAIT_TIME_LONG
return
BattleScript_SpikesDefog::
printstring STRINGID_SPIKESDISAPPEAREDFROMTEAM
waitmessage B_WAIT_TIME_LONG
@ -8919,18 +8936,19 @@ BattleScript_SnowWarningActivates::
call BattleScript_WeatherFormChanges
end3
BattleScript_TerrainSeedLoop:
BattleScript_ActivateTerrainEffects:
savetarget
setbyte gBattlerTarget, 0
BattleScript_TerrainSeedLoopIter:
BattleScript_ActivateTerrainSeed:
copybyte sBATTLER, gBattlerTarget
doterrainseed BS_TARGET, BattleScript_TerrainSeedLoop_NextBattler
doterrainseed BS_TARGET, BattleScript_ActivateTerrainAbility
removeitem BS_TARGET
BattleScript_TerrainSeedLoop_NextBattler:
BattleScript_ActivateTerrainAbility:
activateterrainchangeabilities BS_TARGET
BattleScript_ActivateTerrainEffects_Increment:
addbyte gBattlerTarget, 0x1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TerrainSeedLoopIter
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_ActivateTerrainSeed
restoretarget
call BattleScript_ActivateSwitchInAbilities
return
BattleScript_ActivateSwitchInAbilities:
@ -8944,25 +8962,13 @@ BattleScript_ActivateSwitchInAbilities_Increment:
copybyte gBattlerAttacker, sBATTLER
return
BattleScript_ActivateTerrainAbilities:
copybyte sBATTLER, gBattlerAttacker
setbyte gBattlerAttacker, 0
BattleScript_ActivateTerrainAbilities_Loop:
activateterrainchangeabilities BS_ATTACKER
BattleScript_ActivateTerrainAbilities_Increment:
addbyte gBattlerAttacker, 1
jumpifbytenotequal gBattlerAttacker, gBattlersCount, BattleScript_ActivateTerrainAbilities_Loop
copybyte gBattlerAttacker, sBATTLER
return
BattleScript_ElectricSurgeActivates::
pause B_WAIT_TIME_SHORT
call BattleScript_AbilityPopUp
printstring STRINGID_TERRAINBECOMESELECTRIC
waitmessage B_WAIT_TIME_LONG
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG
call BattleScript_ActivateTerrainAbilities
call BattleScript_TerrainSeedLoop
call BattleScript_ActivateTerrainEffects
end3
BattleScript_MistySurgeActivates::
@ -8971,8 +8977,7 @@ BattleScript_MistySurgeActivates::
printstring STRINGID_TERRAINBECOMESMISTY
waitmessage B_WAIT_TIME_LONG
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG
call BattleScript_ActivateTerrainAbilities
call BattleScript_TerrainSeedLoop
call BattleScript_ActivateTerrainEffects
end3
BattleScript_GrassySurgeActivates::
@ -8981,8 +8986,7 @@ BattleScript_GrassySurgeActivates::
printstring STRINGID_TERRAINBECOMESGRASSY
waitmessage B_WAIT_TIME_LONG
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG
call BattleScript_ActivateTerrainAbilities
call BattleScript_TerrainSeedLoop
call BattleScript_ActivateTerrainEffects
end3
BattleScript_PsychicSurgeActivates::
@ -8991,8 +8995,7 @@ BattleScript_PsychicSurgeActivates::
printstring STRINGID_TERRAINBECOMESPSYCHIC
waitmessage B_WAIT_TIME_LONG
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG
call BattleScript_ActivateTerrainAbilities
call BattleScript_TerrainSeedLoop
call BattleScript_ActivateTerrainEffects
end3
BattleScript_HurtTarget_NoString:
@ -9268,7 +9271,7 @@ BattleScript_WanderingSpiritActivates::
pause 20
destroyabilitypopup
pause 40
copybyte gBattlerAbility, gBattlerAttacker
setbyte sFIXED_ABILITY_POPUP, TRUE
copyhword sABILITY_OVERWRITE, gLastUsedAbility
showabilitypopup BS_ATTACKER
@ -10275,7 +10278,6 @@ BattleScript_EffectHitSetRemoveTerrain:
setterrain BattleScript_TryFaint
playanimation BS_ATTACKER, B_ANIM_RESTORE_BG
printfromtable gTerrainStringIds
call BattleScript_ActivateTerrainAbilities
BattleScript_TryFaint:
tryfaintmon BS_TARGET
goto BattleScript_MoveEnd

View File

@ -3,219 +3,256 @@
#include "constants/battle_script_commands.h"
#include "constants/battle_anim.h"
#include "constants/battle_string_ids.h"
#include "constants/items.h"
#include "constants/moves.h"
#include "constants/songs.h"
#include "constants/game_stat.h"
.include "asm/macros.inc"
.include "asm/macros/battle_script.inc"
.include "constants/constants.inc"
.include "asm/macros.inc"
.include "asm/macros/battle_script.inc"
.include "constants/constants.inc"
.section script_data, "aw", %progbits
.section script_data, "aw", %progbits
.align 2
.align 2
gBattlescriptsForUsingItem::
.4byte BattleScript_PlayerUsesItem
.4byte BattleScript_OpponentUsesHealItem @ AI_ITEM_FULL_RESTORE
.4byte BattleScript_OpponentUsesHealItem @ AI_ITEM_HEAL_HP
.4byte BattleScript_OpponentUsesStatusCureItem @ AI_ITEM_CURE_CONDITION
.4byte BattleScript_OpponentUsesXItem @ AI_ITEM_X_STAT
.4byte BattleScript_OpponentUsesGuardSpec @ AI_ITEM_GUARD_SPEC
.4byte BattleScript_ItemRestoreHP @ EFFECT_ITEM_RESTORE_HP
.4byte BattleScript_ItemCureStatus @ EFFECT_ITEM_CURE_STATUS
.4byte BattleScript_ItemHealAndCureStatus @ EFFECT_ITEM_HEAL_AND_CURE_STATUS
.4byte BattleScript_ItemIncreaseStat @ EFFECT_ITEM_INCREASE_STAT
.4byte BattleScript_ItemSetMist @ EFFECT_ITEM_SET_MIST
.4byte BattleScript_ItemSetFocusEnergy @ EFFECT_ITEM_SET_FOCUS_ENERGY
.4byte BattleScript_RunByUsingItem @ EFFECT_ITEM_ESCAPE
.4byte BattleScript_BallThrow @ EFFECT_ITEM_THROW_BALL
.4byte BattleScript_ItemRestoreHP @ EFFECT_ITEM_REVIVE
.4byte BattleScript_ItemRestorePP @ EFFECT_ITEM_RESTORE_PP
.4byte BattleScript_ItemIncreaseAllStats @ EFFECT_ITEM_INCREASE_ALL_STATS
.align 2
gBattlescriptsForRunningByItem::
.4byte BattleScript_RunByUsingItem
.align 2
.align 2
gBattlescriptsForSafariActions::
.4byte BattleScript_ActionWatchesCarefully
.4byte BattleScript_ActionGetNear
.4byte BattleScript_ActionThrowPokeblock
.4byte BattleScript_ActionWallyThrow
.4byte BattleScript_ActionWatchesCarefully
.4byte BattleScript_ActionGetNear
.4byte BattleScript_ActionThrowPokeblock
.4byte BattleScript_ActionWallyThrow
BattleScript_ItemEnd:
end
BattleScript_UseItemMessage:
printstring STRINGID_EMPTYSTRING3
pause B_WAIT_TIME_MED
playse SE_USE_ITEM
getbattlerside BS_ATTACKER
copybyte cMULTISTRING_CHOOSER, gBattleCommunication
printfromtable gTrainerUsedItemStringIds
waitmessage B_WAIT_TIME_LONG
return
BattleScript_ItemRestoreHP::
call BattleScript_UseItemMessage
itemrestorehp
printstring STRINGID_ITEMRESTOREDSPECIESHEALTH
waitmessage B_WAIT_TIME_LONG
jumpifbyte CMP_EQUAL, gBattleCommunication, TRUE, BattleScript_ItemRestoreHP_SendOutRevivedBattler
bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
updatestatusicon BS_ATTACKER
end
BattleScript_ItemRestoreHP_SendOutRevivedBattler:
switchinanim BS_ATTACKER, FALSE
waitstate
switchineffects BS_ATTACKER
end
BattleScript_ItemCureStatus::
call BattleScript_UseItemMessage
itemcurestatus
printstring STRINGID_ITEMCUREDSPECIESSTATUS
waitmessage B_WAIT_TIME_LONG
updatestatusicon BS_ATTACKER
end
BattleScript_ItemHealAndCureStatus::
call BattleScript_UseItemMessage
itemrestorehp
curestatus BS_ATTACKER
printstring STRINGID_ITEMRESTOREDSPECIESHEALTH
waitmessage B_WAIT_TIME_LONG
bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
updatestatusicon BS_ATTACKER
end
BattleScript_ItemIncreaseStat::
call BattleScript_UseItemMessage
itemincreasestat
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_ItemEnd
setgraphicalstatchangevalues
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatUpStringIds
waitmessage B_WAIT_TIME_LONG
end
BattleScript_ItemSetMist::
call BattleScript_UseItemMessage
setmist
playmoveanimation BS_ATTACKER, MOVE_MIST
waitanimation
printfromtable gMistUsedStringIds
waitmessage B_WAIT_TIME_LONG
end
BattleScript_ItemSetFocusEnergy::
call BattleScript_UseItemMessage
jumpifstatus2 BS_ATTACKER, STATUS2_FOCUS_ENERGY, BattleScript_ButItFailed
setfocusenergy
playmoveanimation BS_ATTACKER, MOVE_FOCUS_ENERGY
waitanimation
printstring STRINGID_PKMNUSEDXTOGETPUMPED
waitmessage B_WAIT_TIME_LONG
end
BattleScript_ItemRestorePP::
call BattleScript_UseItemMessage
itemrestorepp
printstring STRINGID_ITEMRESTOREDSPECIESPP
waitmessage B_WAIT_TIME_LONG
end
BattleScript_ItemIncreaseAllStats::
call BattleScript_UseItemMessage
call BattleScript_AllStatsUp
end
BattleScript_BallThrow::
jumpifword CMP_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_WALLY_TUTORIAL, BattleScript_BallThrowByWally
printstring STRINGID_PLAYERUSEDITEM
handleballthrow
jumpifword CMP_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_WALLY_TUTORIAL, BattleScript_BallThrowByWally
printstring STRINGID_PLAYERUSEDITEM
handleballthrow
BattleScript_BallThrowByWally::
printstring STRINGID_WALLYUSEDITEM
handleballthrow
printstring STRINGID_WALLYUSEDITEM
handleballthrow
BattleScript_SafariBallThrow::
printstring STRINGID_PLAYERUSEDITEM
updatestatusicon BS_ATTACKER
handleballthrow
printstring STRINGID_PLAYERUSEDITEM
updatestatusicon BS_ATTACKER
handleballthrow
BattleScript_SuccessBallThrow::
setbyte sMON_CAUGHT, TRUE
incrementgamestat GAME_STAT_POKEMON_CAPTURES
setbyte sMON_CAUGHT, TRUE
incrementgamestat GAME_STAT_POKEMON_CAPTURES
BattleScript_PrintCaughtMonInfo::
printstring STRINGID_GOTCHAPKMNCAUGHTPLAYER
jumpifbyte CMP_NOT_EQUAL, sEXP_CATCH, TRUE, BattleScript_TryPrintCaughtMonInfo
setbyte sGIVEEXP_STATE, 0
getexp BS_TARGET
sethword gBattle_BG2_X, 0
printstring STRINGID_GOTCHAPKMNCAUGHTPLAYER
jumpifbyte CMP_NOT_EQUAL, sEXP_CATCH, TRUE, BattleScript_TryPrintCaughtMonInfo
setbyte sGIVEEXP_STATE, 0
getexp BS_TARGET
sethword gBattle_BG2_X, 0
BattleScript_TryPrintCaughtMonInfo:
trysetcaughtmondexflags BattleScript_TryNicknameCaughtMon
printstring STRINGID_PKMNDATAADDEDTODEX
waitstate
setbyte gBattleCommunication, 0
displaydexinfo
trysetcaughtmondexflags BattleScript_TryNicknameCaughtMon
printstring STRINGID_PKMNDATAADDEDTODEX
waitstate
setbyte gBattleCommunication, 0
displaydexinfo
BattleScript_TryNicknameCaughtMon::
printstring STRINGID_GIVENICKNAMECAPTURED
waitstate
setbyte gBattleCommunication, 0
trygivecaughtmonnick BattleScript_GiveCaughtMonEnd
givecaughtmon
printfromtable gCaughtMonStringIds
waitmessage B_WAIT_TIME_LONG
goto BattleScript_SuccessBallThrowEnd
printstring STRINGID_GIVENICKNAMECAPTURED
waitstate
setbyte gBattleCommunication, 0
trygivecaughtmonnick BattleScript_GiveCaughtMonEnd
givecaughtmon
printfromtable gCaughtMonStringIds
waitmessage B_WAIT_TIME_LONG
goto BattleScript_SuccessBallThrowEnd
BattleScript_GiveCaughtMonEnd::
givecaughtmon
givecaughtmon
BattleScript_SuccessBallThrowEnd::
setbyte gBattleOutcome, B_OUTCOME_CAUGHT
finishturn
setbyte gBattleOutcome, B_OUTCOME_CAUGHT
finishturn
BattleScript_WallyBallThrow::
printstring STRINGID_GOTCHAPKMNCAUGHTWALLY
setbyte gBattleOutcome, B_OUTCOME_CAUGHT
finishturn
printstring STRINGID_GOTCHAPKMNCAUGHTWALLY
setbyte gBattleOutcome, B_OUTCOME_CAUGHT
finishturn
BattleScript_ShakeBallThrow::
printfromtable gBallEscapeStringIds
waitmessage B_WAIT_TIME_LONG
jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_SAFARI, BattleScript_ShakeBallThrowEnd
jumpifbyte CMP_NOT_EQUAL, gNumSafariBalls, 0, BattleScript_ShakeBallThrowEnd
printstring STRINGID_OUTOFSAFARIBALLS
waitmessage B_WAIT_TIME_LONG
setbyte gBattleOutcome, B_OUTCOME_NO_SAFARI_BALLS
printfromtable gBallEscapeStringIds
waitmessage B_WAIT_TIME_LONG
jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_SAFARI, BattleScript_ShakeBallThrowEnd
jumpifbyte CMP_NOT_EQUAL, gNumSafariBalls, 0, BattleScript_ShakeBallThrowEnd
printstring STRINGID_OUTOFSAFARIBALLS
waitmessage B_WAIT_TIME_LONG
setbyte gBattleOutcome, B_OUTCOME_NO_SAFARI_BALLS
BattleScript_ShakeBallThrowEnd::
finishaction
finishaction
BattleScript_TrainerBallBlock::
waitmessage B_WAIT_TIME_LONG
printstring STRINGID_TRAINERBLOCKEDBALL
waitmessage B_WAIT_TIME_LONG
printstring STRINGID_DONTBEATHIEF
waitmessage B_WAIT_TIME_LONG
finishaction
BattleScript_PlayerUsesItem::
moveendcase MOVEEND_MIRROR_MOVE
end
BattleScript_OpponentUsesHealItem::
printstring STRINGID_EMPTYSTRING3
pause B_WAIT_TIME_MED
playse SE_USE_ITEM
printstring STRINGID_TRAINER1USEDITEM
waitmessage B_WAIT_TIME_LONG
bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
useitemonopponent
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
waitmessage B_WAIT_TIME_LONG
updatestatusicon BS_ATTACKER
moveendcase MOVEEND_MIRROR_MOVE
finishaction
BattleScript_OpponentUsesStatusCureItem::
printstring STRINGID_EMPTYSTRING3
pause B_WAIT_TIME_MED
playse SE_USE_ITEM
printstring STRINGID_TRAINER1USEDITEM
waitmessage B_WAIT_TIME_LONG
useitemonopponent
printfromtable gTrainerItemCuredStatusStringIds
waitmessage B_WAIT_TIME_LONG
updatestatusicon BS_ATTACKER
moveendcase MOVEEND_MIRROR_MOVE
finishaction
BattleScript_OpponentUsesXItem::
printstring STRINGID_EMPTYSTRING3
pause B_WAIT_TIME_MED
playse SE_USE_ITEM
printstring STRINGID_TRAINER1USEDITEM
waitmessage B_WAIT_TIME_LONG
useitemonopponent
printfromtable gStatUpStringIds
waitmessage B_WAIT_TIME_LONG
moveendcase MOVEEND_MIRROR_MOVE
finishaction
BattleScript_OpponentUsesGuardSpec::
printstring STRINGID_EMPTYSTRING3
pause B_WAIT_TIME_MED
playse SE_USE_ITEM
printstring STRINGID_TRAINER1USEDITEM
waitmessage B_WAIT_TIME_LONG
useitemonopponent
printfromtable gMistUsedStringIds
waitmessage B_WAIT_TIME_LONG
moveendcase MOVEEND_MIRROR_MOVE
finishaction
waitmessage B_WAIT_TIME_LONG
printstring STRINGID_TRAINERBLOCKEDBALL
waitmessage B_WAIT_TIME_LONG
printstring STRINGID_DONTBEATHIEF
waitmessage B_WAIT_TIME_LONG
finishaction
BattleScript_RunByUsingItem::
playse SE_FLEE
setbyte gBattleOutcome, B_OUTCOME_RAN
finishturn
playse SE_FLEE
setbyte gBattleOutcome, B_OUTCOME_RAN
finishturn
BattleScript_ActionWatchesCarefully:
printstring STRINGID_PKMNWATCHINGCAREFULLY
waitmessage B_WAIT_TIME_LONG
end2
printstring STRINGID_PKMNWATCHINGCAREFULLY
waitmessage B_WAIT_TIME_LONG
end2
BattleScript_ActionGetNear:
printfromtable gSafariGetNearStringIds
waitmessage B_WAIT_TIME_LONG
end2
printfromtable gSafariGetNearStringIds
waitmessage B_WAIT_TIME_LONG
end2
BattleScript_ActionThrowPokeblock:
printstring STRINGID_THREWPOKEBLOCKATPKMN
waitmessage B_WAIT_TIME_LONG
playanimation BS_ATTACKER, B_ANIM_POKEBLOCK_THROW, NULL
printfromtable gSafariPokeblockResultStringIds
waitmessage B_WAIT_TIME_LONG
end2
printstring STRINGID_THREWPOKEBLOCKATPKMN
waitmessage B_WAIT_TIME_LONG
playanimation BS_ATTACKER, B_ANIM_POKEBLOCK_THROW, NULL
printfromtable gSafariPokeblockResultStringIds
waitmessage B_WAIT_TIME_LONG
end2
BattleScript_ActionWallyThrow:
printstring STRINGID_RETURNMON
waitmessage B_WAIT_TIME_LONG
returnatktoball
waitstate
trainerslidein BS_TARGET
waitstate
printstring STRINGID_YOUTHROWABALLNOWRIGHT
waitmessage B_WAIT_TIME_LONG
end2
printstring STRINGID_RETURNMON
waitmessage B_WAIT_TIME_LONG
returnatktoball
waitstate
trainerslidein BS_TARGET
waitstate
printstring STRINGID_YOUTHROWABALLNOWRIGHT
waitmessage B_WAIT_TIME_LONG
end2
BattleScript_TrainerASlideMsgRet::
handletrainerslidemsg BS_SCRIPTING, 0
trainerslidein B_POSITION_OPPONENT_LEFT
handletrainerslidemsg BS_SCRIPTING, 1
waitstate
trainerslideout B_POSITION_OPPONENT_LEFT
waitstate
handletrainerslidemsg BS_SCRIPTING, 2
return
handletrainerslidemsg BS_SCRIPTING, 0
trainerslidein B_POSITION_OPPONENT_LEFT
handletrainerslidemsg BS_SCRIPTING, 1
waitstate
trainerslideout B_POSITION_OPPONENT_LEFT
waitstate
handletrainerslidemsg BS_SCRIPTING, 2
return
BattleScript_TrainerASlideMsgEnd2::
call BattleScript_TrainerASlideMsgRet
end2
call BattleScript_TrainerASlideMsgRet
end2
BattleScript_TrainerBSlideMsgRet::
handletrainerslidemsg BS_SCRIPTING, 0
trainerslidein B_POSITION_OPPONENT_RIGHT
handletrainerslidemsg BS_SCRIPTING, 1
waitstate
trainerslideout B_POSITION_OPPONENT_RIGHT
waitstate
handletrainerslidemsg BS_SCRIPTING, 2
return
handletrainerslidemsg BS_SCRIPTING, 0
trainerslidein B_POSITION_OPPONENT_RIGHT
handletrainerslidemsg BS_SCRIPTING, 1
waitstate
trainerslideout B_POSITION_OPPONENT_RIGHT
waitstate
handletrainerslidemsg BS_SCRIPTING, 2
return
BattleScript_TrainerBSlideMsgEnd2::
call BattleScript_TrainerBSlideMsgRet
end2
call BattleScript_TrainerBSlideMsgRet
end2

View File

@ -7,7 +7,7 @@ AbandonedShip_CaptainsOffice_EventScript_CaptSternAide::
goto_if_set FLAG_EXCHANGED_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus
checkitem ITEM_SCANNER
goto_if_eq VAR_RESULT, TRUE, AbandonedShip_CaptainsOffice_EventScript_CanYouDeliverScanner
goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus
goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_2_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus
msgbox AbandonedShip_CaptainsOffice_Text_NoSuccessFindingScanner, MSGBOX_DEFAULT
release
end

View File

@ -38,7 +38,7 @@
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "AbandonedShip_HiddenFloorRooms_EventScript_ItemScanner",
"flag": "FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER"
"flag": "FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_2_SCANNER"
},
{
"graphics_id": "OBJ_EVENT_GFX_ITEM_BALL",

View File

@ -64,9 +64,9 @@ MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics::
MauvilleCity_PokemonCenter_1F_EventScript_Hipster::
lock
faceplayer
setflag FLAG_SYS_HIPSTER_MEET
setflag FLAG_UNLOCKED_TRENDY_SAYINGS
msgbox MauvilleCity_PokemonCenter_1F_Text_TeachWhatsHipAndHappening, MSGBOX_DEFAULT
special GetHipsterSpokenFlag
special HasHipsterTaughtWord
goto_if_eq VAR_RESULT, FALSE, MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord
msgbox MauvilleCity_PokemonCenter_1F_Text_IAlreadyTaughtYou, MSGBOX_DEFAULT
release
@ -80,8 +80,8 @@ MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord::
end
MauvilleCity_PokemonCenter_1F_EventScript_TeachWord::
msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfPhrase, MSGBOX_DEFAULT
special SetHipsterSpokenFlag
msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfWord, MSGBOX_DEFAULT
special SetHipsterTaughtWord
release
end
@ -969,7 +969,7 @@ MauvilleCity_PokemonCenter_1F_Text_IveGotNothingNewToTeach:
.string "what's hip and happening.\p"
.string "I've got nothing new to teach you!$"
MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfPhrase:
MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfWord:
.string "Hey, have you heard about\n"
.string "{STR_VAR_1}”?\p"
.string "What's it mean? Well…\n"

View File

@ -111,8 +111,8 @@ gSpecials::
def_special Script_GetCurrentMauvilleMan
def_special HasBardSongBeenChanged
def_special SaveBardSongLyrics
def_special GetHipsterSpokenFlag
def_special SetHipsterSpokenFlag
def_special HasHipsterTaughtWord
def_special SetHipsterTaughtWord
def_special HipsterTryTeachWord
def_special PlayBardSong
def_special SetMauvilleOldManObjEventGfx

View File

@ -36,7 +36,7 @@ static u32 GetGlyphWidth_Narrow(u16, bool32);
static u32 GetGlyphWidth_SmallNarrow(u16, bool32);
static EWRAM_DATA struct TextPrinter sTempTextPrinter = {0};
static EWRAM_DATA struct TextPrinter sTextPrinters[NUM_TEXT_PRINTERS] = {0};
static EWRAM_DATA struct TextPrinter sTextPrinters[WINDOWS_MAX] = {0};
static u16 sFontHalfRowLookupTable[0x51];
static u16 sLastTextBgColor;
@ -244,7 +244,7 @@ static void SetFontsPointer(const struct FontInfo *fonts)
void DeactivateAllTextPrinters(void)
{
int printer;
for (printer = 0; printer < NUM_TEXT_PRINTERS; ++printer)
for (printer = 0; printer < WINDOWS_MAX; ++printer)
sTextPrinters[printer].active = FALSE;
}
@ -322,7 +322,7 @@ void RunTextPrinters(void)
if (!gDisableTextPrinters)
{
for (i = 0; i < NUM_TEXT_PRINTERS; ++i)
for (i = 0; i < WINDOWS_MAX; ++i)
{
if (sTextPrinters[i].active)
{

View File

@ -3,8 +3,6 @@
#include "characters.h"
#define NUM_TEXT_PRINTERS 32
// Given as a text speed when all the text should be
// loaded at once but not copied to vram yet.
#define TEXT_SKIP_DRAW 0xFF

View File

@ -9,8 +9,6 @@ u8 gTransparentTileNumber;
void *gWindowBgTilemapBuffers[NUM_BACKGROUNDS];
extern u32 gWindowTileAutoAllocEnabled;
#define WINDOWS_MAX 32
EWRAM_DATA struct Window gWindows[WINDOWS_MAX] = {0};
EWRAM_DATA static struct Window* sWindowPtr = NULL;
EWRAM_DATA static u16 sWindowSize = 0;

View File

@ -1,6 +1,8 @@
#ifndef GUARD_WINDOW_H
#define GUARD_WINDOW_H
#define WINDOWS_MAX 32
#define PIXEL_FILL(num) ((num) | ((num) << 4))
enum {

BIN
graphics/cable_car/pylon_top.bin Executable file

Binary file not shown.

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
120 192 168
0 0 0
111 108 124
58 48 49
206 206 214
151 149 160
142 93 117
89 62 76
255 255 255
111 109 124
194 192 202
88 62 76
80 74 88
0 0 0
0 0 0
0 0 0

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
128 192 168
87 87 88
155 158 156
117 114 116
0 0 0
36 37 42
62 66 68
56 57 61
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
128 198 168
32 32 32
230 217 213
199 189 184
156 135 143
102 83 83
143 118 130
65 56 56
179 162 151
117 100 100
210 183 192
180 158 167
0 0 0
0 0 0
0 0 0
0 0 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 B

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 403 B

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 380 B

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 B

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 389 B

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 B

After

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 370 B

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 B

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 B

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 454 B

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 B

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 B

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 B

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 B

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 407 B

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 389 B

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 514 B

After

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 488 B

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 B

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 469 B

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 B

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 B

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 B

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 B

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 B

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 608 B

After

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 B

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 473 B

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 B

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 B

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 B

After

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 424 B

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 B

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 B

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 468 B

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 595 B

After

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 B

After

Width:  |  Height:  |  Size: 533 B

Some files were not shown because too many files have changed in this diff Show More