summaryrefslogtreecommitdiff
path: root/engine/battle/core.asm
diff options
context:
space:
mode:
authormid-kid <esteve.varela@gmail.com>2018-02-22 17:13:29 +0100
committermid-kid <esteve.varela@gmail.com>2018-02-22 17:39:06 +0100
commite8bc86d1fedfc6be5a99d426ffc236c4fcf494f4 (patch)
treedabac449a3cf7bf08c6cb134701ce296a5403c61 /engine/battle/core.asm
parentc3abe8f88b62b121ec7e76cac91467df7471223a (diff)
Pkmn -> Mon
Since we're aiming for consistency across the codebase, I believe it includes a uniform way to refer to the creatures this game consists of in the labels of the code. The only exceptions to this rule are labels referring to things named through the use of the <PK><MN> or <PKMN> characters, in which case PKMN is used. Most of this was already consistent enough™, I just picked the convention with the most occurences and fixed the outliers.
Diffstat (limited to 'engine/battle/core.asm')
-rw-r--r--engine/battle/core.asm142
1 files changed, 71 insertions, 71 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 0fe77df40..df9d4cbc5 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -47,7 +47,7 @@ DoBattle: ; 3c000
.player_2
call LoadTileMapToTempTileMap
- call CheckPlayerPartyForFitPkmn
+ call CheckPlayerPartyForFitMon
ld a, d
and a
jp z, LostBattle
@@ -86,7 +86,7 @@ DoBattle: ; 3c000
call ResetBattleParticipants
call InitBattleMon
call ResetPlayerStatLevels
- call SendOutPkmnText
+ call SendOutMonText
call NewBattleMonStatus
call BreakAttraction
call SendOutPlayerMon
@@ -1697,7 +1697,7 @@ HandleScreens: ; 3cb36
res SCREENS_LIGHT_SCREEN, [hl]
push hl
push de
- ld hl, BattleText_PkmnLightScreenFell
+ ld hl, BattleText_MonsLightScreenFell
call StdBattleTextBox
pop de
pop hl
@@ -1711,7 +1711,7 @@ HandleScreens: ; 3cb36
ld [de], a
ret nz
res SCREENS_REFLECT, [hl]
- ld hl, BattleText_PkmnReflectFaded
+ ld hl, BattleText_MonsReflectFaded
jp StdBattleTextBox
; 3cb9e
@@ -1822,7 +1822,7 @@ SubtractHPFromTarget: ; 3cc39
; 3cc3f
SubtractHPFromUser: ; 3cc3f
-; Subtract HP from Pkmn
+; Subtract HP from mon
call SubtractHP
jp UpdateHPBarBattleHuds
; 3cc45
@@ -2054,7 +2054,7 @@ HandleEnemyMonFaint: ; 3cd55
xor a
ld [wWhichMonFaintedFirst], a
call UpdateBattleStateAndExperienceAfterEnemyFaint
- call CheckPlayerPartyForFitPkmn
+ call CheckPlayerPartyForFitMon
ld a, d
and a
jp z, LostBattle
@@ -2186,7 +2186,7 @@ UpdateBattleStateAndExperienceAfterEnemyFaint: ; 3ce01
call PlayerMonFaintHappinessMod
.player_mon_did_not_faint
- call CheckPlayerPartyForFitPkmn
+ call CheckPlayerPartyForFitMon
ld a, d
and a
ret z
@@ -2308,7 +2308,7 @@ FaintYourPokemon: ; 3cef1
hlcoord 9, 7
lb bc, 5, 11
call ClearBox
- ld hl, BattleText_PkmnFainted
+ ld hl, BattleText_MonFainted
jp StdBattleTextBox
; 3cf14
@@ -2322,7 +2322,7 @@ FaintEnemyPokemon: ; 3cf14
hlcoord 1, 0
lb bc, 4, 10
call ClearBox
- ld hl, BattleText_EnemyPkmnFainted
+ ld hl, BattleText_EnemyMonFainted
jp StdBattleTextBox
; 3cf35
@@ -2670,7 +2670,7 @@ HandlePlayerMonFaint: ; 3d14e
ld a, $1
ld [wWhichMonFaintedFirst], a
call PlayerMonFaintHappinessMod
- call CheckPlayerPartyForFitPkmn
+ call CheckPlayerPartyForFitMon
ld a, d
and a
jp z, LostBattle
@@ -2829,7 +2829,7 @@ ForcePlayerMonChoice: ; 3d227
call CloseWindow
call GetMemSGBLayout
call SetPalettes
- call SendOutPkmnText
+ call SendOutMonText
call NewBattleMonStatus
call BreakAttraction
call SendOutPlayerMon
@@ -2851,7 +2851,7 @@ PlayerPartyMonEntrance: ; 3d2b3
call AddBattleParticipant
call InitBattleMon
call ResetPlayerStatLevels
- call SendOutPkmnText
+ call SendOutMonText
call NewBattleMonStatus
call BreakAttraction
call SendOutPlayerMon
@@ -2934,7 +2934,7 @@ SwitchMonAlreadyOut: ; 3d34f
cp [hl]
jr nz, .notout
- ld hl, BattleText_PkmnIsAlreadyOut
+ ld hl, BattleText_MonIsAlreadyOut
call StdBattleTextBox
scf
ret
@@ -3197,11 +3197,11 @@ ForceEnemySwitch: ; 3d4c3
ld a, [wEnemySwitchMonIndex]
dec a
ld b, a
- call LoadEnemyPkmnToSwitchTo
+ call LoadEnemyMonToSwitchTo
call ClearEnemyMonBox
call NewEnemyMonStatus
call ResetEnemyStatLevels
- call Function_SetEnemyPkmnAndSendOutAnimation
+ call Function_SetEnemyMonAndSendOutAnimation
call BreakAttraction
call ResetBattleParticipants
ret
@@ -3214,15 +3214,15 @@ EnemySwitch: ; 3d4e1
call ResetEnemyBattleVars
call CheckWhetherSwitchmonIsPredetermined
jr c, .skip
- call FindPkmnInOTPartyToSwitchIntoBattle
+ call FindMonInOTPartyToSwitchIntoBattle
.skip
- ; 'b' contains the PartyNr of the Pkmn the AI will switch to
- call LoadEnemyPkmnToSwitchTo
+ ; 'b' contains the PartyNr of the mon the AI will switch to
+ call LoadEnemyMonToSwitchTo
call OfferSwitch
push af
call ClearEnemyMonBox
call Function_BattleTextEnemySentOut
- call Function_SetEnemyPkmnAndSendOutAnimation
+ call Function_SetEnemyMonAndSendOutAnimation
pop af
ret c
; If we're here, then we're switching too
@@ -3240,15 +3240,15 @@ EnemySwitch_SetMode: ; 3d517
call ResetEnemyBattleVars
call CheckWhetherSwitchmonIsPredetermined
jr c, .skip
- call FindPkmnInOTPartyToSwitchIntoBattle
+ call FindMonInOTPartyToSwitchIntoBattle
.skip
- ; 'b' contains the PartyNr of the Pkmn the AI will switch to
- call LoadEnemyPkmnToSwitchTo
+ ; 'b' contains the PartyNr of the mon the AI will switch to
+ call LoadEnemyMonToSwitchTo
ld a, 1
ld [wEnemyIsSwitching], a
call ClearEnemyMonBox
call Function_BattleTextEnemySentOut
- jp Function_SetEnemyPkmnAndSendOutAnimation
+ jp Function_SetEnemyMonAndSendOutAnimation
; 3d533
CheckWhetherSwitchmonIsPredetermined: ; 3d533
@@ -3319,7 +3319,7 @@ AddBattleParticipant: ; 3d581
predef_jump SmallFarFlagAction
; 3d599
-FindPkmnInOTPartyToSwitchIntoBattle: ; 3d599
+FindMonInOTPartyToSwitchIntoBattle: ; 3d599
ld b, $ff
ld a, $1
ld [wBuffer1], a
@@ -3347,7 +3347,7 @@ FindPkmnInOTPartyToSwitchIntoBattle: ; 3d599
pop bc
jr z, .discourage
call LookUpTheEffectivenessOfEveryMove
- call IsThePlayerPkmnTypesEffectiveAgainstOTPkmn
+ call IsThePlayerMonTypesEffectiveAgainstOTMon
jr .loop
.discourage
@@ -3394,9 +3394,9 @@ LookUpTheEffectivenessOfEveryMove: ; 3d5d7
ret
; 3d618
-IsThePlayerPkmnTypesEffectiveAgainstOTPkmn: ; 3d618
-; Calculates the effectiveness of the types of the PlayerPkmn
-; against the OTPkmn
+IsThePlayerMonTypesEffectiveAgainstOTMon: ; 3d618
+; Calculates the effectiveness of the types of the PlayerMon
+; against the OTMon
push bc
ld hl, wOTPartyCount
ld a, b
@@ -3508,8 +3508,8 @@ ScoreMonTypeMatchups: ; 3d672
ret
; 3d6ca
-LoadEnemyPkmnToSwitchTo: ; 3d6ca
- ; 'b' contains the PartyNr of the Pkmn the AI will switch to
+LoadEnemyMonToSwitchTo: ; 3d6ca
+ ; 'b' contains the PartyNr of the mon the AI will switch to
ld a, b
ld [wCurPartyMon], a
ld hl, wOTPartyMon1Level
@@ -3581,7 +3581,7 @@ OfferSwitch: ; 3d74b
ld a, [wCurPartyMon]
push af
callfar Battle_GetTrainerName
- ld hl, BattleText_EnemyIsAboutToUseWillPlayerChangePkmn
+ ld hl, BattleText_EnemyIsAboutToUseWillPlayerChangeMon
call StdBattleTextBox
lb bc, 1, 7
call PlaceYesNoBox
@@ -3637,14 +3637,14 @@ Function_BattleTextEnemySentOut: ; 3d7b8
jp WaitBGMap
; 3d7c7
-Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
+Function_SetEnemyMonAndSendOutAnimation: ; 3d7c7
ld a, [wTempEnemyMonSpecies]
ld [wCurPartySpecies], a
ld [wCurSpecies], a
call GetBaseData
ld a, OTPARTYMON
ld [wMonType], a
- predef CopyPkmnToTempMon
+ predef CopyMonToTempMon
call GetEnemyMonFrontpic
xor a
@@ -3721,8 +3721,8 @@ ResetEnemyStatLevels: ; 3d867
ret
; 3d873
-CheckPlayerPartyForFitPkmn: ; 3d873
-; Has the player any Pkmn in his Party that can fight?
+CheckPlayerPartyForFitMon: ; 3d873
+; Has the player any mon in his Party that can fight?
ld a, [wPartyCount]
ld e, a
xor a
@@ -4308,7 +4308,7 @@ PursuitSwitch: ; 3dc5b
ld b, RESET_FLAG
predef SmallFarFlagAction
call PlayerMonFaintedAnimation
- ld hl, BattleText_PkmnFainted
+ ld hl, BattleText_MonFainted
jr .done_fainted
.check_enemy_fainted
@@ -4324,7 +4324,7 @@ PursuitSwitch: ; 3dc5b
call PlaySFX
call WaitSFX
call EnemyMonFaintedAnimation
- ld hl, BattleText_EnemyPkmnFainted
+ ld hl, BattleText_EnemyMonFainted
.done_fainted
call StdBattleTextBox
@@ -5306,7 +5306,7 @@ TryPlayerSwitch: ; 3e358
ld a, [wCurPartyMon]
cp d
jr nz, .check_trapped
- ld hl, BattleText_PkmnIsAlreadyOut
+ ld hl, BattleText_MonIsAlreadyOut
call StdBattleTextBox
jp BattleMenuPKMN_Loop
@@ -5319,7 +5319,7 @@ TryPlayerSwitch: ; 3e358
jr z, .try_switch
.trapped
- ld hl, BattleText_PkmnCantBeRecalled
+ ld hl, BattleText_MonCantBeRecalled
call StdBattleTextBox
jp BattleMenuPKMN_Loop
@@ -5396,7 +5396,7 @@ EnemyMonEntrance: ; 3e3ff
; 3e40b
BattleMonEntrance: ; 3e40b
- call WithdrawPkmnText
+ call WithdrawMonText
ld c, 50
call DelayFrames
@@ -5419,7 +5419,7 @@ BattleMonEntrance: ; 3e40b
call AddBattleParticipant
call InitBattleMon
call ResetPlayerStatLevels
- call SendOutPkmnText
+ call SendOutMonText
call NewBattleMonStatus
call BreakAttraction
call SendOutPlayerMon
@@ -5938,7 +5938,7 @@ CheckPlayerHasUsableMoves: ; 3e786
ret nz
.force_struggle
- ld hl, BattleText_PkmnHasNoMovesLeft
+ ld hl, BattleText_MonHasNoMovesLeft
call StdBattleTextBox
ld c, 60
call DelayFrames
@@ -6408,7 +6408,7 @@ LoadEnemyMon: ; 3e8eb
ld de, wEnemyMonMaxHP
ld b, FALSE
ld hl, wEnemyMonDVs - (MON_DVS - MON_STAT_EXP + 1) ; wLinkBattleRNs + 7 ; ?
- predef CalcPkmnStats
+ predef CalcMonStats
; If we're in a trainer battle,
; get the rest of the parameters from the party struct
@@ -7350,7 +7350,7 @@ GiveExperiencePoints: ; 3ee3b
ld a, [wCurPartyMon]
ld hl, wPartyMonNicknames
call GetNick
- ld hl, Text_PkmnGainedExpPoint
+ ld hl, Text_MonGainedExpPoint
call BattleTextBox
ld a, [wStringBuffer2 + 1]
ld [hQuotient + 2], a
@@ -7419,7 +7419,7 @@ GiveExperiencePoints: ; 3ee3b
.not_max_exp
xor a ; PARTYMON
ld [wMonType], a
- predef CopyPkmnToTempMon
+ predef CopyMonToTempMon
callfar CalcLevel
pop bc
ld hl, MON_LEVEL
@@ -7456,7 +7456,7 @@ GiveExperiencePoints: ; 3ee3b
add hl, bc
push bc
ld b, TRUE
- predef CalcPkmnStats
+ predef CalcMonStats
pop bc
pop de
ld hl, MON_MAXHP + 1
@@ -7532,7 +7532,7 @@ GiveExperiencePoints: ; 3ee3b
.skip_animation2
xor a ; PARTYMON
ld [wMonType], a
- predef CopyPkmnToTempMon
+ predef CopyMonToTempMon
hlcoord 9, 0
ld b, $a
ld c, $9
@@ -7648,7 +7648,7 @@ BoostExp: ; 3f106
ret
; 3f11b
-Text_PkmnGainedExpPoint: ; 3f11b
+Text_MonGainedExpPoint: ; 3f11b
text_jump Text_Gained
start_asm
ld hl, TextJump_StringBuffer2ExpPoints
@@ -7692,7 +7692,7 @@ AnimateExpBar: ; 3f136
ld [wd002], a
xor a ; PARTYMON
ld [wMonType], a
- predef CopyPkmnToTempMon
+ predef CopyMonToTempMon
ld a, [wTempMonLevel]
ld b, a
ld e, a
@@ -7856,23 +7856,23 @@ AnimateExpBar: ; 3f136
ld [hBGMapMode], a
ret
-SendOutPkmnText: ; 3f26d
+SendOutMonText: ; 3f26d
ld a, [wLinkMode]
and a
jr z, .not_linked
- ld hl, JumpText_GoPkmn ; If we're in a LinkBattle print just "Go <PlayerMon>"
+ ld hl, JumpText_GoMon ; If we're in a LinkBattle print just "Go <PlayerMon>"
ld a, [wBattleHasJustStarted] ; unless this (unidentified) variable is set
and a
jr nz, .skip_to_textbox
.not_linked
-; Depending on the HP of the enemy Pkmn, the game prints a different text
+; Depending on the HP of the enemy mon, the game prints a different text
ld hl, wEnemyMonHP
ld a, [hli]
or [hl]
- ld hl, JumpText_GoPkmn
+ ld hl, JumpText_GoMon
jr z, .skip_to_textbox
; compute enemy helth remaining as a percentage
@@ -7901,43 +7901,43 @@ SendOutPkmnText: ; 3f26d
call Divide
ld a, [hQuotient + 2]
- ld hl, JumpText_GoPkmn
+ ld hl, JumpText_GoMon
cp 70
jr nc, .skip_to_textbox
- ld hl, JumpText_DoItPkmn
+ ld hl, JumpText_DoItMon
cp 40
jr nc, .skip_to_textbox
- ld hl, JumpText_GoForItPkmn
+ ld hl, JumpText_GoForItMon
cp 10
jr nc, .skip_to_textbox
- ld hl, JumpText_YourFoesWeakGetmPkmn
+ ld hl, JumpText_YourFoesWeakGetmMon
.skip_to_textbox
jp BattleTextBox
; 3f2d1
-JumpText_GoPkmn: ; 3f2d1
- text_jump Text_GoPkmn
+JumpText_GoMon: ; 3f2d1
+ text_jump Text_GoMon
start_asm
jr Function_TextJump_BattleMonNick01
; 3f2d6
-JumpText_DoItPkmn: ; 3f2d8
- text_jump Text_DoItPkmn
+JumpText_DoItMon: ; 3f2d8
+ text_jump Text_DoItMon
start_asm
jr Function_TextJump_BattleMonNick01
; 3f2dd
-JumpText_GoForItPkmn: ; 3f2df
- text_jump Text_GoForItPkmn
+JumpText_GoForItMon: ; 3f2df
+ text_jump Text_GoForItMon
start_asm
jr Function_TextJump_BattleMonNick01
; 3f2e4
-JumpText_YourFoesWeakGetmPkmn: ; 3f2e6
- text_jump Text_YourFoesWeakGetmPkmn
+JumpText_YourFoesWeakGetmMon: ; 3f2e6
+ text_jump Text_YourFoesWeakGetmMon
start_asm
Function_TextJump_BattleMonNick01: ; 3f2eb
ld hl, TextJump_BattleMonNick01
@@ -7949,14 +7949,14 @@ TextJump_BattleMonNick01: ; 3f2ef
db "@"
; 3f2f4
-WithdrawPkmnText: ; 3f2f4
- ld hl, .WithdrawPkmnText
+WithdrawMonText: ; 3f2f4
+ ld hl, .WithdrawMonText
jp BattleTextBox
-.WithdrawPkmnText:
+.WithdrawMonText:
text_jump Text_BattleMonNickComma
start_asm
-; Print text to withdraw Pkmn
+; Print text to withdraw mon
; depending on HP the message is different
push de
push bc
@@ -8037,7 +8037,7 @@ Unreferenced_HandleSafariAngerEatingStatus:
and a
jr z, .angry
dec [hl]
- ld hl, BattleText_WildPkmnIsEating
+ ld hl, BattleText_WildMonIsEating
jr .finish
.angry
@@ -8046,7 +8046,7 @@ Unreferenced_HandleSafariAngerEatingStatus:
and a
ret z
dec [hl]
- ld hl, BattleText_WildPkmnIsAngry
+ ld hl, BattleText_WildMonIsAngry
jr nz, .finish
push hl
ld a, [wEnemyMonSpecies]