Merge branch 'upcoming' into ai_switching

This commit is contained in:
DizzyEggg 2023-07-26 09:23:53 +02:00
commit 7b7cbf506d
121 changed files with 1607 additions and 541 deletions

View File

@ -23,8 +23,9 @@ body:
label: Version
description: What version of pokeemerald-expansion are you using as a base?
options:
- 1.5.0 (Default)
- 1.5.1 (Default)
- upcoming (Edge)
- 1.5.0
- 1.4.3
- 1.4.2
- 1.4.1

View File

@ -23,8 +23,9 @@ body:
label: Version
description: What version of pokeemerald-expansion are you using as a base?
options:
- 1.5.0 (Default)
- 1.5.1 (Default)
- upcoming (Edge)
- 1.5.0
- 1.4.3
- 1.4.2
- 1.4.1

View File

@ -23,8 +23,9 @@ body:
label: Version
description: What version of pokeemerald-expansion are you using as a base?
options:
- 1.5.0 (Default)
- 1.5.1 (Default)
- upcoming (Edge)
- 1.5.0
- 1.4.3
- 1.4.2
- 1.4.1

View File

@ -432,6 +432,22 @@ gBattleScriptsForMoveEffects::
.4byte BattleScript_EffectInfernalParade @ EFFECT_INFERNAL_PARADE
.4byte BattleScript_EffectTakeHeart @ EFFECT_TAKE_HEART
.4byte BattleScript_EffectAxeKick @ EFFECT_AXE_KICK
.4byte BattleScript_EffectHit @ EFFECT_COLLISION_COURSE
.4byte BattleScript_EffectSpinOut @ EFFECT_SPIN_OUT
.4byte BattleScript_EffectMakeItRain @ EFFECT_MAKE_IT_RAIN
BattleScript_EffectMakeItRain:
setmoveeffect MOVE_EFFECT_PAYDAY
call BattleScript_EffectHit_Ret
seteffectwithchance
tryfaintmon BS_TARGET
setmoveeffect MOVE_EFFECT_SP_ATK_MINUS_1 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
seteffectprimary
goto BattleScript_MoveEnd
BattleScript_EffectSpinOut::
setmoveeffect MOVE_EFFECT_SPD_MINUS_2 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
goto BattleScript_EffectHit
BattleScript_EffectAxeKick::
setmoveeffect MOVE_EFFECT_CONFUSION
@ -1121,24 +1137,7 @@ BattleScript_HyperspaceFuryRemoveProtect::
return
BattleScript_EffectPlasmaFists:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
call BattleScript_EffectHit_Ret
seteffectwithchance
tryfaintmon BS_TARGET
applyplasmafists
@ -1147,24 +1146,7 @@ BattleScript_EffectPlasmaFists:
goto BattleScript_MoveEnd
BattleScript_EffectSparklySwirl:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
call BattleScript_EffectHit_Ret
tryfaintmon BS_TARGET
healpartystatus
waitstate
@ -1173,24 +1155,7 @@ BattleScript_EffectSparklySwirl:
goto BattleScript_MoveEnd
BattleScript_EffectFreezyFrost:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
call BattleScript_EffectHit_Ret
tryfaintmon BS_TARGET
normalisebuffs
printstring STRINGID_STATCHANGESGONE
@ -1199,24 +1164,7 @@ BattleScript_EffectFreezyFrost:
BattleScript_EffectSappySeed:
jumpifstatus3 BS_TARGET, STATUS3_LEECHSEED, BattleScript_EffectHit
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
call BattleScript_EffectHit_Ret
tryfaintmon BS_TARGET
jumpifhasnohp BS_TARGET, BattleScript_MoveEnd
setseeded
@ -1226,24 +1174,7 @@ BattleScript_EffectSappySeed:
BattleScript_EffectBaddyBad:
jumpifsideaffecting BS_ATTACKER, SIDE_STATUS_REFLECT, BattleScript_EffectHit
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
call BattleScript_EffectHit_Ret
tryfaintmon BS_TARGET
setreflect
printfromtable gReflectLightScreenSafeguardStringIds
@ -1252,24 +1183,7 @@ BattleScript_EffectBaddyBad:
BattleScript_EffectGlitzyGlow:
jumpifsideaffecting BS_ATTACKER, SIDE_STATUS_LIGHTSCREEN, BattleScript_EffectHit
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
call BattleScript_EffectHit_Ret
tryfaintmon BS_TARGET
setlightscreen
printfromtable gReflectLightScreenSafeguardStringIds
@ -1430,24 +1344,7 @@ BattleScript_NoMoveEffect:
BattleScript_EffectRelicSong:
setmoveeffect MOVE_EFFECT_RELIC_SONG | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
call BattleScript_EffectHit_Ret
seteffectwithchance
argumentstatuseffect
tryfaintmon BS_TARGET
@ -2214,24 +2111,7 @@ BattleScript_EffectFinalGambit:
goto BattleScript_MoveEnd
BattleScript_EffectHitSwitchTarget:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
call BattleScript_EffectHit_Ret
tryfaintmon BS_TARGET
moveendall
jumpifability BS_TARGET, ABILITY_SUCTION_CUPS, BattleScript_AbilityPreventsPhasingOut
@ -3191,24 +3071,7 @@ BattleScript_EffectThroatChop:
goto BattleScript_EffectHit
BattleScript_EffectHitEscape:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
call BattleScript_EffectHit_Ret
jumpifmovehadnoeffect BattleScript_MoveEnd
jumpifability BS_TARGET, ABILITY_GUARD_DOG, BattleScript_MoveEnd
seteffectwithchance
@ -3280,6 +3143,27 @@ BattleScript_MoveEnd::
moveendall
end
BattleScript_EffectHit_Ret::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
return
BattleScript_EffectNaturalGift:
attackcanceler
attackstring
@ -3471,24 +3355,7 @@ BattleScript_EffectPoisonHit:
goto BattleScript_EffectHit
BattleScript_EffectAbsorb::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
call BattleScript_EffectHit_Ret
jumpifstatus3 BS_ATTACKER, STATUS3_HEAL_BLOCK, BattleScript_AbsorbHealBlock
setdrainedhp
manipulatedamage DMG_BIG_ROOT
@ -3917,24 +3784,7 @@ BattleScript_EffectFlinchHit::
BattleScript_EffectFlinchStatus:
setmoveeffect MOVE_EFFECT_FLINCH
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
call BattleScript_EffectHit_Ret
seteffectwithchance
argumentstatuseffect
tryfaintmon BS_TARGET
@ -5167,24 +5017,7 @@ BattleScript_EffectBatonPass::
BattleScript_EffectRapidSpin::
.if B_SPEED_BUFFING_RAPID_SPIN == GEN_8
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
call BattleScript_EffectHit_Ret
jumpifhalfword CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE, BattleScript_MoveEnd
setmoveeffect MOVE_EFFECT_RAPIDSPIN | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
seteffectwithchance
@ -6801,9 +6634,6 @@ BattleScript_DoSwitchOut::
hidepartystatussummary BS_ATTACKER
switchinanim BS_ATTACKER, FALSE
waitstate
jumpifcantreverttoprimal BattleScript_DoSwitchOut2
call BattleScript_PrimalReversionRet
BattleScript_DoSwitchOut2:
switchineffects BS_ATTACKER
moveendcase MOVEEND_STATUS_IMMUNITY_ABILITIES
moveendcase MOVEEND_MIRROR_MOVE
@ -7958,17 +7788,12 @@ BattleScript_WishMegaEvolution::
goto BattleScript_MegaEvolutionAfterString
BattleScript_PrimalReversion::
printstring STRINGID_EMPTYSTRING3
waitmessage 1
setbyte gIsCriticalHit, 0
handleprimalreversion BS_ATTACKER, 0
handleprimalreversion BS_ATTACKER, 1
playanimation BS_ATTACKER, B_ANIM_PRIMAL_REVERSION
waitanimation
handleprimalreversion BS_ATTACKER, 2
printstring STRINGID_PKMNREVERTEDTOPRIMAL
waitmessage B_WAIT_TIME_LONG
switchinabilities BS_ATTACKER
call BattleScript_PrimalReversionRet
end2
BattleScript_PrimalReversionRestoreAttacker::
call BattleScript_PrimalReversionRet
copybyte gBattlerAttacker, sSAVED_BATTLER
end2
BattleScript_PrimalReversionRet::
@ -7982,6 +7807,7 @@ BattleScript_PrimalReversionRet::
handleprimalreversion BS_ATTACKER, 2
printstring STRINGID_PKMNREVERTEDTOPRIMAL
waitmessage B_WAIT_TIME_LONG
switchinabilities BS_ATTACKER
return
BattleScript_AttackerFormChange::
@ -9023,7 +8849,7 @@ BattleScript_BadDreams_ShowPopUp:
goto BattleScript_BadDreams_DmgAfterPopUp
BattleScript_BadDreams_HidePopUp:
destroyabilitypopup
tryfaintmon BS_TARGET
tryfaintmon BS_TARGET
goto BattleScript_BadDreamsIncrement
BattleScript_TookAttack::
@ -10301,24 +10127,7 @@ BattleScript_ExtremeEvoboostEnd::
goto BattleScript_MoveEnd
BattleScript_EffectHitSetRemoveTerrain:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
call BattleScript_EffectHit_Ret
setterrain BattleScript_TryFaint
playanimation BS_ATTACKER, B_ANIM_RESTORE_BG
printfromtable gTerrainStringIds

View File

@ -112,4 +112,35 @@ Debug_SaveBlock2Size::
Debug_PokemonStorageSize::
.string "{PKMN}Storage size: {STR_VAR_1}/{STR_VAR_2}.$"
Debug_HatchAnEgg::
lockall
getpartysize
goto_if_eq VAR_RESULT, 0, Debug_HatchAnEgg_NoPokemon
special ChoosePartyMon
waitstate
goto_if_ge VAR_0x8004, PARTY_SIZE, Debug_HatchAnEgg_End
specialvar VAR_RESULT, ScriptGetPartyMonSpecies
goto_if_ne VAR_RESULT, SPECIES_EGG, DebugScript_HatchAnEgg_CantForceHatch
special EggHatch
waitstate
Debug_HatchAnEgg_End::
releaseall
end
Debug_HatchAnEgg_NoPokemon::
msgbox DebugScript_HatchAnEgg_Text_EmptyParty, MSGBOX_DEFAULT
releaseall
end
DebugScript_HatchAnEgg_CantForceHatch::
msgbox DebugScript_HatchAnEgg_Text_NotAnEgg, MSGBOX_DEFAULT
releaseall
end
DebugScript_HatchAnEgg_Text_EmptyParty::
.string "You have no Pokémon nor Eggs.$"
DebugScript_HatchAnEgg_Text_NotAnEgg::
.string "That's not a Pokémon Egg.$"
.endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -10,7 +10,7 @@ JASC-PAL
168 144 120
192 192 176
248 248 248
56 48 40
98 82 57
232 64 32
176 24 16
64 56 48

Binary file not shown.

Before

Width:  |  Height:  |  Size: 781 B

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 B

After

Width:  |  Height:  |  Size: 466 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 B

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 963 B

After

Width:  |  Height:  |  Size: 928 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 974 B

After

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 562 B

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 759 B

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

View File

@ -15,5 +15,5 @@ JASC-PAL
144 56 80
72 72 112
168 56 80
0 0 0
255 255 255
0 0 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 712 B

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 794 B

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 601 B

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 811 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 906 B

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 901 B

After

Width:  |  Height:  |  Size: 853 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 669 B

After

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 666 B

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 987 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 B

After

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 707 B

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 926 B

After

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 915 B

After

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 B

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 629 B

After

Width:  |  Height:  |  Size: 586 B

View File

@ -4,7 +4,7 @@ JASC-PAL
152 208 160
96 64 48
16 16 16
136 104 80
164 115 82
56 24 24
216 200 160
248 248 248
@ -14,6 +14,6 @@ JASC-PAL
208 152 0
192 152 128
160 112 80
112 96 96
139 98 74
247 82 66
0 0 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B

View File

@ -634,7 +634,7 @@ struct BattleStruct
bool8 friskedAbility; // If identifies two mons, show the ability pop-up only once.
u8 sameMoveTurns[MAX_BATTLERS_COUNT]; // For Metronome, number of times the same moves has been SUCCESFULLY used.
u16 moveEffect2; // For Knock Off
u16 changedSpecies[PARTY_SIZE]; // For Zygarde or future forms when multiple mons can change into the same pokemon.
u16 changedSpecies[NUM_BATTLE_SIDES][PARTY_SIZE]; // For forms when multiple mons can change into the same pokemon.
u8 quickClawBattlerId;
struct LostItem itemLost[PARTY_SIZE]; // Player's team that had items consumed or stolen (two bytes per party member)
u8 blunderPolicy:1; // should blunder policy activate

View File

@ -2,6 +2,7 @@
#define GUARD_BATTLE_ANIM_H
#include "battle.h"
#include "constants/battle.h"
#include "constants/battle_anim.h"
#include "task.h"
@ -204,10 +205,10 @@ u8 GetBattlerSpriteDefault_Y(u8 battlerId);
u8 GetSubstituteSpriteDefault_Y(u8 battlerId);
// battle_anim_status_effects.c
#define STAT_ANIM_PLUS1 15
#define STAT_ANIM_PLUS2 39
#define STAT_ANIM_MINUS1 22
#define STAT_ANIM_MINUS2 46
#define STAT_ANIM_PLUS1 MOVE_EFFECT_ATK_PLUS_1
#define STAT_ANIM_PLUS2 MOVE_EFFECT_ATK_PLUS_2
#define STAT_ANIM_MINUS1 MOVE_EFFECT_ATK_MINUS_1
#define STAT_ANIM_MINUS2 MOVE_EFFECT_ATK_MINUS_2
#define STAT_ANIM_MULTIPLE_PLUS1 55
#define STAT_ANIM_MULTIPLE_PLUS2 56
#define STAT_ANIM_MULTIPLE_MINUS1 57

View File

@ -72,6 +72,7 @@ bool32 IsWildMonSmart(void);
u8 CreateNPCTrainerPartyFromTrainer(struct Pokemon *party, const struct Trainer *trainer, bool32 firstTrainer, u32 battleTypeFlags);
void ModifyPersonalityForNature(u32 *personality, u32 newNature);
u32 GeneratePersonalityForGender(u32 gender, u32 species);
void CustomTrainerPartyAssignMoves(struct Pokemon *mon, const struct TrainerMonCustomized *partyEntry);
extern struct MultiPartnerMenuPokemon gMultiPartnerParty[MULTI_PARTY_SIZE];

View File

@ -418,6 +418,7 @@ extern const u8 BattleScript_AttackWeakenedByStrongWinds[];
extern const u8 BattleScript_BlockedByPrimalWeatherEnd3[];
extern const u8 BattleScript_BlockedByPrimalWeatherRet[];
extern const u8 BattleScript_PrimalReversion[];
extern const u8 BattleScript_PrimalReversionRestoreAttacker[];
extern const u8 BattleScript_HyperspaceFuryRemoveProtect[];
extern const u8 BattleScript_SelectingNotAllowedMoveGorillaTactics[];
extern const u8 BattleScript_SelectingNotAllowedMoveGorillaTacticsInPalace[];

View File

@ -142,6 +142,7 @@ u8 AtkCanceller_UnableToUseMove2(void);
bool8 HasNoMonsToSwitch(u8 battlerId, u8 r1, u8 r2);
bool32 TryChangeBattleWeather(u8 battler, u32 weatherEnumId, bool32 viaAbility);
u8 AbilityBattleEffects(u8 caseID, u8 battlerId, u16 ability, u8 special, u16 moveArg);
bool32 TryPrimalReversion(u8 battlerId);
bool32 IsNeutralizingGasOnField(void);
u32 GetBattlerAbility(u8 battlerId);
u32 IsAbilityOnSide(u32 battlerId, u32 ability);
@ -208,6 +209,7 @@ void BufferStatChange(u8 battlerId, u8 statId, u8 stringId);
bool32 BlocksPrankster(u16 move, u8 battlerPrankster, u8 battlerDef, bool32 checkTarget);
u16 GetUsedHeldItem(u8 battler);
bool32 IsBattlerWeatherAffected(u8 battlerId, u32 weatherFlags);
u32 ApplyWeatherDamageMultiplier(u8 battlerAtk, u16 move, u8 moveType, u32 dmg, u16 holdEffectAtk, u16 holdEffectDef);
u32 GetBattlerMoveTargetType(u8 battlerId, u16 move);
bool32 CanTargetBattler(u8 battlerAtk, u8 battlerDef, u16 move);
bool8 IsMoveAffectedByParentalBond(u16 move, u8 battlerId);

View File

@ -10,6 +10,7 @@
#define I_VITAMIN_EV_CAP GEN_LATEST // In Gen8+, the Vitamins no longer have a cap of 100 EV per stat.
#define I_BERRY_EV_JUMP GEN_LATEST // In Gen4 only, EV-lowering Berries lower a stat's EV to 100 if it is above 100.
#define I_GRISEOUS_ORB_FORM_CHANGE GEN_LATEST // In Gen9+, the Griseous Orb no longer changes Giratina's form when held.
#define I_GEM_BOOST_POWER GEN_LATEST // In Gen5+, the Gem boost power was reduced from 50% to 30%.
#define I_USE_EVO_HELD_ITEMS_FROM_BAG FALSE // If TRUE, items such as Razor Claw or Electirizer will be usable from the bag to evolve a Pokémon just like in LA.
// TM config

View File

@ -321,21 +321,21 @@
#define MOVE_EFFECT_PAYDAY 12
#define MOVE_EFFECT_CHARGING 13
#define MOVE_EFFECT_WRAP 14
#define MOVE_EFFECT_BURN_UP 15 // MOVE_EFFECT_BURN_UP replaces unused MOVE_EFFECT_RECOIL_25 so that stat change animations don't break
#define MOVE_EFFECT_ATK_PLUS_1 16
#define MOVE_EFFECT_DEF_PLUS_1 17
#define MOVE_EFFECT_SPD_PLUS_1 18
#define MOVE_EFFECT_SP_ATK_PLUS_1 19
#define MOVE_EFFECT_SP_DEF_PLUS_1 20
#define MOVE_EFFECT_ACC_PLUS_1 21
#define MOVE_EFFECT_EVS_PLUS_1 22
#define MOVE_EFFECT_ATK_MINUS_1 23
#define MOVE_EFFECT_DEF_MINUS_1 24
#define MOVE_EFFECT_SPD_MINUS_1 25
#define MOVE_EFFECT_SP_ATK_MINUS_1 26
#define MOVE_EFFECT_SP_DEF_MINUS_1 27
#define MOVE_EFFECT_ACC_MINUS_1 28
#define MOVE_EFFECT_EVS_MINUS_1 29
#define MOVE_EFFECT_ATK_PLUS_1 15
#define MOVE_EFFECT_DEF_PLUS_1 16
#define MOVE_EFFECT_SPD_PLUS_1 17
#define MOVE_EFFECT_SP_ATK_PLUS_1 18
#define MOVE_EFFECT_SP_DEF_PLUS_1 19
#define MOVE_EFFECT_ACC_PLUS_1 20
#define MOVE_EFFECT_EVS_PLUS_1 21
#define MOVE_EFFECT_ATK_MINUS_1 22
#define MOVE_EFFECT_DEF_MINUS_1 23
#define MOVE_EFFECT_SPD_MINUS_1 24
#define MOVE_EFFECT_SP_ATK_MINUS_1 25
#define MOVE_EFFECT_SP_DEF_MINUS_1 26
#define MOVE_EFFECT_ACC_MINUS_1 27
#define MOVE_EFFECT_EVS_MINUS_1 28
#define MOVE_EFFECT_BURN_UP 29
#define MOVE_EFFECT_RECHARGE 30
#define MOVE_EFFECT_RAGE 31
#define MOVE_EFFECT_STEAL_ITEM 32
@ -345,21 +345,21 @@
#define MOVE_EFFECT_RAPIDSPIN 36
#define MOVE_EFFECT_REMOVE_STATUS 37
#define MOVE_EFFECT_ATK_DEF_DOWN 38
#define MOVE_EFFECT_SCALE_SHOT 39 // MOVE_EFFECT_SCALE_SHOT replaces unused MOVE_EFFECT_RECOIL_33 so that stat change animations don't break
#define MOVE_EFFECT_ATK_PLUS_2 40
#define MOVE_EFFECT_DEF_PLUS_2 41
#define MOVE_EFFECT_SPD_PLUS_2 42
#define MOVE_EFFECT_SP_ATK_PLUS_2 43
#define MOVE_EFFECT_SP_DEF_PLUS_2 44
#define MOVE_EFFECT_ACC_PLUS_2 45
#define MOVE_EFFECT_EVS_PLUS_2 46
#define MOVE_EFFECT_ATK_MINUS_2 47
#define MOVE_EFFECT_DEF_MINUS_2 48
#define MOVE_EFFECT_SPD_MINUS_2 49
#define MOVE_EFFECT_SP_ATK_MINUS_2 50
#define MOVE_EFFECT_SP_DEF_MINUS_2 51
#define MOVE_EFFECT_ACC_MINUS_2 52
#define MOVE_EFFECT_EVS_MINUS_2 53
#define MOVE_EFFECT_ATK_PLUS_2 39
#define MOVE_EFFECT_DEF_PLUS_2 40
#define MOVE_EFFECT_SPD_PLUS_2 41
#define MOVE_EFFECT_SP_ATK_PLUS_2 42
#define MOVE_EFFECT_SP_DEF_PLUS_2 43
#define MOVE_EFFECT_ACC_PLUS_2 44
#define MOVE_EFFECT_EVS_PLUS_2 45
#define MOVE_EFFECT_ATK_MINUS_2 46
#define MOVE_EFFECT_DEF_MINUS_2 47
#define MOVE_EFFECT_SPD_MINUS_2 48
#define MOVE_EFFECT_SP_ATK_MINUS_2 49
#define MOVE_EFFECT_SP_DEF_MINUS_2 50
#define MOVE_EFFECT_ACC_MINUS_2 51
#define MOVE_EFFECT_EVS_MINUS_2 52
#define MOVE_EFFECT_SCALE_SHOT 53
#define MOVE_EFFECT_THRASH 54
#define MOVE_EFFECT_KNOCK_OFF 55
#define MOVE_EFFECT_DEF_SPDEF_DOWN 56

View File

@ -409,7 +409,10 @@
#define EFFECT_INFERNAL_PARADE 403
#define EFFECT_TAKE_HEART 404
#define EFFECT_AXE_KICK 405
#define EFFECT_COLLISION_COURSE 406
#define EFFECT_SPIN_OUT 407
#define EFFECT_MAKE_IT_RAIN 408
#define NUM_BATTLE_MOVE_EFFECTS 406
#define NUM_BATTLE_MOVE_EFFECTS 409
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H

View File

@ -436,14 +436,19 @@ extern const u32 gMonFrontPic_Minun[];
extern const u32 gMonFrontPic_Volbeat[];
extern const u32 gMonFrontPic_Illumise[];
extern const u32 gMonFrontPic_Roselia[];
extern const u32 gMonFrontPic_RoseliaF[];
extern const u32 gMonFrontPic_Gulpin[];
extern const u32 gMonFrontPic_GulpinF[];
extern const u32 gMonFrontPic_Swalot[];
extern const u32 gMonFrontPic_SwalotF[];
extern const u32 gMonFrontPic_Carvanha[];
extern const u32 gMonFrontPic_Sharpedo[];
extern const u32 gMonFrontPic_Wailmer[];
extern const u32 gMonFrontPic_Wailord[];
extern const u32 gMonFrontPic_Numel[];
extern const u32 gMonFrontPic_NumelF[];
extern const u32 gMonFrontPic_Camerupt[];
extern const u32 gMonFrontPic_CameruptF[];
extern const u32 gMonFrontPic_Torkoal[];
extern const u32 gMonFrontPic_Spoink[];
extern const u32 gMonFrontPic_Grumpig[];
@ -453,6 +458,7 @@ extern const u32 gMonFrontPic_Vibrava[];
extern const u32 gMonFrontPic_Flygon[];
extern const u32 gMonFrontPic_Cacnea[];
extern const u32 gMonFrontPic_Cacturne[];
extern const u32 gMonFrontPic_CacturneF[];
extern const u32 gMonFrontPic_Swablu[];
extern const u32 gMonFrontPic_Altaria[];
extern const u32 gMonFrontPic_Zangoose[];
@ -471,6 +477,7 @@ extern const u32 gMonFrontPic_Anorith[];
extern const u32 gMonFrontPic_Armaldo[];
extern const u32 gMonFrontPic_Feebas[];
extern const u32 gMonFrontPic_Milotic[];
extern const u32 gMonFrontPic_MiloticF[];
extern const u32 gMonFrontPic_Castform[];
extern const u32 gMonFrontPic_Kecleon[];
extern const u32 gMonFrontPic_Shuppet[];
@ -490,6 +497,7 @@ extern const u32 gMonFrontPic_Clamperl[];
extern const u32 gMonFrontPic_Huntail[];
extern const u32 gMonFrontPic_Gorebyss[];
extern const u32 gMonFrontPic_Relicanth[];
extern const u32 gMonFrontPic_RelicanthF[];
extern const u32 gMonFrontPic_Luvdisc[];
extern const u32 gMonFrontPic_Bagon[];
extern const u32 gMonFrontPic_Shelgon[];
@ -526,6 +534,7 @@ extern const u32 gMonFrontPic_StaraptorF[];
extern const u32 gMonFrontPic_Bidoof[];
extern const u32 gMonFrontPic_BidoofF[];
extern const u32 gMonFrontPic_Bibarel[];
extern const u32 gMonFrontPic_BibarelF[];
extern const u32 gMonFrontPic_Kricketot[];
extern const u32 gMonFrontPic_KricketotF[];
extern const u32 gMonFrontPic_Kricketune[];
@ -533,9 +542,12 @@ extern const u32 gMonFrontPic_KricketuneF[];
extern const u32 gMonFrontPic_Shinx[];
extern const u32 gMonFrontPic_ShinxF[];
extern const u32 gMonFrontPic_Luxio[];
extern const u32 gMonFrontPic_LuxioF[];
extern const u32 gMonFrontPic_Luxray[];
extern const u32 gMonFrontPic_LuxrayF[];
extern const u32 gMonFrontPic_Budew[];
extern const u32 gMonFrontPic_Roserade[];
extern const u32 gMonFrontPic_RoseradeF[];
extern const u32 gMonFrontPic_Cranidos[];
extern const u32 gMonFrontPic_Rampardos[];
extern const u32 gMonFrontPic_Shieldon[];
@ -546,6 +558,7 @@ extern const u32 gMonFrontPic_Mothim[];
extern const u32 gMonFrontPic_Combee[];
extern const u32 gMonFrontPic_Vespiquen[];
extern const u32 gMonFrontPic_Pachirisu[];
extern const u32 gMonFrontPic_PachirisuF[];
extern const u32 gMonFrontPic_Buizel[];
extern const u32 gMonFrontPic_Floatzel[];
extern const u32 gMonFrontPic_Cherubi[];
@ -586,13 +599,19 @@ extern const u32 gMonFrontPic_Hippowdon[];
extern const u32 gMonFrontPic_Skorupi[];
extern const u32 gMonFrontPic_Drapion[];
extern const u32 gMonFrontPic_Croagunk[];
extern const u32 gMonFrontPic_CroagunkF[];
extern const u32 gMonFrontPic_Toxicroak[];
extern const u32 gMonFrontPic_ToxicroakF[];
extern const u32 gMonFrontPic_Carnivine[];
extern const u32 gMonFrontPic_Finneon[];
extern const u32 gMonFrontPic_FinneonF[];
extern const u32 gMonFrontPic_Lumineon[];
extern const u32 gMonFrontPic_LumineonF[];
extern const u32 gMonFrontPic_Mantyke[];
extern const u32 gMonFrontPic_Snover[];
extern const u32 gMonFrontPic_SnoverF[];
extern const u32 gMonFrontPic_Abomasnow[];
extern const u32 gMonFrontPic_AbomasnowF[];
extern const u32 gMonFrontPic_Weavile[];
extern const u32 gMonFrontPic_WeavileF[];
extern const u32 gMonFrontPic_Magnezone[];
@ -1710,14 +1729,19 @@ extern const u32 gMonBackPic_Minun[];
extern const u32 gMonBackPic_Volbeat[];
extern const u32 gMonBackPic_Illumise[];
extern const u32 gMonBackPic_Roselia[];
extern const u32 gMonBackPic_RoseliaF[];
extern const u32 gMonBackPic_Gulpin[];
extern const u32 gMonBackPic_GulpinF[];
extern const u32 gMonBackPic_Swalot[];
extern const u32 gMonBackPic_SwalotF[];
extern const u32 gMonBackPic_Carvanha[];
extern const u32 gMonBackPic_Sharpedo[];
extern const u32 gMonBackPic_Wailmer[];
extern const u32 gMonBackPic_Wailord[];
extern const u32 gMonBackPic_Numel[];
extern const u32 gMonBackPic_NumelF[];
extern const u32 gMonBackPic_Camerupt[];
extern const u32 gMonBackPic_CameruptF[];
extern const u32 gMonBackPic_Torkoal[];
extern const u32 gMonBackPic_Spoink[];
extern const u32 gMonBackPic_Grumpig[];
@ -1745,6 +1769,7 @@ extern const u32 gMonBackPic_Anorith[];
extern const u32 gMonBackPic_Armaldo[];
extern const u32 gMonBackPic_Feebas[];
extern const u32 gMonBackPic_Milotic[];
extern const u32 gMonBackPic_MiloticF[];
extern const u32 gMonBackPic_Castform[];
extern const u32 gMonBackPic_Kecleon[];
extern const u32 gMonBackPic_Shuppet[];
@ -1764,6 +1789,7 @@ extern const u32 gMonBackPic_Clamperl[];
extern const u32 gMonBackPic_Huntail[];
extern const u32 gMonBackPic_Gorebyss[];
extern const u32 gMonBackPic_Relicanth[];
extern const u32 gMonBackPic_RelicanthF[];
extern const u32 gMonBackPic_Luvdisc[];
extern const u32 gMonBackPic_Bagon[];
extern const u32 gMonBackPic_Shelgon[];
@ -1806,9 +1832,12 @@ extern const u32 gMonBackPic_KricketuneF[];
extern const u32 gMonBackPic_Shinx[];
extern const u32 gMonBackPic_ShinxF[];
extern const u32 gMonBackPic_Luxio[];
extern const u32 gMonBackPic_LuxioF[];
extern const u32 gMonBackPic_Luxray[];
extern const u32 gMonBackPic_LuxrayF[];
extern const u32 gMonBackPic_Budew[];
extern const u32 gMonBackPic_Roserade[];
extern const u32 gMonBackPic_RoseradeF[];
extern const u32 gMonBackPic_Cranidos[];
extern const u32 gMonBackPic_Rampardos[];
extern const u32 gMonBackPic_Shieldon[];
@ -1820,7 +1849,9 @@ extern const u32 gMonBackPic_Combee[];
extern const u32 gMonBackPic_Vespiquen[];
extern const u32 gMonBackPic_Pachirisu[];
extern const u32 gMonBackPic_Buizel[];
extern const u32 gMonBackPic_BuizelF[];
extern const u32 gMonBackPic_Floatzel[];
extern const u32 gMonBackPic_FloatzelF[];
extern const u32 gMonBackPic_Cherubi[];
extern const u32 gMonBackPic_Cherrim[];
extern const u32 gMonBackPic_Shellos[];
@ -1858,12 +1889,17 @@ extern const u32 gMonBackPic_Hippowdon[];
extern const u32 gMonBackPic_Skorupi[];
extern const u32 gMonBackPic_Drapion[];
extern const u32 gMonBackPic_Croagunk[];
extern const u32 gMonBackPic_CroagunkF[];
extern const u32 gMonBackPic_Toxicroak[];
extern const u32 gMonBackPic_ToxicroakF[];
extern const u32 gMonBackPic_Carnivine[];
extern const u32 gMonBackPic_Finneon[];
extern const u32 gMonBackPic_FinneonF[];
extern const u32 gMonBackPic_Lumineon[];
extern const u32 gMonBackPic_LumineonF[];
extern const u32 gMonBackPic_Mantyke[];
extern const u32 gMonBackPic_Snover[];
extern const u32 gMonBackPic_SnoverF[];
extern const u32 gMonBackPic_Abomasnow[];
extern const u32 gMonBackPic_Weavile[];
extern const u32 gMonBackPic_WeavileF[];

View File

@ -48,6 +48,10 @@ static inline void Shuffle(void *data, size_t n, size_t size)
* RandomUniform(tag, lo, hi) returns a number from lo to hi inclusive
* with uniform probability.
*
* RandomUniformExcept(tag, lo, hi, reject) returns a number from lo to
* hi inclusive with uniform probability, excluding those for which
* reject returns TRUE.
*
* RandomElement(tag, array) returns an element in array with uniform
* probability. The array must be known at compile-time (e.g. a global
* const array).
@ -72,8 +76,11 @@ enum RandomTag
RNG_FLAME_BODY,
RNG_FORCE_RANDOM_SWITCH,
RNG_FROZEN,
RNG_HITS,
RNG_HOLD_EFFECT_FLINCH,
RNG_INFATUATION,
RNG_LOADED_DICE,
RNG_METRONOME,
RNG_PARALYSIS,
RNG_POISON_POINT,
RNG_RAMPAGE_TURNS,
@ -121,10 +128,12 @@ enum RandomTag
})
u32 RandomUniform(enum RandomTag, u32 lo, u32 hi);
u32 RandomUniformExcept(enum RandomTag, u32 lo, u32 hi, bool32 (*reject)(u32));
u32 RandomWeightedArray(enum RandomTag, u32 sum, u32 n, const u8 *weights);
const void *RandomElementArray(enum RandomTag, const void *array, size_t size, size_t count);
u32 RandomUniformDefault(enum RandomTag, u32 lo, u32 hi);
u32 RandomUniformExceptDefault(enum RandomTag, u32 lo, u32 hi, bool32 (*reject)(u32));
u32 RandomWeightedArrayDefault(enum RandomTag, u32 sum, u32 n, const u8 *weights);
const void *RandomElementArrayDefault(enum RandomTag, const void *array, size_t size, size_t count);

View File

@ -4389,8 +4389,9 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
break;
case EFFECT_SUPERPOWER:
case EFFECT_OVERHEAT:
case EFFECT_MAKE_IT_RAIN:
if (AI_DATA->abilities[battlerAtk] == ABILITY_CONTRARY)
score += 10;
score += 3;
break;
case EFFECT_MAGIC_COAT:
if (IS_MOVE_STATUS(predictedMove) && AI_GetBattlerMoveTargetType(battlerDef, predictedMove) & (MOVE_TARGET_SELECTED | MOVE_TARGET_OPPONENTS_FIELD | MOVE_TARGET_BOTH))
@ -5197,7 +5198,6 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
case EFFECT_ROOST:
case EFFECT_MEMENTO:
case EFFECT_GRUDGE:
case EFFECT_OVERHEAT:
score -= 2;
break;
default:

View File

@ -378,6 +378,7 @@ static const u16 sIgnoredPowerfulMoveEffects[] =
EFFECT_ERUPTION,
EFFECT_OVERHEAT,
EFFECT_MIND_BLOWN,
EFFECT_MAKE_IT_RAIN,
IGNORED_MOVES_END
};

View File

@ -121,7 +121,6 @@ static void SpriteCB_UnusedBattleInit_Main(struct Sprite *sprite);
static void TrySpecialEvolution(void);
static u32 Crc32B (const u8 *data, u32 size);
static u32 GeneratePartyHash(const struct Trainer *trainer, u32 i);
static void CustomTrainerPartyAssignMoves(struct Pokemon *mon, const struct TrainerMonCustomized *partyEntry);
EWRAM_DATA u16 gBattle_BG0_X = 0;
EWRAM_DATA u16 gBattle_BG0_Y = 0;
@ -1955,7 +1954,7 @@ u32 GeneratePersonalityForGender(u32 gender, u32 species)
return speciesInfo->genderRatio / 2;
}
static void CustomTrainerPartyAssignMoves(struct Pokemon *mon, const struct TrainerMonCustomized *partyEntry)
void CustomTrainerPartyAssignMoves(struct Pokemon *mon, const struct TrainerMonCustomized *partyEntry)
{
bool32 noMoveSet = TRUE;
u32 j;
@ -3876,13 +3875,8 @@ static void TryDoEventsBeforeFirstTurn(void)
{
gBattlerAttacker = gBattlerByTurnOrder[gBattleStruct->switchInAbilitiesCounter++];
// Primal Reversion
if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_PRIMAL_ORB
&& GetBattleFormChangeTargetSpecies(gBattlerAttacker, FORM_CHANGE_BATTLE_PRIMAL_REVERSION) != SPECIES_NONE)
{
BattleScriptExecute(BattleScript_PrimalReversion);
if (TryPrimalReversion(gBattlerAttacker))
return;
}
if (AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gBattlerAttacker, 0, 0, 0) != 0)
return;
}
@ -5454,7 +5448,8 @@ static void HandleEndTurn_FinishBattle(void)
changedForm = TryFormChange(i, B_SIDE_PLAYER, FORM_CHANGE_END_BATTLE);
// Clear original species field
gBattleStruct->changedSpecies[i] = SPECIES_NONE;
gBattleStruct->changedSpecies[B_SIDE_PLAYER][i] = SPECIES_NONE;
gBattleStruct->changedSpecies[B_SIDE_OPPONENT][i] = SPECIES_NONE;
#if B_RECALCULATE_STATS >= GEN_5
// Recalculate the stats of every party member before the end

View File

@ -3935,6 +3935,7 @@ u8 GetCurrentPpToMaxPpState(u8 currentPp, u8 maxPp)
struct TrainerSlide
{
u16 trainerId;
bool8 isFrontierTrainer;
const u8 *msgLastSwitchIn;
const u8 *msgLastLowHp;
const u8 *msgFirstDown;
@ -3954,6 +3955,7 @@ static const struct TrainerSlide sTrainerSlides[] =
Example:
{
.trainerId = TRAINER_WALLY_VR_2,
.isFrontierTrainer = FALSE,
.msgLastSwitchIn = sText_AarghAlmostHadIt,
.msgLastLowHp = sText_BoxIsFull,
.msgFirstDown = sText_123Poof,
@ -4046,7 +4048,9 @@ u32 ShouldDoTrainerSlide(u32 battlerId, u32 which)
for (i = 0; i < ARRAY_COUNT(sTrainerSlides); i++)
{
if (trainerId == sTrainerSlides[i].trainerId)
if (trainerId == sTrainerSlides[i].trainerId
&& (((gBattleTypeFlags & BATTLE_TYPE_FRONTIER) && sTrainerSlides[i].isFrontierTrainer)
|| (!(gBattleTypeFlags & BATTLE_TYPE_FRONTIER) && !sTrainerSlides[i].isFrontierTrainer)))
{
gBattleScripting.battler = battlerId;
switch (which)

View File

@ -6826,7 +6826,8 @@ static void SetDmgHazardsBattlescript(u8 battlerId, u8 multistringId)
bool32 DoSwitchInAbilitiesItems(u32 battlerId)
{
return (AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, battlerId, 0, 0, 0)
return (TryPrimalReversion(battlerId)
|| AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, battlerId, 0, 0, 0)
|| (gBattleWeather & B_WEATHER_ANY && WEATHER_HAS_EFFECT && AbilityBattleEffects(ABILITYEFFECT_ON_WEATHER, battlerId, 0, 0, 0))
|| (gFieldStatuses & STATUS_FIELD_TERRAIN_ANY && AbilityBattleEffects(ABILITYEFFECT_ON_TERRAIN, battlerId, 0, 0, 0))
|| ItemBattleEffects(ITEMEFFECT_ON_SWITCH_IN, battlerId, FALSE)
@ -10434,7 +10435,7 @@ static void Cmd_various(void)
{
gBattleStruct->battleBondTransformed[GET_BATTLER_SIDE2(gBattlerAttacker)] |= gBitTable[gBattlerPartyIndexes[gBattlerAttacker]];
PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[gBattlerAttacker].species);
gBattleStruct->changedSpecies[gBattlerPartyIndexes[gBattlerAttacker]] = gBattleMons[gBattlerAttacker].species;
gBattleStruct->changedSpecies[GET_BATTLER_SIDE2(gBattlerAttacker)][gBattlerPartyIndexes[gBattlerAttacker]] = gBattleMons[gBattlerAttacker].species;
gBattleMons[gBattlerAttacker].species = SPECIES_GRENINJA_ASH;
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_BattleBondActivatesOnMoveEndAttacker;
@ -11971,30 +11972,14 @@ static void Cmd_setmultihitcounter(void)
}
else
{
#if B_MULTI_HIT_CHANCE >= GEN_5
// Based on Gen 5's odds
// 35% for 2 hits
// 35% for 3 hits
// 15% for 4 hits
// 15% for 5 hits
gMultiHitCounter = Random() % 100;
if (gMultiHitCounter < 35)
gMultiHitCounter = 2;
else if (gMultiHitCounter < 35 + 35)
gMultiHitCounter = 3;
else if (gMultiHitCounter < 35 + 35 + 15)
gMultiHitCounter = 4;
else
gMultiHitCounter = 5;
#else
// 2 and 3 hits: 37.5%
// 4 and 5 hits: 12.5%
gMultiHitCounter = Random() % 4;
if (gMultiHitCounter > 1)
gMultiHitCounter = (Random() % 4) + 2;
else
gMultiHitCounter += 2;
#endif
// WARNING: These seem to be unused, see SetRandomMultiHitCounter.
#if B_MULTI_HIT_CHANCE >= GEN_5
// 35%: 2 hits, 35%: 3 hits, 15% 4 hits, 15% 5 hits.
gMultiHitCounter = RandomWeighted(RNG_HITS, 0, 0, 7, 7, 3, 3);
#else
// 37.5%: 2 hits, 37.5%: 3 hits, 12.5% 4 hits, 12.5% 5 hits.
gMultiHitCounter = RandomWeighted(RNG_HITS, 0, 0, 3, 3, 1, 1);
#endif
}
}
@ -12742,41 +12727,37 @@ static void Cmd_mimicattackcopy(void)
}
}
static bool32 InvalidMetronomeMove(u32 move)
{
return gBattleMoves[move].effect == EFFECT_PLACEHOLDER
|| gBattleMoves[move].metronomeBanned;
}
static void Cmd_metronome(void)
{
CMD_ARGS();
#if B_METRONOME_MOVES >= GEN_9
u16 moveCount = MOVES_COUNT_GEN9;
u32 moveCount = MOVES_COUNT_GEN9;
#elif B_METRONOME_MOVES >= GEN_8
u16 moveCount = MOVES_COUNT_GEN8;
u32 moveCount = MOVES_COUNT_GEN8;
#elif B_METRONOME_MOVES >= GEN_7
u16 moveCount = MOVES_COUNT_GEN7;
u32 moveCount = MOVES_COUNT_GEN7;
#elif B_METRONOME_MOVES >= GEN_6
u16 moveCount = MOVES_COUNT_GEN6;
u32 moveCount = MOVES_COUNT_GEN6;
#elif B_METRONOME_MOVES >= GEN_5
u16 moveCount = MOVES_COUNT_GEN5;
u32 moveCount = MOVES_COUNT_GEN5;
#elif B_METRONOME_MOVES >= GEN_4
u16 moveCount = MOVES_COUNT_GEN4;
u32 moveCount = MOVES_COUNT_GEN4;
#elif B_METRONOME_MOVES >= GEN_3
u16 moveCount = MOVES_COUNT_GEN3;
u32 moveCount = MOVES_COUNT_GEN3;
#endif
while (TRUE)
{
gCurrentMove = (Random() % (moveCount - 1)) + 1;
if (gBattleMoves[gCurrentMove].effect == EFFECT_PLACEHOLDER)
continue;
if (!gBattleMoves[gCurrentMove].metronomeBanned)
{
gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED;
SetAtkCancellerForCalledMove();
gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect];
gBattlerTarget = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE);
return;
}
}
gCurrentMove = RandomUniformExcept(RNG_METRONOME, 1, moveCount - 1, InvalidMetronomeMove);
gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED;
SetAtkCancellerForCalledMove();
gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect];
gBattlerTarget = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE);
}
static void Cmd_dmgtolevel(void)

View File

@ -3119,13 +3119,8 @@ static void FillPartnerParty(u16 trainerId)
CreateMon(&gPlayerParty[i + 3], partyData[i].species, partyData[i].lvl, 0, TRUE, j, otIdType, otID);
SetMonData(&gPlayerParty[i + 3], MON_DATA_HELD_ITEM, &partyData[i].heldItem);
CustomTrainerPartyAssignMoves(&gPlayerParty[i+3], &partyData[i]);
// TODO: Figure out a default strategy when moves are not set, to generate a good moveset
for (j = 0; j < MAX_MON_MOVES; ++j)
{
SetMonData(&gPlayerParty[i+3], MON_DATA_MOVE1 + j, &partyData[i].moves[j]);
SetMonData(&gPlayerParty[i+3], MON_DATA_PP1 + j, &gBattleMoves[partyData[i].moves[j]].pp);
}
SetMonData(&gPlayerParty[i+3], MON_DATA_IVS, &(partyData[i].iv));
if (partyData[i].ev != NULL)
{
@ -3164,6 +3159,8 @@ static void FillPartnerParty(u16 trainerId)
StringCopy(trainerName, gTrainers[trainerId - TRAINER_CUSTOM_PARTNER].trainerName);
SetMonData(&gPlayerParty[i + 3], MON_DATA_OT_NAME, trainerName);
j = gTrainers[trainerId - TRAINER_CUSTOM_PARTNER].encounterMusic_gender >> 7;
SetMonData(&gPlayerParty[i+3], MON_DATA_OT_GENDER, &j);
}
}
else if (trainerId == TRAINER_EREADER)

View File

@ -6040,6 +6040,27 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
return effect;
}
bool32 TryPrimalReversion(u8 battlerId)
{
if (GetBattlerHoldEffect(battlerId, FALSE) == HOLD_EFFECT_PRIMAL_ORB
&& GetBattleFormChangeTargetSpecies(battlerId, FORM_CHANGE_BATTLE_PRIMAL_REVERSION) != SPECIES_NONE)
{
if (gBattlerAttacker == battlerId)
{
BattleScriptExecute(BattleScript_PrimalReversion);
}
else
{
// edge case for scenarios like a switch-in after activated eject button
gBattleScripting.savedBattler = gBattlerAttacker;
gBattlerAttacker = battlerId;
BattleScriptExecute(BattleScript_PrimalReversionRestoreAttacker);
}
return TRUE;
}
return FALSE;
}
bool32 IsNeutralizingGasBannedAbility(u32 ability)
{
switch (ability)
@ -8784,14 +8805,16 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
case ABILITY_PROTOSYNTHESIS:
{
u8 atkHighestStat = GetHighestStatId(battlerAtk);
if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT && (atkHighestStat == STAT_ATK || atkHighestStat == STAT_SPATK))
if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT
&& ((IS_MOVE_PHYSICAL(move) && atkHighestStat == STAT_ATK) || (IS_MOVE_SPECIAL(move) && atkHighestStat == STAT_SPATK)))
modifier = uq4_12_multiply(modifier, UQ_4_12(1.3));
}
break;
case ABILITY_QUARK_DRIVE:
{
u8 atkHighestStat = GetHighestStatId(battlerAtk);
if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN && (atkHighestStat == STAT_ATK || atkHighestStat == STAT_SPATK))
if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN
&& ((IS_MOVE_PHYSICAL(move) && atkHighestStat == STAT_ATK) || (IS_MOVE_SPECIAL(move) && atkHighestStat == STAT_SPATK)))
modifier = uq4_12_multiply(modifier, UQ_4_12(1.3));
}
break;
@ -8823,16 +8846,16 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
}
if (IsAbilityOnField(ABILITY_VESSEL_OF_RUIN) && atkAbility != ABILITY_VESSEL_OF_RUIN && IS_MOVE_SPECIAL(gCurrentMove))
modifier = uq4_12_multiply(modifier, UQ_4_12(0.25));
modifier = uq4_12_multiply(modifier, UQ_4_12(0.75));
if (IsAbilityOnField(ABILITY_SWORD_OF_RUIN) && defAbility != ABILITY_SWORD_OF_RUIN && IS_MOVE_PHYSICAL(gCurrentMove))
modifier = uq4_12_multiply(modifier, UQ_4_12(0.25));
modifier = uq4_12_multiply(modifier, UQ_4_12(1.25));
if (IsAbilityOnField(ABILITY_TABLETS_OF_RUIN) && atkAbility != ABILITY_TABLETS_OF_RUIN && IS_MOVE_PHYSICAL(gCurrentMove))
modifier = uq4_12_multiply(modifier, UQ_4_12(0.25));
modifier = uq4_12_multiply(modifier, UQ_4_12(0.75));
if (IsAbilityOnField(ABILITY_BEADS_OF_RUIN) && defAbility != ABILITY_BEADS_OF_RUIN && IS_MOVE_SPECIAL(gCurrentMove))
modifier = uq4_12_multiply(modifier, UQ_4_12(0.25));
modifier = uq4_12_multiply(modifier, UQ_4_12(1.25));
// attacker partner's abilities
if (IsBattlerAlive(BATTLE_PARTNER(battlerAtk)))
@ -8882,14 +8905,16 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
case ABILITY_PROTOSYNTHESIS:
{
u8 defHighestStat = GetHighestStatId(battlerDef);
if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT && (defHighestStat == STAT_DEF || defHighestStat == STAT_SPDEF))
if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT
&& ((IS_MOVE_PHYSICAL(move) && defHighestStat == STAT_DEF) || (IS_MOVE_SPECIAL(move) && defHighestStat == STAT_SPDEF)))
modifier = uq4_12_multiply(modifier, UQ_4_12(0.7));
}
break;
case ABILITY_QUARK_DRIVE:
{
u8 defHighestStat = GetHighestStatId(battlerDef);
if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN && (defHighestStat == STAT_DEF || defHighestStat == STAT_SPDEF))
if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN
&& ((IS_MOVE_PHYSICAL(move) && defHighestStat == STAT_DEF) || (IS_MOVE_SPECIAL(move) && defHighestStat == STAT_SPDEF)))
modifier = uq4_12_multiply(modifier, UQ_4_12(0.7));
}
break;
@ -8933,10 +8958,6 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
#endif
modifier = uq4_12_multiply(modifier, holdEffectModifier);
break;
case HOLD_EFFECT_GEMS:
if (gSpecialStatuses[battlerAtk].gemBoost && gBattleMons[battlerAtk].item)
modifier = uq4_12_multiply(modifier, UQ_4_12(1.0) + sPercentToModifier[gSpecialStatuses[battlerAtk].gemParam]);
break;
case HOLD_EFFECT_BUG_POWER:
case HOLD_EFFECT_STEEL_POWER:
case HOLD_EFFECT_GROUND_POWER:
@ -9027,6 +9048,8 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
// various effects
if (gProtectStructs[battlerAtk].helpingHand)
modifier = uq4_12_multiply(modifier, UQ_4_12(1.5));
if (gSpecialStatuses[battlerAtk].gemBoost)
modifier = uq4_12_multiply(modifier, UQ_4_12(1.0) + sPercentToModifier[gSpecialStatuses[battlerAtk].gemParam]);
if (gStatuses3[battlerAtk] & STATUS3_CHARGED_UP && moveType == TYPE_ELECTRIC)
modifier = uq4_12_multiply(modifier, UQ_4_12(2.0));
if (gStatuses3[battlerAtk] & STATUS3_ME_FIRST)
@ -9423,6 +9446,8 @@ static u32 CalcFinalDmg(u32 dmg, u16 move, u8 battlerAtk, u8 battlerDef, u8 move
u32 defSide = GET_BATTLER_SIDE(battlerDef);
uq4_12_t finalModifier = UQ_4_12(1.0);
u16 itemDef = gBattleMons[battlerDef].item;
u16 holdEffectAtk = GetBattlerHoldEffect(battlerAtk, TRUE);
u16 holdEffectDef = GetBattlerHoldEffect(battlerDef, TRUE);
// check multiple targets in double battle
if (GetMoveTargetCount(move, battlerAtk, battlerDef) >= 2)
@ -9452,28 +9477,15 @@ static u32 CalcFinalDmg(u32 dmg, u16 move, u8 battlerAtk, u8 battlerDef, u8 move
dmg = ApplyModifier(UQ_4_12(0.5), dmg);
// check frostbite
if (gBattleMons[battlerAtk].status1 & STATUS1_FROSTBITE && !IS_MOVE_PHYSICAL(move)
if (gBattleMons[battlerAtk].status1 & STATUS1_FROSTBITE && IS_MOVE_SPECIAL(move)
#if B_BURN_FACADE_DMG >= GEN_6
&& gBattleMoves[move].effect != EFFECT_FACADE
#endif
&& abilityAtk != ABILITY_GUTS)
dmg = ApplyModifier(UQ_4_12(0.5), dmg);
// check sunny/rain weather
if (IsBattlerWeatherAffected(battlerAtk, B_WEATHER_RAIN))
{
if (moveType == TYPE_FIRE)
dmg = ApplyModifier(UQ_4_12(0.5), dmg);
else if (moveType == TYPE_WATER)
dmg = ApplyModifier(UQ_4_12(1.5), dmg);
}
else if (IsBattlerWeatherAffected(battlerAtk, B_WEATHER_SUN))
{
if (moveType == TYPE_FIRE || gBattleMoves[move].effect == EFFECT_HYDRO_STEAM)
dmg = ApplyModifier(UQ_4_12(1.5), dmg);
else if (moveType == TYPE_WATER)
dmg = ApplyModifier(UQ_4_12(0.5), dmg);
}
// check weather
dmg = ApplyWeatherDamageMultiplier(battlerAtk, move, moveType, dmg, holdEffectAtk, holdEffectDef);
// check stab
if (IS_BATTLER_OF_TYPE(battlerAtk, moveType) && move != MOVE_STRUGGLE && move != MOVE_NONE)
@ -9484,6 +9496,10 @@ static u32 CalcFinalDmg(u32 dmg, u16 move, u8 battlerAtk, u8 battlerDef, u8 move
finalModifier = uq4_12_multiply(finalModifier, UQ_4_12(1.5));
}
// Collision Course, Electro Drift
if (gBattleMoves[move].effect == EFFECT_COLLISION_COURSE && typeEffectivenessModifier >= UQ_4_12(2.0))
finalModifier = uq4_12_multiply(finalModifier, UQ_4_12(1.3333));
// reflect, light screen, aurora veil
if (((gSideStatuses[defSide] & SIDE_STATUS_REFLECT && IS_MOVE_PHYSICAL(move))
|| (gSideStatuses[defSide] & SIDE_STATUS_LIGHTSCREEN && IS_MOVE_SPECIAL(move))
@ -9558,7 +9574,7 @@ static u32 CalcFinalDmg(u32 dmg, u16 move, u8 battlerAtk, u8 battlerDef, u8 move
}
// attacker's hold effect
switch (GetBattlerHoldEffect(battlerAtk, TRUE))
switch (holdEffectAtk)
{
case HOLD_EFFECT_METRONOME:
percentBoost = min((gBattleStruct->sameMoveTurns[battlerAtk] * GetBattlerHoldEffectParam(battlerAtk)), 100);
@ -9574,7 +9590,7 @@ static u32 CalcFinalDmg(u32 dmg, u16 move, u8 battlerAtk, u8 battlerDef, u8 move
}
// target's hold effect
switch (GetBattlerHoldEffect(battlerDef, TRUE))
switch (holdEffectDef)
{
// berries reducing dmg
case HOLD_EFFECT_RESIST_BERRY:
@ -10148,8 +10164,8 @@ bool32 TryBattleFormChange(u8 battlerId, u16 method)
if (targetSpecies != SPECIES_NONE)
{
// Saves the original species on the first form change for the player.
if (side == B_SIDE_PLAYER && gBattleStruct->changedSpecies[monId] == SPECIES_NONE)
gBattleStruct->changedSpecies[monId] = gBattleMons[battlerId].species;
if (gBattleStruct->changedSpecies[side][monId] == SPECIES_NONE)
gBattleStruct->changedSpecies[side][monId] = gBattleMons[battlerId].species;
TryToSetBattleFormChangeMoves(&party[monId], method);
SetMonData(&party[monId], MON_DATA_SPECIES, &targetSpecies);
@ -10157,7 +10173,7 @@ bool32 TryBattleFormChange(u8 battlerId, u16 method)
RecalcBattlerStats(battlerId, &party[monId]);
return TRUE;
}
else if (gBattleStruct->changedSpecies[monId] != SPECIES_NONE)
else if (gBattleStruct->changedSpecies[side][monId] != SPECIES_NONE)
{
bool8 restoreSpecies = FALSE;
@ -10173,7 +10189,7 @@ bool32 TryBattleFormChange(u8 battlerId, u16 method)
{
// Reverts the original species
TryToSetBattleFormChangeMoves(&party[monId], method);
SetMonData(&party[monId], MON_DATA_SPECIES, &gBattleStruct->changedSpecies[monId]);
SetMonData(&party[monId], MON_DATA_SPECIES, &gBattleStruct->changedSpecies[side][monId]);
RecalcBattlerStats(battlerId, &party[monId]);
return TRUE;
}
@ -10761,6 +10777,34 @@ bool32 IsBattlerWeatherAffected(u8 battlerId, u32 weatherFlags)
return FALSE;
}
// Utility Umbrella holders take normal damage from what would be rain- and sun-weakened attacks.
u32 ApplyWeatherDamageMultiplier(u8 battlerAtk, u16 move, u8 moveType, u32 dmg, u16 holdEffectAtk, u16 holdEffectDef)
{
if (WEATHER_HAS_EFFECT)
{
if (gBattleMoves[move].effect == EFFECT_HYDRO_STEAM && (gBattleWeather & B_WEATHER_SUN) && holdEffectAtk != HOLD_EFFECT_UTILITY_UMBRELLA)
dmg = ApplyModifier(UQ_4_12(1.5), dmg);
else if (holdEffectDef != HOLD_EFFECT_UTILITY_UMBRELLA)
{
if (gBattleWeather & B_WEATHER_RAIN)
{
if (moveType == TYPE_FIRE)
dmg = ApplyModifier(UQ_4_12(0.5), dmg);
else if (moveType == TYPE_WATER)
dmg = ApplyModifier(UQ_4_12(1.5), dmg);
}
else if (gBattleWeather & B_WEATHER_SUN)
{
if (moveType == TYPE_FIRE)
dmg = ApplyModifier(UQ_4_12(1.5), dmg);
else if (moveType == TYPE_WATER)
dmg = ApplyModifier(UQ_4_12(0.5), dmg);
}
}
}
return dmg;
}
// Gets move target before redirection effects etc. are applied
// Possible return values are defined in battle.h following MOVE_TARGET_SELECTED
u32 GetBattlerMoveTargetType(u8 battlerId, u16 move)
@ -10785,35 +10829,19 @@ bool32 CanTargetBattler(u8 battlerAtk, u8 battlerDef, u16 move)
static void SetRandomMultiHitCounter()
{
#if (B_MULTI_HIT_CHANCE >= GEN_5)
// Based on Gen 5's odds
// 35% for 2 hits
// 35% for 3 hits
// 15% for 4 hits
// 15% for 5 hits
gMultiHitCounter = Random() % 100;
if (gMultiHitCounter < 35)
gMultiHitCounter = 2;
else if (gMultiHitCounter < 35 + 35)
gMultiHitCounter = 3;
else if (gMultiHitCounter < 35 + 35 + 15)
gMultiHitCounter = 4;
else
gMultiHitCounter = 5;
#else
// 2 and 3 hits: 37.5%
// 4 and 5 hits: 12.5%
gMultiHitCounter = Random() % 4;
if (gMultiHitCounter > 1)
gMultiHitCounter = (Random() % 4) + 2;
else
gMultiHitCounter += 2;
#endif
if (gMultiHitCounter < 4 && GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_LOADED_DICE)
if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_LOADED_DICE)
{
// If roll 4 or 5 Loaded Dice doesn't do anything. Otherwise it rolls the number of hits as 5 minus a random integer from 0 to 1 inclusive.
gMultiHitCounter = 5 - (Random() & 1);
gMultiHitCounter = RandomUniform(RNG_LOADED_DICE, 4, 5);
}
else
{
#if B_MULTI_HIT_CHANCE >= GEN_5
// 35%: 2 hits, 35%: 3 hits, 15% 4 hits, 15% 5 hits.
gMultiHitCounter = RandomWeighted(RNG_HITS, 0, 0, 7, 7, 3, 3);
#else
// 37.5%: 2 hits, 37.5%: 3 hits, 12.5% 4 hits, 12.5% 5 hits.
gMultiHitCounter = RandomWeighted(RNG_HITS, 0, 0, 3, 3, 1, 1);
#endif
}
}

View File

@ -13137,7 +13137,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
[MOVE_SPIN_OUT] =
{
.effect = EFFECT_PLACEHOLDER, // EFFECT_SPIN_OUT
.effect = EFFECT_SPIN_OUT,
.power = 100,
.type = TYPE_STEEL,
.accuracy = 100,
@ -13371,12 +13371,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
[MOVE_MAKE_IT_RAIN] =
{
.effect = EFFECT_PLACEHOLDER, // EFFECT_MAKE_IT_RAIN
.effect = EFFECT_MAKE_IT_RAIN,
.power = 120,
.type = TYPE_STEEL,
.accuracy = 100,
.pp = 5,
.secondaryEffectChance = 0,
.secondaryEffectChance = 100,
.target = MOVE_TARGET_BOTH,
.priority = 0,
.split = SPLIT_SPECIAL,
@ -13401,7 +13401,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
[MOVE_COLLISION_COURSE] =
{
.effect = EFFECT_PLACEHOLDER, // EFFECT_COLLISION_COURSE
.effect = EFFECT_COLLISION_COURSE,
.power = 100,
.type = TYPE_FIGHTING,
.accuracy = 100,
@ -13417,7 +13417,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
[MOVE_ELECTRO_DRIFT] =
{
.effect = EFFECT_PLACEHOLDER, // EFFECT_COLLISION_COURSE
.effect = EFFECT_COLLISION_COURSE,
.power = 100,
.type = TYPE_ELECTRIC,
.accuracy = 100,

View File

@ -369,14 +369,19 @@ const u32 gMonFrontPic_Minun[] = INCBIN_U32("graphics/pokemon/minun/anim_front.4
const u32 gMonFrontPic_Volbeat[] = INCBIN_U32("graphics/pokemon/volbeat/anim_front.4bpp.lz");
const u32 gMonFrontPic_Illumise[] = INCBIN_U32("graphics/pokemon/illumise/anim_front.4bpp.lz");
const u32 gMonFrontPic_Roselia[] = INCBIN_U32("graphics/pokemon/roselia/anim_front.4bpp.lz");
const u32 gMonFrontPic_RoseliaF[] = INCBIN_U32("graphics/pokemon/roselia/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Gulpin[] = INCBIN_U32("graphics/pokemon/gulpin/anim_front.4bpp.lz");
const u32 gMonFrontPic_GulpinF[] = INCBIN_U32("graphics/pokemon/gulpin/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Swalot[] = INCBIN_U32("graphics/pokemon/swalot/anim_front.4bpp.lz");
const u32 gMonFrontPic_SwalotF[] = INCBIN_U32("graphics/pokemon/swalot/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Carvanha[] = INCBIN_U32("graphics/pokemon/carvanha/anim_front.4bpp.lz");
const u32 gMonFrontPic_Sharpedo[] = INCBIN_U32("graphics/pokemon/sharpedo/anim_front.4bpp.lz");
const u32 gMonFrontPic_Wailmer[] = INCBIN_U32("graphics/pokemon/wailmer/anim_front.4bpp.lz");
const u32 gMonFrontPic_Wailord[] = INCBIN_U32("graphics/pokemon/wailord/anim_front.4bpp.lz");
const u32 gMonFrontPic_Numel[] = INCBIN_U32("graphics/pokemon/numel/anim_front.4bpp.lz");
const u32 gMonFrontPic_NumelF[] = INCBIN_U32("graphics/pokemon/numel/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Camerupt[] = INCBIN_U32("graphics/pokemon/camerupt/anim_front.4bpp.lz");
const u32 gMonFrontPic_CameruptF[] = INCBIN_U32("graphics/pokemon/camerupt/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Torkoal[] = INCBIN_U32("graphics/pokemon/torkoal/anim_front.4bpp.lz");
const u32 gMonFrontPic_Spoink[] = INCBIN_U32("graphics/pokemon/spoink/anim_front.4bpp.lz");
const u32 gMonFrontPic_Grumpig[] = INCBIN_U32("graphics/pokemon/grumpig/anim_front.4bpp.lz");
@ -386,6 +391,7 @@ const u32 gMonFrontPic_Vibrava[] = INCBIN_U32("graphics/pokemon/vibrava/anim_fro
const u32 gMonFrontPic_Flygon[] = INCBIN_U32("graphics/pokemon/flygon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Cacnea[] = INCBIN_U32("graphics/pokemon/cacnea/anim_front.4bpp.lz");
const u32 gMonFrontPic_Cacturne[] = INCBIN_U32("graphics/pokemon/cacturne/anim_front.4bpp.lz");
const u32 gMonFrontPic_CacturneF[] = INCBIN_U32("graphics/pokemon/cacturne/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Swablu[] = INCBIN_U32("graphics/pokemon/swablu/anim_front.4bpp.lz");
const u32 gMonFrontPic_Altaria[] = INCBIN_U32("graphics/pokemon/altaria/anim_front.4bpp.lz");
const u32 gMonFrontPic_Zangoose[] = INCBIN_U32("graphics/pokemon/zangoose/anim_front.4bpp.lz");
@ -404,6 +410,7 @@ const u32 gMonFrontPic_Anorith[] = INCBIN_U32("graphics/pokemon/anorith/anim_fro
const u32 gMonFrontPic_Armaldo[] = INCBIN_U32("graphics/pokemon/armaldo/anim_front.4bpp.lz");
const u32 gMonFrontPic_Feebas[] = INCBIN_U32("graphics/pokemon/feebas/anim_front.4bpp.lz");
const u32 gMonFrontPic_Milotic[] = INCBIN_U32("graphics/pokemon/milotic/anim_front.4bpp.lz");
const u32 gMonFrontPic_MiloticF[] = INCBIN_U32("graphics/pokemon/milotic/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Castform[] = INCBIN_U32("graphics/pokemon/castform/anim_front.4bpp.lz");
const u32 gMonFrontPic_Kecleon[] = INCBIN_U32("graphics/pokemon/kecleon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Shuppet[] = INCBIN_U32("graphics/pokemon/shuppet/anim_front.4bpp.lz");
@ -423,6 +430,7 @@ const u32 gMonFrontPic_Clamperl[] = INCBIN_U32("graphics/pokemon/clamperl/anim_f
const u32 gMonFrontPic_Huntail[] = INCBIN_U32("graphics/pokemon/huntail/anim_front.4bpp.lz");
const u32 gMonFrontPic_Gorebyss[] = INCBIN_U32("graphics/pokemon/gorebyss/anim_front.4bpp.lz");
const u32 gMonFrontPic_Relicanth[] = INCBIN_U32("graphics/pokemon/relicanth/anim_front.4bpp.lz");
const u32 gMonFrontPic_RelicanthF[] = INCBIN_U32("graphics/pokemon/relicanth/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Luvdisc[] = INCBIN_U32("graphics/pokemon/luvdisc/anim_front.4bpp.lz");
const u32 gMonFrontPic_Bagon[] = INCBIN_U32("graphics/pokemon/bagon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Shelgon[] = INCBIN_U32("graphics/pokemon/shelgon/anim_front.4bpp.lz");
@ -459,6 +467,7 @@ const u32 gMonFrontPic_StaraptorF[] = INCBIN_U32("graphics/pokemon/staraptor/ani
const u32 gMonFrontPic_Bidoof[] = INCBIN_U32("graphics/pokemon/bidoof/anim_front.4bpp.lz");
const u32 gMonFrontPic_BidoofF[] = INCBIN_U32("graphics/pokemon/bidoof/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Bibarel[] = INCBIN_U32("graphics/pokemon/bibarel/anim_front.4bpp.lz");
const u32 gMonFrontPic_BibarelF[] = INCBIN_U32("graphics/pokemon/bibarel/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Kricketot[] = INCBIN_U32("graphics/pokemon/kricketot/anim_front.4bpp.lz");
const u32 gMonFrontPic_KricketotF[] = INCBIN_U32("graphics/pokemon/kricketot/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Kricketune[] = INCBIN_U32("graphics/pokemon/kricketune/anim_front.4bpp.lz");
@ -466,9 +475,12 @@ const u32 gMonFrontPic_KricketuneF[] = INCBIN_U32("graphics/pokemon/kricketune/a
const u32 gMonFrontPic_Shinx[] = INCBIN_U32("graphics/pokemon/shinx/anim_front.4bpp.lz");
const u32 gMonFrontPic_ShinxF[] = INCBIN_U32("graphics/pokemon/shinx/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Luxio[] = INCBIN_U32("graphics/pokemon/luxio/anim_front.4bpp.lz");
const u32 gMonFrontPic_LuxioF[] = INCBIN_U32("graphics/pokemon/luxio/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Luxray[] = INCBIN_U32("graphics/pokemon/luxray/anim_front.4bpp.lz");
const u32 gMonFrontPic_LuxrayF[] = INCBIN_U32("graphics/pokemon/luxray/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Budew[] = INCBIN_U32("graphics/pokemon/budew/anim_front.4bpp.lz");
const u32 gMonFrontPic_Roserade[] = INCBIN_U32("graphics/pokemon/roserade/anim_front.4bpp.lz");
const u32 gMonFrontPic_RoseradeF[] = INCBIN_U32("graphics/pokemon/roserade/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Cranidos[] = INCBIN_U32("graphics/pokemon/cranidos/anim_front.4bpp.lz");
const u32 gMonFrontPic_Rampardos[] = INCBIN_U32("graphics/pokemon/rampardos/anim_front.4bpp.lz");
const u32 gMonFrontPic_Shieldon[] = INCBIN_U32("graphics/pokemon/shieldon/anim_front.4bpp.lz");
@ -479,6 +491,7 @@ const u32 gMonFrontPic_Mothim[] = INCBIN_U32("graphics/pokemon/mothim/anim_front
const u32 gMonFrontPic_Combee[] = INCBIN_U32("graphics/pokemon/combee/anim_front.4bpp.lz");
const u32 gMonFrontPic_Vespiquen[] = INCBIN_U32("graphics/pokemon/vespiquen/anim_front.4bpp.lz");
const u32 gMonFrontPic_Pachirisu[] = INCBIN_U32("graphics/pokemon/pachirisu/anim_front.4bpp.lz");
const u32 gMonFrontPic_PachirisuF[] = INCBIN_U32("graphics/pokemon/pachirisu/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Buizel[] = INCBIN_U32("graphics/pokemon/buizel/anim_front.4bpp.lz");
const u32 gMonFrontPic_Floatzel[] = INCBIN_U32("graphics/pokemon/floatzel/anim_front.4bpp.lz");
const u32 gMonFrontPic_Cherubi[] = INCBIN_U32("graphics/pokemon/cherubi/anim_front.4bpp.lz");
@ -519,13 +532,19 @@ const u32 gMonFrontPic_Hippowdon[] = INCBIN_U32("graphics/pokemon/hippowdon/anim
const u32 gMonFrontPic_Skorupi[] = INCBIN_U32("graphics/pokemon/skorupi/anim_front.4bpp.lz");
const u32 gMonFrontPic_Drapion[] = INCBIN_U32("graphics/pokemon/drapion/anim_front.4bpp.lz");
const u32 gMonFrontPic_Croagunk[] = INCBIN_U32("graphics/pokemon/croagunk/anim_front.4bpp.lz");
const u32 gMonFrontPic_CroagunkF[] = INCBIN_U32("graphics/pokemon/croagunk/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Toxicroak[] = INCBIN_U32("graphics/pokemon/toxicroak/anim_front.4bpp.lz");
const u32 gMonFrontPic_ToxicroakF[] = INCBIN_U32("graphics/pokemon/toxicroak/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Carnivine[] = INCBIN_U32("graphics/pokemon/carnivine/anim_front.4bpp.lz");
const u32 gMonFrontPic_Finneon[] = INCBIN_U32("graphics/pokemon/finneon/anim_front.4bpp.lz");
const u32 gMonFrontPic_FinneonF[] = INCBIN_U32("graphics/pokemon/finneon/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Lumineon[] = INCBIN_U32("graphics/pokemon/lumineon/anim_front.4bpp.lz");
const u32 gMonFrontPic_LumineonF[] = INCBIN_U32("graphics/pokemon/lumineon/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Mantyke[] = INCBIN_U32("graphics/pokemon/mantyke/anim_front.4bpp.lz");
const u32 gMonFrontPic_Snover[] = INCBIN_U32("graphics/pokemon/snover/anim_front.4bpp.lz");
const u32 gMonFrontPic_SnoverF[] = INCBIN_U32("graphics/pokemon/snover/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Abomasnow[] = INCBIN_U32("graphics/pokemon/abomasnow/anim_front.4bpp.lz");
const u32 gMonFrontPic_AbomasnowF[] = INCBIN_U32("graphics/pokemon/abomasnow/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Weavile[] = INCBIN_U32("graphics/pokemon/weavile/anim_front.4bpp.lz");
const u32 gMonFrontPic_WeavileF[] = INCBIN_U32("graphics/pokemon/weavile/anim_frontf.4bpp.lz");
const u32 gMonFrontPic_Magnezone[] = INCBIN_U32("graphics/pokemon/magnezone/anim_front.4bpp.lz");
@ -1641,14 +1660,19 @@ const u32 gMonBackPic_Minun[] = INCBIN_U32("graphics/pokemon/minun/back.4bpp.lz"
const u32 gMonBackPic_Volbeat[] = INCBIN_U32("graphics/pokemon/volbeat/back.4bpp.lz");
const u32 gMonBackPic_Illumise[] = INCBIN_U32("graphics/pokemon/illumise/back.4bpp.lz");
const u32 gMonBackPic_Roselia[] = INCBIN_U32("graphics/pokemon/roselia/back.4bpp.lz");
const u32 gMonBackPic_RoseliaF[] = INCBIN_U32("graphics/pokemon/roselia/backf.4bpp.lz");
const u32 gMonBackPic_Gulpin[] = INCBIN_U32("graphics/pokemon/gulpin/back.4bpp.lz");
const u32 gMonBackPic_GulpinF[] = INCBIN_U32("graphics/pokemon/gulpin/backf.4bpp.lz");
const u32 gMonBackPic_Swalot[] = INCBIN_U32("graphics/pokemon/swalot/back.4bpp.lz");
const u32 gMonBackPic_SwalotF[] = INCBIN_U32("graphics/pokemon/swalot/backf.4bpp.lz");
const u32 gMonBackPic_Carvanha[] = INCBIN_U32("graphics/pokemon/carvanha/back.4bpp.lz");
const u32 gMonBackPic_Sharpedo[] = INCBIN_U32("graphics/pokemon/sharpedo/back.4bpp.lz");
const u32 gMonBackPic_Wailmer[] = INCBIN_U32("graphics/pokemon/wailmer/back.4bpp.lz");
const u32 gMonBackPic_Wailord[] = INCBIN_U32("graphics/pokemon/wailord/back.4bpp.lz");
const u32 gMonBackPic_Numel[] = INCBIN_U32("graphics/pokemon/numel/back.4bpp.lz");
const u32 gMonBackPic_NumelF[] = INCBIN_U32("graphics/pokemon/numel/backf.4bpp.lz");
const u32 gMonBackPic_Camerupt[] = INCBIN_U32("graphics/pokemon/camerupt/back.4bpp.lz");
const u32 gMonBackPic_CameruptF[] = INCBIN_U32("graphics/pokemon/camerupt/backf.4bpp.lz");
const u32 gMonBackPic_Torkoal[] = INCBIN_U32("graphics/pokemon/torkoal/back.4bpp.lz");
const u32 gMonBackPic_Spoink[] = INCBIN_U32("graphics/pokemon/spoink/back.4bpp.lz");
const u32 gMonBackPic_Grumpig[] = INCBIN_U32("graphics/pokemon/grumpig/back.4bpp.lz");
@ -1676,6 +1700,7 @@ const u32 gMonBackPic_Anorith[] = INCBIN_U32("graphics/pokemon/anorith/back.4bpp
const u32 gMonBackPic_Armaldo[] = INCBIN_U32("graphics/pokemon/armaldo/back.4bpp.lz");
const u32 gMonBackPic_Feebas[] = INCBIN_U32("graphics/pokemon/feebas/back.4bpp.lz");
const u32 gMonBackPic_Milotic[] = INCBIN_U32("graphics/pokemon/milotic/back.4bpp.lz");
const u32 gMonBackPic_MiloticF[] = INCBIN_U32("graphics/pokemon/milotic/backf.4bpp.lz");
const u32 gMonBackPic_Castform[] = INCBIN_U32("graphics/pokemon/castform/back.4bpp.lz");
const u32 gMonBackPic_Kecleon[] = INCBIN_U32("graphics/pokemon/kecleon/back.4bpp.lz");
const u32 gMonBackPic_Shuppet[] = INCBIN_U32("graphics/pokemon/shuppet/back.4bpp.lz");
@ -1695,6 +1720,7 @@ const u32 gMonBackPic_Clamperl[] = INCBIN_U32("graphics/pokemon/clamperl/back.4b
const u32 gMonBackPic_Huntail[] = INCBIN_U32("graphics/pokemon/huntail/back.4bpp.lz");
const u32 gMonBackPic_Gorebyss[] = INCBIN_U32("graphics/pokemon/gorebyss/back.4bpp.lz");
const u32 gMonBackPic_Relicanth[] = INCBIN_U32("graphics/pokemon/relicanth/back.4bpp.lz");
const u32 gMonBackPic_RelicanthF[] = INCBIN_U32("graphics/pokemon/relicanth/backf.4bpp.lz");
const u32 gMonBackPic_Luvdisc[] = INCBIN_U32("graphics/pokemon/luvdisc/back.4bpp.lz");
const u32 gMonBackPic_Bagon[] = INCBIN_U32("graphics/pokemon/bagon/back.4bpp.lz");
const u32 gMonBackPic_Shelgon[] = INCBIN_U32("graphics/pokemon/shelgon/back.4bpp.lz");
@ -1737,9 +1763,12 @@ const u32 gMonBackPic_KricketuneF[] = INCBIN_U32("graphics/pokemon/kricketune/ba
const u32 gMonBackPic_Shinx[] = INCBIN_U32("graphics/pokemon/shinx/back.4bpp.lz");
const u32 gMonBackPic_ShinxF[] = INCBIN_U32("graphics/pokemon/shinx/backf.4bpp.lz");
const u32 gMonBackPic_Luxio[] = INCBIN_U32("graphics/pokemon/luxio/back.4bpp.lz");
const u32 gMonBackPic_LuxioF[] = INCBIN_U32("graphics/pokemon/luxio/backf.4bpp.lz");
const u32 gMonBackPic_Luxray[] = INCBIN_U32("graphics/pokemon/luxray/back.4bpp.lz");
const u32 gMonBackPic_LuxrayF[] = INCBIN_U32("graphics/pokemon/luxray/backf.4bpp.lz");
const u32 gMonBackPic_Budew[] = INCBIN_U32("graphics/pokemon/budew/back.4bpp.lz");
const u32 gMonBackPic_Roserade[] = INCBIN_U32("graphics/pokemon/roserade/back.4bpp.lz");
const u32 gMonBackPic_RoseradeF[] = INCBIN_U32("graphics/pokemon/roserade/backf.4bpp.lz");
const u32 gMonBackPic_Cranidos[] = INCBIN_U32("graphics/pokemon/cranidos/back.4bpp.lz");
const u32 gMonBackPic_Rampardos[] = INCBIN_U32("graphics/pokemon/rampardos/back.4bpp.lz");
const u32 gMonBackPic_Shieldon[] = INCBIN_U32("graphics/pokemon/shieldon/back.4bpp.lz");
@ -1751,7 +1780,9 @@ const u32 gMonBackPic_Combee[] = INCBIN_U32("graphics/pokemon/combee/back.4bpp.l
const u32 gMonBackPic_Vespiquen[] = INCBIN_U32("graphics/pokemon/vespiquen/back.4bpp.lz");
const u32 gMonBackPic_Pachirisu[] = INCBIN_U32("graphics/pokemon/pachirisu/back.4bpp.lz");
const u32 gMonBackPic_Buizel[] = INCBIN_U32("graphics/pokemon/buizel/back.4bpp.lz");
const u32 gMonBackPic_BuizelF[] = INCBIN_U32("graphics/pokemon/buizel/backf.4bpp.lz");
const u32 gMonBackPic_Floatzel[] = INCBIN_U32("graphics/pokemon/floatzel/back.4bpp.lz");
const u32 gMonBackPic_FloatzelF[] = INCBIN_U32("graphics/pokemon/floatzel/backf.4bpp.lz");
const u32 gMonBackPic_Cherubi[] = INCBIN_U32("graphics/pokemon/cherubi/back.4bpp.lz");
const u32 gMonBackPic_Cherrim[] = INCBIN_U32("graphics/pokemon/cherrim/normal/back.4bpp.lz");
const u32 gMonBackPic_Shellos[] = INCBIN_U32("graphics/pokemon/shellos/back.4bpp.lz");
@ -1789,12 +1820,17 @@ const u32 gMonBackPic_Hippowdon[] = INCBIN_U32("graphics/pokemon/hippowdon/back.
const u32 gMonBackPic_Skorupi[] = INCBIN_U32("graphics/pokemon/skorupi/back.4bpp.lz");
const u32 gMonBackPic_Drapion[] = INCBIN_U32("graphics/pokemon/drapion/back.4bpp.lz");
const u32 gMonBackPic_Croagunk[] = INCBIN_U32("graphics/pokemon/croagunk/back.4bpp.lz");
const u32 gMonBackPic_CroagunkF[] = INCBIN_U32("graphics/pokemon/croagunk/backf.4bpp.lz");
const u32 gMonBackPic_Toxicroak[] = INCBIN_U32("graphics/pokemon/toxicroak/back.4bpp.lz");
const u32 gMonBackPic_ToxicroakF[] = INCBIN_U32("graphics/pokemon/toxicroak/backf.4bpp.lz");
const u32 gMonBackPic_Carnivine[] = INCBIN_U32("graphics/pokemon/carnivine/back.4bpp.lz");
const u32 gMonBackPic_Finneon[] = INCBIN_U32("graphics/pokemon/finneon/back.4bpp.lz");
const u32 gMonBackPic_FinneonF[] = INCBIN_U32("graphics/pokemon/finneon/backf.4bpp.lz");
const u32 gMonBackPic_Lumineon[] = INCBIN_U32("graphics/pokemon/lumineon/back.4bpp.lz");
const u32 gMonBackPic_LumineonF[] = INCBIN_U32("graphics/pokemon/lumineon/backf.4bpp.lz");
const u32 gMonBackPic_Mantyke[] = INCBIN_U32("graphics/pokemon/mantyke/back.4bpp.lz");
const u32 gMonBackPic_Snover[] = INCBIN_U32("graphics/pokemon/snover/back.4bpp.lz");
const u32 gMonBackPic_SnoverF[] = INCBIN_U32("graphics/pokemon/snover/backf.4bpp.lz");
const u32 gMonBackPic_Abomasnow[] = INCBIN_U32("graphics/pokemon/abomasnow/back.4bpp.lz");
const u32 gMonBackPic_Weavile[] = INCBIN_U32("graphics/pokemon/weavile/back.4bpp.lz");
const u32 gMonBackPic_WeavileF[] = INCBIN_U32("graphics/pokemon/weavile/backf.4bpp.lz");

View File

@ -6,6 +6,12 @@
#define EVO_HELD_ITEM_FIELD_FUNC ItemUseOutOfBattle_CannotUse
#endif
#if I_GEM_BOOST_POWER >= GEN_5
#define GEM_BOOST_PARAM 30
#else
#define GEM_BOOST_PARAM 50
#endif
const struct Item gItems[] =
{
[ITEM_NONE] =
@ -4416,7 +4422,7 @@ const struct Item gItems[] =
.itemId = ITEM_NORMAL_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sNormalGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4430,7 +4436,7 @@ const struct Item gItems[] =
.itemId = ITEM_FIRE_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sFireGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4444,7 +4450,7 @@ const struct Item gItems[] =
.itemId = ITEM_WATER_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sWaterGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4458,7 +4464,7 @@ const struct Item gItems[] =
.itemId = ITEM_ELECTRIC_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sElectricGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4472,7 +4478,7 @@ const struct Item gItems[] =
.itemId = ITEM_GRASS_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sGrassGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4486,7 +4492,7 @@ const struct Item gItems[] =
.itemId = ITEM_ICE_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sIceGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4500,7 +4506,7 @@ const struct Item gItems[] =
.itemId = ITEM_FIGHTING_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sFightingGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4514,7 +4520,7 @@ const struct Item gItems[] =
.itemId = ITEM_POISON_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sPoisonGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4528,7 +4534,7 @@ const struct Item gItems[] =
.itemId = ITEM_GROUND_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sGroundGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4542,7 +4548,7 @@ const struct Item gItems[] =
.itemId = ITEM_FLYING_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sFlyingGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4556,7 +4562,7 @@ const struct Item gItems[] =
.itemId = ITEM_PSYCHIC_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sPsychicGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4570,7 +4576,7 @@ const struct Item gItems[] =
.itemId = ITEM_BUG_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sBugGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4584,7 +4590,7 @@ const struct Item gItems[] =
.itemId = ITEM_ROCK_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sRockGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4598,7 +4604,7 @@ const struct Item gItems[] =
.itemId = ITEM_GHOST_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sGhostGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4612,7 +4618,7 @@ const struct Item gItems[] =
.itemId = ITEM_DRAGON_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sDragonGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4626,7 +4632,7 @@ const struct Item gItems[] =
.itemId = ITEM_DARK_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sDarkGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4640,7 +4646,7 @@ const struct Item gItems[] =
.itemId = ITEM_STEEL_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sSteelGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,
@ -4654,7 +4660,7 @@ const struct Item gItems[] =
.itemId = ITEM_FAIRY_GEM,
.price = 4000,
.holdEffect = HOLD_EFFECT_GEMS,
.holdEffectParam = 30,
.holdEffectParam = GEM_BOOST_PARAM,
.description = sFairyGemDesc,
.pocket = POCKET_ITEMS,
.type = ITEM_USE_BAG_MENU,

View File

@ -480,7 +480,7 @@ const struct MonCoords gMonBackPicCoords[NUM_SPECIES + 1] =
[SPECIES_CROAGUNK] = { .size = MON_COORDS_SIZE(56, 56), .y_offset = 6 },
[SPECIES_TOXICROAK] = { .size = MON_COORDS_SIZE(56, 56), .y_offset = 6 },
[SPECIES_CARNIVINE] = { .size = MON_COORDS_SIZE(64, 56), .y_offset = 6 },
[SPECIES_FINNEON] = { .size = MON_COORDS_SIZE(56, 40), .y_offset = 13 },
[SPECIES_FINNEON] = { .size = MON_COORDS_SIZE(56, 40), .y_offset = 12 },
[SPECIES_LUMINEON] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 0 },
[SPECIES_MANTYKE] = { .size = MON_COORDS_SIZE(64, 56), .y_offset = 6 },
[SPECIES_SNOVER] = { .size = MON_COORDS_SIZE(64, 56), .y_offset = 6 },

View File

@ -1345,7 +1345,6 @@ const struct CompressedSpriteSheet gMonBackPicTableFemale[NUM_SPECIES + 1] =
SPECIES_SPRITE(RATTATA, gMonBackPic_RattataF),
SPECIES_SPRITE(RATICATE, gMonBackPic_RaticateF),
SPECIES_SPRITE(PIKACHU, gMonBackPic_PikachuF),
SPECIES_SPRITE(RAICHU, gMonBackPic_Raichu),
SPECIES_SPRITE(ZUBAT, gMonBackPic_ZubatF),
SPECIES_SPRITE(GOLBAT, gMonBackPic_GolbatF),
SPECIES_SPRITE(GLOOM, gMonBackPic_GloomF),
@ -1359,14 +1358,12 @@ const struct CompressedSpriteSheet gMonBackPicTableFemale[NUM_SPECIES + 1] =
SPECIES_SPRITE(RHYDON, gMonBackPic_RhydonF),
SPECIES_SPRITE(GOLDEEN, gMonBackPic_GoldeenF),
SPECIES_SPRITE(SEAKING, gMonBackPic_SeakingF),
SPECIES_SPRITE(SCYTHER, gMonBackPic_Scyther),
SPECIES_SPRITE(MAGIKARP, gMonBackPic_MagikarpF),
SPECIES_SPRITE(GYARADOS, gMonBackPic_GyaradosF),
SPECIES_SPRITE(EEVEE, gMonBackPic_EeveeF),
SPECIES_SPRITE(MEGANIUM, gMonBackPic_MeganiumF),
SPECIES_SPRITE(LEDYBA, gMonBackPic_LedybaF),
SPECIES_SPRITE(LEDIAN, gMonBackPic_LedianF),
SPECIES_SPRITE(XATU, gMonBackPic_Xatu),
SPECIES_SPRITE(SUDOWOODO, gMonBackPic_SudowoodoF),
SPECIES_SPRITE(POLITOED, gMonBackPic_PolitoedF),
SPECIES_SPRITE(AIPOM, gMonBackPic_AipomF),
@ -1377,7 +1374,6 @@ const struct CompressedSpriteSheet gMonBackPicTableFemale[NUM_SPECIES + 1] =
SPECIES_SPRITE(GIRAFARIG, gMonBackPic_GirafarigF),
SPECIES_SPRITE(GLIGAR, gMonBackPic_GligarF),
SPECIES_SPRITE(STEELIX, gMonBackPic_SteelixF),
SPECIES_SPRITE(SCIZOR, gMonBackPic_Scizor),
SPECIES_SPRITE(HERACROSS, gMonBackPic_HeracrossF),
SPECIES_SPRITE(SNEASEL, gMonBackPic_SneaselF),
SPECIES_SPRITE(URSARING, gMonBackPic_UrsaringF),
@ -1395,6 +1391,13 @@ const struct CompressedSpriteSheet gMonBackPicTableFemale[NUM_SPECIES + 1] =
SPECIES_SPRITE(SHIFTRY, gMonBackPic_ShiftryF),
SPECIES_SPRITE(MEDITITE, gMonBackPic_MedititeF),
SPECIES_SPRITE(MEDICHAM, gMonBackPic_MedichamF),
SPECIES_SPRITE(ROSELIA, gMonBackPic_RoseliaF),
SPECIES_SPRITE(GULPIN, gMonBackPic_GulpinF),
SPECIES_SPRITE(SWALOT, gMonBackPic_SwalotF),
SPECIES_SPRITE(NUMEL, gMonBackPic_NumelF),
SPECIES_SPRITE(CAMERUPT, gMonBackPic_CameruptF),
SPECIES_SPRITE(MILOTIC, gMonBackPic_MiloticF),
SPECIES_SPRITE(RELICANTH, gMonBackPic_RelicanthF),
#if P_GEN_4_POKEMON == TRUE
SPECIES_SPRITE(STARLY, gMonBackPic_StarlyF),
@ -1404,17 +1407,21 @@ const struct CompressedSpriteSheet gMonBackPicTableFemale[NUM_SPECIES + 1] =
SPECIES_SPRITE(KRICKETOT, gMonBackPic_KricketotF),
SPECIES_SPRITE(KRICKETUNE, gMonBackPic_KricketuneF),
SPECIES_SPRITE(SHINX, gMonBackPic_ShinxF),
SPECIES_SPRITE(COMBEE, gMonBackPic_Combee),
SPECIES_SPRITE(LUXIO, gMonBackPic_LuxioF),
SPECIES_SPRITE(LUXRAY, gMonBackPic_LuxrayF),
SPECIES_SPRITE(ROSERADE, gMonBackPic_RoseradeF),
SPECIES_SPRITE(BUIZEL, gMonBackPic_BuizelF),
SPECIES_SPRITE(FLOATZEL, gMonBackPic_FloatzelF),
SPECIES_SPRITE(AMBIPOM, gMonBackPic_AmbipomF),
SPECIES_SPRITE(GIBLE, gMonBackPic_GibleF),
SPECIES_SPRITE(GABITE, gMonBackPic_GabiteF),
SPECIES_SPRITE(GARCHOMP, gMonBackPic_Garchomp),
SPECIES_SPRITE(HIPPOPOTAS, gMonBackPic_Hippopotas),
SPECIES_SPRITE(HIPPOWDON, gMonBackPic_Hippowdon),
SPECIES_SPRITE(CROAGUNK, gMonBackPic_CroagunkF),
SPECIES_SPRITE(TOXICROAK, gMonBackPic_ToxicroakF),
SPECIES_SPRITE(FINNEON, gMonBackPic_FinneonF),
SPECIES_SPRITE(LUMINEON, gMonBackPic_LumineonF),
SPECIES_SPRITE(SNOVER, gMonBackPic_SnoverF),
SPECIES_SPRITE(WEAVILE, gMonBackPic_WeavileF),
SPECIES_SPRITE(RHYPERIOR, gMonBackPic_RhyperiorF),
SPECIES_SPRITE(TANGROWTH, gMonBackPic_Tangrowth),
SPECIES_SPRITE(MAMOSWINE, gMonBackPic_Mamoswine),
#endif
#if P_GEN_5_POKEMON == TRUE
SPECIES_SPRITE(UNFEZANT, gMonBackPic_UnfezantF),

View File

@ -1384,7 +1384,6 @@ const struct CompressedSpriteSheet gMonFrontPicTableFemale[NUM_SPECIES + 1] =
SPECIES_SPRITE(OCTILLERY, gMonFrontPic_OctilleryF),
SPECIES_SPRITE(HOUNDOOM, gMonFrontPic_HoundoomF),
SPECIES_SPRITE(DONPHAN, gMonFrontPic_DonphanF),
SPECIES_SPRITE(TORCHIC, gMonFrontPic_Torchic),
SPECIES_SPRITE(COMBUSKEN, gMonFrontPic_CombuskenF),
SPECIES_SPRITE(BLAZIKEN, gMonFrontPic_BlazikenF),
SPECIES_SPRITE(BEAUTIFLY, gMonFrontPic_BeautiflyF),
@ -1394,18 +1393,37 @@ const struct CompressedSpriteSheet gMonFrontPicTableFemale[NUM_SPECIES + 1] =
SPECIES_SPRITE(SHIFTRY, gMonFrontPic_ShiftryF),
SPECIES_SPRITE(MEDITITE, gMonFrontPic_MedititeF),
SPECIES_SPRITE(MEDICHAM, gMonFrontPic_MedichamF),
SPECIES_SPRITE(ROSELIA, gMonFrontPic_RoseliaF),
SPECIES_SPRITE(GULPIN, gMonFrontPic_GulpinF),
SPECIES_SPRITE(SWALOT, gMonFrontPic_SwalotF),
SPECIES_SPRITE(NUMEL, gMonFrontPic_NumelF),
SPECIES_SPRITE(CAMERUPT, gMonFrontPic_CameruptF),
SPECIES_SPRITE(CACTURNE, gMonFrontPic_CacturneF),
SPECIES_SPRITE(MILOTIC, gMonFrontPic_MiloticF),
SPECIES_SPRITE(RELICANTH, gMonFrontPic_RelicanthF),
#if P_GEN_4_POKEMON == TRUE
SPECIES_SPRITE(STARLY, gMonFrontPic_StarlyF),
SPECIES_SPRITE(STARAVIA, gMonFrontPic_StaraviaF),
SPECIES_SPRITE(STARAPTOR, gMonFrontPic_StaraptorF),
SPECIES_SPRITE(BIDOOF, gMonFrontPic_BidoofF),
SPECIES_SPRITE(BIBAREL, gMonFrontPic_BibarelF),
SPECIES_SPRITE(KRICKETOT, gMonFrontPic_KricketotF),
SPECIES_SPRITE(KRICKETUNE, gMonFrontPic_KricketuneF),
SPECIES_SPRITE(SHINX, gMonFrontPic_ShinxF),
SPECIES_SPRITE(LUXIO, gMonFrontPic_LuxioF),
SPECIES_SPRITE(LUXRAY, gMonFrontPic_LuxrayF),
SPECIES_SPRITE(ROSERADE, gMonFrontPic_RoseradeF),
SPECIES_SPRITE(AMBIPOM, gMonFrontPic_AmbipomF),
SPECIES_SPRITE(PACHIRISU, gMonFrontPic_PachirisuF),
SPECIES_SPRITE(GIBLE, gMonFrontPic_GibleF),
SPECIES_SPRITE(GABITE, gMonFrontPic_GabiteF),
SPECIES_SPRITE(GARCHOMP, gMonFrontPic_GarchompF),
SPECIES_SPRITE(CROAGUNK, gMonFrontPic_CroagunkF),
SPECIES_SPRITE(TOXICROAK, gMonFrontPic_ToxicroakF),
SPECIES_SPRITE(FINNEON, gMonFrontPic_FinneonF),
SPECIES_SPRITE(LUMINEON, gMonFrontPic_LumineonF),
SPECIES_SPRITE(SNOVER, gMonFrontPic_SnoverF),
SPECIES_SPRITE(ABOMASNOW, gMonFrontPic_AbomasnowF),
SPECIES_SPRITE(WEAVILE, gMonFrontPic_WeavileF),
SPECIES_SPRITE(RHYPERIOR, gMonFrontPic_RhyperiorF),
SPECIES_SPRITE(TANGROWTH, gMonFrontPic_TangrowthF),

View File

@ -91,6 +91,7 @@ enum { // Util
DEBUG_UTIL_MENU_ITEM_TRAINER_ID,
DEBUG_UTIL_MENU_ITEM_CLEAR_BOXES,
DEBUG_UTIL_MENU_ITEM_CHEAT,
DEBUG_UTIL_MENU_ITEM_HATCH_AN_EGG,
};
enum { // Scripts
DEBUG_UTIL_MENU_ITEM_SCRIPT_1,
@ -211,6 +212,8 @@ enum { //Sound
#define DEBUG_NUMBER_ICON_X 210
#define DEBUG_NUMBER_ICON_Y 50
#define DEBUG_MAX_MENU_ITEMS 50
// *******************************
struct DebugMonData
{
@ -234,7 +237,7 @@ struct DebugMonData
struct DebugMenuListData
{
struct ListMenuItem listItems[20 + 1];
u8 itemNames[PC_ITEMS_COUNT + 1][26];
u8 itemNames[DEBUG_MAX_MENU_ITEMS + 1][26];
u8 listId;
};
@ -312,6 +315,7 @@ static void DebugAction_Util_Trainer_Gender(u8 taskId);
static void DebugAction_Util_Trainer_Id(u8 taskId);
static void DebugAction_Util_Clear_Boxes(u8 taskId);
static void DebugAction_Util_CheatStart(u8 taskId);
static void DebugAction_Util_HatchAnEgg(u8 taskId);
static void DebugAction_FlagsVars_Flags(u8 taskId);
static void DebugAction_FlagsVars_FlagsSelect(u8 taskId);
@ -381,6 +385,7 @@ extern u8 Debug_Script_8[];
extern u8 Debug_ShowFieldMessageStringVar4[];
extern u8 Debug_CheatStart[];
extern u8 Debug_HatchAnEgg[];
extern u8 PlayersHouse_2F_EventScript_SetWallClock[];
extern u8 PlayersHouse_2F_EventScript_CheckWallClock[];
extern u8 Debug_CheckSaveBlock[];
@ -436,6 +441,7 @@ static const u8 sDebugText_Util_Trainer_Gender[] = _("Toggle T. Gender"
static const u8 sDebugText_Util_Trainer_Id[] = _("New Trainer Id");
static const u8 sDebugText_Util_Clear_Boxes[] = _("Clear Storage Boxes");
static const u8 sDebugText_Util_CheatStart[] = _("CHEAT Start");
static const u8 sDebugText_Util_HatchAnEgg[] = _("Hatch an Egg");
// Flags/Vars Menu
static const u8 sDebugText_FlagsVars_Flags[] = _("Set Flag XYZ…{CLEAR_TO 110}{RIGHT_ARROW}");
static const u8 sDebugText_FlagsVars_Flag[] = _("Flag: {STR_VAR_1}{CLEAR_TO 90}\n{STR_VAR_2}{CLEAR_TO 90}\n{STR_VAR_3}");
@ -597,6 +603,7 @@ static const struct ListMenuItem sDebugMenu_Items_Utilities[] =
[DEBUG_UTIL_MENU_ITEM_TRAINER_ID] = {sDebugText_Util_Trainer_Id, DEBUG_UTIL_MENU_ITEM_TRAINER_ID},
[DEBUG_UTIL_MENU_ITEM_CLEAR_BOXES] = {sDebugText_Util_Clear_Boxes, DEBUG_UTIL_MENU_ITEM_CLEAR_BOXES},
[DEBUG_UTIL_MENU_ITEM_CHEAT] = {sDebugText_Util_CheatStart, DEBUG_UTIL_MENU_ITEM_CHEAT},
[DEBUG_UTIL_MENU_ITEM_HATCH_AN_EGG] = {sDebugText_Util_HatchAnEgg, DEBUG_UTIL_MENU_ITEM_HATCH_AN_EGG},
};
static const struct ListMenuItem sDebugMenu_Items_Scripts[] =
{
@ -729,6 +736,7 @@ static void (*const sDebugMenu_Actions_Utilities[])(u8) =
[DEBUG_UTIL_MENU_ITEM_TRAINER_ID] = DebugAction_Util_Trainer_Id,
[DEBUG_UTIL_MENU_ITEM_CLEAR_BOXES] = DebugAction_Util_Clear_Boxes,
[DEBUG_UTIL_MENU_ITEM_CHEAT] = DebugAction_Util_CheatStart,
[DEBUG_UTIL_MENU_ITEM_HATCH_AN_EGG] = DebugAction_Util_HatchAnEgg,
};
static void (*const sDebugMenu_Actions_Scripts[])(u8) =
{
@ -1132,6 +1140,8 @@ static void Debug_RefreshListMenu(u8 taskId)
totalItems = 7;
}
// Failsafe to prevent memory corruption
totalItems = min(totalItems, DEBUG_MAX_MENU_ITEMS);
// Copy item names for all entries but the last (which is Cancel)
for(i = 0; i < totalItems; i++)
{
@ -1976,6 +1986,10 @@ static void DebugAction_Util_CheatStart(u8 taskId)
{
Debug_DestroyMenu_Full_Script(taskId, Debug_CheatStart);
}
static void DebugAction_Util_HatchAnEgg(u8 taskId)
{
Debug_DestroyMenu_Full_Script(taskId, Debug_HatchAnEgg);
}
// *******************************
// Actions Scripts

View File

@ -8549,7 +8549,7 @@ bool32 TryFormChange(u32 monId, u32 side, u16 method)
targetSpecies = GetFormChangeTargetSpecies(&party[monId], method, 0);
if (targetSpecies == SPECIES_NONE && gBattleStruct != NULL)
targetSpecies = gBattleStruct->changedSpecies[monId];
targetSpecies = gBattleStruct->changedSpecies[side][monId];
if (targetSpecies != SPECIES_NONE)
{

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