diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c381b50f1b..930d20a018 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,6 +3,14 @@ ## Description +## Images + + + +## Issue(s) that this PR fixes + + + ## **Discord contact info** - - \ No newline at end of file + + \ No newline at end of file diff --git a/Makefile b/Makefile index 8e3ff29753..87bd771b08 100644 --- a/Makefile +++ b/Makefile @@ -142,6 +142,7 @@ ROMTESTHYDRA := tools/mgba-rom-test-hydra/mgba-rom-test-hydra$(EXE) PERL := perl +# Inclusive list. If you don't want a tool to be built, don't add it here. TOOLDIRS := tools/aif2pcm tools/bin2c tools/gbafix tools/gbagfx tools/jsonproc tools/mapjson tools/mid2agb tools/preproc tools/ramscrgen tools/rsfont tools/scaninc CHECKTOOLDIRS = tools/patchelf tools/mgba-rom-test-hydra TOOLBASE = $(TOOLDIRS:tools/%=%) @@ -464,7 +465,7 @@ LD_SCRIPT_TEST := ld_script_test.txt $(OBJ_DIR)/ld_script_test.ld: $(LD_SCRIPT_TEST) $(LD_SCRIPT_DEPS) cd $(OBJ_DIR) && sed "s#tools/#../../tools/#g" ../../$(LD_SCRIPT_TEST) > ld_script_test.ld -$(TESTELF): $(OBJ_DIR)/ld_script_test.ld $(OBJS) $(TEST_OBJS) libagbsyscall check-tools +$(TESTELF): $(OBJ_DIR)/ld_script_test.ld $(OBJS) $(TEST_OBJS) libagbsyscall tools check-tools @echo "cd $(OBJ_DIR) && $(LD) -T ld_script_test.ld -o ../../$@ " @cd $(OBJ_DIR) && $(LD) $(TESTLDFLAGS) -T ld_script_test.ld -o ../../$@ $(OBJS_REL) $(TEST_OBJS_REL) $(LIB) $(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent diff --git a/asm/macros/battle_anim_script.inc b/asm/macros/battle_anim_script.inc index a98a344fa1..85320bd3b8 100644 --- a/asm/macros/battle_anim_script.inc +++ b/asm/macros/battle_anim_script.inc @@ -271,6 +271,50 @@ .byte 0x2f .endm + @ same as createvisualtask except takes in battlerargindex, which is the battle anim arg index of the battler to loop through + .macro createvisualtaskontargets addr:req, priority:req, battlerargindex:req, argv:vararg + .byte 0x30 + .4byte \addr + .byte \priority + .byte \battlerargindex + .byte (.Lcreatetask_\@_2 - .Lcreatetask_\@_1) / 2 @ num_args +.Lcreatetask_\@_1: + .2byte \argv +.Lcreatetask_\@_2: + .endm + + @ same as createsprite except takes in battlerargindex, which is the battle anim arg index of the battler to loop through + .macro createspriteontargets template:req, anim_battler:req, subpriority_offset:req, battlerargindex:req, argv:vararg + .byte 0x31 + .4byte \template + .if \anim_battler == ANIM_TARGET + .byte 0x80 | (\subpriority_offset & 0x7F) + .else + .byte (\subpriority_offset & 0x7F) + .endif + .byte \battlerargindex + .byte (.Lsprite_\@_2 - .Lsprite_\@_1) / 2 +.Lsprite_\@_1: + .2byte \argv +.Lsprite_\@_2: + .endm + + @ does not overwrite gBattleAnimArgs[battlerargindex], some sprite templates are too dependent on the value (e.g. heal block) + .macro createspriteontargets_onpos template:req, anim_battler:req, subpriority_offset:req, battlerargindex:req, argv:vararg + .byte 0x32 + .4byte \template + .if \anim_battler == ANIM_TARGET + .byte 0x80 | (\subpriority_offset & 0x7F) + .else + .byte (\subpriority_offset & 0x7F) + .endif + .byte \battlerargindex + .byte (.Lsprite_\@_2 - .Lsprite_\@_1) / 2 +.Lsprite_\@_1: + .2byte \argv +.Lsprite_\@_2: + .endm + @ useful macros .macro jumpreteq value:req, ptr:req jumpargeq ARG_RET_ID, \value, \ptr diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index c20305fe33..62542e2683 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -3,9 +3,9 @@ .byte 0x0 .endm - .macro accuracycheck failPtr:req, move:req + .macro accuracycheck failInstr:req, move:req .byte 0x1 - .4byte \failPtr + .4byte \failInstr .2byte \move .endm @@ -116,11 +116,11 @@ .4byte NULL .endm - .macro tryfaintmon_spikes battler:req, ptr:req + .macro tryfaintmon_spikes battler:req, instr:req .byte 0x19 .byte \battler .byte TRUE - .4byte \ptr + .4byte \instr .endm .macro dofaintanimation battler:req @@ -133,65 +133,65 @@ .byte \battler .endm - .macro jumpifstatus battler:req, status1:req, ptr:req + .macro jumpifstatus battler:req, flags:req, jumpInstr:req .byte 0x1c .byte \battler - .4byte \status1 - .4byte \ptr + .4byte \flags + .4byte \jumpInstr .endm - .macro jumpifstatus2 battler:req, status2:req, ptr:req + .macro jumpifstatus2 battler:req, flags:req, jumpInstr:req .byte 0x1d .byte \battler - .4byte \status2 - .4byte \ptr + .4byte \flags + .4byte \jumpInstr .endm - .macro jumpifability battler:req, ability:req, ptr:req + .macro jumpifability battler:req, ability:req, jumpInstr:req .byte 0x1e .byte \battler .2byte \ability - .4byte \ptr + .4byte \jumpInstr .endm - .macro jumpifsideaffecting battler:req, sidestatus:req, ptr:req + .macro jumpifsideaffecting battler:req, flags:req, jumpInstr:req .byte 0x1f .byte \battler - .4byte \sidestatus - .4byte \ptr + .4byte \flags + .4byte \jumpInstr .endm - .macro jumpifstat battler:req, ifflag:req, stat:req, value:req, ptr + .macro jumpifstat battler:req, comparison:req, stat:req, value:req, jumpInstr:req .byte 0x20 .byte \battler - .byte \ifflag + .byte \comparison .byte \stat .byte \value - .4byte \ptr + .4byte \jumpInstr .endm - .macro jumpifstatus3condition battler:req, status3:req, condition:req, ptr:req + .macro jumpifstatus3condition battler:req, flags:req, jumpIfTrue:req, jumpInstr:req .byte 0x21 .byte \battler - .4byte \status3 - .byte \condition - .4byte \ptr + .4byte \flags + .byte \jumpIfTrue + .4byte \jumpInstr .endm - .macro jumpbasedontype battler:req, type:req, case:req, ptr:req + .macro jumpbasedontype battler:req, type:req, jumpIfType:req, jumpInstr:req .byte 0x22 .byte \battler .byte \type - .byte \case - .4byte \ptr + .byte \jumpIfType + .4byte \jumpInstr .endm - .macro jumpiftype battler:req, type:req, ptr:req - jumpbasedontype \battler, \type, 1, \ptr + .macro jumpiftype battler:req, type:req, jumpInstr:req + jumpbasedontype \battler, \type, TRUE, \jumpInstr .endm - .macro jumpifnottype battler:req, type:req, ptr:req - jumpbasedontype \battler, \type, 0, \ptr + .macro jumpifnottype battler:req, type:req, jumpInstr:req + jumpbasedontype \battler, \type, FALSE, \jumpInstr .endm .macro getexp battler:req @@ -199,9 +199,9 @@ .byte \battler .endm - .macro checkteamslost ptr:req + .macro checkteamslost jumpInstr:req .byte 0x24 - .4byte \ptr + .4byte \jumpInstr .endm .macro movevaluescleanup @@ -213,72 +213,72 @@ .byte \value .endm - .macro decrementmultihit value:req + .macro decrementmultihit loopInstr:req .byte 0x27 - .4byte \value + .4byte \loopInstr .endm - .macro goto ptr:req + .macro goto instr:req .byte 0x28 - .4byte \ptr + .4byte \instr .endm - .macro jumpifbyte ifflag:req, val:req, byte:req, ptr:req + .macro jumpifbyte comparison:req, bytePtr:req, value:req, jumpInstr:req .byte 0x29 - .byte \ifflag - .4byte \val - .byte \byte - .4byte \ptr + .byte \comparison + .4byte \bytePtr + .byte \value + .4byte \jumpInstr .endm - .macro jumpifhalfword ifflag:req, val:req, hword:req, ptr:req + .macro jumpifhalfword comparison:req, halfwordPtr:req, value:req, jumpInstr:req .byte 0x2a - .byte \ifflag - .4byte \val - .2byte \hword - .4byte \ptr + .byte \comparison + .4byte \halfwordPtr + .2byte \value + .4byte \jumpInstr .endm - .macro jumpifword ifflag:req, val:req, word:req, ptr:req + .macro jumpifword comparison:req, wordPtr:req, value:req, jumpInstr:req .byte 0x2b - .byte \ifflag - .4byte \val - .4byte \word - .4byte \ptr + .byte \comparison + .4byte \wordPtr + .4byte \value + .4byte \jumpInstr .endm - .macro jumpifarrayequal val1:req, val2:req, size:req, ptr:req + .macro jumpifarrayequal array1:req, array2:req, size:req, jumpInstr:req .byte 0x2c - .4byte \val1 - .4byte \val2 + .4byte \array1 + .4byte \array2 .byte \size - .4byte \ptr + .4byte \jumpInstr .endm - .macro jumpifarraynotequal val1:req, val2:req, size:req, ptr:req + .macro jumpifarraynotequal array1:req, array2:req, size:req, jumpInstr:req .byte 0x2d - .4byte \val1 - .4byte \val2 + .4byte \array1 + .4byte \array2 .byte \size - .4byte \ptr + .4byte \jumpInstr .endm - .macro setbyte ptr:req, byte:req + .macro setbyte bytePtr:req, value:req .byte 0x2e - .4byte \ptr - .byte \byte + .4byte \bytePtr + .byte \value .endm - .macro addbyte ptr:req, byte:req + .macro addbyte bytePtr:req, value:req .byte 0x2f - .4byte \ptr - .byte \byte + .4byte \bytePtr + .byte \value .endm - .macro subbyte ptr:req, byte:req + .macro subbyte bytePtr:req, value:req .byte 0x30 - .4byte \ptr - .byte \byte + .4byte \bytePtr + .byte \value .endm .macro copyarray dest:req, src:req, size:req @@ -288,53 +288,53 @@ .byte \size .endm - .macro copyarraywithindex dest:req, src:req, index:req, size:req + .macro copyarraywithindex dest:req, src:req, indexPtr:req, size:req .byte 0x32 .4byte \dest .4byte \src - .4byte \index + .4byte \indexPtr .byte \size .endm - .macro orbyte ptr:req, byte:req + .macro orbyte bytePtr:req, value:req .byte 0x33 - .4byte \ptr - .byte \byte + .4byte \bytePtr + .byte \value .endm - .macro orhalfword ptr:req, hword:req + .macro orhalfword halfwordPtr:req, value:req .byte 0x34 - .4byte \ptr - .2byte \hword + .4byte \halfwordPtr + .2byte \value .endm - .macro orword ptr:req, word:req + .macro orword wordPtr:req, value:req .byte 0x35 - .4byte \ptr - .4byte \word + .4byte \wordPtr + .4byte \value .endm - .macro bicbyte ptr:req, byte:req + .macro bicbyte bytePtr:req, value:req .byte 0x36 - .4byte \ptr - .byte \byte + .4byte \bytePtr + .byte \value .endm - .macro bichalfword ptr:req, hword:req + .macro bichalfword halfwordPtr:req, value:req .byte 0x37 - .4byte \ptr - .2byte \hword + .4byte \halfwordPtr + .2byte \value .endm - .macro bicword ptr:req, word:req + .macro bicword wordPtr:req, value:req .byte 0x38 - .4byte \ptr - .4byte \word + .4byte \wordPtr + .4byte \value .endm - .macro pause time:req + .macro pause frames:req .byte 0x39 - .2byte \time + .2byte \frames .endm .macro waitstate @@ -362,53 +362,53 @@ .byte 0x3f .endm - .macro jumpifaffectedbyprotect ptr:req + .macro jumpifaffectedbyprotect failInstr:req .byte 0x40 - .4byte \ptr + .4byte \failInstr .endm - .macro call ptr:req + .macro call instr:req .byte 0x41 - .4byte \ptr + .4byte \instr .endm .macro setroost .byte 0x42 .endm - .macro jumpifabilitypresent ability:req, ptr:req + .macro jumpifabilitypresent ability:req, jumpInstr:req .byte 0x43 .2byte \ability - .4byte \ptr + .4byte \jumpInstr .endm .macro endselectionscript .byte 0x44 .endm - .macro playanimation battler:req, animType:req, arg=NULL + .macro playanimation battler:req, animId:req, argPtr=NULL .byte 0x45 .byte \battler - .byte \animType - .4byte \arg + .byte \animId + .4byte \argPtr .endm - .macro playanimation_var battler:req, animType:req, arg=NULL + .macro playanimation_var battler:req, animIdPtr:req, argPtr=NULL .byte 0x46 .byte \battler - .4byte \animType - .4byte \arg + .4byte \animIdPtr + .4byte \argPtr .endm .macro setgraphicalstatchangevalues .byte 0x47 .endm - .macro playstatchangeanimation battler:req, stats:req, statchange:req + .macro playstatchangeanimation battler:req, stats:req, flags:req .byte 0x48 .byte \battler .byte \stats - .byte \statchange + .byte \flags .endm .macro moveend endMode:req, endState:req @@ -449,9 +449,9 @@ moveend 2, \to .endm - .macro sethealblock ptr:req + .macro sethealblock failInstr:req .byte 0x4a - .4byte \ptr + .4byte \failInstr .endm .macro returnatktoball @@ -468,22 +468,22 @@ .byte \battler .endm - .macro switchinanim battler:req, dontclearsubstitutebit:req + .macro switchinanim battler:req, dontClearSubstitute:req .byte 0x4e .byte \battler - .byte \dontclearsubstitutebit + .byte \dontClearSubstitute .endm - .macro jumpifcantswitch battler:req, ptr:req + .macro jumpifcantswitch battler:req, jumpInstr:req .byte 0x4f .byte \battler - .4byte \ptr + .4byte \jumpInstr .endm - .macro openpartyscreen battler:req, ptr:req + .macro openpartyscreen battler:req, failInstr:req .byte 0x50 .byte \battler - .4byte \ptr + .4byte \failInstr .endm .macro switchhandleorder battler:req, state:req @@ -526,21 +526,21 @@ .byte \battler .endm - .macro handlelearnnewmove learnedMovePtr:req, nothingToLearnPtr:req, isFirstMove:req + .macro handlelearnnewmove learnedMoveInstr:req, nothingToLearnInstr:req, isFirstMove:req .byte 0x59 - .4byte \learnedMovePtr - .4byte \nothingToLearnPtr + .4byte \learnedMoveInstr + .4byte \nothingToLearnInstr .byte \isFirstMove .endm - .macro yesnoboxlearnmove forgotMovePtr:req + .macro yesnoboxlearnmove forgotMoveInstr:req .byte 0x5a - .4byte \forgotMovePtr + .4byte \forgotMoveInstr .endm - .macro yesnoboxstoplearningmove noPtr:req + .macro yesnoboxstoplearningmove noInstr:req .byte 0x5b - .4byte \noPtr + .4byte \noInstr .endm .macro hitanimation battler:req @@ -607,9 +607,9 @@ .byte 0x68 .endm - .macro setgravity ptr:req + .macro setgravity failInstr:req .byte 0x69 - .4byte \ptr + .4byte \failInstr .endm .macro removeitem battler:req @@ -647,9 +647,9 @@ .byte 0x71 .endm - .macro jumpifplayerran ptr:req + .macro jumpifplayerran jumpInstr:req .byte 0x72 - .4byte \ptr + .4byte \jumpInstr .endm .macro hpthresholds battler:req @@ -684,14 +684,14 @@ .byte 0x79 .endm - .macro jumpifnexttargetvalid ptr:req + .macro jumpifnexttargetvalid jumpInstr:req .byte 0x7a - .4byte \ptr + .4byte \jumpInstr .endm - .macro tryhealhalfhealth ptr:req, battler:req + .macro tryhealhalfhealth failInstr:req, battler:req .byte 0x7b - .4byte \ptr + .4byte \failInstr .byte \battler .endm @@ -716,24 +716,24 @@ .byte \mode .endm - .macro trysetrest ptr:req + .macro trysetrest failInstr:req .byte 0x81 - .4byte \ptr + .4byte \failInstr .endm - .macro jumpifnotfirstturn ptr:req + .macro jumpifnotfirstturn jumpInstr:req .byte 0x82 - .4byte \ptr + .4byte \jumpInstr .endm - .macro setmiracleeye ptr:req + .macro setmiracleeye failInstr:req .byte 0x83 - .4byte \ptr + .4byte \failInstr .endm - .macro jumpifuproarwakes ptr:req + .macro jumpifuproarwakes jumpInstr:req .byte 0x84 - .4byte \ptr + .4byte \jumpInstr .endm .macro stockpile id:req @@ -741,24 +741,24 @@ .byte \id .endm - .macro stockpiletobasedamage ptr:req + .macro stockpiletobasedamage failInstr:req .byte 0x86 - .4byte \ptr + .4byte \failInstr .endm - .macro stockpiletohpheal ptr:req + .macro stockpiletohpheal failInstr:req .byte 0x87 - .4byte \ptr + .4byte \failInstr .endm .macro setdrainedhp .byte 0x88 .endm - .macro statbuffchange flags:req, jumpptr:req + .macro statbuffchange flags:req, failInstr:req .byte 0x89 .2byte \flags - .4byte \jumpptr + .4byte \failInstr .endm .macro normalisebuffs @@ -773,23 +773,23 @@ .byte 0x8c .endm - .macro setmultihitcounter val:req + .macro setmultihitcounter value:req .byte 0x8d - .byte \val + .byte \value .endm .macro initmultihitstring .byte 0x8e .endm - .macro forcerandomswitch ptr:req + .macro forcerandomswitch failInstr:req .byte 0x8f - .4byte \ptr + .4byte \failInstr .endm - .macro tryconversiontypechange ptr:req + .macro tryconversiontypechange failInstr:req .byte 0x90 - .4byte \ptr + .4byte \failInstr .endm .macro givepaydaymoney @@ -800,9 +800,9 @@ .byte 0x92 .endm - .macro tryKO ptr:req + .macro tryKO failInstr:req .byte 0x93 - .4byte \ptr + .4byte \failInstr .endm .macro damagetohalftargethp @@ -817,9 +817,9 @@ .byte 0x96 .endm - .macro tryinfatuating ptr:req + .macro tryinfatuating failInstr:req .byte 0x97 - .4byte \ptr + .4byte \failInstr .endm .macro updatestatusicon battler:req @@ -843,9 +843,9 @@ .byte 0x9c .endm - .macro mimicattackcopy ptr:req + .macro mimicattackcopy failInstr:req .byte 0x9d - .4byte \ptr + .4byte \failInstr .endm .macro metronome @@ -860,48 +860,48 @@ .byte 0xa0 .endm - .macro counterdamagecalculator ptr:req + .macro counterdamagecalculator failInstr:req .byte 0xa1 - .4byte \ptr + .4byte \failInstr .endm - .macro mirrorcoatdamagecalculator ptr:req + .macro mirrorcoatdamagecalculator failInstr:req .byte 0xa2 - .4byte \ptr + .4byte \failInstr .endm - .macro disablelastusedattack ptr:req + .macro disablelastusedattack failInstr:req .byte 0xa3 - .4byte \ptr + .4byte \failInstr .endm - .macro trysetencore ptr:req + .macro trysetencore failInstr:req .byte 0xa4 - .4byte \ptr + .4byte \failInstr .endm - .macro painsplitdmgcalc ptr:req + .macro painsplitdmgcalc failInstr:req .byte 0xa5 - .4byte \ptr + .4byte \failInstr .endm - .macro settypetorandomresistance ptr:req + .macro settypetorandomresistance failInstr:req .byte 0xa6 - .4byte \ptr + .4byte \failInstr .endm .macro setalwayshitflag .byte 0xa7 .endm - .macro copymovepermanently ptr:req + .macro copymovepermanently failInstr:req .byte 0xa8 - .4byte \ptr + .4byte \failInstr .endm - .macro trychoosesleeptalkmove ptr:req + .macro trychoosesleeptalkmove failInstr:req .byte 0xa9 - .4byte \ptr + .4byte \failInstr .endm .macro setdestinybond @@ -912,56 +912,56 @@ .byte 0xab .endm - .macro settailwind ptr:req + .macro settailwind failInstr:req .byte 0xac - .4byte \ptr + .4byte \failInstr .endm - .macro tryspiteppreduce ptr:req + .macro tryspiteppreduce failInstr:req .byte 0xad - .4byte \ptr + .4byte \failInstr .endm .macro healpartystatus .byte 0xae .endm - .macro cursetarget ptr:req + .macro cursetarget failInstr:req .byte 0xaf - .4byte \ptr + .4byte \failInstr .endm - .macro trysetspikes ptr:req + .macro trysetspikes failInstr:req .byte 0xb0 - .4byte \ptr + .4byte \failInstr .endm .macro setforesight .byte 0xb1 .endm - .macro trysetperishsong ptr:req + .macro trysetperishsong failInstr:req .byte 0xb2 - .4byte \ptr + .4byte \failInstr .endm .macro handlerollout .byte 0xb3 .endm - .macro jumpifconfusedandstatmaxed stat:req, ptr:req + .macro jumpifconfusedandstatmaxed stat:req, jumpInstr:req .byte 0xb4 .byte \stat - .4byte \ptr + .4byte \jumpInstr .endm .macro handlefurycutter .byte 0xb5 .endm - .macro setembargo ptr:req + .macro setembargo failInstr:req .byte 0xb6 - .4byte \ptr + .4byte \failInstr .endm .macro presentdamagecalculation @@ -976,23 +976,23 @@ .byte 0xb9 .endm - .macro jumpifnopursuitswitchdmg ptr:req + .macro jumpifnopursuitswitchdmg jumpInstr:req .byte 0xba - .4byte \ptr + .4byte \jumpInstr .endm .macro setsunny .byte 0xbb .endm - .macro maxattackhalvehp ptr:req + .macro maxattackhalvehp failInstr:req .byte 0xbc - .4byte \ptr + .4byte \failInstr .endm - .macro copyfoestats ptr:req + .macro copyfoestats unused:req .byte 0xbd - .4byte \ptr + .4byte \unused .endm .macro rapidspinfree @@ -1003,29 +1003,29 @@ .byte 0xbf .endm - .macro recoverbasedonsunlight ptr:req + .macro recoverbasedonsunlight failInstr:req .byte 0xc0 - .4byte \ptr + .4byte \failInstr .endm - .macro setstickyweb ptr:req + .macro setstickyweb failInstr:req .byte 0xc1 - .4byte \ptr + .4byte \failInstr .endm .macro selectfirstvalidtarget .byte 0xc2 .endm - .macro trysetfutureattack ptr:req + .macro trysetfutureattack failInstr:req .byte 0xc3 - .4byte \ptr + .4byte \failInstr .endm - .macro trydobeatup endPtr=NULL, failPtr=NULL + .macro trydobeatup endInstr, failInstr .byte 0xc4 - .4byte \endPtr - .4byte \failPtr + .4byte \endInstr + .4byte \failInstr .endm .macro setsemiinvulnerablebit @@ -1044,9 +1044,9 @@ .byte 0xc8 .endm - .macro trymemento ptr:req + .macro trymemento failInstr:req .byte 0xc9 - .4byte \ptr + .4byte \failInstr .endm .macro setforcedtarget @@ -1062,105 +1062,105 @@ .byte 0xcc .endm - .macro cureifburnedparalysedorpoisoned ptr:req + .macro cureifburnedparalysedorpoisoned failInstr:req .byte 0xcd - .4byte \ptr + .4byte \failInstr .endm - .macro settorment ptr:req + .macro settorment failInstr:req .byte 0xce - .4byte \ptr + .4byte \failInstr .endm - .macro jumpifnodamage ptr:req + .macro jumpifnodamage jumpInstr:req .byte 0xcf - .4byte \ptr + .4byte \jumpInstr .endm - .macro settaunt ptr:req + .macro settaunt failInstr:req .byte 0xd0 - .4byte \ptr + .4byte \failInstr .endm - .macro trysethelpinghand ptr:req + .macro trysethelpinghand failInstr:req .byte 0xd1 - .4byte \ptr + .4byte \failInstr .endm - .macro tryswapitems ptr:req + .macro tryswapitems failInstr:req .byte 0xd2 - .4byte \ptr + .4byte \failInstr .endm - .macro trycopyability ptr:req + .macro trycopyability failInstr:req .byte 0xd3 - .4byte \ptr + .4byte \failInstr .endm - .macro trywish turnNumber:req, ptr:req + .macro trywish turnNumber:req, failInstr:req .byte 0xd4 .byte \turnNumber - .4byte \ptr + .4byte \failInstr .endm - .macro settoxicspikes ptr:req + .macro settoxicspikes failInstr:req .byte 0xd5 - .4byte \ptr + .4byte \failInstr .endm - .macro setgastroacid ptr:req + .macro setgastroacid failInstr:req .byte 0xd6 - .4byte \ptr + .4byte \failInstr .endm - .macro setyawn ptr:req + .macro setyawn failInstr:req .byte 0xd7 - .4byte \ptr + .4byte \failInstr .endm - .macro setdamagetohealthdifference ptr:req + .macro setdamagetohealthdifference failInstr:req .byte 0xd8 - .4byte \ptr + .4byte \failInstr .endm .macro setroom .byte 0xd9 .endm - .macro tryswapabilities ptr:req + .macro tryswapabilities failInstr:req .byte 0xda - .4byte \ptr + .4byte \failInstr .endm - .macro tryimprison ptr:req + .macro tryimprison failInstr:req .byte 0xdb - .4byte \ptr + .4byte \failInstr .endm - .macro setstealthrock ptr:req + .macro setstealthrock failInstr:req .byte 0xdc - .4byte \ptr + .4byte \failInstr .endm - .macro setuserstatus3 flags:req, ptr:req + .macro setuserstatus3 flags:req, failInstr:req .byte 0xdd .4byte \flags - .4byte \ptr + .4byte \failInstr .endm - .macro assistattackselect ptr:req + .macro assistattackselect failInstr:req .byte 0xde - .4byte \ptr + .4byte \failInstr .endm - .macro trysetmagiccoat ptr:req + .macro trysetmagiccoat failInstr:req .byte 0xdf - .4byte \ptr + .4byte \failInstr .endm - .macro trysetsnatch ptr:req + .macro trysetsnatch failInstr:req .byte 0xe0 - .4byte \ptr + .4byte \failInstr .endm .macro unused2 ptr:req @@ -1173,10 +1173,10 @@ .byte \battler .endm - .macro jumpifhasnohp battler:req, ptr:req + .macro jumpifhasnohp battler:req, jumpInstr:req .byte 0xe3 .byte \battler - .4byte \ptr + .4byte \jumpInstr .endm .macro getsecretpowereffect @@ -1195,29 +1195,29 @@ .byte 0xe7 .endm - .macro settypebasedhalvers ptr:req + .macro settypebasedhalvers failInstr:req .byte 0xe8 - .4byte \ptr + .4byte \failInstr .endm - .macro jumpifsubstituteblocks ptr:req + .macro jumpifsubstituteblocks jumpInstr:req .byte 0xe9 - .4byte \ptr + .4byte \jumpInstr .endm - .macro tryrecycleitem ptr:req + .macro tryrecycleitem failInstr:req .byte 0xea - .4byte \ptr + .4byte \failInstr .endm - .macro settypetoterrain ptr:req + .macro settypetoterrain failInstr:req .byte 0xeb - .4byte \ptr + .4byte \failInstr .endm - .macro pursuitdoubles ptr:req + .macro pursuitdoubles failInstr:req .byte 0xec - .4byte \ptr + .4byte \failInstr .endm .macro snatchsetbattlers @@ -1236,18 +1236,18 @@ .byte 0xf0 .endm - .macro trysetcaughtmondexflags ptr:req + .macro trysetcaughtmondexflags failInstr:req .byte 0xf1 - .4byte \ptr + .4byte \failInstr .endm .macro displaydexinfo .byte 0xf2 .endm - .macro trygivecaughtmonnick ptr:req + .macro trygivecaughtmonnick successInstr:req .byte 0xf3 - .4byte \ptr + .4byte \successInstr .endm .macro subattackerhpbydmg @@ -1271,9 +1271,9 @@ .byte \position .endm - .macro settelekinesis ptr:req + .macro settelekinesis failInstr:req .byte 0xf9 - .4byte \ptr + .4byte \failInstr .endm .macro swapstatstages stat:req @@ -1286,9 +1286,9 @@ .byte \stat .endm - .macro jumpifoppositegenders ptr:req + .macro jumpifoppositegenders jumpInstr:req .byte 0xfc - .4byte \ptr + .4byte \jumpInstr .endm .macro unused ptr:req @@ -1296,27 +1296,55 @@ .4byte \ptr .endm - .macro tryworryseed ptr:req + .macro tryworryseed failInstr:req .byte 0xfe - .4byte \ptr + .4byte \failInstr .endm - + .macro callnative func:req .byte 0xff .4byte \func .endm @ callnative macros - .macro metalburstdamagecalculator ptr:req + .macro metalburstdamagecalculator failInstr:req callnative BS_CalcMetalBurstDmg - .4byte \ptr + .4byte \failInstr .endm - .macro jumpifholdeffect battler:req, holdEffect:req, ptr:req + .macro jumpifholdeffect battler:req, holdEffect:req, jumpInstr:req callnative BS_JumpIfHoldEffect .byte \battler .2byte \holdEffect - .4byte \ptr + .4byte \jumpInstr + .endm + + .macro dostockpilestatchangeswearoff, battler:req, statChangeInstr:req + callnative BS_DoStockpileStatChangesWearOff + .byte \battler + .4byte \statChangeInstr + .endm + + .macro jumpifmorethanhalfHP battler:req, jumpInstr:req + callnative BS_JumpIfMoreThanHalfHP + .byte \battler + .4byte \jumpInstr + .endm + + .macro itemrestorehp + callnative BS_ItemRestoreHP + .endm + + .macro itemcurestatus + callnative BS_ItemCureStatus + .endm + + .macro itemincreasestat + callnative BS_ItemIncreaseStat + .endm + + .macro itemrestorepp + callnative BS_ItemRestorePP .endm @ various command changed to more readable macros @@ -1324,6 +1352,11 @@ various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES .endm + @ Stores Healing Wish effect. + .macro storehealingwish battler:req + various \battler, VARIOUS_STORE_HEALING_WISH + .endm + .macro setmagiccoattarget battler:req various \battler, VARIOUS_SET_MAGIC_COAT_TARGET .endm @@ -1481,82 +1514,82 @@ .2byte \move .endm - .macro setluckychant battler:req, ptr:req + .macro setluckychant battler:req, failInstr:req various \battler VARIOUS_SET_LUCKY_CHANT - .4byte \ptr + .4byte \failInstr .endm - .macro suckerpunchcheck ptr:req + .macro suckerpunchcheck failInstr:req various BS_ATTACKER, VARIOUS_SUCKER_PUNCH_CHECK - .4byte \ptr + .4byte \failInstr .endm - .macro setabilitysimple battler:req, ptr:req + .macro setabilitysimple battler:req, failInstr:req various \battler VARIOUS_SET_SIMPLE_BEAM - .4byte \ptr + .4byte \failInstr .endm - .macro tryentrainment ptr:req + .macro tryentrainment failInstr:req various BS_ATTACKER, VARIOUS_TRY_ENTRAINMENT - .4byte \ptr + .4byte \failInstr .endm .macro setlastusedability battler:req various \battler, VARIOUS_SET_LAST_USED_ABILITY .endm - .macro tryhealpulse battler:req, ptr:req + .macro tryhealpulse battler:req, failInstr:req various \battler, VARIOUS_TRY_HEAL_PULSE - .4byte \ptr + .4byte \failInstr .endm - .macro tryquash ptr:req + .macro tryquash failInstr:req various BS_ATTACKER, VARIOUS_TRY_QUASH - .4byte \ptr + .4byte \failInstr .endm - .macro tryafteryou ptr:req + .macro tryafteryou failInstr:req various BS_ATTACKER, VARIOUS_AFTER_YOU - .4byte \ptr + .4byte \failInstr .endm - .macro trybestow ptr:req + .macro trybestow failInstr:req various BS_ATTACKER, VARIOUS_BESTOW - .4byte \ptr + .4byte \failInstr .endm .macro invertstatstages battler:req various \battler, VARIOUS_INVERT_STAT_STAGES .endm - .macro setterrain ptr:req + .macro setterrain failInstr:req various BS_ATTACKER, VARIOUS_SET_TERRAIN - .4byte \ptr + .4byte \failInstr .endm - .macro trymefirst ptr:req + .macro trymefirst failInstr:req various BS_ATTACKER, VARIOUS_TRY_ME_FIRST - .4byte \ptr + .4byte \failInstr .endm - .macro jumpifbattleend ptr:req + .macro jumpifbattleend jumpInstr:req various BS_ATTACKER, VARIOUS_JUMP_IF_BATTLE_END - .4byte \ptr + .4byte \jumpInstr .endm - .macro tryelectrify ptr:req + .macro tryelectrify failInstr:req various BS_ATTACKER, VARIOUS_TRY_ELECTRIFY - .4byte \ptr + .4byte \failInstr .endm - .macro tryreflecttype ptr:req + .macro tryreflecttype failInstr:req various BS_ATTACKER, VARIOUS_TRY_REFLECT_TYPE - .4byte \ptr + .4byte \failInstr .endm - .macro trysoak ptr:req + .macro trysoak failInstr:req various BS_ATTACKER, VARIOUS_TRY_SOAK - .4byte \ptr + .4byte \failInstr .endm .macro handlemegaevo battler:req, case:req @@ -1574,33 +1607,33 @@ .byte \case .endm - .macro jumpifcantuselastresort battler:req, ptr:req + .macro jumpifcantuselastresort battler:req, jumpInstr:req various \battler, VARIOUS_TRY_LAST_RESORT - .4byte \ptr + .4byte \jumpInstr .endm .macro argumentstatuseffect various BS_ATTACKER, VARIOUS_ARGUMENT_STATUS_EFFECT .endm - .macro tryhitswitchtarget ptr:req + .macro tryhitswitchtarget failInstr:req various BS_ATTACKER, VARIOUS_TRY_HIT_SWITCH_TARGET - .4byte \ptr + .4byte \failInstr .endm - .macro tryautotomize battler:req, ptr:req + .macro tryautotomize battler:req, failInstr:req various \battler, VARIOUS_TRY_AUTOTOMIZE - .4byte \ptr + .4byte \failInstr .endm - .macro jumpifcantusesynchronoise ptr:req + .macro jumpifcantusesynchronoise jumpInstr:req various BS_ATTACKER, VARIOUS_TRY_SYNCHRONOISE - .4byte \ptr + .4byte \jumpInstr .endm - .macro trycopycat ptr:req + .macro trycopycat failInstr:req various BS_ATTACKER, VARIOUS_TRY_COPYCAT - .4byte \ptr + .4byte \failInstr .endm .macro showabilitypopup battler:req @@ -1611,20 +1644,20 @@ various \battler, VARIOUS_UPDATE_ABILITY_POPUP .endm - .macro defogclear battler:req, clear:req, ptr:req + .macro defogclear battler:req, clear:req, failInstr:req various \battler, VARIOUS_DEFOG .byte \clear - .4byte \ptr + .4byte \failInstr .endm - .macro jumpiftargetally ptr:req + .macro jumpiftargetally jumpInstr:req various BS_ATTACKER, VARIOUS_JUMP_IF_TARGET_ALLY - .4byte \ptr + .4byte \jumpInstr .endm - .macro trypsychoshift ptr:req + .macro trypsychoshift failInstr:req various BS_ATTACKER, VARIOUS_PSYCHO_SHIFT - .4byte \ptr + .4byte \failInstr .endm .macro curestatus battler:req @@ -1639,14 +1672,14 @@ various BS_ATTACKER, VARIOUS_ARGUMENT_TO_MOVE_EFFECT .endm - .macro jumpifnotgrounded battler:req, ptr:req + .macro jumpifnotgrounded battler:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_NOT_GROUNDED - .4byte \ptr + .4byte \jumpInstr .endm - .macro handletrainerslidemsg battler:req, field:req + .macro handletrainerslidemsg battler:req, case:req various \battler, VARIOUS_HANDLE_TRAINER_SLIDE_MSG - .byte \field + .byte \case .endm .macro trytrainerslidefirstdownmsg battler:req @@ -1661,14 +1694,14 @@ various \battler, VARIOUS_SET_AURORA_VEIL .endm - .macro trysetthirdtype battler:req, ptr:req + .macro trysetthirdtype battler:req, failInstr:req various \battler, VARIOUS_TRY_THIRD_TYPE - .4byte \ptr + .4byte \failInstr .endm - .macro tryaccupressure battler:req, ptr:req + .macro tryaccupressure battler:req, failInstr:req various \battler, VARIOUS_ACUPRESSURE - .4byte \ptr + .4byte \failInstr .endm .macro setpowder battler:req @@ -1683,24 +1716,24 @@ various \battler, VARIOUS_GRAVITY_ON_AIRBORNE_MONS .endm - .macro checkgrassyterrainheal battler:req, ptr:req + .macro checkgrassyterrainheal battler:req, failInstr:req various \battler, VARIOUS_CHECK_IF_GRASSY_TERRAIN_HEALS - .4byte \ptr + .4byte \failInstr .endm - .macro jumpifnotberry battler:req, ptr:req + .macro jumpifnotberry battler:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_NOT_BERRY - .4byte \ptr + .4byte \jumpInstr .endm - .macro jumpifroarfails ptr:req + .macro jumpifroarfails jumpInstr:req various BS_ATTACKER, VARIOUS_JUMP_IF_ROAR_FAILS - .4byte \ptr + .4byte \jumpInstr .endm - .macro tryinstruct ptr:req + .macro tryinstruct failInstr:req various BS_ATTACKER, VARIOUS_TRY_INSTRUCT - .4byte \ptr + .4byte \failInstr .endm .macro settracedability battler:req @@ -1715,19 +1748,19 @@ various \battler, VARIOUS_TRY_ILLUSION_OFF .endm - .macro spriteignore0hp val:req + .macro spriteignore0hp value:req various BS_ATTACKER, VARIOUS_SET_SPRITEIGNORE0HP - .byte \val + .byte \value .endm - .macro getstatvalue battler:req, statId:req + .macro getstatvalue battler:req, stat:req various \battler, VARIOUS_GET_STAT_VALUE - .byte \statId + .byte \stat .endm - .macro jumpiffullhp battler:req, ptr:req + .macro jumpiffullhp battler:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_FULL_HP - .4byte \ptr + .4byte \jumpInstr .endm .macro losetype battler:req, type:req @@ -1739,60 +1772,60 @@ various \battler, VARIOUS_TRY_FRISK .endm - .macro jumpifshieldsdown battler:req, ptr:req + .macro jumpifshieldsdown battler:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_SHIELDS_DOWN_PROTECTED - .4byte \ptr + .4byte \jumpInstr .endm - .macro trypoisontype attacker:req, target:req, ptr:req + .macro trypoisontype attacker:req, target:req, failInstr:req various \attacker, VARIOUS_POISON_TYPE_IMMUNITY .byte \target - .4byte \ptr + .4byte \failInstr .endm - .macro tryparalyzetype attacker:req, target:req, ptr:req + .macro tryparalyzetype attacker:req, target:req, failInstr:req various \attacker, VARIOUS_PARALYZE_TYPE_IMMUNITY .byte \target - .4byte \ptr + .4byte \failInstr .endm - .macro trysetfairylock ptr:req + .macro trysetfairylock failInstr:req various BS_ATTACKER, VARIOUS_TRY_FAIRY_LOCK - .4byte \ptr + .4byte \failInstr .endm - .macro jumpifnoally battler:req, ptr:req + .macro jumpifnoally battler:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_NO_ALLY - .4byte \ptr + .4byte \jumpInstr .endm - .macro jumpifnoholdeffect battler:req, holdEffet:req, ptr:req + .macro jumpifnoholdeffect battler:req, holdEffect:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_NO_HOLD_EFFECT - .byte \holdEffet - .4byte \ptr + .byte \holdEffect + .4byte \jumpInstr .endm - .macro infatuatewithbattler battler1:req, battler2:req - various \battler1, VARIOUS_INFATUATE_WITH_BATTLER - .byte \battler2 + .macro infatuatewithbattler battler:req, infatuateWith:req + various \battler, VARIOUS_INFATUATE_WITH_BATTLER + .byte \infatuateWith .endm .macro setlastuseditem battler:req various \battler, VARIOUS_SET_LAST_USED_ITEM .endm - .macro jumpifabsent battler:req, ptr:req + .macro jumpifabsent battler:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_ABSENT - .4byte \ptr + .4byte \jumpInstr .endm .macro destroyabilitypopup various BS_ABILITY_BATTLER, VARIOUS_DESTROY_ABILITY_POPUP .endm - .macro gettotemboost ptr:req + .macro gettotemboost jumpInstr:req various BS_ATTACKER, VARIOUS_TOTEM_BOOST - .4byte \ptr + .4byte \jumpInstr .endm .macro tryactivategrimneigh, battler:req @@ -1803,9 +1836,9 @@ various BS_ATTACKER, VARIOUS_SET_Z_EFFECT .endm - .macro consumeberry battler:req, frombattler:req + .macro consumeberry battler:req, fromBattler:req various \battler, VARIOUS_CONSUME_BERRY - .byte \frombattler + .byte \fromBattler .endm .macro activateitemeffects battler:req @@ -1816,44 +1849,44 @@ various 0, VARIOUS_PICKPOCKET .endm - .macro doterrainseed battler:req, ptr:req + .macro doterrainseed battler:req, failInstr:req various \battler, VARIOUS_TERRAIN_SEED - .4byte \ptr + .4byte \failInstr .endm .macro makeinvisible battler:req various \battler, VARIOUS_MAKE_INVISIBLE .endm - .macro tryroomservice battler:req, ptr:req + .macro tryroomservice battler:req, failInstr:req various \battler, VARIOUS_ROOM_SERVICE - .4byte \ptr + .4byte \failInstr .endm - .macro jumpifterrainaffected battler:req, terrainFlags:req, ptr:req + .macro jumpifterrainaffected battler:req, terrainFlags:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_TERRAIN_AFFECTED .4byte \terrainFlags - .4byte \ptr + .4byte \jumpInstr .endm - .macro jumpifpranksterblocked battler:req, ptr:req + .macro jumpifpranksterblocked battler:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_PRANKSTER_BLOCKED - .4byte \ptr + .4byte \jumpInstr .endm - .macro eeriespellppreduce ptr:req + .macro eeriespellppreduce failInstr:req various BS_TARGET, VARIOUS_EERIE_SPELL_PP_REDUCE - .4byte \ptr + .4byte \failInstr .endm - .macro jumpifteamhealthy battler:req, ptr:req + .macro jumpifteamhealthy battler:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_TEAM_HEALTHY - .4byte \ptr + .4byte \jumpInstr .endm - .macro tryhealquarterhealth battler:req, ptr:req + .macro tryhealquarterhealth battler:req, failInstr:req various \battler, VARIOUS_TRY_HEAL_QUARTER_HP - .4byte \ptr + .4byte \failInstr .endm .macro removeterrain @@ -1868,73 +1901,73 @@ various BS_TARGET, VARIOUS_SET_ATTACKER_STICKY_WEB_USER .endm - .macro getrototillertargets ptr:req + .macro getrototillertargets failInstr:req various BS_ATTACKER, VARIOUS_GET_ROTOTILLER_TARGETS - .4byte \ptr + .4byte \failInstr .endm - .macro jumpifnotrototilleraffected battler:req, ptr:req + .macro jumpifnotrototilleraffected battler:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_NOT_ROTOTILLER_AFFECTED - .4byte \ptr + .4byte \jumpInstr .endm .macro tryactivatebattlebond battler:req various \battler, VARIOUS_TRY_ACTIVATE_BATTLE_BOND .endm - .macro jumpifcantreverttoprimal ptr:req + .macro jumpifcantreverttoprimal jumpInstr:req various BS_ATTACKER, VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL - .4byte \ptr + .4byte \jumpInstr .endm .macro applyplasmafists various BS_ATTACKER, VARIOUS_APPLY_PLASMA_FISTS .endm - .macro jumpifweatheraffected battler:req, weather:req, ptr:req + .macro jumpifweatheraffected battler:req, flags:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_WEATHER_AFFECTED - .4byte \weather - .4byte \ptr + .4byte \flags + .4byte \jumpInstr .endm - .macro jumpifspecies battler:req, species:req, ptr:req + .macro jumpifspecies battler:req, species:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_SPECIES .2byte \species - .4byte \ptr + .4byte \jumpInstr .endm .macro tryendneutralizinggas battler:req various \battler, VARIOUS_TRY_END_NEUTRALIZING_GAS .endm - .macro trynoretreat battler:req, ptr:req + .macro trynoretreat battler:req, failInstr:req various \battler, VARIOUS_TRY_NO_RETREAT - .4byte \ptr + .4byte \failInstr .endm - .macro trytarshot battler:req, ptr:req + .macro trytarshot battler:req, failInstr:req various \battler, VARIOUS_TRY_TAR_SHOT - .4byte \ptr + .4byte \failInstr .endm - .macro cantarshotwork battler:req, ptr:req + .macro cantarshotwork battler:req, failInstr:req various \battler, VARIOUS_CAN_TAR_SHOT_WORK - .4byte \ptr + .4byte \failInstr .endm - .macro checkpoltergeist battler:req, ptr:req + .macro checkpoltergeist battler:req, failInstr:req various \battler, VARIOUS_CHECK_POLTERGEIST - .4byte \ptr + .4byte \failInstr .endm - .macro setoctolock battler:req, ptr:req + .macro setoctolock battler:req, failInstr:req various \battler, VARIOUS_SET_OCTOLOCK - .4byte \ptr + .4byte \failInstr .endm - .macro cutonethirdhpraisestats ptr:req + .macro cutonethirdhpraisestats failInstr:req various BS_ATTACKER, VARIOUS_CUT_1_3_HP_RAISE_STATS - .4byte \ptr + .4byte \failInstr .endm .macro photongeysercheck battler:req @@ -1944,35 +1977,35 @@ .macro shellsidearmcheck various BS_ATTACKER, VARIOUS_SHELL_SIDE_ARM_CHECK .endm - - .macro jumpifrodaffected battler:req, ptr:req + + .macro jumpifrodaffected battler:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_ROD - .4byte \ptr + .4byte \jumpInstr .endm - .macro jumpifabsorbaffected battler:req, ptr:req + .macro jumpifabsorbaffected battler:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_ABSORB - .4byte \ptr + .4byte \jumpInstr .endm - .macro jumpifmotoraffected battler:req, ptr:req + .macro jumpifmotoraffected battler:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_MOTOR - .4byte \ptr + .4byte \jumpInstr .endm - .macro jumpifteanoberry ptr:req + .macro jumpifteanoberry jumpInstr:req various BS_ATTACKER, VARIOUS_TEATIME_TARGETS - .4byte \ptr + .4byte \jumpInstr .endm - .macro jumpifteainvulnerable battler:req, ptr:req + .macro jumpifteainvulnerable battler:req, jumpInstr:req various \battler, VARIOUS_TEATIME_INVUL - .4byte \ptr + .4byte \jumpInstr .endm - .macro jumpifcantfling battler:req, ptr:req + .macro jumpifcantfling battler:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_CANT_FLING - .4byte \ptr + .4byte \jumpInstr .endm .macro curecertainstatuses battler:req @@ -1983,15 +2016,15 @@ various \battler, VARIOUS_TRY_RESET_NEGATIVE_STAT_STAGES .endm - .macro jumpiflastuseditemberry ptr:req + .macro jumpiflastuseditemberry jumpInstr:req various BS_ATTACKER, VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY - .4byte \ptr + .4byte \jumpInstr .endm - .macro jumpiflastuseditemholdeffect battler:req, holdEffect:req, ptr:req + .macro jumpiflastuseditemholdeffect battler:req, holdEffect:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_LAST_USED_ITEM_HOLD_EFFECT .byte \holdEffect - .4byte \ptr + .4byte \jumpInstr .endm .macro savebattleritem battler:req @@ -2022,19 +2055,19 @@ various \battler, VARIOUS_GET_BATTLER_SIDE .endm - .macro checkparentalbondcounter counter:req, ptr:req + .macro checkparentalbondcounter counter:req, jumpInstr:req various BS_ATTACKER, VARIOUS_CHECK_PARENTAL_BOND_COUNTER .byte \counter - .4byte \ptr + .4byte \jumpInstr .endm .macro swapstats stat:req various BS_ATTACKER, VARIOUS_SWAP_STATS .byte \stat .endm - .macro trywindriderpower battler:req, ptr:req + .macro trywindriderpower battler:req, failInstr:req various \battler, VARIOUS_TRY_WIND_RIDER_POWER - .4byte \ptr + .4byte \failInstr .endm .macro activateweatherchangeabilities battler:req @@ -2045,11 +2078,6 @@ various \battler, VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES .endm - .macro jumpifnovalidtargets ptr:req - various BS_ATTACKER, VARIOUS_JUMP_IF_NO_VALID_TARGETS - .4byte \ptr - .endm - @ helpful macros .macro setstatchanger stat:req, stages:req, down:req setbyte sSTATCHANGER, \stat | \stages << 3 | \down << 7 @@ -2092,44 +2120,44 @@ copyarray \dst, \src, 0x4 .endm - .macro jumpifbytenotequal byte1:req, byte2:req, jumpptr:req - jumpifarraynotequal \byte1, \byte2, 0x1, \jumpptr + .macro jumpifbytenotequal byte1:req, byte2:req, jumpInstr:req + jumpifarraynotequal \byte1, \byte2, 0x1, \jumpInstr .endm - .macro jumpifbyteequal byte1:req, byte2:req, jumpptr:req - jumpifarrayequal \byte1, \byte2, 0x1, \jumpptr + .macro jumpifbyteequal byte1:req, byte2:req, jumpInstr:req + jumpifarrayequal \byte1, \byte2, 0x1, \jumpInstr .endm - .macro jumpifmove move:req, jumpptr:req - jumpifhalfword CMP_EQUAL, gCurrentMove, \move, \jumpptr + .macro jumpifmove move:req, jumpInstr:req + jumpifhalfword CMP_EQUAL, gCurrentMove, \move, \jumpInstr .endm - .macro jumpifnotmove move:req, jumpptr:req - jumpifhalfword CMP_NOT_EQUAL, gCurrentMove, \move, \jumpptr + .macro jumpifnotmove move:req, jumpInstr:req + jumpifhalfword CMP_NOT_EQUAL, gCurrentMove, \move, \jumpInstr .endm - .macro jumpifnotchosenmove move:req, jumpptr:req - jumpifhalfword CMP_NOT_EQUAL, gChosenMove, \move, \jumpptr + .macro jumpifnotchosenmove move:req, jumpInstr:req + jumpifhalfword CMP_NOT_EQUAL, gChosenMove, \move, \jumpInstr .endm - .macro jumpifstatus3 battler:req, status:req, jumpptr:req - jumpifstatus3condition \battler, \status, FALSE, \jumpptr + .macro jumpifstatus3 battler:req, flags:req, jumpInstr:req + jumpifstatus3condition \battler, \flags, FALSE, \jumpInstr .endm - .macro jumpifnostatus3 battler:req, status:req, jumpptr:req - jumpifstatus3condition \battler, \status, TRUE, \jumpptr + .macro jumpifnostatus3 battler:req, flags:req, jumpInstr:req + jumpifstatus3condition \battler, \flags, TRUE, \jumpInstr .endm - .macro jumpifmovehadnoeffect jumpptr:req - jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_NO_EFFECT, \jumpptr + .macro jumpifmovehadnoeffect jumpInstr:req + jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_NO_EFFECT, \jumpInstr .endm - .macro jumpifbattletype flags:req, jumpptr:req - jumpifword CMP_COMMON_BITS, gBattleTypeFlags, \flags, \jumpptr + .macro jumpifbattletype flags:req, jumpInstr:req + jumpifword CMP_COMMON_BITS, gBattleTypeFlags, \flags, \jumpInstr .endm - .macro jumpifnotbattletype flags:req, jumpptr:req - jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, \flags, \jumpptr + .macro jumpifnotbattletype flags:req, jumpInstr:req + jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, \flags, \jumpInstr .endm .macro dmg_1_8_targethp @@ -2148,42 +2176,42 @@ manipulatedamage DMG_1_2_ATTACKER_HP .endm - .macro jumpifflowerveil jumpptr:req + .macro jumpifflowerveil jumpInstr:req jumpifnottype BS_TARGET, TYPE_GRASS, 1f - jumpifability BS_TARGET_SIDE, ABILITY_FLOWER_VEIL, \jumpptr + jumpifability BS_TARGET_SIDE, ABILITY_FLOWER_VEIL, \jumpInstr 1: .endm - .macro jumpifflowerveilattacker jumpptr:req + .macro jumpifflowerveilattacker jumpInstr:req jumpifnottype BS_ATTACKER, TYPE_GRASS, 1f - jumpifability BS_ATTACKER_SIDE, ABILITY_FLOWER_VEIL, \jumpptr + jumpifability BS_ATTACKER_SIDE, ABILITY_FLOWER_VEIL, \jumpInstr 1: .endm - .macro setallytonexttarget jumpptr:req + .macro setallytonexttarget jumpInstr:req jumpifbyte CMP_GREATER_THAN, gBattlerTarget, 0x1, 1f addbyte gBattlerTarget, 0x2 - goto \jumpptr + goto \jumpInstr 1: subbyte gBattlerTarget, 0x2 - goto \jumpptr + goto \jumpInstr .endm - .macro jumpifleafguardprotected battler:req, jumpptr:req + .macro jumpifleafguardprotected battler:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_LEAF_GUARD_PROTECTED - .4byte \jumpptr + .4byte \jumpInstr .endm - .macro jumpifsafeguard jumpptr:req + .macro jumpifsafeguard jumpInstr:req jumpifability BS_ATTACKER, ABILITY_INFILTRATOR, 1f - jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, \jumpptr + jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, \jumpInstr 1: .endm @ Will jump to script pointer if the target weighs less than 200 kg, or 441 lbs. - .macro jumpifunder200 battler:req, ptr:req + .macro jumpifunder200 battler:req, failInstr:req various \battler, VARIOUS_JUMP_IF_UNDER_200 - .4byte \ptr + .4byte \failInstr .endm @ Sets the sky drop status and does all other necessary operations @@ -2193,9 +2221,9 @@ @ Clears the sky drop status and does all other necessary operations. @ If the target fainted in before this script is called, it goes to the given script. - .macro clearskydrop ptr:req + .macro clearskydrop failInstr:req various 0, VARIOUS_CLEAR_SKY_DROP - .4byte \ptr + .4byte \failInstr .endm @ Accounts for if the target of Sky Drop was in confuse_lock when the attacker falls asleep due to Yawn. @@ -2239,7 +2267,21 @@ waitmessage B_WAIT_TIME_LONG .endm - .macro jumpifemergencyexited battler:req, ptr:req + .macro jumpifemergencyexited battler:req, jumpInstr:req various \battler, VARIOUS_JUMP_IF_EMERGENCY_EXITED + .4byte \jumpInstr + .endm + + .macro jumpifshelltrap battler:req, ptr:req + various \battler, VARIOUS_JUMP_IF_SHELL_TRAP .4byte \ptr .endm + + .macro hitswitchtargetfailed + various 0, VARIOUS_HIT_SWITCH_TARGET_FAILED + .endm + + .macro tryrevivalblessing, jumpInstr:req + various 0, VARIOUS_TRY_REVIVAL_BLESSING + .4byte \jumpInstr + .endm diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 49a97a2477..78d3037aeb 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1582,15 +1582,15 @@ .4byte \value .endm - @ Sets the eventLegal bit for the Pokemon in the specified slot of the player's party. - .macro setmoneventlegal slot:req + @ Sets the modernFatefulEncounter bit for the Pokemon in the specified slot of the player's party. + .macro setmodernfatefulencounter slot:req .byte 0xcd .2byte \slot .endm - @ Checks if the eventLegal bit is set for the Pokemon in the specified slot of the player's party. If it isn't set, + @ Checks if the modernFatefulEncounter bit is set for the Pokemon in the specified slot of the player's party. If it isn't set, @ VAR_RESULT is TRUE. If the bit is set (or if the specified slot is empty or invalid), VAR_RESULT is FALSE. - .macro checkmoneventlegal slot:req + .macro checkmodernfatefulencounter slot:req .byte 0xce .2byte \slot .endm @@ -1938,12 +1938,12 @@ closebraillemessage .endm - @ Creates an "event legal" Pokémon for an encounter + @ Creates a Pokémon with the modernFatefulEncounter bit set for an encounter .macro seteventmon species:req, level:req, item=ITEM_NONE setvar VAR_0x8004, \species setvar VAR_0x8005, \level setvar VAR_0x8006, \item - special CreateEventLegalEnemyMon + special CreateEnemyEventMon .endm @ Set up a totem boost for the next battle. diff --git a/asm/macros/map.inc b/asm/macros/map.inc index 662257e416..21445138de 100644 --- a/asm/macros/map.inc +++ b/asm/macros/map.inc @@ -19,11 +19,11 @@ .4byte \script .endm - @ Defines an object event template for map data. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h - .macro object_event index:req, gfx:req, inConnection:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req + @ Defines an object event template for map data, to be used by a normal object. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h + .macro object_event index:req, gfx:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req .byte \index .byte \gfx - .byte \inConnection + .byte OBJ_KIND_NORMAL .space 1 @ Padding .2byte \x, \y .byte \elevation @@ -38,6 +38,22 @@ inc _num_npcs .endm + @ Defines an object event template for map data, to be used by a clone object. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h + @ NOTE: The handling for this type of event does not exist in Emerald by default; it is exclusive to FRLG. + .macro clone_event index:req, gfx:req, x:req, y:req, target_local_id:req, target_map_id:req + .byte \index + .byte \gfx + .byte OBJ_KIND_CLONE + .space 1 @ Padding + .2byte \x, \y + .byte \target_local_id + .space 3 @ Padding + .2byte \target_map_id & 0xFF @ map num + .2byte \target_map_id >> 8 @ map group + .space 8 @ Padding + inc _num_npcs + .endm + @ Defines a warp event for map data. Mirrors the struct layout of WarpEvent in include/global.fieldmap.h .macro warp_def x:req, y:req, elevation:req, warpId:req, map_id:req .2byte \x, \y @@ -49,12 +65,12 @@ .endm @ Defines a coord event for map data. Mirrors the struct layout of CoordEvent in include/global.fieldmap.h - .macro coord_event x:req, y:req, elevation:req, trigger:req, index:req, script:req + .macro coord_event x:req, y:req, elevation:req, var:req, varValue:req, script:req .2byte \x, \y .byte \elevation .space 1 @ Padding - .2byte \trigger - .2byte \index + .2byte \var + .2byte \varValue .space 2 @ Padding .4byte \script inc _num_traps diff --git a/charmap.txt b/charmap.txt index 99aca4c184..220ff2ed55 100644 --- a/charmap.txt +++ b/charmap.txt @@ -805,7 +805,7 @@ MUS_LITTLEROOT = 95 01 MUS_MT_CHIMNEY = 96 01 MUS_ENCOUNTER_FEMALE = 97 01 MUS_LILYCOVE = 98 01 -MUS_ROUTE111 = 99 01 +MUS_DESERT = 99 01 MUS_HELP = 9A 01 MUS_UNDERWATER = 9B 01 MUS_VICTORY_TRAINER = 9C 01 diff --git a/common_syms/window.txt b/common_syms/window.txt index 416d9d7325..24c093a226 100644 --- a/common_syms/window.txt +++ b/common_syms/window.txt @@ -1,5 +1,2 @@ -gUnusedWindowVar1 -gUnusedWindowVar2 gTransparentTileNumber -gUnusedWindowVar3 gWindowBgTilemapBuffers diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 0ad58c49e1..cca8706cbc 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -854,6 +854,8 @@ gBattleAnims_Moves:: .4byte Move_NOXIOUS_TORQUE .4byte Move_COMBAT_TORQUE .4byte Move_MAGICAL_TORQUE + .4byte Move_PSYBLADE + .4byte Move_HYDRO_STEAM @@@@ Z MOVES .4byte Move_BREAKNECK_BLITZ .4byte Move_ALL_OUT_PUMMELING @@ -1492,22 +1494,22 @@ Move_HEAL_BLOCK: loadspritegfx ANIM_TAG_BLUE_STAR monbg ANIM_TARGET createsoundtask SoundTask_PlaySeChangingVolume, SE_M_ABSORB_2, SOUND_PAN_TARGET, 256, -16, 0, 2 - createsprite gHealingBlueStarSpriteTemplate, ANIM_TARGET, 2, 0, -5, 1, 0 + createspriteontargets_onpos gHealingBlueStarSpriteTemplate, ANIM_TARGET, 2, 2, 0, -5, ANIM_TARGET, 0 delay 7 - createsprite gHealingBlueStarSpriteTemplate, ANIM_TARGET, 2, -15, 10, 1, 0 + createspriteontargets_onpos gHealingBlueStarSpriteTemplate, ANIM_TARGET, 2, 2, -15, 10, ANIM_TARGET, 0 delay 7 - createvisualtask AnimTask_BlendBattleAnimPal, 10, 1 | 4, 4, 2, 12, 0, RGB_BLACK - createsprite gHealingBlueStarSpriteTemplate, ANIM_TARGET, 2, 0, -5, 1, 0 + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_DEF_SIDE, 4, 2, 12, 0, RGB_BLACK + createspriteontargets_onpos gHealingBlueStarSpriteTemplate, ANIM_TARGET, 2, 2, 0, -5, ANIM_TARGET, 0 delay 7 - createsprite gHealingBlueStarSpriteTemplate, ANIM_TARGET, 2, -15, 10, 1, 0 + createspriteontargets_onpos gHealingBlueStarSpriteTemplate, ANIM_TARGET, 2, 2, -15, 10, ANIM_TARGET, 0 delay 7 - createsprite gHealingBlueStarSpriteTemplate, ANIM_TARGET, 2, -15, -15, 1, 0 + createspriteontargets_onpos gHealingBlueStarSpriteTemplate, ANIM_TARGET, 2, 2, -15, -15, ANIM_TARGET, 0 delay 7 - createsprite gHealingBlueStarSpriteTemplate, ANIM_TARGET, 2, 10, -5, 1, 0 + createspriteontargets_onpos gHealingBlueStarSpriteTemplate, ANIM_TARGET, 2, 2, 10, -5, ANIM_TARGET, 0 delay 7 waitforvisualfinish delay 11 - createvisualtask AnimTask_BlendBattleAnimPal, 10, 1 | 4, 4, 2, 0, 12, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_DEF_SIDE, 4, 2, 0, 12, RGB_BLACK waitforvisualfinish clearmonbg ANIM_TARGET end @@ -6405,11 +6407,7 @@ Move_ELECTROWEB: clearmonbg ANIM_DEF_PARTNER delay 1 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 5, 1, 2, 9, 0, RGB_BLACK - - @ ElectricityEffect looks ugly against both opponents, to do later - jumpifdoublebattle Move_ELECTROWEB_Wait - - call ElectricityEffect + call ElectricityEffect_OnTargets Move_ELECTROWEB_Wait: waitforvisualfinish end @@ -9278,16 +9276,16 @@ Move_EERIE_IMPULSE:: Move_VENOM_DRENCH:: loadspritegfx ANIM_TAG_POISON_BUBBLE monbg ANIM_DEF_PARTNER - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xfffb 0x1 0xfffb 0x0 + launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xfffb 0x1 0xfffb 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0x5 0x0 0x6 0x0 + launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0x5 0x0 0x6 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0x13 0x1 0xa 0x0 + launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0x13 0x1 0xa 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xffe9 0x2 0xfff6 0x0 + launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xffe9 0x2 0xfff6 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 call AcidDrench @@ -9296,28 +9294,28 @@ Move_VENOM_DRENCH:: clearmonbg ANIM_DEF_PARTNER end AcidDrench: - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xffec 0x0 0xfff6 0x0 + launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xffec 0x0 0xfff6 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0x1c 0x1 0xa 0x0 + launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0x1c 0x1 0xa 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xfff6 0x1 0xfffb 0x0 + launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xfff6 0x1 0xfffb 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xa 0x0 0x6 0x0 + launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xa 0x0 0x6 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0x18 0x1 0xa 0x0 + launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0x18 0x1 0xa 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xffe0 0x2 0xfff6 0x0 + launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xffe0 0x2 0xfff6 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xffec 0x0 0xfff6 0x0 + launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0xffec 0x0 0xfff6 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 - launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0x1e 0x2 0xa 0x0 + launchtemplate gVenomDrenchAcidTemplate 0x82, 0x4, 0x1e 0x2 0xa 1 playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET delay 0x2 return @@ -10175,6 +10173,7 @@ Move_ORIGIN_PULSE:: launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0xFF2A 0xFFAA 0x10 @between left and upper left launchtemplate gOriginPulseOrbInwardTemplate 0x82 0x5 0x1 0x0 0xFFDA 0xFF94 0x10 @between up and upper left waitforvisualfinish + createvisualtaskontargets AnimTask_ShakeMon2, 5, 0, ANIM_TARGET, 2, 0, 18, 1 monbg ANIM_DEF_PARTNER launchtemplate gOriginPulseBasicSplatTemplate 0x83 0x4 0xffb0 0xfff0 0x1 0x1 stopsound @@ -12039,168 +12038,168 @@ ShellTrapUnleash: monbg ANIM_TARGET waitplaysewithpan SE_M_REFLECT, SOUND_PAN_ATTACKER, 0x10 delay 0x6 - launchtemplate gShellTrapYellowImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapYellowImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapYellowImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapYellowImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapYellowImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapYellowImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapYellowImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapYellowImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapYellowImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapYellowImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapYellowImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapYellowImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapYellowImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapYellowImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapYellowImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapYellowImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapYellowImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapYellowImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x0 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x0 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x4 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x4 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x8 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x8 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0xc - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0xc + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x10 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x10 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x14 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x14 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x2 - launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x18 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x38, 0x18 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 - launchtemplate gShellTrapRedImpactTemplate 0x2 0x4 0x0 0x0 0x0 0x2 + createsprite gShellTrapRedImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x0, 0x2 delay 0x5 waitforvisualfinish call ShellTrapFireLaunch1 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0x0 0x0 0x0 0x38 0x4 0x4 0x1 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0, 0x38, 0x4, 0x4, 0x1 delay 0x3 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0xfff6 0x0 0xfff6 0x38 0x4 0x4 0x1 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0xfff6, 0x0, 0xfff6, 0x38, 0x4, 0x4, 0x1 delay 0x3 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0xa 0x0 0xa 0x38 0xfffc 0x3 0x1 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0xa, 0x0, 0xa, 0x38, 0xfffc, 0x3, 0x1 delay 0x3 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0xffec 0x0 0xffec 0x38 0xfffc 0x5 0x1 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0xffec, 0x0, 0xffec, 0x38, 0xfffc, 0x5, 0x1 delay 0x3 call ShellTrapFireLaunch2 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x3 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x3 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x3 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x3 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x3 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x3 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x3 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x3 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x3 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x3 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x3 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 delay 0x3 waitforvisualfinish clearmonbg ANIM_TARGET end ShellTrapFireLaunch1: - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0x0 0x0 0x0 0x38 0x4 0x4 0x1 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0, 0x38, 0x4, 0x4, 0x1 delay 0x3 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0xfff6 0x0 0xfff6 0x38 0x4 0x4 0x1 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0xfff6, 0x0, 0xfff6, 0x38, 0x4, 0x4, 0x1 delay 0x3 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0xa 0x0 0xa 0x38 0xfffc 0x3 0x1 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0xa, 0x0, 0xa, 0x38, 0xfffc, 0x3, 0x1 delay 0x3 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0xffec 0x0 0xffec 0x38 0xfffc 0x5 0x1 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0xffec, 0x0, 0xffec, 0x38, 0xfffc, 0x5, 0x1 delay 0x3 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0xf 0x0 0xf 0x38 0x4 0x4 0x1 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0xf, 0x0, 0xf, 0x38, 0x4, 0x4, 0x1 delay 0x3 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0xffec 0x0 0xffec 0x38 0x4 0x4 0x1 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0xffec, 0x0, 0xffec, 0x38, 0x4, 0x4, 0x1 delay 0x3 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0x14 0x0 0x14 0x38 0x4 0x4 0x1 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0x14, 0x0, 0x14, 0x38, 0x4, 0x4, 0x1 delay 0x3 return ShellTrapFireLaunch2: - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0x0 0x0 0x0 0x38 0x4 0x4 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x0, 0x0, 0x38, 0x4, 0x4, 0x1 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x3 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0xfff6 0x0 0xfff6 0x38 0x4 0x4 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0xfff6, 0x0, 0xfff6, 0x38, 0x4, 0x4, 0x1 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x3 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0xa 0x0 0xa 0x38 0xfffc 0x3 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0xa, 0x0, 0xa, 0x38, 0xfffc, 0x3, 0x1 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x3 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0xffec 0x0 0xffec 0x38 0xfffc 0x5 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0xffec, 0x0, 0xffec, 0x38, 0xfffc, 0x5, 0x1 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x3 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0xf 0x0 0xf 0x38 0x4 0x4 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0xf, 0x0, 0xf, 0x38, 0x4, 0x4, 0x1 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x3 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0xffec 0x0 0xffec 0x38 0x4 0x4 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0xffec, 0x0, 0xffec, 0x38, 0x4, 0x4, 0x1 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x3 - launchtemplate gShellTrapFireHitsTemplate 0x28 0x8 0x0 0x14 0x0 0x14 0x38 0x4 0x4 0x1 - launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x0003 0x0000 0x0006 0x0001 + createsprite gShellTrapFireHitsTemplate, ANIM_ATTACKER, 40, 0x0, 0x14, 0x0, 0x14, 0x38, 0x4, 0x4, 0x1 + createvisualtaskontargets AnimTask_ShakeMon, 0x2, 0, ANIM_TARGET, 0x0003, 0x0000, 0x0006, 0x0001 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 0x3 return @@ -14370,7 +14369,7 @@ Move_SCORCHING_SANDS:: Move_JUNGLE_HEALING:: goto Move_AROMATHERAPY - + Move_SILK_TRAP:: loadspritegfx ANIM_TAG_PROTECT loadspritegfx ANIM_TAG_SPIDER_WEB @@ -14379,11 +14378,11 @@ Move_SILK_TRAP:: createsprite gSpiderWebSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, FALSE waitforvisualfinish createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_PROTECT, 0, 10, 10, RGB_LIME_GREEN - monbg ANIM_ATK_PARTNER - waitplaysewithpan SE_M_REFLECT, SOUND_PAN_ATTACKER, 0x10 + monbg ANIM_ATK_PARTNER + waitplaysewithpan SE_M_REFLECT, SOUND_PAN_ATTACKER, 0x10 createsprite gProtectSpriteTemplate, ANIM_ATTACKER, 2, 24, 0, 90 waitforvisualfinish - clearmonbg ANIM_ATK_PARTNER + clearmonbg ANIM_ATK_PARTNER end Move_WICKED_BLOW:: @@ -14467,6 +14466,8 @@ Move_WICKED_TORQUE:: Move_NOXIOUS_TORQUE:: Move_COMBAT_TORQUE:: Move_MAGICAL_TORQUE:: +Move_PSYBLADE:: +Move_HYDRO_STEAM:: end @to do @@@@@@@@@@@@@@@@@@@@@@@ GEN 1-3 @@@@@@@@@@@@@@@@@@@@@@@ @@ -23375,15 +23376,15 @@ Move_OVERHEAT: waitforvisualfinish createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -5, 3, ANIM_TARGET, 0 playsewithpan SE_M_FLAMETHROWER, SOUND_PAN_TARGET - createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 10, 0, 25, 1 + createvisualtaskontargets AnimTask_ShakeMon, 2, 0, ANIM_TARGET, 10, 0, 25, 1 delay 6 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 8, -5, ANIM_TARGET, 0 + createspriteontargets gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 2, 8, -5, ANIM_TARGET, 0 playsewithpan SE_M_FLAMETHROWER, SOUND_PAN_TARGET delay 8 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 10, 10, ANIM_TARGET, 0 + createspriteontargets gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 2, 10, 10, ANIM_TARGET, 0 playsewithpan SE_M_FLAMETHROWER, SOUND_PAN_TARGET delay 8 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 0 + createspriteontargets gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 2, 0, 0, ANIM_TARGET, 0 playsewithpan SE_M_FLAMETHROWER, SOUND_PAN_TARGET createvisualtask AnimTask_CopyPalFadedToUnfaded, 5, 1 delay 1 @@ -24226,6 +24227,25 @@ ElectricityEffectNoSound: createsprite gElectricitySpriteTemplate, ANIM_TARGET, 2, -20, 15, 5, 1, ANIM_TARGET return +ElectricityEffect_OnTargets: + playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_TARGET + createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, 4, 5, 0, 5, 0, ANIM_TARGET + delay 2 + createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, 4, -5, 10, 5, 1, ANIM_TARGET + delay 2 + createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, 4, 15, 20, 5, 2, ANIM_TARGET + delay 2 + createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, 4, -15, -10, 5, 0, ANIM_TARGET + delay 2 + createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, 4, 25, 0, 5, 1, ANIM_TARGET + delay 2 + createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, 4, -8, 8, 5, 2, ANIM_TARGET + delay 2 + createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, 4, 2, -8, 5, 0, ANIM_TARGET + delay 2 + createspriteontargets gElectricitySpriteTemplate, ANIM_TARGET, 2, 4, -20, 15, 5, 1, ANIM_TARGET + return + ConfusionEffect: loopsewithpan SE_M_DIZZY_PUNCH, SOUND_PAN_TARGET, 13, 6 createsprite gConfusionDuckSpriteTemplate, ANIM_TARGET, 2, 0, -15, 0, 3, 90 @@ -24844,6 +24864,7 @@ General_MegaEvolution: createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 16, 0, RGB_WHITEALPHA createvisualtask AnimTask_HorizontalShake, 5, 1, 5, 14 waitforvisualfinish + createvisualtask SoundTask_PlayNormalCry, 0 createsprite gMegaSymbolSpriteTemplate ANIM_ATTACKER, 2 waitforvisualfinish clearmonbg ANIM_ATK_PARTNER @@ -24989,6 +25010,7 @@ General_PrimalReversion_Alpha: createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 16, 0, RGB_WHITEALPHA createvisualtask AnimTask_HorizontalShake, 5, 1, 5, 14 waitforvisualfinish + createvisualtask SoundTask_PlayNormalCry, 0 createsprite gAlphaSymbolSpriteTemplate ANIM_ATTACKER, 2 waitforvisualfinish clearmonbg ANIM_ATK_PARTNER @@ -25015,6 +25037,7 @@ General_PrimalReversion_Omega: createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 16, 0, RGB_WHITEALPHA createvisualtask AnimTask_HorizontalShake, 5, 1, 5, 14 waitforvisualfinish + createvisualtask SoundTask_PlayNormalCry, 0 createsprite gOmegaSymbolSpriteTemplate ANIM_ATTACKER, 2 waitforvisualfinish clearmonbg ANIM_ATK_PARTNER diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 705d3b807f..3bcb35f44d 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -250,7 +250,7 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectHit @ EFFECT_GYRO_BALL .4byte BattleScript_EffectHit @ EFFECT_ECHOED_VOICE .4byte BattleScript_EffectHit @ EFFECT_PAYBACK - .4byte BattleScript_EffectHit @ EFFECT_ROUND + .4byte BattleScript_EffectRound @ EFFECT_ROUND .4byte BattleScript_EffectHit @ EFFECT_BRINE .4byte BattleScript_EffectHit @ EFFECT_VENOSHOCK .4byte BattleScript_EffectHit @ EFFECT_RETALIATE @@ -416,13 +416,96 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectSpecialAttackUpHit @ EFFECT_SPECIAL_ATTACK_UP_HIT .4byte BattleScript_EffectVictoryDance @ EFFECT_VICTORY_DANCE .4byte BattleScript_EffectTeatime @ EFFECT_TEATIME + .4byte BattleScript_EffectAttackUpUserAlly @ EFFECT_ATTACK_UP_USER_ALLY + .4byte BattleScript_EffectShellTrap @ EFFECT_SHELL_TRAP + .4byte BattleScript_EffectHit @ EFFECT_PSYBLADE + .4byte BattleScript_EffectHit @ EFFECT_HYDRO_STEAM + .4byte BattleScript_EffectHitSetEntryHazard @ EFFECT_HIT_SET_ENTRY_HAZARD + .4byte BattleScript_EffectDireClaw @ EFFECT_DIRE_CLAW + .4byte BattleScript_EffectBarbBarrage @ EFFECT_BARB_BARRAGE + .4byte BattleScript_EffectRevivalBlessing @ EFFECT_REVIVAL_BLESSING + +BattleScript_EffectRevivalBlessing:: + attackcanceler + attackstring + ppreduce + attackanimation + waitanimation + tryrevivalblessing BattleScript_ButItFailed + printstring STRINGID_PKMNREVIVEDREADYTOFIGHT + waitmessage B_WAIT_TIME_LONG + jumpifbyte CMP_EQUAL, gBattleCommunication, TRUE, BattleScript_EffectRevivalBlessingSendOut + goto BattleScript_MoveEnd + +BattleScript_EffectRevivalBlessingSendOut: + switchinanim BS_SCRIPTING, FALSE + waitstate + switchineffects BS_SCRIPTING + goto BattleScript_MoveEnd + +BattleScript_StealthRockActivates:: + setstealthrock BattleScript_MoveEnd + printfromtable gDmgHazardsStringIds + waitmessage B_WAIT_TIME_LONG + goto BattleScript_MoveEnd + +BattleScript_EffectDireClaw:: + setmoveeffect MOVE_EFFECT_DIRE_CLAW + goto BattleScript_EffectHit + +BattleScript_EffectHitSetEntryHazard:: + argumenttomoveeffect + goto BattleScript_EffectHit + +BattleScript_SpikesActivates:: + trysetspikes BattleScript_MoveEnd + printfromtable gDmgHazardsStringIds + waitmessage B_WAIT_TIME_LONG + goto BattleScript_MoveEnd + +BattleScript_EffectAttackUpUserAlly: + jumpifnoally BS_ATTACKER, BattleScript_EffectAttackUp + attackcanceler + attackstring + ppreduce + jumpifstat BS_ATTACKER, CMP_NOT_EQUAL, STAT_ATK, MAX_STAT_STAGE, BattleScript_EffectAttackUpUserAlly_Works + jumpifstat BS_ATTACKER_PARTNER, CMP_EQUAL, STAT_ATK, MAX_STAT_STAGE, BattleScript_ButItFailed +BattleScript_EffectAttackUpUserAlly_Works: + attackanimation + waitanimation + setstatchanger STAT_ATK, 1, FALSE + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_EffectAttackUpUserAlly_TryAlly + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_EffectAttackUpUserAllyUser_PrintString + setgraphicalstatchangevalues + playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 +BattleScript_EffectAttackUpUserAllyUser_PrintString: + printfromtable gStatUpStringIds + waitmessage B_WAIT_TIME_LONG +BattleScript_EffectAttackUpUserAlly_TryAlly: + setallytonexttarget BattleScript_EffectAttackUpUserAlly_TryAlly_ +BattleScript_EffectAttackUpUserAlly_End: + goto BattleScript_MoveEnd +BattleScript_EffectAttackUpUserAlly_TryAlly_: + setstatchanger STAT_ATK, 1, FALSE + statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_EffectAttackUpUserAlly_End + jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_EffectAttackUpUserAlly_AllyAnim + pause B_WAIT_TIME_SHORTEST + printstring STRINGID_TARGETSTATWONTGOHIGHER + waitmessage B_WAIT_TIME_LONG + goto BattleScript_EffectAttackUpUserAlly_End +BattleScript_EffectAttackUpUserAlly_AllyAnim: + setgraphicalstatchangevalues + playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 + printfromtable gStatUpStringIds + waitmessage B_WAIT_TIME_LONG + goto BattleScript_EffectAttackUpUserAlly_End BattleScript_EffectTeatime:: attackcanceler attackstring ppreduce jumpifteanoberry BattleScript_ButItFailed -@ at least one battler is affected +@ at least one battler is affected attackanimation waitanimation BattleScript_TeatimeLoop: @@ -446,15 +529,13 @@ BattleScript_Teatimevul: moveendcase MOVEEND_CLEAR_BITS goto BattleScript_MoveEnd BattleScript_Teatimesorb: - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_TeatimeLoop moveendcase MOVEEND_CLEAR_BITS goto BattleScript_MoveEnd BattleScript_Teatimerod: - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget playstatchangeanimation BS_TARGET, BIT_SPATK, STAT_CHANGE_BY_TWO setstatchanger STAT_SPATK, 1, FALSE statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TeatimeBuffer @@ -466,8 +547,7 @@ BattleScript_Teatimerod: moveendcase MOVEEND_CLEAR_BITS goto BattleScript_MoveEnd BattleScript_Teatimemotor: - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget playstatchangeanimation BS_TARGET, BIT_SPEED, STAT_CHANGE_BY_TWO setstatchanger STAT_SPEED, 1, FALSE statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TeatimeBuffer @@ -519,6 +599,23 @@ BattleScript_AffectionBasedStatusHeal_Continue: waitstate end2 +BattleScript_ShellTrapSetUp:: + printstring STRINGID_EMPTYSTRING3 + waitmessage 0x1 + playanimation BS_ATTACKER, B_ANIM_SHELL_TRAP_SETUP, NULL + printstring STRINGID_PREPARESHELLTRAP + waitmessage B_WAIT_TIME_LONG + end2 + +BattleScript_EffectShellTrap:: + attackcanceler + jumpifshelltrap BS_ATTACKER, BattleScript_HitFromAccCheck + jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING | HITMARKER_NO_PPDEDUCT, BattleScript_MoveEnd + ppreduce + printstring STRINGID_SHELLTRAPDIDNTWORK + waitmessage B_WAIT_TIME_LONG + goto BattleScript_MoveEnd + BattleScript_EffectSteelBeam:: attackcanceler attackstring @@ -1212,7 +1309,7 @@ BattleScript_EffectRemoveTerrain: resultmessage waitmessage B_WAIT_TIME_LONG removeterrain - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 4, BattleScript_MoveEnd + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_TERRAINENDS_COUNT, BattleScript_MoveEnd printfromtable gTerrainEndingStringIds waitmessage B_WAIT_TIME_LONG playanimation BS_ATTACKER, B_ANIM_RESTORE_BG @@ -1283,8 +1380,12 @@ BattleScript_JungleHealingTryRestoreAlly: goto BattleScript_MoveEnd BattleScript_EffectAttackerDefenseDownHit: + jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING | HITMARKER_NO_PPDEDUCT, BattleScript_NoMoveEffect setmoveeffect MOVE_EFFECT_DEF_MINUS_1 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN goto BattleScript_EffectHit +BattleScript_NoMoveEffect: + setmoveeffect 0 + goto BattleScript_EffectHit BattleScript_EffectRelicSong: setmoveeffect MOVE_EFFECT_RELIC_SONG | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN @@ -1368,7 +1469,7 @@ BattleScript_DoubleShockRemoveType:: printstring STRINGID_ATTACKERLOSTELECTRICTYPE waitmessage B_WAIT_TIME_LONG return - + BattleScript_EffectPurify: attackcanceler attackstring @@ -2086,9 +2187,14 @@ BattleScript_EffectHitSwitchTarget: moveendall jumpifability BS_TARGET, ABILITY_SUCTION_CUPS, BattleScript_AbilityPreventsPhasingOut jumpifstatus3 BS_TARGET, STATUS3_ROOTED, BattleScript_PrintMonIsRooted - tryhitswitchtarget BattleScript_EffectHitSwitchTargetMoveEnd -BattleScript_EffectHitSwitchTargetMoveEnd: - end + tryhitswitchtarget BattleScript_MoveEnd + forcerandomswitch BattleScript_HitSwitchTargetForceRandomSwitchFailed + goto BattleScript_MoveEnd + +BattleScript_HitSwitchTargetForceRandomSwitchFailed: + hitswitchtargetfailed + setbyte sSWITCH_CASE, B_SWITCH_NORMAL + goto BattleScript_MoveEnd BattleScript_EffectClearSmog: setmoveeffect MOVE_EFFECT_CLEAR_SMOG @@ -2523,8 +2629,7 @@ BattleScript_EffectPsychicTerrain: printfromtable gTerrainStringIds waitmessage B_WAIT_TIME_LONG playanimation BS_ATTACKER, B_ANIM_RESTORE_BG - call BattleScript_ActivateTerrainAbilities - call BattleScript_TerrainSeedLoop + call BattleScript_ActivateTerrainEffects goto BattleScript_MoveEnd BattleScript_EffectTopsyTurvy: @@ -2655,6 +2760,8 @@ BattleScript_EffectHealingWish: instanthpdrop BS_ATTACKER setatkhptozero tryfaintmon BS_ATTACKER + storehealingwish BS_ATTACKER +.if B_HEALING_WISH_SWITCH <= GEN_4 openpartyscreen BS_ATTACKER, BattleScript_EffectHealingWishEnd switchoutabilities BS_ATTACKER waitstate @@ -2669,11 +2776,19 @@ BattleScript_EffectHealingWish: printstring STRINGID_SWITCHINMON switchinanim BS_ATTACKER, TRUE waitstate + switchineffects BS_ATTACKER +.endif +BattleScript_EffectHealingWishEnd: + moveendall + end + +BattleScript_HealingWishActivates:: setbyte cMULTISTRING_CHOOSER, 0 - jumpifnotchosenmove MOVE_LUNAR_DANCE, BattleScript_EffectHealingWishNewMon + goto BattleScript_EffectHealingWishRestore +BattleScript_LunarDanceActivates:: setbyte cMULTISTRING_CHOOSER, 1 restorepp BS_ATTACKER -BattleScript_EffectHealingWishNewMon: +BattleScript_EffectHealingWishRestore: printfromtable gHealingWishStringIds waitmessage B_WAIT_TIME_LONG playanimation BS_ATTACKER, B_ANIM_WISH_HEAL @@ -2688,10 +2803,7 @@ BattleScript_EffectHealingWishNewMon: waitstate printstring STRINGID_HEALINGWISHHEALED waitmessage B_WAIT_TIME_LONG - switchineffects BS_ATTACKER -BattleScript_EffectHealingWishEnd: - moveendall - end + return BattleScript_EffectWorrySeed: attackcanceler @@ -3052,7 +3164,7 @@ BattleScript_EffectHitEscape: jumpifbyte CMP_NOT_EQUAL gBattleOutcome 0, BattleScript_HitEscapeEnd jumpifbattletype BATTLE_TYPE_ARENA, BattleScript_HitEscapeEnd jumpifcantswitch SWITCH_IGNORE_ESCAPE_PREVENTION | BS_ATTACKER, BattleScript_HitEscapeEnd - jumpifemergencyexited BS_TARGET, BattleScript_HitEscapeEnd + jumpifemergencyexited BS_TARGET, BattleScript_HitEscapeEnd openpartyscreen BS_ATTACKER, BattleScript_HitEscapeEnd switchoutabilities BS_ATTACKER waitstate @@ -3079,6 +3191,10 @@ BattleScript_EffectPlaceholder: printstring STRINGID_NOTDONEYET goto BattleScript_MoveEnd +BattleScript_EffectRound: + setmoveeffect MOVE_EFFECT_ROUND + goto BattleScript_EffectHit + BattleScript_EffectHit:: BattleScript_HitFromAtkCanceler:: attackcanceler @@ -3167,12 +3283,12 @@ BattleScript_EffectSleep:: jumpifuproarwakes BattleScript_CantMakeAsleep jumpifability BS_TARGET, ABILITY_INSOMNIA, BattleScript_InsomniaProtects jumpifability BS_TARGET, ABILITY_VITAL_SPIRIT, BattleScript_InsomniaProtects - jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects - jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_AbilityProtectsDoesntAffect + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_AbilityProtectsDoesntAffect jumpifflowerveil BattleScript_FlowerVeilProtects jumpifability BS_TARGET_SIDE, ABILITY_SWEET_VEIL, BattleScript_SweetVeilProtects - jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects - jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects + jumpifleafguardprotected BS_TARGET, BattleScript_AbilityProtectsDoesntAffect + jumpifshieldsdown BS_TARGET, BattleScript_AbilityProtectsDoesntAffect jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed jumpifterrainaffected BS_TARGET, STATUS_FIELD_ELECTRIC_TERRAIN, BattleScript_ElectricTerrainPrevents jumpifterrainaffected BS_TARGET, STATUS_FIELD_MISTY_TERRAIN, BattleScript_MistyTerrainPrevents @@ -3252,18 +3368,18 @@ BattleScript_PastelVeilProtects: orhalfword gMoveResultFlags, MOVE_RESULT_FAILED goto BattleScript_MoveEnd -BattleScript_LeafGuardProtectsRet:: +BattleScript_AbilityProtectsDoesntAffectRet:: pause B_WAIT_TIME_SHORT call BattleScript_AbilityPopUp printstring STRINGID_ITDOESNTAFFECT waitmessage B_WAIT_TIME_LONG return -BattleScript_LeafGuardProtects: - call BattleScript_LeafGuardProtectsRet +BattleScript_AbilityProtectsDoesntAffect: + call BattleScript_AbilityProtectsDoesntAffectRet orhalfword gMoveResultFlags, MOVE_RESULT_FAILED goto BattleScript_MoveEnd - + BattleScript_InsomniaProtects: pause B_WAIT_TIME_SHORT call BattleScript_AbilityPopUp @@ -3294,6 +3410,7 @@ BattleScript_CantMakeAsleep:: orhalfword gMoveResultFlags, MOVE_RESULT_FAILED goto BattleScript_MoveEnd +BattleScript_EffectBarbBarrage: BattleScript_EffectPoisonHit: setmoveeffect MOVE_EFFECT_POISON goto BattleScript_EffectHit @@ -3325,8 +3442,7 @@ BattleScript_EffectAbsorb:: setbyte cMULTISTRING_CHOOSER, B_MSG_ABSORB goto BattleScript_AbsorbUpdateHp BattleScript_AbsorbLiquidOoze:: - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget manipulatedamage DMG_CHANGE_SIGN setbyte cMULTISTRING_CHOOSER, B_MSG_ABSORB_OOZE BattleScript_AbsorbUpdateHp:: @@ -3357,26 +3473,19 @@ BattleScript_EffectParalyzeHit:: setmoveeffect MOVE_EFFECT_PARALYSIS goto BattleScript_EffectHit -BattleScript_EffectExplosion:: - attackcanceler - attackstring - ppreduce -@ Below jumps to BattleScript_DampStopsExplosion if it fails (only way it can) - tryexplosion - setatkhptozero - waitstate - jumpifbyte CMP_NO_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_MISSED, BattleScript_ExplosionDoAnimStartLoop +BattleScript_EffectExplosion_AnimDmgRet: + jumpifbyte CMP_NO_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_MISSED, BattleScript_ExplosionAnimRet call BattleScript_PreserveMissedBitDoMoveAnim - goto BattleScript_ExplosionLoop -BattleScript_ExplosionDoAnimStartLoop: + goto BattleScript_ExplosionDmgRet +BattleScript_ExplosionAnimRet: attackanimation waitanimation -BattleScript_ExplosionLoop: +BattleScript_ExplosionDmgRet: movevaluescleanup critcalc damagecalc adjustdamage - accuracycheck BattleScript_ExplosionMissed, ACC_CURR_MOVE + accuracycheck BattleScript_ExplosionMissedRet, ACC_CURR_MOVE effectivenesssound hitanimation BS_TARGET waitstate @@ -3387,17 +3496,25 @@ BattleScript_ExplosionLoop: resultmessage waitmessage B_WAIT_TIME_LONG tryfaintmon BS_TARGET - moveendto MOVEEND_NEXT_TARGET - jumpifnexttargetvalid BattleScript_ExplosionLoop - tryfaintmon BS_ATTACKER - moveendcase MOVEEND_CLEAR_BITS - end -BattleScript_ExplosionMissed: +BattleScript_ExplosionAnimEndRet_Return: + return +BattleScript_ExplosionMissedRet: effectivenesssound resultmessage waitmessage B_WAIT_TIME_LONG - moveendto MOVEEND_NEXT_TARGET - jumpifnexttargetvalid BattleScript_ExplosionLoop + goto BattleScript_ExplosionAnimEndRet_Return + +BattleScript_EffectExplosion:: + attackcanceler + attackstring + ppreduce +@ Below jumps to BattleScript_DampStopsExplosion if it fails (only way it can) + tryexplosion + waitstate +BattleScript_EffectExplosion_AnimDmgFaintAttacker: + call BattleScript_EffectExplosion_AnimDmgRet + moveendall + setatkhptozero tryfaintmon BS_ATTACKER end @@ -3405,14 +3522,28 @@ BattleScript_EffectMindBlown:: attackcanceler attackstring ppreduce - tryexplosion + jumpifbyte CMP_GREATER_THAN, sB_ANIM_TARGETS_HIT, 0, BattleScript_EffectMindBlown_NoHpLoss + jumpifabilitypresent ABILITY_DAMP, BattleScript_MindBlownDamp + jumpifmorethanhalfHP BS_ATTACKER, BattleScript_EffectMindBlown_HpDown + setbyte sMULTIHIT_EFFECT, 0 @ Note to faint the attacker + instanthpdrop BS_ATTACKER + waitstate + goto BattleScript_EffectExplosion_AnimDmgFaintAttacker +BattleScript_EffectMindBlown_NoHpLoss: + jumpifbyte CMP_EQUAL, sMULTIHIT_EFFECT, 0, BattleScript_EffectExplosion_AnimDmgFaintAttacker + goto BattleScript_EffectMindBlown_AnimDmgNoFaint +BattleScript_MindBlownDamp: + copybyte gBattlerTarget, gBattlerAbility + goto BattleScript_DampStopsExplosion +BattleScript_EffectMindBlown_HpDown: + setbyte sMULTIHIT_EFFECT, 1 @ Note to not faint the attacker dmg_1_2_attackerhp healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER waitstate - jumpifbyte CMP_NO_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_MISSED, BattleScript_ExplosionDoAnimStartLoop - call BattleScript_PreserveMissedBitDoMoveAnim - goto BattleScript_ExplosionLoop +BattleScript_EffectMindBlown_AnimDmgNoFaint: + call BattleScript_EffectExplosion_AnimDmgRet + goto BattleScript_MoveEnd BattleScript_PreserveMissedBitDoMoveAnim: bichalfword gMoveResultFlags, MOVE_RESULT_MISSED @@ -3581,7 +3712,7 @@ BattleScript_MirrorArmorReflect:: call BattleScript_AbilityPopUp jumpifsubstituteblocks BattleScript_AbilityNoSpecificStatLoss BattleScript_MirrorArmorReflectStatLoss: - statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_MirrorArmorReflectEnd + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_MIRROR_ARMOR | STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_MirrorArmorReflectEnd jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_MirrorArmorReflectAnim goto BattleScript_MirrorArmorReflectWontFall BattleScript_MirrorArmorReflectAnim: @@ -3652,7 +3783,6 @@ BattleScript_EffectRoar:: accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON accuracycheck BattleScript_MoveMissedPause, ACC_CURR_MOVE jumpifbattletype BATTLE_TYPE_ARENA, BattleScript_ButItFailed -BattleScript_ForceRandomSwitch:: forcerandomswitch BattleScript_ButItFailed BattleScript_EffectMultiHit:: @@ -3770,12 +3900,12 @@ BattleScript_EffectToxic:: attackstring ppreduce jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected - jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects - jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_AbilityProtectsDoesntAffect + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_AbilityProtectsDoesntAffect jumpifability BS_TARGET_SIDE, ABILITY_PASTEL_VEIL, BattleScript_PastelVeilProtects jumpifflowerveil BattleScript_FlowerVeilProtects - jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects - jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects + jumpifleafguardprotected BS_TARGET, BattleScript_AbilityProtectsDoesntAffect + jumpifshieldsdown BS_TARGET, BattleScript_AbilityProtectsDoesntAffect jumpifsubstituteblocks BattleScript_ButItFailed jumpifstatus BS_TARGET, STATUS1_POISON | STATUS1_TOXIC_POISON, BattleScript_AlreadyPoisoned jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed @@ -4111,12 +4241,12 @@ BattleScript_EffectPoison:: attackstring ppreduce jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected - jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects - jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_AbilityProtectsDoesntAffect + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_AbilityProtectsDoesntAffect jumpifability BS_TARGET_SIDE, ABILITY_PASTEL_VEIL, BattleScript_PastelVeilProtects jumpifflowerveil BattleScript_FlowerVeilProtects - jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects - jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects + jumpifleafguardprotected BS_TARGET, BattleScript_AbilityProtectsDoesntAffect + jumpifshieldsdown BS_TARGET, BattleScript_AbilityProtectsDoesntAffect jumpifsubstituteblocks BattleScript_ButItFailed jumpifstatus BS_TARGET, STATUS1_POISON, BattleScript_AlreadyPoisoned jumpifstatus BS_TARGET, STATUS1_TOXIC_POISON, BattleScript_AlreadyPoisoned @@ -4138,11 +4268,11 @@ BattleScript_EffectParalyze: attackstring ppreduce jumpifability BS_TARGET, ABILITY_LIMBER, BattleScript_LimberProtected - jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects - jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_AbilityProtectsDoesntAffect + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_AbilityProtectsDoesntAffect jumpifflowerveil BattleScript_FlowerVeilProtects - jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects - jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects + jumpifleafguardprotected BS_TARGET, BattleScript_AbilityProtectsDoesntAffect + jumpifshieldsdown BS_TARGET, BattleScript_AbilityProtectsDoesntAffect jumpifsubstituteblocks BattleScript_ButItFailed typecalc BattleScript_BattleScript_EffectParalyzeNoTypeCalc: @@ -4162,7 +4292,7 @@ BattleScript_BattleScript_EffectParalyzeNoTypeCalc: resultmessage waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd - + BattleScript_VoltAbsorbHeal: copybyte gBattlerAbility, gBattlerTarget tryhealquarterhealth BS_TARGET BattleScript_MonMadeMoveUseless @ Check if max hp @@ -5430,9 +5560,8 @@ BattleScript_NotAffected:: goto BattleScript_MoveEnd BattleScript_NotAffectedAbilityPopUp:: - copybyte gBattlerAbility, gBattlerTarget pause B_WAIT_TIME_SHORT - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget orhalfword gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE resultmessage waitmessage B_WAIT_TIME_LONG @@ -5457,6 +5586,9 @@ BattleScript_EffectStockpile:: waitanimation printfromtable gStockpileUsedStringIds waitmessage B_WAIT_TIME_LONG + .if B_STOCKPILE_RAISES_DEFS < GEN_4 + goto BattleScript_EffectStockpileEnd + .endif jumpifmovehadnoeffect BattleScript_EffectStockpileEnd jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, MAX_STAT_STAGE, BattleScript_EffectStockpileDef jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, MAX_STAT_STAGE, BattleScript_EffectStockpileEnd @@ -5478,6 +5610,23 @@ BattleScript_EffectStockpileEnd: stockpile 1 goto BattleScript_MoveEnd +BattleScript_MoveEffectStockpileWoreOff:: + .if B_STOCKPILE_RAISES_DEFS >= GEN_4 + dostockpilestatchangeswearoff BS_ATTACKER, BattleScript_StockpileStatChangeDown + printstring STRINGID_STOCKPILEDEFFECTWOREOFF + waitmessage B_WAIT_TIME_SHORT + .endif + return + +BattleScript_StockpileStatChangeDown: + statbuffchange MOVE_EFFECT_AFFECTS_USER, BattleScript_StockpileStatChangeDown_Ret + setgraphicalstatchangevalues + playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 + printfromtable gStatDownStringIds + waitmessage B_WAIT_TIME_LONG +BattleScript_StockpileStatChangeDown_Ret: + return + BattleScript_EffectSpitUp:: attackcanceler jumpifbyte CMP_EQUAL, cMISS_TYPE, B_MSG_PROTECTED, BattleScript_SpitUpFailProtect @@ -5574,11 +5723,11 @@ BattleScript_EffectWillOWisp:: jumpiftype BS_TARGET, TYPE_FIRE, BattleScript_NotAffected jumpifability BS_TARGET, ABILITY_WATER_VEIL, BattleScript_WaterVeilPrevents jumpifability BS_TARGET, ABILITY_WATER_BUBBLE, BattleScript_WaterVeilPrevents - jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects - jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_AbilityProtectsDoesntAffect + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_AbilityProtectsDoesntAffect jumpifflowerveil BattleScript_FlowerVeilProtects - jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects - jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects + jumpifleafguardprotected BS_TARGET, BattleScript_AbilityProtectsDoesntAffect + jumpifshieldsdown BS_TARGET, BattleScript_AbilityProtectsDoesntAffect jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed jumpifterrainaffected BS_TARGET, STATUS_FIELD_MISTY_TERRAIN, BattleScript_MistyTerrainPrevents accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE @@ -5670,6 +5819,9 @@ BattleScript_EffectFollowMe:: attackcanceler attackstring ppreduce + .if B_UPDATED_MOVE_DATA >= GEN_6 + jumpifnotbattletype BATTLE_TYPE_DOUBLE, BattleScript_ButItFailed + .endif setforcedtarget attackanimation waitanimation @@ -5868,10 +6020,10 @@ BattleScript_EffectYawn:: jumpifability BS_TARGET, ABILITY_VITAL_SPIRIT, BattleScript_PrintBattlerAbilityMadeIneffective jumpifability BS_TARGET, ABILITY_INSOMNIA, BattleScript_PrintBattlerAbilityMadeIneffective jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_PrintBattlerAbilityMadeIneffective - jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_AbilityProtectsDoesntAffect jumpifflowerveil BattleScript_FlowerVeilProtects - jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects - jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects + jumpifleafguardprotected BS_TARGET, BattleScript_AbilityProtectsDoesntAffect + jumpifshieldsdown BS_TARGET, BattleScript_AbilityProtectsDoesntAffect jumpifsubstituteblocks BattleScript_ButItFailed jumpifsafeguard BattleScript_SafeguardProtected accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON @@ -5918,8 +6070,7 @@ BattleScript_EffectSkillSwap: attackanimation waitanimation .if B_ABILITY_POP_UP == TRUE - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget pause 20 copybyte gBattlerAbility, gBattlerAttacker call BattleScript_AbilityPopUp @@ -6731,7 +6882,7 @@ BattleScript_OverworldTerrain:: printfromtable gTerrainStringIds waitmessage B_WAIT_TIME_LONG playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG - call BattleScript_TerrainSeedLoop + call BattleScript_ActivateTerrainEffects end3 BattleScript_SideStatusWoreOff:: @@ -6769,28 +6920,16 @@ BattleScript_MagicRoomEnds:: waitmessage B_WAIT_TIME_LONG end2 -BattleScript_ElectricTerrainEnds:: - printstring STRINGID_ELECTRICTERRAINENDS +BattleScript_GrassyTerrainEnds: + setbyte cMULTISTRING_CHOOSER, B_MSG_TERRAINENDS_GRASS +BattleScript_TerrainEnds_Ret:: + printfromtable gTerrainEndingStringIds waitmessage B_WAIT_TIME_LONG playanimation BS_ATTACKER, B_ANIM_RESTORE_BG - end2 + return -BattleScript_MistyTerrainEnds:: - printstring STRINGID_MISTYTERRAINENDS - waitmessage B_WAIT_TIME_LONG - playanimation BS_ATTACKER, B_ANIM_RESTORE_BG - end2 - -BattleScript_GrassyTerrainEnds:: - printstring STRINGID_GRASSYTERRAINENDS - waitmessage B_WAIT_TIME_LONG - playanimation BS_ATTACKER, B_ANIM_RESTORE_BG - end2 - -BattleScript_PsychicTerrainEnds:: - printstring STRINGID_PSYCHICTERRAINENDS - waitmessage B_WAIT_TIME_LONG - playanimation BS_ATTACKER, B_ANIM_RESTORE_BG +BattleScript_TerrainEnds:: + call BattleScript_TerrainEnds_Ret end2 BattleScript_MudSportEnds:: @@ -7201,8 +7340,7 @@ BattleScript_SeedSowerActivates:: printstring STRINGID_TERRAINBECOMESGRASSY waitmessage B_WAIT_TIME_LONG playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG - call BattleScript_ActivateTerrainAbilities - call BattleScript_TerrainSeedLoop + call BattleScript_ActivateTerrainEffects return BattleScript_AngerShellActivates:: @@ -7332,6 +7470,26 @@ BattleScript_StealthRockFree:: waitmessage B_WAIT_TIME_LONG return +BattleScript_SpikesDefog:: + printstring STRINGID_SPIKESDISAPPEAREDFROMTEAM + waitmessage B_WAIT_TIME_LONG + return + +BattleScript_ToxicSpikesDefog:: + printstring STRINGID_TOXICSPIKESDISAPPEAREDFROMTEAM + waitmessage B_WAIT_TIME_LONG + return + +BattleScript_StickyWebDefog:: + printstring STRINGID_STICKYWEBDISAPPEAREDFROMTEAM + waitmessage B_WAIT_TIME_LONG + return + +BattleScript_StealthRockDefog:: + printstring STRINGID_STEALTHROCKDISAPPEAREDFROMTEAM + waitmessage B_WAIT_TIME_LONG + return + BattleScript_MonTookFutureAttack:: printstring STRINGID_PKMNTOOKATTACK waitmessage B_WAIT_TIME_LONG @@ -7612,6 +7770,9 @@ BattleScript_MagicCoatBounce:: attackstring ppreduce pause B_WAIT_TIME_SHORT + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0, BattleScript_MagicCoatBounce_Print + call BattleScript_AbilityPopUp +BattleScript_MagicCoatBounce_Print: printfromtable gMagicCoatBounceStringIds waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_ALLOW_NO_PP @@ -7647,9 +7808,8 @@ BattleScript_EnduredMsg:: return BattleScript_SturdiedMsg:: - copybyte gBattlerAbility, gBattlerTarget pause B_WAIT_TIME_SHORTEST - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget printstring STRINGID_ENDUREDSTURDY waitmessage B_WAIT_TIME_LONG return @@ -7685,6 +7845,7 @@ BattleScript_FocusPunchSetUp:: BattleScript_MegaEvolution:: printstring STRINGID_MEGAEVOREACTING +BattleScript_MegaEvolutionAfeterString: waitmessage B_WAIT_TIME_LONG setbyte gIsCriticalHit, 0 handlemegaevo BS_ATTACKER, 0 @@ -7699,17 +7860,7 @@ BattleScript_MegaEvolution:: BattleScript_WishMegaEvolution:: printstring STRINGID_FERVENTWISHREACHED - waitmessage B_WAIT_TIME_LONG - setbyte gIsCriticalHit, 0 - handlemegaevo BS_ATTACKER, 0 - handlemegaevo BS_ATTACKER, 1 - playanimation BS_ATTACKER, B_ANIM_MEGA_EVOLUTION - waitanimation - handlemegaevo BS_ATTACKER, 2 - printstring STRINGID_MEGAEVOEVOLVED - waitmessage B_WAIT_TIME_LONG - switchinabilities BS_ATTACKER - end2 + goto BattleScript_MegaEvolutionAfeterString BattleScript_PrimalReversion:: printstring STRINGID_EMPTYSTRING3 @@ -7790,8 +7941,7 @@ BattleScript_CudChewActivates:: BattleScript_TargetFormChange:: pause 5 - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget printstring STRINGID_EMPTYSTRING3 waitmessage 1 handleformchange BS_TARGET, 0 @@ -7803,8 +7953,7 @@ BattleScript_TargetFormChange:: BattleScript_TargetFormChangeWithString:: pause 5 - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget printstring STRINGID_EMPTYSTRING3 waitmessage 1 handleformchange BS_TARGET, 0 @@ -7886,7 +8035,7 @@ BattleScript_AftermathDmg:: waitmessage B_WAIT_TIME_LONG tryfaintmon BS_ATTACKER return - + BattleScript_DampPreventsAftermath:: pause B_WAIT_TIME_SHORT call BattleScript_AbilityPopUp @@ -8267,12 +8416,14 @@ BattleScript_AbilityRaisesDefenderStat:: waitmessage B_WAIT_TIME_LONG return +BattleScript_AbilityPopUpTarget: + copybyte gBattlerAbility, gBattlerTarget BattleScript_AbilityPopUp: .if B_ABILITY_POP_UP == TRUE showabilitypopup BS_ABILITY_BATTLER - recordability BS_ABILITY_BATTLER pause 40 .endif + recordability BS_ABILITY_BATTLER sethword sABILITY_OVERWRITE, 0 return @@ -8483,7 +8634,6 @@ BattleScript_TryAdrenalineOrbRet: return BattleScript_IntimidateActivates:: - jumpifnovalidtargets BattleScript_IntimidateEnd showabilitypopup BS_ATTACKER pause B_WAIT_TIME_LONG destroyabilitypopup @@ -8491,6 +8641,7 @@ BattleScript_IntimidateActivates:: BattleScript_IntimidateLoop: jumpifbyteequal gBattlerTarget, gBattlerAttacker, BattleScript_IntimidateLoopIncrement jumpiftargetally BattleScript_IntimidateLoopIncrement + jumpifabsent BS_TARGET, BattleScript_IntimidateLoopIncrement jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_IntimidateLoopIncrement jumpifholdeffect BS_TARGET, HOLD_EFFECT_CLEAR_AMULET, BattleScript_IntimidatePrevented_Item jumpifability BS_TARGET, ABILITY_CLEAR_BODY, BattleScript_IntimidatePrevented @@ -8507,8 +8658,10 @@ BattleScript_IntimidateEffect: copybyte sBATTLER, gBattlerAttacker statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_IntimidateLoopIncrement setgraphicalstatchangevalues + jumpifability BS_TARGET, ABILITY_CONTRARY, BattleScript_IntimidateContrary playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printstring STRINGID_PKMNCUTSATTACKWITH +BattleScript_IntimidateEffect_WaitString: waitmessage B_WAIT_TIME_LONG copybyte sBATTLER, gBattlerTarget call BattleScript_TryAdrenalineOrb @@ -8516,10 +8669,21 @@ BattleScript_IntimidateLoopIncrement: addbyte gBattlerTarget, 1 jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_IntimidateLoop BattleScript_IntimidateEnd: + copybyte sBATTLER, gBattlerAttacker destroyabilitypopup pause B_WAIT_TIME_MED end3 +BattleScript_IntimidateContrary: + call BattleScript_AbilityPopUpTarget + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_IntimidateContrary_WontIncrease + playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 + printfromtable gStatUpStringIds + goto BattleScript_IntimidateEffect_WaitString +BattleScript_IntimidateContrary_WontIncrease: + printstring STRINGID_TARGETSTATWONTGOHIGHER + goto BattleScript_IntimidateEffect_WaitString + BattleScript_IntimidatePrevented: call BattleScript_AbilityPopUp pause B_WAIT_TIME_LONG @@ -8533,8 +8697,7 @@ BattleScript_IntimidatePrevented_Item: BattleScript_IntimidateInReverse: copybyte sBATTLER, gBattlerTarget - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget pause B_WAIT_TIME_SHORT modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_IntimidateLoopIncrement, ANIM_ON call BattleScript_TryAdrenalineOrb @@ -8655,18 +8818,19 @@ BattleScript_SnowWarningActivates:: call BattleScript_WeatherFormChanges end3 -BattleScript_TerrainSeedLoop: +BattleScript_ActivateTerrainEffects: savetarget setbyte gBattlerTarget, 0 -BattleScript_TerrainSeedLoopIter: +BattleScript_ActivateTerrainSeed: copybyte sBATTLER, gBattlerTarget - doterrainseed BS_TARGET, BattleScript_TerrainSeedLoop_NextBattler + doterrainseed BS_TARGET, BattleScript_ActivateTerrainAbility removeitem BS_TARGET -BattleScript_TerrainSeedLoop_NextBattler: +BattleScript_ActivateTerrainAbility: + activateterrainchangeabilities BS_TARGET +BattleScript_ActivateTerrainEffects_Increment: addbyte gBattlerTarget, 0x1 - jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TerrainSeedLoopIter + jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_ActivateTerrainSeed restoretarget - call BattleScript_ActivateSwitchInAbilities return BattleScript_ActivateSwitchInAbilities: @@ -8680,25 +8844,13 @@ BattleScript_ActivateSwitchInAbilities_Increment: copybyte gBattlerAttacker, sBATTLER return -BattleScript_ActivateTerrainAbilities: - copybyte sBATTLER, gBattlerAttacker - setbyte gBattlerAttacker, 0 -BattleScript_ActivateTerrainAbilities_Loop: - activateterrainchangeabilities BS_ATTACKER -BattleScript_ActivateTerrainAbilities_Increment: - addbyte gBattlerAttacker, 1 - jumpifbytenotequal gBattlerAttacker, gBattlersCount, BattleScript_ActivateTerrainAbilities_Loop - copybyte gBattlerAttacker, sBATTLER - return - BattleScript_ElectricSurgeActivates:: pause B_WAIT_TIME_SHORT call BattleScript_AbilityPopUp printstring STRINGID_TERRAINBECOMESELECTRIC waitmessage B_WAIT_TIME_LONG playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG - call BattleScript_ActivateTerrainAbilities - call BattleScript_TerrainSeedLoop + call BattleScript_ActivateTerrainEffects end3 BattleScript_MistySurgeActivates:: @@ -8707,8 +8859,7 @@ BattleScript_MistySurgeActivates:: printstring STRINGID_TERRAINBECOMESMISTY waitmessage B_WAIT_TIME_LONG playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG - call BattleScript_ActivateTerrainAbilities - call BattleScript_TerrainSeedLoop + call BattleScript_ActivateTerrainEffects end3 BattleScript_GrassySurgeActivates:: @@ -8717,8 +8868,7 @@ BattleScript_GrassySurgeActivates:: printstring STRINGID_TERRAINBECOMESGRASSY waitmessage B_WAIT_TIME_LONG playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG - call BattleScript_ActivateTerrainAbilities - call BattleScript_TerrainSeedLoop + call BattleScript_ActivateTerrainEffects end3 BattleScript_PsychicSurgeActivates:: @@ -8727,8 +8877,7 @@ BattleScript_PsychicSurgeActivates:: printstring STRINGID_TERRAINBECOMESPSYCHIC waitmessage B_WAIT_TIME_LONG playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG - call BattleScript_ActivateTerrainAbilities - call BattleScript_TerrainSeedLoop + call BattleScript_ActivateTerrainEffects end3 BattleScript_HurtTarget_NoString: @@ -8777,8 +8926,7 @@ BattleScript_SturdyPreventsOHKO:: BattleScript_DampStopsExplosion:: pause B_WAIT_TIME_SHORT - copybyte gBattlerAbility, gBattlerTarget - call BattleScript_AbilityPopUp + call BattleScript_AbilityPopUpTarget printstring STRINGID_PKMNPREVENTSUSAGE pause B_WAIT_TIME_LONG moveendto MOVEEND_NEXT_TARGET @@ -9005,7 +9153,7 @@ BattleScript_WanderingSpiritActivates:: pause 20 destroyabilitypopup pause 40 - + copybyte gBattlerAbility, gBattlerAttacker setbyte sFIXED_ABILITY_POPUP, TRUE copyhword sABILITY_OVERWRITE, gLastUsedAbility showabilitypopup BS_ATTACKER @@ -9042,16 +9190,6 @@ BattleScript_BattlerAbilityStatRaiseOnSwitchIn:: waitmessage B_WAIT_TIME_LONG end3 -BattleScript_TargetAbilityStatRaiseOnMoveEnd:: - call BattleScript_AbilityPopUp - statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | MOVE_EFFECT_CERTAIN, NULL - setgraphicalstatchangevalues - playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 - waitanimation - printstring STRINGID_ABILITYRAISEDSTATDRASTICALLY - waitmessage B_WAIT_TIME_LONG - return - BattleScript_ScriptingAbilityStatRaise:: copybyte gBattlerAbility, sBATTLER call BattleScript_AbilityPopUp @@ -10022,7 +10160,6 @@ BattleScript_EffectHitSetRemoveTerrain: setterrain BattleScript_TryFaint playanimation BS_ATTACKER, B_ANIM_RESTORE_BG printfromtable gTerrainStringIds - call BattleScript_ActivateTerrainAbilities BattleScript_TryFaint: tryfaintmon BS_TARGET goto BattleScript_MoveEnd @@ -10220,3 +10357,8 @@ BattleScript_PokemonCantUseTheMove:: printstring STRINGID_BUTPOKEMONCANTUSETHEMOVE waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd + +BattleScript_CouldntFullyProtect:: + printstring STRINGID_COULDNTFULLYPROTECT + waitmessage B_WAIT_TIME_LONG + return diff --git a/data/battle_scripts_2.s b/data/battle_scripts_2.s index 9b26cbd0d7..9ffad7d843 100644 --- a/data/battle_scripts_2.s +++ b/data/battle_scripts_2.s @@ -3,205 +3,255 @@ #include "constants/battle_script_commands.h" #include "constants/battle_anim.h" #include "constants/battle_string_ids.h" -#include "constants/items.h" +#include "constants/moves.h" #include "constants/songs.h" #include "constants/game_stat.h" - .include "asm/macros.inc" - .include "asm/macros/battle_script.inc" - .include "constants/constants.inc" + .include "asm/macros.inc" + .include "asm/macros/battle_script.inc" + .include "constants/constants.inc" - .section script_data, "aw", %progbits + .section script_data, "aw", %progbits - .align 2 + .align 2 gBattlescriptsForUsingItem:: - .4byte BattleScript_PlayerUsesItem - .4byte BattleScript_OpponentUsesHealItem @ AI_ITEM_FULL_RESTORE - .4byte BattleScript_OpponentUsesHealItem @ AI_ITEM_HEAL_HP - .4byte BattleScript_OpponentUsesStatusCureItem @ AI_ITEM_CURE_CONDITION - .4byte BattleScript_OpponentUsesXItem @ AI_ITEM_X_STAT - .4byte BattleScript_OpponentUsesGuardSpec @ AI_ITEM_GUARD_SPEC + .4byte BattleScript_ItemRestoreHP @ EFFECT_ITEM_RESTORE_HP + .4byte BattleScript_ItemCureStatus @ EFFECT_ITEM_CURE_STATUS + .4byte BattleScript_ItemHealAndCureStatus @ EFFECT_ITEM_HEAL_AND_CURE_STATUS + .4byte BattleScript_ItemIncreaseStat @ EFFECT_ITEM_INCREASE_STAT + .4byte BattleScript_ItemSetMist @ EFFECT_ITEM_SET_MIST + .4byte BattleScript_ItemSetFocusEnergy @ EFFECT_ITEM_SET_FOCUS_ENERGY + .4byte BattleScript_RunByUsingItem @ EFFECT_ITEM_ESCAPE + .4byte BattleScript_BallThrow @ EFFECT_ITEM_THROW_BALL + .4byte BattleScript_ItemRestoreHP @ EFFECT_ITEM_REVIVE + .4byte BattleScript_ItemRestorePP @ EFFECT_ITEM_RESTORE_PP + .4byte BattleScript_ItemIncreaseAllStats @ EFFECT_ITEM_INCREASE_ALL_STATS - .align 2 -gBattlescriptsForRunningByItem:: - .4byte BattleScript_RunByUsingItem - - .align 2 + .align 2 gBattlescriptsForSafariActions:: - .4byte BattleScript_ActionWatchesCarefully - .4byte BattleScript_ActionGetNear - .4byte BattleScript_ActionThrowPokeblock - .4byte BattleScript_ActionWallyThrow + .4byte BattleScript_ActionWatchesCarefully + .4byte BattleScript_ActionGetNear + .4byte BattleScript_ActionThrowPokeblock + .4byte BattleScript_ActionWallyThrow + +BattleScript_ItemEnd: + end + +BattleScript_UseItemMessage: + printstring STRINGID_EMPTYSTRING3 + pause B_WAIT_TIME_MED + playse SE_USE_ITEM + getbattlerside BS_ATTACKER + copybyte cMULTISTRING_CHOOSER, gBattleCommunication + printfromtable gTrainerUsedItemStringIds + waitmessage B_WAIT_TIME_LONG + return + +BattleScript_ItemRestoreHP:: + call BattleScript_UseItemMessage + itemrestorehp + jumpifbyte CMP_EQUAL, gBattleCommunication, TRUE, BattleScript_ItemRestoreHP_SendOutRevivedBattler + bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE + healthbarupdate BS_ATTACKER + datahpupdate BS_ATTACKER + printstring STRINGID_ITEMRESTOREDSPECIESHEALTH + waitmessage B_WAIT_TIME_LONG + end + +BattleScript_ItemRestoreHP_SendOutRevivedBattler: + switchinanim BS_ATTACKER, FALSE + waitstate + switchineffects BS_ATTACKER + end + +BattleScript_ItemCureStatus:: + call BattleScript_UseItemMessage + itemcurestatus + updatestatusicon BS_ATTACKER + printstring STRINGID_ITEMCUREDSPECIESSTATUS + waitmessage B_WAIT_TIME_LONG + end + +BattleScript_ItemHealAndCureStatus:: + call BattleScript_UseItemMessage + itemrestorehp + curestatus BS_ATTACKER + bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE + healthbarupdate BS_ATTACKER + datahpupdate BS_ATTACKER + updatestatusicon BS_ATTACKER + printstring STRINGID_ITEMRESTOREDSPECIESHEALTH + waitmessage B_WAIT_TIME_LONG + end + +BattleScript_ItemIncreaseStat:: + call BattleScript_UseItemMessage + itemincreasestat + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_ItemEnd + setgraphicalstatchangevalues + playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 + printfromtable gStatUpStringIds + waitmessage B_WAIT_TIME_LONG + end + +BattleScript_ItemSetMist:: + call BattleScript_UseItemMessage + setmist + playmoveanimation BS_ATTACKER, MOVE_MIST + waitanimation + printfromtable gMistUsedStringIds + waitmessage B_WAIT_TIME_LONG + end + +BattleScript_ItemSetFocusEnergy:: + call BattleScript_UseItemMessage + jumpifstatus2 BS_ATTACKER, STATUS2_FOCUS_ENERGY, BattleScript_ButItFailed + setfocusenergy + playmoveanimation BS_ATTACKER, MOVE_FOCUS_ENERGY + waitanimation + printstring STRINGID_PKMNUSEDXTOGETPUMPED + waitmessage B_WAIT_TIME_LONG + end + +BattleScript_ItemRestorePP:: + call BattleScript_UseItemMessage + itemrestorepp + printstring STRINGID_ITEMRESTOREDSPECIESPP + waitmessage B_WAIT_TIME_LONG + end + +BattleScript_ItemIncreaseAllStats:: + call BattleScript_UseItemMessage + call BattleScript_AllStatsUp + end BattleScript_BallThrow:: - jumpifword CMP_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_WALLY_TUTORIAL, BattleScript_BallThrowByWally - printstring STRINGID_PLAYERUSEDITEM - handleballthrow + jumpifword CMP_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_WALLY_TUTORIAL, BattleScript_BallThrowByWally + printstring STRINGID_PLAYERUSEDITEM + handleballthrow BattleScript_BallThrowByWally:: - printstring STRINGID_WALLYUSEDITEM - handleballthrow + printstring STRINGID_WALLYUSEDITEM + handleballthrow BattleScript_SafariBallThrow:: - printstring STRINGID_PLAYERUSEDITEM - updatestatusicon BS_ATTACKER - handleballthrow + printstring STRINGID_PLAYERUSEDITEM + updatestatusicon BS_ATTACKER + handleballthrow BattleScript_SuccessBallThrow:: - setbyte sMON_CAUGHT, TRUE - incrementgamestat GAME_STAT_POKEMON_CAPTURES + setbyte sMON_CAUGHT, TRUE + incrementgamestat GAME_STAT_POKEMON_CAPTURES BattleScript_PrintCaughtMonInfo:: - printstring STRINGID_GOTCHAPKMNCAUGHT - jumpifbyte CMP_NOT_EQUAL, sEXP_CATCH, TRUE, BattleScript_TryPrintCaughtMonInfo - setbyte sGIVEEXP_STATE, 0 - getexp BS_TARGET - sethword gBattle_BG2_X, 0 + printstring STRINGID_GOTCHAPKMNCAUGHTPLAYER + jumpifbyte CMP_NOT_EQUAL, sEXP_CATCH, TRUE, BattleScript_TryPrintCaughtMonInfo + setbyte sGIVEEXP_STATE, 0 + getexp BS_TARGET + sethword gBattle_BG2_X, 0 BattleScript_TryPrintCaughtMonInfo: - trysetcaughtmondexflags BattleScript_TryNicknameCaughtMon - printstring STRINGID_PKMNDATAADDEDTODEX - waitstate - setbyte gBattleCommunication, 0 - displaydexinfo + trysetcaughtmondexflags BattleScript_TryNicknameCaughtMon + printstring STRINGID_PKMNDATAADDEDTODEX + waitstate + setbyte gBattleCommunication, 0 + displaydexinfo BattleScript_TryNicknameCaughtMon:: - printstring STRINGID_GIVENICKNAMECAPTURED - waitstate - setbyte gBattleCommunication, 0 - trygivecaughtmonnick BattleScript_GiveCaughtMonEnd - givecaughtmon - printfromtable gCaughtMonStringIds - waitmessage B_WAIT_TIME_LONG - goto BattleScript_SuccessBallThrowEnd + printstring STRINGID_GIVENICKNAMECAPTURED + waitstate + setbyte gBattleCommunication, 0 + trygivecaughtmonnick BattleScript_GiveCaughtMonEnd + givecaughtmon + printfromtable gCaughtMonStringIds + waitmessage B_WAIT_TIME_LONG + goto BattleScript_SuccessBallThrowEnd BattleScript_GiveCaughtMonEnd:: - givecaughtmon + givecaughtmon BattleScript_SuccessBallThrowEnd:: - setbyte gBattleOutcome, B_OUTCOME_CAUGHT - finishturn + setbyte gBattleOutcome, B_OUTCOME_CAUGHT + finishturn BattleScript_WallyBallThrow:: - printstring STRINGID_GOTCHAPKMNCAUGHT2 - setbyte gBattleOutcome, B_OUTCOME_CAUGHT - finishturn + printstring STRINGID_GOTCHAPKMNCAUGHTWALLY + setbyte gBattleOutcome, B_OUTCOME_CAUGHT + finishturn BattleScript_ShakeBallThrow:: - printfromtable gBallEscapeStringIds - waitmessage B_WAIT_TIME_LONG - jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_SAFARI, BattleScript_ShakeBallThrowEnd - jumpifbyte CMP_NOT_EQUAL, gNumSafariBalls, 0, BattleScript_ShakeBallThrowEnd - printstring STRINGID_OUTOFSAFARIBALLS - waitmessage B_WAIT_TIME_LONG - setbyte gBattleOutcome, B_OUTCOME_NO_SAFARI_BALLS + printfromtable gBallEscapeStringIds + waitmessage B_WAIT_TIME_LONG + jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_SAFARI, BattleScript_ShakeBallThrowEnd + jumpifbyte CMP_NOT_EQUAL, gNumSafariBalls, 0, BattleScript_ShakeBallThrowEnd + printstring STRINGID_OUTOFSAFARIBALLS + waitmessage B_WAIT_TIME_LONG + setbyte gBattleOutcome, B_OUTCOME_NO_SAFARI_BALLS BattleScript_ShakeBallThrowEnd:: - finishaction + finishaction BattleScript_TrainerBallBlock:: - waitmessage B_WAIT_TIME_LONG - printstring STRINGID_TRAINERBLOCKEDBALL - waitmessage B_WAIT_TIME_LONG - printstring STRINGID_DONTBEATHIEF - waitmessage B_WAIT_TIME_LONG - finishaction - -BattleScript_PlayerUsesItem:: - moveendcase MOVEEND_MIRROR_MOVE - end - -BattleScript_OpponentUsesHealItem:: - printstring STRINGID_EMPTYSTRING3 - pause B_WAIT_TIME_MED - playse SE_USE_ITEM - printstring STRINGID_TRAINER1USEDITEM - waitmessage B_WAIT_TIME_LONG - bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT - useitemonopponent - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE - healthbarupdate BS_ATTACKER - datahpupdate BS_ATTACKER - printstring STRINGID_PKMNSITEMRESTOREDHEALTH - waitmessage B_WAIT_TIME_LONG - updatestatusicon BS_ATTACKER - moveendcase MOVEEND_MIRROR_MOVE - finishaction - -BattleScript_OpponentUsesStatusCureItem:: - printstring STRINGID_EMPTYSTRING3 - pause B_WAIT_TIME_MED - playse SE_USE_ITEM - printstring STRINGID_TRAINER1USEDITEM - waitmessage B_WAIT_TIME_LONG - useitemonopponent - printfromtable gTrainerItemCuredStatusStringIds - waitmessage B_WAIT_TIME_LONG - updatestatusicon BS_ATTACKER - moveendcase MOVEEND_MIRROR_MOVE - finishaction - -BattleScript_OpponentUsesXItem:: - printstring STRINGID_EMPTYSTRING3 - pause B_WAIT_TIME_MED - playse SE_USE_ITEM - printstring STRINGID_TRAINER1USEDITEM - waitmessage B_WAIT_TIME_LONG - useitemonopponent - printfromtable gStatUpStringIds - waitmessage B_WAIT_TIME_LONG - moveendcase MOVEEND_MIRROR_MOVE - finishaction - -BattleScript_OpponentUsesGuardSpec:: - printstring STRINGID_EMPTYSTRING3 - pause B_WAIT_TIME_MED - playse SE_USE_ITEM - printstring STRINGID_TRAINER1USEDITEM - waitmessage B_WAIT_TIME_LONG - useitemonopponent - printfromtable gMistUsedStringIds - waitmessage B_WAIT_TIME_LONG - moveendcase MOVEEND_MIRROR_MOVE - finishaction + waitmessage B_WAIT_TIME_LONG + printstring STRINGID_TRAINERBLOCKEDBALL + waitmessage B_WAIT_TIME_LONG + printstring STRINGID_DONTBEATHIEF + waitmessage B_WAIT_TIME_LONG + finishaction BattleScript_RunByUsingItem:: - playse SE_FLEE - setbyte gBattleOutcome, B_OUTCOME_RAN - finishturn + playse SE_FLEE + setbyte gBattleOutcome, B_OUTCOME_RAN + finishturn BattleScript_ActionWatchesCarefully: - printstring STRINGID_PKMNWATCHINGCAREFULLY - waitmessage B_WAIT_TIME_LONG - end2 + printstring STRINGID_PKMNWATCHINGCAREFULLY + waitmessage B_WAIT_TIME_LONG + end2 BattleScript_ActionGetNear: - printfromtable gSafariGetNearStringIds - waitmessage B_WAIT_TIME_LONG - end2 + printfromtable gSafariGetNearStringIds + waitmessage B_WAIT_TIME_LONG + end2 BattleScript_ActionThrowPokeblock: - printstring STRINGID_THREWPOKEBLOCKATPKMN - waitmessage B_WAIT_TIME_LONG - playanimation BS_ATTACKER, B_ANIM_POKEBLOCK_THROW, NULL - printfromtable gSafariPokeblockResultStringIds - waitmessage B_WAIT_TIME_LONG - end2 + printstring STRINGID_THREWPOKEBLOCKATPKMN + waitmessage B_WAIT_TIME_LONG + playanimation BS_ATTACKER, B_ANIM_POKEBLOCK_THROW, NULL + printfromtable gSafariPokeblockResultStringIds + waitmessage B_WAIT_TIME_LONG + end2 BattleScript_ActionWallyThrow: - printstring STRINGID_RETURNMON - waitmessage B_WAIT_TIME_LONG - returnatktoball - waitstate - trainerslidein BS_TARGET - waitstate - printstring STRINGID_YOUTHROWABALLNOWRIGHT - waitmessage B_WAIT_TIME_LONG - end2 + printstring STRINGID_RETURNMON + waitmessage B_WAIT_TIME_LONG + returnatktoball + waitstate + trainerslidein BS_TARGET + waitstate + printstring STRINGID_YOUTHROWABALLNOWRIGHT + waitmessage B_WAIT_TIME_LONG + end2 -BattleScript_TrainerSlideMsgRet:: - handletrainerslidemsg BS_SCRIPTING, 0 - trainerslidein 1 - handletrainerslidemsg BS_SCRIPTING, 1 - waitstate - trainerslideout 1 - handletrainerslidemsg BS_SCRIPTING, 2 - waitstate - return +BattleScript_TrainerASlideMsgRet:: + handletrainerslidemsg BS_SCRIPTING, 0 + trainerslidein B_POSITION_OPPONENT_LEFT + handletrainerslidemsg BS_SCRIPTING, 1 + waitstate + trainerslideout B_POSITION_OPPONENT_LEFT + waitstate + handletrainerslidemsg BS_SCRIPTING, 2 + return -BattleScript_TrainerSlideMsgEnd2:: - call BattleScript_TrainerSlideMsgRet - end2 +BattleScript_TrainerASlideMsgEnd2:: + call BattleScript_TrainerASlideMsgRet + end2 + +BattleScript_TrainerBSlideMsgRet:: + handletrainerslidemsg BS_SCRIPTING, 0 + trainerslidein B_POSITION_OPPONENT_RIGHT + handletrainerslidemsg BS_SCRIPTING, 1 + waitstate + trainerslideout B_POSITION_OPPONENT_RIGHT + waitstate + handletrainerslidemsg BS_SCRIPTING, 2 + return + +BattleScript_TrainerBSlideMsgEnd2:: + call BattleScript_TrainerBSlideMsgRet + end2 diff --git a/data/maps/AbandonedShip_CaptainsOffice/scripts.inc b/data/maps/AbandonedShip_CaptainsOffice/scripts.inc index 7c59fec967..78fdc6434a 100644 --- a/data/maps/AbandonedShip_CaptainsOffice/scripts.inc +++ b/data/maps/AbandonedShip_CaptainsOffice/scripts.inc @@ -7,7 +7,7 @@ AbandonedShip_CaptainsOffice_EventScript_CaptSternAide:: goto_if_set FLAG_EXCHANGED_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus checkitem ITEM_SCANNER goto_if_eq VAR_RESULT, TRUE, AbandonedShip_CaptainsOffice_EventScript_CanYouDeliverScanner - goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus + goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_2_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus msgbox AbandonedShip_CaptainsOffice_Text_NoSuccessFindingScanner, MSGBOX_DEFAULT release end diff --git a/data/maps/AbandonedShip_HiddenFloorRooms/map.json b/data/maps/AbandonedShip_HiddenFloorRooms/map.json index dce9111eb5..905c853350 100644 --- a/data/maps/AbandonedShip_HiddenFloorRooms/map.json +++ b/data/maps/AbandonedShip_HiddenFloorRooms/map.json @@ -38,7 +38,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "AbandonedShip_HiddenFloorRooms_EventScript_ItemScanner", - "flag": "FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER" + "flag": "FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_2_SCANNER" }, { "graphics_id": "OBJ_EVENT_GFX_ITEM_BALL", diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc index 68d3124d95..d2174eee99 100644 --- a/data/maps/BirthIsland_Exterior/scripts.inc +++ b/data/maps/BirthIsland_Exterior/scripts.inc @@ -48,21 +48,24 @@ BirthIsland_Exterior_EventScript_Triangle:: special DoDeoxysRockInteraction waitstate switch VAR_RESULT - case 0, BirthIsland_Exterior_EventScript_NotSolved1 - case 1, BirthIsland_Exterior_EventScript_NotSolved2 - case 2, BirthIsland_Exterior_EventScript_Deoxys - case 3, BirthIsland_Exterior_EventScript_NotSolved3 + case DEOXYS_ROCK_FAILED, BirthIsland_Exterior_EventScript_Failed + case DEOXYS_ROCK_PROGRESSED, BirthIsland_Exterior_EventScript_Progressed + case DEOXYS_ROCK_SOLVED, BirthIsland_Exterior_EventScript_Deoxys + case DEOXYS_ROCK_COMPLETE, BirthIsland_Exterior_EventScript_Complete end -BirthIsland_Exterior_EventScript_NotSolved1:: +@ The actual rock triangle movement is handled by DoDeoxysRockInteraction. +@ Unless the player has solved the puzzle and needs to encounter Deoxys, +@ there's nothing else the script needs to do. +BirthIsland_Exterior_EventScript_Failed:: release end -BirthIsland_Exterior_EventScript_NotSolved2:: +BirthIsland_Exterior_EventScript_Progressed:: release end -BirthIsland_Exterior_EventScript_NotSolved3:: +BirthIsland_Exterior_EventScript_Complete:: release end diff --git a/data/maps/MossdeepCity_Gym/scripts.inc b/data/maps/MossdeepCity_Gym/scripts.inc index b47011d680..8892097dee 100644 --- a/data/maps/MossdeepCity_Gym/scripts.inc +++ b/data/maps/MossdeepCity_Gym/scripts.inc @@ -26,26 +26,26 @@ MossdeepCity_Gym_EventScript_CheckSwitch4:: @ All the below set metatile scripts are leftover from RS and are functionally unused MossdeepCity_Gym_EventScript_SetSwitch1Metatiles:: - setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE - setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, TRUE + setmetatile 5, 5, METATILE_RSMossdeepGym_RedArrow_Right, FALSE + setmetatile 2, 7, METATILE_RSMossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_CheckSwitch2 end MossdeepCity_Gym_EventScript_SetSwitch2Metatiles:: - setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE - setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, TRUE + setmetatile 8, 14, METATILE_RSMossdeepGym_RedArrow_Right, FALSE + setmetatile 8, 10, METATILE_RSMossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_CheckSwitch3 end MossdeepCity_Gym_EventScript_SetSwitch3Metatiles:: - setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, FALSE - setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, TRUE + setmetatile 15, 17, METATILE_RSMossdeepGym_RedArrow_Left, FALSE + setmetatile 17, 15, METATILE_RSMossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_CheckSwitch4 end MossdeepCity_Gym_EventScript_SetSwitch4Metatiles:: - setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, FALSE - setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, TRUE + setmetatile 1, 23, METATILE_RSMossdeepGym_RedArrow_Up, FALSE + setmetatile 5, 24, METATILE_RSMossdeepGym_Switch_Down, TRUE end MossdeepCity_Gym_EventScript_TateAndLiza:: @@ -116,8 +116,8 @@ MossdeepCity_Gym_EventScript_Switch1:: setflag FLAG_MOSSDEEP_GYM_SWITCH_1 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE - setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, TRUE + setmetatile 5, 5, METATILE_RSMossdeepGym_RedArrow_Right, FALSE + setmetatile 2, 7, METATILE_RSMossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -131,8 +131,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch1:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_1 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Left, FALSE - setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Up, TRUE + setmetatile 5, 5, METATILE_RSMossdeepGym_RedArrow_Left, FALSE + setmetatile 2, 7, METATILE_RSMossdeepGym_Switch_Up, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -142,8 +142,8 @@ MossdeepCity_Gym_EventScript_Switch2:: setflag FLAG_MOSSDEEP_GYM_SWITCH_2 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE - setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, TRUE + setmetatile 8, 14, METATILE_RSMossdeepGym_RedArrow_Right, FALSE + setmetatile 8, 10, METATILE_RSMossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -151,8 +151,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch2:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_2 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Down, FALSE - setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Up, TRUE + setmetatile 8, 14, METATILE_RSMossdeepGym_RedArrow_Down, FALSE + setmetatile 8, 10, METATILE_RSMossdeepGym_Switch_Up, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -162,8 +162,8 @@ MossdeepCity_Gym_EventScript_Switch3:: setflag FLAG_MOSSDEEP_GYM_SWITCH_3 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, FALSE - setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, TRUE + setmetatile 15, 17, METATILE_RSMossdeepGym_RedArrow_Left, FALSE + setmetatile 17, 15, METATILE_RSMossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -171,8 +171,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch3:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_3 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE - setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Up, TRUE + setmetatile 15, 17, METATILE_RSMossdeepGym_RedArrow_Right, FALSE + setmetatile 17, 15, METATILE_RSMossdeepGym_Switch_Up, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -182,8 +182,8 @@ MossdeepCity_Gym_EventScript_Switch4:: setflag FLAG_MOSSDEEP_GYM_SWITCH_4 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, FALSE - setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, TRUE + setmetatile 1, 23, METATILE_RSMossdeepGym_RedArrow_Up, FALSE + setmetatile 5, 24, METATILE_RSMossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -191,8 +191,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch4:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_4 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE - setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Up, TRUE + setmetatile 1, 23, METATILE_RSMossdeepGym_RedArrow_Right, FALSE + setmetatile 5, 24, METATILE_RSMossdeepGym_Switch_Up, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end diff --git a/data/maps/PetalburgCity/scripts.inc b/data/maps/PetalburgCity/scripts.inc index 3609b26226..a9dd1014f2 100644 --- a/data/maps/PetalburgCity/scripts.inc +++ b/data/maps/PetalburgCity/scripts.inc @@ -38,7 +38,7 @@ PetalburgCity_OnFrame: PetalburgCity_EventScript_WallyTutorial:: lockall special SavePlayerParty - special PutZigzagoonInPlayerParty + special LoadWallyZigzagoon applymovement LOCALID_WALLY, PetalburgCity_Movement_WallyTutorialWally applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Movement_WallyTutorialPlayer waitmovement 0 diff --git a/data/maps/PetalburgWoods/map.json b/data/maps/PetalburgWoods/map.json index 4179d81957..2979e7e469 100644 --- a/data/maps/PetalburgWoods/map.json +++ b/data/maps/PetalburgWoods/map.json @@ -168,7 +168,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "PetalburgWoods_EventScript_ItemParalyzeHeal", - "flag": "FLAG_ITEM_PETALBURD_WOODS_PARALYZE_HEAL" + "flag": "FLAG_ITEM_PETALBURG_WOODS_PARALYZE_HEAL" }, { "graphics_id": "OBJ_EVENT_GFX_GIRL_2", diff --git a/data/maps/Route110/map.json b/data/maps/Route110/map.json index 630b20bd37..2b52164113 100644 --- a/data/maps/Route110/map.json +++ b/data/maps/Route110/map.json @@ -288,7 +288,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "Route110_EventScript_ItemRareCandy", - "flag": "FLAG_ITEM_ROUTE_109_RARE_CANDY" + "flag": "FLAG_ITEM_ROUTE_110_RARE_CANDY" }, { "graphics_id": "OBJ_EVENT_GFX_CYCLING_TRIATHLETE_M", diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc index f97326c543..7335d0e1ce 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -260,7 +260,7 @@ Route111_EventScript_SunTrigger:: Route111_EventScript_SandstormTrigger:: setweather WEATHER_SANDSTORM - fadenewbgm MUS_ROUTE111 + fadenewbgm MUS_DESERT doweather end diff --git a/data/maps/Route114/map.json b/data/maps/Route114/map.json index 10f15233c9..17c483c0fa 100644 --- a/data/maps/Route114/map.json +++ b/data/maps/Route114/map.json @@ -503,7 +503,7 @@ "y": 30, "elevation": 3, "item": "ITEM_REVIVE", - "flag": "FLAG_HIDDEN_ITEM_ROUTE_113_REVIVE" + "flag": "FLAG_HIDDEN_ITEM_ROUTE_114_REVIVE" } ] } diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index 51b7f966e4..f50ce5322b 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -1,232 +1,232 @@ .align 2 gScriptCmdTable:: - .4byte ScrCmd_nop @ 0x00 - .4byte ScrCmd_nop1 @ 0x01 - .4byte ScrCmd_end @ 0x02 - .4byte ScrCmd_return @ 0x03 - .4byte ScrCmd_call @ 0x04 - .4byte ScrCmd_goto @ 0x05 - .4byte ScrCmd_goto_if @ 0x06 - .4byte ScrCmd_call_if @ 0x07 - .4byte ScrCmd_gotostd @ 0x08 - .4byte ScrCmd_callstd @ 0x09 - .4byte ScrCmd_gotostd_if @ 0x0a - .4byte ScrCmd_callstd_if @ 0x0b - .4byte ScrCmd_returnram @ 0x0c - .4byte ScrCmd_endram @ 0x0d - .4byte ScrCmd_setmysteryeventstatus @ 0x0e - .4byte ScrCmd_loadword @ 0x0f - .4byte ScrCmd_loadbyte @ 0x10 - .4byte ScrCmd_setptr @ 0x11 - .4byte ScrCmd_loadbytefromptr @ 0x12 - .4byte ScrCmd_setptrbyte @ 0x13 - .4byte ScrCmd_copylocal @ 0x14 - .4byte ScrCmd_copybyte @ 0x15 - .4byte ScrCmd_setvar @ 0x16 - .4byte ScrCmd_addvar @ 0x17 - .4byte ScrCmd_subvar @ 0x18 - .4byte ScrCmd_copyvar @ 0x19 - .4byte ScrCmd_setorcopyvar @ 0x1a - .4byte ScrCmd_compare_local_to_local @ 0x1b - .4byte ScrCmd_compare_local_to_value @ 0x1c - .4byte ScrCmd_compare_local_to_ptr @ 0x1d - .4byte ScrCmd_compare_ptr_to_local @ 0x1e - .4byte ScrCmd_compare_ptr_to_value @ 0x1f - .4byte ScrCmd_compare_ptr_to_ptr @ 0x20 - .4byte ScrCmd_compare_var_to_value @ 0x21 - .4byte ScrCmd_compare_var_to_var @ 0x22 - .4byte ScrCmd_callnative @ 0x23 - .4byte ScrCmd_gotonative @ 0x24 - .4byte ScrCmd_special @ 0x25 - .4byte ScrCmd_specialvar @ 0x26 - .4byte ScrCmd_waitstate @ 0x27 - .4byte ScrCmd_delay @ 0x28 - .4byte ScrCmd_setflag @ 0x29 - .4byte ScrCmd_clearflag @ 0x2a - .4byte ScrCmd_checkflag @ 0x2b - .4byte ScrCmd_initclock @ 0x2c - .4byte ScrCmd_dotimebasedevents @ 0x2d - .4byte ScrCmd_gettime @ 0x2e - .4byte ScrCmd_playse @ 0x2f - .4byte ScrCmd_waitse @ 0x30 - .4byte ScrCmd_playfanfare @ 0x31 - .4byte ScrCmd_waitfanfare @ 0x32 - .4byte ScrCmd_playbgm @ 0x33 - .4byte ScrCmd_savebgm @ 0x34 - .4byte ScrCmd_fadedefaultbgm @ 0x35 - .4byte ScrCmd_fadenewbgm @ 0x36 - .4byte ScrCmd_fadeoutbgm @ 0x37 - .4byte ScrCmd_fadeinbgm @ 0x38 - .4byte ScrCmd_warp @ 0x39 - .4byte ScrCmd_warpsilent @ 0x3a - .4byte ScrCmd_warpdoor @ 0x3b - .4byte ScrCmd_warphole @ 0x3c - .4byte ScrCmd_warpteleport @ 0x3d - .4byte ScrCmd_setwarp @ 0x3e - .4byte ScrCmd_setdynamicwarp @ 0x3f - .4byte ScrCmd_setdivewarp @ 0x40 - .4byte ScrCmd_setholewarp @ 0x41 - .4byte ScrCmd_getplayerxy @ 0x42 - .4byte ScrCmd_getpartysize @ 0x43 - .4byte ScrCmd_additem @ 0x44 - .4byte ScrCmd_removeitem @ 0x45 - .4byte ScrCmd_checkitemspace @ 0x46 - .4byte ScrCmd_checkitem @ 0x47 - .4byte ScrCmd_checkitemtype @ 0x48 - .4byte ScrCmd_addpcitem @ 0x49 - .4byte ScrCmd_checkpcitem @ 0x4a - .4byte ScrCmd_adddecoration @ 0x4b - .4byte ScrCmd_removedecoration @ 0x4c - .4byte ScrCmd_checkdecor @ 0x4d - .4byte ScrCmd_checkdecorspace @ 0x4e - .4byte ScrCmd_applymovement @ 0x4f - .4byte ScrCmd_applymovementat @ 0x50 - .4byte ScrCmd_waitmovement @ 0x51 - .4byte ScrCmd_waitmovementat @ 0x52 - .4byte ScrCmd_removeobject @ 0x53 - .4byte ScrCmd_removeobjectat @ 0x54 - .4byte ScrCmd_addobject @ 0x55 - .4byte ScrCmd_addobjectat @ 0x56 - .4byte ScrCmd_setobjectxy @ 0x57 - .4byte ScrCmd_showobjectat @ 0x58 - .4byte ScrCmd_hideobjectat @ 0x59 - .4byte ScrCmd_faceplayer @ 0x5a - .4byte ScrCmd_turnobject @ 0x5b - .4byte ScrCmd_trainerbattle @ 0x5c - .4byte ScrCmd_dotrainerbattle @ 0x5d - .4byte ScrCmd_gotopostbattlescript @ 0x5e - .4byte ScrCmd_gotobeatenscript @ 0x5f - .4byte ScrCmd_checktrainerflag @ 0x60 - .4byte ScrCmd_settrainerflag @ 0x61 - .4byte ScrCmd_cleartrainerflag @ 0x62 - .4byte ScrCmd_setobjectxyperm @ 0x63 - .4byte ScrCmd_copyobjectxytoperm @ 0x64 - .4byte ScrCmd_setobjectmovementtype @ 0x65 - .4byte ScrCmd_waitmessage @ 0x66 - .4byte ScrCmd_message @ 0x67 - .4byte ScrCmd_closemessage @ 0x68 - .4byte ScrCmd_lockall @ 0x69 - .4byte ScrCmd_lock @ 0x6a - .4byte ScrCmd_releaseall @ 0x6b - .4byte ScrCmd_release @ 0x6c - .4byte ScrCmd_waitbuttonpress @ 0x6d - .4byte ScrCmd_yesnobox @ 0x6e - .4byte ScrCmd_multichoice @ 0x6f - .4byte ScrCmd_multichoicedefault @ 0x70 - .4byte ScrCmd_multichoicegrid @ 0x71 - .4byte ScrCmd_drawbox @ 0x72 - .4byte ScrCmd_erasebox @ 0x73 - .4byte ScrCmd_drawboxtext @ 0x74 - .4byte ScrCmd_showmonpic @ 0x75 - .4byte ScrCmd_hidemonpic @ 0x76 - .4byte ScrCmd_showcontestpainting @ 0x77 - .4byte ScrCmd_braillemessage @ 0x78 - .4byte ScrCmd_givemon @ 0x79 - .4byte ScrCmd_giveegg @ 0x7a - .4byte ScrCmd_setmonmove @ 0x7b - .4byte ScrCmd_checkpartymove @ 0x7c - .4byte ScrCmd_bufferspeciesname @ 0x7d - .4byte ScrCmd_bufferleadmonspeciesname @ 0x7e - .4byte ScrCmd_bufferpartymonnick @ 0x7f - .4byte ScrCmd_bufferitemname @ 0x80 - .4byte ScrCmd_bufferdecorationname @ 0x81 - .4byte ScrCmd_buffermovename @ 0x82 - .4byte ScrCmd_buffernumberstring @ 0x83 - .4byte ScrCmd_bufferstdstring @ 0x84 - .4byte ScrCmd_bufferstring @ 0x85 - .4byte ScrCmd_pokemart @ 0x86 - .4byte ScrCmd_pokemartdecoration @ 0x87 - .4byte ScrCmd_pokemartdecoration2 @ 0x88 - .4byte ScrCmd_playslotmachine @ 0x89 - .4byte ScrCmd_setberrytree @ 0x8a - .4byte ScrCmd_choosecontestmon @ 0x8b - .4byte ScrCmd_startcontest @ 0x8c - .4byte ScrCmd_showcontestresults @ 0x8d - .4byte ScrCmd_contestlinktransfer @ 0x8e - .4byte ScrCmd_random @ 0x8f - .4byte ScrCmd_addmoney @ 0x90 - .4byte ScrCmd_removemoney @ 0x91 - .4byte ScrCmd_checkmoney @ 0x92 - .4byte ScrCmd_showmoneybox @ 0x93 - .4byte ScrCmd_hidemoneybox @ 0x94 - .4byte ScrCmd_updatemoneybox @ 0x95 - .4byte ScrCmd_getpokenewsactive @ 0x96 - .4byte ScrCmd_fadescreen @ 0x97 - .4byte ScrCmd_fadescreenspeed @ 0x98 - .4byte ScrCmd_setflashlevel @ 0x99 - .4byte ScrCmd_animateflash @ 0x9a - .4byte ScrCmd_messageautoscroll @ 0x9b - .4byte ScrCmd_dofieldeffect @ 0x9c - .4byte ScrCmd_setfieldeffectargument @ 0x9d - .4byte ScrCmd_waitfieldeffect @ 0x9e - .4byte ScrCmd_setrespawn @ 0x9f - .4byte ScrCmd_checkplayergender @ 0xa0 - .4byte ScrCmd_playmoncry @ 0xa1 - .4byte ScrCmd_setmetatile @ 0xa2 - .4byte ScrCmd_resetweather @ 0xa3 - .4byte ScrCmd_setweather @ 0xa4 - .4byte ScrCmd_doweather @ 0xa5 - .4byte ScrCmd_setstepcallback @ 0xa6 - .4byte ScrCmd_setmaplayoutindex @ 0xa7 - .4byte ScrCmd_setobjectsubpriority @ 0xa8 - .4byte ScrCmd_resetobjectsubpriority @ 0xa9 - .4byte ScrCmd_createvobject @ 0xaa - .4byte ScrCmd_turnvobject @ 0xab - .4byte ScrCmd_opendoor @ 0xac - .4byte ScrCmd_closedoor @ 0xad - .4byte ScrCmd_waitdooranim @ 0xae - .4byte ScrCmd_setdooropen @ 0xaf - .4byte ScrCmd_setdoorclosed @ 0xb0 - .4byte ScrCmd_addelevmenuitem @ 0xb1 - .4byte ScrCmd_showelevmenu @ 0xb2 - .4byte ScrCmd_checkcoins @ 0xb3 - .4byte ScrCmd_addcoins @ 0xb4 - .4byte ScrCmd_removecoins @ 0xb5 - .4byte ScrCmd_setwildbattle @ 0xb6 - .4byte ScrCmd_dowildbattle @ 0xb7 - .4byte ScrCmd_setvaddress @ 0xb8 - .4byte ScrCmd_vgoto @ 0xb9 - .4byte ScrCmd_vcall @ 0xba - .4byte ScrCmd_vgoto_if @ 0xbb - .4byte ScrCmd_vcall_if @ 0xbc - .4byte ScrCmd_vmessage @ 0xbd - .4byte ScrCmd_vbuffermessage @ 0xbe - .4byte ScrCmd_vbufferstring @ 0xbf - .4byte ScrCmd_showcoinsbox @ 0xc0 - .4byte ScrCmd_hidecoinsbox @ 0xc1 - .4byte ScrCmd_updatecoinsbox @ 0xc2 - .4byte ScrCmd_incrementgamestat @ 0xc3 - .4byte ScrCmd_setescapewarp @ 0xc4 - .4byte ScrCmd_waitmoncry @ 0xc5 - .4byte ScrCmd_bufferboxname @ 0xc6 - .4byte ScrCmd_nop1 @ 0xc7 - .4byte ScrCmd_nop1 @ 0xc8 - .4byte ScrCmd_nop1 @ 0xc9 - .4byte ScrCmd_nop1 @ 0xca - .4byte ScrCmd_nop1 @ 0xcb - .4byte ScrCmd_nop1 @ 0xcc - .4byte ScrCmd_setmoneventlegal @ 0xcd - .4byte ScrCmd_checkmoneventlegal @ 0xce - .4byte ScrCmd_trywondercardscript @ 0xcf - .4byte ScrCmd_nop1 @ 0xd0 - .4byte ScrCmd_warpspinenter @ 0xd1 - .4byte ScrCmd_setmonmetlocation @ 0xd2 - .4byte ScrCmd_moverotatingtileobjects @ 0xd3 - .4byte ScrCmd_turnrotatingtileobjects @ 0xd4 - .4byte ScrCmd_initrotatingtilepuzzle @ 0xd5 - .4byte ScrCmd_freerotatingtilepuzzle @ 0xd6 - .4byte ScrCmd_warpmossdeepgym @ 0xd7 - .4byte ScrCmd_selectapproachingtrainer @ 0xd8 - .4byte ScrCmd_lockfortrainer @ 0xd9 - .4byte ScrCmd_closebraillemessage @ 0xda - .4byte ScrCmd_messageinstant @ 0xdb - .4byte ScrCmd_fadescreenswapbuffers @ 0xdc - .4byte ScrCmd_buffertrainerclassname @ 0xdd - .4byte ScrCmd_buffertrainername @ 0xde - .4byte ScrCmd_pokenavcall @ 0xdf - .4byte ScrCmd_warpwhitefade @ 0xe0 - .4byte ScrCmd_buffercontestname @ 0xe1 - .4byte ScrCmd_bufferitemnameplural @ 0xe2 + .4byte ScrCmd_nop @ 0x00 + .4byte ScrCmd_nop1 @ 0x01 + .4byte ScrCmd_end @ 0x02 + .4byte ScrCmd_return @ 0x03 + .4byte ScrCmd_call @ 0x04 + .4byte ScrCmd_goto @ 0x05 + .4byte ScrCmd_goto_if @ 0x06 + .4byte ScrCmd_call_if @ 0x07 + .4byte ScrCmd_gotostd @ 0x08 + .4byte ScrCmd_callstd @ 0x09 + .4byte ScrCmd_gotostd_if @ 0x0a + .4byte ScrCmd_callstd_if @ 0x0b + .4byte ScrCmd_returnram @ 0x0c + .4byte ScrCmd_endram @ 0x0d + .4byte ScrCmd_setmysteryeventstatus @ 0x0e + .4byte ScrCmd_loadword @ 0x0f + .4byte ScrCmd_loadbyte @ 0x10 + .4byte ScrCmd_setptr @ 0x11 + .4byte ScrCmd_loadbytefromptr @ 0x12 + .4byte ScrCmd_setptrbyte @ 0x13 + .4byte ScrCmd_copylocal @ 0x14 + .4byte ScrCmd_copybyte @ 0x15 + .4byte ScrCmd_setvar @ 0x16 + .4byte ScrCmd_addvar @ 0x17 + .4byte ScrCmd_subvar @ 0x18 + .4byte ScrCmd_copyvar @ 0x19 + .4byte ScrCmd_setorcopyvar @ 0x1a + .4byte ScrCmd_compare_local_to_local @ 0x1b + .4byte ScrCmd_compare_local_to_value @ 0x1c + .4byte ScrCmd_compare_local_to_ptr @ 0x1d + .4byte ScrCmd_compare_ptr_to_local @ 0x1e + .4byte ScrCmd_compare_ptr_to_value @ 0x1f + .4byte ScrCmd_compare_ptr_to_ptr @ 0x20 + .4byte ScrCmd_compare_var_to_value @ 0x21 + .4byte ScrCmd_compare_var_to_var @ 0x22 + .4byte ScrCmd_callnative @ 0x23 + .4byte ScrCmd_gotonative @ 0x24 + .4byte ScrCmd_special @ 0x25 + .4byte ScrCmd_specialvar @ 0x26 + .4byte ScrCmd_waitstate @ 0x27 + .4byte ScrCmd_delay @ 0x28 + .4byte ScrCmd_setflag @ 0x29 + .4byte ScrCmd_clearflag @ 0x2a + .4byte ScrCmd_checkflag @ 0x2b + .4byte ScrCmd_initclock @ 0x2c + .4byte ScrCmd_dotimebasedevents @ 0x2d + .4byte ScrCmd_gettime @ 0x2e + .4byte ScrCmd_playse @ 0x2f + .4byte ScrCmd_waitse @ 0x30 + .4byte ScrCmd_playfanfare @ 0x31 + .4byte ScrCmd_waitfanfare @ 0x32 + .4byte ScrCmd_playbgm @ 0x33 + .4byte ScrCmd_savebgm @ 0x34 + .4byte ScrCmd_fadedefaultbgm @ 0x35 + .4byte ScrCmd_fadenewbgm @ 0x36 + .4byte ScrCmd_fadeoutbgm @ 0x37 + .4byte ScrCmd_fadeinbgm @ 0x38 + .4byte ScrCmd_warp @ 0x39 + .4byte ScrCmd_warpsilent @ 0x3a + .4byte ScrCmd_warpdoor @ 0x3b + .4byte ScrCmd_warphole @ 0x3c + .4byte ScrCmd_warpteleport @ 0x3d + .4byte ScrCmd_setwarp @ 0x3e + .4byte ScrCmd_setdynamicwarp @ 0x3f + .4byte ScrCmd_setdivewarp @ 0x40 + .4byte ScrCmd_setholewarp @ 0x41 + .4byte ScrCmd_getplayerxy @ 0x42 + .4byte ScrCmd_getpartysize @ 0x43 + .4byte ScrCmd_additem @ 0x44 + .4byte ScrCmd_removeitem @ 0x45 + .4byte ScrCmd_checkitemspace @ 0x46 + .4byte ScrCmd_checkitem @ 0x47 + .4byte ScrCmd_checkitemtype @ 0x48 + .4byte ScrCmd_addpcitem @ 0x49 + .4byte ScrCmd_checkpcitem @ 0x4a + .4byte ScrCmd_adddecoration @ 0x4b + .4byte ScrCmd_removedecoration @ 0x4c + .4byte ScrCmd_checkdecor @ 0x4d + .4byte ScrCmd_checkdecorspace @ 0x4e + .4byte ScrCmd_applymovement @ 0x4f + .4byte ScrCmd_applymovementat @ 0x50 + .4byte ScrCmd_waitmovement @ 0x51 + .4byte ScrCmd_waitmovementat @ 0x52 + .4byte ScrCmd_removeobject @ 0x53 + .4byte ScrCmd_removeobjectat @ 0x54 + .4byte ScrCmd_addobject @ 0x55 + .4byte ScrCmd_addobjectat @ 0x56 + .4byte ScrCmd_setobjectxy @ 0x57 + .4byte ScrCmd_showobjectat @ 0x58 + .4byte ScrCmd_hideobjectat @ 0x59 + .4byte ScrCmd_faceplayer @ 0x5a + .4byte ScrCmd_turnobject @ 0x5b + .4byte ScrCmd_trainerbattle @ 0x5c + .4byte ScrCmd_dotrainerbattle @ 0x5d + .4byte ScrCmd_gotopostbattlescript @ 0x5e + .4byte ScrCmd_gotobeatenscript @ 0x5f + .4byte ScrCmd_checktrainerflag @ 0x60 + .4byte ScrCmd_settrainerflag @ 0x61 + .4byte ScrCmd_cleartrainerflag @ 0x62 + .4byte ScrCmd_setobjectxyperm @ 0x63 + .4byte ScrCmd_copyobjectxytoperm @ 0x64 + .4byte ScrCmd_setobjectmovementtype @ 0x65 + .4byte ScrCmd_waitmessage @ 0x66 + .4byte ScrCmd_message @ 0x67 + .4byte ScrCmd_closemessage @ 0x68 + .4byte ScrCmd_lockall @ 0x69 + .4byte ScrCmd_lock @ 0x6a + .4byte ScrCmd_releaseall @ 0x6b + .4byte ScrCmd_release @ 0x6c + .4byte ScrCmd_waitbuttonpress @ 0x6d + .4byte ScrCmd_yesnobox @ 0x6e + .4byte ScrCmd_multichoice @ 0x6f + .4byte ScrCmd_multichoicedefault @ 0x70 + .4byte ScrCmd_multichoicegrid @ 0x71 + .4byte ScrCmd_drawbox @ 0x72 + .4byte ScrCmd_erasebox @ 0x73 + .4byte ScrCmd_drawboxtext @ 0x74 + .4byte ScrCmd_showmonpic @ 0x75 + .4byte ScrCmd_hidemonpic @ 0x76 + .4byte ScrCmd_showcontestpainting @ 0x77 + .4byte ScrCmd_braillemessage @ 0x78 + .4byte ScrCmd_givemon @ 0x79 + .4byte ScrCmd_giveegg @ 0x7a + .4byte ScrCmd_setmonmove @ 0x7b + .4byte ScrCmd_checkpartymove @ 0x7c + .4byte ScrCmd_bufferspeciesname @ 0x7d + .4byte ScrCmd_bufferleadmonspeciesname @ 0x7e + .4byte ScrCmd_bufferpartymonnick @ 0x7f + .4byte ScrCmd_bufferitemname @ 0x80 + .4byte ScrCmd_bufferdecorationname @ 0x81 + .4byte ScrCmd_buffermovename @ 0x82 + .4byte ScrCmd_buffernumberstring @ 0x83 + .4byte ScrCmd_bufferstdstring @ 0x84 + .4byte ScrCmd_bufferstring @ 0x85 + .4byte ScrCmd_pokemart @ 0x86 + .4byte ScrCmd_pokemartdecoration @ 0x87 + .4byte ScrCmd_pokemartdecoration2 @ 0x88 + .4byte ScrCmd_playslotmachine @ 0x89 + .4byte ScrCmd_setberrytree @ 0x8a + .4byte ScrCmd_choosecontestmon @ 0x8b + .4byte ScrCmd_startcontest @ 0x8c + .4byte ScrCmd_showcontestresults @ 0x8d + .4byte ScrCmd_contestlinktransfer @ 0x8e + .4byte ScrCmd_random @ 0x8f + .4byte ScrCmd_addmoney @ 0x90 + .4byte ScrCmd_removemoney @ 0x91 + .4byte ScrCmd_checkmoney @ 0x92 + .4byte ScrCmd_showmoneybox @ 0x93 + .4byte ScrCmd_hidemoneybox @ 0x94 + .4byte ScrCmd_updatemoneybox @ 0x95 + .4byte ScrCmd_getpokenewsactive @ 0x96 + .4byte ScrCmd_fadescreen @ 0x97 + .4byte ScrCmd_fadescreenspeed @ 0x98 + .4byte ScrCmd_setflashlevel @ 0x99 + .4byte ScrCmd_animateflash @ 0x9a + .4byte ScrCmd_messageautoscroll @ 0x9b + .4byte ScrCmd_dofieldeffect @ 0x9c + .4byte ScrCmd_setfieldeffectargument @ 0x9d + .4byte ScrCmd_waitfieldeffect @ 0x9e + .4byte ScrCmd_setrespawn @ 0x9f + .4byte ScrCmd_checkplayergender @ 0xa0 + .4byte ScrCmd_playmoncry @ 0xa1 + .4byte ScrCmd_setmetatile @ 0xa2 + .4byte ScrCmd_resetweather @ 0xa3 + .4byte ScrCmd_setweather @ 0xa4 + .4byte ScrCmd_doweather @ 0xa5 + .4byte ScrCmd_setstepcallback @ 0xa6 + .4byte ScrCmd_setmaplayoutindex @ 0xa7 + .4byte ScrCmd_setobjectsubpriority @ 0xa8 + .4byte ScrCmd_resetobjectsubpriority @ 0xa9 + .4byte ScrCmd_createvobject @ 0xaa + .4byte ScrCmd_turnvobject @ 0xab + .4byte ScrCmd_opendoor @ 0xac + .4byte ScrCmd_closedoor @ 0xad + .4byte ScrCmd_waitdooranim @ 0xae + .4byte ScrCmd_setdooropen @ 0xaf + .4byte ScrCmd_setdoorclosed @ 0xb0 + .4byte ScrCmd_addelevmenuitem @ 0xb1 + .4byte ScrCmd_showelevmenu @ 0xb2 + .4byte ScrCmd_checkcoins @ 0xb3 + .4byte ScrCmd_addcoins @ 0xb4 + .4byte ScrCmd_removecoins @ 0xb5 + .4byte ScrCmd_setwildbattle @ 0xb6 + .4byte ScrCmd_dowildbattle @ 0xb7 + .4byte ScrCmd_setvaddress @ 0xb8 + .4byte ScrCmd_vgoto @ 0xb9 + .4byte ScrCmd_vcall @ 0xba + .4byte ScrCmd_vgoto_if @ 0xbb + .4byte ScrCmd_vcall_if @ 0xbc + .4byte ScrCmd_vmessage @ 0xbd + .4byte ScrCmd_vbuffermessage @ 0xbe + .4byte ScrCmd_vbufferstring @ 0xbf + .4byte ScrCmd_showcoinsbox @ 0xc0 + .4byte ScrCmd_hidecoinsbox @ 0xc1 + .4byte ScrCmd_updatecoinsbox @ 0xc2 + .4byte ScrCmd_incrementgamestat @ 0xc3 + .4byte ScrCmd_setescapewarp @ 0xc4 + .4byte ScrCmd_waitmoncry @ 0xc5 + .4byte ScrCmd_bufferboxname @ 0xc6 + .4byte ScrCmd_nop1 @ 0xc7 + .4byte ScrCmd_nop1 @ 0xc8 + .4byte ScrCmd_nop1 @ 0xc9 + .4byte ScrCmd_nop1 @ 0xca + .4byte ScrCmd_nop1 @ 0xcb + .4byte ScrCmd_nop1 @ 0xcc + .4byte ScrCmd_setmonmodernfatefulencounter @ 0xcd + .4byte ScrCmd_checkmonmodernfatefulencounter @ 0xce + .4byte ScrCmd_trywondercardscript @ 0xcf + .4byte ScrCmd_nop1 @ 0xd0 + .4byte ScrCmd_warpspinenter @ 0xd1 + .4byte ScrCmd_setmonmetlocation @ 0xd2 + .4byte ScrCmd_moverotatingtileobjects @ 0xd3 + .4byte ScrCmd_turnrotatingtileobjects @ 0xd4 + .4byte ScrCmd_initrotatingtilepuzzle @ 0xd5 + .4byte ScrCmd_freerotatingtilepuzzle @ 0xd6 + .4byte ScrCmd_warpmossdeepgym @ 0xd7 + .4byte ScrCmd_selectapproachingtrainer @ 0xd8 + .4byte ScrCmd_lockfortrainer @ 0xd9 + .4byte ScrCmd_closebraillemessage @ 0xda + .4byte ScrCmd_messageinstant @ 0xdb + .4byte ScrCmd_fadescreenswapbuffers @ 0xdc + .4byte ScrCmd_buffertrainerclassname @ 0xdd + .4byte ScrCmd_buffertrainername @ 0xde + .4byte ScrCmd_pokenavcall @ 0xdf + .4byte ScrCmd_warpwhitefade @ 0xe0 + .4byte ScrCmd_buffercontestname @ 0xe1 + .4byte ScrCmd_bufferitemnameplural @ 0xe2 gScriptCmdTableEnd:: .4byte ScrCmd_nop diff --git a/data/scripts/debug.inc b/data/scripts/debug.inc index 9463164ac2..92e9062a39 100644 --- a/data/scripts/debug.inc +++ b/data/scripts/debug.inc @@ -21,7 +21,7 @@ Debug_CheatStart:: setflag FLAG_SYS_POKEDEX_GET special SetUnlockedPokedexFlags setflag FLAG_RECEIVED_POKEDEX_FROM_BIRCH - setvar VAR_CABLE_CLUB_TUTORIAL_STATE, 1 + setvar VAR_CABLE_CLUB_TUTORIAL_STATE, 2 setflag FLAG_SYS_NATIONAL_DEX special EnableNationalPokedex setflag FLAG_RECEIVED_RUNNING_SHOES @@ -41,18 +41,31 @@ Debug_CheatStart:: release end -Debug_FlagsNotSetMessage:: +Debug_FlagsNotSetOverworldConfigMessage:: lockall - message Debug_FlagsNotSetMessage_Text + message Debug_FlagsNotSetOverworldConfigMessage_Text waitmessage waitbuttonpress releaseall end -Debug_FlagsNotSetMessage_Text: +Debug_FlagsNotSetOverworldConfigMessage_Text: .string "Feature unavailable!\n" .string "Please define a usable flag in:\l" - .string "'include/constants/overworld{UNDERSCORE}config.h'!$" + .string "'include/config/overworld.h'!$" + +Debug_FlagsNotSetBattleConfigMessage:: + lockall + message Debug_FlagsNotSetBattleConfigMessage_Text + waitmessage + waitbuttonpress + releaseall + end + +Debug_FlagsNotSetBattleConfigMessage_Text: + .string "Feature unavailable!\n" + .string "Please define a usable flag in:\l" + .string "'include/config/battle.h'!$" Debug_Script_1:: end diff --git a/data/scripts/gift_pichu.inc b/data/scripts/gift_pichu.inc index d2cd381b53..56c1e52349 100644 --- a/data/scripts/gift_pichu.inc +++ b/data/scripts/gift_pichu.inc @@ -29,7 +29,7 @@ SurfPichu_FullParty: SurfPichu_GiveEgg: giveegg SPECIES_PICHU - setmoneventlegal VAR_GIFT_PICHU_SLOT + setmodernfatefulencounter VAR_GIFT_PICHU_SLOT setmonmetlocation VAR_GIFT_PICHU_SLOT, METLOC_FATEFUL_ENCOUNTER vgoto_if_eq VAR_GIFT_PICHU_SLOT, 1, SurfPichu_Slot1 vgoto_if_eq VAR_GIFT_PICHU_SLOT, 2, SurfPichu_Slot2 diff --git a/data/scripts/mauville_man.inc b/data/scripts/mauville_man.inc index eda3505bf4..a336360436 100644 --- a/data/scripts/mauville_man.inc +++ b/data/scripts/mauville_man.inc @@ -64,9 +64,9 @@ MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics:: MauvilleCity_PokemonCenter_1F_EventScript_Hipster:: lock faceplayer - setflag FLAG_SYS_HIPSTER_MEET + setflag FLAG_UNLOCKED_TRENDY_SAYINGS msgbox MauvilleCity_PokemonCenter_1F_Text_TeachWhatsHipAndHappening, MSGBOX_DEFAULT - special GetHipsterSpokenFlag + special HasHipsterTaughtWord goto_if_eq VAR_RESULT, FALSE, MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord msgbox MauvilleCity_PokemonCenter_1F_Text_IAlreadyTaughtYou, MSGBOX_DEFAULT release @@ -80,8 +80,8 @@ MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord:: end MauvilleCity_PokemonCenter_1F_EventScript_TeachWord:: - msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfPhrase, MSGBOX_DEFAULT - special SetHipsterSpokenFlag + msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfWord, MSGBOX_DEFAULT + special SetHipsterTaughtWord release end @@ -969,7 +969,7 @@ MauvilleCity_PokemonCenter_1F_Text_IveGotNothingNewToTeach: .string "what's hip and happening.\p" .string "I've got nothing new to teach you!$" -MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfPhrase: +MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfWord: .string "Hey, have you heard about\n" .string "“{STR_VAR_1}”?\p" .string "What's it mean? Well…\n" diff --git a/data/specials.inc b/data/specials.inc index 9c336b3765..ded2e3f4fe 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -111,8 +111,8 @@ gSpecials:: def_special Script_GetCurrentMauvilleMan def_special HasBardSongBeenChanged def_special SaveBardSongLyrics - def_special GetHipsterSpokenFlag - def_special SetHipsterSpokenFlag + def_special HasHipsterTaughtWord + def_special SetHipsterTaughtWord def_special HipsterTryTeachWord def_special PlayBardSong def_special SetMauvilleOldManObjEventGfx @@ -311,7 +311,7 @@ gSpecials:: def_special TryUpdateRusturfTunnelState def_special IsGrassTypeInParty def_special DoContestHallWarp - def_special PutZigzagoonInPlayerParty + def_special LoadWallyZigzagoon def_special IsStarterInParty def_special CopyCurSecretBaseOwnerName_StrVar1 def_special ScriptCheckFreePokemonStorageSpace @@ -489,7 +489,7 @@ gSpecials:: def_special ScrollableMultichoice_ClosePersistentMenu def_special DoDeoxysRockInteraction def_special SetDeoxysRockPalette - def_special CreateEventLegalEnemyMon + def_special CreateEnemyEventMon def_special StartMirageTowerDisintegration def_special StartMirageTowerShake def_special StartMirageTowerFossilFallAndSink diff --git a/gflib/text.c b/gflib/text.c index 86dca38291..1bded26b5a 100644 --- a/gflib/text.c +++ b/gflib/text.c @@ -36,7 +36,7 @@ static u32 GetGlyphWidth_Narrow(u16, bool32); static u32 GetGlyphWidth_SmallNarrow(u16, bool32); static EWRAM_DATA struct TextPrinter sTempTextPrinter = {0}; -static EWRAM_DATA struct TextPrinter sTextPrinters[NUM_TEXT_PRINTERS] = {0}; +static EWRAM_DATA struct TextPrinter sTextPrinters[WINDOWS_MAX] = {0}; static u16 sFontHalfRowLookupTable[0x51]; static u16 sLastTextBgColor; @@ -244,7 +244,7 @@ static void SetFontsPointer(const struct FontInfo *fonts) void DeactivateAllTextPrinters(void) { int printer; - for (printer = 0; printer < NUM_TEXT_PRINTERS; ++printer) + for (printer = 0; printer < WINDOWS_MAX; ++printer) sTextPrinters[printer].active = FALSE; } @@ -322,7 +322,7 @@ void RunTextPrinters(void) if (!gDisableTextPrinters) { - for (i = 0; i < NUM_TEXT_PRINTERS; ++i) + for (i = 0; i < WINDOWS_MAX; ++i) { if (sTextPrinters[i].active) { diff --git a/gflib/text.h b/gflib/text.h index a88cb990e1..ff13efa9a8 100644 --- a/gflib/text.h +++ b/gflib/text.h @@ -3,8 +3,6 @@ #include "characters.h" -#define NUM_TEXT_PRINTERS 32 - // Given as a text speed when all the text should be // loaded at once but not copied to vram yet. #define TEXT_SKIP_DRAW 0xFF diff --git a/gflib/window.c b/gflib/window.c index ff9e8a6e01..76e863f10e 100644 --- a/gflib/window.c +++ b/gflib/window.c @@ -4,16 +4,11 @@ #include "bg.h" #include "blit.h" -u32 gUnusedWindowVar1; -u32 gUnusedWindowVar2; // This global is set to 0 and never changed. u8 gTransparentTileNumber; -u32 gUnusedWindowVar3; void *gWindowBgTilemapBuffers[NUM_BACKGROUNDS]; extern u32 gWindowTileAutoAllocEnabled; -#define WINDOWS_MAX 32 - EWRAM_DATA struct Window gWindows[WINDOWS_MAX] = {0}; EWRAM_DATA static struct Window* sWindowPtr = NULL; EWRAM_DATA static u16 sWindowSize = 0; diff --git a/gflib/window.h b/gflib/window.h index 583e7e1673..0f2dff2a8a 100644 --- a/gflib/window.h +++ b/gflib/window.h @@ -1,6 +1,8 @@ #ifndef GUARD_WINDOW_H #define GUARD_WINDOW_H +#define WINDOWS_MAX 32 + #define PIXEL_FILL(num) ((num) | ((num) << 4)) enum { @@ -74,8 +76,5 @@ void CopyWindowToVram8Bit(u8 windowId, u8 mode); extern struct Window gWindows[]; extern void *gWindowBgTilemapBuffers[]; -extern u32 gUnusedWindowVar1; -extern u32 gUnusedWindowVar2; -extern u32 gUnusedWindowVar3; #endif // GUARD_WINDOW_H diff --git a/graphics/battle_anims/sprites/black_ball.bin b/graphics/battle_anims/sprites/black_ball.bin deleted file mode 100644 index 4a6592a8ed..0000000000 Binary files a/graphics/battle_anims/sprites/black_ball.bin and /dev/null differ diff --git a/graphics/battle_anims/sprites/black_ball.pal b/graphics/battle_anims/sprites/black_ball.pal new file mode 100644 index 0000000000..57e320140e --- /dev/null +++ b/graphics/battle_anims/sprites/black_ball.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +156 205 98 +156 205 98 +156 205 98 +131 205 131 +156 205 0 +24 0 106 +156 8 98 +0 213 131 +24 197 0 +164 8 106 +156 8 98 +164 8 106 +156 205 131 +24 213 98 +156 8 106 +164 205 98 diff --git a/graphics/battle_anims/sprites/new/teapot.png b/graphics/battle_anims/sprites/new/teapot.png index 6be0680dfc..0e26606418 100644 Binary files a/graphics/battle_anims/sprites/new/teapot.png and b/graphics/battle_anims/sprites/new/teapot.png differ diff --git a/graphics/battle_anims/sprites/omega_symbol.png b/graphics/battle_anims/sprites/omega_symbol.png index a821d5e40a..150501367a 100644 Binary files a/graphics/battle_anims/sprites/omega_symbol.png and b/graphics/battle_anims/sprites/omega_symbol.png differ diff --git a/graphics/battle_anims/unused/line_sketch_2.pal b/graphics/battle_anims/unused/line_sketch_2.pal new file mode 100644 index 0000000000..17cce5c65e --- /dev/null +++ b/graphics/battle_anims/unused/line_sketch_2.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +0 0 255 +0 255 255 +148 255 255 +148 205 255 +148 156 255 +0 0 0 +0 0 0 +0 0 0 +255 0 8 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +255 255 255 diff --git a/graphics/battle_anims/unused/line_sketch_2_pal.bin b/graphics/battle_anims/unused/line_sketch_2_pal.bin deleted file mode 100644 index 15379a9cea..0000000000 Binary files a/graphics/battle_anims/unused/line_sketch_2_pal.bin and /dev/null differ diff --git a/graphics/battle_interface/alpha_indicator.png b/graphics/battle_interface/alpha_indicator.png index 0e302576b6..84cfee2cf1 100644 Binary files a/graphics/battle_interface/alpha_indicator.png and b/graphics/battle_interface/alpha_indicator.png differ diff --git a/graphics/battle_interface/omega_indicator.png b/graphics/battle_interface/omega_indicator.png index c56d51c151..8e21007a80 100644 Binary files a/graphics/battle_interface/omega_indicator.png and b/graphics/battle_interface/omega_indicator.png differ diff --git a/graphics/battle_interface/z_move_trigger.png b/graphics/battle_interface/z_move_trigger.png index 5e27dbabbe..d719494d9f 100644 Binary files a/graphics/battle_interface/z_move_trigger.png and b/graphics/battle_interface/z_move_trigger.png differ diff --git a/graphics/berries/babiri.png b/graphics/berries/babiri.png index 056353bab9..bd9222899e 100644 Binary files a/graphics/berries/babiri.png and b/graphics/berries/babiri.png differ diff --git a/graphics/berries/charti.png b/graphics/berries/charti.png index 9f119ebac0..399cd626ef 100644 Binary files a/graphics/berries/charti.png and b/graphics/berries/charti.png differ diff --git a/graphics/berries/chilan.png b/graphics/berries/chilan.png index 8f717bb82c..286ed5c3fa 100644 Binary files a/graphics/berries/chilan.png and b/graphics/berries/chilan.png differ diff --git a/graphics/berries/chople.png b/graphics/berries/chople.png index 0b4b28014f..345eae24b7 100644 Binary files a/graphics/berries/chople.png and b/graphics/berries/chople.png differ diff --git a/graphics/berries/coba.png b/graphics/berries/coba.png index 18283bd79d..7824d84498 100644 Binary files a/graphics/berries/coba.png and b/graphics/berries/coba.png differ diff --git a/graphics/berries/colbur.png b/graphics/berries/colbur.png index d422a826e5..bb1560b228 100644 Binary files a/graphics/berries/colbur.png and b/graphics/berries/colbur.png differ diff --git a/graphics/berries/haban.png b/graphics/berries/haban.png index 87b27fb263..6dc0f01902 100644 Binary files a/graphics/berries/haban.png and b/graphics/berries/haban.png differ diff --git a/graphics/berries/kasib.png b/graphics/berries/kasib.png index f1b09244b0..3cba928cef 100644 Binary files a/graphics/berries/kasib.png and b/graphics/berries/kasib.png differ diff --git a/graphics/berries/kebia.png b/graphics/berries/kebia.png index e0dfefd672..b4ed7dc434 100644 Binary files a/graphics/berries/kebia.png and b/graphics/berries/kebia.png differ diff --git a/graphics/berries/kee.png b/graphics/berries/kee.png index 1c83b65b19..37e1dc087c 100644 Binary files a/graphics/berries/kee.png and b/graphics/berries/kee.png differ diff --git a/graphics/berries/micle.png b/graphics/berries/micle.png index bbe6011b44..953523dd86 100644 Binary files a/graphics/berries/micle.png and b/graphics/berries/micle.png differ diff --git a/graphics/berries/occa.png b/graphics/berries/occa.png index 1ad829e5f1..1d2af365f9 100644 Binary files a/graphics/berries/occa.png and b/graphics/berries/occa.png differ diff --git a/graphics/berries/passho.png b/graphics/berries/passho.png index c541475450..156dc18d18 100644 Binary files a/graphics/berries/passho.png and b/graphics/berries/passho.png differ diff --git a/graphics/berries/rindo.png b/graphics/berries/rindo.png index 91e895d043..7410778938 100644 Binary files a/graphics/berries/rindo.png and b/graphics/berries/rindo.png differ diff --git a/graphics/berries/roseli.png b/graphics/berries/roseli.png index 4eb675a447..9fb4c8f8dd 100644 Binary files a/graphics/berries/roseli.png and b/graphics/berries/roseli.png differ diff --git a/graphics/berries/rowap.png b/graphics/berries/rowap.png index bbeee3f3b4..decb5a2a99 100644 Binary files a/graphics/berries/rowap.png and b/graphics/berries/rowap.png differ diff --git a/graphics/berries/shuca.png b/graphics/berries/shuca.png index 618f3abace..8ddc547489 100644 Binary files a/graphics/berries/shuca.png and b/graphics/berries/shuca.png differ diff --git a/graphics/berries/tanga.png b/graphics/berries/tanga.png index 702da676f3..6b9076b608 100644 Binary files a/graphics/berries/tanga.png and b/graphics/berries/tanga.png differ diff --git a/graphics/berries/wacan.png b/graphics/berries/wacan.png index 5d88c95bd2..d79c025e6f 100644 Binary files a/graphics/berries/wacan.png and b/graphics/berries/wacan.png differ diff --git a/graphics/berries/yache.png b/graphics/berries/yache.png index 3f39782770..43ebf07682 100644 Binary files a/graphics/berries/yache.png and b/graphics/berries/yache.png differ diff --git a/graphics/cable_car/pylons.bin b/graphics/cable_car/pylon_pole.bin similarity index 100% rename from graphics/cable_car/pylons.bin rename to graphics/cable_car/pylon_pole.bin diff --git a/graphics/cable_car/pylon_top.bin b/graphics/cable_car/pylon_top.bin new file mode 100755 index 0000000000..44b20744d4 Binary files /dev/null and b/graphics/cable_car/pylon_top.bin differ diff --git a/graphics/expansion_intro/powered_by.png b/graphics/expansion_intro/powered_by.png index b422f6e568..910053f646 100644 Binary files a/graphics/expansion_intro/powered_by.png and b/graphics/expansion_intro/powered_by.png differ diff --git a/graphics/expansion_intro/rhh_credits.bin b/graphics/expansion_intro/rhh_credits.bin index 629a2e9544..44ec5e7e42 100644 Binary files a/graphics/expansion_intro/rhh_credits.bin and b/graphics/expansion_intro/rhh_credits.bin differ diff --git a/graphics/expansion_intro/rhh_credits.png b/graphics/expansion_intro/rhh_credits.png index 177022a9d6..02e1dd3b6e 100644 Binary files a/graphics/expansion_intro/rhh_credits.png and b/graphics/expansion_intro/rhh_credits.png differ diff --git a/graphics/items/icon_palettes/ability_shield.pal b/graphics/items/icon_palettes/ability_shield.pal new file mode 100644 index 0000000000..d11016b32c --- /dev/null +++ b/graphics/items/icon_palettes/ability_shield.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 255 255 +248 200 240 +224 176 232 +200 144 224 +240 224 248 +176 120 216 +77 146 186 +105 179 221 +238 246 246 +222 222 222 +197 197 197 +161 161 161 +48 48 48 +255 255 255 +0 0 0 diff --git a/graphics/items/icon_palettes/adamant_crystal.pal b/graphics/items/icon_palettes/adamant_crystal.pal new file mode 100644 index 0000000000..738ff04981 --- /dev/null +++ b/graphics/items/icon_palettes/adamant_crystal.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 255 255 +184 208 248 +168 200 248 +81 123 173 +128 168 216 +200 232 248 +224 248 248 +248 248 248 +104 104 104 +48 48 48 +255 255 255 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icon_palettes/auspicious_armor.pal b/graphics/items/icon_palettes/auspicious_armor.pal new file mode 100644 index 0000000000..9d0c8e444c --- /dev/null +++ b/graphics/items/icon_palettes/auspicious_armor.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 255 255 +160 144 32 +192 176 56 +224 208 88 +128 112 32 +72 56 24 +224 80 80 +176 88 88 +120 72 72 +48 48 48 +255 255 255 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icon_palettes/big_bamboo_shoot.pal b/graphics/items/icon_palettes/big_bamboo_shoot.pal new file mode 100644 index 0000000000..28ab4fe699 --- /dev/null +++ b/graphics/items/icon_palettes/big_bamboo_shoot.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +0 0 0 +189 202 71 +121 168 43 +120 167 42 +163 126 74 +116 101 78 +79 66 46 +115 77 43 +180 133 94 +233 176 96 +241 241 193 +183 170 147 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icon_palettes/black_augurite.pal b/graphics/items/icon_palettes/black_augurite.pal new file mode 100644 index 0000000000..0d67abee39 --- /dev/null +++ b/graphics/items/icon_palettes/black_augurite.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +120 192 168 +0 0 0 +111 108 124 +58 48 49 +206 206 214 +151 149 160 +142 93 117 +89 62 76 +255 255 255 +111 109 124 +194 192 202 +88 62 76 +80 74 88 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icon_palettes/booster_energy.pal b/graphics/items/icon_palettes/booster_energy.pal new file mode 100644 index 0000000000..21dc17ba2f --- /dev/null +++ b/graphics/items/icon_palettes/booster_energy.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +111 45 22 +0 0 0 +190 91 13 +255 139 1 +255 255 255 +255 231 10 +251 42 6 +154 157 151 +193 161 19 +234 238 234 +122 111 115 +74 67 68 +90 185 248 +78 86 255 +111 52 255 diff --git a/graphics/items/icon_palettes/covert_cloak.pal b/graphics/items/icon_palettes/covert_cloak.pal new file mode 100644 index 0000000000..06491d2ada --- /dev/null +++ b/graphics/items/icon_palettes/covert_cloak.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +0 0 0 +54 52 72 +101 120 143 +103 139 163 +84 105 130 +74 75 101 +90 108 136 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icon_palettes/gimmighoul_coin.pal b/graphics/items/icon_palettes/gimmighoul_coin.pal new file mode 100644 index 0000000000..555a04dbe3 --- /dev/null +++ b/graphics/items/icon_palettes/gimmighoul_coin.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +180 124 35 +115 66 13 +255 249 234 +224 159 27 +255 226 121 +255 200 59 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icon_palettes/griseous_core.pal b/graphics/items/icon_palettes/griseous_core.pal new file mode 100644 index 0000000000..05980782c6 --- /dev/null +++ b/graphics/items/icon_palettes/griseous_core.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 255 255 +206 181 41 +222 198 57 +247 231 140 +156 132 33 +189 156 41 +123 99 33 +49 49 49 +255 255 255 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icon_palettes/leaders_crest.pal b/graphics/items/icon_palettes/leaders_crest.pal new file mode 100644 index 0000000000..1f60ee2204 --- /dev/null +++ b/graphics/items/icon_palettes/leaders_crest.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +0 0 0 +188 143 70 +131 85 43 +186 181 176 +80 74 71 +239 185 78 +138 128 128 +220 217 215 +250 225 159 +246 205 93 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icon_palettes/linking_cord.pal b/graphics/items/icon_palettes/linking_cord.pal new file mode 100644 index 0000000000..8be2b522f7 --- /dev/null +++ b/graphics/items/icon_palettes/linking_cord.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +128 192 168 +87 87 88 +155 158 156 +117 114 116 +0 0 0 +36 37 42 +62 66 68 +56 57 61 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icon_palettes/loaded_dice.pal b/graphics/items/icon_palettes/loaded_dice.pal new file mode 100644 index 0000000000..16624b9e9e --- /dev/null +++ b/graphics/items/icon_palettes/loaded_dice.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +48 52 78 +127 216 17 +0 0 0 +192 240 140 +128 217 18 +90 137 46 +129 218 19 +88 135 48 +107 182 17 +128 217 18 +93 144 44 +89 136 47 +255 255 255 +127 216 19 +48 38 64 diff --git a/graphics/items/icon_palettes/lustrous_globe.pal b/graphics/items/icon_palettes/lustrous_globe.pal new file mode 100644 index 0000000000..b62730a161 --- /dev/null +++ b/graphics/items/icon_palettes/lustrous_globe.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 255 255 +248 216 232 +198 159 217 +210 171 229 +224 192 240 +210 192 240 +160 192 232 +144 200 232 +160 216 240 +128 216 224 +208 240 240 +248 240 240 +248 248 248 +80 80 80 +48 48 48 diff --git a/graphics/items/icon_palettes/malicious_armor.pal b/graphics/items/icon_palettes/malicious_armor.pal new file mode 100644 index 0000000000..1ef3efe89e --- /dev/null +++ b/graphics/items/icon_palettes/malicious_armor.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 255 255 +66 66 99 +90 90 132 +115 115 156 +90 115 230 +132 140 181 +125 147 246 +48 48 48 +255 255 255 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icon_palettes/mirror_herb.pal b/graphics/items/icon_palettes/mirror_herb.pal new file mode 100644 index 0000000000..b4ad3f9726 --- /dev/null +++ b/graphics/items/icon_palettes/mirror_herb.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +0 0 0 +39 194 168 +124 228 211 +19 101 84 +187 228 77 +238 250 169 +234 244 124 +24 152 108 +126 106 28 +173 171 15 +43 138 128 +127 175 55 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icon_palettes/peat_block.pal b/graphics/items/icon_palettes/peat_block.pal new file mode 100644 index 0000000000..8d4b5e3b6f --- /dev/null +++ b/graphics/items/icon_palettes/peat_block.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +128 198 168 +32 32 32 +230 217 213 +199 189 184 +156 135 143 +102 83 83 +143 118 130 +65 56 56 +179 162 151 +117 100 100 +210 183 192 +180 158 167 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icon_palettes/punching_glove.pal b/graphics/items/icon_palettes/punching_glove.pal new file mode 100644 index 0000000000..f21cb39ec5 --- /dev/null +++ b/graphics/items/icon_palettes/punching_glove.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 255 255 +255 212 0 +200 56 32 +248 64 48 +232 232 232 +48 48 48 +255 255 255 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icon_palettes/scroll_of_darkness.pal b/graphics/items/icon_palettes/scroll_of_darkness.pal new file mode 100644 index 0000000000..1b66d85e00 --- /dev/null +++ b/graphics/items/icon_palettes/scroll_of_darkness.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +0 0 0 +130 116 116 +86 86 86 +54 41 49 +104 78 86 +56 56 56 +141 105 41 +223 191 65 +242 241 242 +184 172 179 +186 140 57 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icon_palettes/scroll_of_waters.pal b/graphics/items/icon_palettes/scroll_of_waters.pal new file mode 100644 index 0000000000..41a94976f0 --- /dev/null +++ b/graphics/items/icon_palettes/scroll_of_waters.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +0 0 0 +118 109 109 +143 130 127 +101 77 83 +73 68 68 +122 108 104 +141 105 41 +223 191 65 +242 241 242 +184 172 179 +186 140 57 +102 78 84 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/items/icon_palettes/tera_orb.pal b/graphics/items/icon_palettes/tera_orb.pal new file mode 100644 index 0000000000..78b3689f9d --- /dev/null +++ b/graphics/items/icon_palettes/tera_orb.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +0 0 0 +81 41 75 +98 61 92 +66 72 65 +51 4 43 +201 185 199 +110 86 106 +84 73 92 +32 41 34 +255 255 255 +71 50 92 +64 71 94 +139 165 201 +183 191 209 +0 0 0 diff --git a/graphics/items/icon_palettes/tiny_bamboo_shoot.pal b/graphics/items/icon_palettes/tiny_bamboo_shoot.pal new file mode 100644 index 0000000000..1172befa6c --- /dev/null +++ b/graphics/items/icon_palettes/tiny_bamboo_shoot.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +0 0 0 +111 167 43 +179 192 68 +107 144 66 +84 116 48 +68 93 37 +124 137 52 +168 87 80 +168 116 111 +241 241 193 +168 87 80 +183 170 147 +121 52 57 +0 0 0 +0 0 0 diff --git a/graphics/items/icons/ability_capsule.png b/graphics/items/icons/ability_capsule.png index 4cb366137f..49a70ffa56 100755 Binary files a/graphics/items/icons/ability_capsule.png and b/graphics/items/icons/ability_capsule.png differ diff --git a/graphics/items/icons/ability_patch.png b/graphics/items/icons/ability_patch.png index acbef74623..8f14ab7eee 100644 Binary files a/graphics/items/icons/ability_patch.png and b/graphics/items/icons/ability_patch.png differ diff --git a/graphics/items/icons/ability_shield.png b/graphics/items/icons/ability_shield.png new file mode 100644 index 0000000000..de7354d71f Binary files /dev/null and b/graphics/items/icons/ability_shield.png differ diff --git a/graphics/items/icons/absorb_bulb.png b/graphics/items/icons/absorb_bulb.png index d958ab3684..a63f7a8bcc 100755 Binary files a/graphics/items/icons/absorb_bulb.png and b/graphics/items/icons/absorb_bulb.png differ diff --git a/graphics/items/icons/adamant_crystal.png b/graphics/items/icons/adamant_crystal.png new file mode 100644 index 0000000000..37175b565e Binary files /dev/null and b/graphics/items/icons/adamant_crystal.png differ diff --git a/graphics/items/icons/air_balloon.png b/graphics/items/icons/air_balloon.png index 6ed3a9ad21..dbcff6d13b 100755 Binary files a/graphics/items/icons/air_balloon.png and b/graphics/items/icons/air_balloon.png differ diff --git a/graphics/items/icons/armor_fossil.png b/graphics/items/icons/armor_fossil.png index a24d2ec4da..7647f9db55 100755 Binary files a/graphics/items/icons/armor_fossil.png and b/graphics/items/icons/armor_fossil.png differ diff --git a/graphics/items/icons/auspicious_armor.png b/graphics/items/icons/auspicious_armor.png new file mode 100644 index 0000000000..db7bb231bc Binary files /dev/null and b/graphics/items/icons/auspicious_armor.png differ diff --git a/graphics/items/icons/babiri_berry.png b/graphics/items/icons/babiri_berry.png index aeca14e70a..72141937b9 100755 Binary files a/graphics/items/icons/babiri_berry.png and b/graphics/items/icons/babiri_berry.png differ diff --git a/graphics/items/icons/big_bamboo_shoot.png b/graphics/items/icons/big_bamboo_shoot.png new file mode 100644 index 0000000000..49c3428661 Binary files /dev/null and b/graphics/items/icons/big_bamboo_shoot.png differ diff --git a/graphics/items/icons/big_malasada.png b/graphics/items/icons/big_malasada.png index d24cd9e00d..a651027774 100755 Binary files a/graphics/items/icons/big_malasada.png and b/graphics/items/icons/big_malasada.png differ diff --git a/graphics/items/icons/big_root.png b/graphics/items/icons/big_root.png index e857cc5f30..ef20e8ea54 100644 Binary files a/graphics/items/icons/big_root.png and b/graphics/items/icons/big_root.png differ diff --git a/graphics/items/icons/black_apricorn.png b/graphics/items/icons/black_apricorn.png index c80707e067..470e77fcfc 100755 Binary files a/graphics/items/icons/black_apricorn.png and b/graphics/items/icons/black_apricorn.png differ diff --git a/graphics/items/icons/black_augurite.png b/graphics/items/icons/black_augurite.png new file mode 100644 index 0000000000..8be2bc188c Binary files /dev/null and b/graphics/items/icons/black_augurite.png differ diff --git a/graphics/items/icons/black_sludge.png b/graphics/items/icons/black_sludge.png index 2e1fac755f..9987ef73b6 100644 Binary files a/graphics/items/icons/black_sludge.png and b/graphics/items/icons/black_sludge.png differ diff --git a/graphics/items/icons/blue_apricorn.png b/graphics/items/icons/blue_apricorn.png index 35d0ed23b2..9e1b19fb30 100755 Binary files a/graphics/items/icons/blue_apricorn.png and b/graphics/items/icons/blue_apricorn.png differ diff --git a/graphics/items/icons/booster_energy.png b/graphics/items/icons/booster_energy.png new file mode 100644 index 0000000000..df583a2508 Binary files /dev/null and b/graphics/items/icons/booster_energy.png differ diff --git a/graphics/items/icons/bug_gem.png b/graphics/items/icons/bug_gem.png index 0561d24d06..4d69046687 100644 Binary files a/graphics/items/icons/bug_gem.png and b/graphics/items/icons/bug_gem.png differ diff --git a/graphics/items/icons/bug_memory.png b/graphics/items/icons/bug_memory.png index 5c4c090988..87f558feef 100755 Binary files a/graphics/items/icons/bug_memory.png and b/graphics/items/icons/bug_memory.png differ diff --git a/graphics/items/icons/burn_drive.png b/graphics/items/icons/burn_drive.png index c83fbd3358..9486eff484 100644 Binary files a/graphics/items/icons/burn_drive.png and b/graphics/items/icons/burn_drive.png differ diff --git a/graphics/items/icons/cell_battery.png b/graphics/items/icons/cell_battery.png index 6183bdb085..23fde6a299 100755 Binary files a/graphics/items/icons/cell_battery.png and b/graphics/items/icons/cell_battery.png differ diff --git a/graphics/items/icons/charti_berry.png b/graphics/items/icons/charti_berry.png index 8848e18d4f..a59e62009a 100755 Binary files a/graphics/items/icons/charti_berry.png and b/graphics/items/icons/charti_berry.png differ diff --git a/graphics/items/icons/chilan_berry.png b/graphics/items/icons/chilan_berry.png index d1516f7323..c78465aa21 100755 Binary files a/graphics/items/icons/chilan_berry.png and b/graphics/items/icons/chilan_berry.png differ diff --git a/graphics/items/icons/chill_drive.png b/graphics/items/icons/chill_drive.png index a2c7e98a68..d3d5e019c2 100644 Binary files a/graphics/items/icons/chill_drive.png and b/graphics/items/icons/chill_drive.png differ diff --git a/graphics/items/icons/choice_scarf.png b/graphics/items/icons/choice_scarf.png index 51157fcc22..99e126453e 100644 Binary files a/graphics/items/icons/choice_scarf.png and b/graphics/items/icons/choice_scarf.png differ diff --git a/graphics/items/icons/choice_specs.png b/graphics/items/icons/choice_specs.png index 6c64cb26e4..7c90bdcff3 100644 Binary files a/graphics/items/icons/choice_specs.png and b/graphics/items/icons/choice_specs.png differ diff --git a/graphics/items/icons/chople_berry.png b/graphics/items/icons/chople_berry.png index 3fa84f379a..22f4f2426c 100755 Binary files a/graphics/items/icons/chople_berry.png and b/graphics/items/icons/chople_berry.png differ diff --git a/graphics/items/icons/coba_berry.png b/graphics/items/icons/coba_berry.png index 5ac21683e0..05f117f4bf 100755 Binary files a/graphics/items/icons/coba_berry.png and b/graphics/items/icons/coba_berry.png differ diff --git a/graphics/items/icons/colbur_berry.png b/graphics/items/icons/colbur_berry.png index 56d46a52a2..9e78509433 100755 Binary files a/graphics/items/icons/colbur_berry.png and b/graphics/items/icons/colbur_berry.png differ diff --git a/graphics/items/icons/cover_fossil.png b/graphics/items/icons/cover_fossil.png index bc8bbe69b5..1202bb4556 100755 Binary files a/graphics/items/icons/cover_fossil.png and b/graphics/items/icons/cover_fossil.png differ diff --git a/graphics/items/icons/covert_cloak.png b/graphics/items/icons/covert_cloak.png new file mode 100644 index 0000000000..a6cb974878 Binary files /dev/null and b/graphics/items/icons/covert_cloak.png differ diff --git a/graphics/items/icons/custap_berry.png b/graphics/items/icons/custap_berry.png index 3fa594667d..56f1492c3c 100755 Binary files a/graphics/items/icons/custap_berry.png and b/graphics/items/icons/custap_berry.png differ diff --git a/graphics/items/icons/damp_rock.png b/graphics/items/icons/damp_rock.png index fe908739e5..97c75b08fd 100644 Binary files a/graphics/items/icons/damp_rock.png and b/graphics/items/icons/damp_rock.png differ diff --git a/graphics/items/icons/dark_gem.png b/graphics/items/icons/dark_gem.png index 947f041674..8999ca25ac 100644 Binary files a/graphics/items/icons/dark_gem.png and b/graphics/items/icons/dark_gem.png differ diff --git a/graphics/items/icons/dark_memory.png b/graphics/items/icons/dark_memory.png index 258bd309bf..3cb69c7a5f 100755 Binary files a/graphics/items/icons/dark_memory.png and b/graphics/items/icons/dark_memory.png differ diff --git a/graphics/items/icons/dawn_stone.png b/graphics/items/icons/dawn_stone.png index 0465d18bad..a0db015327 100755 Binary files a/graphics/items/icons/dawn_stone.png and b/graphics/items/icons/dawn_stone.png differ diff --git a/graphics/items/icons/destiny_knot.png b/graphics/items/icons/destiny_knot.png index ceeb38d5c7..ce8b18f937 100644 Binary files a/graphics/items/icons/destiny_knot.png and b/graphics/items/icons/destiny_knot.png differ diff --git a/graphics/items/icons/douse_drive.png b/graphics/items/icons/douse_drive.png index eee5ae35f1..f59616159a 100644 Binary files a/graphics/items/icons/douse_drive.png and b/graphics/items/icons/douse_drive.png differ diff --git a/graphics/items/icons/draco_plate.png b/graphics/items/icons/draco_plate.png index 9b08c31c8d..21339c0482 100644 Binary files a/graphics/items/icons/draco_plate.png and b/graphics/items/icons/draco_plate.png differ diff --git a/graphics/items/icons/dragon_gem.png b/graphics/items/icons/dragon_gem.png index 2d41c858c1..f071726a13 100644 Binary files a/graphics/items/icons/dragon_gem.png and b/graphics/items/icons/dragon_gem.png differ diff --git a/graphics/items/icons/dragon_memory.png b/graphics/items/icons/dragon_memory.png index d073dace31..3888b3f3af 100755 Binary files a/graphics/items/icons/dragon_memory.png and b/graphics/items/icons/dragon_memory.png differ diff --git a/graphics/items/icons/dread_plate.png b/graphics/items/icons/dread_plate.png index f93493f97b..8679df524d 100644 Binary files a/graphics/items/icons/dread_plate.png and b/graphics/items/icons/dread_plate.png differ diff --git a/graphics/items/icons/dubious_disc.png b/graphics/items/icons/dubious_disc.png index bf2ab2fc0f..bd0e7f7758 100755 Binary files a/graphics/items/icons/dubious_disc.png and b/graphics/items/icons/dubious_disc.png differ diff --git a/graphics/items/icons/dusk_stone.png b/graphics/items/icons/dusk_stone.png index e928b25167..3d3669bb44 100755 Binary files a/graphics/items/icons/dusk_stone.png and b/graphics/items/icons/dusk_stone.png differ diff --git a/graphics/items/icons/earth_plate.png b/graphics/items/icons/earth_plate.png index 688b24be35..e79dff33ce 100644 Binary files a/graphics/items/icons/earth_plate.png and b/graphics/items/icons/earth_plate.png differ diff --git a/graphics/items/icons/eject_button.png b/graphics/items/icons/eject_button.png index a0492ed6e0..ada08cbb7f 100755 Binary files a/graphics/items/icons/eject_button.png and b/graphics/items/icons/eject_button.png differ diff --git a/graphics/items/icons/electirizer.png b/graphics/items/icons/electirizer.png index 73f6f8f26e..f0351e64d6 100755 Binary files a/graphics/items/icons/electirizer.png and b/graphics/items/icons/electirizer.png differ diff --git a/graphics/items/icons/electric_gem.png b/graphics/items/icons/electric_gem.png index 88e604f182..e17e3f4d13 100644 Binary files a/graphics/items/icons/electric_gem.png and b/graphics/items/icons/electric_gem.png differ diff --git a/graphics/items/icons/electric_memory.png b/graphics/items/icons/electric_memory.png index ce9a8f3624..0ab5da3770 100755 Binary files a/graphics/items/icons/electric_memory.png and b/graphics/items/icons/electric_memory.png differ diff --git a/graphics/items/icons/eviolite.png b/graphics/items/icons/eviolite.png index c08cc59506..b8bc613f8f 100644 Binary files a/graphics/items/icons/eviolite.png and b/graphics/items/icons/eviolite.png differ diff --git a/graphics/items/icons/expert_belt.png b/graphics/items/icons/expert_belt.png index bc00454907..62d4b8bc26 100644 Binary files a/graphics/items/icons/expert_belt.png and b/graphics/items/icons/expert_belt.png differ diff --git a/graphics/items/icons/fairy_gem.png b/graphics/items/icons/fairy_gem.png index 871f74426d..5fe8f6ed99 100644 Binary files a/graphics/items/icons/fairy_gem.png and b/graphics/items/icons/fairy_gem.png differ diff --git a/graphics/items/icons/fairy_memory.png b/graphics/items/icons/fairy_memory.png index fba8691280..5d472d9663 100755 Binary files a/graphics/items/icons/fairy_memory.png and b/graphics/items/icons/fairy_memory.png differ diff --git a/graphics/items/icons/fighting_gem.png b/graphics/items/icons/fighting_gem.png index 7f4fc8b97d..2293767794 100644 Binary files a/graphics/items/icons/fighting_gem.png and b/graphics/items/icons/fighting_gem.png differ diff --git a/graphics/items/icons/fighting_memory.png b/graphics/items/icons/fighting_memory.png index ad21a2d078..f46e89d733 100755 Binary files a/graphics/items/icons/fighting_memory.png and b/graphics/items/icons/fighting_memory.png differ diff --git a/graphics/items/icons/fire_gem.png b/graphics/items/icons/fire_gem.png index deb8979bd8..d6caa7d3d1 100644 Binary files a/graphics/items/icons/fire_gem.png and b/graphics/items/icons/fire_gem.png differ diff --git a/graphics/items/icons/fire_memory.png b/graphics/items/icons/fire_memory.png index 33116aed12..bc62b02c15 100755 Binary files a/graphics/items/icons/fire_memory.png and b/graphics/items/icons/fire_memory.png differ diff --git a/graphics/items/icons/fist_plate.png b/graphics/items/icons/fist_plate.png index 0142938d51..7e6cb2b92d 100644 Binary files a/graphics/items/icons/fist_plate.png and b/graphics/items/icons/fist_plate.png differ diff --git a/graphics/items/icons/flame_plate.png b/graphics/items/icons/flame_plate.png index 6f78e5d020..42a3564ea2 100644 Binary files a/graphics/items/icons/flame_plate.png and b/graphics/items/icons/flame_plate.png differ diff --git a/graphics/items/icons/float_stone.png b/graphics/items/icons/float_stone.png index 61f096fc36..a421d553fb 100644 Binary files a/graphics/items/icons/float_stone.png and b/graphics/items/icons/float_stone.png differ diff --git a/graphics/items/icons/flying_gem.png b/graphics/items/icons/flying_gem.png index 563e80f3bf..eb328c85ee 100644 Binary files a/graphics/items/icons/flying_gem.png and b/graphics/items/icons/flying_gem.png differ diff --git a/graphics/items/icons/flying_memory.png b/graphics/items/icons/flying_memory.png index da413ba1ff..e38f240048 100755 Binary files a/graphics/items/icons/flying_memory.png and b/graphics/items/icons/flying_memory.png differ diff --git a/graphics/items/icons/focus_sash.png b/graphics/items/icons/focus_sash.png index e0df9798ef..a09d2d26bd 100644 Binary files a/graphics/items/icons/focus_sash.png and b/graphics/items/icons/focus_sash.png differ diff --git a/graphics/items/icons/full_incense.png b/graphics/items/icons/full_incense.png index 230927e085..a44f6bffa8 100755 Binary files a/graphics/items/icons/full_incense.png and b/graphics/items/icons/full_incense.png differ diff --git a/graphics/items/icons/ghost_gem.png b/graphics/items/icons/ghost_gem.png index 96e320e219..c4813ee299 100644 Binary files a/graphics/items/icons/ghost_gem.png and b/graphics/items/icons/ghost_gem.png differ diff --git a/graphics/items/icons/ghost_memory.png b/graphics/items/icons/ghost_memory.png index 3041643aaa..2a9b4f6599 100755 Binary files a/graphics/items/icons/ghost_memory.png and b/graphics/items/icons/ghost_memory.png differ diff --git a/graphics/items/icons/gimmighoul_coin.png b/graphics/items/icons/gimmighoul_coin.png new file mode 100644 index 0000000000..b161cf12ac Binary files /dev/null and b/graphics/items/icons/gimmighoul_coin.png differ diff --git a/graphics/items/icons/gracidea.png b/graphics/items/icons/gracidea.png index 31bac3846c..fdbd8c8af0 100755 Binary files a/graphics/items/icons/gracidea.png and b/graphics/items/icons/gracidea.png differ diff --git a/graphics/items/icons/grass_gem.png b/graphics/items/icons/grass_gem.png index df57119b27..756a769cab 100644 Binary files a/graphics/items/icons/grass_gem.png and b/graphics/items/icons/grass_gem.png differ diff --git a/graphics/items/icons/grass_memory.png b/graphics/items/icons/grass_memory.png index 646568c412..4ef16802d7 100755 Binary files a/graphics/items/icons/grass_memory.png and b/graphics/items/icons/grass_memory.png differ diff --git a/graphics/items/icons/green_apricorn.png b/graphics/items/icons/green_apricorn.png index dc821541bc..da60f8544a 100755 Binary files a/graphics/items/icons/green_apricorn.png and b/graphics/items/icons/green_apricorn.png differ diff --git a/graphics/items/icons/grip_claw.png b/graphics/items/icons/grip_claw.png index d76c6b75c2..dfe2b5509a 100644 Binary files a/graphics/items/icons/grip_claw.png and b/graphics/items/icons/grip_claw.png differ diff --git a/graphics/items/icons/griseous_core.png b/graphics/items/icons/griseous_core.png new file mode 100644 index 0000000000..08748fe7bb Binary files /dev/null and b/graphics/items/icons/griseous_core.png differ diff --git a/graphics/items/icons/griseous_orb.png b/graphics/items/icons/griseous_orb.png index 5140ea3acd..e306e58661 100644 Binary files a/graphics/items/icons/griseous_orb.png and b/graphics/items/icons/griseous_orb.png differ diff --git a/graphics/items/icons/ground_gem.png b/graphics/items/icons/ground_gem.png index 27a8bf69d5..21fab57b0f 100644 Binary files a/graphics/items/icons/ground_gem.png and b/graphics/items/icons/ground_gem.png differ diff --git a/graphics/items/icons/ground_memory.png b/graphics/items/icons/ground_memory.png index 0f9f31734d..45ac4379ef 100755 Binary files a/graphics/items/icons/ground_memory.png and b/graphics/items/icons/ground_memory.png differ diff --git a/graphics/items/icons/haban_berry.png b/graphics/items/icons/haban_berry.png index f413ea9e14..7171d2b07e 100755 Binary files a/graphics/items/icons/haban_berry.png and b/graphics/items/icons/haban_berry.png differ diff --git a/graphics/items/icons/heat_rock.png b/graphics/items/icons/heat_rock.png index 60eae81696..cbfa598582 100644 Binary files a/graphics/items/icons/heat_rock.png and b/graphics/items/icons/heat_rock.png differ diff --git a/graphics/items/icons/ice_gem.png b/graphics/items/icons/ice_gem.png index db87018fea..e9c28f0503 100644 Binary files a/graphics/items/icons/ice_gem.png and b/graphics/items/icons/ice_gem.png differ diff --git a/graphics/items/icons/ice_memory.png b/graphics/items/icons/ice_memory.png index c0f7cd76e8..5dad66f879 100755 Binary files a/graphics/items/icons/ice_memory.png and b/graphics/items/icons/ice_memory.png differ diff --git a/graphics/items/icons/ice_stone.png b/graphics/items/icons/ice_stone.png index ee5309544e..5f5a7958a6 100755 Binary files a/graphics/items/icons/ice_stone.png and b/graphics/items/icons/ice_stone.png differ diff --git a/graphics/items/icons/icicle_plate.png b/graphics/items/icons/icicle_plate.png index 2d3e27bbba..7a74d45a55 100644 Binary files a/graphics/items/icons/icicle_plate.png and b/graphics/items/icons/icicle_plate.png differ diff --git a/graphics/items/icons/icy_rock.png b/graphics/items/icons/icy_rock.png index 800b12ec87..56fe8cf411 100644 Binary files a/graphics/items/icons/icy_rock.png and b/graphics/items/icons/icy_rock.png differ diff --git a/graphics/items/icons/insect_plate.png b/graphics/items/icons/insect_plate.png index 993e420da1..23bee90932 100644 Binary files a/graphics/items/icons/insect_plate.png and b/graphics/items/icons/insect_plate.png differ diff --git a/graphics/items/icons/iron_ball.png b/graphics/items/icons/iron_ball.png index e1f82bde1d..994641c8d3 100644 Binary files a/graphics/items/icons/iron_ball.png and b/graphics/items/icons/iron_ball.png differ diff --git a/graphics/items/icons/iron_plate.png b/graphics/items/icons/iron_plate.png index 08a3cb8b99..d4a778e4df 100644 Binary files a/graphics/items/icons/iron_plate.png and b/graphics/items/icons/iron_plate.png differ diff --git a/graphics/items/icons/jaboca_berry.png b/graphics/items/icons/jaboca_berry.png index da6d029b08..41cbeb174a 100755 Binary files a/graphics/items/icons/jaboca_berry.png and b/graphics/items/icons/jaboca_berry.png differ diff --git a/graphics/items/icons/jaw_fossil.png b/graphics/items/icons/jaw_fossil.png index a52a7579fd..5691efc13b 100755 Binary files a/graphics/items/icons/jaw_fossil.png and b/graphics/items/icons/jaw_fossil.png differ diff --git a/graphics/items/icons/kasib_berry.png b/graphics/items/icons/kasib_berry.png index c09fa20dec..a62c3e95cb 100755 Binary files a/graphics/items/icons/kasib_berry.png and b/graphics/items/icons/kasib_berry.png differ diff --git a/graphics/items/icons/kebia_berry.png b/graphics/items/icons/kebia_berry.png index a4b5a43939..ba679f626b 100755 Binary files a/graphics/items/icons/kebia_berry.png and b/graphics/items/icons/kebia_berry.png differ diff --git a/graphics/items/icons/kee_berry.png b/graphics/items/icons/kee_berry.png index 83749d1b83..bbd6c53cf2 100755 Binary files a/graphics/items/icons/kee_berry.png and b/graphics/items/icons/kee_berry.png differ diff --git a/graphics/items/icons/lagging_tail.png b/graphics/items/icons/lagging_tail.png index 3299515b6c..3d35e633c8 100644 Binary files a/graphics/items/icons/lagging_tail.png and b/graphics/items/icons/lagging_tail.png differ diff --git a/graphics/items/icons/leaders_crest.png b/graphics/items/icons/leaders_crest.png new file mode 100644 index 0000000000..b105fcd29d Binary files /dev/null and b/graphics/items/icons/leaders_crest.png differ diff --git a/graphics/items/icons/life_orb.png b/graphics/items/icons/life_orb.png index 9a9ed7c682..68aaa8e51a 100644 Binary files a/graphics/items/icons/life_orb.png and b/graphics/items/icons/life_orb.png differ diff --git a/graphics/items/icons/light_clay.png b/graphics/items/icons/light_clay.png index 7cc3e63801..0007ea8c89 100644 Binary files a/graphics/items/icons/light_clay.png and b/graphics/items/icons/light_clay.png differ diff --git a/graphics/items/icons/linking_cord.png b/graphics/items/icons/linking_cord.png new file mode 100644 index 0000000000..a3f92da04b Binary files /dev/null and b/graphics/items/icons/linking_cord.png differ diff --git a/graphics/items/icons/loaded_dice.png b/graphics/items/icons/loaded_dice.png new file mode 100644 index 0000000000..1295450928 Binary files /dev/null and b/graphics/items/icons/loaded_dice.png differ diff --git a/graphics/items/icons/lucarionite.png b/graphics/items/icons/lucarionite.png index ea4955c8a0..b429914872 100644 Binary files a/graphics/items/icons/lucarionite.png and b/graphics/items/icons/lucarionite.png differ diff --git a/graphics/items/icons/luck_incense.png b/graphics/items/icons/luck_incense.png index 396ab2f613..6a14050cf9 100755 Binary files a/graphics/items/icons/luck_incense.png and b/graphics/items/icons/luck_incense.png differ diff --git a/graphics/items/icons/luminous_moss.png b/graphics/items/icons/luminous_moss.png index 6ee31c5e1b..b15ba36d8e 100755 Binary files a/graphics/items/icons/luminous_moss.png and b/graphics/items/icons/luminous_moss.png differ diff --git a/graphics/items/icons/lustrous_globe.png b/graphics/items/icons/lustrous_globe.png new file mode 100644 index 0000000000..c0e8e885df Binary files /dev/null and b/graphics/items/icons/lustrous_globe.png differ diff --git a/graphics/items/icons/lustrous_orb.png b/graphics/items/icons/lustrous_orb.png index 08b452aba9..ab931ff468 100644 Binary files a/graphics/items/icons/lustrous_orb.png and b/graphics/items/icons/lustrous_orb.png differ diff --git a/graphics/items/icons/magmarizer.png b/graphics/items/icons/magmarizer.png index fcaf04b446..41a1b50cae 100755 Binary files a/graphics/items/icons/magmarizer.png and b/graphics/items/icons/magmarizer.png differ diff --git a/graphics/items/icons/malicious_armor.png b/graphics/items/icons/malicious_armor.png new file mode 100644 index 0000000000..931850013a Binary files /dev/null and b/graphics/items/icons/malicious_armor.png differ diff --git a/graphics/items/icons/maranga_berry.png b/graphics/items/icons/maranga_berry.png index 2551c0167b..d56ce9643c 100755 Binary files a/graphics/items/icons/maranga_berry.png and b/graphics/items/icons/maranga_berry.png differ diff --git a/graphics/items/icons/meadow_plate.png b/graphics/items/icons/meadow_plate.png index 5cec7fc167..6571446bb5 100644 Binary files a/graphics/items/icons/meadow_plate.png and b/graphics/items/icons/meadow_plate.png differ diff --git a/graphics/items/icons/metronome.png b/graphics/items/icons/metronome.png index 4aa57f95e0..4270fcaeda 100644 Binary files a/graphics/items/icons/metronome.png and b/graphics/items/icons/metronome.png differ diff --git a/graphics/items/icons/micle_berry.png b/graphics/items/icons/micle_berry.png index 74e011d0e8..5e108e5a19 100755 Binary files a/graphics/items/icons/micle_berry.png and b/graphics/items/icons/micle_berry.png differ diff --git a/graphics/items/icons/mind_plate.png b/graphics/items/icons/mind_plate.png index dfe89ddbb5..12af8f9ea8 100644 Binary files a/graphics/items/icons/mind_plate.png and b/graphics/items/icons/mind_plate.png differ diff --git a/graphics/items/icons/mirror_herb.png b/graphics/items/icons/mirror_herb.png new file mode 100644 index 0000000000..e792bad829 Binary files /dev/null and b/graphics/items/icons/mirror_herb.png differ diff --git a/graphics/items/icons/muscle_band.png b/graphics/items/icons/muscle_band.png index b374760a71..1954f8a56b 100644 Binary files a/graphics/items/icons/muscle_band.png and b/graphics/items/icons/muscle_band.png differ diff --git a/graphics/items/icons/normal_gem.png b/graphics/items/icons/normal_gem.png index c57142c324..5d8cbf7bfd 100644 Binary files a/graphics/items/icons/normal_gem.png and b/graphics/items/icons/normal_gem.png differ diff --git a/graphics/items/icons/occa_berry.png b/graphics/items/icons/occa_berry.png index 05d9860fb5..aa37cf3f62 100755 Binary files a/graphics/items/icons/occa_berry.png and b/graphics/items/icons/occa_berry.png differ diff --git a/graphics/items/icons/odd_incense.png b/graphics/items/icons/odd_incense.png index 11c7d24f7d..9d5f7d2abe 100755 Binary files a/graphics/items/icons/odd_incense.png and b/graphics/items/icons/odd_incense.png differ diff --git a/graphics/items/icons/odd_keystone.png b/graphics/items/icons/odd_keystone.png index 8ef2d3cdb5..8da9f26aa9 100755 Binary files a/graphics/items/icons/odd_keystone.png and b/graphics/items/icons/odd_keystone.png differ diff --git a/graphics/items/icons/old_gateau.png b/graphics/items/icons/old_gateau.png index 064c997a53..93edb8f97e 100755 Binary files a/graphics/items/icons/old_gateau.png and b/graphics/items/icons/old_gateau.png differ diff --git a/graphics/items/icons/oval_stone.png b/graphics/items/icons/oval_stone.png index 27e0a7ccf2..08e8d96be1 100755 Binary files a/graphics/items/icons/oval_stone.png and b/graphics/items/icons/oval_stone.png differ diff --git a/graphics/items/icons/passho_berry.png b/graphics/items/icons/passho_berry.png index cdf3756078..c23145cd9b 100755 Binary files a/graphics/items/icons/passho_berry.png and b/graphics/items/icons/passho_berry.png differ diff --git a/graphics/items/icons/payapa_berry.png b/graphics/items/icons/payapa_berry.png index fe021c473e..fd9ac891aa 100755 Binary files a/graphics/items/icons/payapa_berry.png and b/graphics/items/icons/payapa_berry.png differ diff --git a/graphics/items/icons/peat_block.png b/graphics/items/icons/peat_block.png new file mode 100644 index 0000000000..9c10659875 Binary files /dev/null and b/graphics/items/icons/peat_block.png differ diff --git a/graphics/items/icons/pink_apricorn.png b/graphics/items/icons/pink_apricorn.png index abcedcba49..817e0140c3 100755 Binary files a/graphics/items/icons/pink_apricorn.png and b/graphics/items/icons/pink_apricorn.png differ diff --git a/graphics/items/icons/pink_nectar.png b/graphics/items/icons/pink_nectar.png index 21e88d3023..9fbe0f76b3 100755 Binary files a/graphics/items/icons/pink_nectar.png and b/graphics/items/icons/pink_nectar.png differ diff --git a/graphics/items/icons/plume_fossil.png b/graphics/items/icons/plume_fossil.png index cf98166b31..3662964aba 100755 Binary files a/graphics/items/icons/plume_fossil.png and b/graphics/items/icons/plume_fossil.png differ diff --git a/graphics/items/icons/poison_gem.png b/graphics/items/icons/poison_gem.png index ab339eb718..8e78855276 100644 Binary files a/graphics/items/icons/poison_gem.png and b/graphics/items/icons/poison_gem.png differ diff --git a/graphics/items/icons/poison_memory.png b/graphics/items/icons/poison_memory.png index e665d81762..270c8697dd 100755 Binary files a/graphics/items/icons/poison_memory.png and b/graphics/items/icons/poison_memory.png differ diff --git a/graphics/items/icons/poke_radar.png b/graphics/items/icons/poke_radar.png index f0de8796ac..ca4e0477a3 100644 Binary files a/graphics/items/icons/poke_radar.png and b/graphics/items/icons/poke_radar.png differ diff --git a/graphics/items/icons/power_anklet.png b/graphics/items/icons/power_anklet.png index 3a2091c8ee..be1982645b 100755 Binary files a/graphics/items/icons/power_anklet.png and b/graphics/items/icons/power_anklet.png differ diff --git a/graphics/items/icons/power_band.png b/graphics/items/icons/power_band.png index a88e5391b1..d46374279d 100755 Binary files a/graphics/items/icons/power_band.png and b/graphics/items/icons/power_band.png differ diff --git a/graphics/items/icons/power_belt.png b/graphics/items/icons/power_belt.png index e4273f85c6..456793fb99 100755 Binary files a/graphics/items/icons/power_belt.png and b/graphics/items/icons/power_belt.png differ diff --git a/graphics/items/icons/power_bracer.png b/graphics/items/icons/power_bracer.png index 54aa34844b..9d3d37781b 100755 Binary files a/graphics/items/icons/power_bracer.png and b/graphics/items/icons/power_bracer.png differ diff --git a/graphics/items/icons/power_herb.png b/graphics/items/icons/power_herb.png index 947996c4cd..68225447fb 100644 Binary files a/graphics/items/icons/power_herb.png and b/graphics/items/icons/power_herb.png differ diff --git a/graphics/items/icons/power_lens.png b/graphics/items/icons/power_lens.png index b18d911860..742db4b4df 100755 Binary files a/graphics/items/icons/power_lens.png and b/graphics/items/icons/power_lens.png differ diff --git a/graphics/items/icons/power_weight.png b/graphics/items/icons/power_weight.png index 149679c387..221416007c 100755 Binary files a/graphics/items/icons/power_weight.png and b/graphics/items/icons/power_weight.png differ diff --git a/graphics/items/icons/prism_scale.png b/graphics/items/icons/prism_scale.png index 335816ddbc..f992c3bd84 100755 Binary files a/graphics/items/icons/prism_scale.png and b/graphics/items/icons/prism_scale.png differ diff --git a/graphics/items/icons/protector.png b/graphics/items/icons/protector.png index fa88ae1556..5ba93c919b 100755 Binary files a/graphics/items/icons/protector.png and b/graphics/items/icons/protector.png differ diff --git a/graphics/items/icons/psychic_gem.png b/graphics/items/icons/psychic_gem.png index 6b84f38dab..b73184955e 100644 Binary files a/graphics/items/icons/psychic_gem.png and b/graphics/items/icons/psychic_gem.png differ diff --git a/graphics/items/icons/psychic_memory.png b/graphics/items/icons/psychic_memory.png index beda2c22df..6a5aea79a7 100755 Binary files a/graphics/items/icons/psychic_memory.png and b/graphics/items/icons/psychic_memory.png differ diff --git a/graphics/items/icons/punching_glove.png b/graphics/items/icons/punching_glove.png new file mode 100644 index 0000000000..f0a1438a4e Binary files /dev/null and b/graphics/items/icons/punching_glove.png differ diff --git a/graphics/items/icons/pure_incense.png b/graphics/items/icons/pure_incense.png index 8657683b18..eb5345f014 100755 Binary files a/graphics/items/icons/pure_incense.png and b/graphics/items/icons/pure_incense.png differ diff --git a/graphics/items/icons/purple_nectar.png b/graphics/items/icons/purple_nectar.png index 59111f1e4e..f792b5ff55 100755 Binary files a/graphics/items/icons/purple_nectar.png and b/graphics/items/icons/purple_nectar.png differ diff --git a/graphics/items/icons/quick_powder.png b/graphics/items/icons/quick_powder.png index d83b0b5062..fa56dcca7c 100644 Binary files a/graphics/items/icons/quick_powder.png and b/graphics/items/icons/quick_powder.png differ diff --git a/graphics/items/icons/rare_bone.png b/graphics/items/icons/rare_bone.png index 80b4af9d58..eb5665a351 100755 Binary files a/graphics/items/icons/rare_bone.png and b/graphics/items/icons/rare_bone.png differ diff --git a/graphics/items/icons/razor_claw.png b/graphics/items/icons/razor_claw.png index 59c27fc809..e9530521cb 100755 Binary files a/graphics/items/icons/razor_claw.png and b/graphics/items/icons/razor_claw.png differ diff --git a/graphics/items/icons/razor_fang.png b/graphics/items/icons/razor_fang.png index dd54b98e79..17dd1a042a 100755 Binary files a/graphics/items/icons/razor_fang.png and b/graphics/items/icons/razor_fang.png differ diff --git a/graphics/items/icons/reaper_cloth.png b/graphics/items/icons/reaper_cloth.png index 73f0874426..f4f0bfdb48 100755 Binary files a/graphics/items/icons/reaper_cloth.png and b/graphics/items/icons/reaper_cloth.png differ diff --git a/graphics/items/icons/red_apricorn.png b/graphics/items/icons/red_apricorn.png index 52d219c073..aaa952f773 100755 Binary files a/graphics/items/icons/red_apricorn.png and b/graphics/items/icons/red_apricorn.png differ diff --git a/graphics/items/icons/red_card.png b/graphics/items/icons/red_card.png index 1d07d827fa..88c8bf0c17 100755 Binary files a/graphics/items/icons/red_card.png and b/graphics/items/icons/red_card.png differ diff --git a/graphics/items/icons/red_nectar.png b/graphics/items/icons/red_nectar.png index 1d2058dca1..73710370e4 100755 Binary files a/graphics/items/icons/red_nectar.png and b/graphics/items/icons/red_nectar.png differ diff --git a/graphics/items/icons/rindo_berry.png b/graphics/items/icons/rindo_berry.png index 4729e188c0..56a144e953 100755 Binary files a/graphics/items/icons/rindo_berry.png and b/graphics/items/icons/rindo_berry.png differ diff --git a/graphics/items/icons/ring_target.png b/graphics/items/icons/ring_target.png index fae2b944be..08b044df76 100755 Binary files a/graphics/items/icons/ring_target.png and b/graphics/items/icons/ring_target.png differ diff --git a/graphics/items/icons/rock_gem.png b/graphics/items/icons/rock_gem.png index 6d6070b516..fdf634b730 100644 Binary files a/graphics/items/icons/rock_gem.png and b/graphics/items/icons/rock_gem.png differ diff --git a/graphics/items/icons/rock_incense.png b/graphics/items/icons/rock_incense.png index 04a3d1b5c2..a79f08927f 100755 Binary files a/graphics/items/icons/rock_incense.png and b/graphics/items/icons/rock_incense.png differ diff --git a/graphics/items/icons/rock_memory.png b/graphics/items/icons/rock_memory.png index 32d46fea49..9e6ce8fdb8 100755 Binary files a/graphics/items/icons/rock_memory.png and b/graphics/items/icons/rock_memory.png differ diff --git a/graphics/items/icons/rocky_helmet.png b/graphics/items/icons/rocky_helmet.png index 006a9f8aa4..72613a206e 100755 Binary files a/graphics/items/icons/rocky_helmet.png and b/graphics/items/icons/rocky_helmet.png differ diff --git a/graphics/items/icons/rose_incense.png b/graphics/items/icons/rose_incense.png index c6b6abcc36..95bfc77e1f 100755 Binary files a/graphics/items/icons/rose_incense.png and b/graphics/items/icons/rose_incense.png differ diff --git a/graphics/items/icons/roseli_berry.png b/graphics/items/icons/roseli_berry.png index 7487cb2a4c..11756b42d4 100755 Binary files a/graphics/items/icons/roseli_berry.png and b/graphics/items/icons/roseli_berry.png differ diff --git a/graphics/items/icons/rowap_berry.png b/graphics/items/icons/rowap_berry.png index a25d39838f..318ff9bd13 100755 Binary files a/graphics/items/icons/rowap_berry.png and b/graphics/items/icons/rowap_berry.png differ diff --git a/graphics/items/icons/sachet.png b/graphics/items/icons/sachet.png index 32c566a91d..e1b2774086 100755 Binary files a/graphics/items/icons/sachet.png and b/graphics/items/icons/sachet.png differ diff --git a/graphics/items/icons/safety_goggles.png b/graphics/items/icons/safety_goggles.png index 7a1efab67a..2381790f2a 100644 Binary files a/graphics/items/icons/safety_goggles.png and b/graphics/items/icons/safety_goggles.png differ diff --git a/graphics/items/icons/sail_fossil.png b/graphics/items/icons/sail_fossil.png index 4c6514820e..acf7f13ba2 100755 Binary files a/graphics/items/icons/sail_fossil.png and b/graphics/items/icons/sail_fossil.png differ diff --git a/graphics/items/icons/scroll_of_darkness.png b/graphics/items/icons/scroll_of_darkness.png new file mode 100644 index 0000000000..52591273be Binary files /dev/null and b/graphics/items/icons/scroll_of_darkness.png differ diff --git a/graphics/items/icons/scroll_of_waters.png b/graphics/items/icons/scroll_of_waters.png new file mode 100644 index 0000000000..c3a1af9b60 Binary files /dev/null and b/graphics/items/icons/scroll_of_waters.png differ diff --git a/graphics/items/icons/shed_shell.png b/graphics/items/icons/shed_shell.png index 6e02ff4a3a..a3df4d15c2 100644 Binary files a/graphics/items/icons/shed_shell.png and b/graphics/items/icons/shed_shell.png differ diff --git a/graphics/items/icons/shiny_charm.png b/graphics/items/icons/shiny_charm.png index 3829154cd5..fd2c97ac83 100644 Binary files a/graphics/items/icons/shiny_charm.png and b/graphics/items/icons/shiny_charm.png differ diff --git a/graphics/items/icons/shiny_stone.png b/graphics/items/icons/shiny_stone.png index d48db4d86a..a54091d4aa 100755 Binary files a/graphics/items/icons/shiny_stone.png and b/graphics/items/icons/shiny_stone.png differ diff --git a/graphics/items/icons/shock_drive.png b/graphics/items/icons/shock_drive.png index 2ac62f6cee..99f8e512c4 100644 Binary files a/graphics/items/icons/shock_drive.png and b/graphics/items/icons/shock_drive.png differ diff --git a/graphics/items/icons/shuca_berry.png b/graphics/items/icons/shuca_berry.png index cc99671876..f26a80f7ac 100755 Binary files a/graphics/items/icons/shuca_berry.png and b/graphics/items/icons/shuca_berry.png differ diff --git a/graphics/items/icons/skull_fossil.png b/graphics/items/icons/skull_fossil.png index 1868983468..2f82900c15 100755 Binary files a/graphics/items/icons/skull_fossil.png and b/graphics/items/icons/skull_fossil.png differ diff --git a/graphics/items/icons/sky_plate.png b/graphics/items/icons/sky_plate.png index f64b14aff6..0d2a910bca 100644 Binary files a/graphics/items/icons/sky_plate.png and b/graphics/items/icons/sky_plate.png differ diff --git a/graphics/items/icons/smooth_rock.png b/graphics/items/icons/smooth_rock.png index 8db8ef11f5..31715570fb 100644 Binary files a/graphics/items/icons/smooth_rock.png and b/graphics/items/icons/smooth_rock.png differ diff --git a/graphics/items/icons/snowball.png b/graphics/items/icons/snowball.png index 3ba834ae34..516b1cbd86 100755 Binary files a/graphics/items/icons/snowball.png and b/graphics/items/icons/snowball.png differ diff --git a/graphics/items/icons/splash_plate.png b/graphics/items/icons/splash_plate.png index b290e81001..c75fe54736 100644 Binary files a/graphics/items/icons/splash_plate.png and b/graphics/items/icons/splash_plate.png differ diff --git a/graphics/items/icons/spooky_plate.png b/graphics/items/icons/spooky_plate.png index 215657bcc6..d3dbfaf0c8 100644 Binary files a/graphics/items/icons/spooky_plate.png and b/graphics/items/icons/spooky_plate.png differ diff --git a/graphics/items/icons/steel_gem.png b/graphics/items/icons/steel_gem.png index 252dc2d47e..65495811f3 100644 Binary files a/graphics/items/icons/steel_gem.png and b/graphics/items/icons/steel_gem.png differ diff --git a/graphics/items/icons/steel_memory.png b/graphics/items/icons/steel_memory.png index b9329e2d02..b404ad3209 100755 Binary files a/graphics/items/icons/steel_memory.png and b/graphics/items/icons/steel_memory.png differ diff --git a/graphics/items/icons/sticky_barb.png b/graphics/items/icons/sticky_barb.png index 735d3a051f..8147e8de74 100644 Binary files a/graphics/items/icons/sticky_barb.png and b/graphics/items/icons/sticky_barb.png differ diff --git a/graphics/items/icons/stone_plate.png b/graphics/items/icons/stone_plate.png index 8af90a8a65..4aa9ba2848 100644 Binary files a/graphics/items/icons/stone_plate.png and b/graphics/items/icons/stone_plate.png differ diff --git a/graphics/items/icons/sweet_heart.png b/graphics/items/icons/sweet_heart.png index 06b592022f..6c9ece30d4 100755 Binary files a/graphics/items/icons/sweet_heart.png and b/graphics/items/icons/sweet_heart.png differ diff --git a/graphics/items/icons/tanga_berry.png b/graphics/items/icons/tanga_berry.png index 37f8e24656..1c552fb6d6 100755 Binary files a/graphics/items/icons/tanga_berry.png and b/graphics/items/icons/tanga_berry.png differ diff --git a/graphics/items/icons/tera_orb.png b/graphics/items/icons/tera_orb.png new file mode 100644 index 0000000000..03ecb8e82c Binary files /dev/null and b/graphics/items/icons/tera_orb.png differ diff --git a/graphics/items/icons/tiny_bamboo_shoot.png b/graphics/items/icons/tiny_bamboo_shoot.png new file mode 100644 index 0000000000..6b24c7e383 Binary files /dev/null and b/graphics/items/icons/tiny_bamboo_shoot.png differ diff --git a/graphics/items/icons/toxic_orb.png b/graphics/items/icons/toxic_orb.png index d63ad4fa3a..4b385799c0 100644 Binary files a/graphics/items/icons/toxic_orb.png and b/graphics/items/icons/toxic_orb.png differ diff --git a/graphics/items/icons/toxic_plate.png b/graphics/items/icons/toxic_plate.png index de64d6c201..f282c0f3a7 100644 Binary files a/graphics/items/icons/toxic_plate.png and b/graphics/items/icons/toxic_plate.png differ diff --git a/graphics/items/icons/wacan_berry.png b/graphics/items/icons/wacan_berry.png index af113c9b58..61e94c6427 100755 Binary files a/graphics/items/icons/wacan_berry.png and b/graphics/items/icons/wacan_berry.png differ diff --git a/graphics/items/icons/water_gem.png b/graphics/items/icons/water_gem.png index 79e0ca07f3..555d92ccca 100644 Binary files a/graphics/items/icons/water_gem.png and b/graphics/items/icons/water_gem.png differ diff --git a/graphics/items/icons/water_memory.png b/graphics/items/icons/water_memory.png index d7096f57cc..054c05d116 100755 Binary files a/graphics/items/icons/water_memory.png and b/graphics/items/icons/water_memory.png differ diff --git a/graphics/items/icons/wave_incense.png b/graphics/items/icons/wave_incense.png index aec3fd05ef..5fc560eb86 100755 Binary files a/graphics/items/icons/wave_incense.png and b/graphics/items/icons/wave_incense.png differ diff --git a/graphics/items/icons/weakness_policy.png b/graphics/items/icons/weakness_policy.png index d8f0b45531..76d26e7e49 100755 Binary files a/graphics/items/icons/weakness_policy.png and b/graphics/items/icons/weakness_policy.png differ diff --git a/graphics/items/icons/whipped_dream.png b/graphics/items/icons/whipped_dream.png index 9cf9c959a7..0d3b424984 100755 Binary files a/graphics/items/icons/whipped_dream.png and b/graphics/items/icons/whipped_dream.png differ diff --git a/graphics/items/icons/white_apricorn.png b/graphics/items/icons/white_apricorn.png index c2ea561742..976779af70 100755 Binary files a/graphics/items/icons/white_apricorn.png and b/graphics/items/icons/white_apricorn.png differ diff --git a/graphics/items/icons/wide_lens.png b/graphics/items/icons/wide_lens.png index ea432dc8de..dd1e92c2c2 100644 Binary files a/graphics/items/icons/wide_lens.png and b/graphics/items/icons/wide_lens.png differ diff --git a/graphics/items/icons/wise_glasses.png b/graphics/items/icons/wise_glasses.png index a3982f1816..5500baa320 100644 Binary files a/graphics/items/icons/wise_glasses.png and b/graphics/items/icons/wise_glasses.png differ diff --git a/graphics/items/icons/x_special_defense.png b/graphics/items/icons/x_special_defense.png index 54a3e00fdf..18dd6d5cc8 100755 Binary files a/graphics/items/icons/x_special_defense.png and b/graphics/items/icons/x_special_defense.png differ diff --git a/graphics/items/icons/yache_berry.png b/graphics/items/icons/yache_berry.png index 08bb40fcfb..1d53ed6338 100755 Binary files a/graphics/items/icons/yache_berry.png and b/graphics/items/icons/yache_berry.png differ diff --git a/graphics/items/icons/yellow_apricorn.png b/graphics/items/icons/yellow_apricorn.png index 4dd12c5eb6..293b4054f2 100755 Binary files a/graphics/items/icons/yellow_apricorn.png and b/graphics/items/icons/yellow_apricorn.png differ diff --git a/graphics/items/icons/yellow_nectar.png b/graphics/items/icons/yellow_nectar.png index fff8ae6977..c097f40926 100755 Binary files a/graphics/items/icons/yellow_nectar.png and b/graphics/items/icons/yellow_nectar.png differ diff --git a/graphics/items/icons/zap_plate.png b/graphics/items/icons/zap_plate.png index 80fed9a1e5..3e355ca995 100644 Binary files a/graphics/items/icons/zap_plate.png and b/graphics/items/icons/zap_plate.png differ diff --git a/graphics/items/icons/zoom_lens.png b/graphics/items/icons/zoom_lens.png index 167619aa64..c5350960e3 100644 Binary files a/graphics/items/icons/zoom_lens.png and b/graphics/items/icons/zoom_lens.png differ diff --git a/graphics/object_events/pics/berry_trees/chople.png b/graphics/object_events/pics/berry_trees/chople.png index fc70a9af59..5377a7fa40 100644 Binary files a/graphics/object_events/pics/berry_trees/chople.png and b/graphics/object_events/pics/berry_trees/chople.png differ diff --git a/graphics/object_events/pics/berry_trees/custap.png b/graphics/object_events/pics/berry_trees/custap.png index 3cb5ccfb10..a64a89275e 100644 Binary files a/graphics/object_events/pics/berry_trees/custap.png and b/graphics/object_events/pics/berry_trees/custap.png differ diff --git a/graphics/object_events/pics/berry_trees/jaboca.png b/graphics/object_events/pics/berry_trees/jaboca.png index 36e51eb015..a85ca438d7 100644 Binary files a/graphics/object_events/pics/berry_trees/jaboca.png and b/graphics/object_events/pics/berry_trees/jaboca.png differ diff --git a/graphics/object_events/pics/berry_trees/kasib.png b/graphics/object_events/pics/berry_trees/kasib.png index b8a8401e8d..dcd988ecde 100644 Binary files a/graphics/object_events/pics/berry_trees/kasib.png and b/graphics/object_events/pics/berry_trees/kasib.png differ diff --git a/graphics/object_events/pics/berry_trees/kebia.png b/graphics/object_events/pics/berry_trees/kebia.png index 03efc73c1f..413ef9b4b4 100644 Binary files a/graphics/object_events/pics/berry_trees/kebia.png and b/graphics/object_events/pics/berry_trees/kebia.png differ diff --git a/graphics/object_events/pics/berry_trees/micle.png b/graphics/object_events/pics/berry_trees/micle.png index 365ff43b21..b7d05e5dd8 100644 Binary files a/graphics/object_events/pics/berry_trees/micle.png and b/graphics/object_events/pics/berry_trees/micle.png differ diff --git a/graphics/object_events/pics/berry_trees/occa.png b/graphics/object_events/pics/berry_trees/occa.png index 8685264f9b..cd90f48851 100644 Binary files a/graphics/object_events/pics/berry_trees/occa.png and b/graphics/object_events/pics/berry_trees/occa.png differ diff --git a/graphics/object_events/pics/berry_trees/payapa.png b/graphics/object_events/pics/berry_trees/payapa.png index 14aed0c235..99233cab7c 100644 Binary files a/graphics/object_events/pics/berry_trees/payapa.png and b/graphics/object_events/pics/berry_trees/payapa.png differ diff --git a/graphics/object_events/pics/berry_trees/roseli.png b/graphics/object_events/pics/berry_trees/roseli.png index f59bf93a2d..6e8aab1584 100644 Binary files a/graphics/object_events/pics/berry_trees/roseli.png and b/graphics/object_events/pics/berry_trees/roseli.png differ diff --git a/graphics/object_events/pics/berry_trees/shuca.png b/graphics/object_events/pics/berry_trees/shuca.png index 4e95bb4f6a..dec160ae67 100644 Binary files a/graphics/object_events/pics/berry_trees/shuca.png and b/graphics/object_events/pics/berry_trees/shuca.png differ diff --git a/graphics/object_events/pics/berry_trees/tanga.png b/graphics/object_events/pics/berry_trees/tanga.png index 28e86f6f4d..0bba806bc4 100644 Binary files a/graphics/object_events/pics/berry_trees/tanga.png and b/graphics/object_events/pics/berry_trees/tanga.png differ diff --git a/graphics/pokemon/abomasnow/front.png b/graphics/pokemon/abomasnow/front.png deleted file mode 100644 index eec72b6476..0000000000 Binary files a/graphics/pokemon/abomasnow/front.png and /dev/null differ diff --git a/graphics/pokemon/abra/front.png b/graphics/pokemon/abra/front.png deleted file mode 100644 index 0880fbb48e..0000000000 Binary files a/graphics/pokemon/abra/front.png and /dev/null differ diff --git a/graphics/pokemon/absol/front.png b/graphics/pokemon/absol/front.png deleted file mode 100644 index 0026dd2744..0000000000 Binary files a/graphics/pokemon/absol/front.png and /dev/null differ diff --git a/graphics/pokemon/absol/icon.png b/graphics/pokemon/absol/icon.png index 681d98d1d9..d58d208a7b 100644 Binary files a/graphics/pokemon/absol/icon.png and b/graphics/pokemon/absol/icon.png differ diff --git a/graphics/pokemon/accelgor/front.png b/graphics/pokemon/accelgor/front.png deleted file mode 100644 index 1f55e29acd..0000000000 Binary files a/graphics/pokemon/accelgor/front.png and /dev/null differ diff --git a/graphics/pokemon/accelgor/icon.png b/graphics/pokemon/accelgor/icon.png index d8538bec1d..5d971a97b2 100644 Binary files a/graphics/pokemon/accelgor/icon.png and b/graphics/pokemon/accelgor/icon.png differ diff --git a/graphics/pokemon/aegislash/blade/front.png b/graphics/pokemon/aegislash/blade/front.png deleted file mode 100644 index 288bdf5eb0..0000000000 Binary files a/graphics/pokemon/aegislash/blade/front.png and /dev/null differ diff --git a/graphics/pokemon/aegislash/front.png b/graphics/pokemon/aegislash/front.png deleted file mode 100644 index 2e468aa8ec..0000000000 Binary files a/graphics/pokemon/aegislash/front.png and /dev/null differ diff --git a/graphics/pokemon/aerodactyl/front.png b/graphics/pokemon/aerodactyl/front.png deleted file mode 100644 index 36181a6c26..0000000000 Binary files a/graphics/pokemon/aerodactyl/front.png and /dev/null differ diff --git a/graphics/pokemon/aerodactyl/icon.png b/graphics/pokemon/aerodactyl/icon.png index e354dbb0dc..58c96d57c7 100644 Binary files a/graphics/pokemon/aerodactyl/icon.png and b/graphics/pokemon/aerodactyl/icon.png differ diff --git a/graphics/pokemon/aggron/front.png b/graphics/pokemon/aggron/front.png deleted file mode 100644 index 0d59202cac..0000000000 Binary files a/graphics/pokemon/aggron/front.png and /dev/null differ diff --git a/graphics/pokemon/aggron/icon.png b/graphics/pokemon/aggron/icon.png index 5410a384f6..3eaa060542 100644 Binary files a/graphics/pokemon/aggron/icon.png and b/graphics/pokemon/aggron/icon.png differ diff --git a/graphics/pokemon/aipom/front.png b/graphics/pokemon/aipom/front.png deleted file mode 100644 index 227584fcba..0000000000 Binary files a/graphics/pokemon/aipom/front.png and /dev/null differ diff --git a/graphics/pokemon/aipom/icon.png b/graphics/pokemon/aipom/icon.png index 43822f0980..294ab74eb4 100644 Binary files a/graphics/pokemon/aipom/icon.png and b/graphics/pokemon/aipom/icon.png differ diff --git a/graphics/pokemon/alakazam/front.png b/graphics/pokemon/alakazam/front.png deleted file mode 100644 index 9632f20dd9..0000000000 Binary files a/graphics/pokemon/alakazam/front.png and /dev/null differ diff --git a/graphics/pokemon/alakazam/icon.png b/graphics/pokemon/alakazam/icon.png index 6d136899d9..e823e94cd3 100644 Binary files a/graphics/pokemon/alakazam/icon.png and b/graphics/pokemon/alakazam/icon.png differ diff --git a/graphics/pokemon/alcremie/caramel_swirl/front.png b/graphics/pokemon/alcremie/caramel_swirl/front.png index 42f6c0482c..3b52242b14 100644 Binary files a/graphics/pokemon/alcremie/caramel_swirl/front.png and b/graphics/pokemon/alcremie/caramel_swirl/front.png differ diff --git a/graphics/pokemon/alcremie/lemon_cream/front.png b/graphics/pokemon/alcremie/lemon_cream/front.png index b913e40be8..4fff85bc54 100644 Binary files a/graphics/pokemon/alcremie/lemon_cream/front.png and b/graphics/pokemon/alcremie/lemon_cream/front.png differ diff --git a/graphics/pokemon/alcremie/matcha_cream/back.png b/graphics/pokemon/alcremie/matcha_cream/back.png index 8f93ef92ef..2ef7e2d3bd 100644 Binary files a/graphics/pokemon/alcremie/matcha_cream/back.png and b/graphics/pokemon/alcremie/matcha_cream/back.png differ diff --git a/graphics/pokemon/alcremie/matcha_cream/front.png b/graphics/pokemon/alcremie/matcha_cream/front.png index 39c3ab855a..7dfe1b3073 100644 Binary files a/graphics/pokemon/alcremie/matcha_cream/front.png and b/graphics/pokemon/alcremie/matcha_cream/front.png differ diff --git a/graphics/pokemon/alcremie/mint_cream/front.png b/graphics/pokemon/alcremie/mint_cream/front.png index 68d3b5a4c0..e019cb098a 100644 Binary files a/graphics/pokemon/alcremie/mint_cream/front.png and b/graphics/pokemon/alcremie/mint_cream/front.png differ diff --git a/graphics/pokemon/alcremie/rainbow_swirl/back.png b/graphics/pokemon/alcremie/rainbow_swirl/back.png index e7f558454d..06abc68128 100644 Binary files a/graphics/pokemon/alcremie/rainbow_swirl/back.png and b/graphics/pokemon/alcremie/rainbow_swirl/back.png differ diff --git a/graphics/pokemon/alcremie/ruby_cream/front.png b/graphics/pokemon/alcremie/ruby_cream/front.png index 7196c7054b..3f59ec8107 100644 Binary files a/graphics/pokemon/alcremie/ruby_cream/front.png and b/graphics/pokemon/alcremie/ruby_cream/front.png differ diff --git a/graphics/pokemon/alcremie/salted_cream/front.png b/graphics/pokemon/alcremie/salted_cream/front.png index 08a75d2e8e..13cc028c44 100644 Binary files a/graphics/pokemon/alcremie/salted_cream/front.png and b/graphics/pokemon/alcremie/salted_cream/front.png differ diff --git a/graphics/pokemon/alomomola/front.png b/graphics/pokemon/alomomola/front.png deleted file mode 100644 index bbf90238b4..0000000000 Binary files a/graphics/pokemon/alomomola/front.png and /dev/null differ diff --git a/graphics/pokemon/altaria/back.png b/graphics/pokemon/altaria/back.png index 2f69affea0..77b89ed0b6 100644 Binary files a/graphics/pokemon/altaria/back.png and b/graphics/pokemon/altaria/back.png differ diff --git a/graphics/pokemon/altaria/front.png b/graphics/pokemon/altaria/front.png deleted file mode 100644 index d22c4b80c3..0000000000 Binary files a/graphics/pokemon/altaria/front.png and /dev/null differ diff --git a/graphics/pokemon/altaria/icon.png b/graphics/pokemon/altaria/icon.png index f1d2698a2a..8c9bf81982 100644 Binary files a/graphics/pokemon/altaria/icon.png and b/graphics/pokemon/altaria/icon.png differ diff --git a/graphics/pokemon/amaura/front.png b/graphics/pokemon/amaura/front.png deleted file mode 100644 index c9dbac5180..0000000000 Binary files a/graphics/pokemon/amaura/front.png and /dev/null differ diff --git a/graphics/pokemon/ambipom/front.png b/graphics/pokemon/ambipom/front.png deleted file mode 100644 index 064cbb4e60..0000000000 Binary files a/graphics/pokemon/ambipom/front.png and /dev/null differ diff --git a/graphics/pokemon/amoonguss/front.png b/graphics/pokemon/amoonguss/front.png deleted file mode 100644 index baec9f8dda..0000000000 Binary files a/graphics/pokemon/amoonguss/front.png and /dev/null differ diff --git a/graphics/pokemon/amoonguss/icon.png b/graphics/pokemon/amoonguss/icon.png index a0762f49c3..baf2422074 100644 Binary files a/graphics/pokemon/amoonguss/icon.png and b/graphics/pokemon/amoonguss/icon.png differ diff --git a/graphics/pokemon/ampharos/anim_front.png b/graphics/pokemon/ampharos/anim_front.png index 1b3930f64a..4e71838b00 100644 Binary files a/graphics/pokemon/ampharos/anim_front.png and b/graphics/pokemon/ampharos/anim_front.png differ diff --git a/graphics/pokemon/ampharos/back.png b/graphics/pokemon/ampharos/back.png index 80fdc1f23d..7cba18fe47 100644 Binary files a/graphics/pokemon/ampharos/back.png and b/graphics/pokemon/ampharos/back.png differ diff --git a/graphics/pokemon/ampharos/front.png b/graphics/pokemon/ampharos/front.png deleted file mode 100644 index cc9711f87d..0000000000 Binary files a/graphics/pokemon/ampharos/front.png and /dev/null differ diff --git a/graphics/pokemon/ampharos/normal.pal b/graphics/pokemon/ampharos/normal.pal index dd9818d6b0..af1e4ae876 100644 --- a/graphics/pokemon/ampharos/normal.pal +++ b/graphics/pokemon/ampharos/normal.pal @@ -3,17 +3,17 @@ JASC-PAL 16 152 208 160 16 16 16 -88 80 88 -248 192 16 -200 136 16 -128 88 48 -192 0 0 -248 232 72 -248 32 32 -248 248 248 -168 0 0 -176 176 176 -224 224 224 -248 176 160 -127 63 75 -198 121 121 +90 90 90 +255 197 16 +205 139 16 +131 90 49 +197 65 0 +255 238 74 +255 98 0 +255 255 255 +139 32 0 +172 172 172 +230 230 230 +255 98 0 +90 0 0 +197 65 0 diff --git a/graphics/pokemon/anorith/front.png b/graphics/pokemon/anorith/front.png deleted file mode 100644 index e08948a306..0000000000 Binary files a/graphics/pokemon/anorith/front.png and /dev/null differ diff --git a/graphics/pokemon/arbok/front.png b/graphics/pokemon/arbok/front.png deleted file mode 100644 index b9fe8eaf83..0000000000 Binary files a/graphics/pokemon/arbok/front.png and /dev/null differ diff --git a/graphics/pokemon/arcanine/front.png b/graphics/pokemon/arcanine/front.png deleted file mode 100644 index f5c33c8728..0000000000 Binary files a/graphics/pokemon/arcanine/front.png and /dev/null differ diff --git a/graphics/pokemon/arcanine/hisuian/back.png b/graphics/pokemon/arcanine/hisuian/back.png old mode 100644 new mode 100755 index a6fdca501a..cf835c6f1d Binary files a/graphics/pokemon/arcanine/hisuian/back.png and b/graphics/pokemon/arcanine/hisuian/back.png differ diff --git a/graphics/pokemon/arcanine/hisuian/front.png b/graphics/pokemon/arcanine/hisuian/front.png old mode 100644 new mode 100755 index 6adc0d93ac..d546311f13 Binary files a/graphics/pokemon/arcanine/hisuian/front.png and b/graphics/pokemon/arcanine/hisuian/front.png differ diff --git a/graphics/pokemon/arcanine/hisuian/normal.pal b/graphics/pokemon/arcanine/hisuian/normal.pal old mode 100644 new mode 100755 index 7502c6a4cc..b59cd30cf9 --- a/graphics/pokemon/arcanine/hisuian/normal.pal +++ b/graphics/pokemon/arcanine/hisuian/normal.pal @@ -2,17 +2,17 @@ JASC-PAL 0100 16 152 208 160 -48 40 32 -0 0 0 -136 136 128 -96 96 80 -232 72 56 -176 48 32 -216 216 208 -248 248 240 -72 64 56 -40 40 40 -208 88 64 +32 44 40 +128 140 128 +16 16 16 +80 100 96 +96 12 0 +248 120 96 +232 72 48 +168 40 32 +184 180 176 +248 248 248 +0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/graphics/pokemon/arcanine/hisuian/shiny.pal b/graphics/pokemon/arcanine/hisuian/shiny.pal old mode 100644 new mode 100755 index c786e1990f..61de91d20b --- a/graphics/pokemon/arcanine/hisuian/shiny.pal +++ b/graphics/pokemon/arcanine/hisuian/shiny.pal @@ -2,17 +2,17 @@ JASC-PAL 0100 16 152 208 160 -48 40 32 -0 0 0 -136 136 128 -96 96 80 -224 208 40 -176 152 0 -216 216 208 -248 248 240 -72 64 56 -40 40 40 -224 208 40 +32 44 40 +128 140 128 +16 16 16 +80 100 96 +90 65 16 +231 184 41 +231 184 41 +181 126 0 +184 180 176 +248 248 248 +0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/graphics/pokemon/arceus/front.png b/graphics/pokemon/arceus/front.png deleted file mode 100644 index c143e4e69b..0000000000 Binary files a/graphics/pokemon/arceus/front.png and /dev/null differ diff --git a/graphics/pokemon/arceus/icon.png b/graphics/pokemon/arceus/icon.png index 155bfc35bd..6141c35e8c 100644 Binary files a/graphics/pokemon/arceus/icon.png and b/graphics/pokemon/arceus/icon.png differ diff --git a/graphics/pokemon/archen/front.png b/graphics/pokemon/archen/front.png deleted file mode 100644 index ebd166254a..0000000000 Binary files a/graphics/pokemon/archen/front.png and /dev/null differ diff --git a/graphics/pokemon/archeops/front.png b/graphics/pokemon/archeops/front.png deleted file mode 100644 index bbbf6e3a24..0000000000 Binary files a/graphics/pokemon/archeops/front.png and /dev/null differ diff --git a/graphics/pokemon/ariados/anim_front.png b/graphics/pokemon/ariados/anim_front.png index c579c4c014..024aa0bebf 100644 Binary files a/graphics/pokemon/ariados/anim_front.png and b/graphics/pokemon/ariados/anim_front.png differ diff --git a/graphics/pokemon/ariados/front.png b/graphics/pokemon/ariados/front.png deleted file mode 100644 index 8d11202a2c..0000000000 Binary files a/graphics/pokemon/ariados/front.png and /dev/null differ diff --git a/graphics/pokemon/ariados/icon.png b/graphics/pokemon/ariados/icon.png index c6ff8c5f85..e6206a3cb5 100644 Binary files a/graphics/pokemon/ariados/icon.png and b/graphics/pokemon/ariados/icon.png differ diff --git a/graphics/pokemon/ariados/normal.pal b/graphics/pokemon/ariados/normal.pal index 5939c4fcba..66aaa7bdb4 100644 --- a/graphics/pokemon/ariados/normal.pal +++ b/graphics/pokemon/ariados/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -104 80 24 -248 216 64 +106 82 24 +255 222 65 0 0 0 -192 176 72 -152 88 192 -184 128 224 -96 48 152 -136 32 0 -200 40 56 -240 72 112 -240 136 152 -104 104 104 -184 184 184 -248 248 248 -80 0 0 +197 180 74 +156 90 197 +189 131 230 +98 49 156 +139 32 0 +197 65 65 +255 90 74 +255 139 115 +106 106 106 +189 189 189 +255 255 255 +139 32 0 diff --git a/graphics/pokemon/armaldo/front.png b/graphics/pokemon/armaldo/front.png deleted file mode 100644 index 2ab6293405..0000000000 Binary files a/graphics/pokemon/armaldo/front.png and /dev/null differ diff --git a/graphics/pokemon/armaldo/icon.png b/graphics/pokemon/armaldo/icon.png index 5dba6557df..1277dbbbe0 100644 Binary files a/graphics/pokemon/armaldo/icon.png and b/graphics/pokemon/armaldo/icon.png differ diff --git a/graphics/pokemon/aromatisse/front.png b/graphics/pokemon/aromatisse/front.png deleted file mode 100644 index 3fcd8c4f6c..0000000000 Binary files a/graphics/pokemon/aromatisse/front.png and /dev/null differ diff --git a/graphics/pokemon/aron/front.png b/graphics/pokemon/aron/front.png deleted file mode 100644 index 72b0da8ec8..0000000000 Binary files a/graphics/pokemon/aron/front.png and /dev/null differ diff --git a/graphics/pokemon/articuno/front.png b/graphics/pokemon/articuno/front.png deleted file mode 100644 index 71b411a380..0000000000 Binary files a/graphics/pokemon/articuno/front.png and /dev/null differ diff --git a/graphics/pokemon/articuno/icon.png b/graphics/pokemon/articuno/icon.png index 79685a2d12..c500449634 100644 Binary files a/graphics/pokemon/articuno/icon.png and b/graphics/pokemon/articuno/icon.png differ diff --git a/graphics/pokemon/audino/front.png b/graphics/pokemon/audino/front.png deleted file mode 100644 index 5aad0eb990..0000000000 Binary files a/graphics/pokemon/audino/front.png and /dev/null differ diff --git a/graphics/pokemon/aurorus/front.png b/graphics/pokemon/aurorus/front.png deleted file mode 100644 index 00a50a2727..0000000000 Binary files a/graphics/pokemon/aurorus/front.png and /dev/null differ diff --git a/graphics/pokemon/avalugg/front.png b/graphics/pokemon/avalugg/front.png deleted file mode 100644 index 76bce56675..0000000000 Binary files a/graphics/pokemon/avalugg/front.png and /dev/null differ diff --git a/graphics/pokemon/avalugg/hisuian/back.png b/graphics/pokemon/avalugg/hisuian/back.png old mode 100644 new mode 100755 index 885fd4c13a..6bf6215849 Binary files a/graphics/pokemon/avalugg/hisuian/back.png and b/graphics/pokemon/avalugg/hisuian/back.png differ diff --git a/graphics/pokemon/avalugg/hisuian/front.png b/graphics/pokemon/avalugg/hisuian/front.png old mode 100644 new mode 100755 index b120608e1f..58201f335f Binary files a/graphics/pokemon/avalugg/hisuian/front.png and b/graphics/pokemon/avalugg/hisuian/front.png differ diff --git a/graphics/pokemon/avalugg/hisuian/normal.pal b/graphics/pokemon/avalugg/hisuian/normal.pal old mode 100644 new mode 100755 index 8055ef92ab..f64e40434d --- a/graphics/pokemon/avalugg/hisuian/normal.pal +++ b/graphics/pokemon/avalugg/hisuian/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -88 168 208 -80 112 144 -184 240 248 -104 80 64 -128 208 240 -248 248 248 -80 40 24 -8 8 8 +80 96 104 +176 224 240 +136 176 192 +16 16 16 +104 84 64 +232 244 248 +80 60 48 +72 44 32 144 120 96 -144 64 32 -200 200 216 -144 152 168 -248 192 0 -88 56 56 +112 112 112 +184 188 184 +232 232 232 +144 68 32 +240 184 72 0 0 0 diff --git a/graphics/pokemon/avalugg/hisuian/shiny.pal b/graphics/pokemon/avalugg/hisuian/shiny.pal old mode 100644 new mode 100755 index 9e547358cc..b349226831 --- a/graphics/pokemon/avalugg/hisuian/shiny.pal +++ b/graphics/pokemon/avalugg/hisuian/shiny.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -112 152 208 -80 96 168 -184 232 248 -200 160 144 -128 192 240 -248 248 248 -112 80 72 -8 8 8 -232 192 176 -248 176 24 -248 176 120 -248 136 88 -248 176 24 -160 128 120 +80 96 104 +176 224 240 +136 176 192 +16 16 16 +104 84 64 +232 244 248 +80 60 48 +72 44 32 +144 120 96 +149 41 26 +213 79 53 +249 131 79 +144 68 32 +240 184 72 0 0 0 diff --git a/graphics/pokemon/axew/front.png b/graphics/pokemon/axew/front.png deleted file mode 100644 index 993b443214..0000000000 Binary files a/graphics/pokemon/axew/front.png and /dev/null differ diff --git a/graphics/pokemon/azelf/front.png b/graphics/pokemon/azelf/front.png deleted file mode 100644 index 67d155bbf0..0000000000 Binary files a/graphics/pokemon/azelf/front.png and /dev/null differ diff --git a/graphics/pokemon/azelf/icon.png b/graphics/pokemon/azelf/icon.png index c8d0af3d9f..816b6f5cc7 100644 Binary files a/graphics/pokemon/azelf/icon.png and b/graphics/pokemon/azelf/icon.png differ diff --git a/graphics/pokemon/azumarill/front.png b/graphics/pokemon/azumarill/front.png deleted file mode 100644 index 6513b5f211..0000000000 Binary files a/graphics/pokemon/azumarill/front.png and /dev/null differ diff --git a/graphics/pokemon/azumarill/icon.png b/graphics/pokemon/azumarill/icon.png index cc79407be8..8d1a626760 100644 Binary files a/graphics/pokemon/azumarill/icon.png and b/graphics/pokemon/azumarill/icon.png differ diff --git a/graphics/pokemon/azurill/front.png b/graphics/pokemon/azurill/front.png deleted file mode 100644 index 269e181dcf..0000000000 Binary files a/graphics/pokemon/azurill/front.png and /dev/null differ diff --git a/graphics/pokemon/bagon/back.png b/graphics/pokemon/bagon/back.png index fe88902d1c..1bab33f32c 100644 Binary files a/graphics/pokemon/bagon/back.png and b/graphics/pokemon/bagon/back.png differ diff --git a/graphics/pokemon/bagon/front.png b/graphics/pokemon/bagon/front.png deleted file mode 100644 index 21314fe082..0000000000 Binary files a/graphics/pokemon/bagon/front.png and /dev/null differ diff --git a/graphics/pokemon/baltoy/front.png b/graphics/pokemon/baltoy/front.png deleted file mode 100644 index c1bdd8e906..0000000000 Binary files a/graphics/pokemon/baltoy/front.png and /dev/null differ diff --git a/graphics/pokemon/banette/front.png b/graphics/pokemon/banette/front.png deleted file mode 100644 index 48a48753ec..0000000000 Binary files a/graphics/pokemon/banette/front.png and /dev/null differ diff --git a/graphics/pokemon/barbaracle/front.png b/graphics/pokemon/barbaracle/front.png deleted file mode 100644 index 268ee3cc7e..0000000000 Binary files a/graphics/pokemon/barbaracle/front.png and /dev/null differ diff --git a/graphics/pokemon/barboach/front.png b/graphics/pokemon/barboach/front.png deleted file mode 100644 index 78f0c69eb7..0000000000 Binary files a/graphics/pokemon/barboach/front.png and /dev/null differ diff --git a/graphics/pokemon/basculegion/back.png b/graphics/pokemon/basculegion/back.png new file mode 100755 index 0000000000..cb4e0c0883 Binary files /dev/null and b/graphics/pokemon/basculegion/back.png differ diff --git a/graphics/pokemon/basculegion/female/back.png b/graphics/pokemon/basculegion/female/back.png new file mode 100755 index 0000000000..a1ce4263e2 Binary files /dev/null and b/graphics/pokemon/basculegion/female/back.png differ diff --git a/graphics/pokemon/basculegion/female/front.png b/graphics/pokemon/basculegion/female/front.png new file mode 100755 index 0000000000..5b91d3a84c Binary files /dev/null and b/graphics/pokemon/basculegion/female/front.png differ diff --git a/graphics/pokemon/basculegion/iconf.png b/graphics/pokemon/basculegion/female/icon.png similarity index 100% rename from graphics/pokemon/basculegion/iconf.png rename to graphics/pokemon/basculegion/female/icon.png diff --git a/graphics/pokemon/basculegion/female/normal.pal b/graphics/pokemon/basculegion/female/normal.pal new file mode 100755 index 0000000000..b5b76f062f --- /dev/null +++ b/graphics/pokemon/basculegion/female/normal.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +152 208 160 +98 98 98 +16 16 16 +46 92 120 +171 222 224 +230 230 230 +227 242 239 +164 164 164 +122 168 175 +32 49 57 +65 82 82 +55 140 89 +21 64 34 +34 96 61 +16 16 18 +99 62 41 diff --git a/graphics/pokemon/basculegion/female/shiny.pal b/graphics/pokemon/basculegion/female/shiny.pal new file mode 100755 index 0000000000..863a0f773e --- /dev/null +++ b/graphics/pokemon/basculegion/female/shiny.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +152 208 160 +98 98 98 +16 16 16 +112 96 64 +216 208 112 +230 230 230 +248 236 160 +164 164 164 +160 152 72 +32 49 57 +64 80 80 +96 144 48 +21 64 34 +72 108 56 +16 16 18 +99 62 41 diff --git a/graphics/pokemon/basculegion/front.png b/graphics/pokemon/basculegion/front.png new file mode 100755 index 0000000000..4d46e3cbc6 Binary files /dev/null and b/graphics/pokemon/basculegion/front.png differ diff --git a/graphics/pokemon/basculegion/normal.pal b/graphics/pokemon/basculegion/normal.pal new file mode 100755 index 0000000000..75d4b45a18 --- /dev/null +++ b/graphics/pokemon/basculegion/normal.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +152 208 160 +48 140 88 +192 52 80 +160 164 160 +16 64 32 +16 16 16 +120 24 24 +248 164 200 +96 60 40 +224 228 224 +64 80 80 +32 48 56 +32 96 56 +248 80 120 +96 96 96 +56 84 72 diff --git a/graphics/pokemon/basculegion/shiny.pal b/graphics/pokemon/basculegion/shiny.pal new file mode 100755 index 0000000000..a725255a9b --- /dev/null +++ b/graphics/pokemon/basculegion/shiny.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +152 208 160 +96 144 48 +144 72 176 +160 164 160 +16 64 32 +16 16 16 +88 36 112 +224 176 240 +96 60 40 +224 228 224 +60 82 76 +32 48 56 +72 108 56 +184 84 232 +96 96 96 +56 84 72 diff --git a/graphics/pokemon/basculin/blue_striped/back.png b/graphics/pokemon/basculin/blue_striped/back.png index fbe338ab81..9578c6665f 100644 Binary files a/graphics/pokemon/basculin/blue_striped/back.png and b/graphics/pokemon/basculin/blue_striped/back.png differ diff --git a/graphics/pokemon/basculin/blue_striped/icon.png b/graphics/pokemon/basculin/blue_striped/icon.png index f0450849a1..d84ec283fc 100644 Binary files a/graphics/pokemon/basculin/blue_striped/icon.png and b/graphics/pokemon/basculin/blue_striped/icon.png differ diff --git a/graphics/pokemon/basculin/front.png b/graphics/pokemon/basculin/front.png deleted file mode 100644 index ac3f6ded33..0000000000 Binary files a/graphics/pokemon/basculin/front.png and /dev/null differ diff --git a/graphics/pokemon/bastiodon/front.png b/graphics/pokemon/bastiodon/front.png deleted file mode 100644 index c662e853c1..0000000000 Binary files a/graphics/pokemon/bastiodon/front.png and /dev/null differ diff --git a/graphics/pokemon/bayleef/anim_front.png b/graphics/pokemon/bayleef/anim_front.png index 3b5b90f511..05f44e73b5 100644 Binary files a/graphics/pokemon/bayleef/anim_front.png and b/graphics/pokemon/bayleef/anim_front.png differ diff --git a/graphics/pokemon/bayleef/front.png b/graphics/pokemon/bayleef/front.png deleted file mode 100644 index 24cec2bcbf..0000000000 Binary files a/graphics/pokemon/bayleef/front.png and /dev/null differ diff --git a/graphics/pokemon/bayleef/normal.pal b/graphics/pokemon/bayleef/normal.pal index 2602bc2577..d055dd9350 100644 --- a/graphics/pokemon/bayleef/normal.pal +++ b/graphics/pokemon/bayleef/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -40 80 8 -80 120 8 -136 184 48 -104 152 16 +41 82 8 +82 123 8 +139 189 49 +106 156 16 16 16 16 -168 128 40 -104 80 0 -248 232 160 -216 184 112 -248 248 248 -248 240 200 -208 56 0 -208 136 80 -96 96 96 -192 192 192 +164 131 24 +106 82 0 +246 230 74 +222 189 41 +255 255 255 +255 255 139 +172 49 0 +213 139 82 +98 98 98 +197 197 197 diff --git a/graphics/pokemon/beartic/back.png b/graphics/pokemon/beartic/back.png index f8bb2707d0..ab4586f69e 100644 Binary files a/graphics/pokemon/beartic/back.png and b/graphics/pokemon/beartic/back.png differ diff --git a/graphics/pokemon/beartic/front.png b/graphics/pokemon/beartic/front.png deleted file mode 100644 index 18d3083c2f..0000000000 Binary files a/graphics/pokemon/beartic/front.png and /dev/null differ diff --git a/graphics/pokemon/beartic/icon.png b/graphics/pokemon/beartic/icon.png index c4ed605a0e..991f9f265d 100644 Binary files a/graphics/pokemon/beartic/icon.png and b/graphics/pokemon/beartic/icon.png differ diff --git a/graphics/pokemon/beautifly/front.png b/graphics/pokemon/beautifly/front.png deleted file mode 100644 index 41d5bc0ca9..0000000000 Binary files a/graphics/pokemon/beautifly/front.png and /dev/null differ diff --git a/graphics/pokemon/beedrill/front.png b/graphics/pokemon/beedrill/front.png deleted file mode 100644 index e1f22b5a7d..0000000000 Binary files a/graphics/pokemon/beedrill/front.png and /dev/null differ diff --git a/graphics/pokemon/beheeyem/front.png b/graphics/pokemon/beheeyem/front.png deleted file mode 100644 index b8817b50b9..0000000000 Binary files a/graphics/pokemon/beheeyem/front.png and /dev/null differ diff --git a/graphics/pokemon/beldum/front.png b/graphics/pokemon/beldum/front.png deleted file mode 100644 index 065d7a8548..0000000000 Binary files a/graphics/pokemon/beldum/front.png and /dev/null differ diff --git a/graphics/pokemon/beldum/icon.png b/graphics/pokemon/beldum/icon.png index 8cac3cf714..af22605458 100644 Binary files a/graphics/pokemon/beldum/icon.png and b/graphics/pokemon/beldum/icon.png differ diff --git a/graphics/pokemon/bellossom/front.png b/graphics/pokemon/bellossom/front.png deleted file mode 100644 index c0b1a0e3d3..0000000000 Binary files a/graphics/pokemon/bellossom/front.png and /dev/null differ diff --git a/graphics/pokemon/bellsprout/front.png b/graphics/pokemon/bellsprout/front.png deleted file mode 100644 index 492c8b29f8..0000000000 Binary files a/graphics/pokemon/bellsprout/front.png and /dev/null differ diff --git a/graphics/pokemon/bellsprout/icon.png b/graphics/pokemon/bellsprout/icon.png index 59ae8d037e..ff6ca2c337 100644 Binary files a/graphics/pokemon/bellsprout/icon.png and b/graphics/pokemon/bellsprout/icon.png differ diff --git a/graphics/pokemon/bergmite/front.png b/graphics/pokemon/bergmite/front.png deleted file mode 100644 index 8526648893..0000000000 Binary files a/graphics/pokemon/bergmite/front.png and /dev/null differ diff --git a/graphics/pokemon/bibarel/front.png b/graphics/pokemon/bibarel/front.png deleted file mode 100644 index 1963eb81a1..0000000000 Binary files a/graphics/pokemon/bibarel/front.png and /dev/null differ diff --git a/graphics/pokemon/bidoof/anim_frontf.png b/graphics/pokemon/bidoof/anim_frontf.png index 9585a6015c..a62f24b7d2 100644 Binary files a/graphics/pokemon/bidoof/anim_frontf.png and b/graphics/pokemon/bidoof/anim_frontf.png differ diff --git a/graphics/pokemon/bidoof/backf.png b/graphics/pokemon/bidoof/backf.png index 5f6bc7e8bc..a76560fe47 100644 Binary files a/graphics/pokemon/bidoof/backf.png and b/graphics/pokemon/bidoof/backf.png differ diff --git a/graphics/pokemon/bidoof/front.png b/graphics/pokemon/bidoof/front.png deleted file mode 100644 index 299e487496..0000000000 Binary files a/graphics/pokemon/bidoof/front.png and /dev/null differ diff --git a/graphics/pokemon/binacle/front.png b/graphics/pokemon/binacle/front.png deleted file mode 100644 index c3d1842824..0000000000 Binary files a/graphics/pokemon/binacle/front.png and /dev/null differ diff --git a/graphics/pokemon/bisharp/front.png b/graphics/pokemon/bisharp/front.png deleted file mode 100644 index 003da831f9..0000000000 Binary files a/graphics/pokemon/bisharp/front.png and /dev/null differ diff --git a/graphics/pokemon/blastoise/front.png b/graphics/pokemon/blastoise/front.png deleted file mode 100644 index 0419463d83..0000000000 Binary files a/graphics/pokemon/blastoise/front.png and /dev/null differ diff --git a/graphics/pokemon/blaziken/front.png b/graphics/pokemon/blaziken/front.png deleted file mode 100644 index 5336ff9b32..0000000000 Binary files a/graphics/pokemon/blaziken/front.png and /dev/null differ diff --git a/graphics/pokemon/blissey/front.png b/graphics/pokemon/blissey/front.png deleted file mode 100644 index 629594beb4..0000000000 Binary files a/graphics/pokemon/blissey/front.png and /dev/null differ diff --git a/graphics/pokemon/blitzle/front.png b/graphics/pokemon/blitzle/front.png deleted file mode 100644 index 8eb3033d29..0000000000 Binary files a/graphics/pokemon/blitzle/front.png and /dev/null differ diff --git a/graphics/pokemon/boldore/front.png b/graphics/pokemon/boldore/front.png deleted file mode 100644 index d5fef1c2fb..0000000000 Binary files a/graphics/pokemon/boldore/front.png and /dev/null differ diff --git a/graphics/pokemon/bonsly/front.png b/graphics/pokemon/bonsly/front.png deleted file mode 100644 index 328a0b0315..0000000000 Binary files a/graphics/pokemon/bonsly/front.png and /dev/null differ diff --git a/graphics/pokemon/bouffalant/front.png b/graphics/pokemon/bouffalant/front.png deleted file mode 100644 index e3562d8161..0000000000 Binary files a/graphics/pokemon/bouffalant/front.png and /dev/null differ diff --git a/graphics/pokemon/braixen/front.png b/graphics/pokemon/braixen/front.png deleted file mode 100644 index bb090c9d17..0000000000 Binary files a/graphics/pokemon/braixen/front.png and /dev/null differ diff --git a/graphics/pokemon/braviary/front.png b/graphics/pokemon/braviary/front.png deleted file mode 100644 index 8efa81512e..0000000000 Binary files a/graphics/pokemon/braviary/front.png and /dev/null differ diff --git a/graphics/pokemon/braviary/hisuian/back.png b/graphics/pokemon/braviary/hisuian/back.png old mode 100644 new mode 100755 index e314179b2b..947bc46aeb Binary files a/graphics/pokemon/braviary/hisuian/back.png and b/graphics/pokemon/braviary/hisuian/back.png differ diff --git a/graphics/pokemon/braviary/hisuian/front.png b/graphics/pokemon/braviary/hisuian/front.png old mode 100644 new mode 100755 index 63fe93214d..61a5457a57 Binary files a/graphics/pokemon/braviary/hisuian/front.png and b/graphics/pokemon/braviary/hisuian/front.png differ diff --git a/graphics/pokemon/braviary/hisuian/icon.png b/graphics/pokemon/braviary/hisuian/icon.png old mode 100644 new mode 100755 diff --git a/graphics/pokemon/braviary/hisuian/normal.pal b/graphics/pokemon/braviary/hisuian/normal.pal old mode 100644 new mode 100755 index b792f9ab7e..e8632fe392 --- a/graphics/pokemon/braviary/hisuian/normal.pal +++ b/graphics/pokemon/braviary/hisuian/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -104 88 80 -8 8 8 -232 232 224 -184 176 168 -56 56 64 -80 88 88 -152 64 168 -168 96 184 -32 40 40 +184 156 16 +80 188 160 +96 80 32 +16 16 16 +144 60 160 +160 48 48 +232 212 88 144 152 184 -80 184 160 -168 24 24 -240 248 248 -224 192 72 -184 128 56 +228 230 224 +168 100 184 +48 52 64 +104 92 80 +184 176 168 +88 84 104 +240 240 240 diff --git a/graphics/pokemon/braviary/hisuian/shiny.pal b/graphics/pokemon/braviary/hisuian/shiny.pal old mode 100644 new mode 100755 index fea7024017..019e899113 --- a/graphics/pokemon/braviary/hisuian/shiny.pal +++ b/graphics/pokemon/braviary/hisuian/shiny.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -24 24 24 -8 8 8 -64 64 56 -40 40 32 -56 56 64 -80 88 88 -48 176 216 -120 232 240 -32 40 40 -168 248 248 -232 248 248 -96 56 144 -240 248 248 -224 192 72 -184 128 56 +208 160 70 +233 254 252 +103 74 27 +16 16 16 +51 180 217 +96 63 150 +243 215 139 +174 251 251 +71 66 63 +122 234 243 +48 52 64 +30 28 26 +45 41 38 +88 84 104 +240 240 240 diff --git a/graphics/pokemon/breloom/back.png b/graphics/pokemon/breloom/back.png index e8a71c9139..9616b07956 100644 Binary files a/graphics/pokemon/breloom/back.png and b/graphics/pokemon/breloom/back.png differ diff --git a/graphics/pokemon/breloom/front.png b/graphics/pokemon/breloom/front.png deleted file mode 100644 index ebfe14335f..0000000000 Binary files a/graphics/pokemon/breloom/front.png and /dev/null differ diff --git a/graphics/pokemon/bronzong/front.png b/graphics/pokemon/bronzong/front.png deleted file mode 100644 index 8ede6d683b..0000000000 Binary files a/graphics/pokemon/bronzong/front.png and /dev/null differ diff --git a/graphics/pokemon/bronzor/front.png b/graphics/pokemon/bronzor/front.png deleted file mode 100644 index 71a928cc3b..0000000000 Binary files a/graphics/pokemon/bronzor/front.png and /dev/null differ diff --git a/graphics/pokemon/budew/back.png b/graphics/pokemon/budew/back.png index 4c8478e2a8..33a92ba75c 100644 Binary files a/graphics/pokemon/budew/back.png and b/graphics/pokemon/budew/back.png differ diff --git a/graphics/pokemon/budew/front.png b/graphics/pokemon/budew/front.png deleted file mode 100644 index 09a81838ad..0000000000 Binary files a/graphics/pokemon/budew/front.png and /dev/null differ diff --git a/graphics/pokemon/buizel/front.png b/graphics/pokemon/buizel/front.png deleted file mode 100644 index e52b77c571..0000000000 Binary files a/graphics/pokemon/buizel/front.png and /dev/null differ diff --git a/graphics/pokemon/bulbasaur/front.png b/graphics/pokemon/bulbasaur/front.png deleted file mode 100644 index cd7a485b97..0000000000 Binary files a/graphics/pokemon/bulbasaur/front.png and /dev/null differ diff --git a/graphics/pokemon/buneary/front.png b/graphics/pokemon/buneary/front.png deleted file mode 100644 index efb01359d4..0000000000 Binary files a/graphics/pokemon/buneary/front.png and /dev/null differ diff --git a/graphics/pokemon/bunnelby/front.png b/graphics/pokemon/bunnelby/front.png deleted file mode 100644 index d307c4ff33..0000000000 Binary files a/graphics/pokemon/bunnelby/front.png and /dev/null differ diff --git a/graphics/pokemon/burmy/front.png b/graphics/pokemon/burmy/front.png deleted file mode 100644 index 20e449da87..0000000000 Binary files a/graphics/pokemon/burmy/front.png and /dev/null differ diff --git a/graphics/pokemon/burmy/sandy_cloak/front.png b/graphics/pokemon/burmy/sandy_cloak/front.png deleted file mode 100644 index 13f9c353ad..0000000000 Binary files a/graphics/pokemon/burmy/sandy_cloak/front.png and /dev/null differ diff --git a/graphics/pokemon/burmy/trash_cloak/front.png b/graphics/pokemon/burmy/trash_cloak/front.png deleted file mode 100644 index 39004627d5..0000000000 Binary files a/graphics/pokemon/burmy/trash_cloak/front.png and /dev/null differ diff --git a/graphics/pokemon/butterfree/front.png b/graphics/pokemon/butterfree/front.png deleted file mode 100644 index 9f98ee7a35..0000000000 Binary files a/graphics/pokemon/butterfree/front.png and /dev/null differ diff --git a/graphics/pokemon/butterfree/icon.png b/graphics/pokemon/butterfree/icon.png index 2ea823cf4a..827ceee0d6 100644 Binary files a/graphics/pokemon/butterfree/icon.png and b/graphics/pokemon/butterfree/icon.png differ diff --git a/graphics/pokemon/cacnea/front.png b/graphics/pokemon/cacnea/front.png deleted file mode 100644 index 2fa30c1730..0000000000 Binary files a/graphics/pokemon/cacnea/front.png and /dev/null differ diff --git a/graphics/pokemon/cacturne/front.png b/graphics/pokemon/cacturne/front.png deleted file mode 100644 index 0e7587f6f7..0000000000 Binary files a/graphics/pokemon/cacturne/front.png and /dev/null differ diff --git a/graphics/pokemon/cacturne/icon.png b/graphics/pokemon/cacturne/icon.png index fd1bb1d5fe..8dd74b291d 100644 Binary files a/graphics/pokemon/cacturne/icon.png and b/graphics/pokemon/cacturne/icon.png differ diff --git a/graphics/pokemon/camerupt/front.png b/graphics/pokemon/camerupt/front.png deleted file mode 100644 index 9baaa98c77..0000000000 Binary files a/graphics/pokemon/camerupt/front.png and /dev/null differ diff --git a/graphics/pokemon/carbink/front.png b/graphics/pokemon/carbink/front.png deleted file mode 100644 index 31db1394a0..0000000000 Binary files a/graphics/pokemon/carbink/front.png and /dev/null differ diff --git a/graphics/pokemon/carnivine/front.png b/graphics/pokemon/carnivine/front.png deleted file mode 100644 index 2d26ac9048..0000000000 Binary files a/graphics/pokemon/carnivine/front.png and /dev/null differ diff --git a/graphics/pokemon/carracosta/front.png b/graphics/pokemon/carracosta/front.png deleted file mode 100644 index 7297c4b24f..0000000000 Binary files a/graphics/pokemon/carracosta/front.png and /dev/null differ diff --git a/graphics/pokemon/carvanha/back.png b/graphics/pokemon/carvanha/back.png index 6b2b3ca278..e461b970c9 100644 Binary files a/graphics/pokemon/carvanha/back.png and b/graphics/pokemon/carvanha/back.png differ diff --git a/graphics/pokemon/carvanha/front.png b/graphics/pokemon/carvanha/front.png deleted file mode 100644 index b5b9ec4d1b..0000000000 Binary files a/graphics/pokemon/carvanha/front.png and /dev/null differ diff --git a/graphics/pokemon/cascoon/front.png b/graphics/pokemon/cascoon/front.png deleted file mode 100644 index 54081095cc..0000000000 Binary files a/graphics/pokemon/cascoon/front.png and /dev/null differ diff --git a/graphics/pokemon/castform/icon.png b/graphics/pokemon/castform/icon.png index 6f4a5a18a2..5e3c092919 100644 Binary files a/graphics/pokemon/castform/icon.png and b/graphics/pokemon/castform/icon.png differ diff --git a/graphics/pokemon/castform/rainy/icon.png b/graphics/pokemon/castform/rainy/icon.png index 2bca7deddb..c61d0e5f09 100644 Binary files a/graphics/pokemon/castform/rainy/icon.png and b/graphics/pokemon/castform/rainy/icon.png differ diff --git a/graphics/pokemon/castform/snowy/icon.png b/graphics/pokemon/castform/snowy/icon.png index 6ab5a15491..e8651ef417 100644 Binary files a/graphics/pokemon/castform/snowy/icon.png and b/graphics/pokemon/castform/snowy/icon.png differ diff --git a/graphics/pokemon/castform/sunny/icon.png b/graphics/pokemon/castform/sunny/icon.png index 56a9ee5149..a591128399 100644 Binary files a/graphics/pokemon/castform/sunny/icon.png and b/graphics/pokemon/castform/sunny/icon.png differ diff --git a/graphics/pokemon/caterpie/front.png b/graphics/pokemon/caterpie/front.png deleted file mode 100644 index 7ee00f7b36..0000000000 Binary files a/graphics/pokemon/caterpie/front.png and /dev/null differ diff --git a/graphics/pokemon/celebi/back.png b/graphics/pokemon/celebi/back.png index d21d8e38cd..759bfc96a4 100644 Binary files a/graphics/pokemon/celebi/back.png and b/graphics/pokemon/celebi/back.png differ diff --git a/graphics/pokemon/celebi/front.png b/graphics/pokemon/celebi/front.png deleted file mode 100644 index 492be76a9e..0000000000 Binary files a/graphics/pokemon/celebi/front.png and /dev/null differ diff --git a/graphics/pokemon/chandelure/front.png b/graphics/pokemon/chandelure/front.png deleted file mode 100644 index 4dfc4d1898..0000000000 Binary files a/graphics/pokemon/chandelure/front.png and /dev/null differ diff --git a/graphics/pokemon/chansey/front.png b/graphics/pokemon/chansey/front.png deleted file mode 100644 index 4dd2e2fe27..0000000000 Binary files a/graphics/pokemon/chansey/front.png and /dev/null differ diff --git a/graphics/pokemon/charizard/front.png b/graphics/pokemon/charizard/front.png deleted file mode 100644 index a6792d551c..0000000000 Binary files a/graphics/pokemon/charizard/front.png and /dev/null differ diff --git a/graphics/pokemon/charmander/front.png b/graphics/pokemon/charmander/front.png deleted file mode 100644 index eb0a9590d9..0000000000 Binary files a/graphics/pokemon/charmander/front.png and /dev/null differ diff --git a/graphics/pokemon/charmeleon/front.png b/graphics/pokemon/charmeleon/front.png deleted file mode 100644 index bdbd577e22..0000000000 Binary files a/graphics/pokemon/charmeleon/front.png and /dev/null differ diff --git a/graphics/pokemon/chatot/front.png b/graphics/pokemon/chatot/front.png deleted file mode 100644 index 41d53718e4..0000000000 Binary files a/graphics/pokemon/chatot/front.png and /dev/null differ diff --git a/graphics/pokemon/chatot/icon.png b/graphics/pokemon/chatot/icon.png index ee4eab2a1e..9a8777c7ad 100644 Binary files a/graphics/pokemon/chatot/icon.png and b/graphics/pokemon/chatot/icon.png differ diff --git a/graphics/pokemon/cherrim/icon.png b/graphics/pokemon/cherrim/icon.png index 145074d7a3..6915d775b4 100644 Binary files a/graphics/pokemon/cherrim/icon.png and b/graphics/pokemon/cherrim/icon.png differ diff --git a/graphics/pokemon/cherrim/sunshine/icon.png b/graphics/pokemon/cherrim/sunshine/icon.png index 2c23461bb4..333e22bb59 100644 Binary files a/graphics/pokemon/cherrim/sunshine/icon.png and b/graphics/pokemon/cherrim/sunshine/icon.png differ diff --git a/graphics/pokemon/cherubi/front.png b/graphics/pokemon/cherubi/front.png deleted file mode 100644 index 75b735e577..0000000000 Binary files a/graphics/pokemon/cherubi/front.png and /dev/null differ diff --git a/graphics/pokemon/chesnaught/front.png b/graphics/pokemon/chesnaught/front.png deleted file mode 100644 index 5e21918106..0000000000 Binary files a/graphics/pokemon/chesnaught/front.png and /dev/null differ diff --git a/graphics/pokemon/chespin/anim_front.png b/graphics/pokemon/chespin/anim_front.png index b55bb128c8..af2f036fa8 100644 Binary files a/graphics/pokemon/chespin/anim_front.png and b/graphics/pokemon/chespin/anim_front.png differ diff --git a/graphics/pokemon/chespin/front.png b/graphics/pokemon/chespin/front.png deleted file mode 100644 index f12f3a8737..0000000000 Binary files a/graphics/pokemon/chespin/front.png and /dev/null differ diff --git a/graphics/pokemon/chikorita/anim_front.png b/graphics/pokemon/chikorita/anim_front.png index ebba2d94f3..c12f9f5f02 100644 Binary files a/graphics/pokemon/chikorita/anim_front.png and b/graphics/pokemon/chikorita/anim_front.png differ diff --git a/graphics/pokemon/chikorita/front.png b/graphics/pokemon/chikorita/front.png deleted file mode 100644 index 687e8ee363..0000000000 Binary files a/graphics/pokemon/chikorita/front.png and /dev/null differ diff --git a/graphics/pokemon/chikorita/icon.png b/graphics/pokemon/chikorita/icon.png index ef2975dc4f..ed1eac67f8 100644 Binary files a/graphics/pokemon/chikorita/icon.png and b/graphics/pokemon/chikorita/icon.png differ diff --git a/graphics/pokemon/chikorita/normal.pal b/graphics/pokemon/chikorita/normal.pal index 0cda9b7dd9..a89f73e98b 100644 --- a/graphics/pokemon/chikorita/normal.pal +++ b/graphics/pokemon/chikorita/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 192 192 248 -80 136 32 -64 96 24 -144 208 96 -104 176 72 +98 139 41 +65 98 24 +131 230 49 +106 180 41 0 0 0 -96 96 56 -152 152 88 -224 232 168 -240 240 208 -184 200 120 -192 192 192 -248 248 248 -96 64 88 -192 40 40 -232 120 120 +65 90 24 +131 148 82 +213 246 139 +238 255 197 +180 205 106 +197 197 197 +255 255 255 +98 65 90 +197 41 41 +238 123 123 diff --git a/graphics/pokemon/chimchar/front.png b/graphics/pokemon/chimchar/front.png deleted file mode 100644 index 1a0e606a87..0000000000 Binary files a/graphics/pokemon/chimchar/front.png and /dev/null differ diff --git a/graphics/pokemon/chimecho/front.png b/graphics/pokemon/chimecho/front.png deleted file mode 100644 index 7d99925808..0000000000 Binary files a/graphics/pokemon/chimecho/front.png and /dev/null differ diff --git a/graphics/pokemon/chimecho/icon.png b/graphics/pokemon/chimecho/icon.png index f5480bc356..d4d6b64485 100644 Binary files a/graphics/pokemon/chimecho/icon.png and b/graphics/pokemon/chimecho/icon.png differ diff --git a/graphics/pokemon/chinchou/anim_front.png b/graphics/pokemon/chinchou/anim_front.png index 370a5a99d3..1b7e9ee03a 100644 Binary files a/graphics/pokemon/chinchou/anim_front.png and b/graphics/pokemon/chinchou/anim_front.png differ diff --git a/graphics/pokemon/chinchou/front.png b/graphics/pokemon/chinchou/front.png deleted file mode 100644 index 348090d348..0000000000 Binary files a/graphics/pokemon/chinchou/front.png and /dev/null differ diff --git a/graphics/pokemon/chinchou/normal.pal b/graphics/pokemon/chinchou/normal.pal index a2d9c8aca0..5af02cce93 100644 --- a/graphics/pokemon/chinchou/normal.pal +++ b/graphics/pokemon/chinchou/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -88 112 192 -40 80 144 -120 152 216 -184 152 32 -240 216 56 -184 192 232 -8 40 88 +90 115 197 +41 82 148 +106 164 230 +197 148 0 +255 205 82 +148 205 230 +8 41 90 0 0 0 -128 96 80 -80 40 24 -248 232 128 -216 184 48 -144 160 224 -176 0 0 +131 98 82 +82 41 24 +255 238 131 +230 180 41 +123 189 230 +180 0 0 0 0 0 diff --git a/graphics/pokemon/chingling/front.png b/graphics/pokemon/chingling/front.png deleted file mode 100644 index d8092f393e..0000000000 Binary files a/graphics/pokemon/chingling/front.png and /dev/null differ diff --git a/graphics/pokemon/cinccino/back.png b/graphics/pokemon/cinccino/back.png index 6855ace888..b97531f9f2 100644 Binary files a/graphics/pokemon/cinccino/back.png and b/graphics/pokemon/cinccino/back.png differ diff --git a/graphics/pokemon/cinccino/front.png b/graphics/pokemon/cinccino/front.png deleted file mode 100644 index 12d953daf5..0000000000 Binary files a/graphics/pokemon/cinccino/front.png and /dev/null differ diff --git a/graphics/pokemon/cinderace/back.png b/graphics/pokemon/cinderace/back.png index 701208e672..6af38da2b4 100644 Binary files a/graphics/pokemon/cinderace/back.png and b/graphics/pokemon/cinderace/back.png differ diff --git a/graphics/pokemon/cinderace/front.png b/graphics/pokemon/cinderace/front.png index fe11d997e7..d4b086a789 100644 Binary files a/graphics/pokemon/cinderace/front.png and b/graphics/pokemon/cinderace/front.png differ diff --git a/graphics/pokemon/clamperl/front.png b/graphics/pokemon/clamperl/front.png deleted file mode 100644 index dab2d9881d..0000000000 Binary files a/graphics/pokemon/clamperl/front.png and /dev/null differ diff --git a/graphics/pokemon/clauncher/front.png b/graphics/pokemon/clauncher/front.png deleted file mode 100644 index ade9f6518c..0000000000 Binary files a/graphics/pokemon/clauncher/front.png and /dev/null differ diff --git a/graphics/pokemon/clawitzer/front.png b/graphics/pokemon/clawitzer/front.png deleted file mode 100644 index 8c6c2f0488..0000000000 Binary files a/graphics/pokemon/clawitzer/front.png and /dev/null differ diff --git a/graphics/pokemon/claydol/front.png b/graphics/pokemon/claydol/front.png deleted file mode 100644 index cc2f1c16e7..0000000000 Binary files a/graphics/pokemon/claydol/front.png and /dev/null differ diff --git a/graphics/pokemon/clefable/front.png b/graphics/pokemon/clefable/front.png deleted file mode 100644 index 2ac06ddfc3..0000000000 Binary files a/graphics/pokemon/clefable/front.png and /dev/null differ diff --git a/graphics/pokemon/clefairy/front.png b/graphics/pokemon/clefairy/front.png deleted file mode 100644 index 4e959bd4ee..0000000000 Binary files a/graphics/pokemon/clefairy/front.png and /dev/null differ diff --git a/graphics/pokemon/cleffa/anim_front.png b/graphics/pokemon/cleffa/anim_front.png index 2f3e541f7e..9f2ee497fa 100644 Binary files a/graphics/pokemon/cleffa/anim_front.png and b/graphics/pokemon/cleffa/anim_front.png differ diff --git a/graphics/pokemon/cleffa/front.png b/graphics/pokemon/cleffa/front.png deleted file mode 100644 index a8d989f263..0000000000 Binary files a/graphics/pokemon/cleffa/front.png and /dev/null differ diff --git a/graphics/pokemon/cleffa/normal.pal b/graphics/pokemon/cleffa/normal.pal index d6dafd7980..c4944c7c66 100644 --- a/graphics/pokemon/cleffa/normal.pal +++ b/graphics/pokemon/cleffa/normal.pal @@ -3,17 +3,17 @@ JASC-PAL 16 152 208 160 168 80 80 -248 208 200 -248 160 160 -200 128 128 -80 48 40 -88 48 32 -112 72 56 +255 213 205 +255 164 164 +205 131 131 +98 32 24 +115 74 49 +156 98 8 16 16 16 -152 128 112 +197 139 41 248 248 248 -248 112 80 -248 152 120 -192 64 64 +205 131 131 +255 164 164 +156 0 0 0 0 0 0 0 0 diff --git a/graphics/pokemon/cloyster/front.png b/graphics/pokemon/cloyster/front.png deleted file mode 100644 index 6c4a65eb69..0000000000 Binary files a/graphics/pokemon/cloyster/front.png and /dev/null differ diff --git a/graphics/pokemon/cloyster/icon.png b/graphics/pokemon/cloyster/icon.png index a60befbbf1..9f50ad4dd9 100644 Binary files a/graphics/pokemon/cloyster/icon.png and b/graphics/pokemon/cloyster/icon.png differ diff --git a/graphics/pokemon/cobalion/front.png b/graphics/pokemon/cobalion/front.png deleted file mode 100644 index c57b709d36..0000000000 Binary files a/graphics/pokemon/cobalion/front.png and /dev/null differ diff --git a/graphics/pokemon/cobalion/icon.png b/graphics/pokemon/cobalion/icon.png index 376226b242..5dcdd6cb0e 100644 Binary files a/graphics/pokemon/cobalion/icon.png and b/graphics/pokemon/cobalion/icon.png differ diff --git a/graphics/pokemon/cofagrigus/front.png b/graphics/pokemon/cofagrigus/front.png deleted file mode 100644 index c48dbdaa44..0000000000 Binary files a/graphics/pokemon/cofagrigus/front.png and /dev/null differ diff --git a/graphics/pokemon/cofagrigus/icon.png b/graphics/pokemon/cofagrigus/icon.png index 19476138c1..1ae2b66099 100644 Binary files a/graphics/pokemon/cofagrigus/icon.png and b/graphics/pokemon/cofagrigus/icon.png differ diff --git a/graphics/pokemon/combee/front.png b/graphics/pokemon/combee/front.png deleted file mode 100644 index 4c1368df4b..0000000000 Binary files a/graphics/pokemon/combee/front.png and /dev/null differ diff --git a/graphics/pokemon/combusken/front.png b/graphics/pokemon/combusken/front.png deleted file mode 100644 index 2c2b6a5a1b..0000000000 Binary files a/graphics/pokemon/combusken/front.png and /dev/null differ diff --git a/graphics/pokemon/combusken/icon.png b/graphics/pokemon/combusken/icon.png index d7b1f8412b..231252ccb5 100644 Binary files a/graphics/pokemon/combusken/icon.png and b/graphics/pokemon/combusken/icon.png differ diff --git a/graphics/pokemon/conkeldurr/front.png b/graphics/pokemon/conkeldurr/front.png deleted file mode 100644 index bfa9221f99..0000000000 Binary files a/graphics/pokemon/conkeldurr/front.png and /dev/null differ diff --git a/graphics/pokemon/corphish/front.png b/graphics/pokemon/corphish/front.png deleted file mode 100644 index 3a78a7b011..0000000000 Binary files a/graphics/pokemon/corphish/front.png and /dev/null differ diff --git a/graphics/pokemon/corsola/front.png b/graphics/pokemon/corsola/front.png deleted file mode 100644 index b82fbceb5e..0000000000 Binary files a/graphics/pokemon/corsola/front.png and /dev/null differ diff --git a/graphics/pokemon/corsola/galarian/front.png b/graphics/pokemon/corsola/galarian/front.png index e9b4a7ded5..19d22f3b89 100644 Binary files a/graphics/pokemon/corsola/galarian/front.png and b/graphics/pokemon/corsola/galarian/front.png differ diff --git a/graphics/pokemon/corsola/icon.png b/graphics/pokemon/corsola/icon.png index 9fb51a0b14..e5ebe6c08d 100644 Binary files a/graphics/pokemon/corsola/icon.png and b/graphics/pokemon/corsola/icon.png differ diff --git a/graphics/pokemon/cottonee/front.png b/graphics/pokemon/cottonee/front.png deleted file mode 100644 index 0e807ff42e..0000000000 Binary files a/graphics/pokemon/cottonee/front.png and /dev/null differ diff --git a/graphics/pokemon/cradily/front.png b/graphics/pokemon/cradily/front.png deleted file mode 100644 index 0280dedf9b..0000000000 Binary files a/graphics/pokemon/cradily/front.png and /dev/null differ diff --git a/graphics/pokemon/cranidos/back.png b/graphics/pokemon/cranidos/back.png index 54947660c0..39aacf0bad 100644 Binary files a/graphics/pokemon/cranidos/back.png and b/graphics/pokemon/cranidos/back.png differ diff --git a/graphics/pokemon/cranidos/front.png b/graphics/pokemon/cranidos/front.png deleted file mode 100644 index 000533a924..0000000000 Binary files a/graphics/pokemon/cranidos/front.png and /dev/null differ diff --git a/graphics/pokemon/crawdaunt/front.png b/graphics/pokemon/crawdaunt/front.png deleted file mode 100644 index ede486992d..0000000000 Binary files a/graphics/pokemon/crawdaunt/front.png and /dev/null differ diff --git a/graphics/pokemon/cresselia/front.png b/graphics/pokemon/cresselia/front.png deleted file mode 100644 index 56a6f004f7..0000000000 Binary files a/graphics/pokemon/cresselia/front.png and /dev/null differ diff --git a/graphics/pokemon/cresselia/icon.png b/graphics/pokemon/cresselia/icon.png index 76b9b36390..8189ad7d16 100644 Binary files a/graphics/pokemon/cresselia/icon.png and b/graphics/pokemon/cresselia/icon.png differ diff --git a/graphics/pokemon/croagunk/front.png b/graphics/pokemon/croagunk/front.png deleted file mode 100644 index 6725ae39e7..0000000000 Binary files a/graphics/pokemon/croagunk/front.png and /dev/null differ diff --git a/graphics/pokemon/crobat/anim_front.png b/graphics/pokemon/crobat/anim_front.png index abf3b22be4..9275d83094 100644 Binary files a/graphics/pokemon/crobat/anim_front.png and b/graphics/pokemon/crobat/anim_front.png differ diff --git a/graphics/pokemon/crobat/front.png b/graphics/pokemon/crobat/front.png deleted file mode 100644 index e0b69bad78..0000000000 Binary files a/graphics/pokemon/crobat/front.png and /dev/null differ diff --git a/graphics/pokemon/crobat/icon.png b/graphics/pokemon/crobat/icon.png index 5a3257411d..2d42fa21b6 100644 Binary files a/graphics/pokemon/crobat/icon.png and b/graphics/pokemon/crobat/icon.png differ diff --git a/graphics/pokemon/crobat/normal.pal b/graphics/pokemon/crobat/normal.pal index c8b2897700..5db72c9cf3 100644 --- a/graphics/pokemon/crobat/normal.pal +++ b/graphics/pokemon/crobat/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -96 24 120 -120 72 152 -176 120 200 +90 41 115 +131 74 205 +205 139 246 16 16 16 -8 64 104 -32 104 144 -160 88 200 -72 152 184 -208 144 0 -248 208 0 -176 0 0 -104 104 104 -160 160 160 -248 248 248 +8 65 106 +32 106 148 +172 90 255 +74 156 189 +213 148 0 +255 213 0 +180 0 0 +106 106 106 +164 164 164 +255 255 255 0 0 0 diff --git a/graphics/pokemon/croconaw/anim_front.png b/graphics/pokemon/croconaw/anim_front.png index bdd5340fd5..3fc9ff81f2 100644 Binary files a/graphics/pokemon/croconaw/anim_front.png and b/graphics/pokemon/croconaw/anim_front.png differ diff --git a/graphics/pokemon/croconaw/front.png b/graphics/pokemon/croconaw/front.png deleted file mode 100644 index b1cd5b3b64..0000000000 Binary files a/graphics/pokemon/croconaw/front.png and /dev/null differ diff --git a/graphics/pokemon/croconaw/normal.pal b/graphics/pokemon/croconaw/normal.pal index 95fb4e4502..1a33a193e9 100644 --- a/graphics/pokemon/croconaw/normal.pal +++ b/graphics/pokemon/croconaw/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -128 0 8 -248 136 128 +156 16 32 +255 172 90 16 16 16 -240 80 88 -200 40 56 -32 96 120 -32 136 184 -104 200 200 -136 232 224 -248 248 248 -120 0 0 -224 64 32 -104 80 0 -200 184 96 -248 224 136 +255 74 74 +213 24 16 +32 98 123 +32 139 189 +106 205 205 +139 238 230 +255 255 255 +123 0 0 +230 65 32 +139 98 0 +238 180 74 +255 255 98 diff --git a/graphics/pokemon/crustle/front.png b/graphics/pokemon/crustle/front.png deleted file mode 100644 index 44fa563a28..0000000000 Binary files a/graphics/pokemon/crustle/front.png and /dev/null differ diff --git a/graphics/pokemon/crustle/icon.png b/graphics/pokemon/crustle/icon.png index e6a99fe634..5b70147792 100644 Binary files a/graphics/pokemon/crustle/icon.png and b/graphics/pokemon/crustle/icon.png differ diff --git a/graphics/pokemon/cryogonal/front.png b/graphics/pokemon/cryogonal/front.png deleted file mode 100644 index e3cd4c10f1..0000000000 Binary files a/graphics/pokemon/cryogonal/front.png and /dev/null differ diff --git a/graphics/pokemon/cubchoo/front.png b/graphics/pokemon/cubchoo/front.png deleted file mode 100644 index 82e5e9194e..0000000000 Binary files a/graphics/pokemon/cubchoo/front.png and /dev/null differ diff --git a/graphics/pokemon/cubone/front.png b/graphics/pokemon/cubone/front.png deleted file mode 100644 index ddf94b1a04..0000000000 Binary files a/graphics/pokemon/cubone/front.png and /dev/null differ diff --git a/graphics/pokemon/cursola/front.png b/graphics/pokemon/cursola/front.png index 01f189f5cb..d4811ab1e7 100644 Binary files a/graphics/pokemon/cursola/front.png and b/graphics/pokemon/cursola/front.png differ diff --git a/graphics/pokemon/cyndaquil/anim_front.png b/graphics/pokemon/cyndaquil/anim_front.png index bfdf5a6223..3649ae50ef 100644 Binary files a/graphics/pokemon/cyndaquil/anim_front.png and b/graphics/pokemon/cyndaquil/anim_front.png differ diff --git a/graphics/pokemon/cyndaquil/front.png b/graphics/pokemon/cyndaquil/front.png deleted file mode 100644 index 448a51f8a9..0000000000 Binary files a/graphics/pokemon/cyndaquil/front.png and /dev/null differ diff --git a/graphics/pokemon/cyndaquil/normal.pal b/graphics/pokemon/cyndaquil/normal.pal index f5182e5eed..b600ed85e6 100644 --- a/graphics/pokemon/cyndaquil/normal.pal +++ b/graphics/pokemon/cyndaquil/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -216 0 0 -248 56 0 -16 56 80 -48 104 128 -96 168 184 -248 152 0 +222 0 0 +255 90 0 +41 82 82 +57 98 123 +98 131 156 +255 156 0 16 16 16 -248 216 16 -16 40 48 -200 168 80 -248 240 160 -120 96 32 -216 176 120 -168 168 168 +255 222 0 +24 57 74 +197 164 106 +255 238 164 +123 98 32 +230 205 106 +172 172 172 248 248 248 diff --git a/graphics/pokemon/darkrai/front.png b/graphics/pokemon/darkrai/front.png deleted file mode 100644 index e3f284abdd..0000000000 Binary files a/graphics/pokemon/darkrai/front.png and /dev/null differ diff --git a/graphics/pokemon/darkrai/icon.png b/graphics/pokemon/darkrai/icon.png index 71d92afdc2..c31c365bdb 100644 Binary files a/graphics/pokemon/darkrai/icon.png and b/graphics/pokemon/darkrai/icon.png differ diff --git a/graphics/pokemon/darmanitan/front.png b/graphics/pokemon/darmanitan/front.png deleted file mode 100644 index 137b407ba9..0000000000 Binary files a/graphics/pokemon/darmanitan/front.png and /dev/null differ diff --git a/graphics/pokemon/darmanitan/zen_mode/front.png b/graphics/pokemon/darmanitan/zen_mode/front.png deleted file mode 100644 index 84ace43cf9..0000000000 Binary files a/graphics/pokemon/darmanitan/zen_mode/front.png and /dev/null differ diff --git a/graphics/pokemon/darmanitan/zen_mode/icon.png b/graphics/pokemon/darmanitan/zen_mode/icon.png index f9e8674785..b563d4f2ad 100644 Binary files a/graphics/pokemon/darmanitan/zen_mode/icon.png and b/graphics/pokemon/darmanitan/zen_mode/icon.png differ diff --git a/graphics/pokemon/darumaka/front.png b/graphics/pokemon/darumaka/front.png deleted file mode 100644 index 92a3645d24..0000000000 Binary files a/graphics/pokemon/darumaka/front.png and /dev/null differ diff --git a/graphics/pokemon/decidueye/hisuian/back.png b/graphics/pokemon/decidueye/hisuian/back.png new file mode 100755 index 0000000000..e977f88e25 Binary files /dev/null and b/graphics/pokemon/decidueye/hisuian/back.png differ diff --git a/graphics/pokemon/decidueye/hisuian/front.png b/graphics/pokemon/decidueye/hisuian/front.png new file mode 100755 index 0000000000..f3c4d93af1 Binary files /dev/null and b/graphics/pokemon/decidueye/hisuian/front.png differ diff --git a/graphics/pokemon/decidueye/hisuian/icon.png b/graphics/pokemon/decidueye/hisuian/icon.png old mode 100644 new mode 100755 diff --git a/graphics/pokemon/decidueye/hisuian/normal.pal b/graphics/pokemon/decidueye/hisuian/normal.pal new file mode 100755 index 0000000000..a5a61bafe0 --- /dev/null +++ b/graphics/pokemon/decidueye/hisuian/normal.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +156 213 164 +115 106 106 +16 16 16 +238 238 238 +189 189 189 +238 156 57 +65 41 32 +106 24 41 +189 106 41 +205 49 41 +148 32 41 +41 41 49 +213 148 98 +74 74 90 +172 106 74 +115 65 57 diff --git a/graphics/pokemon/decidueye/hisuian/shiny.pal b/graphics/pokemon/decidueye/hisuian/shiny.pal new file mode 100755 index 0000000000..5dd5e9e8f6 --- /dev/null +++ b/graphics/pokemon/decidueye/hisuian/shiny.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +156 213 164 +115 106 106 +16 16 16 +238 238 238 +189 189 189 +238 82 57 +65 41 32 +16 57 41 +172 41 41 +32 131 98 +24 90 65 +41 41 49 +172 139 106 +74 74 90 +131 106 90 +90 65 57 diff --git a/graphics/pokemon/dedenne/front.png b/graphics/pokemon/dedenne/front.png deleted file mode 100644 index 05e9403c50..0000000000 Binary files a/graphics/pokemon/dedenne/front.png and /dev/null differ diff --git a/graphics/pokemon/deerling/autumn/icon.png b/graphics/pokemon/deerling/autumn/icon.png index 7c14c05cb2..4181194e1d 100644 Binary files a/graphics/pokemon/deerling/autumn/icon.png and b/graphics/pokemon/deerling/autumn/icon.png differ diff --git a/graphics/pokemon/deerling/front.png b/graphics/pokemon/deerling/front.png deleted file mode 100644 index cade6f0dbf..0000000000 Binary files a/graphics/pokemon/deerling/front.png and /dev/null differ diff --git a/graphics/pokemon/deerling/summer/icon.png b/graphics/pokemon/deerling/summer/icon.png index 7a95355c35..c3358ab9fc 100644 Binary files a/graphics/pokemon/deerling/summer/icon.png and b/graphics/pokemon/deerling/summer/icon.png differ diff --git a/graphics/pokemon/deerling/winter/icon.png b/graphics/pokemon/deerling/winter/icon.png index a7259c67e0..6528ea9711 100644 Binary files a/graphics/pokemon/deerling/winter/icon.png and b/graphics/pokemon/deerling/winter/icon.png differ diff --git a/graphics/pokemon/deino/front.png b/graphics/pokemon/deino/front.png deleted file mode 100644 index 835771003a..0000000000 Binary files a/graphics/pokemon/deino/front.png and /dev/null differ diff --git a/graphics/pokemon/deino/icon.png b/graphics/pokemon/deino/icon.png index 60822658b5..0b5ec01ce0 100644 Binary files a/graphics/pokemon/deino/icon.png and b/graphics/pokemon/deino/icon.png differ diff --git a/graphics/pokemon/delcatty/front.png b/graphics/pokemon/delcatty/front.png deleted file mode 100644 index bdb666e039..0000000000 Binary files a/graphics/pokemon/delcatty/front.png and /dev/null differ diff --git a/graphics/pokemon/delibird/front.png b/graphics/pokemon/delibird/front.png deleted file mode 100644 index a0eaf79af0..0000000000 Binary files a/graphics/pokemon/delibird/front.png and /dev/null differ diff --git a/graphics/pokemon/delphox/front.png b/graphics/pokemon/delphox/front.png deleted file mode 100644 index 939b538c44..0000000000 Binary files a/graphics/pokemon/delphox/front.png and /dev/null differ diff --git a/graphics/pokemon/deoxys/attack/front.png b/graphics/pokemon/deoxys/attack/front.png deleted file mode 100644 index 5080dd28eb..0000000000 Binary files a/graphics/pokemon/deoxys/attack/front.png and /dev/null differ diff --git a/graphics/pokemon/deoxys/defense/front.png b/graphics/pokemon/deoxys/defense/front.png deleted file mode 100644 index 2e21b5592e..0000000000 Binary files a/graphics/pokemon/deoxys/defense/front.png and /dev/null differ diff --git a/graphics/pokemon/deoxys/front.png b/graphics/pokemon/deoxys/front.png deleted file mode 100644 index 5c2c25314e..0000000000 Binary files a/graphics/pokemon/deoxys/front.png and /dev/null differ diff --git a/graphics/pokemon/deoxys/speed/front.png b/graphics/pokemon/deoxys/speed/front.png deleted file mode 100644 index 776d0083b3..0000000000 Binary files a/graphics/pokemon/deoxys/speed/front.png and /dev/null differ diff --git a/graphics/pokemon/dewgong/back.png b/graphics/pokemon/dewgong/back.png index 1d5e35fdff..90b5ae680b 100644 Binary files a/graphics/pokemon/dewgong/back.png and b/graphics/pokemon/dewgong/back.png differ diff --git a/graphics/pokemon/dewgong/front.png b/graphics/pokemon/dewgong/front.png deleted file mode 100644 index 62201eaab3..0000000000 Binary files a/graphics/pokemon/dewgong/front.png and /dev/null differ diff --git a/graphics/pokemon/dewott/front.png b/graphics/pokemon/dewott/front.png deleted file mode 100644 index d8665e601e..0000000000 Binary files a/graphics/pokemon/dewott/front.png and /dev/null differ diff --git a/graphics/pokemon/dialga/front.png b/graphics/pokemon/dialga/front.png deleted file mode 100644 index e4a6172ace..0000000000 Binary files a/graphics/pokemon/dialga/front.png and /dev/null differ diff --git a/graphics/pokemon/dialga/icon.png b/graphics/pokemon/dialga/icon.png index 83db2e521d..232b9bf945 100644 Binary files a/graphics/pokemon/dialga/icon.png and b/graphics/pokemon/dialga/icon.png differ diff --git a/graphics/pokemon/diancie/front.png b/graphics/pokemon/diancie/front.png deleted file mode 100644 index c99768d64a..0000000000 Binary files a/graphics/pokemon/diancie/front.png and /dev/null differ diff --git a/graphics/pokemon/diggersby/front.png b/graphics/pokemon/diggersby/front.png deleted file mode 100644 index 90ff136ab7..0000000000 Binary files a/graphics/pokemon/diggersby/front.png and /dev/null differ diff --git a/graphics/pokemon/diglett/front.png b/graphics/pokemon/diglett/front.png deleted file mode 100644 index 4e527ef5e5..0000000000 Binary files a/graphics/pokemon/diglett/front.png and /dev/null differ diff --git a/graphics/pokemon/ditto/back.png b/graphics/pokemon/ditto/back.png index 9768f89a15..5bea88a4ae 100644 Binary files a/graphics/pokemon/ditto/back.png and b/graphics/pokemon/ditto/back.png differ diff --git a/graphics/pokemon/ditto/front.png b/graphics/pokemon/ditto/front.png deleted file mode 100644 index 73603b303d..0000000000 Binary files a/graphics/pokemon/ditto/front.png and /dev/null differ diff --git a/graphics/pokemon/dodrio/front.png b/graphics/pokemon/dodrio/front.png deleted file mode 100644 index 5184438f49..0000000000 Binary files a/graphics/pokemon/dodrio/front.png and /dev/null differ diff --git a/graphics/pokemon/dodrio/icon.png b/graphics/pokemon/dodrio/icon.png index bd1692b133..19d1644a3c 100644 Binary files a/graphics/pokemon/dodrio/icon.png and b/graphics/pokemon/dodrio/icon.png differ diff --git a/graphics/pokemon/doduo/front.png b/graphics/pokemon/doduo/front.png deleted file mode 100644 index 6222a7e271..0000000000 Binary files a/graphics/pokemon/doduo/front.png and /dev/null differ diff --git a/graphics/pokemon/donphan/front.png b/graphics/pokemon/donphan/front.png deleted file mode 100644 index cb344b85bc..0000000000 Binary files a/graphics/pokemon/donphan/front.png and /dev/null differ diff --git a/graphics/pokemon/donphan/icon.png b/graphics/pokemon/donphan/icon.png index ce67839107..32368b808d 100644 Binary files a/graphics/pokemon/donphan/icon.png and b/graphics/pokemon/donphan/icon.png differ diff --git a/graphics/pokemon/doublade/front.png b/graphics/pokemon/doublade/front.png deleted file mode 100644 index b2bd15029f..0000000000 Binary files a/graphics/pokemon/doublade/front.png and /dev/null differ diff --git a/graphics/pokemon/dragalge/front.png b/graphics/pokemon/dragalge/front.png deleted file mode 100644 index be813026f8..0000000000 Binary files a/graphics/pokemon/dragalge/front.png and /dev/null differ diff --git a/graphics/pokemon/dragonair/front.png b/graphics/pokemon/dragonair/front.png deleted file mode 100644 index 91fea694e2..0000000000 Binary files a/graphics/pokemon/dragonair/front.png and /dev/null differ diff --git a/graphics/pokemon/dragonite/front.png b/graphics/pokemon/dragonite/front.png deleted file mode 100644 index 6bffee8980..0000000000 Binary files a/graphics/pokemon/dragonite/front.png and /dev/null differ diff --git a/graphics/pokemon/dragonite/icon.png b/graphics/pokemon/dragonite/icon.png index 11fb866c39..12c2c141d6 100644 Binary files a/graphics/pokemon/dragonite/icon.png and b/graphics/pokemon/dragonite/icon.png differ diff --git a/graphics/pokemon/drapion/front.png b/graphics/pokemon/drapion/front.png deleted file mode 100644 index 57734a2844..0000000000 Binary files a/graphics/pokemon/drapion/front.png and /dev/null differ diff --git a/graphics/pokemon/dratini/front.png b/graphics/pokemon/dratini/front.png deleted file mode 100644 index ee6f3bc450..0000000000 Binary files a/graphics/pokemon/dratini/front.png and /dev/null differ diff --git a/graphics/pokemon/drifblim/front.png b/graphics/pokemon/drifblim/front.png deleted file mode 100644 index f6cf9d5f9d..0000000000 Binary files a/graphics/pokemon/drifblim/front.png and /dev/null differ diff --git a/graphics/pokemon/drifblim/icon.png b/graphics/pokemon/drifblim/icon.png index bfa106e872..df7c888d5f 100644 Binary files a/graphics/pokemon/drifblim/icon.png and b/graphics/pokemon/drifblim/icon.png differ diff --git a/graphics/pokemon/drifloon/front.png b/graphics/pokemon/drifloon/front.png deleted file mode 100644 index dea6e88717..0000000000 Binary files a/graphics/pokemon/drifloon/front.png and /dev/null differ diff --git a/graphics/pokemon/drilbur/front.png b/graphics/pokemon/drilbur/front.png deleted file mode 100644 index 1bb3bb20d8..0000000000 Binary files a/graphics/pokemon/drilbur/front.png and /dev/null differ diff --git a/graphics/pokemon/drowzee/front.png b/graphics/pokemon/drowzee/front.png deleted file mode 100644 index b1296df0e2..0000000000 Binary files a/graphics/pokemon/drowzee/front.png and /dev/null differ diff --git a/graphics/pokemon/druddigon/front.png b/graphics/pokemon/druddigon/front.png deleted file mode 100644 index a522546a2b..0000000000 Binary files a/graphics/pokemon/druddigon/front.png and /dev/null differ diff --git a/graphics/pokemon/ducklett/front.png b/graphics/pokemon/ducklett/front.png deleted file mode 100644 index f86b61a3d5..0000000000 Binary files a/graphics/pokemon/ducklett/front.png and /dev/null differ diff --git a/graphics/pokemon/dugtrio/front.png b/graphics/pokemon/dugtrio/front.png deleted file mode 100644 index 60051cd79c..0000000000 Binary files a/graphics/pokemon/dugtrio/front.png and /dev/null differ diff --git a/graphics/pokemon/dunsparce/back.png b/graphics/pokemon/dunsparce/back.png index 03dc3acbb8..c19d4b5dbe 100644 Binary files a/graphics/pokemon/dunsparce/back.png and b/graphics/pokemon/dunsparce/back.png differ diff --git a/graphics/pokemon/dunsparce/front.png b/graphics/pokemon/dunsparce/front.png deleted file mode 100644 index 660f5e1a11..0000000000 Binary files a/graphics/pokemon/dunsparce/front.png and /dev/null differ diff --git a/graphics/pokemon/duosion/anim_front.png b/graphics/pokemon/duosion/anim_front.png index e8c48d6c05..c265b42524 100644 Binary files a/graphics/pokemon/duosion/anim_front.png and b/graphics/pokemon/duosion/anim_front.png differ diff --git a/graphics/pokemon/duosion/front.png b/graphics/pokemon/duosion/front.png deleted file mode 100644 index acf0c1c0d2..0000000000 Binary files a/graphics/pokemon/duosion/front.png and /dev/null differ diff --git a/graphics/pokemon/duosion/icon.png b/graphics/pokemon/duosion/icon.png index 90064f3be0..9385bf6140 100644 Binary files a/graphics/pokemon/duosion/icon.png and b/graphics/pokemon/duosion/icon.png differ diff --git a/graphics/pokemon/duosion/normal.pal b/graphics/pokemon/duosion/normal.pal index 9af82073ec..1316dc6662 100644 --- a/graphics/pokemon/duosion/normal.pal +++ b/graphics/pokemon/duosion/normal.pal @@ -11,8 +11,8 @@ JASC-PAL 16 16 16 128 216 160 224 248 216 -112 56 56 176 64 64 +112 56 56 128 216 160 0 0 0 0 0 0 diff --git a/graphics/pokemon/durant/front.png b/graphics/pokemon/durant/front.png deleted file mode 100644 index 0320e654f9..0000000000 Binary files a/graphics/pokemon/durant/front.png and /dev/null differ diff --git a/graphics/pokemon/dusclops/front.png b/graphics/pokemon/dusclops/front.png deleted file mode 100644 index 58a0d15abb..0000000000 Binary files a/graphics/pokemon/dusclops/front.png and /dev/null differ diff --git a/graphics/pokemon/dusknoir/front.png b/graphics/pokemon/dusknoir/front.png deleted file mode 100644 index 95a5ccea98..0000000000 Binary files a/graphics/pokemon/dusknoir/front.png and /dev/null differ diff --git a/graphics/pokemon/duskull/anim_front.png b/graphics/pokemon/duskull/anim_front.png index ede00efffc..b873ffbb7c 100644 Binary files a/graphics/pokemon/duskull/anim_front.png and b/graphics/pokemon/duskull/anim_front.png differ diff --git a/graphics/pokemon/duskull/back.png b/graphics/pokemon/duskull/back.png index e3817e24ea..82b1266c5c 100644 Binary files a/graphics/pokemon/duskull/back.png and b/graphics/pokemon/duskull/back.png differ diff --git a/graphics/pokemon/duskull/front.png b/graphics/pokemon/duskull/front.png deleted file mode 100644 index 33903c773d..0000000000 Binary files a/graphics/pokemon/duskull/front.png and /dev/null differ diff --git a/graphics/pokemon/duskull/shiny.pal b/graphics/pokemon/duskull/shiny.pal index 2c59d3ae14..16dc97f5a8 100644 --- a/graphics/pokemon/duskull/shiny.pal +++ b/graphics/pokemon/duskull/shiny.pal @@ -14,6 +14,6 @@ JASC-PAL 248 232 176 248 120 88 152 40 72 -104 88 80 +248 120 88 0 0 0 0 0 0 diff --git a/graphics/pokemon/dustox/front.png b/graphics/pokemon/dustox/front.png deleted file mode 100644 index 356320c18d..0000000000 Binary files a/graphics/pokemon/dustox/front.png and /dev/null differ diff --git a/graphics/pokemon/dwebble/front.png b/graphics/pokemon/dwebble/front.png deleted file mode 100644 index 560295f560..0000000000 Binary files a/graphics/pokemon/dwebble/front.png and /dev/null differ diff --git a/graphics/pokemon/dwebble/icon.png b/graphics/pokemon/dwebble/icon.png index 32a23fd05a..4b356d5aaa 100644 Binary files a/graphics/pokemon/dwebble/icon.png and b/graphics/pokemon/dwebble/icon.png differ diff --git a/graphics/pokemon/eelektrik/front.png b/graphics/pokemon/eelektrik/front.png deleted file mode 100644 index 6bb7cc764f..0000000000 Binary files a/graphics/pokemon/eelektrik/front.png and /dev/null differ diff --git a/graphics/pokemon/eelektross/front.png b/graphics/pokemon/eelektross/front.png deleted file mode 100644 index b1ae70adb0..0000000000 Binary files a/graphics/pokemon/eelektross/front.png and /dev/null differ diff --git a/graphics/pokemon/eevee/backf.png b/graphics/pokemon/eevee/backf.png index 7689d995b6..6c265361f5 100644 Binary files a/graphics/pokemon/eevee/backf.png and b/graphics/pokemon/eevee/backf.png differ diff --git a/graphics/pokemon/eevee/front.png b/graphics/pokemon/eevee/front.png deleted file mode 100644 index 1773de2aaf..0000000000 Binary files a/graphics/pokemon/eevee/front.png and /dev/null differ diff --git a/graphics/pokemon/egg/front.png b/graphics/pokemon/egg/front.png deleted file mode 100644 index d9680a8992..0000000000 Binary files a/graphics/pokemon/egg/front.png and /dev/null differ diff --git a/graphics/pokemon/ekans/front.png b/graphics/pokemon/ekans/front.png deleted file mode 100644 index ebfd623efa..0000000000 Binary files a/graphics/pokemon/ekans/front.png and /dev/null differ diff --git a/graphics/pokemon/electabuzz/front.png b/graphics/pokemon/electabuzz/front.png deleted file mode 100644 index 0459ecb3bc..0000000000 Binary files a/graphics/pokemon/electabuzz/front.png and /dev/null differ diff --git a/graphics/pokemon/electivire/anim_front.png b/graphics/pokemon/electivire/anim_front.png index a5f05a7e8b..9aae7e5b5c 100644 Binary files a/graphics/pokemon/electivire/anim_front.png and b/graphics/pokemon/electivire/anim_front.png differ diff --git a/graphics/pokemon/electivire/front.png b/graphics/pokemon/electivire/front.png deleted file mode 100644 index 41bf884b5e..0000000000 Binary files a/graphics/pokemon/electivire/front.png and /dev/null differ diff --git a/graphics/pokemon/electivire/normal.pal b/graphics/pokemon/electivire/normal.pal index e751bd37ec..890828f279 100644 --- a/graphics/pokemon/electivire/normal.pal +++ b/graphics/pokemon/electivire/normal.pal @@ -13,7 +13,7 @@ JASC-PAL 248 232 144 192 168 64 248 248 248 +88 72 64 104 104 104 176 176 192 0 0 0 -0 0 0 diff --git a/graphics/pokemon/electrike/front.png b/graphics/pokemon/electrike/front.png deleted file mode 100644 index 3e2b74a752..0000000000 Binary files a/graphics/pokemon/electrike/front.png and /dev/null differ diff --git a/graphics/pokemon/electrode/front.png b/graphics/pokemon/electrode/front.png deleted file mode 100644 index 6de7d5e090..0000000000 Binary files a/graphics/pokemon/electrode/front.png and /dev/null differ diff --git a/graphics/pokemon/elekid/back.png b/graphics/pokemon/elekid/back.png index 09028a7d9f..c0b5f8cb79 100644 Binary files a/graphics/pokemon/elekid/back.png and b/graphics/pokemon/elekid/back.png differ diff --git a/graphics/pokemon/elekid/front.png b/graphics/pokemon/elekid/front.png deleted file mode 100644 index dc1c694b23..0000000000 Binary files a/graphics/pokemon/elekid/front.png and /dev/null differ diff --git a/graphics/pokemon/elgyem/front.png b/graphics/pokemon/elgyem/front.png deleted file mode 100644 index f1a930f82a..0000000000 Binary files a/graphics/pokemon/elgyem/front.png and /dev/null differ diff --git a/graphics/pokemon/emboar/front.png b/graphics/pokemon/emboar/front.png deleted file mode 100644 index 009ecfd4de..0000000000 Binary files a/graphics/pokemon/emboar/front.png and /dev/null differ diff --git a/graphics/pokemon/emboar/icon.png b/graphics/pokemon/emboar/icon.png index 8d6f99628e..d79f6f004b 100644 Binary files a/graphics/pokemon/emboar/icon.png and b/graphics/pokemon/emboar/icon.png differ diff --git a/graphics/pokemon/emolga/front.png b/graphics/pokemon/emolga/front.png deleted file mode 100644 index 23a5856b4b..0000000000 Binary files a/graphics/pokemon/emolga/front.png and /dev/null differ diff --git a/graphics/pokemon/empoleon/front.png b/graphics/pokemon/empoleon/front.png deleted file mode 100644 index 3b3dff0bc2..0000000000 Binary files a/graphics/pokemon/empoleon/front.png and /dev/null differ diff --git a/graphics/pokemon/empoleon/icon.png b/graphics/pokemon/empoleon/icon.png index f4bbc4fd48..1e6e305828 100644 Binary files a/graphics/pokemon/empoleon/icon.png and b/graphics/pokemon/empoleon/icon.png differ diff --git a/graphics/pokemon/enamorus/back.png b/graphics/pokemon/enamorus/back.png new file mode 100755 index 0000000000..1b2b00e218 Binary files /dev/null and b/graphics/pokemon/enamorus/back.png differ diff --git a/graphics/pokemon/enamorus/front.png b/graphics/pokemon/enamorus/front.png new file mode 100755 index 0000000000..f6b9301996 Binary files /dev/null and b/graphics/pokemon/enamorus/front.png differ diff --git a/graphics/pokemon/enamorus/normal.pal b/graphics/pokemon/enamorus/normal.pal new file mode 100755 index 0000000000..08f6e5ebf1 --- /dev/null +++ b/graphics/pokemon/enamorus/normal.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +153 211 165 +74 74 74 +180 180 189 +252 252 252 +16 16 16 +118 50 58 +147 33 30 +224 116 156 +243 46 46 +174 74 87 +199 46 41 +243 84 143 +187 62 94 +255 197 60 +239 228 176 +0 0 0 diff --git a/graphics/pokemon/enamorus/shiny.pal b/graphics/pokemon/enamorus/shiny.pal new file mode 100644 index 0000000000..180ae687e5 --- /dev/null +++ b/graphics/pokemon/enamorus/shiny.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +152 208 160 +74 74 74 +180 180 189 +255 255 255 +0 0 0 +131 57 82 +164 24 24 +230 131 164 +255 90 0 +189 82 106 +222 74 41 +255 139 238 +205 98 189 +255 197 32 +0 0 0 +0 0 0 diff --git a/graphics/pokemon/enamorus/therian/back.png b/graphics/pokemon/enamorus/therian/back.png new file mode 100644 index 0000000000..a563156e4d Binary files /dev/null and b/graphics/pokemon/enamorus/therian/back.png differ diff --git a/graphics/pokemon/enamorus/therian/front.png b/graphics/pokemon/enamorus/therian/front.png new file mode 100644 index 0000000000..8ac7c93f06 Binary files /dev/null and b/graphics/pokemon/enamorus/therian/front.png differ diff --git a/graphics/pokemon/enamorus/therian/normal.pal b/graphics/pokemon/enamorus/therian/normal.pal new file mode 100644 index 0000000000..096dfb36af --- /dev/null +++ b/graphics/pokemon/enamorus/therian/normal.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +156 213 164 +131 41 49 +213 106 156 +16 16 16 +213 65 57 +74 74 74 +255 255 255 +180 180 189 +255 197 57 +123 164 131 +98 115 98 +148 197 156 +230 246 230 +49 57 49 +213 106 156 +0 0 0 diff --git a/graphics/pokemon/enamorus/therian/shiny.pal b/graphics/pokemon/enamorus/therian/shiny.pal new file mode 100644 index 0000000000..58c5564621 --- /dev/null +++ b/graphics/pokemon/enamorus/therian/shiny.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +156 213 164 +131 41 49 +213 106 156 +16 16 16 +213 65 57 +74 74 74 +255 255 255 +180 180 189 +255 197 57 +123 164 131 +98 115 98 +148 197 156 +230 246 230 +49 57 49 +238 131 230 +0 0 0 diff --git a/graphics/pokemon/entei/front.png b/graphics/pokemon/entei/front.png deleted file mode 100644 index efed934d7f..0000000000 Binary files a/graphics/pokemon/entei/front.png and /dev/null differ diff --git a/graphics/pokemon/entei/icon.png b/graphics/pokemon/entei/icon.png index b7707797f0..eeb80f4604 100644 Binary files a/graphics/pokemon/entei/icon.png and b/graphics/pokemon/entei/icon.png differ diff --git a/graphics/pokemon/escavalier/front.png b/graphics/pokemon/escavalier/front.png deleted file mode 100644 index eb56edb912..0000000000 Binary files a/graphics/pokemon/escavalier/front.png and /dev/null differ diff --git a/graphics/pokemon/escavalier/icon.png b/graphics/pokemon/escavalier/icon.png index 32c3988341..94f646ecf7 100644 Binary files a/graphics/pokemon/escavalier/icon.png and b/graphics/pokemon/escavalier/icon.png differ diff --git a/graphics/pokemon/espeon/back.png b/graphics/pokemon/espeon/back.png index 0eb8268239..e88821875b 100644 Binary files a/graphics/pokemon/espeon/back.png and b/graphics/pokemon/espeon/back.png differ diff --git a/graphics/pokemon/espeon/front.png b/graphics/pokemon/espeon/front.png deleted file mode 100644 index 9c0cc5bba9..0000000000 Binary files a/graphics/pokemon/espeon/front.png and /dev/null differ diff --git a/graphics/pokemon/espeon/icon.png b/graphics/pokemon/espeon/icon.png index 86a4606c96..ebb9fd328b 100644 Binary files a/graphics/pokemon/espeon/icon.png and b/graphics/pokemon/espeon/icon.png differ diff --git a/graphics/pokemon/espurr/front.png b/graphics/pokemon/espurr/front.png deleted file mode 100644 index c07972d979..0000000000 Binary files a/graphics/pokemon/espurr/front.png and /dev/null differ diff --git a/graphics/pokemon/excadrill/front.png b/graphics/pokemon/excadrill/front.png deleted file mode 100644 index 35cb0a1723..0000000000 Binary files a/graphics/pokemon/excadrill/front.png and /dev/null differ diff --git a/graphics/pokemon/exeggcute/front.png b/graphics/pokemon/exeggcute/front.png deleted file mode 100644 index 730bd6e122..0000000000 Binary files a/graphics/pokemon/exeggcute/front.png and /dev/null differ diff --git a/graphics/pokemon/exeggutor/front.png b/graphics/pokemon/exeggutor/front.png deleted file mode 100644 index 2ea8935be4..0000000000 Binary files a/graphics/pokemon/exeggutor/front.png and /dev/null differ diff --git a/graphics/pokemon/exeggutor/icon.png b/graphics/pokemon/exeggutor/icon.png index 1812258413..007641b095 100644 Binary files a/graphics/pokemon/exeggutor/icon.png and b/graphics/pokemon/exeggutor/icon.png differ diff --git a/graphics/pokemon/exploud/front.png b/graphics/pokemon/exploud/front.png deleted file mode 100644 index 03eb4fa59b..0000000000 Binary files a/graphics/pokemon/exploud/front.png and /dev/null differ diff --git a/graphics/pokemon/exploud/icon.png b/graphics/pokemon/exploud/icon.png index f803aecaba..3cb142dde2 100644 Binary files a/graphics/pokemon/exploud/icon.png and b/graphics/pokemon/exploud/icon.png differ diff --git a/graphics/pokemon/farfetchd/front.png b/graphics/pokemon/farfetchd/front.png deleted file mode 100644 index 9616f035f6..0000000000 Binary files a/graphics/pokemon/farfetchd/front.png and /dev/null differ diff --git a/graphics/pokemon/fearow/front.png b/graphics/pokemon/fearow/front.png deleted file mode 100644 index 6cb779e78e..0000000000 Binary files a/graphics/pokemon/fearow/front.png and /dev/null differ diff --git a/graphics/pokemon/feebas/front.png b/graphics/pokemon/feebas/front.png deleted file mode 100644 index 2b746a493e..0000000000 Binary files a/graphics/pokemon/feebas/front.png and /dev/null differ diff --git a/graphics/pokemon/fennekin/front.png b/graphics/pokemon/fennekin/front.png deleted file mode 100644 index 272ff92747..0000000000 Binary files a/graphics/pokemon/fennekin/front.png and /dev/null differ diff --git a/graphics/pokemon/feraligatr/anim_front.png b/graphics/pokemon/feraligatr/anim_front.png index d644a30ae3..26df70b9e1 100644 Binary files a/graphics/pokemon/feraligatr/anim_front.png and b/graphics/pokemon/feraligatr/anim_front.png differ diff --git a/graphics/pokemon/feraligatr/front.png b/graphics/pokemon/feraligatr/front.png deleted file mode 100644 index dda82ea749..0000000000 Binary files a/graphics/pokemon/feraligatr/front.png and /dev/null differ diff --git a/graphics/pokemon/feraligatr/icon.png b/graphics/pokemon/feraligatr/icon.png index 2fe3556a84..74aca6aea4 100644 Binary files a/graphics/pokemon/feraligatr/icon.png and b/graphics/pokemon/feraligatr/icon.png differ diff --git a/graphics/pokemon/feraligatr/normal.pal b/graphics/pokemon/feraligatr/normal.pal index 166ae9add6..3322ac24e3 100644 --- a/graphics/pokemon/feraligatr/normal.pal +++ b/graphics/pokemon/feraligatr/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -128 0 8 -248 136 128 +131 0 8 +255 139 131 16 16 16 -240 80 88 -8 104 144 -64 208 232 -40 152 184 -136 232 248 -248 248 248 -192 192 192 -248 184 112 -128 88 0 -248 224 136 -200 184 96 +246 82 90 +41 74 139 +90 180 246 +57 139 205 +139 213 255 +255 255 255 +197 197 197 +255 230 139 +106 82 0 +255 230 139 +205 189 98 0 0 0 diff --git a/graphics/pokemon/ferroseed/front.png b/graphics/pokemon/ferroseed/front.png deleted file mode 100644 index 8242059a06..0000000000 Binary files a/graphics/pokemon/ferroseed/front.png and /dev/null differ diff --git a/graphics/pokemon/ferrothorn/front.png b/graphics/pokemon/ferrothorn/front.png deleted file mode 100644 index eeee76f769..0000000000 Binary files a/graphics/pokemon/ferrothorn/front.png and /dev/null differ diff --git a/graphics/pokemon/finneon/front.png b/graphics/pokemon/finneon/front.png deleted file mode 100644 index 635dcfc7e9..0000000000 Binary files a/graphics/pokemon/finneon/front.png and /dev/null differ diff --git a/graphics/pokemon/flaaffy/anim_front.png b/graphics/pokemon/flaaffy/anim_front.png index 0cc7d0439e..c09ccf4922 100644 Binary files a/graphics/pokemon/flaaffy/anim_front.png and b/graphics/pokemon/flaaffy/anim_front.png differ diff --git a/graphics/pokemon/flaaffy/front.png b/graphics/pokemon/flaaffy/front.png deleted file mode 100644 index 373ff986f2..0000000000 Binary files a/graphics/pokemon/flaaffy/front.png and /dev/null differ diff --git a/graphics/pokemon/flaaffy/normal.pal b/graphics/pokemon/flaaffy/normal.pal index 9b67813424..5dd45e400e 100644 --- a/graphics/pokemon/flaaffy/normal.pal +++ b/graphics/pokemon/flaaffy/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -176 176 208 -248 248 248 -128 112 136 -200 216 240 +189 189 213 +255 255 255 +131 115 139 +222 230 246 16 16 16 -72 72 88 -208 96 120 -248 176 200 -248 136 152 -248 200 208 -136 32 48 -64 112 168 -80 128 192 -128 192 248 -40 64 136 +74 74 90 +222 65 98 +255 164 164 +255 115 115 +255 189 189 +164 0 16 +82 131 197 +82 131 197 +131 197 255 +41 65 139 diff --git a/graphics/pokemon/flabebe/back.png b/graphics/pokemon/flabebe/back.png index 143601c63f..9a2a8367a7 100644 Binary files a/graphics/pokemon/flabebe/back.png and b/graphics/pokemon/flabebe/back.png differ diff --git a/graphics/pokemon/flabebe/blue_flower/icon.png b/graphics/pokemon/flabebe/blue_flower/icon.png index 3f354f4f14..bdac1f46ed 100644 Binary files a/graphics/pokemon/flabebe/blue_flower/icon.png and b/graphics/pokemon/flabebe/blue_flower/icon.png differ diff --git a/graphics/pokemon/flabebe/front.png b/graphics/pokemon/flabebe/front.png deleted file mode 100644 index 835047c90f..0000000000 Binary files a/graphics/pokemon/flabebe/front.png and /dev/null differ diff --git a/graphics/pokemon/flabebe/orange_flower/icon.png b/graphics/pokemon/flabebe/orange_flower/icon.png index 39ce13bf2d..1c34927aa1 100644 Binary files a/graphics/pokemon/flabebe/orange_flower/icon.png and b/graphics/pokemon/flabebe/orange_flower/icon.png differ diff --git a/graphics/pokemon/flabebe/white_flower/icon.png b/graphics/pokemon/flabebe/white_flower/icon.png index ac706407af..85aebadd1f 100644 Binary files a/graphics/pokemon/flabebe/white_flower/icon.png and b/graphics/pokemon/flabebe/white_flower/icon.png differ diff --git a/graphics/pokemon/flabebe/yellow_flower/icon.png b/graphics/pokemon/flabebe/yellow_flower/icon.png index a1cef6e262..2ad8437e3e 100644 Binary files a/graphics/pokemon/flabebe/yellow_flower/icon.png and b/graphics/pokemon/flabebe/yellow_flower/icon.png differ diff --git a/graphics/pokemon/flareon/front.png b/graphics/pokemon/flareon/front.png deleted file mode 100644 index 40ef80eea5..0000000000 Binary files a/graphics/pokemon/flareon/front.png and /dev/null differ diff --git a/graphics/pokemon/flareon/icon.png b/graphics/pokemon/flareon/icon.png index 96092e7eef..92f4dad532 100644 Binary files a/graphics/pokemon/flareon/icon.png and b/graphics/pokemon/flareon/icon.png differ diff --git a/graphics/pokemon/fletchinder/front.png b/graphics/pokemon/fletchinder/front.png deleted file mode 100644 index 86ff4500f0..0000000000 Binary files a/graphics/pokemon/fletchinder/front.png and /dev/null differ diff --git a/graphics/pokemon/fletchling/front.png b/graphics/pokemon/fletchling/front.png deleted file mode 100644 index 53713836d0..0000000000 Binary files a/graphics/pokemon/fletchling/front.png and /dev/null differ diff --git a/graphics/pokemon/floatzel/front.png b/graphics/pokemon/floatzel/front.png deleted file mode 100644 index 6ff6ec1362..0000000000 Binary files a/graphics/pokemon/floatzel/front.png and /dev/null differ diff --git a/graphics/pokemon/floette/blue_flower/icon.png b/graphics/pokemon/floette/blue_flower/icon.png index 734c6eb4aa..aa2227c430 100644 Binary files a/graphics/pokemon/floette/blue_flower/icon.png and b/graphics/pokemon/floette/blue_flower/icon.png differ diff --git a/graphics/pokemon/floette/eternal_flower/back.png b/graphics/pokemon/floette/eternal_flower/back.png index edcf0ef2cc..4501207211 100644 Binary files a/graphics/pokemon/floette/eternal_flower/back.png and b/graphics/pokemon/floette/eternal_flower/back.png differ diff --git a/graphics/pokemon/floette/eternal_flower/front.png b/graphics/pokemon/floette/eternal_flower/front.png index 56d9a71669..5d0a8c7df7 100644 Binary files a/graphics/pokemon/floette/eternal_flower/front.png and b/graphics/pokemon/floette/eternal_flower/front.png differ diff --git a/graphics/pokemon/floette/eternal_flower/icon.png b/graphics/pokemon/floette/eternal_flower/icon.png index 42931825ce..a1e0d3c513 100644 Binary files a/graphics/pokemon/floette/eternal_flower/icon.png and b/graphics/pokemon/floette/eternal_flower/icon.png differ diff --git a/graphics/pokemon/floette/front.png b/graphics/pokemon/floette/front.png deleted file mode 100644 index d8d85450b4..0000000000 Binary files a/graphics/pokemon/floette/front.png and /dev/null differ diff --git a/graphics/pokemon/floette/orange_flower/icon.png b/graphics/pokemon/floette/orange_flower/icon.png index 3c839277cd..07b6d9a09a 100644 Binary files a/graphics/pokemon/floette/orange_flower/icon.png and b/graphics/pokemon/floette/orange_flower/icon.png differ diff --git a/graphics/pokemon/floette/white_flower/icon.png b/graphics/pokemon/floette/white_flower/icon.png index a1975ff134..5c86b26345 100644 Binary files a/graphics/pokemon/floette/white_flower/icon.png and b/graphics/pokemon/floette/white_flower/icon.png differ diff --git a/graphics/pokemon/floette/yellow_flower/icon.png b/graphics/pokemon/floette/yellow_flower/icon.png index 4a9dc42571..29049f106a 100644 Binary files a/graphics/pokemon/floette/yellow_flower/icon.png and b/graphics/pokemon/floette/yellow_flower/icon.png differ diff --git a/graphics/pokemon/florges/back.png b/graphics/pokemon/florges/back.png index d1515c2aec..d0d918fab2 100644 Binary files a/graphics/pokemon/florges/back.png and b/graphics/pokemon/florges/back.png differ diff --git a/graphics/pokemon/florges/blue_flower/icon.png b/graphics/pokemon/florges/blue_flower/icon.png index d0dc98cb1f..8a4743f4f5 100644 Binary files a/graphics/pokemon/florges/blue_flower/icon.png and b/graphics/pokemon/florges/blue_flower/icon.png differ diff --git a/graphics/pokemon/florges/front.png b/graphics/pokemon/florges/front.png deleted file mode 100644 index fe77fe4e68..0000000000 Binary files a/graphics/pokemon/florges/front.png and /dev/null differ diff --git a/graphics/pokemon/florges/orange_flower/icon.png b/graphics/pokemon/florges/orange_flower/icon.png index 5bcb76de35..a8239748c4 100644 Binary files a/graphics/pokemon/florges/orange_flower/icon.png and b/graphics/pokemon/florges/orange_flower/icon.png differ diff --git a/graphics/pokemon/florges/white_flower/icon.png b/graphics/pokemon/florges/white_flower/icon.png index 06cccec6c5..11b04c54e0 100644 Binary files a/graphics/pokemon/florges/white_flower/icon.png and b/graphics/pokemon/florges/white_flower/icon.png differ diff --git a/graphics/pokemon/florges/yellow_flower/icon.png b/graphics/pokemon/florges/yellow_flower/icon.png index c3a5716077..8fab7804fc 100644 Binary files a/graphics/pokemon/florges/yellow_flower/icon.png and b/graphics/pokemon/florges/yellow_flower/icon.png differ diff --git a/graphics/pokemon/flygon/front.png b/graphics/pokemon/flygon/front.png deleted file mode 100644 index 64b9467a5d..0000000000 Binary files a/graphics/pokemon/flygon/front.png and /dev/null differ diff --git a/graphics/pokemon/flygon/icon.png b/graphics/pokemon/flygon/icon.png index 10788b2253..f0c4e165ad 100644 Binary files a/graphics/pokemon/flygon/icon.png and b/graphics/pokemon/flygon/icon.png differ diff --git a/graphics/pokemon/foongus/front.png b/graphics/pokemon/foongus/front.png deleted file mode 100644 index 0d584f1da7..0000000000 Binary files a/graphics/pokemon/foongus/front.png and /dev/null differ diff --git a/graphics/pokemon/foongus/icon.png b/graphics/pokemon/foongus/icon.png index f6e6171a46..c6e4ab426b 100644 Binary files a/graphics/pokemon/foongus/icon.png and b/graphics/pokemon/foongus/icon.png differ diff --git a/graphics/pokemon/forretress/front.png b/graphics/pokemon/forretress/front.png deleted file mode 100644 index dde5eac09e..0000000000 Binary files a/graphics/pokemon/forretress/front.png and /dev/null differ diff --git a/graphics/pokemon/fraxure/front.png b/graphics/pokemon/fraxure/front.png deleted file mode 100644 index 5171acb525..0000000000 Binary files a/graphics/pokemon/fraxure/front.png and /dev/null differ diff --git a/graphics/pokemon/frillish/front.png b/graphics/pokemon/frillish/front.png deleted file mode 100644 index cd48a39ac9..0000000000 Binary files a/graphics/pokemon/frillish/front.png and /dev/null differ diff --git a/graphics/pokemon/froakie/front.png b/graphics/pokemon/froakie/front.png deleted file mode 100644 index aa16e31205..0000000000 Binary files a/graphics/pokemon/froakie/front.png and /dev/null differ diff --git a/graphics/pokemon/frogadier/front.png b/graphics/pokemon/frogadier/front.png deleted file mode 100644 index e99089269e..0000000000 Binary files a/graphics/pokemon/frogadier/front.png and /dev/null differ diff --git a/graphics/pokemon/froslass/front.png b/graphics/pokemon/froslass/front.png deleted file mode 100644 index 28597b4285..0000000000 Binary files a/graphics/pokemon/froslass/front.png and /dev/null differ diff --git a/graphics/pokemon/froslass/icon.png b/graphics/pokemon/froslass/icon.png index dfaec88ceb..2869fb8de1 100644 Binary files a/graphics/pokemon/froslass/icon.png and b/graphics/pokemon/froslass/icon.png differ diff --git a/graphics/pokemon/furfrou/dandy_trim/front.png b/graphics/pokemon/furfrou/dandy_trim/front.png deleted file mode 100644 index ffb12c4f0d..0000000000 Binary files a/graphics/pokemon/furfrou/dandy_trim/front.png and /dev/null differ diff --git a/graphics/pokemon/furfrou/dandy_trim/icon.png b/graphics/pokemon/furfrou/dandy_trim/icon.png index 86089db3c5..9e20ab1c40 100644 Binary files a/graphics/pokemon/furfrou/dandy_trim/icon.png and b/graphics/pokemon/furfrou/dandy_trim/icon.png differ diff --git a/graphics/pokemon/furfrou/debutante_trim/front.png b/graphics/pokemon/furfrou/debutante_trim/front.png deleted file mode 100644 index 2ccf422ae6..0000000000 Binary files a/graphics/pokemon/furfrou/debutante_trim/front.png and /dev/null differ diff --git a/graphics/pokemon/furfrou/debutante_trim/icon.png b/graphics/pokemon/furfrou/debutante_trim/icon.png index 05d1c448a5..04860b16d2 100644 Binary files a/graphics/pokemon/furfrou/debutante_trim/icon.png and b/graphics/pokemon/furfrou/debutante_trim/icon.png differ diff --git a/graphics/pokemon/furfrou/diamond_trim/front.png b/graphics/pokemon/furfrou/diamond_trim/front.png deleted file mode 100644 index 393a405888..0000000000 Binary files a/graphics/pokemon/furfrou/diamond_trim/front.png and /dev/null differ diff --git a/graphics/pokemon/furfrou/diamond_trim/icon.png b/graphics/pokemon/furfrou/diamond_trim/icon.png index 50934adad7..f5ce645e4e 100644 Binary files a/graphics/pokemon/furfrou/diamond_trim/icon.png and b/graphics/pokemon/furfrou/diamond_trim/icon.png differ diff --git a/graphics/pokemon/furfrou/front.png b/graphics/pokemon/furfrou/front.png deleted file mode 100644 index 037c54037a..0000000000 Binary files a/graphics/pokemon/furfrou/front.png and /dev/null differ diff --git a/graphics/pokemon/furfrou/heart_trim/front.png b/graphics/pokemon/furfrou/heart_trim/front.png deleted file mode 100644 index 17b2f3dbb6..0000000000 Binary files a/graphics/pokemon/furfrou/heart_trim/front.png and /dev/null differ diff --git a/graphics/pokemon/furfrou/heart_trim/icon.png b/graphics/pokemon/furfrou/heart_trim/icon.png index f8a6b1531a..70049dc53f 100644 Binary files a/graphics/pokemon/furfrou/heart_trim/icon.png and b/graphics/pokemon/furfrou/heart_trim/icon.png differ diff --git a/graphics/pokemon/furfrou/kabuki_trim/front.png b/graphics/pokemon/furfrou/kabuki_trim/front.png deleted file mode 100644 index c1efac1c08..0000000000 Binary files a/graphics/pokemon/furfrou/kabuki_trim/front.png and /dev/null differ diff --git a/graphics/pokemon/furfrou/kabuki_trim/icon.png b/graphics/pokemon/furfrou/kabuki_trim/icon.png index da2a254b63..bc81044fb0 100644 Binary files a/graphics/pokemon/furfrou/kabuki_trim/icon.png and b/graphics/pokemon/furfrou/kabuki_trim/icon.png differ diff --git a/graphics/pokemon/furfrou/la_reine_trim/front.png b/graphics/pokemon/furfrou/la_reine_trim/front.png deleted file mode 100644 index 7527d59eca..0000000000 Binary files a/graphics/pokemon/furfrou/la_reine_trim/front.png and /dev/null differ diff --git a/graphics/pokemon/furfrou/la_reine_trim/icon.png b/graphics/pokemon/furfrou/la_reine_trim/icon.png index 9a9881c194..4451c0c161 100644 Binary files a/graphics/pokemon/furfrou/la_reine_trim/icon.png and b/graphics/pokemon/furfrou/la_reine_trim/icon.png differ diff --git a/graphics/pokemon/furfrou/matron_trim/front.png b/graphics/pokemon/furfrou/matron_trim/front.png deleted file mode 100644 index afcb90c7a6..0000000000 Binary files a/graphics/pokemon/furfrou/matron_trim/front.png and /dev/null differ diff --git a/graphics/pokemon/furfrou/matron_trim/icon.png b/graphics/pokemon/furfrou/matron_trim/icon.png index b579007510..6d379a8cae 100644 Binary files a/graphics/pokemon/furfrou/matron_trim/icon.png and b/graphics/pokemon/furfrou/matron_trim/icon.png differ diff --git a/graphics/pokemon/furfrou/pharaoh_trim/front.png b/graphics/pokemon/furfrou/pharaoh_trim/front.png deleted file mode 100644 index 987c7a7a44..0000000000 Binary files a/graphics/pokemon/furfrou/pharaoh_trim/front.png and /dev/null differ diff --git a/graphics/pokemon/furfrou/pharaoh_trim/icon.png b/graphics/pokemon/furfrou/pharaoh_trim/icon.png index a54c766089..f674c8b47e 100644 Binary files a/graphics/pokemon/furfrou/pharaoh_trim/icon.png and b/graphics/pokemon/furfrou/pharaoh_trim/icon.png differ diff --git a/graphics/pokemon/furfrou/star_trim/front.png b/graphics/pokemon/furfrou/star_trim/front.png deleted file mode 100644 index a953143214..0000000000 Binary files a/graphics/pokemon/furfrou/star_trim/front.png and /dev/null differ diff --git a/graphics/pokemon/furfrou/star_trim/icon.png b/graphics/pokemon/furfrou/star_trim/icon.png index 90623f6d77..7d571808e9 100644 Binary files a/graphics/pokemon/furfrou/star_trim/icon.png and b/graphics/pokemon/furfrou/star_trim/icon.png differ diff --git a/graphics/pokemon/furret/anim_front.png b/graphics/pokemon/furret/anim_front.png index bd0119c568..6e84d74103 100644 Binary files a/graphics/pokemon/furret/anim_front.png and b/graphics/pokemon/furret/anim_front.png differ diff --git a/graphics/pokemon/furret/front.png b/graphics/pokemon/furret/front.png deleted file mode 100644 index bab4d95b6b..0000000000 Binary files a/graphics/pokemon/furret/front.png and /dev/null differ diff --git a/graphics/pokemon/furret/normal.pal b/graphics/pokemon/furret/normal.pal index 661f34207a..e1a23347b0 100644 --- a/graphics/pokemon/furret/normal.pal +++ b/graphics/pokemon/furret/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -80 40 32 -208 176 104 -120 64 56 -32 32 40 -192 152 64 -232 208 160 -152 96 72 -168 128 40 -248 248 192 -248 248 248 -112 112 112 -152 0 0 -248 144 96 +82 41 32 +230 197 74 +123 65 57 +32 32 41 +197 156 65 +255 238 148 +156 98 74 +172 131 41 +255 255 197 +255 255 255 +115 115 115 +156 0 0 +255 148 98 120 64 56 0 0 0 diff --git a/graphics/pokemon/gabite/front.png b/graphics/pokemon/gabite/front.png deleted file mode 100644 index 3495a5f183..0000000000 Binary files a/graphics/pokemon/gabite/front.png and /dev/null differ diff --git a/graphics/pokemon/gallade/front.png b/graphics/pokemon/gallade/front.png deleted file mode 100644 index 93f2001594..0000000000 Binary files a/graphics/pokemon/gallade/front.png and /dev/null differ diff --git a/graphics/pokemon/gallade/icon.png b/graphics/pokemon/gallade/icon.png index a31e02fbbb..fce5123d9b 100644 Binary files a/graphics/pokemon/gallade/icon.png and b/graphics/pokemon/gallade/icon.png differ diff --git a/graphics/pokemon/galvantula/back.png b/graphics/pokemon/galvantula/back.png index f15a60a3de..4d872ac6ba 100644 Binary files a/graphics/pokemon/galvantula/back.png and b/graphics/pokemon/galvantula/back.png differ diff --git a/graphics/pokemon/galvantula/front.png b/graphics/pokemon/galvantula/front.png deleted file mode 100644 index 980ca86f9f..0000000000 Binary files a/graphics/pokemon/galvantula/front.png and /dev/null differ diff --git a/graphics/pokemon/garbodor/front.png b/graphics/pokemon/garbodor/front.png deleted file mode 100644 index 959931034f..0000000000 Binary files a/graphics/pokemon/garbodor/front.png and /dev/null differ diff --git a/graphics/pokemon/garchomp/front.png b/graphics/pokemon/garchomp/front.png deleted file mode 100644 index e84e0270ff..0000000000 Binary files a/graphics/pokemon/garchomp/front.png and /dev/null differ diff --git a/graphics/pokemon/gardevoir/front.png b/graphics/pokemon/gardevoir/front.png deleted file mode 100644 index 2bfc838793..0000000000 Binary files a/graphics/pokemon/gardevoir/front.png and /dev/null differ diff --git a/graphics/pokemon/gastly/front.png b/graphics/pokemon/gastly/front.png deleted file mode 100644 index eca993908e..0000000000 Binary files a/graphics/pokemon/gastly/front.png and /dev/null differ diff --git a/graphics/pokemon/gastly/icon.png b/graphics/pokemon/gastly/icon.png index 7a28a0575e..a5dc4527d6 100644 Binary files a/graphics/pokemon/gastly/icon.png and b/graphics/pokemon/gastly/icon.png differ diff --git a/graphics/pokemon/gastrodon/east_sea/front.png b/graphics/pokemon/gastrodon/east_sea/front.png deleted file mode 100644 index ca68f56d3a..0000000000 Binary files a/graphics/pokemon/gastrodon/east_sea/front.png and /dev/null differ diff --git a/graphics/pokemon/gastrodon/east_sea/icon.png b/graphics/pokemon/gastrodon/east_sea/icon.png index 4eec76873c..33ba3c5c51 100644 Binary files a/graphics/pokemon/gastrodon/east_sea/icon.png and b/graphics/pokemon/gastrodon/east_sea/icon.png differ diff --git a/graphics/pokemon/gastrodon/front.png b/graphics/pokemon/gastrodon/front.png deleted file mode 100644 index b28352aed3..0000000000 Binary files a/graphics/pokemon/gastrodon/front.png and /dev/null differ diff --git a/graphics/pokemon/genesect/front.png b/graphics/pokemon/genesect/front.png deleted file mode 100644 index fff9ce8854..0000000000 Binary files a/graphics/pokemon/genesect/front.png and /dev/null differ diff --git a/graphics/pokemon/genesect/icon.png b/graphics/pokemon/genesect/icon.png index 6ab5e6f035..a448db6033 100644 Binary files a/graphics/pokemon/genesect/icon.png and b/graphics/pokemon/genesect/icon.png differ diff --git a/graphics/pokemon/gengar/front.png b/graphics/pokemon/gengar/front.png deleted file mode 100644 index 2c47843a26..0000000000 Binary files a/graphics/pokemon/gengar/front.png and /dev/null differ diff --git a/graphics/pokemon/geodude/back.png b/graphics/pokemon/geodude/back.png index 45eba4d1c5..bd2cbeac6c 100644 Binary files a/graphics/pokemon/geodude/back.png and b/graphics/pokemon/geodude/back.png differ diff --git a/graphics/pokemon/geodude/front.png b/graphics/pokemon/geodude/front.png deleted file mode 100644 index 8b94b33685..0000000000 Binary files a/graphics/pokemon/geodude/front.png and /dev/null differ diff --git a/graphics/pokemon/gible/front.png b/graphics/pokemon/gible/front.png deleted file mode 100644 index d3d5b48739..0000000000 Binary files a/graphics/pokemon/gible/front.png and /dev/null differ diff --git a/graphics/pokemon/gigalith/front.png b/graphics/pokemon/gigalith/front.png deleted file mode 100644 index 9cf2b04469..0000000000 Binary files a/graphics/pokemon/gigalith/front.png and /dev/null differ diff --git a/graphics/pokemon/girafarig/front.png b/graphics/pokemon/girafarig/front.png deleted file mode 100644 index 2a43c76e5d..0000000000 Binary files a/graphics/pokemon/girafarig/front.png and /dev/null differ diff --git a/graphics/pokemon/giratina/front.png b/graphics/pokemon/giratina/front.png deleted file mode 100644 index d0004746a9..0000000000 Binary files a/graphics/pokemon/giratina/front.png and /dev/null differ diff --git a/graphics/pokemon/giratina/icon.png b/graphics/pokemon/giratina/icon.png index 7a6ba19e98..235ea4721e 100644 Binary files a/graphics/pokemon/giratina/icon.png and b/graphics/pokemon/giratina/icon.png differ diff --git a/graphics/pokemon/giratina/origin/front.png b/graphics/pokemon/giratina/origin/front.png deleted file mode 100644 index 14f631d095..0000000000 Binary files a/graphics/pokemon/giratina/origin/front.png and /dev/null differ diff --git a/graphics/pokemon/glaceon/back.png b/graphics/pokemon/glaceon/back.png index 1f53435379..1acee66de9 100644 Binary files a/graphics/pokemon/glaceon/back.png and b/graphics/pokemon/glaceon/back.png differ diff --git a/graphics/pokemon/glaceon/front.png b/graphics/pokemon/glaceon/front.png deleted file mode 100644 index 463bd723d7..0000000000 Binary files a/graphics/pokemon/glaceon/front.png and /dev/null differ diff --git a/graphics/pokemon/glalie/front.png b/graphics/pokemon/glalie/front.png deleted file mode 100644 index cb6ecd4925..0000000000 Binary files a/graphics/pokemon/glalie/front.png and /dev/null differ diff --git a/graphics/pokemon/glameow/front.png b/graphics/pokemon/glameow/front.png deleted file mode 100644 index bd72d82c12..0000000000 Binary files a/graphics/pokemon/glameow/front.png and /dev/null differ diff --git a/graphics/pokemon/gligar/front.png b/graphics/pokemon/gligar/front.png deleted file mode 100644 index 5164cb452b..0000000000 Binary files a/graphics/pokemon/gligar/front.png and /dev/null differ diff --git a/graphics/pokemon/gliscor/front.png b/graphics/pokemon/gliscor/front.png deleted file mode 100644 index 24be705804..0000000000 Binary files a/graphics/pokemon/gliscor/front.png and /dev/null differ diff --git a/graphics/pokemon/gliscor/icon.png b/graphics/pokemon/gliscor/icon.png index deddd792df..74f4126d98 100644 Binary files a/graphics/pokemon/gliscor/icon.png and b/graphics/pokemon/gliscor/icon.png differ diff --git a/graphics/pokemon/gloom/front.png b/graphics/pokemon/gloom/front.png deleted file mode 100644 index dfadc6841f..0000000000 Binary files a/graphics/pokemon/gloom/front.png and /dev/null differ diff --git a/graphics/pokemon/gogoat/front.png b/graphics/pokemon/gogoat/front.png deleted file mode 100644 index 3653876d55..0000000000 Binary files a/graphics/pokemon/gogoat/front.png and /dev/null differ diff --git a/graphics/pokemon/golbat/front.png b/graphics/pokemon/golbat/front.png deleted file mode 100644 index a18aad3651..0000000000 Binary files a/graphics/pokemon/golbat/front.png and /dev/null differ diff --git a/graphics/pokemon/goldeen/front.png b/graphics/pokemon/goldeen/front.png deleted file mode 100644 index 4f4b6db939..0000000000 Binary files a/graphics/pokemon/goldeen/front.png and /dev/null differ diff --git a/graphics/pokemon/golduck/front.png b/graphics/pokemon/golduck/front.png deleted file mode 100644 index e670ad7519..0000000000 Binary files a/graphics/pokemon/golduck/front.png and /dev/null differ diff --git a/graphics/pokemon/golem/front.png b/graphics/pokemon/golem/front.png deleted file mode 100644 index d885469e2b..0000000000 Binary files a/graphics/pokemon/golem/front.png and /dev/null differ diff --git a/graphics/pokemon/golett/back.png b/graphics/pokemon/golett/back.png index d3b7ad67e3..5a2ae22088 100644 Binary files a/graphics/pokemon/golett/back.png and b/graphics/pokemon/golett/back.png differ diff --git a/graphics/pokemon/golett/front.png b/graphics/pokemon/golett/front.png deleted file mode 100644 index f58715bb95..0000000000 Binary files a/graphics/pokemon/golett/front.png and /dev/null differ diff --git a/graphics/pokemon/golett/icon.png b/graphics/pokemon/golett/icon.png index 20dd1f45ab..a351317489 100644 Binary files a/graphics/pokemon/golett/icon.png and b/graphics/pokemon/golett/icon.png differ diff --git a/graphics/pokemon/golurk/front.png b/graphics/pokemon/golurk/front.png deleted file mode 100644 index 225a6a1426..0000000000 Binary files a/graphics/pokemon/golurk/front.png and /dev/null differ diff --git a/graphics/pokemon/goodra/front.png b/graphics/pokemon/goodra/front.png deleted file mode 100644 index cb0b50ca94..0000000000 Binary files a/graphics/pokemon/goodra/front.png and /dev/null differ diff --git a/graphics/pokemon/goodra/hisuian/back.png b/graphics/pokemon/goodra/hisuian/back.png old mode 100644 new mode 100755 index a454fcde65..27025835f1 Binary files a/graphics/pokemon/goodra/hisuian/back.png and b/graphics/pokemon/goodra/hisuian/back.png differ diff --git a/graphics/pokemon/goodra/hisuian/front.png b/graphics/pokemon/goodra/hisuian/front.png old mode 100644 new mode 100755 index edd5e3c3ab..1b53bfacf3 Binary files a/graphics/pokemon/goodra/hisuian/front.png and b/graphics/pokemon/goodra/hisuian/front.png differ diff --git a/graphics/pokemon/goodra/hisuian/normal.pal b/graphics/pokemon/goodra/hisuian/normal.pal old mode 100644 new mode 100755 index 28da385cb0..846d1b0e29 --- a/graphics/pokemon/goodra/hisuian/normal.pal +++ b/graphics/pokemon/goodra/hisuian/normal.pal @@ -1,19 +1,19 @@ JASC-PAL 0100 16 -0 176 232 -128 96 112 -216 192 208 -136 136 136 -8 8 8 -240 240 240 -200 200 200 -168 152 168 -64 64 64 -176 176 176 -96 96 104 -136 104 168 -64 56 88 -168 152 192 -232 208 232 +152 208 160 +136 148 168 +192 204 224 +224 228 240 +80 96 112 16 16 16 +88 68 88 +192 168 200 +232 212 232 +136 108 144 +48 64 72 +248 252 248 +248 248 248 +64 60 88 +104 96 144 +144 132 200 diff --git a/graphics/pokemon/goodra/hisuian/shiny.pal b/graphics/pokemon/goodra/hisuian/shiny.pal old mode 100644 new mode 100755 index 73fd87e714..93612e407b --- a/graphics/pokemon/goodra/hisuian/shiny.pal +++ b/graphics/pokemon/goodra/hisuian/shiny.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -128 96 112 -216 192 208 -120 104 56 -8 8 8 -240 240 240 -200 176 88 -168 152 168 -56 40 32 -160 136 72 -80 64 40 -136 104 168 -64 56 88 -168 152 192 -232 208 232 +141 107 50 +184 139 71 +215 166 100 +101 80 35 16 16 16 +88 68 88 +192 168 200 +232 212 232 +136 108 144 +68 54 21 +248 252 248 +248 248 248 +64 60 88 +110 99 147 +144 132 200 diff --git a/graphics/pokemon/goomy/front.png b/graphics/pokemon/goomy/front.png deleted file mode 100644 index b61c3e2d37..0000000000 Binary files a/graphics/pokemon/goomy/front.png and /dev/null differ diff --git a/graphics/pokemon/gorebyss/front.png b/graphics/pokemon/gorebyss/front.png deleted file mode 100644 index 09a8a3587f..0000000000 Binary files a/graphics/pokemon/gorebyss/front.png and /dev/null differ diff --git a/graphics/pokemon/gothita/front.png b/graphics/pokemon/gothita/front.png deleted file mode 100644 index e7052bf8d0..0000000000 Binary files a/graphics/pokemon/gothita/front.png and /dev/null differ diff --git a/graphics/pokemon/gothita/icon.png b/graphics/pokemon/gothita/icon.png index 19da4895ba..8d280f5174 100644 Binary files a/graphics/pokemon/gothita/icon.png and b/graphics/pokemon/gothita/icon.png differ diff --git a/graphics/pokemon/gothitelle/front.png b/graphics/pokemon/gothitelle/front.png deleted file mode 100644 index 7178f82fbd..0000000000 Binary files a/graphics/pokemon/gothitelle/front.png and /dev/null differ diff --git a/graphics/pokemon/gothorita/front.png b/graphics/pokemon/gothorita/front.png deleted file mode 100644 index 7f6f074182..0000000000 Binary files a/graphics/pokemon/gothorita/front.png and /dev/null differ diff --git a/graphics/pokemon/gothorita/icon.png b/graphics/pokemon/gothorita/icon.png index d48dfbc966..9036dc6fc5 100644 Binary files a/graphics/pokemon/gothorita/icon.png and b/graphics/pokemon/gothorita/icon.png differ diff --git a/graphics/pokemon/gourgeist/back.png b/graphics/pokemon/gourgeist/back.png index b572c429ba..76da39f227 100644 Binary files a/graphics/pokemon/gourgeist/back.png and b/graphics/pokemon/gourgeist/back.png differ diff --git a/graphics/pokemon/gourgeist/front.png b/graphics/pokemon/gourgeist/front.png deleted file mode 100644 index 577d182b4e..0000000000 Binary files a/graphics/pokemon/gourgeist/front.png and /dev/null differ diff --git a/graphics/pokemon/gourgeist/large/back.png b/graphics/pokemon/gourgeist/large/back.png index 2d0751fa74..a84d9aa516 100644 Binary files a/graphics/pokemon/gourgeist/large/back.png and b/graphics/pokemon/gourgeist/large/back.png differ diff --git a/graphics/pokemon/gourgeist/large/front.png b/graphics/pokemon/gourgeist/large/front.png deleted file mode 100644 index 552cd4b881..0000000000 Binary files a/graphics/pokemon/gourgeist/large/front.png and /dev/null differ diff --git a/graphics/pokemon/gourgeist/small/back.png b/graphics/pokemon/gourgeist/small/back.png index 1865e7c27e..97a44f72bf 100644 Binary files a/graphics/pokemon/gourgeist/small/back.png and b/graphics/pokemon/gourgeist/small/back.png differ diff --git a/graphics/pokemon/gourgeist/small/front.png b/graphics/pokemon/gourgeist/small/front.png deleted file mode 100644 index b3b659bdf1..0000000000 Binary files a/graphics/pokemon/gourgeist/small/front.png and /dev/null differ diff --git a/graphics/pokemon/gourgeist/super/back.png b/graphics/pokemon/gourgeist/super/back.png index f669c4987f..3d6a97ef5f 100644 Binary files a/graphics/pokemon/gourgeist/super/back.png and b/graphics/pokemon/gourgeist/super/back.png differ diff --git a/graphics/pokemon/gourgeist/super/front.png b/graphics/pokemon/gourgeist/super/front.png deleted file mode 100644 index 14c8143d25..0000000000 Binary files a/graphics/pokemon/gourgeist/super/front.png and /dev/null differ diff --git a/graphics/pokemon/granbull/front.png b/graphics/pokemon/granbull/front.png deleted file mode 100644 index 9ad102c742..0000000000 Binary files a/graphics/pokemon/granbull/front.png and /dev/null differ diff --git a/graphics/pokemon/graveler/front.png b/graphics/pokemon/graveler/front.png deleted file mode 100644 index c6dcfbe9fb..0000000000 Binary files a/graphics/pokemon/graveler/front.png and /dev/null differ diff --git a/graphics/pokemon/greninja/ash/front.png b/graphics/pokemon/greninja/ash/front.png deleted file mode 100644 index a76b97dca9..0000000000 Binary files a/graphics/pokemon/greninja/ash/front.png and /dev/null differ diff --git a/graphics/pokemon/greninja/ash/icon.png b/graphics/pokemon/greninja/ash/icon.png index 5c096c1652..ac461847cc 100644 Binary files a/graphics/pokemon/greninja/ash/icon.png and b/graphics/pokemon/greninja/ash/icon.png differ diff --git a/graphics/pokemon/greninja/front.png b/graphics/pokemon/greninja/front.png deleted file mode 100644 index 81faac3bf7..0000000000 Binary files a/graphics/pokemon/greninja/front.png and /dev/null differ diff --git a/graphics/pokemon/grimer/front.png b/graphics/pokemon/grimer/front.png deleted file mode 100644 index b99fbb299c..0000000000 Binary files a/graphics/pokemon/grimer/front.png and /dev/null differ diff --git a/graphics/pokemon/grotle/front.png b/graphics/pokemon/grotle/front.png deleted file mode 100644 index f52ebe6d63..0000000000 Binary files a/graphics/pokemon/grotle/front.png and /dev/null differ diff --git a/graphics/pokemon/groudon/front.png b/graphics/pokemon/groudon/front.png deleted file mode 100644 index 56e10fbccb..0000000000 Binary files a/graphics/pokemon/groudon/front.png and /dev/null differ diff --git a/graphics/pokemon/groudon/icon.png b/graphics/pokemon/groudon/icon.png index 1c237537b6..69326145ca 100644 Binary files a/graphics/pokemon/groudon/icon.png and b/graphics/pokemon/groudon/icon.png differ diff --git a/graphics/pokemon/grovyle/front.png b/graphics/pokemon/grovyle/front.png deleted file mode 100644 index 8103062185..0000000000 Binary files a/graphics/pokemon/grovyle/front.png and /dev/null differ diff --git a/graphics/pokemon/growlithe/front.png b/graphics/pokemon/growlithe/front.png deleted file mode 100644 index b16a79c7bb..0000000000 Binary files a/graphics/pokemon/growlithe/front.png and /dev/null differ diff --git a/graphics/pokemon/growlithe/hisuian/back.png b/graphics/pokemon/growlithe/hisuian/back.png old mode 100644 new mode 100755 index 0ed279c6a5..16dcaefc38 Binary files a/graphics/pokemon/growlithe/hisuian/back.png and b/graphics/pokemon/growlithe/hisuian/back.png differ diff --git a/graphics/pokemon/growlithe/hisuian/front.png b/graphics/pokemon/growlithe/hisuian/front.png old mode 100644 new mode 100755 index c0d6232a95..7eea5e1cb3 Binary files a/graphics/pokemon/growlithe/hisuian/front.png and b/graphics/pokemon/growlithe/hisuian/front.png differ diff --git a/graphics/pokemon/growlithe/hisuian/normal.pal b/graphics/pokemon/growlithe/hisuian/normal.pal old mode 100644 new mode 100755 index e6d97462b5..da791d1d64 --- a/graphics/pokemon/growlithe/hisuian/normal.pal +++ b/graphics/pokemon/growlithe/hisuian/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -88 72 88 -200 192 184 +88 72 64 +240 232 224 +208 208 200 +168 156 144 16 16 16 -120 104 128 -104 16 8 -248 80 48 -184 32 32 -160 144 160 -112 96 32 -208 128 112 -184 152 120 -224 200 160 -72 72 72 -0 0 0 -16 0 0 +184 176 168 +184 64 56 +120 48 8 +208 104 64 +112 84 56 +48 60 64 +192 160 120 +248 252 240 +232 208 176 +216 220 208 diff --git a/graphics/pokemon/growlithe/hisuian/shiny.pal b/graphics/pokemon/growlithe/hisuian/shiny.pal old mode 100644 new mode 100755 index 3406fee673..e61a65a7a8 --- a/graphics/pokemon/growlithe/hisuian/shiny.pal +++ b/graphics/pokemon/growlithe/hisuian/shiny.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -112 104 96 -232 232 232 +88 72 64 +240 232 224 +208 208 200 +168 156 144 16 16 16 -160 152 144 -88 72 40 -232 184 128 -168 136 48 -208 200 192 -112 96 32 -208 128 112 -184 152 120 -224 200 160 -72 72 72 -0 0 0 -16 0 0 +184 176 168 +189 110 57 +120 48 8 +226 163 52 +112 84 56 +48 60 64 +192 160 120 +248 252 240 +232 208 176 +216 220 208 diff --git a/graphics/pokemon/grumpig/front.png b/graphics/pokemon/grumpig/front.png deleted file mode 100644 index c5b65ca3b3..0000000000 Binary files a/graphics/pokemon/grumpig/front.png and /dev/null differ diff --git a/graphics/pokemon/gulpin/front.png b/graphics/pokemon/gulpin/front.png deleted file mode 100644 index d1efac94dc..0000000000 Binary files a/graphics/pokemon/gulpin/front.png and /dev/null differ diff --git a/graphics/pokemon/gurdurr/back.png b/graphics/pokemon/gurdurr/back.png index 0230e7f888..9888f01b59 100644 Binary files a/graphics/pokemon/gurdurr/back.png and b/graphics/pokemon/gurdurr/back.png differ diff --git a/graphics/pokemon/gurdurr/front.png b/graphics/pokemon/gurdurr/front.png deleted file mode 100644 index 710ec3b85e..0000000000 Binary files a/graphics/pokemon/gurdurr/front.png and /dev/null differ diff --git a/graphics/pokemon/gurdurr/icon.png b/graphics/pokemon/gurdurr/icon.png index 5808e6c6a7..b445d735c2 100644 Binary files a/graphics/pokemon/gurdurr/icon.png and b/graphics/pokemon/gurdurr/icon.png differ diff --git a/graphics/pokemon/gyarados/front.png b/graphics/pokemon/gyarados/front.png deleted file mode 100644 index 3c0edf57d6..0000000000 Binary files a/graphics/pokemon/gyarados/front.png and /dev/null differ diff --git a/graphics/pokemon/gyarados/icon.png b/graphics/pokemon/gyarados/icon.png index 889943b04f..41ccb5aee2 100644 Binary files a/graphics/pokemon/gyarados/icon.png and b/graphics/pokemon/gyarados/icon.png differ diff --git a/graphics/pokemon/happiny/front.png b/graphics/pokemon/happiny/front.png deleted file mode 100644 index 547c652edf..0000000000 Binary files a/graphics/pokemon/happiny/front.png and /dev/null differ diff --git a/graphics/pokemon/hariyama/anim_front.png b/graphics/pokemon/hariyama/anim_front.png index 7b55b728e8..751b2cac4d 100644 Binary files a/graphics/pokemon/hariyama/anim_front.png and b/graphics/pokemon/hariyama/anim_front.png differ diff --git a/graphics/pokemon/hariyama/front.png b/graphics/pokemon/hariyama/front.png deleted file mode 100644 index 4a21a2a0b1..0000000000 Binary files a/graphics/pokemon/hariyama/front.png and /dev/null differ diff --git a/graphics/pokemon/hariyama/normal.pal b/graphics/pokemon/hariyama/normal.pal index 6ed6659127..c6cfb9da7a 100644 --- a/graphics/pokemon/hariyama/normal.pal +++ b/graphics/pokemon/hariyama/normal.pal @@ -11,8 +11,8 @@ JASC-PAL 246 230 197 230 213 164 57 65 106 -139 106 82 98 98 148 +139 106 82 255 255 255 172 123 74 255 213 123 diff --git a/graphics/pokemon/haunter/front.png b/graphics/pokemon/haunter/front.png deleted file mode 100644 index f9434ad095..0000000000 Binary files a/graphics/pokemon/haunter/front.png and /dev/null differ diff --git a/graphics/pokemon/haunter/icon.png b/graphics/pokemon/haunter/icon.png index 6de8948505..ea52910dd7 100644 Binary files a/graphics/pokemon/haunter/icon.png and b/graphics/pokemon/haunter/icon.png differ diff --git a/graphics/pokemon/hawlucha/front.png b/graphics/pokemon/hawlucha/front.png deleted file mode 100644 index 5293bee357..0000000000 Binary files a/graphics/pokemon/hawlucha/front.png and /dev/null differ diff --git a/graphics/pokemon/haxorus/front.png b/graphics/pokemon/haxorus/front.png deleted file mode 100644 index e5c216c130..0000000000 Binary files a/graphics/pokemon/haxorus/front.png and /dev/null differ diff --git a/graphics/pokemon/heatmor/front.png b/graphics/pokemon/heatmor/front.png deleted file mode 100644 index 0b912da48b..0000000000 Binary files a/graphics/pokemon/heatmor/front.png and /dev/null differ diff --git a/graphics/pokemon/heatran/front.png b/graphics/pokemon/heatran/front.png deleted file mode 100644 index e446b445dc..0000000000 Binary files a/graphics/pokemon/heatran/front.png and /dev/null differ diff --git a/graphics/pokemon/heliolisk/front.png b/graphics/pokemon/heliolisk/front.png deleted file mode 100644 index 4ec5b5c22b..0000000000 Binary files a/graphics/pokemon/heliolisk/front.png and /dev/null differ diff --git a/graphics/pokemon/helioptile/front.png b/graphics/pokemon/helioptile/front.png deleted file mode 100644 index a487179801..0000000000 Binary files a/graphics/pokemon/helioptile/front.png and /dev/null differ diff --git a/graphics/pokemon/heracross/front.png b/graphics/pokemon/heracross/front.png deleted file mode 100644 index db9b244da3..0000000000 Binary files a/graphics/pokemon/heracross/front.png and /dev/null differ diff --git a/graphics/pokemon/herdier/front.png b/graphics/pokemon/herdier/front.png deleted file mode 100644 index b28db7c319..0000000000 Binary files a/graphics/pokemon/herdier/front.png and /dev/null differ diff --git a/graphics/pokemon/hippopotas/front.png b/graphics/pokemon/hippopotas/front.png deleted file mode 100644 index ea6fc85848..0000000000 Binary files a/graphics/pokemon/hippopotas/front.png and /dev/null differ diff --git a/graphics/pokemon/hippowdon/back.png b/graphics/pokemon/hippowdon/back.png index f6a4cbf28c..b2f8daff38 100644 Binary files a/graphics/pokemon/hippowdon/back.png and b/graphics/pokemon/hippowdon/back.png differ diff --git a/graphics/pokemon/hippowdon/front.png b/graphics/pokemon/hippowdon/front.png deleted file mode 100644 index 3dd7b8f84c..0000000000 Binary files a/graphics/pokemon/hippowdon/front.png and /dev/null differ diff --git a/graphics/pokemon/hitmonchan/back.png b/graphics/pokemon/hitmonchan/back.png index 229bf0da89..d87ab20f74 100644 Binary files a/graphics/pokemon/hitmonchan/back.png and b/graphics/pokemon/hitmonchan/back.png differ diff --git a/graphics/pokemon/hitmonchan/front.png b/graphics/pokemon/hitmonchan/front.png deleted file mode 100644 index 0721d04c05..0000000000 Binary files a/graphics/pokemon/hitmonchan/front.png and /dev/null differ diff --git a/graphics/pokemon/hitmonlee/front.png b/graphics/pokemon/hitmonlee/front.png deleted file mode 100644 index 080b6fd7bf..0000000000 Binary files a/graphics/pokemon/hitmonlee/front.png and /dev/null differ diff --git a/graphics/pokemon/hitmontop/front.png b/graphics/pokemon/hitmontop/front.png deleted file mode 100644 index 28118af282..0000000000 Binary files a/graphics/pokemon/hitmontop/front.png and /dev/null differ diff --git a/graphics/pokemon/hitmontop/icon.png b/graphics/pokemon/hitmontop/icon.png index a2af3bd248..7f8d63f915 100644 Binary files a/graphics/pokemon/hitmontop/icon.png and b/graphics/pokemon/hitmontop/icon.png differ diff --git a/graphics/pokemon/ho_oh/front.png b/graphics/pokemon/ho_oh/front.png deleted file mode 100644 index 4c32adca93..0000000000 Binary files a/graphics/pokemon/ho_oh/front.png and /dev/null differ diff --git a/graphics/pokemon/ho_oh/icon.png b/graphics/pokemon/ho_oh/icon.png index 7a7ce8af61..315683cc5e 100644 Binary files a/graphics/pokemon/ho_oh/icon.png and b/graphics/pokemon/ho_oh/icon.png differ diff --git a/graphics/pokemon/honchkrow/front.png b/graphics/pokemon/honchkrow/front.png deleted file mode 100644 index 9681f682fb..0000000000 Binary files a/graphics/pokemon/honchkrow/front.png and /dev/null differ diff --git a/graphics/pokemon/honedge/front.png b/graphics/pokemon/honedge/front.png deleted file mode 100644 index 923e4563dc..0000000000 Binary files a/graphics/pokemon/honedge/front.png and /dev/null differ diff --git a/graphics/pokemon/hoopa/back.png b/graphics/pokemon/hoopa/back.png index a3d76883c7..64912b3236 100644 Binary files a/graphics/pokemon/hoopa/back.png and b/graphics/pokemon/hoopa/back.png differ diff --git a/graphics/pokemon/hoopa/footprint.png b/graphics/pokemon/hoopa/footprint.png index b7c5cea6a7..90b2344967 100644 Binary files a/graphics/pokemon/hoopa/footprint.png and b/graphics/pokemon/hoopa/footprint.png differ diff --git a/graphics/pokemon/hoopa/front.png b/graphics/pokemon/hoopa/front.png deleted file mode 100644 index 2f463cdbc7..0000000000 Binary files a/graphics/pokemon/hoopa/front.png and /dev/null differ diff --git a/graphics/pokemon/hoopa/unbound/front.png b/graphics/pokemon/hoopa/unbound/front.png deleted file mode 100644 index 2df1d6a203..0000000000 Binary files a/graphics/pokemon/hoopa/unbound/front.png and /dev/null differ diff --git a/graphics/pokemon/hoopa/unbound/icon.png b/graphics/pokemon/hoopa/unbound/icon.png index ca3bd77644..4c77ca1e2c 100644 Binary files a/graphics/pokemon/hoopa/unbound/icon.png and b/graphics/pokemon/hoopa/unbound/icon.png differ diff --git a/graphics/pokemon/hoothoot/anim_front.png b/graphics/pokemon/hoothoot/anim_front.png index 585fc6518a..e25d4a4fc7 100644 Binary files a/graphics/pokemon/hoothoot/anim_front.png and b/graphics/pokemon/hoothoot/anim_front.png differ diff --git a/graphics/pokemon/hoothoot/front.png b/graphics/pokemon/hoothoot/front.png deleted file mode 100644 index 0cc0353801..0000000000 Binary files a/graphics/pokemon/hoothoot/front.png and /dev/null differ diff --git a/graphics/pokemon/hoothoot/normal.pal b/graphics/pokemon/hoothoot/normal.pal index 213e6acaa0..7254298343 100644 --- a/graphics/pokemon/hoothoot/normal.pal +++ b/graphics/pokemon/hoothoot/normal.pal @@ -3,17 +3,17 @@ JASC-PAL 16 152 208 160 16 16 16 -64 64 64 -152 104 48 -120 88 80 -80 48 0 -184 136 64 -200 160 120 -104 48 24 -184 88 40 -240 96 48 -232 168 144 -216 184 152 -248 224 192 -248 248 248 -120 120 120 +65 65 65 +156 106 49 +115 74 24 +82 49 0 +189 139 65 +205 164 123 +106 49 24 +189 90 41 +246 98 49 +238 172 148 +222 189 156 +255 230 197 +255 255 255 +123 123 123 diff --git a/graphics/pokemon/hoppip/front.png b/graphics/pokemon/hoppip/front.png deleted file mode 100644 index 42f0e5c8e6..0000000000 Binary files a/graphics/pokemon/hoppip/front.png and /dev/null differ diff --git a/graphics/pokemon/hoppip/icon.png b/graphics/pokemon/hoppip/icon.png index 8a9b708343..ba010a3653 100644 Binary files a/graphics/pokemon/hoppip/icon.png and b/graphics/pokemon/hoppip/icon.png differ diff --git a/graphics/pokemon/horsea/front.png b/graphics/pokemon/horsea/front.png deleted file mode 100644 index 5ea743f224..0000000000 Binary files a/graphics/pokemon/horsea/front.png and /dev/null differ diff --git a/graphics/pokemon/houndoom/front.png b/graphics/pokemon/houndoom/front.png deleted file mode 100644 index 8ebef8181f..0000000000 Binary files a/graphics/pokemon/houndoom/front.png and /dev/null differ diff --git a/graphics/pokemon/houndour/front.png b/graphics/pokemon/houndour/front.png deleted file mode 100644 index 39d1ce9742..0000000000 Binary files a/graphics/pokemon/houndour/front.png and /dev/null differ diff --git a/graphics/pokemon/huntail/front.png b/graphics/pokemon/huntail/front.png deleted file mode 100644 index 9a5c28850b..0000000000 Binary files a/graphics/pokemon/huntail/front.png and /dev/null differ diff --git a/graphics/pokemon/huntail/icon.png b/graphics/pokemon/huntail/icon.png index 0aa9a4055f..42a800657e 100644 Binary files a/graphics/pokemon/huntail/icon.png and b/graphics/pokemon/huntail/icon.png differ diff --git a/graphics/pokemon/hydreigon/front.png b/graphics/pokemon/hydreigon/front.png deleted file mode 100644 index 68aa66cd87..0000000000 Binary files a/graphics/pokemon/hydreigon/front.png and /dev/null differ diff --git a/graphics/pokemon/hydreigon/icon.png b/graphics/pokemon/hydreigon/icon.png index 50e9b60a95..540b136372 100644 Binary files a/graphics/pokemon/hydreigon/icon.png and b/graphics/pokemon/hydreigon/icon.png differ diff --git a/graphics/pokemon/hypno/front.png b/graphics/pokemon/hypno/front.png deleted file mode 100644 index 391eaba230..0000000000 Binary files a/graphics/pokemon/hypno/front.png and /dev/null differ diff --git a/graphics/pokemon/hypno/icon.png b/graphics/pokemon/hypno/icon.png index d9e0d83341..647e829d3f 100644 Binary files a/graphics/pokemon/hypno/icon.png and b/graphics/pokemon/hypno/icon.png differ diff --git a/graphics/pokemon/igglybuff/anim_front.png b/graphics/pokemon/igglybuff/anim_front.png index e96608aa13..79068d36f6 100644 Binary files a/graphics/pokemon/igglybuff/anim_front.png and b/graphics/pokemon/igglybuff/anim_front.png differ diff --git a/graphics/pokemon/igglybuff/front.png b/graphics/pokemon/igglybuff/front.png deleted file mode 100644 index 2d0dad2a89..0000000000 Binary files a/graphics/pokemon/igglybuff/front.png and /dev/null differ diff --git a/graphics/pokemon/igglybuff/normal.pal b/graphics/pokemon/igglybuff/normal.pal index 4bf00fcd79..c0e93f53e7 100644 --- a/graphics/pokemon/igglybuff/normal.pal +++ b/graphics/pokemon/igglybuff/normal.pal @@ -2,17 +2,17 @@ JASC-PAL 0100 16 152 208 160 -136 64 64 -248 200 208 -248 168 184 -200 104 96 +156 24 82 +255 205 213 +255 172 189 +180 82 115 16 16 16 -240 120 144 -224 40 16 -136 0 0 -248 248 248 -184 0 0 -128 0 0 +230 131 156 +230 41 16 +139 0 0 +255 255 255 +189 0 0 +139 0 0 0 0 0 0 0 0 0 0 0 diff --git a/graphics/pokemon/illumise/front.png b/graphics/pokemon/illumise/front.png deleted file mode 100644 index f91f5c9355..0000000000 Binary files a/graphics/pokemon/illumise/front.png and /dev/null differ diff --git a/graphics/pokemon/infernape/front.png b/graphics/pokemon/infernape/front.png deleted file mode 100644 index 6bb4d332cf..0000000000 Binary files a/graphics/pokemon/infernape/front.png and /dev/null differ diff --git a/graphics/pokemon/infernape/icon.png b/graphics/pokemon/infernape/icon.png index 6c16698646..8eb9e955c6 100644 Binary files a/graphics/pokemon/infernape/icon.png and b/graphics/pokemon/infernape/icon.png differ diff --git a/graphics/pokemon/inkay/front.png b/graphics/pokemon/inkay/front.png deleted file mode 100644 index 2fca9044a2..0000000000 Binary files a/graphics/pokemon/inkay/front.png and /dev/null differ diff --git a/graphics/pokemon/ivysaur/front.png b/graphics/pokemon/ivysaur/front.png deleted file mode 100644 index 4259abad05..0000000000 Binary files a/graphics/pokemon/ivysaur/front.png and /dev/null differ diff --git a/graphics/pokemon/jellicent/backf.png b/graphics/pokemon/jellicent/backf.png index 6471d3bacb..f6f0b06058 100644 Binary files a/graphics/pokemon/jellicent/backf.png and b/graphics/pokemon/jellicent/backf.png differ diff --git a/graphics/pokemon/jellicent/front.png b/graphics/pokemon/jellicent/front.png deleted file mode 100644 index 584c7f09b8..0000000000 Binary files a/graphics/pokemon/jellicent/front.png and /dev/null differ diff --git a/graphics/pokemon/jellicent/icon.png b/graphics/pokemon/jellicent/icon.png index 3b508d92ca..0a6f313cec 100644 Binary files a/graphics/pokemon/jellicent/icon.png and b/graphics/pokemon/jellicent/icon.png differ diff --git a/graphics/pokemon/jellicent/iconf.png b/graphics/pokemon/jellicent/iconf.png index a6abfa5ce5..f9caf9f13f 100644 Binary files a/graphics/pokemon/jellicent/iconf.png and b/graphics/pokemon/jellicent/iconf.png differ diff --git a/graphics/pokemon/jigglypuff/back.png b/graphics/pokemon/jigglypuff/back.png index a51544283b..1cf980c173 100644 Binary files a/graphics/pokemon/jigglypuff/back.png and b/graphics/pokemon/jigglypuff/back.png differ diff --git a/graphics/pokemon/jigglypuff/front.png b/graphics/pokemon/jigglypuff/front.png deleted file mode 100644 index af3a2d78bd..0000000000 Binary files a/graphics/pokemon/jigglypuff/front.png and /dev/null differ diff --git a/graphics/pokemon/jirachi/front.png b/graphics/pokemon/jirachi/front.png deleted file mode 100644 index 0d94f9c435..0000000000 Binary files a/graphics/pokemon/jirachi/front.png and /dev/null differ diff --git a/graphics/pokemon/jolteon/front.png b/graphics/pokemon/jolteon/front.png deleted file mode 100644 index 92ee1f72cc..0000000000 Binary files a/graphics/pokemon/jolteon/front.png and /dev/null differ diff --git a/graphics/pokemon/joltik/front.png b/graphics/pokemon/joltik/front.png deleted file mode 100644 index 845a9a1047..0000000000 Binary files a/graphics/pokemon/joltik/front.png and /dev/null differ diff --git a/graphics/pokemon/jumpluff/front.png b/graphics/pokemon/jumpluff/front.png deleted file mode 100644 index 3a09227418..0000000000 Binary files a/graphics/pokemon/jumpluff/front.png and /dev/null differ diff --git a/graphics/pokemon/jynx/front.png b/graphics/pokemon/jynx/front.png deleted file mode 100644 index 430f9ad28f..0000000000 Binary files a/graphics/pokemon/jynx/front.png and /dev/null differ diff --git a/graphics/pokemon/kabuto/front.png b/graphics/pokemon/kabuto/front.png deleted file mode 100644 index 47d4d3df89..0000000000 Binary files a/graphics/pokemon/kabuto/front.png and /dev/null differ diff --git a/graphics/pokemon/kabutops/front.png b/graphics/pokemon/kabutops/front.png deleted file mode 100644 index d89cb33cae..0000000000 Binary files a/graphics/pokemon/kabutops/front.png and /dev/null differ diff --git a/graphics/pokemon/kadabra/front.png b/graphics/pokemon/kadabra/front.png deleted file mode 100644 index db50edf46e..0000000000 Binary files a/graphics/pokemon/kadabra/front.png and /dev/null differ diff --git a/graphics/pokemon/kakuna/front.png b/graphics/pokemon/kakuna/front.png deleted file mode 100644 index 0115ad4f9f..0000000000 Binary files a/graphics/pokemon/kakuna/front.png and /dev/null differ diff --git a/graphics/pokemon/kangaskhan/front.png b/graphics/pokemon/kangaskhan/front.png deleted file mode 100644 index ba1d27af69..0000000000 Binary files a/graphics/pokemon/kangaskhan/front.png and /dev/null differ diff --git a/graphics/pokemon/karrablast/front.png b/graphics/pokemon/karrablast/front.png deleted file mode 100644 index 4d2edf923b..0000000000 Binary files a/graphics/pokemon/karrablast/front.png and /dev/null differ diff --git a/graphics/pokemon/karrablast/icon.png b/graphics/pokemon/karrablast/icon.png index f155236f28..9db6f2f4d3 100644 Binary files a/graphics/pokemon/karrablast/icon.png and b/graphics/pokemon/karrablast/icon.png differ diff --git a/graphics/pokemon/kecleon/front.png b/graphics/pokemon/kecleon/front.png deleted file mode 100644 index 2674a0d165..0000000000 Binary files a/graphics/pokemon/kecleon/front.png and /dev/null differ diff --git a/graphics/pokemon/keldeo/front.png b/graphics/pokemon/keldeo/front.png deleted file mode 100644 index ffc17bf57c..0000000000 Binary files a/graphics/pokemon/keldeo/front.png and /dev/null differ diff --git a/graphics/pokemon/keldeo/icon.png b/graphics/pokemon/keldeo/icon.png index 4d8c580f22..a7b3f96ab5 100644 Binary files a/graphics/pokemon/keldeo/icon.png and b/graphics/pokemon/keldeo/icon.png differ diff --git a/graphics/pokemon/keldeo/resolute/back.png b/graphics/pokemon/keldeo/resolute/back.png index bce78acd9a..28654de7dd 100644 Binary files a/graphics/pokemon/keldeo/resolute/back.png and b/graphics/pokemon/keldeo/resolute/back.png differ diff --git a/graphics/pokemon/keldeo/resolute/icon.png b/graphics/pokemon/keldeo/resolute/icon.png index 7170972902..8da8ea26c8 100644 Binary files a/graphics/pokemon/keldeo/resolute/icon.png and b/graphics/pokemon/keldeo/resolute/icon.png differ diff --git a/graphics/pokemon/kingdra/front.png b/graphics/pokemon/kingdra/front.png deleted file mode 100644 index bdce13253d..0000000000 Binary files a/graphics/pokemon/kingdra/front.png and /dev/null differ diff --git a/graphics/pokemon/kingdra/icon.png b/graphics/pokemon/kingdra/icon.png index 02fdc71252..0873dedb4f 100644 Binary files a/graphics/pokemon/kingdra/icon.png and b/graphics/pokemon/kingdra/icon.png differ diff --git a/graphics/pokemon/kingler/front.png b/graphics/pokemon/kingler/front.png deleted file mode 100644 index 50c9aa102e..0000000000 Binary files a/graphics/pokemon/kingler/front.png and /dev/null differ diff --git a/graphics/pokemon/kingler/icon.png b/graphics/pokemon/kingler/icon.png index 34a7299060..3f9d0b8b78 100644 Binary files a/graphics/pokemon/kingler/icon.png and b/graphics/pokemon/kingler/icon.png differ diff --git a/graphics/pokemon/kirlia/front.png b/graphics/pokemon/kirlia/front.png deleted file mode 100644 index c1858f7697..0000000000 Binary files a/graphics/pokemon/kirlia/front.png and /dev/null differ diff --git a/graphics/pokemon/klang/front.png b/graphics/pokemon/klang/front.png deleted file mode 100644 index 6cfd82984d..0000000000 Binary files a/graphics/pokemon/klang/front.png and /dev/null differ diff --git a/graphics/pokemon/klefki/front.png b/graphics/pokemon/klefki/front.png deleted file mode 100644 index 3f3e4db3b0..0000000000 Binary files a/graphics/pokemon/klefki/front.png and /dev/null differ diff --git a/graphics/pokemon/klink/front.png b/graphics/pokemon/klink/front.png deleted file mode 100644 index 3af6a70b0b..0000000000 Binary files a/graphics/pokemon/klink/front.png and /dev/null differ diff --git a/graphics/pokemon/klinklang/front.png b/graphics/pokemon/klinklang/front.png deleted file mode 100644 index f49e126ee4..0000000000 Binary files a/graphics/pokemon/klinklang/front.png and /dev/null differ diff --git a/graphics/pokemon/koffing/front.png b/graphics/pokemon/koffing/front.png deleted file mode 100644 index 621724a6ed..0000000000 Binary files a/graphics/pokemon/koffing/front.png and /dev/null differ diff --git a/graphics/pokemon/koffing/icon.png b/graphics/pokemon/koffing/icon.png index dbd1d77c8c..0c5b361502 100644 Binary files a/graphics/pokemon/koffing/icon.png and b/graphics/pokemon/koffing/icon.png differ diff --git a/graphics/pokemon/krabby/front.png b/graphics/pokemon/krabby/front.png deleted file mode 100644 index 31b8a2215c..0000000000 Binary files a/graphics/pokemon/krabby/front.png and /dev/null differ diff --git a/graphics/pokemon/krabby/icon.png b/graphics/pokemon/krabby/icon.png index 46eff557d9..8cedc348d0 100644 Binary files a/graphics/pokemon/krabby/icon.png and b/graphics/pokemon/krabby/icon.png differ diff --git a/graphics/pokemon/kricketot/anim_frontf.png b/graphics/pokemon/kricketot/anim_frontf.png index 86b2f773a5..f7403b91c8 100644 Binary files a/graphics/pokemon/kricketot/anim_frontf.png and b/graphics/pokemon/kricketot/anim_frontf.png differ diff --git a/graphics/pokemon/kricketot/backf.png b/graphics/pokemon/kricketot/backf.png index 9bafab8796..7726df0d68 100644 Binary files a/graphics/pokemon/kricketot/backf.png and b/graphics/pokemon/kricketot/backf.png differ diff --git a/graphics/pokemon/kricketot/front.png b/graphics/pokemon/kricketot/front.png deleted file mode 100644 index e158a0a796..0000000000 Binary files a/graphics/pokemon/kricketot/front.png and /dev/null differ diff --git a/graphics/pokemon/kricketune/front.png b/graphics/pokemon/kricketune/front.png deleted file mode 100644 index 65de302a53..0000000000 Binary files a/graphics/pokemon/kricketune/front.png and /dev/null differ diff --git a/graphics/pokemon/krokorok/front.png b/graphics/pokemon/krokorok/front.png deleted file mode 100644 index ab3c240f17..0000000000 Binary files a/graphics/pokemon/krokorok/front.png and /dev/null differ diff --git a/graphics/pokemon/krookodile/front.png b/graphics/pokemon/krookodile/front.png deleted file mode 100644 index 3654e8360b..0000000000 Binary files a/graphics/pokemon/krookodile/front.png and /dev/null differ diff --git a/graphics/pokemon/kyogre/front.png b/graphics/pokemon/kyogre/front.png deleted file mode 100644 index 59ceadbf77..0000000000 Binary files a/graphics/pokemon/kyogre/front.png and /dev/null differ diff --git a/graphics/pokemon/kyurem/black/front.png b/graphics/pokemon/kyurem/black/front.png deleted file mode 100644 index 45b31238fd..0000000000 Binary files a/graphics/pokemon/kyurem/black/front.png and /dev/null differ diff --git a/graphics/pokemon/kyurem/front.png b/graphics/pokemon/kyurem/front.png deleted file mode 100644 index c558f91723..0000000000 Binary files a/graphics/pokemon/kyurem/front.png and /dev/null differ diff --git a/graphics/pokemon/kyurem/icon.png b/graphics/pokemon/kyurem/icon.png index 6e7f6c7842..9883000b01 100644 Binary files a/graphics/pokemon/kyurem/icon.png and b/graphics/pokemon/kyurem/icon.png differ diff --git a/graphics/pokemon/kyurem/white/front.png b/graphics/pokemon/kyurem/white/front.png deleted file mode 100644 index 7b587c7d20..0000000000 Binary files a/graphics/pokemon/kyurem/white/front.png and /dev/null differ diff --git a/graphics/pokemon/lairon/front.png b/graphics/pokemon/lairon/front.png deleted file mode 100644 index de830e3064..0000000000 Binary files a/graphics/pokemon/lairon/front.png and /dev/null differ diff --git a/graphics/pokemon/lairon/icon.png b/graphics/pokemon/lairon/icon.png index 24bea9dfdc..27cb6edaa3 100644 Binary files a/graphics/pokemon/lairon/icon.png and b/graphics/pokemon/lairon/icon.png differ diff --git a/graphics/pokemon/lampent/front.png b/graphics/pokemon/lampent/front.png deleted file mode 100644 index 2d249ae93e..0000000000 Binary files a/graphics/pokemon/lampent/front.png and /dev/null differ diff --git a/graphics/pokemon/landorus/front.png b/graphics/pokemon/landorus/front.png deleted file mode 100644 index e16bea46b6..0000000000 Binary files a/graphics/pokemon/landorus/front.png and /dev/null differ diff --git a/graphics/pokemon/landorus/icon.png b/graphics/pokemon/landorus/icon.png index b86a7cf7a8..4b2ec8d4f7 100644 Binary files a/graphics/pokemon/landorus/icon.png and b/graphics/pokemon/landorus/icon.png differ diff --git a/graphics/pokemon/landorus/therian/front.png b/graphics/pokemon/landorus/therian/front.png deleted file mode 100644 index 47f617e4f0..0000000000 Binary files a/graphics/pokemon/landorus/therian/front.png and /dev/null differ diff --git a/graphics/pokemon/lanturn/anim_front.png b/graphics/pokemon/lanturn/anim_front.png index 69166b66bc..b84c0a77fd 100644 Binary files a/graphics/pokemon/lanturn/anim_front.png and b/graphics/pokemon/lanturn/anim_front.png differ diff --git a/graphics/pokemon/lanturn/front.png b/graphics/pokemon/lanturn/front.png deleted file mode 100644 index d178870590..0000000000 Binary files a/graphics/pokemon/lanturn/front.png and /dev/null differ diff --git a/graphics/pokemon/lanturn/normal.pal b/graphics/pokemon/lanturn/normal.pal index 792d90f29e..377916306e 100644 --- a/graphics/pokemon/lanturn/normal.pal +++ b/graphics/pokemon/lanturn/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -136 120 88 -248 216 96 -224 184 48 -88 112 192 -144 160 224 -176 136 32 -48 56 96 -120 152 216 -16 16 16 -248 248 248 -80 64 40 -184 192 232 -160 48 72 -232 96 88 -168 0 0 +123 98 74 +255 222 98 +230 180 82 +74 123 205 +123 172 238 +172 148 65 +41 49 115 +98 148 230 +0 0 0 +255 255 255 +65 49 16 +164 205 255 +164 49 74 +238 98 90 +164 49 74 diff --git a/graphics/pokemon/lapras/back.png b/graphics/pokemon/lapras/back.png index 3d336d51a7..60d5f840d3 100644 Binary files a/graphics/pokemon/lapras/back.png and b/graphics/pokemon/lapras/back.png differ diff --git a/graphics/pokemon/lapras/front.png b/graphics/pokemon/lapras/front.png deleted file mode 100644 index d02409eb99..0000000000 Binary files a/graphics/pokemon/lapras/front.png and /dev/null differ diff --git a/graphics/pokemon/larvesta/front.png b/graphics/pokemon/larvesta/front.png deleted file mode 100644 index b2e83baacf..0000000000 Binary files a/graphics/pokemon/larvesta/front.png and /dev/null differ diff --git a/graphics/pokemon/larvesta/icon.png b/graphics/pokemon/larvesta/icon.png index 1a710b2522..8050f8bfdf 100644 Binary files a/graphics/pokemon/larvesta/icon.png and b/graphics/pokemon/larvesta/icon.png differ diff --git a/graphics/pokemon/larvitar/back.png b/graphics/pokemon/larvitar/back.png index 1a05a964ad..2facd5cb5e 100644 Binary files a/graphics/pokemon/larvitar/back.png and b/graphics/pokemon/larvitar/back.png differ diff --git a/graphics/pokemon/larvitar/front.png b/graphics/pokemon/larvitar/front.png deleted file mode 100644 index 1974d28431..0000000000 Binary files a/graphics/pokemon/larvitar/front.png and /dev/null differ diff --git a/graphics/pokemon/latias/front.png b/graphics/pokemon/latias/front.png deleted file mode 100644 index cb84e81c03..0000000000 Binary files a/graphics/pokemon/latias/front.png and /dev/null differ diff --git a/graphics/pokemon/latias/icon.png b/graphics/pokemon/latias/icon.png index d67b91b858..9c79f1e187 100644 Binary files a/graphics/pokemon/latias/icon.png and b/graphics/pokemon/latias/icon.png differ diff --git a/graphics/pokemon/latios/front.png b/graphics/pokemon/latios/front.png deleted file mode 100644 index 283e968b70..0000000000 Binary files a/graphics/pokemon/latios/front.png and /dev/null differ diff --git a/graphics/pokemon/latios/icon.png b/graphics/pokemon/latios/icon.png index 95590eb52d..d63fb4710e 100644 Binary files a/graphics/pokemon/latios/icon.png and b/graphics/pokemon/latios/icon.png differ diff --git a/graphics/pokemon/leafeon/front.png b/graphics/pokemon/leafeon/front.png deleted file mode 100644 index 7ea19f1b55..0000000000 Binary files a/graphics/pokemon/leafeon/front.png and /dev/null differ diff --git a/graphics/pokemon/leafeon/icon.png b/graphics/pokemon/leafeon/icon.png index dd446932be..2aabf80257 100644 Binary files a/graphics/pokemon/leafeon/icon.png and b/graphics/pokemon/leafeon/icon.png differ diff --git a/graphics/pokemon/leavanny/front.png b/graphics/pokemon/leavanny/front.png deleted file mode 100644 index fe45f277db..0000000000 Binary files a/graphics/pokemon/leavanny/front.png and /dev/null differ diff --git a/graphics/pokemon/ledian/anim_front.png b/graphics/pokemon/ledian/anim_front.png index 57d90f93be..c866d2769f 100644 Binary files a/graphics/pokemon/ledian/anim_front.png and b/graphics/pokemon/ledian/anim_front.png differ diff --git a/graphics/pokemon/ledian/front.png b/graphics/pokemon/ledian/front.png deleted file mode 100644 index a51f2884e9..0000000000 Binary files a/graphics/pokemon/ledian/front.png and /dev/null differ diff --git a/graphics/pokemon/ledian/normal.pal b/graphics/pokemon/ledian/normal.pal index 370e37e2c5..8e4f8a63af 100644 --- a/graphics/pokemon/ledian/normal.pal +++ b/graphics/pokemon/ledian/normal.pal @@ -3,17 +3,17 @@ JASC-PAL 16 152 208 160 16 16 16 -80 80 80 -192 56 88 -248 128 128 -112 32 16 -248 72 64 -0 64 112 +82 82 82 +197 57 90 +255 131 131 +115 32 16 +255 74 65 +0 16 90 248 248 248 -0 128 184 -176 176 176 -160 120 0 -200 176 56 -240 224 112 -208 208 208 +0 106 222 +180 180 180 +164 123 0 +205 180 57 +246 230 115 +213 213 213 80 80 80 diff --git a/graphics/pokemon/ledyba/anim_front.png b/graphics/pokemon/ledyba/anim_front.png index 38bdd1df2e..4239a27760 100644 Binary files a/graphics/pokemon/ledyba/anim_front.png and b/graphics/pokemon/ledyba/anim_front.png differ diff --git a/graphics/pokemon/ledyba/front.png b/graphics/pokemon/ledyba/front.png deleted file mode 100644 index 10e52bbc70..0000000000 Binary files a/graphics/pokemon/ledyba/front.png and /dev/null differ diff --git a/graphics/pokemon/ledyba/normal.pal b/graphics/pokemon/ledyba/normal.pal index eb13383dae..cb287fc017 100644 --- a/graphics/pokemon/ledyba/normal.pal +++ b/graphics/pokemon/ledyba/normal.pal @@ -3,17 +3,17 @@ JASC-PAL 16 152 208 160 16 16 16 -88 80 80 -104 40 24 -176 64 48 -240 88 24 -248 152 32 -208 200 200 -248 248 248 -168 160 160 -208 176 120 -248 224 152 -248 248 184 -160 120 0 -104 96 176 -72 48 112 +90 82 82 +106 41 24 +180 65 49 +246 90 24 +255 156 32 +213 205 205 +255 255 255 +172 164 164 +213 180 123 +255 230 156 +255 255 189 +164 123 0 +106 98 180 +74 49 115 diff --git a/graphics/pokemon/lickilicky/front.png b/graphics/pokemon/lickilicky/front.png deleted file mode 100644 index e9905f1a65..0000000000 Binary files a/graphics/pokemon/lickilicky/front.png and /dev/null differ diff --git a/graphics/pokemon/lickitung/front.png b/graphics/pokemon/lickitung/front.png deleted file mode 100644 index 6a7177e793..0000000000 Binary files a/graphics/pokemon/lickitung/front.png and /dev/null differ diff --git a/graphics/pokemon/liepard/front.png b/graphics/pokemon/liepard/front.png deleted file mode 100644 index 2a9d2abca2..0000000000 Binary files a/graphics/pokemon/liepard/front.png and /dev/null differ diff --git a/graphics/pokemon/lileep/front.png b/graphics/pokemon/lileep/front.png deleted file mode 100644 index 21f36a6ea4..0000000000 Binary files a/graphics/pokemon/lileep/front.png and /dev/null differ diff --git a/graphics/pokemon/lileep/icon.png b/graphics/pokemon/lileep/icon.png index 0f3132ed43..034453bf99 100644 Binary files a/graphics/pokemon/lileep/icon.png and b/graphics/pokemon/lileep/icon.png differ diff --git a/graphics/pokemon/lilligant/front.png b/graphics/pokemon/lilligant/front.png deleted file mode 100644 index 170a97c170..0000000000 Binary files a/graphics/pokemon/lilligant/front.png and /dev/null differ diff --git a/graphics/pokemon/lillipup/front.png b/graphics/pokemon/lillipup/front.png deleted file mode 100644 index 50bf52ed15..0000000000 Binary files a/graphics/pokemon/lillipup/front.png and /dev/null differ diff --git a/graphics/pokemon/linoone/front.png b/graphics/pokemon/linoone/front.png deleted file mode 100644 index 955510bdd5..0000000000 Binary files a/graphics/pokemon/linoone/front.png and /dev/null differ diff --git a/graphics/pokemon/litleo/front.png b/graphics/pokemon/litleo/front.png deleted file mode 100644 index c34e0b74b2..0000000000 Binary files a/graphics/pokemon/litleo/front.png and /dev/null differ diff --git a/graphics/pokemon/litwick/front.png b/graphics/pokemon/litwick/front.png deleted file mode 100644 index e0b19ccb67..0000000000 Binary files a/graphics/pokemon/litwick/front.png and /dev/null differ diff --git a/graphics/pokemon/lombre/front.png b/graphics/pokemon/lombre/front.png deleted file mode 100644 index 022c1c0081..0000000000 Binary files a/graphics/pokemon/lombre/front.png and /dev/null differ diff --git a/graphics/pokemon/lopunny/front.png b/graphics/pokemon/lopunny/front.png deleted file mode 100644 index 44e188d0fd..0000000000 Binary files a/graphics/pokemon/lopunny/front.png and /dev/null differ diff --git a/graphics/pokemon/lotad/front.png b/graphics/pokemon/lotad/front.png deleted file mode 100644 index efc92a04b8..0000000000 Binary files a/graphics/pokemon/lotad/front.png and /dev/null differ diff --git a/graphics/pokemon/loudred/front.png b/graphics/pokemon/loudred/front.png deleted file mode 100644 index 29c1e1bafd..0000000000 Binary files a/graphics/pokemon/loudred/front.png and /dev/null differ diff --git a/graphics/pokemon/lucario/back.png b/graphics/pokemon/lucario/back.png index d8063193d6..24e8a60236 100644 Binary files a/graphics/pokemon/lucario/back.png and b/graphics/pokemon/lucario/back.png differ diff --git a/graphics/pokemon/lucario/front.png b/graphics/pokemon/lucario/front.png deleted file mode 100644 index c4b7a41c2d..0000000000 Binary files a/graphics/pokemon/lucario/front.png and /dev/null differ diff --git a/graphics/pokemon/ludicolo/front.png b/graphics/pokemon/ludicolo/front.png deleted file mode 100644 index 98ac428186..0000000000 Binary files a/graphics/pokemon/ludicolo/front.png and /dev/null differ diff --git a/graphics/pokemon/lugia/front.png b/graphics/pokemon/lugia/front.png deleted file mode 100644 index 124a6f626e..0000000000 Binary files a/graphics/pokemon/lugia/front.png and /dev/null differ diff --git a/graphics/pokemon/lugia/icon.png b/graphics/pokemon/lugia/icon.png index 17a3aaf746..fda93844ee 100644 Binary files a/graphics/pokemon/lugia/icon.png and b/graphics/pokemon/lugia/icon.png differ diff --git a/graphics/pokemon/lumineon/front.png b/graphics/pokemon/lumineon/front.png deleted file mode 100644 index 3aae9837fd..0000000000 Binary files a/graphics/pokemon/lumineon/front.png and /dev/null differ diff --git a/graphics/pokemon/lunatone/front.png b/graphics/pokemon/lunatone/front.png deleted file mode 100644 index 279f1578d1..0000000000 Binary files a/graphics/pokemon/lunatone/front.png and /dev/null differ diff --git a/graphics/pokemon/luvdisc/front.png b/graphics/pokemon/luvdisc/front.png deleted file mode 100644 index 24ac5a6f93..0000000000 Binary files a/graphics/pokemon/luvdisc/front.png and /dev/null differ diff --git a/graphics/pokemon/luxio/back.png b/graphics/pokemon/luxio/back.png index b86883b1f4..8ee3ca65bb 100644 Binary files a/graphics/pokemon/luxio/back.png and b/graphics/pokemon/luxio/back.png differ diff --git a/graphics/pokemon/luxio/front.png b/graphics/pokemon/luxio/front.png deleted file mode 100644 index f8a883afcb..0000000000 Binary files a/graphics/pokemon/luxio/front.png and /dev/null differ diff --git a/graphics/pokemon/luxray/back.png b/graphics/pokemon/luxray/back.png index 005e8e5a58..b8625a41a0 100644 Binary files a/graphics/pokemon/luxray/back.png and b/graphics/pokemon/luxray/back.png differ diff --git a/graphics/pokemon/luxray/front.png b/graphics/pokemon/luxray/front.png deleted file mode 100644 index 12381ea362..0000000000 Binary files a/graphics/pokemon/luxray/front.png and /dev/null differ diff --git a/graphics/pokemon/luxray/icon.png b/graphics/pokemon/luxray/icon.png index 20d02d897a..9514dbc9b2 100644 Binary files a/graphics/pokemon/luxray/icon.png and b/graphics/pokemon/luxray/icon.png differ diff --git a/graphics/pokemon/lycanroc/dusk/front.png b/graphics/pokemon/lycanroc/dusk/front.png index 772f59c6a8..0784c7bafd 100644 Binary files a/graphics/pokemon/lycanroc/dusk/front.png and b/graphics/pokemon/lycanroc/dusk/front.png differ diff --git a/graphics/pokemon/lycanroc/midnight/front.png b/graphics/pokemon/lycanroc/midnight/front.png index 1c4059d903..2a792d2afb 100644 Binary files a/graphics/pokemon/lycanroc/midnight/front.png and b/graphics/pokemon/lycanroc/midnight/front.png differ diff --git a/graphics/pokemon/machamp/front.png b/graphics/pokemon/machamp/front.png deleted file mode 100644 index 205ae86402..0000000000 Binary files a/graphics/pokemon/machamp/front.png and /dev/null differ diff --git a/graphics/pokemon/machoke/front.png b/graphics/pokemon/machoke/front.png deleted file mode 100644 index 509b980e29..0000000000 Binary files a/graphics/pokemon/machoke/front.png and /dev/null differ diff --git a/graphics/pokemon/machop/front.png b/graphics/pokemon/machop/front.png deleted file mode 100644 index 867cb8c3fc..0000000000 Binary files a/graphics/pokemon/machop/front.png and /dev/null differ diff --git a/graphics/pokemon/magby/front.png b/graphics/pokemon/magby/front.png deleted file mode 100644 index 389af0d033..0000000000 Binary files a/graphics/pokemon/magby/front.png and /dev/null differ diff --git a/graphics/pokemon/magcargo/front.png b/graphics/pokemon/magcargo/front.png deleted file mode 100644 index dda50c3f80..0000000000 Binary files a/graphics/pokemon/magcargo/front.png and /dev/null differ diff --git a/graphics/pokemon/magearna/back.png b/graphics/pokemon/magearna/back.png index c66e5f3a8f..e29c4ad6c5 100644 Binary files a/graphics/pokemon/magearna/back.png and b/graphics/pokemon/magearna/back.png differ diff --git a/graphics/pokemon/magearna/front.png b/graphics/pokemon/magearna/front.png index 18e73e31a0..20db67ab6e 100644 Binary files a/graphics/pokemon/magearna/front.png and b/graphics/pokemon/magearna/front.png differ diff --git a/graphics/pokemon/magearna/original_color/back.png b/graphics/pokemon/magearna/original_color/back.png index 7472bcbace..cf9c0e3236 100644 Binary files a/graphics/pokemon/magearna/original_color/back.png and b/graphics/pokemon/magearna/original_color/back.png differ diff --git a/graphics/pokemon/magearna/original_color/front.png b/graphics/pokemon/magearna/original_color/front.png index 4cc57d909e..afeb78daed 100644 Binary files a/graphics/pokemon/magearna/original_color/front.png and b/graphics/pokemon/magearna/original_color/front.png differ diff --git a/graphics/pokemon/magearna/original_color/icon.png b/graphics/pokemon/magearna/original_color/icon.png index a51a74e11e..057698e414 100644 Binary files a/graphics/pokemon/magearna/original_color/icon.png and b/graphics/pokemon/magearna/original_color/icon.png differ diff --git a/graphics/pokemon/magikarp/front.png b/graphics/pokemon/magikarp/front.png deleted file mode 100644 index 198730e7e0..0000000000 Binary files a/graphics/pokemon/magikarp/front.png and /dev/null differ diff --git a/graphics/pokemon/magmar/front.png b/graphics/pokemon/magmar/front.png deleted file mode 100644 index 85c08d04fd..0000000000 Binary files a/graphics/pokemon/magmar/front.png and /dev/null differ diff --git a/graphics/pokemon/magmortar/front.png b/graphics/pokemon/magmortar/front.png deleted file mode 100644 index 38f46e85e5..0000000000 Binary files a/graphics/pokemon/magmortar/front.png and /dev/null differ diff --git a/graphics/pokemon/magnemite/front.png b/graphics/pokemon/magnemite/front.png deleted file mode 100644 index b1e7dad9f0..0000000000 Binary files a/graphics/pokemon/magnemite/front.png and /dev/null differ diff --git a/graphics/pokemon/magnemite/icon.png b/graphics/pokemon/magnemite/icon.png index ffefd1a45b..95b81cae03 100644 Binary files a/graphics/pokemon/magnemite/icon.png and b/graphics/pokemon/magnemite/icon.png differ diff --git a/graphics/pokemon/magneton/front.png b/graphics/pokemon/magneton/front.png deleted file mode 100644 index 89642398ac..0000000000 Binary files a/graphics/pokemon/magneton/front.png and /dev/null differ diff --git a/graphics/pokemon/magneton/icon.png b/graphics/pokemon/magneton/icon.png index 733049b1d6..bde234ea11 100644 Binary files a/graphics/pokemon/magneton/icon.png and b/graphics/pokemon/magneton/icon.png differ diff --git a/graphics/pokemon/magnezone/front.png b/graphics/pokemon/magnezone/front.png deleted file mode 100644 index 1a2b3ff380..0000000000 Binary files a/graphics/pokemon/magnezone/front.png and /dev/null differ diff --git a/graphics/pokemon/makuhita/front.png b/graphics/pokemon/makuhita/front.png deleted file mode 100644 index 438ac8283e..0000000000 Binary files a/graphics/pokemon/makuhita/front.png and /dev/null differ diff --git a/graphics/pokemon/malamar/front.png b/graphics/pokemon/malamar/front.png deleted file mode 100644 index bbb95da6c5..0000000000 Binary files a/graphics/pokemon/malamar/front.png and /dev/null differ diff --git a/graphics/pokemon/mamoswine/front.png b/graphics/pokemon/mamoswine/front.png deleted file mode 100644 index 2b79456030..0000000000 Binary files a/graphics/pokemon/mamoswine/front.png and /dev/null differ diff --git a/graphics/pokemon/manaphy/front.png b/graphics/pokemon/manaphy/front.png deleted file mode 100644 index ed6a5e4b27..0000000000 Binary files a/graphics/pokemon/manaphy/front.png and /dev/null differ diff --git a/graphics/pokemon/manaphy/icon.png b/graphics/pokemon/manaphy/icon.png index 4c491d4865..97dbb79c00 100644 Binary files a/graphics/pokemon/manaphy/icon.png and b/graphics/pokemon/manaphy/icon.png differ diff --git a/graphics/pokemon/mandibuzz/front.png b/graphics/pokemon/mandibuzz/front.png deleted file mode 100644 index acd99e1e30..0000000000 Binary files a/graphics/pokemon/mandibuzz/front.png and /dev/null differ diff --git a/graphics/pokemon/manectric/front.png b/graphics/pokemon/manectric/front.png deleted file mode 100644 index c82e63447c..0000000000 Binary files a/graphics/pokemon/manectric/front.png and /dev/null differ diff --git a/graphics/pokemon/manectric/icon.png b/graphics/pokemon/manectric/icon.png index 5379bbafa1..5d7f3e9508 100644 Binary files a/graphics/pokemon/manectric/icon.png and b/graphics/pokemon/manectric/icon.png differ diff --git a/graphics/pokemon/mankey/front.png b/graphics/pokemon/mankey/front.png deleted file mode 100644 index 576a813eb7..0000000000 Binary files a/graphics/pokemon/mankey/front.png and /dev/null differ diff --git a/graphics/pokemon/mantine/front.png b/graphics/pokemon/mantine/front.png deleted file mode 100644 index ed3bd56b13..0000000000 Binary files a/graphics/pokemon/mantine/front.png and /dev/null differ diff --git a/graphics/pokemon/mantyke/front.png b/graphics/pokemon/mantyke/front.png deleted file mode 100644 index b06a66d0a4..0000000000 Binary files a/graphics/pokemon/mantyke/front.png and /dev/null differ diff --git a/graphics/pokemon/maractus/front.png b/graphics/pokemon/maractus/front.png deleted file mode 100644 index 3ba7400be9..0000000000 Binary files a/graphics/pokemon/maractus/front.png and /dev/null differ diff --git a/graphics/pokemon/mareep/anim_front.png b/graphics/pokemon/mareep/anim_front.png index 5c67de5094..47961b201a 100644 Binary files a/graphics/pokemon/mareep/anim_front.png and b/graphics/pokemon/mareep/anim_front.png differ diff --git a/graphics/pokemon/mareep/back.png b/graphics/pokemon/mareep/back.png index 027ad17ce9..c0d26a07b6 100644 Binary files a/graphics/pokemon/mareep/back.png and b/graphics/pokemon/mareep/back.png differ diff --git a/graphics/pokemon/mareep/front.png b/graphics/pokemon/mareep/front.png deleted file mode 100644 index 703f090662..0000000000 Binary files a/graphics/pokemon/mareep/front.png and /dev/null differ diff --git a/graphics/pokemon/mareep/normal.pal b/graphics/pokemon/mareep/normal.pal index eaefbe9350..c8e45e1a4d 100644 --- a/graphics/pokemon/mareep/normal.pal +++ b/graphics/pokemon/mareep/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -224 168 0 -200 176 136 -248 248 248 -248 216 0 -128 112 80 +230 172 0 +205 156 82 +255 255 255 +255 222 0 +156 98 32 16 16 16 -248 224 184 -224 200 160 -56 64 64 -224 168 16 -248 216 8 -136 144 144 -0 72 144 -80 128 184 -112 160 240 +255 255 189 +238 205 115 +82 82 82 +164 164 164 +180 123 0 +82 131 189 +0 74 148 +115 164 246 +98 148 222 diff --git a/graphics/pokemon/mareep/shiny.pal b/graphics/pokemon/mareep/shiny.pal index caa76333c1..de18d5b3bc 100644 --- a/graphics/pokemon/mareep/shiny.pal +++ b/graphics/pokemon/mareep/shiny.pal @@ -3,17 +3,17 @@ JASC-PAL 16 152 208 160 216 168 0 -200 144 176 +208 96 184 248 248 248 240 216 0 -152 80 120 +168 24 136 16 16 16 248 200 248 -224 176 216 +232 152 216 80 80 80 -216 168 0 -240 216 0 160 160 160 +168 120 0 +48 136 184 16 72 144 -48 144 192 -112 192 240 +128 192 240 +80 168 224 diff --git a/graphics/pokemon/marill/front.png b/graphics/pokemon/marill/front.png deleted file mode 100644 index d56a82fc4d..0000000000 Binary files a/graphics/pokemon/marill/front.png and /dev/null differ diff --git a/graphics/pokemon/marowak/front.png b/graphics/pokemon/marowak/front.png deleted file mode 100644 index 8d9488612d..0000000000 Binary files a/graphics/pokemon/marowak/front.png and /dev/null differ diff --git a/graphics/pokemon/marowak/icon.png b/graphics/pokemon/marowak/icon.png index a973897056..af56d377c5 100644 Binary files a/graphics/pokemon/marowak/icon.png and b/graphics/pokemon/marowak/icon.png differ diff --git a/graphics/pokemon/marshadow/front.png b/graphics/pokemon/marshadow/front.png deleted file mode 100644 index 14a1503bda..0000000000 Binary files a/graphics/pokemon/marshadow/front.png and /dev/null differ diff --git a/graphics/pokemon/marshtomp/back.png b/graphics/pokemon/marshtomp/back.png index b04c6cc5cb..baa4e481b4 100644 Binary files a/graphics/pokemon/marshtomp/back.png and b/graphics/pokemon/marshtomp/back.png differ diff --git a/graphics/pokemon/marshtomp/front.png b/graphics/pokemon/marshtomp/front.png deleted file mode 100644 index ead3658eda..0000000000 Binary files a/graphics/pokemon/marshtomp/front.png and /dev/null differ diff --git a/graphics/pokemon/masquerain/anim_front.png b/graphics/pokemon/masquerain/anim_front.png index 7508ae76d6..190c8d079d 100644 Binary files a/graphics/pokemon/masquerain/anim_front.png and b/graphics/pokemon/masquerain/anim_front.png differ diff --git a/graphics/pokemon/masquerain/front.png b/graphics/pokemon/masquerain/front.png deleted file mode 100644 index 853e08a172..0000000000 Binary files a/graphics/pokemon/masquerain/front.png and /dev/null differ diff --git a/graphics/pokemon/masquerain/normal.pal b/graphics/pokemon/masquerain/normal.pal index bd8d9c4c7c..3d0291badc 100644 --- a/graphics/pokemon/masquerain/normal.pal +++ b/graphics/pokemon/masquerain/normal.pal @@ -14,6 +14,6 @@ JASC-PAL 136 32 72 136 160 200 192 200 224 -16 16 16 224 104 40 248 144 96 +16 16 16 diff --git a/graphics/pokemon/mawile/front.png b/graphics/pokemon/mawile/front.png deleted file mode 100644 index 9f8bddbfd5..0000000000 Binary files a/graphics/pokemon/mawile/front.png and /dev/null differ diff --git a/graphics/pokemon/mawile/icon.png b/graphics/pokemon/mawile/icon.png index ea60047c8a..f6605a6470 100644 Binary files a/graphics/pokemon/mawile/icon.png and b/graphics/pokemon/mawile/icon.png differ diff --git a/graphics/pokemon/medicham/front.png b/graphics/pokemon/medicham/front.png deleted file mode 100644 index 63734b124b..0000000000 Binary files a/graphics/pokemon/medicham/front.png and /dev/null differ diff --git a/graphics/pokemon/medicham/icon.png b/graphics/pokemon/medicham/icon.png index 9e4bbc27cd..7988392838 100644 Binary files a/graphics/pokemon/medicham/icon.png and b/graphics/pokemon/medicham/icon.png differ diff --git a/graphics/pokemon/meditite/front.png b/graphics/pokemon/meditite/front.png deleted file mode 100644 index c1c0dcd06f..0000000000 Binary files a/graphics/pokemon/meditite/front.png and /dev/null differ diff --git a/graphics/pokemon/meganium/anim_front.png b/graphics/pokemon/meganium/anim_front.png index 6352e96e29..b89016f3c3 100644 Binary files a/graphics/pokemon/meganium/anim_front.png and b/graphics/pokemon/meganium/anim_front.png differ diff --git a/graphics/pokemon/meganium/front.png b/graphics/pokemon/meganium/front.png deleted file mode 100644 index 2a813e1188..0000000000 Binary files a/graphics/pokemon/meganium/front.png and /dev/null differ diff --git a/graphics/pokemon/meganium/icon.png b/graphics/pokemon/meganium/icon.png index e05a33daf8..d7d390fe9c 100644 Binary files a/graphics/pokemon/meganium/icon.png and b/graphics/pokemon/meganium/icon.png differ diff --git a/graphics/pokemon/meganium/normal.pal b/graphics/pokemon/meganium/normal.pal index d594136b80..75da9204bb 100644 --- a/graphics/pokemon/meganium/normal.pal +++ b/graphics/pokemon/meganium/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 248 192 248 -248 216 32 -96 72 0 -224 168 0 -152 168 80 -80 104 24 -208 232 136 -184 208 104 +255 222 32 +98 74 0 +230 172 0 +106 172 65 +16 115 41 +189 255 123 +139 222 49 16 16 16 -248 248 248 -248 56 88 -120 16 56 -240 160 152 -200 32 56 -200 200 200 -104 104 104 +255 255 255 +255 57 90 +123 16 57 +246 164 156 +205 32 57 +205 205 205 +106 106 106 diff --git a/graphics/pokemon/meloetta/front.png b/graphics/pokemon/meloetta/front.png deleted file mode 100644 index fad54a0b0b..0000000000 Binary files a/graphics/pokemon/meloetta/front.png and /dev/null differ diff --git a/graphics/pokemon/meloetta/icon.png b/graphics/pokemon/meloetta/icon.png index 376f3953a2..f640f80999 100644 Binary files a/graphics/pokemon/meloetta/icon.png and b/graphics/pokemon/meloetta/icon.png differ diff --git a/graphics/pokemon/meowstic/female/front.png b/graphics/pokemon/meowstic/female/front.png deleted file mode 100644 index d654468934..0000000000 Binary files a/graphics/pokemon/meowstic/female/front.png and /dev/null differ diff --git a/graphics/pokemon/meowstic/front.png b/graphics/pokemon/meowstic/front.png deleted file mode 100644 index 5ec230fb75..0000000000 Binary files a/graphics/pokemon/meowstic/front.png and /dev/null differ diff --git a/graphics/pokemon/meowth/front.png b/graphics/pokemon/meowth/front.png deleted file mode 100644 index 2b450d3dc7..0000000000 Binary files a/graphics/pokemon/meowth/front.png and /dev/null differ diff --git a/graphics/pokemon/meowth/icon.png b/graphics/pokemon/meowth/icon.png index b0a11aaddb..b721e3440e 100644 Binary files a/graphics/pokemon/meowth/icon.png and b/graphics/pokemon/meowth/icon.png differ diff --git a/graphics/pokemon/mesprit/front.png b/graphics/pokemon/mesprit/front.png deleted file mode 100644 index 0ca08f734d..0000000000 Binary files a/graphics/pokemon/mesprit/front.png and /dev/null differ diff --git a/graphics/pokemon/mesprit/icon.png b/graphics/pokemon/mesprit/icon.png index 86368bae24..2e5343d285 100644 Binary files a/graphics/pokemon/mesprit/icon.png and b/graphics/pokemon/mesprit/icon.png differ diff --git a/graphics/pokemon/metagross/front.png b/graphics/pokemon/metagross/front.png deleted file mode 100644 index 43a7625380..0000000000 Binary files a/graphics/pokemon/metagross/front.png and /dev/null differ diff --git a/graphics/pokemon/metagross/mega/back.png b/graphics/pokemon/metagross/mega/back.png index 00bfdd1818..86c2b6e145 100644 Binary files a/graphics/pokemon/metagross/mega/back.png and b/graphics/pokemon/metagross/mega/back.png differ diff --git a/graphics/pokemon/metagross/mega/front.png b/graphics/pokemon/metagross/mega/front.png index 6ed2cfbebc..1ebb0470aa 100644 Binary files a/graphics/pokemon/metagross/mega/front.png and b/graphics/pokemon/metagross/mega/front.png differ diff --git a/graphics/pokemon/metang/front.png b/graphics/pokemon/metang/front.png deleted file mode 100644 index da39985431..0000000000 Binary files a/graphics/pokemon/metang/front.png and /dev/null differ diff --git a/graphics/pokemon/metang/icon.png b/graphics/pokemon/metang/icon.png index 3916b65310..8d27afff4f 100644 Binary files a/graphics/pokemon/metang/icon.png and b/graphics/pokemon/metang/icon.png differ diff --git a/graphics/pokemon/metapod/front.png b/graphics/pokemon/metapod/front.png deleted file mode 100644 index cde83b1f0f..0000000000 Binary files a/graphics/pokemon/metapod/front.png and /dev/null differ diff --git a/graphics/pokemon/mew/front.png b/graphics/pokemon/mew/front.png deleted file mode 100644 index 9451dacfab..0000000000 Binary files a/graphics/pokemon/mew/front.png and /dev/null differ diff --git a/graphics/pokemon/mew/icon.png b/graphics/pokemon/mew/icon.png index 6e7175f437..d4b6ec9a72 100644 Binary files a/graphics/pokemon/mew/icon.png and b/graphics/pokemon/mew/icon.png differ diff --git a/graphics/pokemon/mewtwo/front.png b/graphics/pokemon/mewtwo/front.png deleted file mode 100644 index a725bdb4ab..0000000000 Binary files a/graphics/pokemon/mewtwo/front.png and /dev/null differ diff --git a/graphics/pokemon/mewtwo/icon.png b/graphics/pokemon/mewtwo/icon.png index 8463a04ddc..b0dc901658 100644 Binary files a/graphics/pokemon/mewtwo/icon.png and b/graphics/pokemon/mewtwo/icon.png differ diff --git a/graphics/pokemon/mienfoo/front.png b/graphics/pokemon/mienfoo/front.png deleted file mode 100644 index 51cc46adaf..0000000000 Binary files a/graphics/pokemon/mienfoo/front.png and /dev/null differ diff --git a/graphics/pokemon/mienfoo/icon.png b/graphics/pokemon/mienfoo/icon.png index b0a6ecf41f..e5c5367eef 100644 Binary files a/graphics/pokemon/mienfoo/icon.png and b/graphics/pokemon/mienfoo/icon.png differ diff --git a/graphics/pokemon/mienshao/front.png b/graphics/pokemon/mienshao/front.png deleted file mode 100644 index 6c1ca33a37..0000000000 Binary files a/graphics/pokemon/mienshao/front.png and /dev/null differ diff --git a/graphics/pokemon/mienshao/icon.png b/graphics/pokemon/mienshao/icon.png index d73849304a..ff001b212f 100644 Binary files a/graphics/pokemon/mienshao/icon.png and b/graphics/pokemon/mienshao/icon.png differ diff --git a/graphics/pokemon/mightyena/front.png b/graphics/pokemon/mightyena/front.png deleted file mode 100644 index e7ddfbcf77..0000000000 Binary files a/graphics/pokemon/mightyena/front.png and /dev/null differ diff --git a/graphics/pokemon/milotic/front.png b/graphics/pokemon/milotic/front.png deleted file mode 100644 index 08f338984f..0000000000 Binary files a/graphics/pokemon/milotic/front.png and /dev/null differ diff --git a/graphics/pokemon/milotic/icon.png b/graphics/pokemon/milotic/icon.png index 5caf28bad0..f67de29314 100644 Binary files a/graphics/pokemon/milotic/icon.png and b/graphics/pokemon/milotic/icon.png differ diff --git a/graphics/pokemon/miltank/front.png b/graphics/pokemon/miltank/front.png deleted file mode 100644 index 4ac2687e13..0000000000 Binary files a/graphics/pokemon/miltank/front.png and /dev/null differ diff --git a/graphics/pokemon/mime_jr/front.png b/graphics/pokemon/mime_jr/front.png deleted file mode 100644 index c3519f6c9f..0000000000 Binary files a/graphics/pokemon/mime_jr/front.png and /dev/null differ diff --git a/graphics/pokemon/mimikyu/busted/back.png b/graphics/pokemon/mimikyu/busted/back.png index 732fe12341..1d18044351 100644 Binary files a/graphics/pokemon/mimikyu/busted/back.png and b/graphics/pokemon/mimikyu/busted/back.png differ diff --git a/graphics/pokemon/mimikyu/busted/front.png b/graphics/pokemon/mimikyu/busted/front.png index c9c36c1f4e..09e78fac90 100644 Binary files a/graphics/pokemon/mimikyu/busted/front.png and b/graphics/pokemon/mimikyu/busted/front.png differ diff --git a/graphics/pokemon/mimikyu/busted/icon.png b/graphics/pokemon/mimikyu/busted/icon.png index 9a1cf38c4a..3ba567ab3b 100644 Binary files a/graphics/pokemon/mimikyu/busted/icon.png and b/graphics/pokemon/mimikyu/busted/icon.png differ diff --git a/graphics/pokemon/minccino/back.png b/graphics/pokemon/minccino/back.png index c2b32adba2..92eb266fd1 100644 Binary files a/graphics/pokemon/minccino/back.png and b/graphics/pokemon/minccino/back.png differ diff --git a/graphics/pokemon/minccino/front.png b/graphics/pokemon/minccino/front.png deleted file mode 100644 index a9b05cdc04..0000000000 Binary files a/graphics/pokemon/minccino/front.png and /dev/null differ diff --git a/graphics/pokemon/minccino/icon.png b/graphics/pokemon/minccino/icon.png index 27dd5405de..fbddf0e08a 100644 Binary files a/graphics/pokemon/minccino/icon.png and b/graphics/pokemon/minccino/icon.png differ diff --git a/graphics/pokemon/minior/core/back.png b/graphics/pokemon/minior/core/back.png index 6b0b565f42..af768d469c 100644 Binary files a/graphics/pokemon/minior/core/back.png and b/graphics/pokemon/minior/core/back.png differ diff --git a/graphics/pokemon/minior/core/blue/icon.png b/graphics/pokemon/minior/core/blue/icon.png index bda398288b..0dbb8fe0e7 100644 Binary files a/graphics/pokemon/minior/core/blue/icon.png and b/graphics/pokemon/minior/core/blue/icon.png differ diff --git a/graphics/pokemon/minior/core/front.png b/graphics/pokemon/minior/core/front.png index e9dba883a1..ab7e896156 100644 Binary files a/graphics/pokemon/minior/core/front.png and b/graphics/pokemon/minior/core/front.png differ diff --git a/graphics/pokemon/minior/core/green/icon.png b/graphics/pokemon/minior/core/green/icon.png index 529e605202..dc36402deb 100644 Binary files a/graphics/pokemon/minior/core/green/icon.png and b/graphics/pokemon/minior/core/green/icon.png differ diff --git a/graphics/pokemon/minior/core/indigo/icon.png b/graphics/pokemon/minior/core/indigo/icon.png index f24a887bf2..a27482ea11 100644 Binary files a/graphics/pokemon/minior/core/indigo/icon.png and b/graphics/pokemon/minior/core/indigo/icon.png differ diff --git a/graphics/pokemon/minior/core/orange/icon.png b/graphics/pokemon/minior/core/orange/icon.png index c588e1dd72..6dea4aca6f 100644 Binary files a/graphics/pokemon/minior/core/orange/icon.png and b/graphics/pokemon/minior/core/orange/icon.png differ diff --git a/graphics/pokemon/minior/core/violet/icon.png b/graphics/pokemon/minior/core/violet/icon.png index 207c3f455c..609ace524c 100644 Binary files a/graphics/pokemon/minior/core/violet/icon.png and b/graphics/pokemon/minior/core/violet/icon.png differ diff --git a/graphics/pokemon/minior/core/yellow/icon.png b/graphics/pokemon/minior/core/yellow/icon.png index 270115f680..b0cfaa1c39 100644 Binary files a/graphics/pokemon/minior/core/yellow/icon.png and b/graphics/pokemon/minior/core/yellow/icon.png differ diff --git a/graphics/pokemon/minun/back.png b/graphics/pokemon/minun/back.png index 1e9d01ea3c..f8b11aba90 100644 Binary files a/graphics/pokemon/minun/back.png and b/graphics/pokemon/minun/back.png differ diff --git a/graphics/pokemon/minun/front.png b/graphics/pokemon/minun/front.png deleted file mode 100644 index fa72433dc2..0000000000 Binary files a/graphics/pokemon/minun/front.png and /dev/null differ diff --git a/graphics/pokemon/misdreavus/front.png b/graphics/pokemon/misdreavus/front.png deleted file mode 100644 index b46d709a96..0000000000 Binary files a/graphics/pokemon/misdreavus/front.png and /dev/null differ diff --git a/graphics/pokemon/mismagius/front.png b/graphics/pokemon/mismagius/front.png deleted file mode 100644 index 5d68e8b704..0000000000 Binary files a/graphics/pokemon/mismagius/front.png and /dev/null differ diff --git a/graphics/pokemon/mismagius/icon.png b/graphics/pokemon/mismagius/icon.png index ad707f8cdd..07e075c1e8 100644 Binary files a/graphics/pokemon/mismagius/icon.png and b/graphics/pokemon/mismagius/icon.png differ diff --git a/graphics/pokemon/moltres/front.png b/graphics/pokemon/moltres/front.png deleted file mode 100644 index e8d2f0e43c..0000000000 Binary files a/graphics/pokemon/moltres/front.png and /dev/null differ diff --git a/graphics/pokemon/moltres/icon.png b/graphics/pokemon/moltres/icon.png index 99affaa0b2..70de854506 100644 Binary files a/graphics/pokemon/moltres/icon.png and b/graphics/pokemon/moltres/icon.png differ diff --git a/graphics/pokemon/monferno/front.png b/graphics/pokemon/monferno/front.png deleted file mode 100644 index 08ac29b532..0000000000 Binary files a/graphics/pokemon/monferno/front.png and /dev/null differ diff --git a/graphics/pokemon/monferno/icon.png b/graphics/pokemon/monferno/icon.png index 8a01ec5155..9fbfd12558 100644 Binary files a/graphics/pokemon/monferno/icon.png and b/graphics/pokemon/monferno/icon.png differ diff --git a/graphics/pokemon/mothim/front.png b/graphics/pokemon/mothim/front.png deleted file mode 100644 index b18fffe171..0000000000 Binary files a/graphics/pokemon/mothim/front.png and /dev/null differ diff --git a/graphics/pokemon/mothim/icon.png b/graphics/pokemon/mothim/icon.png index ce6f8f0f6f..3312458681 100644 Binary files a/graphics/pokemon/mothim/icon.png and b/graphics/pokemon/mothim/icon.png differ diff --git a/graphics/pokemon/mr_mime/back.png b/graphics/pokemon/mr_mime/back.png index d5fbd0396b..b9e15eacf6 100644 Binary files a/graphics/pokemon/mr_mime/back.png and b/graphics/pokemon/mr_mime/back.png differ diff --git a/graphics/pokemon/mr_mime/front.png b/graphics/pokemon/mr_mime/front.png deleted file mode 100644 index 1ea6f3cbab..0000000000 Binary files a/graphics/pokemon/mr_mime/front.png and /dev/null differ diff --git a/graphics/pokemon/mudkip/front.png b/graphics/pokemon/mudkip/front.png deleted file mode 100644 index 7c83c421f1..0000000000 Binary files a/graphics/pokemon/mudkip/front.png and /dev/null differ diff --git a/graphics/pokemon/muk/front.png b/graphics/pokemon/muk/front.png deleted file mode 100644 index 4bb6d0a84e..0000000000 Binary files a/graphics/pokemon/muk/front.png and /dev/null differ diff --git a/graphics/pokemon/muk/icon.png b/graphics/pokemon/muk/icon.png index f56a9b367d..3168d1be46 100644 Binary files a/graphics/pokemon/muk/icon.png and b/graphics/pokemon/muk/icon.png differ diff --git a/graphics/pokemon/munchlax/front.png b/graphics/pokemon/munchlax/front.png deleted file mode 100644 index 243df8dd06..0000000000 Binary files a/graphics/pokemon/munchlax/front.png and /dev/null differ diff --git a/graphics/pokemon/munna/front.png b/graphics/pokemon/munna/front.png deleted file mode 100644 index 3abe09025e..0000000000 Binary files a/graphics/pokemon/munna/front.png and /dev/null differ diff --git a/graphics/pokemon/munna/icon.png b/graphics/pokemon/munna/icon.png index c7b2a7b04d..c97d44e6d6 100644 Binary files a/graphics/pokemon/munna/icon.png and b/graphics/pokemon/munna/icon.png differ diff --git a/graphics/pokemon/murkrow/front.png b/graphics/pokemon/murkrow/front.png deleted file mode 100644 index de8f7cd5d2..0000000000 Binary files a/graphics/pokemon/murkrow/front.png and /dev/null differ diff --git a/graphics/pokemon/musharna/front.png b/graphics/pokemon/musharna/front.png deleted file mode 100644 index 75addd0950..0000000000 Binary files a/graphics/pokemon/musharna/front.png and /dev/null differ diff --git a/graphics/pokemon/musharna/icon.png b/graphics/pokemon/musharna/icon.png index 4dfba9d127..c51d8ade64 100644 Binary files a/graphics/pokemon/musharna/icon.png and b/graphics/pokemon/musharna/icon.png differ diff --git a/graphics/pokemon/natu/anim_front.png b/graphics/pokemon/natu/anim_front.png index 4ba2a6eee5..8ac7b53c02 100644 Binary files a/graphics/pokemon/natu/anim_front.png and b/graphics/pokemon/natu/anim_front.png differ diff --git a/graphics/pokemon/natu/front.png b/graphics/pokemon/natu/front.png deleted file mode 100644 index c77e0f9bd7..0000000000 Binary files a/graphics/pokemon/natu/front.png and /dev/null differ diff --git a/graphics/pokemon/natu/normal.pal b/graphics/pokemon/natu/normal.pal index 0d9796fa5f..1b1f57e13c 100644 --- a/graphics/pokemon/natu/normal.pal +++ b/graphics/pokemon/natu/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 0 176 232 -128 40 0 -248 88 88 -216 40 88 -72 144 64 -40 104 40 -112 184 64 -144 216 64 -16 16 16 -128 96 32 -248 224 40 -216 168 40 -248 248 248 -80 80 80 -200 200 200 -144 144 144 +131 41 0 +246 90 90 +213 41 90 +74 148 65 +41 106 41 +115 189 65 +148 213 65 +41 41 41 +131 98 32 +255 222 41 +213 172 41 +255 255 255 +82 82 82 +205 205 205 +148 148 148 diff --git a/graphics/pokemon/necrozma/dawn_wings/back.png b/graphics/pokemon/necrozma/dawn_wings/back.png index 2c3fcb4002..be258fb089 100644 Binary files a/graphics/pokemon/necrozma/dawn_wings/back.png and b/graphics/pokemon/necrozma/dawn_wings/back.png differ diff --git a/graphics/pokemon/necrozma/dawn_wings/front.png b/graphics/pokemon/necrozma/dawn_wings/front.png index e8f31dc493..a5c75ea2b5 100644 Binary files a/graphics/pokemon/necrozma/dawn_wings/front.png and b/graphics/pokemon/necrozma/dawn_wings/front.png differ diff --git a/graphics/pokemon/necrozma/dawn_wings/icon.png b/graphics/pokemon/necrozma/dawn_wings/icon.png index 558ff60884..c5fde92c44 100644 Binary files a/graphics/pokemon/necrozma/dawn_wings/icon.png and b/graphics/pokemon/necrozma/dawn_wings/icon.png differ diff --git a/graphics/pokemon/necrozma/dusk_mane/back.png b/graphics/pokemon/necrozma/dusk_mane/back.png index 1a1b9e07e1..96621697c5 100644 Binary files a/graphics/pokemon/necrozma/dusk_mane/back.png and b/graphics/pokemon/necrozma/dusk_mane/back.png differ diff --git a/graphics/pokemon/necrozma/dusk_mane/front.png b/graphics/pokemon/necrozma/dusk_mane/front.png index c9a72135e8..f2b88ee0c5 100644 Binary files a/graphics/pokemon/necrozma/dusk_mane/front.png and b/graphics/pokemon/necrozma/dusk_mane/front.png differ diff --git a/graphics/pokemon/necrozma/dusk_mane/icon.png b/graphics/pokemon/necrozma/dusk_mane/icon.png index 90c74736ea..e0e4ef479e 100644 Binary files a/graphics/pokemon/necrozma/dusk_mane/icon.png and b/graphics/pokemon/necrozma/dusk_mane/icon.png differ diff --git a/graphics/pokemon/necrozma/ultra/back.png b/graphics/pokemon/necrozma/ultra/back.png index 798e1290f4..1dcdc3835c 100644 Binary files a/graphics/pokemon/necrozma/ultra/back.png and b/graphics/pokemon/necrozma/ultra/back.png differ diff --git a/graphics/pokemon/necrozma/ultra/front.png b/graphics/pokemon/necrozma/ultra/front.png index fc57cce637..0eac6b0fe5 100644 Binary files a/graphics/pokemon/necrozma/ultra/front.png and b/graphics/pokemon/necrozma/ultra/front.png differ diff --git a/graphics/pokemon/necrozma/ultra/icon.png b/graphics/pokemon/necrozma/ultra/icon.png index e41c58de6d..8adcbb3f53 100644 Binary files a/graphics/pokemon/necrozma/ultra/icon.png and b/graphics/pokemon/necrozma/ultra/icon.png differ diff --git a/graphics/pokemon/nidoking/front.png b/graphics/pokemon/nidoking/front.png deleted file mode 100644 index e230190a25..0000000000 Binary files a/graphics/pokemon/nidoking/front.png and /dev/null differ diff --git a/graphics/pokemon/nidoking/icon.png b/graphics/pokemon/nidoking/icon.png index 377cb6672e..93d0b5f80e 100644 Binary files a/graphics/pokemon/nidoking/icon.png and b/graphics/pokemon/nidoking/icon.png differ diff --git a/graphics/pokemon/nidoqueen/back.png b/graphics/pokemon/nidoqueen/back.png index e983016e2d..90a8cca1cd 100644 Binary files a/graphics/pokemon/nidoqueen/back.png and b/graphics/pokemon/nidoqueen/back.png differ diff --git a/graphics/pokemon/nidoqueen/front.png b/graphics/pokemon/nidoqueen/front.png deleted file mode 100644 index f4592932e0..0000000000 Binary files a/graphics/pokemon/nidoqueen/front.png and /dev/null differ diff --git a/graphics/pokemon/nidoran_f/front.png b/graphics/pokemon/nidoran_f/front.png deleted file mode 100644 index d47802a0da..0000000000 Binary files a/graphics/pokemon/nidoran_f/front.png and /dev/null differ diff --git a/graphics/pokemon/nidoran_m/front.png b/graphics/pokemon/nidoran_m/front.png deleted file mode 100644 index 3b1084e3dc..0000000000 Binary files a/graphics/pokemon/nidoran_m/front.png and /dev/null differ diff --git a/graphics/pokemon/nidorina/front.png b/graphics/pokemon/nidorina/front.png deleted file mode 100644 index 957a5d3aee..0000000000 Binary files a/graphics/pokemon/nidorina/front.png and /dev/null differ diff --git a/graphics/pokemon/nidorino/back.png b/graphics/pokemon/nidorino/back.png index e5868c58e1..a7078074e4 100644 Binary files a/graphics/pokemon/nidorino/back.png and b/graphics/pokemon/nidorino/back.png differ diff --git a/graphics/pokemon/nidorino/front.png b/graphics/pokemon/nidorino/front.png deleted file mode 100644 index 16b304216e..0000000000 Binary files a/graphics/pokemon/nidorino/front.png and /dev/null differ diff --git a/graphics/pokemon/nincada/front.png b/graphics/pokemon/nincada/front.png deleted file mode 100644 index 1c408a81d2..0000000000 Binary files a/graphics/pokemon/nincada/front.png and /dev/null differ diff --git a/graphics/pokemon/ninetales/back.png b/graphics/pokemon/ninetales/back.png index 5507f9e37c..507b278595 100644 Binary files a/graphics/pokemon/ninetales/back.png and b/graphics/pokemon/ninetales/back.png differ diff --git a/graphics/pokemon/ninetales/front.png b/graphics/pokemon/ninetales/front.png deleted file mode 100644 index 4c14bd887c..0000000000 Binary files a/graphics/pokemon/ninetales/front.png and /dev/null differ diff --git a/graphics/pokemon/ninjask/front.png b/graphics/pokemon/ninjask/front.png deleted file mode 100644 index f7c0d20dc4..0000000000 Binary files a/graphics/pokemon/ninjask/front.png and /dev/null differ diff --git a/graphics/pokemon/noctowl/anim_front.png b/graphics/pokemon/noctowl/anim_front.png index e6ff6d2106..751b21e931 100644 Binary files a/graphics/pokemon/noctowl/anim_front.png and b/graphics/pokemon/noctowl/anim_front.png differ diff --git a/graphics/pokemon/noctowl/front.png b/graphics/pokemon/noctowl/front.png deleted file mode 100644 index 6665234c04..0000000000 Binary files a/graphics/pokemon/noctowl/front.png and /dev/null differ diff --git a/graphics/pokemon/noctowl/normal.pal b/graphics/pokemon/noctowl/normal.pal index cf763b733f..0e4e0b0775 100644 --- a/graphics/pokemon/noctowl/normal.pal +++ b/graphics/pokemon/noctowl/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -176 120 80 -96 64 48 -240 224 168 -120 88 72 -216 184 144 -64 40 32 -200 144 112 +172 123 74 +98 65 49 +255 246 180 +123 90 74 +222 205 90 +65 41 32 +213 148 98 16 16 16 -96 96 96 -248 248 248 -192 48 24 -152 0 0 -192 192 192 -144 88 56 -160 128 104 +98 98 98 +255 255 255 +197 49 24 +156 0 0 +197 197 197 +148 90 57 +164 131 106 diff --git a/graphics/pokemon/noibat/front.png b/graphics/pokemon/noibat/front.png deleted file mode 100644 index 6934317f20..0000000000 Binary files a/graphics/pokemon/noibat/front.png and /dev/null differ diff --git a/graphics/pokemon/noivern/front.png b/graphics/pokemon/noivern/front.png deleted file mode 100644 index 252a56fb46..0000000000 Binary files a/graphics/pokemon/noivern/front.png and /dev/null differ diff --git a/graphics/pokemon/nosepass/front.png b/graphics/pokemon/nosepass/front.png deleted file mode 100644 index 6955772330..0000000000 Binary files a/graphics/pokemon/nosepass/front.png and /dev/null differ diff --git a/graphics/pokemon/numel/front.png b/graphics/pokemon/numel/front.png deleted file mode 100644 index 2df10f3c71..0000000000 Binary files a/graphics/pokemon/numel/front.png and /dev/null differ diff --git a/graphics/pokemon/nuzleaf/front.png b/graphics/pokemon/nuzleaf/front.png deleted file mode 100644 index 173398f528..0000000000 Binary files a/graphics/pokemon/nuzleaf/front.png and /dev/null differ diff --git a/graphics/pokemon/octillery/front.png b/graphics/pokemon/octillery/front.png deleted file mode 100644 index 2fc250c8d1..0000000000 Binary files a/graphics/pokemon/octillery/front.png and /dev/null differ diff --git a/graphics/pokemon/oddish/back.png b/graphics/pokemon/oddish/back.png index 21a343a9df..7d96a680fa 100644 Binary files a/graphics/pokemon/oddish/back.png and b/graphics/pokemon/oddish/back.png differ diff --git a/graphics/pokemon/oddish/front.png b/graphics/pokemon/oddish/front.png deleted file mode 100644 index 3ced8e7058..0000000000 Binary files a/graphics/pokemon/oddish/front.png and /dev/null differ diff --git a/graphics/pokemon/oddish/icon.png b/graphics/pokemon/oddish/icon.png index 32515b89f9..bef94316f2 100644 Binary files a/graphics/pokemon/oddish/icon.png and b/graphics/pokemon/oddish/icon.png differ diff --git a/graphics/pokemon/omanyte/front.png b/graphics/pokemon/omanyte/front.png deleted file mode 100644 index 177d0f0b66..0000000000 Binary files a/graphics/pokemon/omanyte/front.png and /dev/null differ diff --git a/graphics/pokemon/omastar/front.png b/graphics/pokemon/omastar/front.png deleted file mode 100644 index 87796c37d5..0000000000 Binary files a/graphics/pokemon/omastar/front.png and /dev/null differ diff --git a/graphics/pokemon/onix/front.png b/graphics/pokemon/onix/front.png deleted file mode 100644 index 6cba5adc4d..0000000000 Binary files a/graphics/pokemon/onix/front.png and /dev/null differ diff --git a/graphics/pokemon/onix/icon.png b/graphics/pokemon/onix/icon.png index 947ead4ee2..b4de2a1cd2 100644 Binary files a/graphics/pokemon/onix/icon.png and b/graphics/pokemon/onix/icon.png differ diff --git a/graphics/pokemon/oricorio/pau/back.png b/graphics/pokemon/oricorio/pau/back.png index f2771b8b51..7969b5019f 100644 Binary files a/graphics/pokemon/oricorio/pau/back.png and b/graphics/pokemon/oricorio/pau/back.png differ diff --git a/graphics/pokemon/oricorio/pau/front.png b/graphics/pokemon/oricorio/pau/front.png index b6c6f67332..004b8cc9cc 100644 Binary files a/graphics/pokemon/oricorio/pau/front.png and b/graphics/pokemon/oricorio/pau/front.png differ diff --git a/graphics/pokemon/oricorio/pau/icon.png b/graphics/pokemon/oricorio/pau/icon.png index a4ba46d2ba..c3353a9249 100644 Binary files a/graphics/pokemon/oricorio/pau/icon.png and b/graphics/pokemon/oricorio/pau/icon.png differ diff --git a/graphics/pokemon/oricorio/pom_pom/back.png b/graphics/pokemon/oricorio/pom_pom/back.png index 78eadc3fe0..f6f22ae1be 100644 Binary files a/graphics/pokemon/oricorio/pom_pom/back.png and b/graphics/pokemon/oricorio/pom_pom/back.png differ diff --git a/graphics/pokemon/oricorio/pom_pom/front.png b/graphics/pokemon/oricorio/pom_pom/front.png index 44deb56e8e..5ed6c71b56 100644 Binary files a/graphics/pokemon/oricorio/pom_pom/front.png and b/graphics/pokemon/oricorio/pom_pom/front.png differ diff --git a/graphics/pokemon/oricorio/pom_pom/icon.png b/graphics/pokemon/oricorio/pom_pom/icon.png index ead80b6a23..9f83917ba1 100644 Binary files a/graphics/pokemon/oricorio/pom_pom/icon.png and b/graphics/pokemon/oricorio/pom_pom/icon.png differ diff --git a/graphics/pokemon/oricorio/sensu/back.png b/graphics/pokemon/oricorio/sensu/back.png index 694e30afd7..25ed57b0cd 100644 Binary files a/graphics/pokemon/oricorio/sensu/back.png and b/graphics/pokemon/oricorio/sensu/back.png differ diff --git a/graphics/pokemon/oricorio/sensu/front.png b/graphics/pokemon/oricorio/sensu/front.png index 470f684713..5abc5e547e 100644 Binary files a/graphics/pokemon/oricorio/sensu/front.png and b/graphics/pokemon/oricorio/sensu/front.png differ diff --git a/graphics/pokemon/oricorio/sensu/icon.png b/graphics/pokemon/oricorio/sensu/icon.png index 1bbb78de11..9828bb2067 100644 Binary files a/graphics/pokemon/oricorio/sensu/icon.png and b/graphics/pokemon/oricorio/sensu/icon.png differ diff --git a/graphics/pokemon/oshawott/front.png b/graphics/pokemon/oshawott/front.png deleted file mode 100644 index 4a0a0004aa..0000000000 Binary files a/graphics/pokemon/oshawott/front.png and /dev/null differ diff --git a/graphics/pokemon/pachirisu/front.png b/graphics/pokemon/pachirisu/front.png deleted file mode 100644 index 7d60cf8dfb..0000000000 Binary files a/graphics/pokemon/pachirisu/front.png and /dev/null differ diff --git a/graphics/pokemon/palkia/front.png b/graphics/pokemon/palkia/front.png deleted file mode 100644 index 4e2d3f513c..0000000000 Binary files a/graphics/pokemon/palkia/front.png and /dev/null differ diff --git a/graphics/pokemon/palkia/icon.png b/graphics/pokemon/palkia/icon.png index d84e9b8c3e..1476f20af5 100644 Binary files a/graphics/pokemon/palkia/icon.png and b/graphics/pokemon/palkia/icon.png differ diff --git a/graphics/pokemon/palpitoad/front.png b/graphics/pokemon/palpitoad/front.png deleted file mode 100644 index 05b2a8b24c..0000000000 Binary files a/graphics/pokemon/palpitoad/front.png and /dev/null differ diff --git a/graphics/pokemon/pancham/front.png b/graphics/pokemon/pancham/front.png deleted file mode 100644 index 79cd40df43..0000000000 Binary files a/graphics/pokemon/pancham/front.png and /dev/null differ diff --git a/graphics/pokemon/pangoro/front.png b/graphics/pokemon/pangoro/front.png deleted file mode 100644 index 9de90108a4..0000000000 Binary files a/graphics/pokemon/pangoro/front.png and /dev/null differ diff --git a/graphics/pokemon/panpour/front.png b/graphics/pokemon/panpour/front.png deleted file mode 100644 index bc17b1fbcb..0000000000 Binary files a/graphics/pokemon/panpour/front.png and /dev/null differ diff --git a/graphics/pokemon/pansage/front.png b/graphics/pokemon/pansage/front.png deleted file mode 100644 index 63e3125ca2..0000000000 Binary files a/graphics/pokemon/pansage/front.png and /dev/null differ diff --git a/graphics/pokemon/pansear/front.png b/graphics/pokemon/pansear/front.png deleted file mode 100644 index c7dc3a5b8f..0000000000 Binary files a/graphics/pokemon/pansear/front.png and /dev/null differ diff --git a/graphics/pokemon/paras/front.png b/graphics/pokemon/paras/front.png deleted file mode 100644 index b79705ba54..0000000000 Binary files a/graphics/pokemon/paras/front.png and /dev/null differ diff --git a/graphics/pokemon/paras/icon.png b/graphics/pokemon/paras/icon.png index 26d937231f..6bc817d0be 100644 Binary files a/graphics/pokemon/paras/icon.png and b/graphics/pokemon/paras/icon.png differ diff --git a/graphics/pokemon/parasect/front.png b/graphics/pokemon/parasect/front.png deleted file mode 100644 index 5a841ffbcc..0000000000 Binary files a/graphics/pokemon/parasect/front.png and /dev/null differ diff --git a/graphics/pokemon/parasect/icon.png b/graphics/pokemon/parasect/icon.png index c6aaff12d7..27b8e09893 100644 Binary files a/graphics/pokemon/parasect/icon.png and b/graphics/pokemon/parasect/icon.png differ diff --git a/graphics/pokemon/patrat/front.png b/graphics/pokemon/patrat/front.png deleted file mode 100644 index 3bc72d582f..0000000000 Binary files a/graphics/pokemon/patrat/front.png and /dev/null differ diff --git a/graphics/pokemon/pawniard/front.png b/graphics/pokemon/pawniard/front.png deleted file mode 100644 index 4d5434548e..0000000000 Binary files a/graphics/pokemon/pawniard/front.png and /dev/null differ diff --git a/graphics/pokemon/pelipper/front.png b/graphics/pokemon/pelipper/front.png deleted file mode 100644 index 145bb8e25b..0000000000 Binary files a/graphics/pokemon/pelipper/front.png and /dev/null differ diff --git a/graphics/pokemon/pelipper/icon.png b/graphics/pokemon/pelipper/icon.png index 43ae7c2760..49debae717 100644 Binary files a/graphics/pokemon/pelipper/icon.png and b/graphics/pokemon/pelipper/icon.png differ diff --git a/graphics/pokemon/persian/back.png b/graphics/pokemon/persian/back.png index ad7a9d4a65..1ec5e99939 100644 Binary files a/graphics/pokemon/persian/back.png and b/graphics/pokemon/persian/back.png differ diff --git a/graphics/pokemon/persian/front.png b/graphics/pokemon/persian/front.png deleted file mode 100644 index 650de8dd74..0000000000 Binary files a/graphics/pokemon/persian/front.png and /dev/null differ diff --git a/graphics/pokemon/petilil/front.png b/graphics/pokemon/petilil/front.png deleted file mode 100644 index 735abb0fc2..0000000000 Binary files a/graphics/pokemon/petilil/front.png and /dev/null differ diff --git a/graphics/pokemon/phanpy/back.png b/graphics/pokemon/phanpy/back.png index 65e0f1d513..a46f6d7749 100644 Binary files a/graphics/pokemon/phanpy/back.png and b/graphics/pokemon/phanpy/back.png differ diff --git a/graphics/pokemon/phanpy/front.png b/graphics/pokemon/phanpy/front.png deleted file mode 100644 index 22ef309631..0000000000 Binary files a/graphics/pokemon/phanpy/front.png and /dev/null differ diff --git a/graphics/pokemon/phantump/front.png b/graphics/pokemon/phantump/front.png deleted file mode 100644 index 2471e23010..0000000000 Binary files a/graphics/pokemon/phantump/front.png and /dev/null differ diff --git a/graphics/pokemon/phione/front.png b/graphics/pokemon/phione/front.png deleted file mode 100644 index 10f7d01b52..0000000000 Binary files a/graphics/pokemon/phione/front.png and /dev/null differ diff --git a/graphics/pokemon/phione/icon.png b/graphics/pokemon/phione/icon.png index 1bfec4bbdd..c24a936ffc 100644 Binary files a/graphics/pokemon/phione/icon.png and b/graphics/pokemon/phione/icon.png differ diff --git a/graphics/pokemon/pichu/front.png b/graphics/pokemon/pichu/front.png deleted file mode 100644 index f8974c37b8..0000000000 Binary files a/graphics/pokemon/pichu/front.png and /dev/null differ diff --git a/graphics/pokemon/pichu/icon.png b/graphics/pokemon/pichu/icon.png index 5e3de4b990..d29fa7fb4a 100644 Binary files a/graphics/pokemon/pichu/icon.png and b/graphics/pokemon/pichu/icon.png differ diff --git a/graphics/pokemon/pichu/spiky_eared/icon.png b/graphics/pokemon/pichu/spiky_eared/icon.png index 93107b1d3a..3a407bc6cb 100644 Binary files a/graphics/pokemon/pichu/spiky_eared/icon.png and b/graphics/pokemon/pichu/spiky_eared/icon.png differ diff --git a/graphics/pokemon/pidgeot/front.png b/graphics/pokemon/pidgeot/front.png deleted file mode 100644 index 0efed3108f..0000000000 Binary files a/graphics/pokemon/pidgeot/front.png and /dev/null differ diff --git a/graphics/pokemon/pidgeotto/front.png b/graphics/pokemon/pidgeotto/front.png deleted file mode 100644 index aecc7f2422..0000000000 Binary files a/graphics/pokemon/pidgeotto/front.png and /dev/null differ diff --git a/graphics/pokemon/pidgey/front.png b/graphics/pokemon/pidgey/front.png deleted file mode 100644 index 44cddf449b..0000000000 Binary files a/graphics/pokemon/pidgey/front.png and /dev/null differ diff --git a/graphics/pokemon/pidove/front.png b/graphics/pokemon/pidove/front.png deleted file mode 100644 index 5906190875..0000000000 Binary files a/graphics/pokemon/pidove/front.png and /dev/null differ diff --git a/graphics/pokemon/pignite/front.png b/graphics/pokemon/pignite/front.png deleted file mode 100644 index 39c020d57d..0000000000 Binary files a/graphics/pokemon/pignite/front.png and /dev/null differ diff --git a/graphics/pokemon/pignite/icon.png b/graphics/pokemon/pignite/icon.png index 78b1a8d72d..1190d639af 100644 Binary files a/graphics/pokemon/pignite/icon.png and b/graphics/pokemon/pignite/icon.png differ diff --git a/graphics/pokemon/pikachu/alola_cap/back.png b/graphics/pokemon/pikachu/alola_cap/back.png index eb78995e33..110eab45bf 100644 Binary files a/graphics/pokemon/pikachu/alola_cap/back.png and b/graphics/pokemon/pikachu/alola_cap/back.png differ diff --git a/graphics/pokemon/pikachu/alola_cap/front.png b/graphics/pokemon/pikachu/alola_cap/front.png index 658157930e..2de876f500 100644 Binary files a/graphics/pokemon/pikachu/alola_cap/front.png and b/graphics/pokemon/pikachu/alola_cap/front.png differ diff --git a/graphics/pokemon/pikachu/alola_cap/icon.png b/graphics/pokemon/pikachu/alola_cap/icon.png index 8ebbfd5a3a..c2ad26a4be 100644 Binary files a/graphics/pokemon/pikachu/alola_cap/icon.png and b/graphics/pokemon/pikachu/alola_cap/icon.png differ diff --git a/graphics/pokemon/pikachu/belle/back.png b/graphics/pokemon/pikachu/belle/back.png index d90d9ba3b4..b9b1875658 100644 Binary files a/graphics/pokemon/pikachu/belle/back.png and b/graphics/pokemon/pikachu/belle/back.png differ diff --git a/graphics/pokemon/pikachu/belle/front.png b/graphics/pokemon/pikachu/belle/front.png index 7f521f2873..27e11f42eb 100644 Binary files a/graphics/pokemon/pikachu/belle/front.png and b/graphics/pokemon/pikachu/belle/front.png differ diff --git a/graphics/pokemon/pikachu/belle/icon.png b/graphics/pokemon/pikachu/belle/icon.png index 2263ec539e..c3374c4bb0 100644 Binary files a/graphics/pokemon/pikachu/belle/icon.png and b/graphics/pokemon/pikachu/belle/icon.png differ diff --git a/graphics/pokemon/pikachu/cosplay/back.png b/graphics/pokemon/pikachu/cosplay/back.png index d01bdd1f08..524417f1cb 100644 Binary files a/graphics/pokemon/pikachu/cosplay/back.png and b/graphics/pokemon/pikachu/cosplay/back.png differ diff --git a/graphics/pokemon/pikachu/cosplay/front.png b/graphics/pokemon/pikachu/cosplay/front.png index a59ab675a3..bcbe13ee8f 100644 Binary files a/graphics/pokemon/pikachu/cosplay/front.png and b/graphics/pokemon/pikachu/cosplay/front.png differ diff --git a/graphics/pokemon/pikachu/cosplay/icon.png b/graphics/pokemon/pikachu/cosplay/icon.png index ec128341e2..38d9443a45 100644 Binary files a/graphics/pokemon/pikachu/cosplay/icon.png and b/graphics/pokemon/pikachu/cosplay/icon.png differ diff --git a/graphics/pokemon/pikachu/front.png b/graphics/pokemon/pikachu/front.png deleted file mode 100644 index 9a320c2866..0000000000 Binary files a/graphics/pokemon/pikachu/front.png and /dev/null differ diff --git a/graphics/pokemon/pikachu/hoenn_cap/back.png b/graphics/pokemon/pikachu/hoenn_cap/back.png index a00abae920..a257b1e994 100644 Binary files a/graphics/pokemon/pikachu/hoenn_cap/back.png and b/graphics/pokemon/pikachu/hoenn_cap/back.png differ diff --git a/graphics/pokemon/pikachu/hoenn_cap/front.png b/graphics/pokemon/pikachu/hoenn_cap/front.png index 19bbcdfe60..2c9749ee2e 100644 Binary files a/graphics/pokemon/pikachu/hoenn_cap/front.png and b/graphics/pokemon/pikachu/hoenn_cap/front.png differ diff --git a/graphics/pokemon/pikachu/hoenn_cap/icon.png b/graphics/pokemon/pikachu/hoenn_cap/icon.png index 63ebc8d5a2..c9f88f5e30 100644 Binary files a/graphics/pokemon/pikachu/hoenn_cap/icon.png and b/graphics/pokemon/pikachu/hoenn_cap/icon.png differ diff --git a/graphics/pokemon/pikachu/kalos_cap/back.png b/graphics/pokemon/pikachu/kalos_cap/back.png index 3623d801d6..c0a4b75261 100644 Binary files a/graphics/pokemon/pikachu/kalos_cap/back.png and b/graphics/pokemon/pikachu/kalos_cap/back.png differ diff --git a/graphics/pokemon/pikachu/kalos_cap/front.png b/graphics/pokemon/pikachu/kalos_cap/front.png index e03175dc41..b8d995d879 100644 Binary files a/graphics/pokemon/pikachu/kalos_cap/front.png and b/graphics/pokemon/pikachu/kalos_cap/front.png differ diff --git a/graphics/pokemon/pikachu/kalos_cap/icon.png b/graphics/pokemon/pikachu/kalos_cap/icon.png index 1d224061e1..0e93d93b74 100644 Binary files a/graphics/pokemon/pikachu/kalos_cap/icon.png and b/graphics/pokemon/pikachu/kalos_cap/icon.png differ diff --git a/graphics/pokemon/pikachu/libre/back.png b/graphics/pokemon/pikachu/libre/back.png index db535bbda9..f92d401f76 100644 Binary files a/graphics/pokemon/pikachu/libre/back.png and b/graphics/pokemon/pikachu/libre/back.png differ diff --git a/graphics/pokemon/pikachu/libre/front.png b/graphics/pokemon/pikachu/libre/front.png index b83d135ace..234ad40f95 100644 Binary files a/graphics/pokemon/pikachu/libre/front.png and b/graphics/pokemon/pikachu/libre/front.png differ diff --git a/graphics/pokemon/pikachu/libre/icon.png b/graphics/pokemon/pikachu/libre/icon.png index f7908eab3b..38ce2cc69b 100644 Binary files a/graphics/pokemon/pikachu/libre/icon.png and b/graphics/pokemon/pikachu/libre/icon.png differ diff --git a/graphics/pokemon/pikachu/original_cap/back.png b/graphics/pokemon/pikachu/original_cap/back.png index c60155b42d..4f5d09e274 100644 Binary files a/graphics/pokemon/pikachu/original_cap/back.png and b/graphics/pokemon/pikachu/original_cap/back.png differ diff --git a/graphics/pokemon/pikachu/original_cap/front.png b/graphics/pokemon/pikachu/original_cap/front.png index 1d265d0c98..bb8d5931ec 100644 Binary files a/graphics/pokemon/pikachu/original_cap/front.png and b/graphics/pokemon/pikachu/original_cap/front.png differ diff --git a/graphics/pokemon/pikachu/original_cap/icon.png b/graphics/pokemon/pikachu/original_cap/icon.png index 68179437b4..6a356991e9 100644 Binary files a/graphics/pokemon/pikachu/original_cap/icon.png and b/graphics/pokemon/pikachu/original_cap/icon.png differ diff --git a/graphics/pokemon/pikachu/partner_cap/icon.png b/graphics/pokemon/pikachu/partner_cap/icon.png index eff6d7dcdc..78630c6643 100644 Binary files a/graphics/pokemon/pikachu/partner_cap/icon.png and b/graphics/pokemon/pikachu/partner_cap/icon.png differ diff --git a/graphics/pokemon/pikachu/ph_d/back.png b/graphics/pokemon/pikachu/ph_d/back.png index 568fbf91e7..83ee2a5596 100644 Binary files a/graphics/pokemon/pikachu/ph_d/back.png and b/graphics/pokemon/pikachu/ph_d/back.png differ diff --git a/graphics/pokemon/pikachu/ph_d/front.png b/graphics/pokemon/pikachu/ph_d/front.png index 0022376076..75034ed9de 100644 Binary files a/graphics/pokemon/pikachu/ph_d/front.png and b/graphics/pokemon/pikachu/ph_d/front.png differ diff --git a/graphics/pokemon/pikachu/ph_d/icon.png b/graphics/pokemon/pikachu/ph_d/icon.png index b6bff42164..50357beb5b 100644 Binary files a/graphics/pokemon/pikachu/ph_d/icon.png and b/graphics/pokemon/pikachu/ph_d/icon.png differ diff --git a/graphics/pokemon/pikachu/pop_star/back.png b/graphics/pokemon/pikachu/pop_star/back.png index 8cfc7abe81..6840627cde 100644 Binary files a/graphics/pokemon/pikachu/pop_star/back.png and b/graphics/pokemon/pikachu/pop_star/back.png differ diff --git a/graphics/pokemon/pikachu/pop_star/front.png b/graphics/pokemon/pikachu/pop_star/front.png index 550cb7ab65..e092dfa5ca 100644 Binary files a/graphics/pokemon/pikachu/pop_star/front.png and b/graphics/pokemon/pikachu/pop_star/front.png differ diff --git a/graphics/pokemon/pikachu/pop_star/icon.png b/graphics/pokemon/pikachu/pop_star/icon.png index 04a399165b..c22ef85a4c 100644 Binary files a/graphics/pokemon/pikachu/pop_star/icon.png and b/graphics/pokemon/pikachu/pop_star/icon.png differ diff --git a/graphics/pokemon/pikachu/rock_star/back.png b/graphics/pokemon/pikachu/rock_star/back.png index 982fd0ba3e..fd86f4d59c 100644 Binary files a/graphics/pokemon/pikachu/rock_star/back.png and b/graphics/pokemon/pikachu/rock_star/back.png differ diff --git a/graphics/pokemon/pikachu/rock_star/front.png b/graphics/pokemon/pikachu/rock_star/front.png index d8498a9817..17a102c0b3 100644 Binary files a/graphics/pokemon/pikachu/rock_star/front.png and b/graphics/pokemon/pikachu/rock_star/front.png differ diff --git a/graphics/pokemon/pikachu/rock_star/icon.png b/graphics/pokemon/pikachu/rock_star/icon.png index 46f106e447..96a7327906 100644 Binary files a/graphics/pokemon/pikachu/rock_star/icon.png and b/graphics/pokemon/pikachu/rock_star/icon.png differ diff --git a/graphics/pokemon/pikachu/sinnoh_cap/back.png b/graphics/pokemon/pikachu/sinnoh_cap/back.png index f23a19428f..24d429bc42 100644 Binary files a/graphics/pokemon/pikachu/sinnoh_cap/back.png and b/graphics/pokemon/pikachu/sinnoh_cap/back.png differ diff --git a/graphics/pokemon/pikachu/sinnoh_cap/front.png b/graphics/pokemon/pikachu/sinnoh_cap/front.png index dc2712fdfa..91d91acc28 100644 Binary files a/graphics/pokemon/pikachu/sinnoh_cap/front.png and b/graphics/pokemon/pikachu/sinnoh_cap/front.png differ diff --git a/graphics/pokemon/pikachu/sinnoh_cap/icon.png b/graphics/pokemon/pikachu/sinnoh_cap/icon.png index e53e37cd4a..a127ebcb3a 100644 Binary files a/graphics/pokemon/pikachu/sinnoh_cap/icon.png and b/graphics/pokemon/pikachu/sinnoh_cap/icon.png differ diff --git a/graphics/pokemon/pikachu/unova_cap/back.png b/graphics/pokemon/pikachu/unova_cap/back.png index d7947b57b9..2191a0f4c9 100644 Binary files a/graphics/pokemon/pikachu/unova_cap/back.png and b/graphics/pokemon/pikachu/unova_cap/back.png differ diff --git a/graphics/pokemon/pikachu/unova_cap/front.png b/graphics/pokemon/pikachu/unova_cap/front.png index 6647c46860..fbc8a3a612 100644 Binary files a/graphics/pokemon/pikachu/unova_cap/front.png and b/graphics/pokemon/pikachu/unova_cap/front.png differ diff --git a/graphics/pokemon/pikachu/unova_cap/icon.png b/graphics/pokemon/pikachu/unova_cap/icon.png index 6d44809284..1dbc18cfae 100644 Binary files a/graphics/pokemon/pikachu/unova_cap/icon.png and b/graphics/pokemon/pikachu/unova_cap/icon.png differ diff --git a/graphics/pokemon/piloswine/front.png b/graphics/pokemon/piloswine/front.png deleted file mode 100644 index 1969f28ae6..0000000000 Binary files a/graphics/pokemon/piloswine/front.png and /dev/null differ diff --git a/graphics/pokemon/pineco/front.png b/graphics/pokemon/pineco/front.png deleted file mode 100644 index eec63a8ec7..0000000000 Binary files a/graphics/pokemon/pineco/front.png and /dev/null differ diff --git a/graphics/pokemon/pinsir/front.png b/graphics/pokemon/pinsir/front.png deleted file mode 100644 index 6ef852cffb..0000000000 Binary files a/graphics/pokemon/pinsir/front.png and /dev/null differ diff --git a/graphics/pokemon/piplup/front.png b/graphics/pokemon/piplup/front.png deleted file mode 100644 index c2ce15cdc7..0000000000 Binary files a/graphics/pokemon/piplup/front.png and /dev/null differ diff --git a/graphics/pokemon/plusle/front.png b/graphics/pokemon/plusle/front.png deleted file mode 100644 index 87b7612197..0000000000 Binary files a/graphics/pokemon/plusle/front.png and /dev/null differ diff --git a/graphics/pokemon/politoed/front.png b/graphics/pokemon/politoed/front.png deleted file mode 100644 index 74d705c106..0000000000 Binary files a/graphics/pokemon/politoed/front.png and /dev/null differ diff --git a/graphics/pokemon/politoed/icon.png b/graphics/pokemon/politoed/icon.png index 8ea308aa35..ffc6a38a48 100644 Binary files a/graphics/pokemon/politoed/icon.png and b/graphics/pokemon/politoed/icon.png differ diff --git a/graphics/pokemon/poliwag/front.png b/graphics/pokemon/poliwag/front.png deleted file mode 100644 index ebfcf3350f..0000000000 Binary files a/graphics/pokemon/poliwag/front.png and /dev/null differ diff --git a/graphics/pokemon/poliwhirl/front.png b/graphics/pokemon/poliwhirl/front.png deleted file mode 100644 index 38ae21a4be..0000000000 Binary files a/graphics/pokemon/poliwhirl/front.png and /dev/null differ diff --git a/graphics/pokemon/poliwrath/front.png b/graphics/pokemon/poliwrath/front.png deleted file mode 100644 index dfe5bd56e7..0000000000 Binary files a/graphics/pokemon/poliwrath/front.png and /dev/null differ diff --git a/graphics/pokemon/ponyta/front.png b/graphics/pokemon/ponyta/front.png deleted file mode 100644 index 5e60ecaecb..0000000000 Binary files a/graphics/pokemon/ponyta/front.png and /dev/null differ diff --git a/graphics/pokemon/poochyena/front.png b/graphics/pokemon/poochyena/front.png deleted file mode 100644 index 03cc345b06..0000000000 Binary files a/graphics/pokemon/poochyena/front.png and /dev/null differ diff --git a/graphics/pokemon/porygon/front.png b/graphics/pokemon/porygon/front.png deleted file mode 100644 index 52d47ce11b..0000000000 Binary files a/graphics/pokemon/porygon/front.png and /dev/null differ diff --git a/graphics/pokemon/porygon2/front.png b/graphics/pokemon/porygon2/front.png deleted file mode 100644 index 84f153fc72..0000000000 Binary files a/graphics/pokemon/porygon2/front.png and /dev/null differ diff --git a/graphics/pokemon/porygon_z/front.png b/graphics/pokemon/porygon_z/front.png deleted file mode 100644 index 1f39bffa57..0000000000 Binary files a/graphics/pokemon/porygon_z/front.png and /dev/null differ diff --git a/graphics/pokemon/primeape/front.png b/graphics/pokemon/primeape/front.png deleted file mode 100644 index 199c8ff23d..0000000000 Binary files a/graphics/pokemon/primeape/front.png and /dev/null differ diff --git a/graphics/pokemon/prinplup/front.png b/graphics/pokemon/prinplup/front.png deleted file mode 100644 index a4b84554dd..0000000000 Binary files a/graphics/pokemon/prinplup/front.png and /dev/null differ diff --git a/graphics/pokemon/probopass/front.png b/graphics/pokemon/probopass/front.png deleted file mode 100644 index 21916b3762..0000000000 Binary files a/graphics/pokemon/probopass/front.png and /dev/null differ diff --git a/graphics/pokemon/probopass/icon.png b/graphics/pokemon/probopass/icon.png index fe2df5f2e9..dbbe9c16a3 100644 Binary files a/graphics/pokemon/probopass/icon.png and b/graphics/pokemon/probopass/icon.png differ diff --git a/graphics/pokemon/psyduck/front.png b/graphics/pokemon/psyduck/front.png deleted file mode 100644 index 523d337814..0000000000 Binary files a/graphics/pokemon/psyduck/front.png and /dev/null differ diff --git a/graphics/pokemon/pumpkaboo/back.png b/graphics/pokemon/pumpkaboo/back.png index 586016235d..9744f39664 100644 Binary files a/graphics/pokemon/pumpkaboo/back.png and b/graphics/pokemon/pumpkaboo/back.png differ diff --git a/graphics/pokemon/pumpkaboo/front.png b/graphics/pokemon/pumpkaboo/front.png deleted file mode 100644 index d55ed24ab8..0000000000 Binary files a/graphics/pokemon/pumpkaboo/front.png and /dev/null differ diff --git a/graphics/pokemon/pumpkaboo/large/back.png b/graphics/pokemon/pumpkaboo/large/back.png index 571144ecf9..e5deba0d7d 100644 Binary files a/graphics/pokemon/pumpkaboo/large/back.png and b/graphics/pokemon/pumpkaboo/large/back.png differ diff --git a/graphics/pokemon/pumpkaboo/large/front.png b/graphics/pokemon/pumpkaboo/large/front.png deleted file mode 100644 index d3df6bca4b..0000000000 Binary files a/graphics/pokemon/pumpkaboo/large/front.png and /dev/null differ diff --git a/graphics/pokemon/pumpkaboo/small/back.png b/graphics/pokemon/pumpkaboo/small/back.png index 23283b1b30..5d7c21e346 100644 Binary files a/graphics/pokemon/pumpkaboo/small/back.png and b/graphics/pokemon/pumpkaboo/small/back.png differ diff --git a/graphics/pokemon/pumpkaboo/small/front.png b/graphics/pokemon/pumpkaboo/small/front.png deleted file mode 100644 index 8f22eea389..0000000000 Binary files a/graphics/pokemon/pumpkaboo/small/front.png and /dev/null differ diff --git a/graphics/pokemon/pumpkaboo/super/back.png b/graphics/pokemon/pumpkaboo/super/back.png index f14291657e..85cc83e2c0 100644 Binary files a/graphics/pokemon/pumpkaboo/super/back.png and b/graphics/pokemon/pumpkaboo/super/back.png differ diff --git a/graphics/pokemon/pumpkaboo/super/front.png b/graphics/pokemon/pumpkaboo/super/front.png deleted file mode 100644 index 3a5d1c1d2d..0000000000 Binary files a/graphics/pokemon/pumpkaboo/super/front.png and /dev/null differ diff --git a/graphics/pokemon/pupitar/front.png b/graphics/pokemon/pupitar/front.png deleted file mode 100644 index cc7fda7150..0000000000 Binary files a/graphics/pokemon/pupitar/front.png and /dev/null differ diff --git a/graphics/pokemon/purrloin/front.png b/graphics/pokemon/purrloin/front.png deleted file mode 100644 index 0d329d15c9..0000000000 Binary files a/graphics/pokemon/purrloin/front.png and /dev/null differ diff --git a/graphics/pokemon/purugly/front.png b/graphics/pokemon/purugly/front.png deleted file mode 100644 index 4d8a5da49d..0000000000 Binary files a/graphics/pokemon/purugly/front.png and /dev/null differ diff --git a/graphics/pokemon/pyroar/front.png b/graphics/pokemon/pyroar/front.png deleted file mode 100644 index a7e266167b..0000000000 Binary files a/graphics/pokemon/pyroar/front.png and /dev/null differ diff --git a/graphics/pokemon/pyroar/icon.png b/graphics/pokemon/pyroar/icon.png index cd0b94401f..e00595a159 100644 Binary files a/graphics/pokemon/pyroar/icon.png and b/graphics/pokemon/pyroar/icon.png differ diff --git a/graphics/pokemon/quagsire/front.png b/graphics/pokemon/quagsire/front.png deleted file mode 100644 index 41b4ad26b3..0000000000 Binary files a/graphics/pokemon/quagsire/front.png and /dev/null differ diff --git a/graphics/pokemon/question_mark/circled/front.png b/graphics/pokemon/question_mark/circled/front.png deleted file mode 100644 index 3056402db4..0000000000 Binary files a/graphics/pokemon/question_mark/circled/front.png and /dev/null differ diff --git a/graphics/pokemon/question_mark/double/front.png b/graphics/pokemon/question_mark/double/front.png deleted file mode 100644 index f23b08476d..0000000000 Binary files a/graphics/pokemon/question_mark/double/front.png and /dev/null differ diff --git a/graphics/pokemon/quilava/anim_front.png b/graphics/pokemon/quilava/anim_front.png index 1c2709eb4f..e65df16880 100644 Binary files a/graphics/pokemon/quilava/anim_front.png and b/graphics/pokemon/quilava/anim_front.png differ diff --git a/graphics/pokemon/quilava/back.png b/graphics/pokemon/quilava/back.png index e6911c2b81..282cfea209 100644 Binary files a/graphics/pokemon/quilava/back.png and b/graphics/pokemon/quilava/back.png differ diff --git a/graphics/pokemon/quilava/front.png b/graphics/pokemon/quilava/front.png deleted file mode 100644 index 061f319982..0000000000 Binary files a/graphics/pokemon/quilava/front.png and /dev/null differ diff --git a/graphics/pokemon/quilava/normal.pal b/graphics/pokemon/quilava/normal.pal index c6f175d1e4..c59061cc84 100644 --- a/graphics/pokemon/quilava/normal.pal +++ b/graphics/pokemon/quilava/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -216 0 0 -248 88 0 -248 208 0 -248 152 0 -40 104 104 -40 64 96 -56 136 144 +222 0 0 +255 90 0 +255 213 0 +255 156 0 +24 98 131 +49 65 106 +65 156 172 16 16 16 168 0 0 248 248 248 -176 152 80 -248 232 160 -224 200 104 -136 96 32 +180 156 82 +255 238 164 +230 205 106 +139 98 32 16 48 56 diff --git a/graphics/pokemon/quilladin/front.png b/graphics/pokemon/quilladin/front.png deleted file mode 100644 index 4a6264fa47..0000000000 Binary files a/graphics/pokemon/quilladin/front.png and /dev/null differ diff --git a/graphics/pokemon/qwilfish/front.png b/graphics/pokemon/qwilfish/front.png deleted file mode 100644 index 6fd19c1346..0000000000 Binary files a/graphics/pokemon/qwilfish/front.png and /dev/null differ diff --git a/graphics/pokemon/qwilfish/hisuian/back.png b/graphics/pokemon/qwilfish/hisuian/back.png old mode 100644 new mode 100755 index 48a01e06f2..7504a692af Binary files a/graphics/pokemon/qwilfish/hisuian/back.png and b/graphics/pokemon/qwilfish/hisuian/back.png differ diff --git a/graphics/pokemon/qwilfish/hisuian/front.png b/graphics/pokemon/qwilfish/hisuian/front.png old mode 100644 new mode 100755 index a32988cf7d..0de50b7860 Binary files a/graphics/pokemon/qwilfish/hisuian/front.png and b/graphics/pokemon/qwilfish/hisuian/front.png differ diff --git a/graphics/pokemon/qwilfish/hisuian/normal.pal b/graphics/pokemon/qwilfish/hisuian/normal.pal old mode 100644 new mode 100755 index b1a2bcd32b..91f73ab4d4 --- a/graphics/pokemon/qwilfish/hisuian/normal.pal +++ b/graphics/pokemon/qwilfish/hisuian/normal.pal @@ -3,17 +3,17 @@ JASC-PAL 16 152 208 160 120 32 96 -240 64 208 +240 68 208 16 16 16 -184 48 152 -128 128 128 -64 64 72 -40 40 48 -88 88 96 +56 56 64 +40 44 48 +80 84 96 +184 52 152 152 136 80 -176 160 120 -184 192 192 +184 180 144 +112 116 128 +168 172 168 +248 252 248 88 80 40 -248 248 248 -184 176 144 +0 0 0 0 0 0 diff --git a/graphics/pokemon/qwilfish/hisuian/shiny.pal b/graphics/pokemon/qwilfish/hisuian/shiny.pal old mode 100644 new mode 100755 index 79d490248c..06729e52ae --- a/graphics/pokemon/qwilfish/hisuian/shiny.pal +++ b/graphics/pokemon/qwilfish/hisuian/shiny.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -40 48 128 -120 112 208 +88 68 192 +128 92 240 16 16 16 -96 88 184 -208 224 240 -136 136 152 -80 80 96 -168 184 208 -168 160 136 -184 184 168 -184 192 192 -96 96 80 -248 248 248 -200 192 184 +128 128 144 +40 44 48 +168 168 184 +88 68 192 +152 136 80 +184 180 144 +200 200 208 +168 172 168 +248 252 248 +88 80 40 +0 0 0 0 0 0 diff --git a/graphics/pokemon/raichu/front.png b/graphics/pokemon/raichu/front.png deleted file mode 100644 index 3b50a23184..0000000000 Binary files a/graphics/pokemon/raichu/front.png and /dev/null differ diff --git a/graphics/pokemon/raikou/front.png b/graphics/pokemon/raikou/front.png deleted file mode 100644 index b729a2c375..0000000000 Binary files a/graphics/pokemon/raikou/front.png and /dev/null differ diff --git a/graphics/pokemon/raikou/icon.png b/graphics/pokemon/raikou/icon.png index fb0d48a5fd..77cc29d7e9 100644 Binary files a/graphics/pokemon/raikou/icon.png and b/graphics/pokemon/raikou/icon.png differ diff --git a/graphics/pokemon/ralts/front.png b/graphics/pokemon/ralts/front.png deleted file mode 100644 index 6831c3897e..0000000000 Binary files a/graphics/pokemon/ralts/front.png and /dev/null differ diff --git a/graphics/pokemon/rampardos/front.png b/graphics/pokemon/rampardos/front.png deleted file mode 100644 index 09fa06dfba..0000000000 Binary files a/graphics/pokemon/rampardos/front.png and /dev/null differ diff --git a/graphics/pokemon/rapidash/front.png b/graphics/pokemon/rapidash/front.png deleted file mode 100644 index d0fb296f50..0000000000 Binary files a/graphics/pokemon/rapidash/front.png and /dev/null differ diff --git a/graphics/pokemon/rapidash/icon.png b/graphics/pokemon/rapidash/icon.png index 92dae70a64..a15a0a18a2 100644 Binary files a/graphics/pokemon/rapidash/icon.png and b/graphics/pokemon/rapidash/icon.png differ diff --git a/graphics/pokemon/raticate/front.png b/graphics/pokemon/raticate/front.png deleted file mode 100644 index 3d2d33ea5c..0000000000 Binary files a/graphics/pokemon/raticate/front.png and /dev/null differ diff --git a/graphics/pokemon/rattata/front.png b/graphics/pokemon/rattata/front.png deleted file mode 100644 index eebe101f9a..0000000000 Binary files a/graphics/pokemon/rattata/front.png and /dev/null differ diff --git a/graphics/pokemon/rayquaza/front.png b/graphics/pokemon/rayquaza/front.png deleted file mode 100644 index 57123a773d..0000000000 Binary files a/graphics/pokemon/rayquaza/front.png and /dev/null differ diff --git a/graphics/pokemon/regice/front.png b/graphics/pokemon/regice/front.png deleted file mode 100644 index e369c63446..0000000000 Binary files a/graphics/pokemon/regice/front.png and /dev/null differ diff --git a/graphics/pokemon/regigigas/front.png b/graphics/pokemon/regigigas/front.png deleted file mode 100644 index 7cb87a1ccf..0000000000 Binary files a/graphics/pokemon/regigigas/front.png and /dev/null differ diff --git a/graphics/pokemon/regirock/front.png b/graphics/pokemon/regirock/front.png deleted file mode 100644 index 4ba1f41d80..0000000000 Binary files a/graphics/pokemon/regirock/front.png and /dev/null differ diff --git a/graphics/pokemon/registeel/front.png b/graphics/pokemon/registeel/front.png deleted file mode 100644 index 844ab20c07..0000000000 Binary files a/graphics/pokemon/registeel/front.png and /dev/null differ diff --git a/graphics/pokemon/relicanth/back.png b/graphics/pokemon/relicanth/back.png index cf4886a6b7..678602343a 100644 Binary files a/graphics/pokemon/relicanth/back.png and b/graphics/pokemon/relicanth/back.png differ diff --git a/graphics/pokemon/relicanth/front.png b/graphics/pokemon/relicanth/front.png deleted file mode 100644 index 552b2421d5..0000000000 Binary files a/graphics/pokemon/relicanth/front.png and /dev/null differ diff --git a/graphics/pokemon/remoraid/front.png b/graphics/pokemon/remoraid/front.png deleted file mode 100644 index 8cf4b86641..0000000000 Binary files a/graphics/pokemon/remoraid/front.png and /dev/null differ diff --git a/graphics/pokemon/reshiram/back.png b/graphics/pokemon/reshiram/back.png index d62cdbdb5b..2738d144ee 100644 Binary files a/graphics/pokemon/reshiram/back.png and b/graphics/pokemon/reshiram/back.png differ diff --git a/graphics/pokemon/reshiram/front.png b/graphics/pokemon/reshiram/front.png deleted file mode 100644 index 22d7be6e50..0000000000 Binary files a/graphics/pokemon/reshiram/front.png and /dev/null differ diff --git a/graphics/pokemon/reshiram/icon.png b/graphics/pokemon/reshiram/icon.png index 721b3a70fe..9bd6457f3e 100644 Binary files a/graphics/pokemon/reshiram/icon.png and b/graphics/pokemon/reshiram/icon.png differ diff --git a/graphics/pokemon/reuniclus/anim_front.png b/graphics/pokemon/reuniclus/anim_front.png index 9f9f38975c..c635f0befa 100644 Binary files a/graphics/pokemon/reuniclus/anim_front.png and b/graphics/pokemon/reuniclus/anim_front.png differ diff --git a/graphics/pokemon/reuniclus/front.png b/graphics/pokemon/reuniclus/front.png deleted file mode 100644 index d189c0bf40..0000000000 Binary files a/graphics/pokemon/reuniclus/front.png and /dev/null differ diff --git a/graphics/pokemon/rhydon/front.png b/graphics/pokemon/rhydon/front.png deleted file mode 100644 index 3c71e500ef..0000000000 Binary files a/graphics/pokemon/rhydon/front.png and /dev/null differ diff --git a/graphics/pokemon/rhyhorn/front.png b/graphics/pokemon/rhyhorn/front.png deleted file mode 100644 index 78cb30c3ff..0000000000 Binary files a/graphics/pokemon/rhyhorn/front.png and /dev/null differ diff --git a/graphics/pokemon/rhyperior/front.png b/graphics/pokemon/rhyperior/front.png deleted file mode 100644 index 7c20072cf7..0000000000 Binary files a/graphics/pokemon/rhyperior/front.png and /dev/null differ diff --git a/graphics/pokemon/riolu/back.png b/graphics/pokemon/riolu/back.png index ebb100ba15..10d47dfd58 100644 Binary files a/graphics/pokemon/riolu/back.png and b/graphics/pokemon/riolu/back.png differ diff --git a/graphics/pokemon/riolu/front.png b/graphics/pokemon/riolu/front.png deleted file mode 100644 index fbba5f54b6..0000000000 Binary files a/graphics/pokemon/riolu/front.png and /dev/null differ diff --git a/graphics/pokemon/roggenrola/front.png b/graphics/pokemon/roggenrola/front.png deleted file mode 100644 index b63929ad29..0000000000 Binary files a/graphics/pokemon/roggenrola/front.png and /dev/null differ diff --git a/graphics/pokemon/roselia/front.png b/graphics/pokemon/roselia/front.png deleted file mode 100644 index ea92a4474c..0000000000 Binary files a/graphics/pokemon/roselia/front.png and /dev/null differ diff --git a/graphics/pokemon/roserade/front.png b/graphics/pokemon/roserade/front.png deleted file mode 100644 index 34c283b967..0000000000 Binary files a/graphics/pokemon/roserade/front.png and /dev/null differ diff --git a/graphics/pokemon/rotom/fan/front.png b/graphics/pokemon/rotom/fan/front.png deleted file mode 100644 index 30f58175ea..0000000000 Binary files a/graphics/pokemon/rotom/fan/front.png and /dev/null differ diff --git a/graphics/pokemon/rotom/front.png b/graphics/pokemon/rotom/front.png deleted file mode 100644 index f6141a7097..0000000000 Binary files a/graphics/pokemon/rotom/front.png and /dev/null differ diff --git a/graphics/pokemon/rotom/frost/front.png b/graphics/pokemon/rotom/frost/front.png deleted file mode 100644 index d94fd9376b..0000000000 Binary files a/graphics/pokemon/rotom/frost/front.png and /dev/null differ diff --git a/graphics/pokemon/rotom/heat/front.png b/graphics/pokemon/rotom/heat/front.png deleted file mode 100644 index 59878b8bb8..0000000000 Binary files a/graphics/pokemon/rotom/heat/front.png and /dev/null differ diff --git a/graphics/pokemon/rotom/icon.png b/graphics/pokemon/rotom/icon.png index 354b6fd3dc..e2ecc8b804 100644 Binary files a/graphics/pokemon/rotom/icon.png and b/graphics/pokemon/rotom/icon.png differ diff --git a/graphics/pokemon/rotom/mow/front.png b/graphics/pokemon/rotom/mow/front.png deleted file mode 100644 index 41031736f6..0000000000 Binary files a/graphics/pokemon/rotom/mow/front.png and /dev/null differ diff --git a/graphics/pokemon/rotom/wash/front.png b/graphics/pokemon/rotom/wash/front.png deleted file mode 100644 index 5313d0302c..0000000000 Binary files a/graphics/pokemon/rotom/wash/front.png and /dev/null differ diff --git a/graphics/pokemon/rufflet/front.png b/graphics/pokemon/rufflet/front.png deleted file mode 100644 index b3e83329b0..0000000000 Binary files a/graphics/pokemon/rufflet/front.png and /dev/null differ diff --git a/graphics/pokemon/rufflet/icon.png b/graphics/pokemon/rufflet/icon.png index 331e60465a..f9129355a3 100644 Binary files a/graphics/pokemon/rufflet/icon.png and b/graphics/pokemon/rufflet/icon.png differ diff --git a/graphics/pokemon/sableye/front.png b/graphics/pokemon/sableye/front.png deleted file mode 100644 index 02d95cca08..0000000000 Binary files a/graphics/pokemon/sableye/front.png and /dev/null differ diff --git a/graphics/pokemon/salamence/front.png b/graphics/pokemon/salamence/front.png deleted file mode 100644 index 6f1a13419d..0000000000 Binary files a/graphics/pokemon/salamence/front.png and /dev/null differ diff --git a/graphics/pokemon/salamence/icon.png b/graphics/pokemon/salamence/icon.png index 16cdf981f4..74b4ae776a 100644 Binary files a/graphics/pokemon/salamence/icon.png and b/graphics/pokemon/salamence/icon.png differ diff --git a/graphics/pokemon/samurott/front.png b/graphics/pokemon/samurott/front.png deleted file mode 100644 index ceef8bab9d..0000000000 Binary files a/graphics/pokemon/samurott/front.png and /dev/null differ diff --git a/graphics/pokemon/samurott/hisuian/back.png b/graphics/pokemon/samurott/hisuian/back.png new file mode 100755 index 0000000000..36ed737d3e Binary files /dev/null and b/graphics/pokemon/samurott/hisuian/back.png differ diff --git a/graphics/pokemon/samurott/hisuian/front.png b/graphics/pokemon/samurott/hisuian/front.png new file mode 100755 index 0000000000..65e62201c5 Binary files /dev/null and b/graphics/pokemon/samurott/hisuian/front.png differ diff --git a/graphics/pokemon/samurott/hisuian/normal.pal b/graphics/pokemon/samurott/hisuian/normal.pal new file mode 100755 index 0000000000..b74abccb93 --- /dev/null +++ b/graphics/pokemon/samurott/hisuian/normal.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +152 208 160 +128 164 160 +168 44 64 +72 72 72 +248 252 248 +104 28 48 +16 16 16 +40 44 96 +88 112 112 +32 88 152 +208 80 96 +24 20 48 +192 196 200 +28 56 96 +20 32 72 +0 0 0 diff --git a/graphics/pokemon/samurott/hisuian/shiny.pal b/graphics/pokemon/samurott/hisuian/shiny.pal new file mode 100755 index 0000000000..c2afba6f47 --- /dev/null +++ b/graphics/pokemon/samurott/hisuian/shiny.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +152 208 160 +128 164 160 +200 172 152 +72 72 72 +248 252 248 +168 116 96 +16 16 16 +224 220 224 +88 112 112 +32 88 152 +208 80 96 +24 20 48 +192 196 200 +28 56 96 +168 156 168 +0 0 0 diff --git a/graphics/pokemon/sandile/front.png b/graphics/pokemon/sandile/front.png deleted file mode 100644 index 21ff3c968a..0000000000 Binary files a/graphics/pokemon/sandile/front.png and /dev/null differ diff --git a/graphics/pokemon/sandshrew/front.png b/graphics/pokemon/sandshrew/front.png deleted file mode 100644 index a3a6ea88f6..0000000000 Binary files a/graphics/pokemon/sandshrew/front.png and /dev/null differ diff --git a/graphics/pokemon/sandslash/front.png b/graphics/pokemon/sandslash/front.png deleted file mode 100644 index bbbf311b5e..0000000000 Binary files a/graphics/pokemon/sandslash/front.png and /dev/null differ diff --git a/graphics/pokemon/sandslash/icon.png b/graphics/pokemon/sandslash/icon.png index a1d72a1ba7..18970df155 100644 Binary files a/graphics/pokemon/sandslash/icon.png and b/graphics/pokemon/sandslash/icon.png differ diff --git a/graphics/pokemon/sawk/front.png b/graphics/pokemon/sawk/front.png deleted file mode 100644 index a3ab005487..0000000000 Binary files a/graphics/pokemon/sawk/front.png and /dev/null differ diff --git a/graphics/pokemon/sawsbuck/autumn/back.png b/graphics/pokemon/sawsbuck/autumn/back.png index 029ddf1d6f..3d32c819b4 100644 Binary files a/graphics/pokemon/sawsbuck/autumn/back.png and b/graphics/pokemon/sawsbuck/autumn/back.png differ diff --git a/graphics/pokemon/sawsbuck/autumn/icon.png b/graphics/pokemon/sawsbuck/autumn/icon.png index 082cb94ead..bbbabecf1e 100644 Binary files a/graphics/pokemon/sawsbuck/autumn/icon.png and b/graphics/pokemon/sawsbuck/autumn/icon.png differ diff --git a/graphics/pokemon/sawsbuck/front.png b/graphics/pokemon/sawsbuck/front.png deleted file mode 100644 index 71aed05e37..0000000000 Binary files a/graphics/pokemon/sawsbuck/front.png and /dev/null differ diff --git a/graphics/pokemon/sawsbuck/summer/back.png b/graphics/pokemon/sawsbuck/summer/back.png index dc4071e2ea..aee6937c4b 100644 Binary files a/graphics/pokemon/sawsbuck/summer/back.png and b/graphics/pokemon/sawsbuck/summer/back.png differ diff --git a/graphics/pokemon/sawsbuck/summer/icon.png b/graphics/pokemon/sawsbuck/summer/icon.png index e699823cd6..6d46101dd1 100644 Binary files a/graphics/pokemon/sawsbuck/summer/icon.png and b/graphics/pokemon/sawsbuck/summer/icon.png differ diff --git a/graphics/pokemon/sawsbuck/winter/icon.png b/graphics/pokemon/sawsbuck/winter/icon.png index b7e7a3600d..ecb6ce1ade 100644 Binary files a/graphics/pokemon/sawsbuck/winter/icon.png and b/graphics/pokemon/sawsbuck/winter/icon.png differ diff --git a/graphics/pokemon/scatterbug/front.png b/graphics/pokemon/scatterbug/front.png deleted file mode 100644 index 0a8f680cac..0000000000 Binary files a/graphics/pokemon/scatterbug/front.png and /dev/null differ diff --git a/graphics/pokemon/sceptile/front.png b/graphics/pokemon/sceptile/front.png deleted file mode 100644 index f49aef7653..0000000000 Binary files a/graphics/pokemon/sceptile/front.png and /dev/null differ diff --git a/graphics/pokemon/scizor/front.png b/graphics/pokemon/scizor/front.png deleted file mode 100644 index f872c488b4..0000000000 Binary files a/graphics/pokemon/scizor/front.png and /dev/null differ diff --git a/graphics/pokemon/scolipede/front.png b/graphics/pokemon/scolipede/front.png deleted file mode 100644 index 7d254636f9..0000000000 Binary files a/graphics/pokemon/scolipede/front.png and /dev/null differ diff --git a/graphics/pokemon/scrafty/front.png b/graphics/pokemon/scrafty/front.png deleted file mode 100644 index 642dcb9665..0000000000 Binary files a/graphics/pokemon/scrafty/front.png and /dev/null differ diff --git a/graphics/pokemon/scraggy/front.png b/graphics/pokemon/scraggy/front.png deleted file mode 100644 index 1cade69cc9..0000000000 Binary files a/graphics/pokemon/scraggy/front.png and /dev/null differ diff --git a/graphics/pokemon/scraggy/icon.png b/graphics/pokemon/scraggy/icon.png index e63301f36b..f1baf8d078 100644 Binary files a/graphics/pokemon/scraggy/icon.png and b/graphics/pokemon/scraggy/icon.png differ diff --git a/graphics/pokemon/scyther/front.png b/graphics/pokemon/scyther/front.png deleted file mode 100644 index af7420c561..0000000000 Binary files a/graphics/pokemon/scyther/front.png and /dev/null differ diff --git a/graphics/pokemon/seadra/front.png b/graphics/pokemon/seadra/front.png deleted file mode 100644 index c782ae3e15..0000000000 Binary files a/graphics/pokemon/seadra/front.png and /dev/null differ diff --git a/graphics/pokemon/seaking/front.png b/graphics/pokemon/seaking/front.png deleted file mode 100644 index f61a6a0fc2..0000000000 Binary files a/graphics/pokemon/seaking/front.png and /dev/null differ diff --git a/graphics/pokemon/sealeo/back.png b/graphics/pokemon/sealeo/back.png index 162838a2c8..84a89788b3 100644 Binary files a/graphics/pokemon/sealeo/back.png and b/graphics/pokemon/sealeo/back.png differ diff --git a/graphics/pokemon/sealeo/front.png b/graphics/pokemon/sealeo/front.png deleted file mode 100644 index 87d8fdb2fc..0000000000 Binary files a/graphics/pokemon/sealeo/front.png and /dev/null differ diff --git a/graphics/pokemon/seedot/front.png b/graphics/pokemon/seedot/front.png deleted file mode 100644 index 2ffd8d6668..0000000000 Binary files a/graphics/pokemon/seedot/front.png and /dev/null differ diff --git a/graphics/pokemon/seel/front.png b/graphics/pokemon/seel/front.png deleted file mode 100644 index d2cc2bc314..0000000000 Binary files a/graphics/pokemon/seel/front.png and /dev/null differ diff --git a/graphics/pokemon/seismitoad/front.png b/graphics/pokemon/seismitoad/front.png deleted file mode 100644 index e87b7a4a04..0000000000 Binary files a/graphics/pokemon/seismitoad/front.png and /dev/null differ diff --git a/graphics/pokemon/sentret/anim_front.png b/graphics/pokemon/sentret/anim_front.png index 820a036ac7..9986d9d940 100644 Binary files a/graphics/pokemon/sentret/anim_front.png and b/graphics/pokemon/sentret/anim_front.png differ diff --git a/graphics/pokemon/sentret/front.png b/graphics/pokemon/sentret/front.png deleted file mode 100644 index 6505891305..0000000000 Binary files a/graphics/pokemon/sentret/front.png and /dev/null differ diff --git a/graphics/pokemon/sentret/icon.png b/graphics/pokemon/sentret/icon.png index 9a8040833b..e95d75ccd4 100644 Binary files a/graphics/pokemon/sentret/icon.png and b/graphics/pokemon/sentret/icon.png differ diff --git a/graphics/pokemon/sentret/normal.pal b/graphics/pokemon/sentret/normal.pal index 1e09bf2d7d..093a3581db 100644 --- a/graphics/pokemon/sentret/normal.pal +++ b/graphics/pokemon/sentret/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -72 48 32 -56 8 0 -96 64 48 +74 49 32 +57 8 0 +98 65 49 16 16 16 -176 32 64 -216 64 72 -136 88 64 -200 160 128 -184 128 88 -248 248 248 -160 112 72 -56 24 16 -200 200 192 +180 32 65 +222 65 74 +139 90 65 +205 164 131 +189 131 90 +255 255 255 +164 115 74 +57 24 16 +205 205 197 0 0 0 0 0 0 diff --git a/graphics/pokemon/serperior/front.png b/graphics/pokemon/serperior/front.png deleted file mode 100644 index 8f26506a6c..0000000000 Binary files a/graphics/pokemon/serperior/front.png and /dev/null differ diff --git a/graphics/pokemon/servine/front.png b/graphics/pokemon/servine/front.png deleted file mode 100644 index ab5a141b95..0000000000 Binary files a/graphics/pokemon/servine/front.png and /dev/null differ diff --git a/graphics/pokemon/seviper/front.png b/graphics/pokemon/seviper/front.png deleted file mode 100644 index c80d9c80fd..0000000000 Binary files a/graphics/pokemon/seviper/front.png and /dev/null differ diff --git a/graphics/pokemon/seviper/icon.png b/graphics/pokemon/seviper/icon.png index 192e40a167..f6beb9f856 100644 Binary files a/graphics/pokemon/seviper/icon.png and b/graphics/pokemon/seviper/icon.png differ diff --git a/graphics/pokemon/sewaddle/front.png b/graphics/pokemon/sewaddle/front.png deleted file mode 100644 index 7f01fe90c9..0000000000 Binary files a/graphics/pokemon/sewaddle/front.png and /dev/null differ diff --git a/graphics/pokemon/sewaddle/icon.png b/graphics/pokemon/sewaddle/icon.png index 755c745d72..ae517307b4 100644 Binary files a/graphics/pokemon/sewaddle/icon.png and b/graphics/pokemon/sewaddle/icon.png differ diff --git a/graphics/pokemon/sharpedo/front.png b/graphics/pokemon/sharpedo/front.png deleted file mode 100644 index 67db44c34f..0000000000 Binary files a/graphics/pokemon/sharpedo/front.png and /dev/null differ diff --git a/graphics/pokemon/sharpedo/icon.png b/graphics/pokemon/sharpedo/icon.png index 2782511a3a..87a1c7e409 100644 Binary files a/graphics/pokemon/sharpedo/icon.png and b/graphics/pokemon/sharpedo/icon.png differ diff --git a/graphics/pokemon/shaymin/front.png b/graphics/pokemon/shaymin/front.png deleted file mode 100644 index f8e3169035..0000000000 Binary files a/graphics/pokemon/shaymin/front.png and /dev/null differ diff --git a/graphics/pokemon/shaymin/sky/front.png b/graphics/pokemon/shaymin/sky/front.png deleted file mode 100644 index 190c4ebf69..0000000000 Binary files a/graphics/pokemon/shaymin/sky/front.png and /dev/null differ diff --git a/graphics/pokemon/shedinja/front.png b/graphics/pokemon/shedinja/front.png deleted file mode 100644 index 9c217d7738..0000000000 Binary files a/graphics/pokemon/shedinja/front.png and /dev/null differ diff --git a/graphics/pokemon/shelgon/front.png b/graphics/pokemon/shelgon/front.png deleted file mode 100644 index 713ba52269..0000000000 Binary files a/graphics/pokemon/shelgon/front.png and /dev/null differ diff --git a/graphics/pokemon/shellder/front.png b/graphics/pokemon/shellder/front.png deleted file mode 100644 index 4c3e7f5228..0000000000 Binary files a/graphics/pokemon/shellder/front.png and /dev/null differ diff --git a/graphics/pokemon/shellder/icon.png b/graphics/pokemon/shellder/icon.png index 8d74f82624..8ffeb3edfa 100644 Binary files a/graphics/pokemon/shellder/icon.png and b/graphics/pokemon/shellder/icon.png differ diff --git a/graphics/pokemon/shellos/east_sea/back.png b/graphics/pokemon/shellos/east_sea/back.png index 0613c7a58a..2cb650a28c 100644 Binary files a/graphics/pokemon/shellos/east_sea/back.png and b/graphics/pokemon/shellos/east_sea/back.png differ diff --git a/graphics/pokemon/shellos/east_sea/front.png b/graphics/pokemon/shellos/east_sea/front.png deleted file mode 100644 index 79d1c97cc6..0000000000 Binary files a/graphics/pokemon/shellos/east_sea/front.png and /dev/null differ diff --git a/graphics/pokemon/shellos/east_sea/icon.png b/graphics/pokemon/shellos/east_sea/icon.png index befc659c1c..35610eb27c 100644 Binary files a/graphics/pokemon/shellos/east_sea/icon.png and b/graphics/pokemon/shellos/east_sea/icon.png differ diff --git a/graphics/pokemon/shellos/front.png b/graphics/pokemon/shellos/front.png deleted file mode 100644 index 0d1be14f6a..0000000000 Binary files a/graphics/pokemon/shellos/front.png and /dev/null differ diff --git a/graphics/pokemon/shelmet/front.png b/graphics/pokemon/shelmet/front.png deleted file mode 100644 index e881e71495..0000000000 Binary files a/graphics/pokemon/shelmet/front.png and /dev/null differ diff --git a/graphics/pokemon/shieldon/front.png b/graphics/pokemon/shieldon/front.png deleted file mode 100644 index d668a7b76a..0000000000 Binary files a/graphics/pokemon/shieldon/front.png and /dev/null differ diff --git a/graphics/pokemon/shiftry/front.png b/graphics/pokemon/shiftry/front.png deleted file mode 100644 index 15e263cb94..0000000000 Binary files a/graphics/pokemon/shiftry/front.png and /dev/null differ diff --git a/graphics/pokemon/shiftry/icon.png b/graphics/pokemon/shiftry/icon.png index 14b4bdab6a..3d2be13a68 100644 Binary files a/graphics/pokemon/shiftry/icon.png and b/graphics/pokemon/shiftry/icon.png differ diff --git a/graphics/pokemon/shinx/anim_frontf.png b/graphics/pokemon/shinx/anim_frontf.png index 226c6f3bda..2ee34f0968 100644 Binary files a/graphics/pokemon/shinx/anim_frontf.png and b/graphics/pokemon/shinx/anim_frontf.png differ diff --git a/graphics/pokemon/shinx/backf.png b/graphics/pokemon/shinx/backf.png index 24108fbf30..805ee62ee3 100644 Binary files a/graphics/pokemon/shinx/backf.png and b/graphics/pokemon/shinx/backf.png differ diff --git a/graphics/pokemon/shinx/front.png b/graphics/pokemon/shinx/front.png deleted file mode 100644 index f6d437c6e5..0000000000 Binary files a/graphics/pokemon/shinx/front.png and /dev/null differ diff --git a/graphics/pokemon/shroomish/front.png b/graphics/pokemon/shroomish/front.png deleted file mode 100644 index 0a43892046..0000000000 Binary files a/graphics/pokemon/shroomish/front.png and /dev/null differ diff --git a/graphics/pokemon/shuckle/front.png b/graphics/pokemon/shuckle/front.png deleted file mode 100644 index 0b00c414d1..0000000000 Binary files a/graphics/pokemon/shuckle/front.png and /dev/null differ diff --git a/graphics/pokemon/shuppet/back.png b/graphics/pokemon/shuppet/back.png index 61efa5110d..c25c8567e0 100644 Binary files a/graphics/pokemon/shuppet/back.png and b/graphics/pokemon/shuppet/back.png differ diff --git a/graphics/pokemon/shuppet/front.png b/graphics/pokemon/shuppet/front.png deleted file mode 100644 index e2633121a5..0000000000 Binary files a/graphics/pokemon/shuppet/front.png and /dev/null differ diff --git a/graphics/pokemon/sigilyph/front.png b/graphics/pokemon/sigilyph/front.png deleted file mode 100644 index 8ce63b8376..0000000000 Binary files a/graphics/pokemon/sigilyph/front.png and /dev/null differ diff --git a/graphics/pokemon/sigilyph/icon.png b/graphics/pokemon/sigilyph/icon.png index c599ce22a2..afaf880d54 100644 Binary files a/graphics/pokemon/sigilyph/icon.png and b/graphics/pokemon/sigilyph/icon.png differ diff --git a/graphics/pokemon/silcoon/front.png b/graphics/pokemon/silcoon/front.png deleted file mode 100644 index e6f2a614cd..0000000000 Binary files a/graphics/pokemon/silcoon/front.png and /dev/null differ diff --git a/graphics/pokemon/silvally/back.png b/graphics/pokemon/silvally/back.png index 3994f8bf20..94c3826cbd 100644 Binary files a/graphics/pokemon/silvally/back.png and b/graphics/pokemon/silvally/back.png differ diff --git a/graphics/pokemon/silvally/front.png b/graphics/pokemon/silvally/front.png index a0caf35b63..01d9f14a9c 100644 Binary files a/graphics/pokemon/silvally/front.png and b/graphics/pokemon/silvally/front.png differ diff --git a/graphics/pokemon/simipour/front.png b/graphics/pokemon/simipour/front.png deleted file mode 100644 index 3ea50454c9..0000000000 Binary files a/graphics/pokemon/simipour/front.png and /dev/null differ diff --git a/graphics/pokemon/simisage/front.png b/graphics/pokemon/simisage/front.png deleted file mode 100644 index 22e5dff398..0000000000 Binary files a/graphics/pokemon/simisage/front.png and /dev/null differ diff --git a/graphics/pokemon/simisear/front.png b/graphics/pokemon/simisear/front.png deleted file mode 100644 index c8ce5ef588..0000000000 Binary files a/graphics/pokemon/simisear/front.png and /dev/null differ diff --git a/graphics/pokemon/sirfetchd/front.png b/graphics/pokemon/sirfetchd/front.png index a7ac2a974a..3ae79de6e6 100644 Binary files a/graphics/pokemon/sirfetchd/front.png and b/graphics/pokemon/sirfetchd/front.png differ diff --git a/graphics/pokemon/skarmory/front.png b/graphics/pokemon/skarmory/front.png deleted file mode 100644 index 719acd0f8f..0000000000 Binary files a/graphics/pokemon/skarmory/front.png and /dev/null differ diff --git a/graphics/pokemon/skiddo/front.png b/graphics/pokemon/skiddo/front.png deleted file mode 100644 index 1f7d3545ec..0000000000 Binary files a/graphics/pokemon/skiddo/front.png and /dev/null differ diff --git a/graphics/pokemon/skiploom/front.png b/graphics/pokemon/skiploom/front.png deleted file mode 100644 index 8bbabfd30b..0000000000 Binary files a/graphics/pokemon/skiploom/front.png and /dev/null differ diff --git a/graphics/pokemon/skitty/front.png b/graphics/pokemon/skitty/front.png deleted file mode 100644 index 2a7321c268..0000000000 Binary files a/graphics/pokemon/skitty/front.png and /dev/null differ diff --git a/graphics/pokemon/skorupi/front.png b/graphics/pokemon/skorupi/front.png deleted file mode 100644 index 480051932f..0000000000 Binary files a/graphics/pokemon/skorupi/front.png and /dev/null differ diff --git a/graphics/pokemon/skrelp/front.png b/graphics/pokemon/skrelp/front.png deleted file mode 100644 index 91991a86cd..0000000000 Binary files a/graphics/pokemon/skrelp/front.png and /dev/null differ diff --git a/graphics/pokemon/skuntank/front.png b/graphics/pokemon/skuntank/front.png deleted file mode 100644 index d188535e26..0000000000 Binary files a/graphics/pokemon/skuntank/front.png and /dev/null differ diff --git a/graphics/pokemon/slaking/front.png b/graphics/pokemon/slaking/front.png deleted file mode 100644 index bc7ed93b02..0000000000 Binary files a/graphics/pokemon/slaking/front.png and /dev/null differ diff --git a/graphics/pokemon/slakoth/front.png b/graphics/pokemon/slakoth/front.png deleted file mode 100644 index e40b34fb27..0000000000 Binary files a/graphics/pokemon/slakoth/front.png and /dev/null differ diff --git a/graphics/pokemon/slakoth/icon.png b/graphics/pokemon/slakoth/icon.png index 3b408571f1..e11811efe1 100644 Binary files a/graphics/pokemon/slakoth/icon.png and b/graphics/pokemon/slakoth/icon.png differ diff --git a/graphics/pokemon/sliggoo/front.png b/graphics/pokemon/sliggoo/front.png deleted file mode 100644 index 1a7f094cd4..0000000000 Binary files a/graphics/pokemon/sliggoo/front.png and /dev/null differ diff --git a/graphics/pokemon/sliggoo/hisuian/back.png b/graphics/pokemon/sliggoo/hisuian/back.png old mode 100644 new mode 100755 index ad4289b1b2..276ac99152 Binary files a/graphics/pokemon/sliggoo/hisuian/back.png and b/graphics/pokemon/sliggoo/hisuian/back.png differ diff --git a/graphics/pokemon/sliggoo/hisuian/front.png b/graphics/pokemon/sliggoo/hisuian/front.png old mode 100644 new mode 100755 index 81322c4856..3b9edc41cf Binary files a/graphics/pokemon/sliggoo/hisuian/front.png and b/graphics/pokemon/sliggoo/hisuian/front.png differ diff --git a/graphics/pokemon/sliggoo/hisuian/normal.pal b/graphics/pokemon/sliggoo/hisuian/normal.pal old mode 100644 new mode 100755 index 5f3e5ae0cd..13ef27a9cc --- a/graphics/pokemon/sliggoo/hisuian/normal.pal +++ b/graphics/pokemon/sliggoo/hisuian/normal.pal @@ -1,19 +1,19 @@ JASC-PAL 0100 16 -232 224 176 -128 96 112 -240 240 240 -216 192 208 -168 152 168 -8 8 8 -136 136 136 -72 152 80 +152 208 160 +96 72 88 +192 160 192 +16 16 16 +232 216 232 +144 120 136 +64 108 96 +96 156 144 +128 128 128 +72 76 72 +168 168 168 200 200 200 -64 64 64 -88 200 80 -176 176 176 -168 152 192 -64 56 88 -136 104 168 -104 96 104 +128 92 152 +168 128 192 +88 48 96 +0 0 0 diff --git a/graphics/pokemon/sliggoo/hisuian/shiny.pal b/graphics/pokemon/sliggoo/hisuian/shiny.pal old mode 100644 new mode 100755 index 9cccd5d391..69d4e4fbe1 --- a/graphics/pokemon/sliggoo/hisuian/shiny.pal +++ b/graphics/pokemon/sliggoo/hisuian/shiny.pal @@ -1,19 +1,19 @@ JASC-PAL 0100 16 -232 224 176 -128 96 112 -240 240 240 -216 192 208 -168 152 168 -8 8 8 -120 104 56 -72 152 80 -200 176 88 -56 40 32 -88 200 80 -160 136 72 -168 152 192 -64 56 88 -136 104 168 -104 96 104 +152 208 160 +101 73 92 +197 162 197 +16 16 16 +237 218 237 +144 120 136 +134 124 71 +170 171 96 +134 97 62 +72 76 72 +181 153 103 +200 200 200 +128 92 152 +168 128 192 +88 48 96 +0 0 0 diff --git a/graphics/pokemon/slowbro/front.png b/graphics/pokemon/slowbro/front.png deleted file mode 100644 index c0d69e069d..0000000000 Binary files a/graphics/pokemon/slowbro/front.png and /dev/null differ diff --git a/graphics/pokemon/slowking/front.png b/graphics/pokemon/slowking/front.png deleted file mode 100644 index d9af555c25..0000000000 Binary files a/graphics/pokemon/slowking/front.png and /dev/null differ diff --git a/graphics/pokemon/slowking/icon.png b/graphics/pokemon/slowking/icon.png index c4d5bdbe7a..8527e8982d 100644 Binary files a/graphics/pokemon/slowking/icon.png and b/graphics/pokemon/slowking/icon.png differ diff --git a/graphics/pokemon/slowpoke/front.png b/graphics/pokemon/slowpoke/front.png deleted file mode 100644 index aa53f9c555..0000000000 Binary files a/graphics/pokemon/slowpoke/front.png and /dev/null differ diff --git a/graphics/pokemon/slugma/front.png b/graphics/pokemon/slugma/front.png deleted file mode 100644 index a64ce0042a..0000000000 Binary files a/graphics/pokemon/slugma/front.png and /dev/null differ diff --git a/graphics/pokemon/slurpuff/front.png b/graphics/pokemon/slurpuff/front.png deleted file mode 100644 index fab831b363..0000000000 Binary files a/graphics/pokemon/slurpuff/front.png and /dev/null differ diff --git a/graphics/pokemon/smeargle/front.png b/graphics/pokemon/smeargle/front.png deleted file mode 100644 index 1804f2514c..0000000000 Binary files a/graphics/pokemon/smeargle/front.png and /dev/null differ diff --git a/graphics/pokemon/smoochum/front.png b/graphics/pokemon/smoochum/front.png deleted file mode 100644 index 6f49274809..0000000000 Binary files a/graphics/pokemon/smoochum/front.png and /dev/null differ diff --git a/graphics/pokemon/sneasel/front.png b/graphics/pokemon/sneasel/front.png deleted file mode 100644 index d422fe52e4..0000000000 Binary files a/graphics/pokemon/sneasel/front.png and /dev/null differ diff --git a/graphics/pokemon/sneasel/hisuian/back.png b/graphics/pokemon/sneasel/hisuian/back.png old mode 100644 new mode 100755 index ea1be20c85..b37d220118 Binary files a/graphics/pokemon/sneasel/hisuian/back.png and b/graphics/pokemon/sneasel/hisuian/back.png differ diff --git a/graphics/pokemon/sneasel/hisuian/front.png b/graphics/pokemon/sneasel/hisuian/front.png old mode 100644 new mode 100755 index 75e3872b15..75f42547e2 Binary files a/graphics/pokemon/sneasel/hisuian/front.png and b/graphics/pokemon/sneasel/hisuian/front.png differ diff --git a/graphics/pokemon/sneasel/hisuian/normal.pal b/graphics/pokemon/sneasel/hisuian/normal.pal old mode 100644 new mode 100755 index 2e28acaaca..47e254a81b --- a/graphics/pokemon/sneasel/hisuian/normal.pal +++ b/graphics/pokemon/sneasel/hisuian/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -120 88 176 -80 48 104 -160 120 216 -56 40 64 -152 152 160 +192 136 8 +152 152 200 +72 72 72 16 16 16 -216 216 224 -184 184 192 -128 96 160 -160 120 56 -232 192 48 -88 56 120 -240 240 248 -120 120 120 -232 56 64 +192 40 112 +248 220 120 +112 76 160 +40 32 72 +216 216 240 +184 188 192 +120 108 160 +84 74 128 +240 244 248 +80 52 120 +144 108 184 diff --git a/graphics/pokemon/sneasel/hisuian/shiny.pal b/graphics/pokemon/sneasel/hisuian/shiny.pal old mode 100644 new mode 100755 index b57227c930..7d59884494 --- a/graphics/pokemon/sneasel/hisuian/shiny.pal +++ b/graphics/pokemon/sneasel/hisuian/shiny.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -248 144 40 -168 72 16 -248 200 80 -32 24 32 -64 88 80 +28 136 168 +77 106 105 +72 72 72 16 16 16 -112 160 120 -88 128 104 -80 72 88 -64 112 224 -136 160 240 -48 40 48 -240 240 248 -120 120 120 -72 176 96 +222 222 71 +121 197 217 +204 155 40 +40 32 72 +117 149 149 +184 188 192 +84 75 107 +64 58 80 +240 244 248 +119 92 49 +235 201 84 diff --git a/graphics/pokemon/sneasler/back.png b/graphics/pokemon/sneasler/back.png new file mode 100755 index 0000000000..b39320894c Binary files /dev/null and b/graphics/pokemon/sneasler/back.png differ diff --git a/graphics/pokemon/sneasler/front.png b/graphics/pokemon/sneasler/front.png new file mode 100755 index 0000000000..67159da6bc Binary files /dev/null and b/graphics/pokemon/sneasler/front.png differ diff --git a/graphics/pokemon/sneasler/normal.pal b/graphics/pokemon/sneasler/normal.pal new file mode 100755 index 0000000000..5cc13df592 --- /dev/null +++ b/graphics/pokemon/sneasler/normal.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +156 213 164 +49 41 49 +74 74 98 +74 57 82 +123 139 180 +16 16 16 +164 189 222 +164 123 57 +123 98 189 +238 197 49 +255 255 255 +255 32 65 +90 65 131 +255 41 41 +189 41 41 +139 24 24 diff --git a/graphics/pokemon/sneasler/shiny.pal b/graphics/pokemon/sneasler/shiny.pal new file mode 100755 index 0000000000..b3bc5103e3 --- /dev/null +++ b/graphics/pokemon/sneasler/shiny.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +156 213 164 +49 41 49 +106 90 41 +74 57 82 +156 148 82 +16 16 16 +238 213 131 +74 148 156 +106 74 98 +123 213 230 +255 255 255 +90 172 32 +74 49 74 +246 189 8 +213 148 24 +213 148 24 diff --git a/graphics/pokemon/snivy/front.png b/graphics/pokemon/snivy/front.png deleted file mode 100644 index 040a32f832..0000000000 Binary files a/graphics/pokemon/snivy/front.png and /dev/null differ diff --git a/graphics/pokemon/snorlax/front.png b/graphics/pokemon/snorlax/front.png deleted file mode 100644 index 62b04645a5..0000000000 Binary files a/graphics/pokemon/snorlax/front.png and /dev/null differ diff --git a/graphics/pokemon/snorlax/icon.png b/graphics/pokemon/snorlax/icon.png index efb140e863..36aeeabee2 100644 Binary files a/graphics/pokemon/snorlax/icon.png and b/graphics/pokemon/snorlax/icon.png differ diff --git a/graphics/pokemon/snorunt/front.png b/graphics/pokemon/snorunt/front.png deleted file mode 100644 index 02c9560981..0000000000 Binary files a/graphics/pokemon/snorunt/front.png and /dev/null differ diff --git a/graphics/pokemon/snover/front.png b/graphics/pokemon/snover/front.png deleted file mode 100644 index 9dff7b2a51..0000000000 Binary files a/graphics/pokemon/snover/front.png and /dev/null differ diff --git a/graphics/pokemon/snubbull/back.png b/graphics/pokemon/snubbull/back.png index 3cd3688405..fa403eba3e 100644 Binary files a/graphics/pokemon/snubbull/back.png and b/graphics/pokemon/snubbull/back.png differ diff --git a/graphics/pokemon/snubbull/front.png b/graphics/pokemon/snubbull/front.png deleted file mode 100644 index fa6456d891..0000000000 Binary files a/graphics/pokemon/snubbull/front.png and /dev/null differ diff --git a/graphics/pokemon/solosis/front.png b/graphics/pokemon/solosis/front.png deleted file mode 100644 index 6be1e5a068..0000000000 Binary files a/graphics/pokemon/solosis/front.png and /dev/null differ diff --git a/graphics/pokemon/solrock/front.png b/graphics/pokemon/solrock/front.png deleted file mode 100644 index 24336f16be..0000000000 Binary files a/graphics/pokemon/solrock/front.png and /dev/null differ diff --git a/graphics/pokemon/solrock/icon.png b/graphics/pokemon/solrock/icon.png index 4a0410cb55..07a416c283 100644 Binary files a/graphics/pokemon/solrock/icon.png and b/graphics/pokemon/solrock/icon.png differ diff --git a/graphics/pokemon/spearow/front.png b/graphics/pokemon/spearow/front.png deleted file mode 100644 index 052422e9ad..0000000000 Binary files a/graphics/pokemon/spearow/front.png and /dev/null differ diff --git a/graphics/pokemon/spewpa/front.png b/graphics/pokemon/spewpa/front.png deleted file mode 100644 index 4f6a6269ef..0000000000 Binary files a/graphics/pokemon/spewpa/front.png and /dev/null differ diff --git a/graphics/pokemon/spheal/back.png b/graphics/pokemon/spheal/back.png index e859b980fd..5c23636ede 100644 Binary files a/graphics/pokemon/spheal/back.png and b/graphics/pokemon/spheal/back.png differ diff --git a/graphics/pokemon/spheal/front.png b/graphics/pokemon/spheal/front.png deleted file mode 100644 index 2063a772bd..0000000000 Binary files a/graphics/pokemon/spheal/front.png and /dev/null differ diff --git a/graphics/pokemon/spinarak/anim_front.png b/graphics/pokemon/spinarak/anim_front.png index d5837da994..0e2d525c4d 100644 Binary files a/graphics/pokemon/spinarak/anim_front.png and b/graphics/pokemon/spinarak/anim_front.png differ diff --git a/graphics/pokemon/spinarak/front.png b/graphics/pokemon/spinarak/front.png deleted file mode 100644 index 36c6e8f60d..0000000000 Binary files a/graphics/pokemon/spinarak/front.png and /dev/null differ diff --git a/graphics/pokemon/spinarak/normal.pal b/graphics/pokemon/spinarak/normal.pal index 22db1c2ce9..ccdc73a40d 100644 --- a/graphics/pokemon/spinarak/normal.pal +++ b/graphics/pokemon/spinarak/normal.pal @@ -4,16 +4,16 @@ JASC-PAL 0 176 232 16 16 16 48 72 16 -40 96 96 +16 16 16 136 224 48 168 240 96 80 176 104 96 152 160 -112 88 32 -192 176 24 -72 72 72 +131 106 41 +197 180 24 +106 106 115 248 248 248 -248 224 72 -200 192 192 -144 48 40 -248 88 72 +255 230 74 +189 197 197 +123 49 65 +238 90 90 diff --git a/graphics/pokemon/spinarak/shiny.pal b/graphics/pokemon/spinarak/shiny.pal index 970ece98de..9c966c9e6e 100644 --- a/graphics/pokemon/spinarak/shiny.pal +++ b/graphics/pokemon/spinarak/shiny.pal @@ -4,7 +4,7 @@ JASC-PAL 168 224 24 16 16 16 40 56 104 -32 56 96 +16 16 16 136 176 232 176 216 248 104 128 184 diff --git a/graphics/pokemon/spinda/front.png b/graphics/pokemon/spinda/front.png deleted file mode 100644 index 4d298366f0..0000000000 Binary files a/graphics/pokemon/spinda/front.png and /dev/null differ diff --git a/graphics/pokemon/spiritomb/front.png b/graphics/pokemon/spiritomb/front.png deleted file mode 100644 index bcfd704f63..0000000000 Binary files a/graphics/pokemon/spiritomb/front.png and /dev/null differ diff --git a/graphics/pokemon/spoink/front.png b/graphics/pokemon/spoink/front.png deleted file mode 100644 index 4d5e236fe3..0000000000 Binary files a/graphics/pokemon/spoink/front.png and /dev/null differ diff --git a/graphics/pokemon/spritzee/front.png b/graphics/pokemon/spritzee/front.png deleted file mode 100644 index 76f1554b85..0000000000 Binary files a/graphics/pokemon/spritzee/front.png and /dev/null differ diff --git a/graphics/pokemon/squirtle/front.png b/graphics/pokemon/squirtle/front.png deleted file mode 100644 index 2148e227fd..0000000000 Binary files a/graphics/pokemon/squirtle/front.png and /dev/null differ diff --git a/graphics/pokemon/stantler/front.png b/graphics/pokemon/stantler/front.png deleted file mode 100644 index 3c4e0b08f8..0000000000 Binary files a/graphics/pokemon/stantler/front.png and /dev/null differ diff --git a/graphics/pokemon/staraptor/front.png b/graphics/pokemon/staraptor/front.png deleted file mode 100644 index dbb5a2f959..0000000000 Binary files a/graphics/pokemon/staraptor/front.png and /dev/null differ diff --git a/graphics/pokemon/staraptor/icon.png b/graphics/pokemon/staraptor/icon.png index 1116f07df0..ecad4e21bf 100644 Binary files a/graphics/pokemon/staraptor/icon.png and b/graphics/pokemon/staraptor/icon.png differ diff --git a/graphics/pokemon/staravia/back.png b/graphics/pokemon/staravia/back.png index 6d24ce4126..672f9ca560 100644 Binary files a/graphics/pokemon/staravia/back.png and b/graphics/pokemon/staravia/back.png differ diff --git a/graphics/pokemon/staravia/front.png b/graphics/pokemon/staravia/front.png deleted file mode 100644 index bd7c8ab4f1..0000000000 Binary files a/graphics/pokemon/staravia/front.png and /dev/null differ diff --git a/graphics/pokemon/staravia/icon.png b/graphics/pokemon/staravia/icon.png index 468f38dd2f..8fcb75d879 100644 Binary files a/graphics/pokemon/staravia/icon.png and b/graphics/pokemon/staravia/icon.png differ diff --git a/graphics/pokemon/starly/front.png b/graphics/pokemon/starly/front.png deleted file mode 100644 index c188a7ff5a..0000000000 Binary files a/graphics/pokemon/starly/front.png and /dev/null differ diff --git a/graphics/pokemon/starmie/front.png b/graphics/pokemon/starmie/front.png deleted file mode 100644 index b3c4861d73..0000000000 Binary files a/graphics/pokemon/starmie/front.png and /dev/null differ diff --git a/graphics/pokemon/staryu/front.png b/graphics/pokemon/staryu/front.png deleted file mode 100644 index 6739b8cb70..0000000000 Binary files a/graphics/pokemon/staryu/front.png and /dev/null differ diff --git a/graphics/pokemon/steelix/front.png b/graphics/pokemon/steelix/front.png deleted file mode 100644 index a00376baf4..0000000000 Binary files a/graphics/pokemon/steelix/front.png and /dev/null differ diff --git a/graphics/pokemon/steelix/icon.png b/graphics/pokemon/steelix/icon.png index 2cceec69a9..defe78d7d6 100644 Binary files a/graphics/pokemon/steelix/icon.png and b/graphics/pokemon/steelix/icon.png differ diff --git a/graphics/pokemon/stoutland/front.png b/graphics/pokemon/stoutland/front.png deleted file mode 100644 index bd55701827..0000000000 Binary files a/graphics/pokemon/stoutland/front.png and /dev/null differ diff --git a/graphics/pokemon/stunfisk/front.png b/graphics/pokemon/stunfisk/front.png deleted file mode 100644 index 4e46cfa8f6..0000000000 Binary files a/graphics/pokemon/stunfisk/front.png and /dev/null differ diff --git a/graphics/pokemon/stunky/front.png b/graphics/pokemon/stunky/front.png deleted file mode 100644 index da228e831a..0000000000 Binary files a/graphics/pokemon/stunky/front.png and /dev/null differ diff --git a/graphics/pokemon/sudowoodo/front.png b/graphics/pokemon/sudowoodo/front.png deleted file mode 100644 index df699a5c7c..0000000000 Binary files a/graphics/pokemon/sudowoodo/front.png and /dev/null differ diff --git a/graphics/pokemon/suicune/front.png b/graphics/pokemon/suicune/front.png deleted file mode 100644 index b1ff2a8419..0000000000 Binary files a/graphics/pokemon/suicune/front.png and /dev/null differ diff --git a/graphics/pokemon/suicune/icon.png b/graphics/pokemon/suicune/icon.png index 48a3d97fb4..fbaff5a8cd 100644 Binary files a/graphics/pokemon/suicune/icon.png and b/graphics/pokemon/suicune/icon.png differ diff --git a/graphics/pokemon/sunflora/front.png b/graphics/pokemon/sunflora/front.png deleted file mode 100644 index ebdac3a02b..0000000000 Binary files a/graphics/pokemon/sunflora/front.png and /dev/null differ diff --git a/graphics/pokemon/sunkern/front.png b/graphics/pokemon/sunkern/front.png deleted file mode 100644 index 72c2510ce0..0000000000 Binary files a/graphics/pokemon/sunkern/front.png and /dev/null differ diff --git a/graphics/pokemon/surskit/front.png b/graphics/pokemon/surskit/front.png deleted file mode 100644 index 32508e31f5..0000000000 Binary files a/graphics/pokemon/surskit/front.png and /dev/null differ diff --git a/graphics/pokemon/swablu/back.png b/graphics/pokemon/swablu/back.png index 2bab92da67..e146b2c0c5 100644 Binary files a/graphics/pokemon/swablu/back.png and b/graphics/pokemon/swablu/back.png differ diff --git a/graphics/pokemon/swablu/front.png b/graphics/pokemon/swablu/front.png deleted file mode 100644 index b7d58d06b0..0000000000 Binary files a/graphics/pokemon/swablu/front.png and /dev/null differ diff --git a/graphics/pokemon/swablu/icon.png b/graphics/pokemon/swablu/icon.png index c1aa25e996..46be1f4033 100644 Binary files a/graphics/pokemon/swablu/icon.png and b/graphics/pokemon/swablu/icon.png differ diff --git a/graphics/pokemon/swadloon/front.png b/graphics/pokemon/swadloon/front.png deleted file mode 100644 index 1b7f74db5f..0000000000 Binary files a/graphics/pokemon/swadloon/front.png and /dev/null differ diff --git a/graphics/pokemon/swalot/back.png b/graphics/pokemon/swalot/back.png index 487b4f8884..ec9fdaef2c 100644 Binary files a/graphics/pokemon/swalot/back.png and b/graphics/pokemon/swalot/back.png differ diff --git a/graphics/pokemon/swalot/front.png b/graphics/pokemon/swalot/front.png deleted file mode 100644 index 6ae76a4f36..0000000000 Binary files a/graphics/pokemon/swalot/front.png and /dev/null differ diff --git a/graphics/pokemon/swalot/icon.png b/graphics/pokemon/swalot/icon.png index 3611b27fee..09f7162d2a 100644 Binary files a/graphics/pokemon/swalot/icon.png and b/graphics/pokemon/swalot/icon.png differ diff --git a/graphics/pokemon/swampert/front.png b/graphics/pokemon/swampert/front.png deleted file mode 100644 index 7a86a418d8..0000000000 Binary files a/graphics/pokemon/swampert/front.png and /dev/null differ diff --git a/graphics/pokemon/swanna/front.png b/graphics/pokemon/swanna/front.png deleted file mode 100644 index e1b58cf394..0000000000 Binary files a/graphics/pokemon/swanna/front.png and /dev/null differ diff --git a/graphics/pokemon/swellow/front.png b/graphics/pokemon/swellow/front.png deleted file mode 100644 index 32345b4066..0000000000 Binary files a/graphics/pokemon/swellow/front.png and /dev/null differ diff --git a/graphics/pokemon/swinub/front.png b/graphics/pokemon/swinub/front.png deleted file mode 100644 index ec19150098..0000000000 Binary files a/graphics/pokemon/swinub/front.png and /dev/null differ diff --git a/graphics/pokemon/swirlix/front.png b/graphics/pokemon/swirlix/front.png deleted file mode 100644 index fb40d972f9..0000000000 Binary files a/graphics/pokemon/swirlix/front.png and /dev/null differ diff --git a/graphics/pokemon/swoobat/front.png b/graphics/pokemon/swoobat/front.png deleted file mode 100644 index 7a4ccae93c..0000000000 Binary files a/graphics/pokemon/swoobat/front.png and /dev/null differ diff --git a/graphics/pokemon/sylveon/front.png b/graphics/pokemon/sylveon/front.png deleted file mode 100644 index dbed231083..0000000000 Binary files a/graphics/pokemon/sylveon/front.png and /dev/null differ diff --git a/graphics/pokemon/taillow/front.png b/graphics/pokemon/taillow/front.png deleted file mode 100644 index 3e4be10eaa..0000000000 Binary files a/graphics/pokemon/taillow/front.png and /dev/null differ diff --git a/graphics/pokemon/talonflame/front.png b/graphics/pokemon/talonflame/front.png deleted file mode 100644 index 2fd619c53e..0000000000 Binary files a/graphics/pokemon/talonflame/front.png and /dev/null differ diff --git a/graphics/pokemon/tangela/front.png b/graphics/pokemon/tangela/front.png deleted file mode 100644 index 6115b5b62d..0000000000 Binary files a/graphics/pokemon/tangela/front.png and /dev/null differ diff --git a/graphics/pokemon/tangrowth/front.png b/graphics/pokemon/tangrowth/front.png deleted file mode 100644 index ae389e74a8..0000000000 Binary files a/graphics/pokemon/tangrowth/front.png and /dev/null differ diff --git a/graphics/pokemon/tapu_bulu/front.png b/graphics/pokemon/tapu_bulu/front.png deleted file mode 100644 index ef0eb3357c..0000000000 Binary files a/graphics/pokemon/tapu_bulu/front.png and /dev/null differ diff --git a/graphics/pokemon/tapu_fini/front.png b/graphics/pokemon/tapu_fini/front.png deleted file mode 100644 index ccf8d39e9f..0000000000 Binary files a/graphics/pokemon/tapu_fini/front.png and /dev/null differ diff --git a/graphics/pokemon/tapu_koko/front.png b/graphics/pokemon/tapu_koko/front.png deleted file mode 100644 index d6a5fd655a..0000000000 Binary files a/graphics/pokemon/tapu_koko/front.png and /dev/null differ diff --git a/graphics/pokemon/tapu_lele/front.png b/graphics/pokemon/tapu_lele/front.png deleted file mode 100644 index 31f5d1c1ae..0000000000 Binary files a/graphics/pokemon/tapu_lele/front.png and /dev/null differ diff --git a/graphics/pokemon/tauros/front.png b/graphics/pokemon/tauros/front.png deleted file mode 100644 index 0d47d8939b..0000000000 Binary files a/graphics/pokemon/tauros/front.png and /dev/null differ diff --git a/graphics/pokemon/tauros/icon.png b/graphics/pokemon/tauros/icon.png index 08975b0bce..de4bdd330d 100644 Binary files a/graphics/pokemon/tauros/icon.png and b/graphics/pokemon/tauros/icon.png differ diff --git a/graphics/pokemon/teddiursa/front.png b/graphics/pokemon/teddiursa/front.png deleted file mode 100644 index 9412d0c7f3..0000000000 Binary files a/graphics/pokemon/teddiursa/front.png and /dev/null differ diff --git a/graphics/pokemon/tentacool/front.png b/graphics/pokemon/tentacool/front.png deleted file mode 100644 index 6469576a4d..0000000000 Binary files a/graphics/pokemon/tentacool/front.png and /dev/null differ diff --git a/graphics/pokemon/tentacool/icon.png b/graphics/pokemon/tentacool/icon.png index 5870f50b8e..64a9ef3645 100644 Binary files a/graphics/pokemon/tentacool/icon.png and b/graphics/pokemon/tentacool/icon.png differ diff --git a/graphics/pokemon/tentacruel/front.png b/graphics/pokemon/tentacruel/front.png deleted file mode 100644 index 52e70a7343..0000000000 Binary files a/graphics/pokemon/tentacruel/front.png and /dev/null differ diff --git a/graphics/pokemon/tentacruel/icon.png b/graphics/pokemon/tentacruel/icon.png index 60bfe216d0..e6a797e529 100644 Binary files a/graphics/pokemon/tentacruel/icon.png and b/graphics/pokemon/tentacruel/icon.png differ diff --git a/graphics/pokemon/tepig/front.png b/graphics/pokemon/tepig/front.png deleted file mode 100644 index 0e706ecadc..0000000000 Binary files a/graphics/pokemon/tepig/front.png and /dev/null differ diff --git a/graphics/pokemon/terrakion/front.png b/graphics/pokemon/terrakion/front.png deleted file mode 100644 index 53b7317850..0000000000 Binary files a/graphics/pokemon/terrakion/front.png and /dev/null differ diff --git a/graphics/pokemon/throh/front.png b/graphics/pokemon/throh/front.png deleted file mode 100644 index 82351e40bd..0000000000 Binary files a/graphics/pokemon/throh/front.png and /dev/null differ diff --git a/graphics/pokemon/thundurus/front.png b/graphics/pokemon/thundurus/front.png deleted file mode 100644 index b8ff39958f..0000000000 Binary files a/graphics/pokemon/thundurus/front.png and /dev/null differ diff --git a/graphics/pokemon/thundurus/icon.png b/graphics/pokemon/thundurus/icon.png index 9295bb7526..9b11665116 100644 Binary files a/graphics/pokemon/thundurus/icon.png and b/graphics/pokemon/thundurus/icon.png differ diff --git a/graphics/pokemon/thundurus/therian/front.png b/graphics/pokemon/thundurus/therian/front.png deleted file mode 100644 index 4d1543d595..0000000000 Binary files a/graphics/pokemon/thundurus/therian/front.png and /dev/null differ diff --git a/graphics/pokemon/timburr/front.png b/graphics/pokemon/timburr/front.png deleted file mode 100644 index b79489a869..0000000000 Binary files a/graphics/pokemon/timburr/front.png and /dev/null differ diff --git a/graphics/pokemon/tirtouga/front.png b/graphics/pokemon/tirtouga/front.png deleted file mode 100644 index 3228a2f669..0000000000 Binary files a/graphics/pokemon/tirtouga/front.png and /dev/null differ diff --git a/graphics/pokemon/tirtouga/icon.png b/graphics/pokemon/tirtouga/icon.png index feb79c7d2f..dfb2983764 100644 Binary files a/graphics/pokemon/tirtouga/icon.png and b/graphics/pokemon/tirtouga/icon.png differ diff --git a/graphics/pokemon/togekiss/front.png b/graphics/pokemon/togekiss/front.png deleted file mode 100644 index 0a699e780b..0000000000 Binary files a/graphics/pokemon/togekiss/front.png and /dev/null differ diff --git a/graphics/pokemon/togepi/anim_front.png b/graphics/pokemon/togepi/anim_front.png index 07d7f05b89..9fc22b9f84 100644 Binary files a/graphics/pokemon/togepi/anim_front.png and b/graphics/pokemon/togepi/anim_front.png differ diff --git a/graphics/pokemon/togepi/front.png b/graphics/pokemon/togepi/front.png deleted file mode 100644 index e6520872b5..0000000000 Binary files a/graphics/pokemon/togepi/front.png and /dev/null differ diff --git a/graphics/pokemon/togepi/normal.pal b/graphics/pokemon/togepi/normal.pal index 0fb20049a4..3d6967dcac 100644 --- a/graphics/pokemon/togepi/normal.pal +++ b/graphics/pokemon/togepi/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -144 112 88 +148 115 90 0 0 0 -240 232 192 -200 176 112 -112 72 72 -240 208 160 -168 32 32 -248 248 248 -120 136 144 -208 216 216 -72 128 192 -216 112 104 -192 64 64 -176 176 192 -48 96 168 +246 238 197 +205 156 115 +115 74 74 +246 213 164 +172 32 32 +255 255 255 +123 139 148 +213 222 222 +74 131 197 +222 115 106 +197 65 65 +180 180 197 +49 98 172 diff --git a/graphics/pokemon/togetic/anim_front.png b/graphics/pokemon/togetic/anim_front.png index 1079c2b014..c88c0e4d61 100644 Binary files a/graphics/pokemon/togetic/anim_front.png and b/graphics/pokemon/togetic/anim_front.png differ diff --git a/graphics/pokemon/togetic/back.png b/graphics/pokemon/togetic/back.png index 755fcf5950..76312f9b82 100644 Binary files a/graphics/pokemon/togetic/back.png and b/graphics/pokemon/togetic/back.png differ diff --git a/graphics/pokemon/togetic/front.png b/graphics/pokemon/togetic/front.png deleted file mode 100644 index 0bacb627e7..0000000000 Binary files a/graphics/pokemon/togetic/front.png and /dev/null differ diff --git a/graphics/pokemon/togetic/normal.pal b/graphics/pokemon/togetic/normal.pal index 0b17314592..951bc0f040 100644 --- a/graphics/pokemon/togetic/normal.pal +++ b/graphics/pokemon/togetic/normal.pal @@ -2,17 +2,17 @@ JASC-PAL 0100 16 152 208 160 -112 120 128 -248 248 248 +115 123 131 +255 255 255 0 0 0 -168 192 184 -208 232 232 -216 64 56 -184 24 8 -40 144 224 -16 96 184 -192 48 32 -136 16 16 +172 197 189 +213 238 238 +222 65 57 +189 24 8 +41 148 230 +16 98 189 +222 65 57 +189 24 8 0 0 0 0 0 0 0 0 0 diff --git a/graphics/pokemon/torchic/front.png b/graphics/pokemon/torchic/front.png deleted file mode 100644 index b4e2066d18..0000000000 Binary files a/graphics/pokemon/torchic/front.png and /dev/null differ diff --git a/graphics/pokemon/torkoal/front.png b/graphics/pokemon/torkoal/front.png deleted file mode 100644 index abe45c3432..0000000000 Binary files a/graphics/pokemon/torkoal/front.png and /dev/null differ diff --git a/graphics/pokemon/tornadus/front.png b/graphics/pokemon/tornadus/front.png deleted file mode 100644 index b121301ddf..0000000000 Binary files a/graphics/pokemon/tornadus/front.png and /dev/null differ diff --git a/graphics/pokemon/tornadus/icon.png b/graphics/pokemon/tornadus/icon.png index a95eccdb30..271e4c6b69 100644 Binary files a/graphics/pokemon/tornadus/icon.png and b/graphics/pokemon/tornadus/icon.png differ diff --git a/graphics/pokemon/tornadus/therian/front.png b/graphics/pokemon/tornadus/therian/front.png deleted file mode 100644 index b168d3bd95..0000000000 Binary files a/graphics/pokemon/tornadus/therian/front.png and /dev/null differ diff --git a/graphics/pokemon/tornadus/therian/icon.png b/graphics/pokemon/tornadus/therian/icon.png index dd6db6b5c0..fea79288d2 100644 Binary files a/graphics/pokemon/tornadus/therian/icon.png and b/graphics/pokemon/tornadus/therian/icon.png differ diff --git a/graphics/pokemon/torterra/front.png b/graphics/pokemon/torterra/front.png deleted file mode 100644 index 2ef06d2f0a..0000000000 Binary files a/graphics/pokemon/torterra/front.png and /dev/null differ diff --git a/graphics/pokemon/totodile/anim_front.png b/graphics/pokemon/totodile/anim_front.png index 49e4fee75a..25e0a234e6 100644 Binary files a/graphics/pokemon/totodile/anim_front.png and b/graphics/pokemon/totodile/anim_front.png differ diff --git a/graphics/pokemon/totodile/front.png b/graphics/pokemon/totodile/front.png deleted file mode 100644 index ba9c9994b0..0000000000 Binary files a/graphics/pokemon/totodile/front.png and /dev/null differ diff --git a/graphics/pokemon/totodile/normal.pal b/graphics/pokemon/totodile/normal.pal index bf7ef18aff..ce70fb2528 100644 --- a/graphics/pokemon/totodile/normal.pal +++ b/graphics/pokemon/totodile/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 208 152 184 -32 136 184 -40 88 128 -80 192 216 -152 224 248 +49 131 197 +49 90 131 +106 180 230 +148 213 255 16 16 16 -248 248 248 -64 64 72 -176 176 176 -120 24 0 -152 80 88 -200 64 32 -232 120 120 -144 128 32 -248 224 136 +255 255 255 +49 90 131 +180 180 180 +123 24 0 +180 74 82 +205 65 32 +230 123 123 +172 131 41 +255 197 82 184 104 104 diff --git a/graphics/pokemon/totodile/shiny.pal b/graphics/pokemon/totodile/shiny.pal index 6c3f512048..3bc0bc64c6 100644 --- a/graphics/pokemon/totodile/shiny.pal +++ b/graphics/pokemon/totodile/shiny.pal @@ -8,7 +8,7 @@ JASC-PAL 168 248 216 16 16 16 248 248 248 -56 56 56 +24 104 72 176 176 176 24 72 128 136 64 64 diff --git a/graphics/pokemon/toxicroak/front.png b/graphics/pokemon/toxicroak/front.png deleted file mode 100644 index 27acc59b77..0000000000 Binary files a/graphics/pokemon/toxicroak/front.png and /dev/null differ diff --git a/graphics/pokemon/tranquill/front.png b/graphics/pokemon/tranquill/front.png deleted file mode 100644 index 2294a1f13e..0000000000 Binary files a/graphics/pokemon/tranquill/front.png and /dev/null differ diff --git a/graphics/pokemon/trapinch/front.png b/graphics/pokemon/trapinch/front.png deleted file mode 100644 index a745917215..0000000000 Binary files a/graphics/pokemon/trapinch/front.png and /dev/null differ diff --git a/graphics/pokemon/treecko/front.png b/graphics/pokemon/treecko/front.png deleted file mode 100644 index 6869c279b3..0000000000 Binary files a/graphics/pokemon/treecko/front.png and /dev/null differ diff --git a/graphics/pokemon/trevenant/front.png b/graphics/pokemon/trevenant/front.png deleted file mode 100644 index 5dae0e09a4..0000000000 Binary files a/graphics/pokemon/trevenant/front.png and /dev/null differ diff --git a/graphics/pokemon/tropius/front.png b/graphics/pokemon/tropius/front.png deleted file mode 100644 index 4bece6d403..0000000000 Binary files a/graphics/pokemon/tropius/front.png and /dev/null differ diff --git a/graphics/pokemon/tropius/icon.png b/graphics/pokemon/tropius/icon.png index 647767ca3d..9e7b61b531 100644 Binary files a/graphics/pokemon/tropius/icon.png and b/graphics/pokemon/tropius/icon.png differ diff --git a/graphics/pokemon/trubbish/front.png b/graphics/pokemon/trubbish/front.png deleted file mode 100644 index 75fb61a266..0000000000 Binary files a/graphics/pokemon/trubbish/front.png and /dev/null differ diff --git a/graphics/pokemon/trubbish/icon.png b/graphics/pokemon/trubbish/icon.png index cbf0483f66..b7fa282cd8 100644 Binary files a/graphics/pokemon/trubbish/icon.png and b/graphics/pokemon/trubbish/icon.png differ diff --git a/graphics/pokemon/turtwig/front.png b/graphics/pokemon/turtwig/front.png deleted file mode 100644 index 59d3efa89d..0000000000 Binary files a/graphics/pokemon/turtwig/front.png and /dev/null differ diff --git a/graphics/pokemon/tympole/front.png b/graphics/pokemon/tympole/front.png deleted file mode 100644 index d1b5dfd480..0000000000 Binary files a/graphics/pokemon/tympole/front.png and /dev/null differ diff --git a/graphics/pokemon/tynamo/front.png b/graphics/pokemon/tynamo/front.png deleted file mode 100644 index 47d48757ef..0000000000 Binary files a/graphics/pokemon/tynamo/front.png and /dev/null differ diff --git a/graphics/pokemon/typhlosion/anim_front.png b/graphics/pokemon/typhlosion/anim_front.png index a4f46ae24a..bc4b7c45cc 100644 Binary files a/graphics/pokemon/typhlosion/anim_front.png and b/graphics/pokemon/typhlosion/anim_front.png differ diff --git a/graphics/pokemon/typhlosion/back.png b/graphics/pokemon/typhlosion/back.png index 3252c26e90..81bcbd42b6 100644 Binary files a/graphics/pokemon/typhlosion/back.png and b/graphics/pokemon/typhlosion/back.png differ diff --git a/graphics/pokemon/typhlosion/front.png b/graphics/pokemon/typhlosion/front.png deleted file mode 100644 index 79830374f8..0000000000 Binary files a/graphics/pokemon/typhlosion/front.png and /dev/null differ diff --git a/graphics/pokemon/typhlosion/hisuian/back.png b/graphics/pokemon/typhlosion/hisuian/back.png old mode 100644 new mode 100755 index be0255b326..8e808ecf6b Binary files a/graphics/pokemon/typhlosion/hisuian/back.png and b/graphics/pokemon/typhlosion/hisuian/back.png differ diff --git a/graphics/pokemon/typhlosion/hisuian/front.png b/graphics/pokemon/typhlosion/hisuian/front.png old mode 100644 new mode 100755 index 58c7f9e417..0b1095e4d5 Binary files a/graphics/pokemon/typhlosion/hisuian/front.png and b/graphics/pokemon/typhlosion/hisuian/front.png differ diff --git a/graphics/pokemon/typhlosion/hisuian/normal.pal b/graphics/pokemon/typhlosion/hisuian/normal.pal old mode 100644 new mode 100755 index cb03a42bce..8a9fe94af0 --- a/graphics/pokemon/typhlosion/hisuian/normal.pal +++ b/graphics/pokemon/typhlosion/hisuian/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -240 88 160 -232 96 224 -176 56 152 -240 72 104 -56 48 96 -88 72 152 -16 16 80 -96 80 176 -136 128 80 -216 216 168 +160 28 200 +216 60 224 +224 76 144 +216 52 48 +88 72 128 +40 28 72 +128 104 168 +56 44 88 +160 136 72 +248 236 144 16 16 16 -232 136 0 -248 248 248 -176 176 120 -80 64 48 +208 196 112 +104 80 40 +0 0 0 +0 0 0 diff --git a/graphics/pokemon/typhlosion/hisuian/shiny.pal b/graphics/pokemon/typhlosion/hisuian/shiny.pal old mode 100644 new mode 100755 index c4892102fb..71afe836b2 --- a/graphics/pokemon/typhlosion/hisuian/shiny.pal +++ b/graphics/pokemon/typhlosion/hisuian/shiny.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -240 88 160 -232 96 224 -176 56 152 -240 72 104 -40 64 96 -64 88 136 -8 32 88 -64 120 152 -136 128 80 -216 216 168 +160 28 200 +217 60 230 +224 76 144 +218 54 54 +65 89 152 +40 28 72 +128 104 168 +33 65 112 +164 139 74 +255 255 255 16 16 16 -232 136 0 -248 248 248 -176 176 120 -80 64 48 +213 197 115 +104 80 40 +0 0 0 +0 0 0 diff --git a/graphics/pokemon/typhlosion/icon.png b/graphics/pokemon/typhlosion/icon.png index b69680648c..e5e5ea51c1 100644 Binary files a/graphics/pokemon/typhlosion/icon.png and b/graphics/pokemon/typhlosion/icon.png differ diff --git a/graphics/pokemon/typhlosion/normal.pal b/graphics/pokemon/typhlosion/normal.pal index 8315b8af8b..b0b35155f5 100644 --- a/graphics/pokemon/typhlosion/normal.pal +++ b/graphics/pokemon/typhlosion/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -216 0 0 -248 96 0 -248 216 0 -248 152 0 -40 88 120 -24 40 48 -56 128 136 -160 136 72 -248 232 144 -104 80 40 +222 0 0 +255 98 0 +255 222 0 +255 156 0 +65 90 148 +8 32 90 +65 131 164 +164 139 74 +255 238 148 +106 82 41 16 16 16 -248 248 248 -208 192 112 -128 72 72 -48 64 112 +255 255 255 +213 197 115 +0 0 0 +32 65 106 diff --git a/graphics/pokemon/tyranitar/front.png b/graphics/pokemon/tyranitar/front.png deleted file mode 100644 index 2032b956af..0000000000 Binary files a/graphics/pokemon/tyranitar/front.png and /dev/null differ diff --git a/graphics/pokemon/tyranitar/icon.png b/graphics/pokemon/tyranitar/icon.png index 3ab06613c9..b692b99769 100644 Binary files a/graphics/pokemon/tyranitar/icon.png and b/graphics/pokemon/tyranitar/icon.png differ diff --git a/graphics/pokemon/tyrantrum/front.png b/graphics/pokemon/tyrantrum/front.png deleted file mode 100644 index 3aa035a521..0000000000 Binary files a/graphics/pokemon/tyrantrum/front.png and /dev/null differ diff --git a/graphics/pokemon/tyrogue/front.png b/graphics/pokemon/tyrogue/front.png deleted file mode 100644 index 0fcc422d5a..0000000000 Binary files a/graphics/pokemon/tyrogue/front.png and /dev/null differ diff --git a/graphics/pokemon/tyrunt/front.png b/graphics/pokemon/tyrunt/front.png deleted file mode 100644 index fc2d2aa539..0000000000 Binary files a/graphics/pokemon/tyrunt/front.png and /dev/null differ diff --git a/graphics/pokemon/umbreon/front.png b/graphics/pokemon/umbreon/front.png deleted file mode 100644 index 82a649940e..0000000000 Binary files a/graphics/pokemon/umbreon/front.png and /dev/null differ diff --git a/graphics/pokemon/unfezant/backf.png b/graphics/pokemon/unfezant/backf.png index cded84b124..f9624417f0 100644 Binary files a/graphics/pokemon/unfezant/backf.png and b/graphics/pokemon/unfezant/backf.png differ diff --git a/graphics/pokemon/unfezant/front.png b/graphics/pokemon/unfezant/front.png deleted file mode 100644 index cea0bc3ab0..0000000000 Binary files a/graphics/pokemon/unfezant/front.png and /dev/null differ diff --git a/graphics/pokemon/unfezant/icon.png b/graphics/pokemon/unfezant/icon.png index 8b61d1bfba..785bd89a9b 100644 Binary files a/graphics/pokemon/unfezant/icon.png and b/graphics/pokemon/unfezant/icon.png differ diff --git a/graphics/pokemon/unown/b/front.png b/graphics/pokemon/unown/b/front.png deleted file mode 100644 index fbe2e4623d..0000000000 Binary files a/graphics/pokemon/unown/b/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/c/front.png b/graphics/pokemon/unown/c/front.png deleted file mode 100644 index c5ef1c457f..0000000000 Binary files a/graphics/pokemon/unown/c/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/d/front.png b/graphics/pokemon/unown/d/front.png deleted file mode 100644 index c39b26120d..0000000000 Binary files a/graphics/pokemon/unown/d/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/e/front.png b/graphics/pokemon/unown/e/front.png deleted file mode 100644 index 81e3f9c93b..0000000000 Binary files a/graphics/pokemon/unown/e/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/exclamation_mark/front.png b/graphics/pokemon/unown/exclamation_mark/front.png deleted file mode 100644 index 86f329f92f..0000000000 Binary files a/graphics/pokemon/unown/exclamation_mark/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/f/front.png b/graphics/pokemon/unown/f/front.png deleted file mode 100644 index 8e61eb768b..0000000000 Binary files a/graphics/pokemon/unown/f/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/front.png b/graphics/pokemon/unown/front.png deleted file mode 100644 index 697de36dc0..0000000000 Binary files a/graphics/pokemon/unown/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/g/front.png b/graphics/pokemon/unown/g/front.png deleted file mode 100644 index 4f665124ad..0000000000 Binary files a/graphics/pokemon/unown/g/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/h/front.png b/graphics/pokemon/unown/h/front.png deleted file mode 100644 index f8ab66963b..0000000000 Binary files a/graphics/pokemon/unown/h/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/i/front.png b/graphics/pokemon/unown/i/front.png deleted file mode 100644 index ebc8a51a9b..0000000000 Binary files a/graphics/pokemon/unown/i/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/j/front.png b/graphics/pokemon/unown/j/front.png deleted file mode 100644 index 4c1f4ed2e7..0000000000 Binary files a/graphics/pokemon/unown/j/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/k/front.png b/graphics/pokemon/unown/k/front.png deleted file mode 100644 index 8ccce125e8..0000000000 Binary files a/graphics/pokemon/unown/k/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/l/front.png b/graphics/pokemon/unown/l/front.png deleted file mode 100644 index 6bb837167d..0000000000 Binary files a/graphics/pokemon/unown/l/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/m/front.png b/graphics/pokemon/unown/m/front.png deleted file mode 100644 index 981c7f801c..0000000000 Binary files a/graphics/pokemon/unown/m/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/n/front.png b/graphics/pokemon/unown/n/front.png deleted file mode 100644 index cff797db42..0000000000 Binary files a/graphics/pokemon/unown/n/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/o/front.png b/graphics/pokemon/unown/o/front.png deleted file mode 100644 index 8b8e812959..0000000000 Binary files a/graphics/pokemon/unown/o/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/p/front.png b/graphics/pokemon/unown/p/front.png deleted file mode 100644 index 99a7c98e23..0000000000 Binary files a/graphics/pokemon/unown/p/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/q/front.png b/graphics/pokemon/unown/q/front.png deleted file mode 100644 index fe94c27fa0..0000000000 Binary files a/graphics/pokemon/unown/q/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/question_mark/front.png b/graphics/pokemon/unown/question_mark/front.png deleted file mode 100644 index ee0ad284cc..0000000000 Binary files a/graphics/pokemon/unown/question_mark/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/r/front.png b/graphics/pokemon/unown/r/front.png deleted file mode 100644 index 4e2a40007c..0000000000 Binary files a/graphics/pokemon/unown/r/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/s/front.png b/graphics/pokemon/unown/s/front.png deleted file mode 100644 index a144e27f53..0000000000 Binary files a/graphics/pokemon/unown/s/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/t/front.png b/graphics/pokemon/unown/t/front.png deleted file mode 100644 index 4d5fa8b988..0000000000 Binary files a/graphics/pokemon/unown/t/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/u/front.png b/graphics/pokemon/unown/u/front.png deleted file mode 100644 index 39503f01c9..0000000000 Binary files a/graphics/pokemon/unown/u/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/v/front.png b/graphics/pokemon/unown/v/front.png deleted file mode 100644 index f014289bdb..0000000000 Binary files a/graphics/pokemon/unown/v/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/w/front.png b/graphics/pokemon/unown/w/front.png deleted file mode 100644 index 829804ebfc..0000000000 Binary files a/graphics/pokemon/unown/w/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/x/front.png b/graphics/pokemon/unown/x/front.png deleted file mode 100644 index 053e2ee08c..0000000000 Binary files a/graphics/pokemon/unown/x/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/y/front.png b/graphics/pokemon/unown/y/front.png deleted file mode 100644 index d8f40e27ed..0000000000 Binary files a/graphics/pokemon/unown/y/front.png and /dev/null differ diff --git a/graphics/pokemon/unown/z/front.png b/graphics/pokemon/unown/z/front.png deleted file mode 100644 index 054eacb6d8..0000000000 Binary files a/graphics/pokemon/unown/z/front.png and /dev/null differ diff --git a/graphics/pokemon/ursaring/front.png b/graphics/pokemon/ursaring/front.png deleted file mode 100644 index 0229df2041..0000000000 Binary files a/graphics/pokemon/ursaring/front.png and /dev/null differ diff --git a/graphics/pokemon/uxie/front.png b/graphics/pokemon/uxie/front.png deleted file mode 100644 index 3d923f4438..0000000000 Binary files a/graphics/pokemon/uxie/front.png and /dev/null differ diff --git a/graphics/pokemon/vanillish/front.png b/graphics/pokemon/vanillish/front.png deleted file mode 100644 index eb3237a5c7..0000000000 Binary files a/graphics/pokemon/vanillish/front.png and /dev/null differ diff --git a/graphics/pokemon/vanillite/front.png b/graphics/pokemon/vanillite/front.png deleted file mode 100644 index dfcfb42c79..0000000000 Binary files a/graphics/pokemon/vanillite/front.png and /dev/null differ diff --git a/graphics/pokemon/vanilluxe/front.png b/graphics/pokemon/vanilluxe/front.png deleted file mode 100644 index 168c54b677..0000000000 Binary files a/graphics/pokemon/vanilluxe/front.png and /dev/null differ diff --git a/graphics/pokemon/vanilluxe/icon.png b/graphics/pokemon/vanilluxe/icon.png index a7814563b4..c2f85c1e31 100644 Binary files a/graphics/pokemon/vanilluxe/icon.png and b/graphics/pokemon/vanilluxe/icon.png differ diff --git a/graphics/pokemon/vaporeon/front.png b/graphics/pokemon/vaporeon/front.png deleted file mode 100644 index 1ab0c7e466..0000000000 Binary files a/graphics/pokemon/vaporeon/front.png and /dev/null differ diff --git a/graphics/pokemon/venipede/front.png b/graphics/pokemon/venipede/front.png deleted file mode 100644 index ebabe585ce..0000000000 Binary files a/graphics/pokemon/venipede/front.png and /dev/null differ diff --git a/graphics/pokemon/venomoth/front.png b/graphics/pokemon/venomoth/front.png deleted file mode 100644 index 895d4aeb97..0000000000 Binary files a/graphics/pokemon/venomoth/front.png and /dev/null differ diff --git a/graphics/pokemon/venonat/front.png b/graphics/pokemon/venonat/front.png deleted file mode 100644 index 738b8f1614..0000000000 Binary files a/graphics/pokemon/venonat/front.png and /dev/null differ diff --git a/graphics/pokemon/venusaur/front.png b/graphics/pokemon/venusaur/front.png deleted file mode 100644 index 0d21e669d9..0000000000 Binary files a/graphics/pokemon/venusaur/front.png and /dev/null differ diff --git a/graphics/pokemon/venusaur/icon.png b/graphics/pokemon/venusaur/icon.png index c841ddde4f..ce3b2290ac 100644 Binary files a/graphics/pokemon/venusaur/icon.png and b/graphics/pokemon/venusaur/icon.png differ diff --git a/graphics/pokemon/vespiquen/front.png b/graphics/pokemon/vespiquen/front.png deleted file mode 100644 index cc731fc7bd..0000000000 Binary files a/graphics/pokemon/vespiquen/front.png and /dev/null differ diff --git a/graphics/pokemon/vibrava/front.png b/graphics/pokemon/vibrava/front.png deleted file mode 100644 index d3dca4c68f..0000000000 Binary files a/graphics/pokemon/vibrava/front.png and /dev/null differ diff --git a/graphics/pokemon/victini/front.png b/graphics/pokemon/victini/front.png deleted file mode 100644 index 6901f6fb3e..0000000000 Binary files a/graphics/pokemon/victini/front.png and /dev/null differ diff --git a/graphics/pokemon/victini/icon.png b/graphics/pokemon/victini/icon.png index dfbab1baaf..686f4a499f 100644 Binary files a/graphics/pokemon/victini/icon.png and b/graphics/pokemon/victini/icon.png differ diff --git a/graphics/pokemon/victreebel/front.png b/graphics/pokemon/victreebel/front.png deleted file mode 100644 index f82a0e17fe..0000000000 Binary files a/graphics/pokemon/victreebel/front.png and /dev/null differ diff --git a/graphics/pokemon/vigoroth/front.png b/graphics/pokemon/vigoroth/front.png deleted file mode 100644 index b3840cd1b2..0000000000 Binary files a/graphics/pokemon/vigoroth/front.png and /dev/null differ diff --git a/graphics/pokemon/vileplume/front.png b/graphics/pokemon/vileplume/front.png deleted file mode 100644 index 4b0663612b..0000000000 Binary files a/graphics/pokemon/vileplume/front.png and /dev/null differ diff --git a/graphics/pokemon/vileplume/icon.png b/graphics/pokemon/vileplume/icon.png index a3cb2b0b59..3dcf11ce39 100644 Binary files a/graphics/pokemon/vileplume/icon.png and b/graphics/pokemon/vileplume/icon.png differ diff --git a/graphics/pokemon/virizion/front.png b/graphics/pokemon/virizion/front.png deleted file mode 100644 index 6c1f3a36cc..0000000000 Binary files a/graphics/pokemon/virizion/front.png and /dev/null differ diff --git a/graphics/pokemon/virizion/icon.png b/graphics/pokemon/virizion/icon.png index 4f7390e1f0..68c0abd730 100644 Binary files a/graphics/pokemon/virizion/icon.png and b/graphics/pokemon/virizion/icon.png differ diff --git a/graphics/pokemon/vivillon/archipelago/front.png b/graphics/pokemon/vivillon/archipelago/front.png deleted file mode 100644 index 7fb1becc1c..0000000000 Binary files a/graphics/pokemon/vivillon/archipelago/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/continental/front.png b/graphics/pokemon/vivillon/continental/front.png deleted file mode 100644 index 785e6371ec..0000000000 Binary files a/graphics/pokemon/vivillon/continental/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/continental/icon.png b/graphics/pokemon/vivillon/continental/icon.png index 51c770f56e..e4fdf6d219 100644 Binary files a/graphics/pokemon/vivillon/continental/icon.png and b/graphics/pokemon/vivillon/continental/icon.png differ diff --git a/graphics/pokemon/vivillon/elegant/front.png b/graphics/pokemon/vivillon/elegant/front.png deleted file mode 100644 index d4e09f2a7f..0000000000 Binary files a/graphics/pokemon/vivillon/elegant/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/elegant/icon.png b/graphics/pokemon/vivillon/elegant/icon.png index 221935a218..f6c4772ae0 100644 Binary files a/graphics/pokemon/vivillon/elegant/icon.png and b/graphics/pokemon/vivillon/elegant/icon.png differ diff --git a/graphics/pokemon/vivillon/fancy/front.png b/graphics/pokemon/vivillon/fancy/front.png deleted file mode 100644 index ad26aa4798..0000000000 Binary files a/graphics/pokemon/vivillon/fancy/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/fancy/icon.png b/graphics/pokemon/vivillon/fancy/icon.png index 22fe6f1a01..10d9a2e9b2 100644 Binary files a/graphics/pokemon/vivillon/fancy/icon.png and b/graphics/pokemon/vivillon/fancy/icon.png differ diff --git a/graphics/pokemon/vivillon/front.png b/graphics/pokemon/vivillon/front.png deleted file mode 100644 index cd1bdfbd7e..0000000000 Binary files a/graphics/pokemon/vivillon/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/garden/front.png b/graphics/pokemon/vivillon/garden/front.png deleted file mode 100644 index bcdc18e854..0000000000 Binary files a/graphics/pokemon/vivillon/garden/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/garden/icon.png b/graphics/pokemon/vivillon/garden/icon.png index 03032ba4d8..868f8c7fe3 100644 Binary files a/graphics/pokemon/vivillon/garden/icon.png and b/graphics/pokemon/vivillon/garden/icon.png differ diff --git a/graphics/pokemon/vivillon/high_plains/front.png b/graphics/pokemon/vivillon/high_plains/front.png deleted file mode 100644 index d8bae72c4e..0000000000 Binary files a/graphics/pokemon/vivillon/high_plains/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/jungle/front.png b/graphics/pokemon/vivillon/jungle/front.png deleted file mode 100644 index 1ab8f99eac..0000000000 Binary files a/graphics/pokemon/vivillon/jungle/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/jungle/icon.png b/graphics/pokemon/vivillon/jungle/icon.png index 8d83dd4291..1a3249596c 100644 Binary files a/graphics/pokemon/vivillon/jungle/icon.png and b/graphics/pokemon/vivillon/jungle/icon.png differ diff --git a/graphics/pokemon/vivillon/marine/front.png b/graphics/pokemon/vivillon/marine/front.png deleted file mode 100644 index 5ec8a8c465..0000000000 Binary files a/graphics/pokemon/vivillon/marine/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/marine/icon.png b/graphics/pokemon/vivillon/marine/icon.png index 045cb38dd0..72ef85f218 100644 Binary files a/graphics/pokemon/vivillon/marine/icon.png and b/graphics/pokemon/vivillon/marine/icon.png differ diff --git a/graphics/pokemon/vivillon/meadow/front.png b/graphics/pokemon/vivillon/meadow/front.png deleted file mode 100644 index 698ac42333..0000000000 Binary files a/graphics/pokemon/vivillon/meadow/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/modern/front.png b/graphics/pokemon/vivillon/modern/front.png deleted file mode 100644 index 2bf593a485..0000000000 Binary files a/graphics/pokemon/vivillon/modern/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/modern/icon.png b/graphics/pokemon/vivillon/modern/icon.png index 239e8887a4..2aa35c48e3 100644 Binary files a/graphics/pokemon/vivillon/modern/icon.png and b/graphics/pokemon/vivillon/modern/icon.png differ diff --git a/graphics/pokemon/vivillon/monsoon/front.png b/graphics/pokemon/vivillon/monsoon/front.png deleted file mode 100644 index 5dc6429009..0000000000 Binary files a/graphics/pokemon/vivillon/monsoon/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/monsoon/icon.png b/graphics/pokemon/vivillon/monsoon/icon.png index 6430f1f1b7..2eb6221ef4 100644 Binary files a/graphics/pokemon/vivillon/monsoon/icon.png and b/graphics/pokemon/vivillon/monsoon/icon.png differ diff --git a/graphics/pokemon/vivillon/ocean/front.png b/graphics/pokemon/vivillon/ocean/front.png deleted file mode 100644 index fcdcf11a7b..0000000000 Binary files a/graphics/pokemon/vivillon/ocean/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/ocean/icon.png b/graphics/pokemon/vivillon/ocean/icon.png index bde8c05192..ac083f2895 100644 Binary files a/graphics/pokemon/vivillon/ocean/icon.png and b/graphics/pokemon/vivillon/ocean/icon.png differ diff --git a/graphics/pokemon/vivillon/poke_ball/front.png b/graphics/pokemon/vivillon/poke_ball/front.png deleted file mode 100644 index c474cf54c2..0000000000 Binary files a/graphics/pokemon/vivillon/poke_ball/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/poke_ball/icon.png b/graphics/pokemon/vivillon/poke_ball/icon.png index 2620f928ae..9305c2b8ad 100644 Binary files a/graphics/pokemon/vivillon/poke_ball/icon.png and b/graphics/pokemon/vivillon/poke_ball/icon.png differ diff --git a/graphics/pokemon/vivillon/polar/front.png b/graphics/pokemon/vivillon/polar/front.png deleted file mode 100644 index 2f182203e7..0000000000 Binary files a/graphics/pokemon/vivillon/polar/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/polar/icon.png b/graphics/pokemon/vivillon/polar/icon.png index 4ca4400cd1..dd12dbd25d 100644 Binary files a/graphics/pokemon/vivillon/polar/icon.png and b/graphics/pokemon/vivillon/polar/icon.png differ diff --git a/graphics/pokemon/vivillon/river/front.png b/graphics/pokemon/vivillon/river/front.png deleted file mode 100644 index 18cf0efd27..0000000000 Binary files a/graphics/pokemon/vivillon/river/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/river/icon.png b/graphics/pokemon/vivillon/river/icon.png index a7427d685e..d33d8271c3 100644 Binary files a/graphics/pokemon/vivillon/river/icon.png and b/graphics/pokemon/vivillon/river/icon.png differ diff --git a/graphics/pokemon/vivillon/sandstorm/front.png b/graphics/pokemon/vivillon/sandstorm/front.png deleted file mode 100644 index 7c9158050a..0000000000 Binary files a/graphics/pokemon/vivillon/sandstorm/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/sandstorm/icon.png b/graphics/pokemon/vivillon/sandstorm/icon.png index e90306872f..e5e0b987eb 100644 Binary files a/graphics/pokemon/vivillon/sandstorm/icon.png and b/graphics/pokemon/vivillon/sandstorm/icon.png differ diff --git a/graphics/pokemon/vivillon/savanna/front.png b/graphics/pokemon/vivillon/savanna/front.png deleted file mode 100644 index dab3efbec9..0000000000 Binary files a/graphics/pokemon/vivillon/savanna/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/savanna/icon.png b/graphics/pokemon/vivillon/savanna/icon.png index 2665f3456d..37fc6570df 100644 Binary files a/graphics/pokemon/vivillon/savanna/icon.png and b/graphics/pokemon/vivillon/savanna/icon.png differ diff --git a/graphics/pokemon/vivillon/sun/front.png b/graphics/pokemon/vivillon/sun/front.png deleted file mode 100644 index 532b4a0191..0000000000 Binary files a/graphics/pokemon/vivillon/sun/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/sun/icon.png b/graphics/pokemon/vivillon/sun/icon.png index 7b7974210f..0a8af5e68f 100644 Binary files a/graphics/pokemon/vivillon/sun/icon.png and b/graphics/pokemon/vivillon/sun/icon.png differ diff --git a/graphics/pokemon/vivillon/tundra/front.png b/graphics/pokemon/vivillon/tundra/front.png deleted file mode 100644 index 36239fbe94..0000000000 Binary files a/graphics/pokemon/vivillon/tundra/front.png and /dev/null differ diff --git a/graphics/pokemon/vivillon/tundra/icon.png b/graphics/pokemon/vivillon/tundra/icon.png index 8d38291d42..711ae44ee5 100644 Binary files a/graphics/pokemon/vivillon/tundra/icon.png and b/graphics/pokemon/vivillon/tundra/icon.png differ diff --git a/graphics/pokemon/volbeat/front.png b/graphics/pokemon/volbeat/front.png deleted file mode 100644 index e4f17ee4d1..0000000000 Binary files a/graphics/pokemon/volbeat/front.png and /dev/null differ diff --git a/graphics/pokemon/volcanion/front.png b/graphics/pokemon/volcanion/front.png deleted file mode 100644 index 2a35f607d3..0000000000 Binary files a/graphics/pokemon/volcanion/front.png and /dev/null differ diff --git a/graphics/pokemon/volcarona/front.png b/graphics/pokemon/volcarona/front.png deleted file mode 100644 index d36a22a253..0000000000 Binary files a/graphics/pokemon/volcarona/front.png and /dev/null differ diff --git a/graphics/pokemon/volcarona/icon.png b/graphics/pokemon/volcarona/icon.png index c518ab0b4b..a37d965d98 100644 Binary files a/graphics/pokemon/volcarona/icon.png and b/graphics/pokemon/volcarona/icon.png differ diff --git a/graphics/pokemon/voltorb/front.png b/graphics/pokemon/voltorb/front.png deleted file mode 100644 index ad4385d1bb..0000000000 Binary files a/graphics/pokemon/voltorb/front.png and /dev/null differ diff --git a/graphics/pokemon/voltorb/icon.png b/graphics/pokemon/voltorb/icon.png index 551dbf281c..f0113355b0 100644 Binary files a/graphics/pokemon/voltorb/icon.png and b/graphics/pokemon/voltorb/icon.png differ diff --git a/graphics/pokemon/vullaby/front.png b/graphics/pokemon/vullaby/front.png deleted file mode 100644 index a24b2aafbe..0000000000 Binary files a/graphics/pokemon/vullaby/front.png and /dev/null differ diff --git a/graphics/pokemon/vulpix/front.png b/graphics/pokemon/vulpix/front.png deleted file mode 100644 index 39c5bdff38..0000000000 Binary files a/graphics/pokemon/vulpix/front.png and /dev/null differ diff --git a/graphics/pokemon/wailmer/front.png b/graphics/pokemon/wailmer/front.png deleted file mode 100644 index 3c887adf85..0000000000 Binary files a/graphics/pokemon/wailmer/front.png and /dev/null differ diff --git a/graphics/pokemon/wailord/front.png b/graphics/pokemon/wailord/front.png deleted file mode 100644 index 9f337fd82f..0000000000 Binary files a/graphics/pokemon/wailord/front.png and /dev/null differ diff --git a/graphics/pokemon/wailord/icon.png b/graphics/pokemon/wailord/icon.png index a6a6ff135c..de5a2c7078 100644 Binary files a/graphics/pokemon/wailord/icon.png and b/graphics/pokemon/wailord/icon.png differ diff --git a/graphics/pokemon/walrein/front.png b/graphics/pokemon/walrein/front.png deleted file mode 100644 index 7dc56050a3..0000000000 Binary files a/graphics/pokemon/walrein/front.png and /dev/null differ diff --git a/graphics/pokemon/wartortle/front.png b/graphics/pokemon/wartortle/front.png deleted file mode 100644 index 4768f5f480..0000000000 Binary files a/graphics/pokemon/wartortle/front.png and /dev/null differ diff --git a/graphics/pokemon/watchog/front.png b/graphics/pokemon/watchog/front.png deleted file mode 100644 index 82cfc39e58..0000000000 Binary files a/graphics/pokemon/watchog/front.png and /dev/null differ diff --git a/graphics/pokemon/watchog/icon.png b/graphics/pokemon/watchog/icon.png index 9ea2f13308..4051ebde8b 100644 Binary files a/graphics/pokemon/watchog/icon.png and b/graphics/pokemon/watchog/icon.png differ diff --git a/graphics/pokemon/weavile/front.png b/graphics/pokemon/weavile/front.png deleted file mode 100644 index 90ad62cb99..0000000000 Binary files a/graphics/pokemon/weavile/front.png and /dev/null differ diff --git a/graphics/pokemon/weedle/front.png b/graphics/pokemon/weedle/front.png deleted file mode 100644 index 12182258f8..0000000000 Binary files a/graphics/pokemon/weedle/front.png and /dev/null differ diff --git a/graphics/pokemon/weepinbell/front.png b/graphics/pokemon/weepinbell/front.png deleted file mode 100644 index 20b61b8d5f..0000000000 Binary files a/graphics/pokemon/weepinbell/front.png and /dev/null differ diff --git a/graphics/pokemon/weezing/front.png b/graphics/pokemon/weezing/front.png deleted file mode 100644 index d165c84785..0000000000 Binary files a/graphics/pokemon/weezing/front.png and /dev/null differ diff --git a/graphics/pokemon/weezing/icon.png b/graphics/pokemon/weezing/icon.png index c393384988..5c2421a2a9 100644 Binary files a/graphics/pokemon/weezing/icon.png and b/graphics/pokemon/weezing/icon.png differ diff --git a/graphics/pokemon/whimsicott/front.png b/graphics/pokemon/whimsicott/front.png deleted file mode 100644 index 013719675c..0000000000 Binary files a/graphics/pokemon/whimsicott/front.png and /dev/null differ diff --git a/graphics/pokemon/whirlipede/front.png b/graphics/pokemon/whirlipede/front.png deleted file mode 100644 index 6243350829..0000000000 Binary files a/graphics/pokemon/whirlipede/front.png and /dev/null differ diff --git a/graphics/pokemon/whiscash/back.png b/graphics/pokemon/whiscash/back.png index 8741f6e9ac..07e3fb0f68 100644 Binary files a/graphics/pokemon/whiscash/back.png and b/graphics/pokemon/whiscash/back.png differ diff --git a/graphics/pokemon/whiscash/front.png b/graphics/pokemon/whiscash/front.png deleted file mode 100644 index d62e69f3c3..0000000000 Binary files a/graphics/pokemon/whiscash/front.png and /dev/null differ diff --git a/graphics/pokemon/whismur/front.png b/graphics/pokemon/whismur/front.png deleted file mode 100644 index 3a4c69d47b..0000000000 Binary files a/graphics/pokemon/whismur/front.png and /dev/null differ diff --git a/graphics/pokemon/wigglytuff/front.png b/graphics/pokemon/wigglytuff/front.png deleted file mode 100644 index 5f5ee7e918..0000000000 Binary files a/graphics/pokemon/wigglytuff/front.png and /dev/null differ diff --git a/graphics/pokemon/wingull/back.png b/graphics/pokemon/wingull/back.png index dd40dda6b1..b419bf6410 100644 Binary files a/graphics/pokemon/wingull/back.png and b/graphics/pokemon/wingull/back.png differ diff --git a/graphics/pokemon/wingull/front.png b/graphics/pokemon/wingull/front.png deleted file mode 100644 index dc5fe2e80a..0000000000 Binary files a/graphics/pokemon/wingull/front.png and /dev/null differ diff --git a/graphics/pokemon/wobbuffet/front.png b/graphics/pokemon/wobbuffet/front.png deleted file mode 100644 index a8efd17ef7..0000000000 Binary files a/graphics/pokemon/wobbuffet/front.png and /dev/null differ diff --git a/graphics/pokemon/woobat/front.png b/graphics/pokemon/woobat/front.png deleted file mode 100644 index 793607dc89..0000000000 Binary files a/graphics/pokemon/woobat/front.png and /dev/null differ diff --git a/graphics/pokemon/woobat/icon.png b/graphics/pokemon/woobat/icon.png index 354353e885..c3640d5ad0 100644 Binary files a/graphics/pokemon/woobat/icon.png and b/graphics/pokemon/woobat/icon.png differ diff --git a/graphics/pokemon/wooper/front.png b/graphics/pokemon/wooper/front.png deleted file mode 100644 index ad14f25b21..0000000000 Binary files a/graphics/pokemon/wooper/front.png and /dev/null differ diff --git a/graphics/pokemon/wormadam/front.png b/graphics/pokemon/wormadam/front.png deleted file mode 100644 index 575460ac0b..0000000000 Binary files a/graphics/pokemon/wormadam/front.png and /dev/null differ diff --git a/graphics/pokemon/wormadam/icon.png b/graphics/pokemon/wormadam/icon.png index eb622fca23..866acd17ba 100644 Binary files a/graphics/pokemon/wormadam/icon.png and b/graphics/pokemon/wormadam/icon.png differ diff --git a/graphics/pokemon/wormadam/sandy_cloak/front.png b/graphics/pokemon/wormadam/sandy_cloak/front.png deleted file mode 100644 index 5d08516fdd..0000000000 Binary files a/graphics/pokemon/wormadam/sandy_cloak/front.png and /dev/null differ diff --git a/graphics/pokemon/wormadam/sandy_cloak/icon.png b/graphics/pokemon/wormadam/sandy_cloak/icon.png index 2c165141be..a45417a616 100644 Binary files a/graphics/pokemon/wormadam/sandy_cloak/icon.png and b/graphics/pokemon/wormadam/sandy_cloak/icon.png differ diff --git a/graphics/pokemon/wormadam/trash_cloak/front.png b/graphics/pokemon/wormadam/trash_cloak/front.png deleted file mode 100644 index a15ba6b906..0000000000 Binary files a/graphics/pokemon/wormadam/trash_cloak/front.png and /dev/null differ diff --git a/graphics/pokemon/wormadam/trash_cloak/icon.png b/graphics/pokemon/wormadam/trash_cloak/icon.png index f971e3fb59..6834629e9a 100644 Binary files a/graphics/pokemon/wormadam/trash_cloak/icon.png and b/graphics/pokemon/wormadam/trash_cloak/icon.png differ diff --git a/graphics/pokemon/wurmple/front.png b/graphics/pokemon/wurmple/front.png deleted file mode 100644 index bad155a3de..0000000000 Binary files a/graphics/pokemon/wurmple/front.png and /dev/null differ diff --git a/graphics/pokemon/wynaut/front.png b/graphics/pokemon/wynaut/front.png deleted file mode 100644 index 197d67fdf8..0000000000 Binary files a/graphics/pokemon/wynaut/front.png and /dev/null differ diff --git a/graphics/pokemon/wynaut/icon.png b/graphics/pokemon/wynaut/icon.png index 042c182352..c3f81995e6 100644 Binary files a/graphics/pokemon/wynaut/icon.png and b/graphics/pokemon/wynaut/icon.png differ diff --git a/graphics/pokemon/wyrdeer/back.png b/graphics/pokemon/wyrdeer/back.png new file mode 100755 index 0000000000..00f1ba932d Binary files /dev/null and b/graphics/pokemon/wyrdeer/back.png differ diff --git a/graphics/pokemon/wyrdeer/front.png b/graphics/pokemon/wyrdeer/front.png new file mode 100755 index 0000000000..9e5bffce51 Binary files /dev/null and b/graphics/pokemon/wyrdeer/front.png differ diff --git a/graphics/pokemon/wyrdeer/normal.pal b/graphics/pokemon/wyrdeer/normal.pal new file mode 100755 index 0000000000..10073e4475 --- /dev/null +++ b/graphics/pokemon/wyrdeer/normal.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +152 208 160 +152 104 56 +248 216 168 +120 72 64 +232 184 128 +0 0 0 +72 72 72 +224 152 88 +160 168 168 +120 120 120 +112 128 136 +240 240 240 +192 200 208 +56 64 64 +88 88 88 +64 72 80 diff --git a/graphics/pokemon/wyrdeer/shiny.pal b/graphics/pokemon/wyrdeer/shiny.pal new file mode 100755 index 0000000000..ecd55cb218 --- /dev/null +++ b/graphics/pokemon/wyrdeer/shiny.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +152 208 160 +152 104 56 +248 216 168 +120 72 64 +232 184 128 +0 0 0 +72 72 72 +224 152 88 +168 180 128 +120 140 80 +112 128 136 +232 236 208 +208 216 152 +56 64 64 +88 88 88 +64 72 80 diff --git a/graphics/pokemon/xatu/anim_front.png b/graphics/pokemon/xatu/anim_front.png index b6968e7758..c3d3143846 100644 Binary files a/graphics/pokemon/xatu/anim_front.png and b/graphics/pokemon/xatu/anim_front.png differ diff --git a/graphics/pokemon/xatu/front.png b/graphics/pokemon/xatu/front.png deleted file mode 100644 index 93c7947632..0000000000 Binary files a/graphics/pokemon/xatu/front.png and /dev/null differ diff --git a/graphics/pokemon/xatu/normal.pal b/graphics/pokemon/xatu/normal.pal index eb20bf6aea..05aeca9fc5 100644 --- a/graphics/pokemon/xatu/normal.pal +++ b/graphics/pokemon/xatu/normal.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 0 176 232 -72 144 64 -144 208 64 -40 104 40 -176 136 32 -112 184 64 -248 184 48 -136 88 0 +74 148 65 +148 213 65 +41 106 41 +180 139 32 +115 189 65 +255 189 49 +139 90 0 16 16 16 -248 248 248 -144 144 144 -80 80 80 -128 40 0 -176 48 0 -200 200 200 -232 56 0 +255 255 255 +148 148 148 +82 82 82 +131 41 0 +180 49 0 +205 205 205 +238 57 0 diff --git a/graphics/pokemon/xerneas/active/front.png b/graphics/pokemon/xerneas/active/front.png deleted file mode 100644 index b291e10f4f..0000000000 Binary files a/graphics/pokemon/xerneas/active/front.png and /dev/null differ diff --git a/graphics/pokemon/xerneas/back.png b/graphics/pokemon/xerneas/back.png index 30654685a9..5f38d48dd3 100644 Binary files a/graphics/pokemon/xerneas/back.png and b/graphics/pokemon/xerneas/back.png differ diff --git a/graphics/pokemon/xerneas/front.png b/graphics/pokemon/xerneas/front.png index d219e463b9..357f3b4294 100644 Binary files a/graphics/pokemon/xerneas/front.png and b/graphics/pokemon/xerneas/front.png differ diff --git a/graphics/pokemon/xerneas/icon.png b/graphics/pokemon/xerneas/icon.png index f59ee416fa..31036c9ee1 100644 Binary files a/graphics/pokemon/xerneas/icon.png and b/graphics/pokemon/xerneas/icon.png differ diff --git a/graphics/pokemon/yamask/front.png b/graphics/pokemon/yamask/front.png deleted file mode 100644 index 28a564b55b..0000000000 Binary files a/graphics/pokemon/yamask/front.png and /dev/null differ diff --git a/graphics/pokemon/yanma/front.png b/graphics/pokemon/yanma/front.png deleted file mode 100644 index 54d4f54cda..0000000000 Binary files a/graphics/pokemon/yanma/front.png and /dev/null differ diff --git a/graphics/pokemon/yanmega/anim_front.png b/graphics/pokemon/yanmega/anim_front.png index d50d34b73b..f5b4db9afa 100644 Binary files a/graphics/pokemon/yanmega/anim_front.png and b/graphics/pokemon/yanmega/anim_front.png differ diff --git a/graphics/pokemon/yanmega/front.png b/graphics/pokemon/yanmega/front.png deleted file mode 100644 index 943aa095a7..0000000000 Binary files a/graphics/pokemon/yanmega/front.png and /dev/null differ diff --git a/graphics/pokemon/yveltal/front.png b/graphics/pokemon/yveltal/front.png deleted file mode 100644 index 7a259c5139..0000000000 Binary files a/graphics/pokemon/yveltal/front.png and /dev/null differ diff --git a/graphics/pokemon/zangoose/front.png b/graphics/pokemon/zangoose/front.png deleted file mode 100644 index d9640b8428..0000000000 Binary files a/graphics/pokemon/zangoose/front.png and /dev/null differ diff --git a/graphics/pokemon/zangoose/icon.png b/graphics/pokemon/zangoose/icon.png index 83a9ce97fd..80f3b7c450 100644 Binary files a/graphics/pokemon/zangoose/icon.png and b/graphics/pokemon/zangoose/icon.png differ diff --git a/graphics/pokemon/zapdos/back.png b/graphics/pokemon/zapdos/back.png index 00b3410ddf..0b7cc3c7b3 100644 Binary files a/graphics/pokemon/zapdos/back.png and b/graphics/pokemon/zapdos/back.png differ diff --git a/graphics/pokemon/zapdos/front.png b/graphics/pokemon/zapdos/front.png deleted file mode 100644 index 790791d6eb..0000000000 Binary files a/graphics/pokemon/zapdos/front.png and /dev/null differ diff --git a/graphics/pokemon/zebstrika/front.png b/graphics/pokemon/zebstrika/front.png deleted file mode 100644 index 8d09702827..0000000000 Binary files a/graphics/pokemon/zebstrika/front.png and /dev/null differ diff --git a/graphics/pokemon/zekrom/front.png b/graphics/pokemon/zekrom/front.png deleted file mode 100644 index 265903400a..0000000000 Binary files a/graphics/pokemon/zekrom/front.png and /dev/null differ diff --git a/graphics/pokemon/zekrom/icon.png b/graphics/pokemon/zekrom/icon.png index 33115bae9d..c4380ec69a 100644 Binary files a/graphics/pokemon/zekrom/icon.png and b/graphics/pokemon/zekrom/icon.png differ diff --git a/graphics/pokemon/zigzagoon/front.png b/graphics/pokemon/zigzagoon/front.png deleted file mode 100644 index da1a3a6ad8..0000000000 Binary files a/graphics/pokemon/zigzagoon/front.png and /dev/null differ diff --git a/graphics/pokemon/zoroark/front.png b/graphics/pokemon/zoroark/front.png deleted file mode 100644 index 365e9ca96c..0000000000 Binary files a/graphics/pokemon/zoroark/front.png and /dev/null differ diff --git a/graphics/pokemon/zoroark/icon.png b/graphics/pokemon/zoroark/icon.png index 08d5206f3b..338a576a4a 100644 Binary files a/graphics/pokemon/zoroark/icon.png and b/graphics/pokemon/zoroark/icon.png differ diff --git a/graphics/pokemon/zorua/front.png b/graphics/pokemon/zorua/front.png deleted file mode 100644 index 58f3f3a7c5..0000000000 Binary files a/graphics/pokemon/zorua/front.png and /dev/null differ diff --git a/graphics/pokemon/zubat/front.png b/graphics/pokemon/zubat/front.png deleted file mode 100644 index 36d62770c7..0000000000 Binary files a/graphics/pokemon/zubat/front.png and /dev/null differ diff --git a/graphics/pokemon/zweilous/front.png b/graphics/pokemon/zweilous/front.png deleted file mode 100644 index d6e4b809d9..0000000000 Binary files a/graphics/pokemon/zweilous/front.png and /dev/null differ diff --git a/graphics/pokemon/zweilous/icon.png b/graphics/pokemon/zweilous/icon.png index 7baef54fb0..1c0a166af9 100644 Binary files a/graphics/pokemon/zweilous/icon.png and b/graphics/pokemon/zweilous/icon.png differ diff --git a/graphics/pokemon/zygarde/10_percent/front.png b/graphics/pokemon/zygarde/10_percent/front.png deleted file mode 100644 index f475e6cff3..0000000000 Binary files a/graphics/pokemon/zygarde/10_percent/front.png and /dev/null differ diff --git a/graphics/pokemon/zygarde/10_percent/icon.png b/graphics/pokemon/zygarde/10_percent/icon.png index 3d968a6b69..222eb1b80a 100644 Binary files a/graphics/pokemon/zygarde/10_percent/icon.png and b/graphics/pokemon/zygarde/10_percent/icon.png differ diff --git a/graphics/pokemon/zygarde/complete/front.png b/graphics/pokemon/zygarde/complete/front.png deleted file mode 100644 index 891af92226..0000000000 Binary files a/graphics/pokemon/zygarde/complete/front.png and /dev/null differ diff --git a/graphics/pokemon/zygarde/complete/icon.png b/graphics/pokemon/zygarde/complete/icon.png index 8575e8d58d..663b98fd74 100644 Binary files a/graphics/pokemon/zygarde/complete/icon.png and b/graphics/pokemon/zygarde/complete/icon.png differ diff --git a/graphics/pokemon/zygarde/front.png b/graphics/pokemon/zygarde/front.png deleted file mode 100644 index 5f63fc2d87..0000000000 Binary files a/graphics/pokemon/zygarde/front.png and /dev/null differ diff --git a/graphics/union_room_chat/unk_palette2.pal b/graphics/union_room_chat/chat_messages_window.pal similarity index 100% rename from graphics/union_room_chat/unk_palette2.pal rename to graphics/union_room_chat/chat_messages_window.pal diff --git a/graphics/union_room_chat/window_1.pal b/graphics/union_room_chat/input_text.pal similarity index 100% rename from graphics/union_room_chat/window_1.pal rename to graphics/union_room_chat/input_text.pal diff --git a/graphics/union_room_chat/border.bin b/graphics/union_room_chat/keyboard.bin similarity index 100% rename from graphics/union_room_chat/border.bin rename to graphics/union_room_chat/keyboard.bin diff --git a/graphics/union_room_chat/border.png b/graphics/union_room_chat/keyboard.png similarity index 100% rename from graphics/union_room_chat/border.png rename to graphics/union_room_chat/keyboard.png diff --git a/graphics/union_room_chat/r_button.png b/graphics/union_room_chat/r_button.png index 168a293f35..06079ca211 100644 Binary files a/graphics/union_room_chat/r_button.png and b/graphics/union_room_chat/r_button.png differ diff --git a/graphics/union_room_chat/unk_palette1.pal b/graphics/union_room_chat/unused.pal similarity index 100% rename from graphics/union_room_chat/unk_palette1.pal rename to graphics/union_room_chat/unused.pal diff --git a/graphics/union_room_chat/window_2.pal b/graphics/union_room_chat/window_2.pal deleted file mode 100644 index a8c95a3c04..0000000000 --- a/graphics/union_room_chat/window_2.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -156 197 98 -41 131 222 -0 82 172 -197 255 106 -172 230 49 -246 246 213 -255 49 49 -255 148 148 -131 164 213 -238 238 90 -65 65 65 -115 115 115 -172 172 172 -230 230 255 -0 0 0 -255 255 255 diff --git a/include/battle.h b/include/battle.h index 79413441c8..f86a5c975c 100644 --- a/include/battle.h +++ b/include/battle.h @@ -143,6 +143,7 @@ struct ProtectStruct u16 quickDraw:1; u16 beakBlastCharge:1; u16 quash:1; + u16 shellTrap:1; u16 silkTrapped:1; u32 physicalDmg; u32 specialDmg; @@ -191,6 +192,7 @@ struct SpecialStatus u8 weatherAbilityDone:1; u8 terrainAbilityDone:1; u8 emergencyExited:1; + u8 afterYou:1; }; struct SideTimer @@ -250,6 +252,7 @@ struct AI_SavedBattleMon u16 moves[MAX_MON_MOVES]; u16 heldItem; u16 species; + u8 types[3]; }; struct AiPartyMon @@ -269,8 +272,8 @@ struct AiPartyMon struct AIPartyData // Opposing battlers - party mons. { - struct AiPartyMon mons[2][PARTY_SIZE]; // 2 parties(player, opponent). Used to save information on opposing party. - u8 count[2]; + struct AiPartyMon mons[NUM_BATTLE_SIDES][PARTY_SIZE]; // 2 parties(player, opponent). Used to save information on opposing party. + u8 count[NUM_BATTLE_SIDES]; }; struct AiLogicData @@ -514,7 +517,7 @@ struct ZMoveData u8 splits[MAX_BATTLERS_COUNT]; }; -struct StolenItem +struct LostItem { u16 originalItem:15; u16 stolen:1; @@ -531,7 +534,6 @@ struct BattleStruct u8 wildVictorySong; u8 dynamicMoveType; u8 wrappedBy[MAX_BATTLERS_COUNT]; - u16 assistPossibleMoves[PARTY_SIZE * MAX_MON_MOVES]; // Each of mons can know max 4 moves. u8 focusPunchBattlerId; u8 battlerPreventingSwitchout; u8 moneyMultiplier:6; @@ -579,8 +581,6 @@ struct BattleStruct void (*savedCallback)(void); u16 usedHeldItems[PARTY_SIZE][NUM_BATTLE_SIDES]; // For each party member and side. For harvest, recycle u16 chosenItem[MAX_BATTLERS_COUNT]; - u8 AI_itemType[2]; - u8 AI_itemFlags[2]; u16 choicedMove[MAX_BATTLERS_COUNT]; u16 changedItems[MAX_BATTLERS_COUNT]; u8 switchInItemsCounter; @@ -640,9 +640,11 @@ struct BattleStruct u16 moveEffect2; // For Knock Off u16 changedSpecies[PARTY_SIZE]; // For Zygarde or future forms when multiple mons can change into the same pokemon. u8 quickClawBattlerId; - struct StolenItem itemStolen[PARTY_SIZE]; // Player's team that had items stolen (two bytes per party member) + 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 u8 swapDamageCategory:1; // Photon Geyser, Shell Side Arm, Light That Burns the Sky + u8 forcedSwitch:4; // For each battler + u8 switchInAbilityPostponed:4; // To not activate against an empty field, each bit for battler u8 ballSpriteIds[2]; // item gfx, window gfx u8 stickyWebUser; u8 appearedInBattle; // Bitfield to track which Pokemon appeared in battle. Used for Burmy's form change @@ -650,9 +652,15 @@ struct BattleStruct // When using a move which hits multiple opponents which is then bounced by a target, we need to make sure, the move hits both opponents, the one with bounce, and the one without. u8 attackerBeforeBounce:2; u8 beatUpSlot:3; + bool8 hitSwitchTargetFailed:1; u8 targetsDone[MAX_BATTLERS_COUNT]; // Each battler as a bit. u16 overwrittenAbilities[MAX_BATTLERS_COUNT]; // abilities overwritten during battle (keep separate from battle history in case of switching) bool8 allowedToChangeFormInWeather[PARTY_SIZE][2]; // For each party member and side, used by Ice Face. + u8 battleBondTransformed[NUM_BATTLE_SIDES]; // Bitfield for each party. + u8 storedHealingWish:4; // Each battler as a bit. + u8 storedLunarDance:4; // Each battler as a bit. + u16 supremeOverlordModifier[MAX_BATTLERS_COUNT]; + u8 itemPartyIndex[MAX_BATTLERS_COUNT]; }; #define F_DYNAMIC_TYPE_1 (1 << 6) @@ -844,7 +852,7 @@ struct MonSpritesGfx u8 *byte[MAX_BATTLERS_COUNT]; } sprites; struct SpriteTemplate templates[MAX_BATTLERS_COUNT]; - struct SpriteFrameImage frameImages[MAX_BATTLERS_COUNT][4]; + struct SpriteFrameImage frameImages[MAX_BATTLERS_COUNT][MAX_MON_PIC_FRAMES]; u8 unusedArr[0x80]; u8 *barFontGfx; void *unusedPtr; diff --git a/include/battle_ai_switch_items.h b/include/battle_ai_switch_items.h index 70dc41b34b..622593b6dd 100644 --- a/include/battle_ai_switch_items.h +++ b/include/battle_ai_switch_items.h @@ -1,36 +1,6 @@ #ifndef GUARD_BATTLE_AI_SWITCH_ITEMS_H #define GUARD_BATTLE_AI_SWITCH_ITEMS_H -enum -{ - AI_ITEM_FULL_RESTORE = 1, - AI_ITEM_HEAL_HP, - AI_ITEM_CURE_CONDITION, - AI_ITEM_X_STAT, - AI_ITEM_GUARD_SPEC, - AI_ITEM_NOT_RECOGNIZABLE -}; - -enum { - AI_HEAL_CONFUSION, - AI_HEAL_PARALYSIS, - AI_HEAL_FREEZE, - AI_HEAL_BURN, - AI_HEAL_POISON, - AI_HEAL_SLEEP, -}; - -enum { - AI_X_ATTACK, - AI_X_DEFEND, - AI_X_SPEED, - AI_X_SPATK, - AI_X_SPDEF, // Unused - AI_X_ACCURACY, - AI_X_EVASION, // Unused - AI_DIRE_HIT, -}; - void GetAIPartyIndexes(u32 battlerId, s32 *firstId, s32 *lastId); void AI_TrySwitchOrUseItem(void); u8 GetMostSuitableMonToSwitchInto(void); diff --git a/include/battle_ai_util.h b/include/battle_ai_util.h index 11eba7b661..d1319f0ca7 100644 --- a/include/battle_ai_util.h +++ b/include/battle_ai_util.h @@ -9,7 +9,8 @@ bool32 AI_RandLessThan(u8 val); void RecordLastUsedMoveByTarget(void); -bool32 IsBattlerAIControlled(u32 battlerId); +bool32 BattlerHasAi(u32 battlerId); +bool32 IsAiBattlerAware(u32 battlerId); void ClearBattlerMoveHistory(u8 battlerId); void RecordLastUsedMoveBy(u32 battlerId, u32 move); void RecordKnownMove(u8 battlerId, u32 move); @@ -144,6 +145,7 @@ bool32 AnyPartyMemberStatused(u8 battlerId, bool32 checkSoundproof); u32 ShouldTryToFlinch(u8 battlerAtk, u8 battlerDef, u16 atkAbility, u16 defAbility, u16 move); bool32 ShouldTrap(u8 battlerAtk, u8 battlerDef, u16 move); bool32 IsWakeupTurn(u8 battler); +bool32 AI_IsBattlerAsleepOrComatose(u8 battlerId); // partner logic u16 GetAllyChosenMove(u8 battlerId); diff --git a/include/battle_anim.h b/include/battle_anim.h index c4b29d26e2..a3677bd98f 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -160,7 +160,7 @@ void AnimThrowProjectile(struct Sprite *sprite); void GetBgDataForTransform(struct BattleAnimBgData *dest, u8 battlerId); u8 CreateAdditionalMonSpriteForMoveAnim(u16 species, bool8 isBackpic, u8 id, s16 x, s16 y, u8 subpriority, u32 personality, u32 trainerId, u32 battlerId); void ResetSpriteRotScale_PreserveAffine(struct Sprite *sprite); -void TradeMenuBouncePartySprites(struct Sprite *sprite); +void Trade_MoveSelectedMonToTarget(struct Sprite *sprite); void DestroyAnimVisualTaskAndDisableBlend(u8 taskId); void DestroySpriteAndFreeResources_(struct Sprite *sprite); void SetBattlerSpriteYOffsetFromOtherYScale(u8 spriteId, u8 otherSpriteId); diff --git a/include/battle_interface.h b/include/battle_interface.h index c82f2acc2e..e2937748a4 100644 --- a/include/battle_interface.h +++ b/include/battle_interface.h @@ -56,8 +56,7 @@ enum #define TAG_MEGA_TRIGGER_PAL 0xD777 #define TAG_MEGA_INDICATOR_PAL 0xD778 -#define TAG_ALPHA_INDICATOR_PAL 0xD779 -#define TAG_OMEGA_INDICATOR_PAL 0xD77A +#define TAG_ALPHA_OMEGA_INDICATOR_PAL 0xD779 // Alpha and Omega indicators use the same palette as each of them only uses 4 different colors. #define TAG_ZMOVE_TRIGGER_PAL 0xD77B enum @@ -77,13 +76,11 @@ enum }; u32 WhichBattleCoords(u32 battlerId); -u8 GetMegaIndicatorSpriteId(u32 healthboxSpriteId); u8 CreateBattlerHealthboxSprites(u8 battler); u8 CreateSafariPlayerHealthboxSprites(void); void SetBattleBarStruct(u8 battler, u8 healthboxSpriteId, s32 maxVal, s32 currVal, s32 receivedValue); void SetHealthboxSpriteInvisible(u8 healthboxSpriteId); void SetHealthboxSpriteVisible(u8 healthboxSpriteId); -void DestoryHealthboxSprite(u8 healthboxSpriteId); void DummyBattleInterfaceFunc(u8 healthboxSpriteId, bool8 isDoubleBattleBankOnly); void UpdateOamPriorityInAllHealthboxes(u8 priority, bool32 hideHpBoxes); void InitBattlerHealthboxCoords(u8 battler); @@ -94,8 +91,7 @@ void CreateMegaTriggerSprite(u8 battlerId, u8 palId); bool32 IsMegaTriggerSpriteActive(void); void HideMegaTriggerSprite(void); void DestroyMegaTriggerSprite(void); -u32 CreateMegaIndicatorSprite(u32 battlerId, u32 which); -void DestroyMegaIndicatorSprite(u32 healthboxSpriteId); +void MegaIndicator_LoadSpritesGfx(void); u8 CreatePartyStatusSummarySprites(u8 battler, struct HpAndStatus *partyInfo, bool8 skipPlayer, bool8 isBattleStart); void Task_HidePartyStatusSummary(u8 taskId); void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elementId); diff --git a/include/battle_main.h b/include/battle_main.h index df59dcae34..4f20e4c17a 100644 --- a/include/battle_main.h +++ b/include/battle_main.h @@ -1,6 +1,9 @@ #ifndef GUARD_BATTLE_MAIN_H #define GUARD_BATTLE_MAIN_H +#include "pokemon.h" +#include "data.h" + struct TrainerMoney { u8 classId; @@ -66,6 +69,9 @@ bool8 TryRunFromBattle(u8 battlerId); void SpecialStatusesClear(void); void SetTypeBeforeUsingMove(u16 move, u8 battlerAtk); 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); extern struct MultiPartnerMenuPokemon gMultiPartnerParty[MULTI_PARTY_SIZE]; diff --git a/include/battle_message.h b/include/battle_message.h index 9f6905abd3..19f8bc4caf 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -237,7 +237,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst); void BattlePutTextOnWindow(const u8 *text, u8 windowId); void SetPpNumbersPaletteInMoveSelection(void); u8 GetCurrentPpToMaxPpState(u8 currentPp, u8 maxPp); -bool32 ShouldDoTrainerSlide(u32 battlerId, u32 trainerId, u32 which); +u32 ShouldDoTrainerSlide(u32 battlerId, u32 which); // return 1 for TrainerA, 2 forTrainerB void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst); extern struct BattleMsgData *gBattleMsgDataPtr; diff --git a/include/battle_script_commands.h b/include/battle_script_commands.h index 60fd9b156b..dcf601e804 100644 --- a/include/battle_script_commands.h +++ b/include/battle_script_commands.h @@ -44,6 +44,9 @@ u16 GetSecretPowerMoveEffect(void); void StealTargetItem(u8 battlerStealer, u8 battlerItem); u8 GetCatchingBattler(void); u32 GetHighestStatId(u32 battlerId); +bool32 ProteanTryChangeType(u32 battler, u32 ability, u32 move, u32 moveType); +bool32 DoSwitchInAbilitiesItems(u32 battlerId); +u8 GetFirstFaintedPartyIndex(u8 battlerId); extern void (* const gBattleScriptingCommandsTable[])(void); extern const u8 gBattlePalaceNatureToMoveGroupLikelihood[NUM_NATURES][4]; diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 18c1911e52..c78fcafe48 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -246,17 +246,14 @@ extern const u8 BattleScript_TailwindEnds[]; extern const u8 BattleScript_TrickRoomEnds[]; extern const u8 BattleScript_WonderRoomEnds[]; extern const u8 BattleScript_MagicRoomEnds[]; -extern const u8 BattleScript_ElectricTerrainEnds[]; -extern const u8 BattleScript_MistyTerrainEnds[]; -extern const u8 BattleScript_GrassyTerrainEnds[]; -extern const u8 BattleScript_PsychicTerrainEnds[]; +extern const u8 BattleScript_TerrainEnds[]; +extern const u8 BattleScript_TerrainEnds_Ret[]; extern const u8 BattleScript_MudSportEnds[]; extern const u8 BattleScript_WaterSportEnds[]; extern const u8 BattleScript_SturdiedMsg[]; extern const u8 BattleScript_GravityEnds[]; extern const u8 BattleScript_MoveStatDrain[]; extern const u8 BattleScript_MoveStatDrain_PPLoss[]; -extern const u8 BattleScript_TargetAbilityStatRaiseOnMoveEnd[]; extern const u8 BattleScript_TargetsStatWasMaxedOut[]; extern const u8 BattleScript_AttackerAbilityStatRaise[]; extern const u8 BattleScript_AttackerAbilityStatRaiseEnd3[]; @@ -288,17 +285,22 @@ extern const u8 BattleScript_SelectingNotAllowedMoveHealBlockInPalace[]; extern const u8 BattleScript_ToxicSpikesFree[]; extern const u8 BattleScript_StickyWebFree[]; extern const u8 BattleScript_StealthRockFree[]; +extern const u8 BattleScript_SpikesDefog[]; +extern const u8 BattleScript_ToxicSpikesDefog[]; +extern const u8 BattleScript_StickyWebDefog[]; +extern const u8 BattleScript_StealthRockDefog[]; extern const u8 BattleScript_MegaEvolution[]; extern const u8 BattleScript_WishMegaEvolution[]; extern const u8 BattleScript_MoveEffectRecoilWithStatus[]; extern const u8 BattleScript_EffectWithChance[]; extern const u8 BattleScript_MoveEffectClearSmog[]; -extern const u8 BattleScript_ForceRandomSwitch[]; extern const u8 BattleScript_SideStatusWoreOffReturn[]; extern const u8 BattleScript_MoveEffectSmackDown[]; extern const u8 BattleScript_MoveEffectFlameBurst[]; -extern const u8 BattleScript_TrainerSlideMsgRet[]; -extern const u8 BattleScript_TrainerSlideMsgEnd2[]; +extern const u8 BattleScript_TrainerASlideMsgRet[]; +extern const u8 BattleScript_TrainerASlideMsgEnd2[]; +extern const u8 BattleScript_TrainerBSlideMsgRet[]; +extern const u8 BattleScript_TrainerBSlideMsgEnd2[]; extern const u8 BattleScript_MoveEffectFeint[]; extern const u8 BattleScript_ProteanActivates[]; extern const u8 BattleScript_DazzlingProtected[]; @@ -452,6 +454,13 @@ extern const u8 BattleScript_MimicryActivates_End3[]; extern const u8 BattleScript_IceFaceNullsDamage[]; extern const u8 BattleScript_BattlerFormChangeWithStringEnd3[]; extern const u8 BattleScript_DampPreventsAftermath[]; +extern const u8 BattleScript_HealingWishActivates[]; +extern const u8 BattleScript_LunarDanceActivates[]; +extern const u8 BattleScript_ShellTrapSetUp[]; +extern const u8 BattleScript_CouldntFullyProtect[]; +extern const u8 BattleScript_MoveEffectStockpileWoreOff[]; +extern const u8 BattleScript_StealthRockActivates[]; +extern const u8 BattleScript_SpikesActivates[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/include/battle_util.h b/include/battle_util.h index 1c3f486cda..b83209a697 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -64,6 +64,35 @@ struct TypePower u16 effect; }; +enum +{ + CANCELLER_FLAGS, + CANCELLER_SKY_DROP, + CANCELLER_ASLEEP, + CANCELLER_FROZEN, + CANCELLER_TRUANT, + CANCELLER_RECHARGE, + CANCELLER_FLINCH, + CANCELLER_DISABLED, + CANCELLER_GRAVITY, + CANCELLER_HEAL_BLOCKED, + CANCELLER_TAUNTED, + CANCELLER_IMPRISONED, + CANCELLER_CONFUSED, + CANCELLER_PARALYSED, + CANCELLER_IN_LOVE, + CANCELLER_BIDE, + CANCELLER_THAW, + CANCELLER_POWDER_MOVE, + CANCELLER_POWDER_STATUS, + CANCELLER_THROAT_CHOP, + CANCELLER_MULTIHIT_MOVES, + CANCELLER_Z_MOVES, + CANCELLER_END, + CANCELLER_PSYCHIC_TERRAIN, + CANCELLER_END2, +}; + extern const struct TypePower gNaturalGiftTable[]; void HandleAction_ThrowBall(void); @@ -152,6 +181,7 @@ void UndoMegaEvolution(u32 monId); void UndoFormChange(u32 monId, u32 side, bool32 isSwitchingOut); bool32 DoBattlersShareType(u32 battler1, u32 battler2); bool32 CanBattlerGetOrLoseItem(u8 battlerId, u16 itemId); +u32 GetIllusionMonSpecies(u32 battlerId); struct Pokemon *GetIllusionMonPtr(u32 battlerId); void ClearIllusionMon(u32 battlerId); bool32 SetIllusionMon(struct Pokemon *mon, u32 battlerId); @@ -167,7 +197,7 @@ bool32 IsPartnerMonFromSameTrainer(u8 battlerId); u8 GetSplitBasedOnStats(u8 battlerId); void SortBattlersBySpeed(u8 *battlers, bool8 slowToFast); bool32 TestSheerForceFlag(u8 battler, u16 move); -void TryRestoreStolenItems(void); +void TryRestoreHeldItems(void); bool32 CanStealItem(u8 battlerStealing, u8 battlerItem, u16 item); void TrySaveExchangedItem(u8 battlerId, u16 stolenItem); bool32 IsPartnerMonFromSameTrainer(u8 battlerId); diff --git a/include/battle_z_move.h b/include/battle_z_move.h index 94a9c3568c..44ed434549 100644 --- a/include/battle_z_move.h +++ b/include/battle_z_move.h @@ -26,5 +26,6 @@ const u8 *GetZMoveName(u16 move); void SetZEffect(void); bool32 IsZMoveUsable(u8 battlerId, u16 moveIndex); void GetUsableZMoves(u8 battlerId, u16 *moves); +u16 GetZMovePower(u16 move); -#endif // GUARD_BATTLE_Z_MOVE_H \ No newline at end of file +#endif // GUARD_BATTLE_Z_MOVE_H diff --git a/include/config/battle.h b/include/config/battle.h index 6dea72b406..b9d3926b05 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -95,6 +95,10 @@ #define B_BEAT_UP GEN_LATEST // In Gen5+, Beat Up uses a different formula to calculate its damage, and deals Dark-type damage. Prior to Gen 5, each hit also announces the party member's name. #define B_DARK_VOID_FAIL GEN_LATEST // In Gen7+, only Darkrai can use Dark Void. #define B_BURN_HIT_THAW GEN_LATEST // In Gen6+, damaging moves with a chance of burn will thaw the target, regardless if they're fire-type moves or not. +#define B_HEALING_WISH_SWITCH GEN_LATEST // In Gen5+, the mon receiving Healing Wish is sent out at the end of the turn. + // Additionally, in gen8+ the Healing Wish's effect will be stored until the user switches into a statused or hurt mon. +#define B_DEFOG_CLEARS_TERRAIN GEN_LATEST // In Gen8+, Defog also clears active Terrain. +#define B_STOCKPILE_RAISES_DEFS GEN_LATEST // In Gen4+, Stockpile also raises Defense and Sp. Defense stats. Once Spit Up / Swallow is used, these stat changes are lost. // Ability settings #define B_EXPANDED_ABILITY_NAMES TRUE // If TRUE, ability names are increased from 12 characters to 16 characters. @@ -122,6 +126,7 @@ #define B_X_ITEMS_BUFF GEN_LATEST // In Gen7+, the X Items raise a stat by 2 stages instead of 1. #define B_MENTAL_HERB GEN_LATEST // In Gen5+, the Mental Herb cures Taunt, Encore, Torment, Heal Block, and Disable in addition to Infatuation from before. #define B_TRAINERS_KNOCK_OFF_ITEMS TRUE // If TRUE, trainers can steal/swap your items (non-berries are restored after battle). In vanilla games trainers cannot steal items. +#define B_RESTORE_HELD_BATTLE_ITEMS TRUE // In Gen9 all non berry items are restored after battle. #define B_SOUL_DEW_BOOST GEN_LATEST // In Gens3-6, Soul Dew boosts Lati@s' Sp. Atk and Sp. Def. In Gen7+ it boosts the power of their Psychic and Dragon type moves instead. #define B_NET_BALL_MODIFIER GEN_LATEST // In Gen7+, Net Ball's catch multiplier is x5 instead of x3. #define B_DIVE_BALL_MODIFIER GEN_LATEST // In Gen4+, Dive Ball's effectiveness increases by when Surfing or Fishing. @@ -151,6 +156,9 @@ #define VAR_TERRAIN 0 // If this var has a value, assigning a STATUS_FIELD_xx_TERRAIN to it before battle causes the battle to start with that terrain active #define B_VAR_WILD_AI_FLAGS 0 // If not 0, you can use this var to add to default wild AI flags. NOT usable with flags above (1 << 15) +// Flag and Var settings +#define B_RESET_FLAGS_VARS_AFTER_WHITEOUT TRUE // If TRUE, Overworld_ResetBattleFlagsAndVars will reset battle-related Flags and Vars when the player whites out. + // Terrain settings #define B_TERRAIN_BG_CHANGE TRUE // If set to TRUE, terrain moves permanently change the default battle background until the effect fades. #define B_THUNDERSTORM_TERRAIN TRUE // If TRUE, overworld Thunderstorm generates Rain and Electric Terrain as in Gen 8. @@ -179,6 +187,7 @@ // Other settings #define B_DOUBLE_WILD_CHANCE 0 // % chance of encountering two Pokémon in a Wild Encounter. +#define B_DOUBLE_WILD_REQUIRE_2_MONS FALSE // If set to TRUE, Wild Double Battles will default to Single Battles when the player only has 1 usuable Pokémon, ignoring B_DOUBLE_WILD_CHANCE and B_FLAG_FORCE_DOUBLE_WILD. #define B_MULTI_BATTLE_WHITEOUT GEN_LATEST // In Gen4+, multi battles end when the Player and also their Partner don't have any more Pokémon to fight. #define B_EVOLUTION_AFTER_WHITEOUT GEN_LATEST // In Gen6+, Pokemon that qualify for evolution after battle will evolve even if the player loses. #define B_WILD_NATURAL_ENEMIES TRUE // If set to TRUE, certain wild mon species will attack other species when partnered in double wild battles (eg. Zangoose vs Seviper) @@ -190,6 +199,7 @@ #define B_NEW_SWORD_PARTICLE FALSE // If set to TRUE, it updates Swords Dance's particle. #define B_NEW_LEECH_SEED_PARTICLE FALSE // If set to TRUE, it updates Leech Seed's animation particle. #define B_NEW_HORN_ATTACK_PARTICLE FALSE // If set to TRUE, it updates Horn Attack's horn particle. +#define B_NEW_ROCKS_PARTICLE TRUE // If set to TRUE, it updates rock particles. #define B_NEW_LEAF_PARTICLE FALSE // If set to TRUE, it updates leaf particle. #define B_NEW_EMBER_PARTICLES FALSE // If set to TRUE, it updates Ember's fire particle. #define B_NEW_MEAN_LOOK_PARTICLE FALSE // If set to TRUE, it updates Mean Look's eye particle. diff --git a/include/config/debug.h b/include/config/debug.h index b427fcb513..43d7438018 100644 --- a/include/config/debug.h +++ b/include/config/debug.h @@ -2,16 +2,11 @@ #define GUARD_CONFIG_DEBUG_H // Overworld Debug -#define DEBUG_OVERWORLD_MENU TRUE // Enables a overworld debug menu for changing flags, variables, giving pokemon and more, accessed by holding R and pressing START while in the overworld by default. +#define DEBUG_OVERWORLD_MENU TRUE // Enables an overworld debug menu to change flags, variables, giving pokemon and more, accessed by holding R and pressing START while in the overworld by default. #define DEBUG_OVERWORLD_HELD_KEYS (R_BUTTON) // The keys required to be held to open the debug menu. #define DEBUG_OVERWORLD_TRIGGER_EVENT pressedStartButton // The event that opens the menu when holding the key(s) defined in DEBUG_OVERWORLD_HELD_KEYS. #define DEBUG_OVERWORLD_IN_MENU FALSE // Replaces the overworld debug menu button combination with a start menu entry (above Pokédex). -// Debug Flags -// To use the following debug features, replace the 0s with the flag ID you're assigning it to. -// Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature. -#define DEBUG_FLAG_NO_COLLISION 0 // If this flag is set, the debug function in the Utility submenu to disable player collision can be used. - // Battle Debug Menu #define DEBUG_BATTLE_MENU TRUE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button. diff --git a/include/config/item.h b/include/config/item.h index 031af37241..09008d0f24 100644 --- a/include/config/item.h +++ b/include/config/item.h @@ -2,12 +2,16 @@ #define GUARD_CONFIG_ITEM_H // Item config -#define I_SHINY_CHARM_REROLLS 3 // Amount of re-rolls if the player has the Shiny Charm. Set to 0 to disable Shiny Charm's effects. -#define I_KEY_FOSSILS GEN_LATEST // In Gen4+, all Gen 3 fossils became regular items. -#define I_KEY_ESCAPE_ROPE GEN_LATEST // In Gen8, Escape Rope became a Key Item. Keep in mind, this will make it free to buy in marts. -#define I_HEALTH_RECOVERY GEN_LATEST // In Gen7+, certain healing items recover a different amount of HP than they used to. -#define I_SITRUS_BERRY_HEAL GEN_LATEST // In Gen4+, Sitrus Berry was changed from healing 30 HP to healing 25% of Max HP. -#define I_VITAMIN_EV_CAP GEN_LATEST // In Gen8, the Vitamins no longer have a cap of 100 EV per stat. +#define I_SHINY_CHARM_REROLLS 3 // Amount of re-rolls if the player has the Shiny Charm. Set to 0 to disable Shiny Charm's effects. +#define I_KEY_FOSSILS GEN_LATEST // In Gen4+, all Gen 3 fossils became regular items. +#define I_KEY_ESCAPE_ROPE GEN_LATEST // In Gen8, Escape Rope became a Key Item. Keep in mind, this will make it free to buy in marts. +#define I_HEALTH_RECOVERY GEN_LATEST // In Gen7+, certain healing items recover a different amount of HP than they used to. +#define I_SITRUS_BERRY_HEAL GEN_LATEST // In Gen4+, Sitrus Berry was changed from healing 30 HP to healing 25% of Max HP. +#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. + +// TM config +#define I_REUSABLE_TMS FALSE // In Gen5-8, TMs are reusable. Setting this to TRUE will make all vanilla TMs reusable, though they can also be cherry-picked by setting their importance to 1. // Repel/Lure config // These two settings are both independent and complementary. diff --git a/include/config/overworld.h b/include/config/overworld.h index fb438431b3..f62588b5fd 100644 --- a/include/config/overworld.h +++ b/include/config/overworld.h @@ -4,10 +4,14 @@ // Movement config #define OW_RUNNING_INDOORS GEN_LATEST // In Gen4+, players are allowed to run indoors. +// Other settings +#define OW_POISON_DAMAGE GEN_LATEST // In Gen4, Pokémon no longer faint from Poison in the overworld. In Gen5+, they no longer take damage at all. + // Overworld flags // To use the following features in scripting, replace the 0s with the flag ID you're assigning it to. // Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature. #define OW_FLAG_NO_ENCOUNTER 0 // If this flag is set, wild encounters will be disabled. #define OW_FLAG_NO_TRAINER_SEE 0 // If this flag is set, trainers will not battle the player unless they're talked to. +#define OW_FLAG_NO_COLLISION 0 // If this flag is set, the player will be able to walk over tiles with collision. Mainly intended for debugging purposes. #endif // GUARD_CONFIG_OVERWORLD_H diff --git a/include/config/pokemon.h b/include/config/pokemon.h index 4cb2271d5a..1cde573c96 100644 --- a/include/config/pokemon.h +++ b/include/config/pokemon.h @@ -13,11 +13,15 @@ #define P_EGG_HATCH_LEVEL GEN_LATEST // Since Gen 4, Pokémon will hatch from eggs at level 1 instead of 5. #define P_BALL_INHERITING GEN_LATEST // Since Gen 6, Eggs from the Daycare will inherit the Poké Ball from their mother. From Gen7 onwards, the father can pass it down as well, as long as it's of the same species as the mother. -// Other settings +// Species-specific settings #define P_SHEDINJA_BALL GEN_LATEST // Since Gen 4, Shedinja requires a Poké Ball for its evolution. In Gen 3, Shedinja inherits Nincada's Ball. -#define P_LEGENDARY_PERFECT_IVS GEN_LATEST // Since Gen 6, Legendaries, Mythicals and Ultra Beasts found in the wild or given through gifts have at least 3 perfect IVs. #define P_KADABRA_EVERSTONE GEN_LATEST // Since Gen 4, Kadabra can evolve even when holding an Everstone. #define P_HIPPO_GENDER_DIFF_ICONS TRUE // If TRUE, will give Hippopotas and Hippowdon custom icons for their female forms. +#define P_SHUCKLE_BERRY_JUICE TRUE // In Gen 2, Shuckle had a 1/16 chance of converting Berry that it's holding into Berry Juice. Setting this to TRUE will allow to do this with an Oran Berry, which is the spiritual succesor of the Berry item. + +// Other settings +#define P_LEGENDARY_PERFECT_IVS GEN_LATEST // Since Gen 6, Legendaries, Mythicals and Ultra Beasts found in the wild or given through gifts have at least 3 perfect IVs. +#define P_EV_CAP GEN_LATEST // Since Gen 6, the max EVs per stat is 252 instead of 255. // Flag settings // To use the following features in scripting, replace the 0s with the flag ID you're assigning it to. diff --git a/include/constants/battle.h b/include/constants/battle.h index be44c21cbe..61c3776c6c 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -371,8 +371,13 @@ #define MOVE_EFFECT_RELIC_SONG 69 #define MOVE_EFFECT_TRAP_BOTH 70 #define MOVE_EFFECT_DOUBLE_SHOCK 71 +#define MOVE_EFFECT_ROUND 72 +#define MOVE_EFFECT_STOCKPILE_WORE_OFF 73 +#define MOVE_EFFECT_DIRE_CLAW 74 +#define MOVE_EFFECT_STEALTH_ROCK 75 +#define MOVE_EFFECT_SPIKES 76 -#define NUM_MOVE_EFFECTS 72 +#define NUM_MOVE_EFFECTS 77 #define MOVE_EFFECT_AFFECTS_USER 0x4000 #define MOVE_EFFECT_CERTAIN 0x8000 diff --git a/include/constants/battle_ai.h b/include/constants/battle_ai.h index 1cfb9cd4dc..1316054cd1 100644 --- a/include/constants/battle_ai.h +++ b/include/constants/battle_ai.h @@ -57,6 +57,7 @@ #define AI_FLAG_SCREENER (1 << 14) // AI prefers screening effects like reflect, mist, etc. TODO unfinished #define AI_FLAG_SMART_SWITCHING (1 << 15) // AI includes a lot more switching checks #define AI_FLAG_ACE_POKEMON (1 << 16) // AI has an Ace Pokemon. The last Pokemon in the party will not be used until it's the last one remaining. +#define AI_FLAG_OMNISCIENT (1 << 17) // AI has full knowledge of player moves, abilities, hold items // 'other' ai logic flags #define AI_FLAG_ROAMING (1 << 29) diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index 2cf8d2f9c3..d1562dec93 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -397,7 +397,15 @@ #define EFFECT_SPECIAL_ATTACK_UP_HIT 391 #define EFFECT_VICTORY_DANCE 392 #define EFFECT_TEATIME 393 +#define EFFECT_ATTACK_UP_USER_ALLY 394 // Howl 8th Gen +#define EFFECT_SHELL_TRAP 395 +#define EFFECT_PSYBLADE 396 +#define EFFECT_HYDRO_STEAM 397 +#define EFFECT_HIT_SET_ENTRY_HAZARD 398 +#define EFFECT_DIRE_CLAW 399 +#define EFFECT_BARB_BARRAGE 400 +#define EFFECT_REVIVAL_BLESSING 401 -#define NUM_BATTLE_MOVE_EFFECTS 394 +#define NUM_BATTLE_MOVE_EFFECTS 402 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/include/constants/battle_pyramid.h b/include/constants/battle_pyramid.h index 297f3b1fff..ac80a2d7d3 100644 --- a/include/constants/battle_pyramid.h +++ b/include/constants/battle_pyramid.h @@ -1,7 +1,7 @@ #ifndef GUARD_CONSTANTS_BATTLE_PYRAMID_H #define GUARD_CONSTANTS_BATTLE_PYRAMID_H -#define TOTAL_ROUNDS 20 +#define TOTAL_PYRAMID_ROUNDS 20 #define PICKUP_ITEMS_PER_ROUND 10 #define HINT_EXIT_DIRECTION 0 diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index 123fb5d49f..be2410f946 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -74,6 +74,7 @@ #define BS_PLAYER2 13 // for Cmd_updatestatusicon #define BS_OPPONENT2 14 #define BS_ABILITY_BATTLER 15 +#define BS_ATTACKER_PARTNER 16 // Cmd_accuracycheck #define NO_ACC_CALC_CHECK_LOCK_ON 0xFFFF @@ -254,8 +255,11 @@ #define VARIOUS_TRY_WIND_RIDER_POWER 163 #define VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES 164 #define VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES 165 -#define VARIOUS_JUMP_IF_NO_VALID_TARGETS 166 -#define VARIOUS_JUMP_IF_EMERGENCY_EXITED 167 +#define VARIOUS_JUMP_IF_EMERGENCY_EXITED 166 +#define VARIOUS_STORE_HEALING_WISH 167 +#define VARIOUS_HIT_SWITCH_TARGET_FAILED 168 +#define VARIOUS_JUMP_IF_SHELL_TRAP 169 +#define VARIOUS_TRY_REVIVAL_BLESSING 170 // Cmd_manipulatedamage #define DMG_CHANGE_SIGN 0 @@ -273,6 +277,7 @@ // Cmd_statbuffchange #define STAT_CHANGE_ALLOW_PTR (1 << 0) // If set, allow use of jumpptr. Set in every use of statbuffchange +#define STAT_CHANGE_MIRROR_ARMOR (1 << 1) // Stat change redirection caused by Mirror Armor ability. #define STAT_CHANGE_NOT_PROTECT_AFFECTED (1 << 5) #define STAT_CHANGE_UPDATE_MOVE_EFFECT (1 << 6) diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 3f8853024f..e552077534 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -265,8 +265,8 @@ #define STRINGID_ITAPPEAREDCAUGHT 264 #define STRINGID_AARGHALMOSTHADIT 265 #define STRINGID_SHOOTSOCLOSE 266 -#define STRINGID_GOTCHAPKMNCAUGHT 267 -#define STRINGID_GOTCHAPKMNCAUGHT2 268 +#define STRINGID_GOTCHAPKMNCAUGHTPLAYER 267 +#define STRINGID_GOTCHAPKMNCAUGHTWALLY 268 #define STRINGID_GIVENICKNAMECAPTURED 269 #define STRINGID_PKMNSENTTOPC 270 #define STRINGID_PKMNDATAADDEDTODEX 271 @@ -639,8 +639,20 @@ #define STRINGID_ABILITYWEAKENEDFSURROUNDINGMONSSTAT 637 #define STRINGID_ATTACKERGAINEDSTRENGTHFROMTHEFALLEN 638 #define STRINGID_PKMNSABILITYPREVENTSABILITY 639 +#define STRINGID_PREPARESHELLTRAP 640 +#define STRINGID_SHELLTRAPDIDNTWORK 641 +#define STRINGID_SPIKESDISAPPEAREDFROMTEAM 642 +#define STRINGID_TOXICSPIKESDISAPPEAREDFROMTEAM 643 +#define STRINGID_STICKYWEBDISAPPEAREDFROMTEAM 644 +#define STRINGID_STEALTHROCKDISAPPEAREDFROMTEAM 645 +#define STRINGID_COULDNTFULLYPROTECT 646 +#define STRINGID_STOCKPILEDEFFECTWOREOFF 647 +#define STRINGID_PKMNREVIVEDREADYTOFIGHT 648 +#define STRINGID_ITEMRESTOREDSPECIESHEALTH 649 +#define STRINGID_ITEMCUREDSPECIESSTATUS 650 +#define STRINGID_ITEMRESTOREDSPECIESPP 651 -#define BATTLESTRINGS_COUNT 640 +#define BATTLESTRINGS_COUNT 652 // This is the string id that gBattleStringsTable starts with. // String ids before this (e.g. STRINGID_INTROMSG) are not in the table, @@ -897,6 +909,13 @@ #define B_MSG_TERRAINPREVENTS_ELECTRIC 1 #define B_MSG_TERRAINPREVENTS_PSYCHIC 2 +// gTerrainEndingStringIds +#define B_MSG_TERRAINENDS_MISTY 0 +#define B_MSG_TERRAINENDS_ELECTRIC 1 +#define B_MSG_TERRAINENDS_PSYCHIC 2 +#define B_MSG_TERRAINENDS_GRASS 3 +#define B_MSG_TERRAINENDS_COUNT 4 + // gWrappedStringIds #define B_MSG_WRAPPED_BIND 0 #define B_MSG_WRAPPED_WRAP 1 @@ -918,4 +937,10 @@ #define B_MSG_Z_STAT_UP 5 #define B_MSG_Z_HP_TRAP 6 +// gDmgHazardsStringIds +#define B_MSG_PKMNHURTBYSPIKES 0 +#define B_MSG_STEALTHROCKDMG 1 +#define B_MSG_POINTEDSTONESFLOAT 2 +#define B_MSG_SPIKESSCATTERED 3 + #endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H diff --git a/include/constants/easy_chat.h b/include/constants/easy_chat.h index b5875b8814..b1f38941fc 100644 --- a/include/constants/easy_chat.h +++ b/include/constants/easy_chat.h @@ -1095,7 +1095,7 @@ #define EC_WORD_OLD ((EC_GROUP_TRENDY_SAYING << EC_MASK_BITS) | 30) #define EC_WORD_YOUNG ((EC_GROUP_TRENDY_SAYING << EC_MASK_BITS) | 31) #define EC_WORD_UGLY ((EC_GROUP_TRENDY_SAYING << EC_MASK_BITS) | 32) -#define NUM_ADDITIONAL_PHRASES 33 +#define NUM_TRENDY_SAYINGS 33 // Special Berry Masters Wife phrases #define NOT_SPECIAL_PHRASE 0 diff --git a/include/constants/event_objects.h b/include/constants/event_objects.h index 8278c6a66b..c8fa942655 100644 --- a/include/constants/event_objects.h +++ b/include/constants/event_objects.h @@ -288,6 +288,9 @@ #define FIRST_DECORATION_SPRITE_GFX OBJ_EVENT_GFX_PICHU_DOLL +#define OBJ_KIND_NORMAL 0 +#define OBJ_KIND_CLONE 255 // Exclusive to FRLG + // Special object event local ids #define OBJ_EVENT_ID_PLAYER 0xFF #define OBJ_EVENT_ID_CAMERA 0x7F diff --git a/include/constants/field_specials.h b/include/constants/field_specials.h index a01151378b..6659403313 100644 --- a/include/constants/field_specials.h +++ b/include/constants/field_specials.h @@ -80,4 +80,10 @@ #define FANCOUNTER_FINISHED_CONTEST 2 #define FANCOUNTER_USED_BATTLE_TOWER 3 +// Return values for DoDeoxysRockInteraction +#define DEOXYS_ROCK_FAILED 0 +#define DEOXYS_ROCK_PROGRESSED 1 +#define DEOXYS_ROCK_SOLVED 2 +#define DEOXYS_ROCK_COMPLETE 3 + #endif // GUARD_CONSTANTS_FIELD_SPECIALS_H diff --git a/include/constants/flags.h b/include/constants/flags.h index 4e108e1fe9..59bde846c5 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -580,7 +580,7 @@ #define FLAG_HIDDEN_ITEM_ROUTE_121_HP_UP (FLAG_HIDDEN_ITEMS_START + 0x27) #define FLAG_HIDDEN_ITEM_ROUTE_121_NUGGET (FLAG_HIDDEN_ITEMS_START + 0x28) #define FLAG_HIDDEN_ITEM_ROUTE_123_REVIVE (FLAG_HIDDEN_ITEMS_START + 0x29) -#define FLAG_HIDDEN_ITEM_ROUTE_113_REVIVE (FLAG_HIDDEN_ITEMS_START + 0x2A) +#define FLAG_HIDDEN_ITEM_ROUTE_114_REVIVE (FLAG_HIDDEN_ITEMS_START + 0x2A) #define FLAG_HIDDEN_ITEM_LILYCOVE_CITY_PP_UP (FLAG_HIDDEN_ITEMS_START + 0x2B) #define FLAG_HIDDEN_ITEM_ROUTE_104_SUPER_POTION (FLAG_HIDDEN_ITEMS_START + 0x2C) #define FLAG_HIDDEN_ITEM_ROUTE_116_SUPER_POTION (FLAG_HIDDEN_ITEMS_START + 0x2D) @@ -1051,7 +1051,7 @@ #define FLAG_ITEM_ROUTE_105_IRON 0x3EB #define FLAG_ITEM_ROUTE_106_PROTEIN 0x3EC #define FLAG_ITEM_ROUTE_109_PP_UP 0x3ED -#define FLAG_ITEM_ROUTE_109_RARE_CANDY 0x3EE +#define FLAG_ITEM_ROUTE_110_RARE_CANDY 0x3EE #define FLAG_ITEM_ROUTE_110_DIRE_HIT 0x3EF #define FLAG_ITEM_ROUTE_111_TM37 0x3F0 #define FLAG_ITEM_ROUTE_111_STARDUST 0x3F1 @@ -1123,7 +1123,7 @@ #define FLAG_ITEM_NEW_MAUVILLE_ULTRA_BALL 0x433 #define FLAG_ITEM_NEW_MAUVILLE_ESCAPE_ROPE 0x434 #define FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_6_LUXURY_BALL 0x435 -#define FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER 0x436 +#define FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_2_SCANNER 0x436 #define FLAG_ITEM_SCORCHED_SLAB_TM11 0x437 #define FLAG_ITEM_METEOR_FALLS_B1F_2R_TM02 0x438 #define FLAG_ITEM_SHOAL_CAVE_ENTRANCE_BIG_PEARL 0x439 @@ -1162,7 +1162,7 @@ #define FLAG_ITEM_ROUTE_103_GUARD_SPEC 0x45A #define FLAG_ITEM_ROUTE_104_X_ACCURACY 0x45B #define FLAG_ITEM_MAUVILLE_CITY_X_SPEED 0x45C -#define FLAG_ITEM_PETALBURD_WOODS_PARALYZE_HEAL 0x45D +#define FLAG_ITEM_PETALBURG_WOODS_PARALYZE_HEAL 0x45D #define FLAG_ITEM_ROUTE_115_GREAT_BALL 0x45E #define FLAG_ITEM_SAFARI_ZONE_NORTH_CALCIUM 0x45F #define FLAG_ITEM_MT_PYRE_3F_SUPER_REPEL 0x460 @@ -1348,7 +1348,7 @@ #define FLAG_UNUSED_0x863 (SYSTEM_FLAGS + 0x3) // Unused Flag #define FLAG_SYS_GAME_CLEAR (SYSTEM_FLAGS + 0x4) #define FLAG_SYS_CHAT_USED (SYSTEM_FLAGS + 0x5) -#define FLAG_SYS_HIPSTER_MEET (SYSTEM_FLAGS + 0x6) +#define FLAG_UNLOCKED_TRENDY_SAYINGS (SYSTEM_FLAGS + 0x6) // Badges #define FLAG_BADGE01_GET (SYSTEM_FLAGS + 0x7) diff --git a/include/constants/hold_effects.h b/include/constants/hold_effects.h index cd42566321..5fc268cb05 100644 --- a/include/constants/hold_effects.h +++ b/include/constants/hold_effects.h @@ -159,6 +159,7 @@ #define HOLD_EFFECT_PUNCHING_GLOVE 178 #define HOLD_EFFECT_COVERT_CLOAK 179 #define HOLD_EFFECT_LOADED_DICE 180 +#define HOLD_EFFECT_BOOSTER_ENERGY 181 // Not implemented. #define HOLD_EFFECT_CHOICE(holdEffect)((holdEffect == HOLD_EFFECT_CHOICE_BAND || holdEffect == HOLD_EFFECT_CHOICE_SCARF || holdEffect == HOLD_EFFECT_CHOICE_SPECS)) diff --git a/include/constants/item_effects.h b/include/constants/item_effects.h index c3970b9c1b..7cd4a58f48 100644 --- a/include/constants/item_effects.h +++ b/include/constants/item_effects.h @@ -7,12 +7,12 @@ #define ITEM0_INFATUATION 0x80 // new field 1 masks -#define ITEM1_X_ATTACK 0x1 -#define ITEM1_X_DEFENSE 0x2 -#define ITEM1_X_SPEED 0x4 -#define ITEM1_X_SPATK 0x8 -#define ITEM1_X_SPDEF 0x10 -#define ITEM1_X_ACCURACY 0x20 +#define ITEM1_X_ATTACK STAT_ATK +#define ITEM1_X_DEFENSE STAT_DEF +#define ITEM1_X_SPEED STAT_SPEED +#define ITEM1_X_SPATK STAT_SPATK +#define ITEM1_X_SPDEF STAT_SPDEF +#define ITEM1_X_ACCURACY STAT_ACC // field 3 masks #define ITEM3_CONFUSION 0x1 diff --git a/include/constants/items.h b/include/constants/items.h index 1cb2803f37..4421181668 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -928,13 +928,52 @@ #define ITEM_RUBY 756 #define ITEM_SAPPHIRE 757 +// GEN IX ITEMS #define ITEM_ABILITY_SHIELD 758 #define ITEM_CLEAR_AMULET 759 #define ITEM_PUNCHING_GLOVE 760 #define ITEM_COVERT_CLOAK 761 #define ITEM_LOADED_DICE 762 +#define ITEM_AUSPICIOUS_ARMOR 763 +#define ITEM_BOOSTER_ENERGY 764 +#define ITEM_BIG_BAMBOO_SHOOT 765 +#define ITEM_GIMMIGHOUL_COIN 766 +#define ITEM_LEADERS_CREST 767 +#define ITEM_MALICIOUS_ARMOR 768 +#define ITEM_MIRROR_HERB 769 +#define ITEM_SCROLL_OF_DARKNESS 770 +#define ITEM_SCROLL_OF_WATERS 771 +#define ITEM_TERA_ORB 772 +#define ITEM_TINY_BAMBOO_SHOOT 773 -#define ITEMS_COUNT 763 +#define ITEM_BUG_TERA_SHARD 774 +#define ITEM_DARK_TERA_SHARD 775 +#define ITEM_DRAGON_TERA_SHARD 776 +#define ITEM_ELECTRIC_TERA_SHARD 777 +#define ITEM_FAIRY_TERA_SHARD 778 +#define ITEM_FIGHTING_TERA_SHARD 779 +#define ITEM_FIRE_TERA_SHARD 780 +#define ITEM_FLYING_TERA_SHARD 781 +#define ITEM_GHOST_TERA_SHARD 782 +#define ITEM_GRASS_TERA_SHARD 783 +#define ITEM_GROUND_TERA_SHARD 784 +#define ITEM_ICE_TERA_SHARD 785 +#define ITEM_NORMAL_TERA_SHARD 786 +#define ITEM_POISON_TERA_SHARD 787 +#define ITEM_PSYCHIC_TERA_SHARD 788 +#define ITEM_ROCK_TERA_SHARD 789 +#define ITEM_STEEL_TERA_SHARD 790 +#define ITEM_WATER_TERA_SHARD 791 + +#define ITEM_ADAMANT_CRYSTAL 792 +#define ITEM_GRISEOUS_CORE 793 +#define ITEM_LUSTROUS_GLOBE 794 + +#define ITEM_BLACK_AUGURITE 795 +#define ITEM_LINKING_CORD 796 +#define ITEM_PEAT_BLOCK 797 + +#define ITEMS_COUNT 798 #define ITEM_FIELD_ARROW ITEMS_COUNT // A special item id associated with "Cancel"/"Exit" etc. in a list of items or decorations @@ -991,17 +1030,27 @@ #define EXP_30000 5 // Item type IDs (used to determine the exit callback) -#define ITEM_USE_MAIL 0 -#define ITEM_USE_PARTY_MENU 1 -#define ITEM_USE_FIELD 2 -#define ITEM_USE_PBLOCK_CASE 3 -#define ITEM_USE_BAG_MENU 4 // No exit callback, stays in bag menu +#define ITEM_USE_MAIL 0 +#define ITEM_USE_PARTY_MENU 1 +#define ITEM_USE_FIELD 2 +#define ITEM_USE_PBLOCK_CASE 3 +#define ITEM_USE_BAG_MENU 4 // No exit callback, stays in bag menu +#define ITEM_USE_PARTY_MENU_MOVES 5 -// Item battle usage IDs (only checked to see if nonzero) -#define ITEM_B_USE_MEDICINE 1 -#define ITEM_B_USE_OTHER 2 +// Item battle script IDs (need to be non-zero) +#define EFFECT_ITEM_RESTORE_HP 1 +#define EFFECT_ITEM_CURE_STATUS 2 +#define EFFECT_ITEM_HEAL_AND_CURE_STATUS 3 +#define EFFECT_ITEM_INCREASE_STAT 4 +#define EFFECT_ITEM_SET_MIST 5 +#define EFFECT_ITEM_SET_FOCUS_ENERGY 6 +#define EFFECT_ITEM_ESCAPE 7 +#define EFFECT_ITEM_THROW_BALL 8 +#define EFFECT_ITEM_REVIVE 9 +#define EFFECT_ITEM_RESTORE_PP 10 +#define EFFECT_ITEM_INCREASE_ALL_STATS 11 -// Check if the item is one that can be used on a Pokemon. -#define ITEM_HAS_EFFECT(item) ((item) >= ITEM_POTION && (item) <= LAST_BERRY_INDEX) +// Enigma Berry dummy constant +#define EFFECT_ITEM_ENIGMA_BERRY_EREADER 1 #endif // GUARD_CONSTANTS_ITEMS_H diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h index 71aac2308a..c2c018761a 100644 --- a/include/constants/metatile_labels.h +++ b/include/constants/metatile_labels.h @@ -1,794 +1,790 @@ #ifndef GUARD_METATILE_LABELS_H #define GUARD_METATILE_LABELS_H -// gTileset_General -#define METATILE_General_Grass 0x001 -#define METATILE_General_TallGrass 0x00D -#define METATILE_General_LongGrass 0x015 -#define METATILE_General_TallGrass_TreeUp 0x025 -#define METATILE_General_Grass_TreeUp 0x00E -#define METATILE_General_TallGrass_TreeLeft 0x1C6 -#define METATILE_General_TallGrass_TreeRight 0x1C7 -#define METATILE_General_Grass_TreeLeft 0x1CE -#define METATILE_General_Grass_TreeRight 0x1CF -#define METATILE_General_MuddySlope_Frame0 0x0E8 -#define METATILE_General_MuddySlope_Frame1 0x0E9 -#define METATILE_General_MuddySlope_Frame2 0x0EA -#define METATILE_General_MuddySlope_Frame3 0x0EB -#define METATILE_General_SandPit_Center 0x121 -#define METATILE_General_Door 0x021 -#define METATILE_General_Door_PokeMart 0x041 -#define METATILE_General_Door_PokeCenter 0x061 -#define METATILE_General_Door_Gym 0x1CD -#define METATILE_General_Door_Contest 0x1DB -#define METATILE_General_CaveEntrance_Top 0x09F -#define METATILE_General_CaveEntrance_Bottom 0x0A7 -#define METATILE_General_RockWall_GrassBase 0x079 -#define METATILE_General_RockWall_RockBase 0x07C -#define METATILE_General_RockWall_SandBase 0x091 -#define METATILE_General_CalmWater 0x170 -#define METATILE_General_RoughWater 0x14E -#define METATILE_General_RoughDeepWater 0x14F -#define METATILE_General_ReflectiveWater 0x0A1 -#define METATILE_General_SecretBase_TreeLeft 0x026 -#define METATILE_General_SecretBase_TreeRight 0x027 -#define METATILE_General_SecretBase_VineLeft 0x036 -#define METATILE_General_SecretBase_VineRight 0x037 -#define METATILE_General_RedCaveIndent 0x1A0 -#define METATILE_General_RedCaveOpen 0x1A1 -#define METATILE_General_YellowCaveIndent 0x1A8 -#define METATILE_General_YellowCaveOpen 0x1A9 -#define METATILE_General_BlueCaveIndent 0x1B0 -#define METATILE_General_BlueCaveOpen 0x1B1 - -// gTileset_Building -#define METATILE_Building_TV_Off 0x002 -#define METATILE_Building_TV_On 0x003 -#define METATILE_Building_PC_Off 0x004 -#define METATILE_Building_PC_On 0x005 - -// gTileset_PokemonCenter -#define METATILE_PokemonCenter_Door_CableClub 0x264 - -// gTileset_Shop -#define METATILE_Shop_Door_Elevator 0x285 - -// gTileset_Petalburg -#define METATILE_Petalburg_Door_Littleroot 0x248 -#define METATILE_Petalburg_Door_BirchsLab 0x249 -#define METATILE_Petalburg_Door_Oldale 0x287 - -// gTileset_Rustboro -#define METATILE_Rustboro_Door_Gray 0x21F -#define METATILE_Rustboro_Door_Tan 0x22F - -// gTileset_MauvilleGym -#define METATILE_MauvilleGym_RaisedSwitch 0x205 -#define METATILE_MauvilleGym_PressedSwitch 0x206 -#define METATILE_MauvilleGym_FloorTile 0x21A -#define METATILE_MauvilleGym_GreenBeamH1_On 0x220 -#define METATILE_MauvilleGym_GreenBeamH2_On 0x221 -#define METATILE_MauvilleGym_GreenBeamH3_On 0x228 -#define METATILE_MauvilleGym_GreenBeamH4_On 0x229 -#define METATILE_MauvilleGym_GreenBeamH1_Off 0x230 -#define METATILE_MauvilleGym_GreenBeamH2_Off 0x231 -#define METATILE_MauvilleGym_GreenBeamH3_Off 0x238 -#define METATILE_MauvilleGym_GreenBeamH4_Off 0x239 -#define METATILE_MauvilleGym_RedBeamH1_On 0x222 -#define METATILE_MauvilleGym_RedBeamH2_On 0x223 -#define METATILE_MauvilleGym_RedBeamH3_On 0x22A -#define METATILE_MauvilleGym_RedBeamH4_On 0x22B -#define METATILE_MauvilleGym_RedBeamH1_Off 0x232 -#define METATILE_MauvilleGym_RedBeamH2_Off 0x233 -#define METATILE_MauvilleGym_RedBeamH3_Off 0x23A -#define METATILE_MauvilleGym_RedBeamH4_Off 0x23B -#define METATILE_MauvilleGym_GreenBeamV1_On 0x240 -#define METATILE_MauvilleGym_GreenBeamV2_On 0x248 -#define METATILE_MauvilleGym_RedBeamV1_On 0x241 -#define METATILE_MauvilleGym_RedBeamV2_On 0x249 -#define METATILE_MauvilleGym_PoleTop_On 0x250 -#define METATILE_MauvilleGym_PoleTop_Off 0x251 -#define METATILE_MauvilleGym_PoleBottom_On 0x242 -#define METATILE_MauvilleGym_PoleBottom_Off 0x243 - -// gTileset_PetalburgGym -#define METATILE_PetalburgGym_RoomEntrance_Left 0x210 -#define METATILE_PetalburgGym_RoomEntrance_Right 0x211 -#define METATILE_PetalburgGym_SlidingDoor_Frame0 0x218 -#define METATILE_PetalburgGym_SlidingDoor_Frame1 0x219 -#define METATILE_PetalburgGym_SlidingDoor_Frame2 0x21A -#define METATILE_PetalburgGym_SlidingDoor_Frame3 0x21B -#define METATILE_PetalburgGym_SlidingDoor_Frame4 0x21C -#define METATILE_PetalburgGym_Door 0x224 - -// gTileset_MossdeepGym from R/S -#define METATILE_RS_MossdeepGym_RedArrow_Right 0x204 -#define METATILE_RS_MossdeepGym_RedArrow_Left 0x20C -#define METATILE_RS_MossdeepGym_RedArrow_Up 0x20D -#define METATILE_RS_MossdeepGym_RedArrow_Down 0x205 -#define METATILE_RS_MossdeepGym_Switch_Up 0x238 -#define METATILE_RS_MossdeepGym_Switch_Down 0x239 - -// gTileset_MossdeepGym from Emerald -#define METATILE_MossdeepGym_YellowArrow_Right 0x250 - -// gTileset_BrendansMaysHouse -#define METATILE_BrendansMaysHouse_BrendanPC_Off 0x25A -#define METATILE_BrendansMaysHouse_BrendanPC_On 0x27F -#define METATILE_BrendansMaysHouse_MayPC_Off 0x259 -#define METATILE_BrendansMaysHouse_MayPC_On 0x27E -#define METATILE_BrendansMaysHouse_MovingBox_Closed 0x268 -#define METATILE_BrendansMaysHouse_MovingBox_Open 0x270 -#define METATILE_BrendansMaysHouse_BookOnTable 0x293 - -// gTileset_Shop -#define METATILE_Shop_Laptop1_Normal 0x29D -#define METATILE_Shop_Laptop2_Normal 0x2A5 -#define METATILE_Shop_Laptop1_Flash 0x258 -#define METATILE_Shop_Laptop2_Flash 0x260 - -// gTileset_BattleFrontier -#define METATILE_BattleFrontier_Door_Elevator 0x20E -#define METATILE_BattleFrontier_Door_MultiCorridor 0x2AD -#define METATILE_BattleFrontier_CorridorOpenDoor_Top 0x207 -#define METATILE_BattleFrontier_CorridorOpenDoor_Bottom 0x20F -#define METATILE_BattleFrontier_Elevator_Top0 0x329 -#define METATILE_BattleFrontier_Elevator_Top1 0x32A -#define METATILE_BattleFrontier_Elevator_Top2 0x32B -#define METATILE_BattleFrontier_Elevator_Mid0 0x331 -#define METATILE_BattleFrontier_Elevator_Mid1 0x332 -#define METATILE_BattleFrontier_Elevator_Mid2 0x333 -#define METATILE_BattleFrontier_Elevator_Bottom0 0x339 -#define METATILE_BattleFrontier_Elevator_Bottom1 0x33A -#define METATILE_BattleFrontier_Elevator_Bottom2 0x33B - -// gTileset_BattleFrontierOutsideWest -#define METATILE_BattleFrontierOutsideWest_Door_BattleFactory 0x263 -#define METATILE_BattleFrontierOutsideWest_Door_BattleDome 0x28A -#define METATILE_BattleFrontierOutsideWest_Door_Sliding 0x396 -#define METATILE_BattleFrontierOutsideWest_Door 0x3FC - -// gTileset_BattleFrontierOutsideEast -#define METATILE_BattleFrontierOutsideEast_Door_BattleArena 0x291 -#define METATILE_BattleFrontierOutsideEast_Door_BattleTower 0x329 -#define METATILE_BattleFrontierOutsideEast_Door_Sliding 0x396 -#define METATILE_BattleFrontierOutsideEast_Door 0x3FC - -// gTileset_BattleDome -#define METATILE_BattleDome_Door_Lobby 0x209 -#define METATILE_BattleDome_Door_PreBattleRoom 0x20A -#define METATILE_BattleDome_Door_Corridor 0x25E - // gTileset_BattleArena #define METATILE_BattleArena_Door 0x21B +// gTileset_BattleDome +#define METATILE_BattleDome_Door_Corridor 0x25E +#define METATILE_BattleDome_Door_Lobby 0x209 +#define METATILE_BattleDome_Door_PreBattleRoom 0x20A + +// gTileset_BattleFrontierOutsideEast +#define METATILE_BattleFrontierOutsideEast_Door 0x3FC +#define METATILE_BattleFrontierOutsideEast_Door_BattleArena 0x291 +#define METATILE_BattleFrontierOutsideEast_Door_BattleTower 0x329 +#define METATILE_BattleFrontierOutsideEast_Door_Sliding 0x396 + +// gTileset_BattleFrontierOutsideWest +#define METATILE_BattleFrontierOutsideWest_Door 0x3FC +#define METATILE_BattleFrontierOutsideWest_Door_BattleDome 0x28A +#define METATILE_BattleFrontierOutsideWest_Door_BattleFactory 0x263 +#define METATILE_BattleFrontierOutsideWest_Door_Sliding 0x396 + +// gTileset_BattleFrontier +#define METATILE_BattleFrontier_CorridorOpenDoor_Bottom 0x20F +#define METATILE_BattleFrontier_CorridorOpenDoor_Top 0x207 +#define METATILE_BattleFrontier_Door_Elevator 0x20E +#define METATILE_BattleFrontier_Door_MultiCorridor 0x2AD +#define METATILE_BattleFrontier_Elevator_Bottom0 0x339 +#define METATILE_BattleFrontier_Elevator_Bottom1 0x33A +#define METATILE_BattleFrontier_Elevator_Bottom2 0x33B +#define METATILE_BattleFrontier_Elevator_Mid0 0x331 +#define METATILE_BattleFrontier_Elevator_Mid1 0x332 +#define METATILE_BattleFrontier_Elevator_Mid2 0x333 +#define METATILE_BattleFrontier_Elevator_Top0 0x329 +#define METATILE_BattleFrontier_Elevator_Top1 0x32A +#define METATILE_BattleFrontier_Elevator_Top2 0x32B + // gTileset_BattlePalace #define METATILE_BattlePalace_Door 0x219 +// gTileset_BattlePike +#define METATILE_BattlePike_CurtainFrames_Start 0x201 +#define METATILE_BattlePike_Curtain_Stage0_Tile0 0x24A +#define METATILE_BattlePike_Curtain_Stage0_Tile1 0x251 +#define METATILE_BattlePike_Curtain_Stage0_Tile2 0x252 +#define METATILE_BattlePike_Curtain_Stage0_Tile3 0x253 +#define METATILE_BattlePike_Curtain_Stage0_Tile4 0x259 +#define METATILE_BattlePike_Curtain_Stage0_Tile5 0x25A +#define METATILE_BattlePike_Curtain_Stage0_Tile6 0x25B +#define METATILE_BattlePike_Curtain_Stage1_Tile0 0x22A +#define METATILE_BattlePike_Curtain_Stage1_Tile1 0x231 +#define METATILE_BattlePike_Curtain_Stage1_Tile2 0x232 +#define METATILE_BattlePike_Curtain_Stage1_Tile3 0x233 +#define METATILE_BattlePike_Curtain_Stage1_Tile4 0x239 +#define METATILE_BattlePike_Curtain_Stage1_Tile5 0x23A +#define METATILE_BattlePike_Curtain_Stage1_Tile6 0x23B +#define METATILE_BattlePike_Curtain_Stage2_Tile0 0x20A +#define METATILE_BattlePike_Curtain_Stage2_Tile1 0x211 +#define METATILE_BattlePike_Curtain_Stage2_Tile2 0x212 +#define METATILE_BattlePike_Curtain_Stage2_Tile3 0x213 +#define METATILE_BattlePike_Curtain_Stage2_Tile4 0x219 +#define METATILE_BattlePike_Curtain_Stage2_Tile5 0x21A +#define METATILE_BattlePike_Curtain_Stage2_Tile6 0x21B +#define METATILE_BattlePike_Curtain_Stage3_Tile0 0x2AB +#define METATILE_BattlePike_Curtain_Stage3_Tile1 0x2B2 +#define METATILE_BattlePike_Curtain_Stage3_Tile2 0x2B3 +#define METATILE_BattlePike_Curtain_Stage3_Tile3 0x2B4 +#define METATILE_BattlePike_Curtain_Stage3_Tile4 0x2BA +#define METATILE_BattlePike_Curtain_Stage3_Tile5 0x2BB +#define METATILE_BattlePike_Curtain_Stage3_Tile6 0x2BC + +// gTileset_BattlePyramid +#define METATILE_BattlePyramid_Exit 0x28E +#define METATILE_BattlePyramid_Floor 0x28D + +// gTileset_BattleTent +#define METATILE_BattleTent_Door 0x26B + +// gTileset_BikeShop +#define METATILE_BikeShop_Barrier_Blue_Bottom 0x2CF +#define METATILE_BikeShop_Barrier_Blue_BottomMid 0x2C7 +#define METATILE_BikeShop_Barrier_Blue_Top 0x2B7 +#define METATILE_BikeShop_Barrier_Blue_TopMid 0x2BF +#define METATILE_BikeShop_Barrier_Green_Bottom 0x2CE +#define METATILE_BikeShop_Barrier_Green_BottomMid 0x2C6 +#define METATILE_BikeShop_Barrier_Green_Top 0x2B6 +#define METATILE_BikeShop_Barrier_Green_TopMid 0x2BE +#define METATILE_BikeShop_Barrier_Hidden_Bottom 0x271 +#define METATILE_BikeShop_Barrier_Hidden_Top 0x269 +#define METATILE_BikeShop_Button_Blue 0x236 +#define METATILE_BikeShop_Button_Green 0x22E +#define METATILE_BikeShop_Button_Pressed 0x24F +#define METATILE_BikeShop_Floor_Shadow_Top 0x26D +#define METATILE_BikeShop_Generator_Off_Tile0 0x2F0 +#define METATILE_BikeShop_Generator_Off_Tile1 0x2F1 +#define METATILE_BikeShop_Generator_Off_Tile2 0x2F2 +#define METATILE_BikeShop_Generator_Off_Tile3 0x2F3 +#define METATILE_BikeShop_Generator_Off_Tile4 0x2F4 +#define METATILE_BikeShop_Generator_Off_Tile5 0x2F5 +#define METATILE_BikeShop_Generator_Off_Tile6 0x2F6 +#define METATILE_BikeShop_Generator_Off_Tile7 0x2F7 +#define METATILE_BikeShop_Wall_Edge_Top 0x281 + +// gTileset_BrendansMaysHouse +#define METATILE_BrendansMaysHouse_BookOnTable 0x293 +#define METATILE_BrendansMaysHouse_BrendanPC_Off 0x25A +#define METATILE_BrendansMaysHouse_BrendanPC_On 0x27F +#define METATILE_BrendansMaysHouse_MayPC_Off 0x259 +#define METATILE_BrendansMaysHouse_MayPC_On 0x27E +#define METATILE_BrendansMaysHouse_MovingBox_Closed 0x268 +#define METATILE_BrendansMaysHouse_MovingBox_Open 0x270 + +// gTileset_Building +#define METATILE_Building_PC_Off 0x004 +#define METATILE_Building_PC_On 0x005 +#define METATILE_Building_TV_Off 0x002 +#define METATILE_Building_TV_On 0x003 + // gTileset_Cave -#define METATILE_Cave_EntranceCover 0x229 -#define METATILE_Cave_CrackedFloor_Hole 0x206 -#define METATILE_Cave_CrackedFloor 0x22F -#define METATILE_Cave_SealedChamberEntrance_TopLeft 0x22A -#define METATILE_Cave_SealedChamberEntrance_TopMid 0x22B -#define METATILE_Cave_SealedChamberEntrance_TopRight 0x22C -#define METATILE_Cave_SealedChamberEntrance_BottomLeft 0x232 -#define METATILE_Cave_SealedChamberEntrance_BottomMid 0x233 -#define METATILE_Cave_SealedChamberEntrance_BottomRight 0x234 -#define METATILE_Cave_SealedChamberBraille_Mid 0x235 -#define METATILE_Cave_ShoalCave_DirtPile_Large 0x358 -#define METATILE_Cave_ShoalCave_DirtPile_Small 0x35A -#define METATILE_Cave_ShoalCave_BlueStone_Large 0x359 -#define METATILE_Cave_ShoalCave_BlueStone_Small 0x35B +#define METATILE_Cave_CrackedFloor 0x22F +#define METATILE_Cave_CrackedFloor_Hole 0x206 +#define METATILE_Cave_EntranceCover 0x229 +#define METATILE_Cave_SealedChamberBraille_Mid 0x235 +#define METATILE_Cave_SealedChamberEntrance_BottomLeft 0x232 +#define METATILE_Cave_SealedChamberEntrance_BottomMid 0x233 +#define METATILE_Cave_SealedChamberEntrance_BottomRight 0x234 +#define METATILE_Cave_SealedChamberEntrance_TopLeft 0x22A +#define METATILE_Cave_SealedChamberEntrance_TopMid 0x22B +#define METATILE_Cave_SealedChamberEntrance_TopRight 0x22C +#define METATILE_Cave_ShoalCave_BlueStone_Large 0x359 +#define METATILE_Cave_ShoalCave_BlueStone_Small 0x35B +#define METATILE_Cave_ShoalCave_DirtPile_Large 0x358 +#define METATILE_Cave_ShoalCave_DirtPile_Small 0x35A -// gTileset_Pacifidlog -#define METATILE_Pacifidlog_Door 0x21A -#define METATILE_Pacifidlog_FloatingLogs_HorizontalLeft 0x250 -#define METATILE_Pacifidlog_FloatingLogs_HorizontalRight 0x251 -#define METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalLeft 0x252 -#define METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalRight 0x253 -#define METATILE_Pacifidlog_SubmergedLogs_HorizontalLeft 0x254 -#define METATILE_Pacifidlog_SubmergedLogs_HorizontalRight 0x255 -#define METATILE_Pacifidlog_FloatingLogs_VerticalTop 0x258 -#define METATILE_Pacifidlog_FloatingLogs_VerticalBottom 0x260 -#define METATILE_Pacifidlog_HalfSubmergedLogs_VerticalTop 0x259 -#define METATILE_Pacifidlog_HalfSubmergedLogs_VerticalBottom 0x261 -#define METATILE_Pacifidlog_SubmergedLogs_VerticalTop 0x25A -#define METATILE_Pacifidlog_SubmergedLogs_VerticalBottom 0x262 -#define METATILE_Pacifidlog_SkyPillar_CrackedFloor_Hole 0x237 -#define METATILE_Pacifidlog_SkyPillar_DoorOpen_Top 0x2AA -#define METATILE_Pacifidlog_SkyPillar_DoorOpen_Bottom 0x2B2 - -// gTileset_Fortree -#define METATILE_Fortree_LongGrass_Root 0x208 -#define METATILE_Fortree_BridgeOverGrass_Raised 0x24E -#define METATILE_Fortree_BridgeOverGrass_Lowered 0x24F -#define METATILE_Fortree_BridgeOverTrees_Raised 0x256 -#define METATILE_Fortree_BridgeOverTrees_Lowered 0x257 -#define METATILE_Fortree_SecretBase_Shrub 0x271 -#define METATILE_Fortree_SecretBase_ShrubOpen 0x278 -#define METATILE_Fortree_SecretBase_LongGrass_TopLeft 0x279 -#define METATILE_Fortree_SecretBase_LongGrass_TopMid 0x27A -#define METATILE_Fortree_SecretBase_LongGrass_TopRight 0x27B -#define METATILE_Fortree_SecretBase_LongGrass_BottomLeft 0x281 -#define METATILE_Fortree_SecretBase_LongGrass_BottomMid 0x282 -#define METATILE_Fortree_SecretBase_LongGrass_BottomRight 0x283 -#define METATILE_Fortree_WoodBridge1_Top 0x297 -#define METATILE_Fortree_WoodBridge1_Bottom 0x29F - -// gTileset_Sootopolis -#define METATILE_Sootopolis_Door 0x21E -#define METATILE_Sootopolis_Door_PeakedRoof 0x21C -#define METATILE_Sootopolis_Door_Closed 0x248 -#define METATILE_Sootopolis_GymDoor_Closed 0x250 -#define METATILE_Sootopolis_RoughWater 0x290 - -// gTileset_SootopolisGym -#define METATILE_SootopolisGym_Ice_Cracked 0x20E -#define METATILE_SootopolisGym_Ice_Broken 0x206 -#define METATILE_SootopolisGym_Stairs 0x207 - -// gTileset_Fallarbor -#define METATILE_Fallarbor_AshGrass 0x20A -#define METATILE_Fallarbor_BrownCaveIndent 0x208 -#define METATILE_Fallarbor_BrownCaveOpen 0x210 -#define METATILE_Fallarbor_NormalGrass 0x212 -#define METATILE_Fallarbor_AshField 0x218 -#define METATILE_Fallarbor_BrownCaveEntrance_Top 0x259 -#define METATILE_Fallarbor_BrownCaveEntrance_Bottom 0x261 -#define METATILE_Fallarbor_RedCaveEntrance_Top 0x347 -#define METATILE_Fallarbor_RedCaveEntrance_Bottom 0x34F -#define METATILE_Fallarbor_BrownRockWall 0x265 -#define METATILE_Fallarbor_RedRockWall 0x269 -#define METATILE_Fallarbor_Door_LightRoof 0x2A5 -#define METATILE_Fallarbor_Door_DarkRoof 0x2F7 -#define METATILE_Fallarbor_Door_BattleTent 0x36C - -// gTileset_Lavaridge -#define METATILE_Lavaridge_NormalGrass 0x206 -#define METATILE_Lavaridge_AshGrass 0x207 -#define METATILE_Lavaridge_LavaField 0x271 -#define METATILE_Lavaridge_RockWall 0x274 -#define METATILE_Lavaridge_CaveEntrance_Top 0x256 -#define METATILE_Lavaridge_CaveEntrance_Bottom 0x25E - -// gTileset_Mauville -#define METATILE_Mauville_Door 0x2AC -#define METATILE_Mauville_Door_CyclingRoad 0x289 -#define METATILE_Mauville_Door_Verdanturf 0x3A1 -#define METATILE_Mauville_Door_BattleTent 0x3D4 -#define METATILE_Mauville_DeepSand_Center 0x251 -#define METATILE_Mauville_DeepSand_BottomMid 0x259 -#define METATILE_Mauville_MirageTower_Tile0 0x3D8 -#define METATILE_Mauville_MirageTower_Tile1 0x3D9 -#define METATILE_Mauville_MirageTower_Tile2 0x3DA -#define METATILE_Mauville_MirageTower_Tile3 0x3E0 -#define METATILE_Mauville_MirageTower_Tile4 0x3E1 -#define METATILE_Mauville_MirageTower_Tile5 0x3E2 -#define METATILE_Mauville_MirageTower_Tile6 0x3E8 -#define METATILE_Mauville_MirageTower_Tile7 0x3E9 -#define METATILE_Mauville_MirageTower_Tile8 0x3EA -#define METATILE_Mauville_MirageTower_Tile9 0x3F0 -#define METATILE_Mauville_MirageTower_TileA 0x3F1 -#define METATILE_Mauville_MirageTower_TileB 0x3F2 -#define METATILE_Mauville_MirageTower_TileC 0x3DB -#define METATILE_Mauville_MirageTower_TileD 0x3DC -#define METATILE_Mauville_MirageTower_TileE 0x3DD -#define METATILE_Mauville_MirageTower_TileF 0x3E3 -#define METATILE_Mauville_MirageTower_Tile10 0x3E4 -#define METATILE_Mauville_MirageTower_Tile11 0x3E5 +// gTileset_Contest +#define METATILE_Contest_CounterFlap_Bottom 0x2D9 +#define METATILE_Contest_CounterFlap_Top 0x2D1 +#define METATILE_Contest_FloorShadow 0x261 +#define METATILE_Contest_WallShadow 0x221 // gTileset_Dewford #define METATILE_Dewford_Door 0x225 #define METATILE_Dewford_Door_BattleTower 0x25D -// gTileset_Slateport -#define METATILE_Slateport_Door 0x2DC -#define METATILE_Slateport_Door_BattleTent 0x393 +// gTileset_EliteFour +#define METATILE_EliteFour_EntryDoor_ClosedBottom 0x20E +#define METATILE_EliteFour_EntryDoor_ClosedTop 0x206 +#define METATILE_EliteFour_LeftSpotlightOff 0x2DD +#define METATILE_EliteFour_OpenDoorChampion_Frame 0x346 +#define METATILE_EliteFour_OpenDoorChampion_Opening 0x347 +#define METATILE_EliteFour_OpenDoor_Frame 0x344 +#define METATILE_EliteFour_OpenDoor_Opening 0x345 +#define METATILE_EliteFour_RightSpotlightOff 0x2DE + +// gTileset_EverGrande +#define METATILE_EverGrande_Door_PokemonLeague 0x21D + +// gTileset_Facility +#define METATILE_Facility_DataPad 0x3E4 +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile0 0x314 +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile1 0x315 +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile2 0x316 +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile3 0x31C +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile4 0x31D +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile5 0x31E +#define METATILE_Facility_NewMauvilleDoor_Open_Tile0 0x2C3 +#define METATILE_Facility_NewMauvilleDoor_Open_Tile1 0x2C4 +#define METATILE_Facility_NewMauvilleDoor_Open_Tile2 0x2C5 +#define METATILE_Facility_NewMauvilleDoor_Open_Tile3 0x2CB +#define METATILE_Facility_NewMauvilleDoor_Open_Tile4 0x2CC +#define METATILE_Facility_NewMauvilleDoor_Open_Tile5 0x2CD + +// gTileset_Fallarbor +#define METATILE_Fallarbor_AshField 0x218 +#define METATILE_Fallarbor_AshGrass 0x20A +#define METATILE_Fallarbor_BrownCaveEntrance_Bottom 0x261 +#define METATILE_Fallarbor_BrownCaveEntrance_Top 0x259 +#define METATILE_Fallarbor_BrownCaveIndent 0x208 +#define METATILE_Fallarbor_BrownCaveOpen 0x210 +#define METATILE_Fallarbor_BrownRockWall 0x265 +#define METATILE_Fallarbor_Door_BattleTent 0x36C +#define METATILE_Fallarbor_Door_DarkRoof 0x2F7 +#define METATILE_Fallarbor_Door_LightRoof 0x2A5 +#define METATILE_Fallarbor_NormalGrass 0x212 +#define METATILE_Fallarbor_RedCaveEntrance_Bottom 0x34F +#define METATILE_Fallarbor_RedCaveEntrance_Top 0x347 +#define METATILE_Fallarbor_RedRockWall 0x269 + +// gTileset_Fortree +#define METATILE_Fortree_BridgeOverGrass_Lowered 0x24F +#define METATILE_Fortree_BridgeOverGrass_Raised 0x24E +#define METATILE_Fortree_BridgeOverTrees_Lowered 0x257 +#define METATILE_Fortree_BridgeOverTrees_Raised 0x256 +#define METATILE_Fortree_LongGrass_Root 0x208 +#define METATILE_Fortree_SecretBase_LongGrass_BottomLeft 0x281 +#define METATILE_Fortree_SecretBase_LongGrass_BottomMid 0x282 +#define METATILE_Fortree_SecretBase_LongGrass_BottomRight 0x283 +#define METATILE_Fortree_SecretBase_LongGrass_TopLeft 0x279 +#define METATILE_Fortree_SecretBase_LongGrass_TopMid 0x27A +#define METATILE_Fortree_SecretBase_LongGrass_TopRight 0x27B +#define METATILE_Fortree_SecretBase_Shrub 0x271 +#define METATILE_Fortree_SecretBase_ShrubOpen 0x278 +#define METATILE_Fortree_WoodBridge1_Bottom 0x29F +#define METATILE_Fortree_WoodBridge1_Top 0x297 + +// gTileset_General +#define METATILE_General_BlueCaveIndent 0x1B0 +#define METATILE_General_BlueCaveOpen 0x1B1 +#define METATILE_General_CalmWater 0x170 +#define METATILE_General_CaveEntrance_Bottom 0x0A7 +#define METATILE_General_CaveEntrance_Top 0x09F +#define METATILE_General_Door 0x021 +#define METATILE_General_Door_Contest 0x1DB +#define METATILE_General_Door_Gym 0x1CD +#define METATILE_General_Door_PokeCenter 0x061 +#define METATILE_General_Door_PokeMart 0x041 +#define METATILE_General_Grass 0x001 +#define METATILE_General_Grass_TreeLeft 0x1CE +#define METATILE_General_Grass_TreeRight 0x1CF +#define METATILE_General_Grass_TreeUp 0x00E +#define METATILE_General_LongGrass 0x015 +#define METATILE_General_MuddySlope_Frame0 0x0E8 +#define METATILE_General_MuddySlope_Frame1 0x0E9 +#define METATILE_General_MuddySlope_Frame2 0x0EA +#define METATILE_General_MuddySlope_Frame3 0x0EB +#define METATILE_General_RedCaveIndent 0x1A0 +#define METATILE_General_RedCaveOpen 0x1A1 +#define METATILE_General_ReflectiveWater 0x0A1 +#define METATILE_General_RockWall_GrassBase 0x079 +#define METATILE_General_RockWall_RockBase 0x07C +#define METATILE_General_RockWall_SandBase 0x091 +#define METATILE_General_RoughDeepWater 0x14F +#define METATILE_General_RoughWater 0x14E +#define METATILE_General_SandPit_Center 0x121 +#define METATILE_General_SecretBase_TreeLeft 0x026 +#define METATILE_General_SecretBase_TreeRight 0x027 +#define METATILE_General_SecretBase_VineLeft 0x036 +#define METATILE_General_SecretBase_VineRight 0x037 +#define METATILE_General_TallGrass 0x00D +#define METATILE_General_TallGrass_TreeLeft 0x1C6 +#define METATILE_General_TallGrass_TreeRight 0x1C7 +#define METATILE_General_TallGrass_TreeUp 0x025 +#define METATILE_General_YellowCaveIndent 0x1A8 +#define METATILE_General_YellowCaveOpen 0x1A9 + +// gTileset_GenericBuilding +#define METATILE_GenericBuilding_TableEdge 0x2F1 +#define METATILE_GenericBuilding_TrickHouse_Door_Closed 0x21B +#define METATILE_GenericBuilding_TrickHouse_Stairs_Down 0x219 + +// gTileset_InsideOfTruck +#define METATILE_InsideOfTruck_DoorClosedFloor_Bottom 0x21D +#define METATILE_InsideOfTruck_DoorClosedFloor_Mid 0x215 +#define METATILE_InsideOfTruck_DoorClosedFloor_Top 0x20D +#define METATILE_InsideOfTruck_ExitLight_Bottom 0x218 +#define METATILE_InsideOfTruck_ExitLight_Mid 0x210 +#define METATILE_InsideOfTruck_ExitLight_Top 0x208 + +// gTileset_InsideShip +#define METATILE_InsideShip_DoorIndent_Locked 0x234 +#define METATILE_InsideShip_DoorIndent_Unlocked 0x21A +#define METATILE_InsideShip_IntactDoor_Bottom_Interior 0x297 +#define METATILE_InsideShip_IntactDoor_Bottom_Locked 0x233 +#define METATILE_InsideShip_IntactDoor_Bottom_Unlocked 0x22B + +// gTileset_Lavaridge +#define METATILE_Lavaridge_AshGrass 0x207 +#define METATILE_Lavaridge_CaveEntrance_Bottom 0x25E +#define METATILE_Lavaridge_CaveEntrance_Top 0x256 +#define METATILE_Lavaridge_LavaField 0x271 +#define METATILE_Lavaridge_NormalGrass 0x206 +#define METATILE_Lavaridge_RockWall 0x274 + +// gTileset_LilycoveMuseum +#define METATILE_LilycoveMuseum_Painting0_Left 0x25A +#define METATILE_LilycoveMuseum_Painting0_Right 0x25B +#define METATILE_LilycoveMuseum_Painting1_Left 0x25C +#define METATILE_LilycoveMuseum_Painting1_Right 0x25D +#define METATILE_LilycoveMuseum_Painting2_Left 0x25E +#define METATILE_LilycoveMuseum_Painting2_Right 0x25F +#define METATILE_LilycoveMuseum_Painting3_Left 0x260 +#define METATILE_LilycoveMuseum_Painting3_Right 0x261 +#define METATILE_LilycoveMuseum_Painting4_Left 0x262 +#define METATILE_LilycoveMuseum_Painting4_Right 0x263 + +// gTileset_Lilycove +#define METATILE_Lilycove_Door 0x246 +#define METATILE_Lilycove_Door_DeptStore 0x30C +#define METATILE_Lilycove_Door_SafariZone 0x32D +#define METATILE_Lilycove_Door_Wooden 0x28E +#define METATILE_Lilycove_Wailmer0 0x290 +#define METATILE_Lilycove_Wailmer0_Alt 0x298 +#define METATILE_Lilycove_Wailmer1 0x291 +#define METATILE_Lilycove_Wailmer1_Alt 0x299 +#define METATILE_Lilycove_Wailmer2 0x2A0 +#define METATILE_Lilycove_Wailmer3 0x2A1 + +// gTileset_MauvilleGym +#define METATILE_MauvilleGym_FloorTile 0x21A +#define METATILE_MauvilleGym_GreenBeamH1_Off 0x230 +#define METATILE_MauvilleGym_GreenBeamH1_On 0x220 +#define METATILE_MauvilleGym_GreenBeamH2_Off 0x231 +#define METATILE_MauvilleGym_GreenBeamH2_On 0x221 +#define METATILE_MauvilleGym_GreenBeamH3_Off 0x238 +#define METATILE_MauvilleGym_GreenBeamH3_On 0x228 +#define METATILE_MauvilleGym_GreenBeamH4_Off 0x239 +#define METATILE_MauvilleGym_GreenBeamH4_On 0x229 +#define METATILE_MauvilleGym_GreenBeamV1_On 0x240 +#define METATILE_MauvilleGym_GreenBeamV2_On 0x248 +#define METATILE_MauvilleGym_PoleBottom_Off 0x243 +#define METATILE_MauvilleGym_PoleBottom_On 0x242 +#define METATILE_MauvilleGym_PoleTop_Off 0x251 +#define METATILE_MauvilleGym_PoleTop_On 0x250 +#define METATILE_MauvilleGym_PressedSwitch 0x206 +#define METATILE_MauvilleGym_RaisedSwitch 0x205 +#define METATILE_MauvilleGym_RedBeamH1_Off 0x232 +#define METATILE_MauvilleGym_RedBeamH1_On 0x222 +#define METATILE_MauvilleGym_RedBeamH2_Off 0x233 +#define METATILE_MauvilleGym_RedBeamH2_On 0x223 +#define METATILE_MauvilleGym_RedBeamH3_Off 0x23A +#define METATILE_MauvilleGym_RedBeamH3_On 0x22A +#define METATILE_MauvilleGym_RedBeamH4_Off 0x23B +#define METATILE_MauvilleGym_RedBeamH4_On 0x22B +#define METATILE_MauvilleGym_RedBeamV1_On 0x241 +#define METATILE_MauvilleGym_RedBeamV2_On 0x249 + +// gTileset_Mauville +#define METATILE_Mauville_DeepSand_BottomMid 0x259 +#define METATILE_Mauville_DeepSand_Center 0x251 +#define METATILE_Mauville_Door 0x2AC +#define METATILE_Mauville_Door_BattleTent 0x3D4 +#define METATILE_Mauville_Door_CyclingRoad 0x289 +#define METATILE_Mauville_Door_Verdanturf 0x3A1 +#define METATILE_Mauville_MirageTower_Tile0 0x3D8 +#define METATILE_Mauville_MirageTower_Tile1 0x3D9 +#define METATILE_Mauville_MirageTower_Tile10 0x3E4 +#define METATILE_Mauville_MirageTower_Tile11 0x3E5 +#define METATILE_Mauville_MirageTower_Tile2 0x3DA +#define METATILE_Mauville_MirageTower_Tile3 0x3E0 +#define METATILE_Mauville_MirageTower_Tile4 0x3E1 +#define METATILE_Mauville_MirageTower_Tile5 0x3E2 +#define METATILE_Mauville_MirageTower_Tile6 0x3E8 +#define METATILE_Mauville_MirageTower_Tile7 0x3E9 +#define METATILE_Mauville_MirageTower_Tile8 0x3EA +#define METATILE_Mauville_MirageTower_Tile9 0x3F0 +#define METATILE_Mauville_MirageTower_TileA 0x3F1 +#define METATILE_Mauville_MirageTower_TileB 0x3F2 +#define METATILE_Mauville_MirageTower_TileC 0x3DB +#define METATILE_Mauville_MirageTower_TileD 0x3DC +#define METATILE_Mauville_MirageTower_TileE 0x3DD +#define METATILE_Mauville_MirageTower_TileF 0x3E3 + +// gTileset_MeteorFalls +#define METATILE_MeteorFalls_CaveEntrance_Bottom 0x24E +#define METATILE_MeteorFalls_CaveEntrance_Left 0x24D +#define METATILE_MeteorFalls_CaveEntrance_Right 0x24F +#define METATILE_MeteorFalls_CaveEntrance_Top 0x246 + +// gTileset_MossdeepGameCorner +#define METATILE_MossdeepGameCorner_CounterClosed_Bottom 0x232 +#define METATILE_MossdeepGameCorner_CounterClosed_Top 0x22A +#define METATILE_MossdeepGameCorner_CounterOpen_Bottom 0x234 +#define METATILE_MossdeepGameCorner_CounterOpen_Top 0x22C + +// gTileset_MossdeepGym +#define METATILE_MossdeepGym_YellowArrow_Right 0x250 // gTileset_Mossdeep #define METATILE_Mossdeep_Door 0x2A1 #define METATILE_Mossdeep_Door_SpaceCenter 0x2ED -// gTileset_EverGrande -#define METATILE_EverGrande_Door_PokemonLeague 0x21D +// gTileset_Pacifidlog +#define METATILE_Pacifidlog_Door 0x21A +#define METATILE_Pacifidlog_FloatingLogs_HorizontalLeft 0x250 +#define METATILE_Pacifidlog_FloatingLogs_HorizontalRight 0x251 +#define METATILE_Pacifidlog_FloatingLogs_VerticalBottom 0x260 +#define METATILE_Pacifidlog_FloatingLogs_VerticalTop 0x258 +#define METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalLeft 0x252 +#define METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalRight 0x253 +#define METATILE_Pacifidlog_HalfSubmergedLogs_VerticalBottom 0x261 +#define METATILE_Pacifidlog_HalfSubmergedLogs_VerticalTop 0x259 +#define METATILE_Pacifidlog_SkyPillar_CrackedFloor_Hole 0x237 +#define METATILE_Pacifidlog_SkyPillar_DoorOpen_Bottom 0x2B2 +#define METATILE_Pacifidlog_SkyPillar_DoorOpen_Top 0x2AA +#define METATILE_Pacifidlog_SubmergedLogs_HorizontalLeft 0x254 +#define METATILE_Pacifidlog_SubmergedLogs_HorizontalRight 0x255 +#define METATILE_Pacifidlog_SubmergedLogs_VerticalBottom 0x262 +#define METATILE_Pacifidlog_SubmergedLogs_VerticalTop 0x25A + +// gTileset_PetalburgGym +#define METATILE_PetalburgGym_Door 0x224 +#define METATILE_PetalburgGym_RoomEntrance_Left 0x210 +#define METATILE_PetalburgGym_RoomEntrance_Right 0x211 +#define METATILE_PetalburgGym_SlidingDoor_Frame0 0x218 +#define METATILE_PetalburgGym_SlidingDoor_Frame1 0x219 +#define METATILE_PetalburgGym_SlidingDoor_Frame2 0x21A +#define METATILE_PetalburgGym_SlidingDoor_Frame3 0x21B +#define METATILE_PetalburgGym_SlidingDoor_Frame4 0x21C + +// gTileset_Petalburg +#define METATILE_Petalburg_Door_BirchsLab 0x249 +#define METATILE_Petalburg_Door_Littleroot 0x248 +#define METATILE_Petalburg_Door_Oldale 0x287 // gTileset_PokemonCenter -#define METATILE_PokemonCenter_Escalator1F_Tile0_Frame0 0x280 -#define METATILE_PokemonCenter_Escalator1F_Tile0_Frame1 0x282 -#define METATILE_PokemonCenter_Escalator1F_Tile0_Frame2 0x284 -#define METATILE_PokemonCenter_Escalator1F_Tile1_Frame0 0x281 -#define METATILE_PokemonCenter_Escalator1F_Tile1_Frame1 0x283 -#define METATILE_PokemonCenter_Escalator1F_Tile1_Frame2 0x285 -#define METATILE_PokemonCenter_Escalator1F_Tile2_Frame0 0x288 -#define METATILE_PokemonCenter_Escalator1F_Tile2_Frame1 0x28A -#define METATILE_PokemonCenter_Escalator1F_Tile2_Frame2 0x28C -#define METATILE_PokemonCenter_Escalator1F_Tile3_Frame0 0x289 -#define METATILE_PokemonCenter_Escalator1F_Tile3_Frame1 0x28B -#define METATILE_PokemonCenter_Escalator1F_Tile3_Frame2 0x28D -#define METATILE_PokemonCenter_Escalator2F_Tile0_Frame0 0x2A0 -#define METATILE_PokemonCenter_Escalator2F_Tile0_Frame1 0x2A2 -#define METATILE_PokemonCenter_Escalator2F_Tile0_Frame2 0x2A4 -#define METATILE_PokemonCenter_Escalator2F_Tile1_Frame0 0x2A1 -#define METATILE_PokemonCenter_Escalator2F_Tile1_Frame1 0x2A3 -#define METATILE_PokemonCenter_Escalator2F_Tile1_Frame2 0x2A5 -#define METATILE_PokemonCenter_Escalator2F_Tile2_Frame0 0x2A8 -#define METATILE_PokemonCenter_Escalator2F_Tile2_Frame1 0x2AA -#define METATILE_PokemonCenter_Escalator2F_Tile2_Frame2 0x2AC -#define METATILE_PokemonCenter_Floor_ShadowTop_Alt 0x2DC -#define METATILE_PokemonCenter_Floor_Plain_Alt 0x2E4 -#define METATILE_PokemonCenter_Floor_ShadowTop 0x21E -#define METATILE_PokemonCenter_CounterBarrier 0x25D +#define METATILE_PokemonCenter_CounterBarrier 0x25D +#define METATILE_PokemonCenter_Door_CableClub 0x264 +#define METATILE_PokemonCenter_Escalator1F_Tile0_Frame0 0x280 +#define METATILE_PokemonCenter_Escalator1F_Tile0_Frame1 0x282 +#define METATILE_PokemonCenter_Escalator1F_Tile0_Frame2 0x284 +#define METATILE_PokemonCenter_Escalator1F_Tile1_Frame0 0x281 +#define METATILE_PokemonCenter_Escalator1F_Tile1_Frame1 0x283 +#define METATILE_PokemonCenter_Escalator1F_Tile1_Frame2 0x285 +#define METATILE_PokemonCenter_Escalator1F_Tile2_Frame0 0x288 +#define METATILE_PokemonCenter_Escalator1F_Tile2_Frame1 0x28A +#define METATILE_PokemonCenter_Escalator1F_Tile2_Frame2 0x28C +#define METATILE_PokemonCenter_Escalator1F_Tile3_Frame0 0x289 +#define METATILE_PokemonCenter_Escalator1F_Tile3_Frame1 0x28B +#define METATILE_PokemonCenter_Escalator1F_Tile3_Frame2 0x28D +#define METATILE_PokemonCenter_Escalator2F_Tile0_Frame0 0x2A0 +#define METATILE_PokemonCenter_Escalator2F_Tile0_Frame1 0x2A2 +#define METATILE_PokemonCenter_Escalator2F_Tile0_Frame2 0x2A4 +#define METATILE_PokemonCenter_Escalator2F_Tile1_Frame0 0x2A1 +#define METATILE_PokemonCenter_Escalator2F_Tile1_Frame1 0x2A3 +#define METATILE_PokemonCenter_Escalator2F_Tile1_Frame2 0x2A5 +#define METATILE_PokemonCenter_Escalator2F_Tile2_Frame0 0x2A8 +#define METATILE_PokemonCenter_Escalator2F_Tile2_Frame1 0x2AA +#define METATILE_PokemonCenter_Escalator2F_Tile2_Frame2 0x2AC +#define METATILE_PokemonCenter_Floor_Plain_Alt 0x2E4 +#define METATILE_PokemonCenter_Floor_ShadowTop 0x21E +#define METATILE_PokemonCenter_Floor_ShadowTop_Alt 0x2DC -// gTileset_InsideOfTruck -#define METATILE_InsideOfTruck_ExitLight_Top 0x208 -#define METATILE_InsideOfTruck_ExitLight_Mid 0x210 -#define METATILE_InsideOfTruck_ExitLight_Bottom 0x218 -#define METATILE_InsideOfTruck_DoorClosedFloor_Top 0x20D -#define METATILE_InsideOfTruck_DoorClosedFloor_Mid 0x215 -#define METATILE_InsideOfTruck_DoorClosedFloor_Bottom 0x21D +// gTileset_RSMossdeepGym +#define METATILE_RSMossdeepGym_RedArrow_Down 0x205 +#define METATILE_RSMossdeepGym_RedArrow_Left 0x20C +#define METATILE_RSMossdeepGym_RedArrow_Right 0x204 +#define METATILE_RSMossdeepGym_RedArrow_Up 0x20D +#define METATILE_RSMossdeepGym_Switch_Down 0x239 +#define METATILE_RSMossdeepGym_Switch_Up 0x238 -// gTileset_MossdeepGameCorner -#define METATILE_MossdeepGameCorner_CounterOpen_Top 0x22C -#define METATILE_MossdeepGameCorner_CounterOpen_Bottom 0x234 -#define METATILE_MossdeepGameCorner_CounterClosed_Top 0x22A -#define METATILE_MossdeepGameCorner_CounterClosed_Bottom 0x232 - -// gTileset_EliteFour -#define METATILE_EliteFour_OpenDoor_Frame 0x344 -#define METATILE_EliteFour_OpenDoor_Opening 0x345 -#define METATILE_EliteFour_OpenDoorChampion_Frame 0x346 -#define METATILE_EliteFour_OpenDoorChampion_Opening 0x347 -#define METATILE_EliteFour_LeftSpotlightOff 0x2DD -#define METATILE_EliteFour_RightSpotlightOff 0x2DE -#define METATILE_EliteFour_EntryDoor_ClosedTop 0x206 -#define METATILE_EliteFour_EntryDoor_ClosedBottom 0x20E - -// gTileset_InsideShip -#define METATILE_InsideShip_IntactDoor_Bottom_Unlocked 0x22B -#define METATILE_InsideShip_IntactDoor_Bottom_Locked 0x233 -#define METATILE_InsideShip_DoorIndent_Unlocked 0x21A -#define METATILE_InsideShip_DoorIndent_Locked 0x234 -#define METATILE_InsideShip_IntactDoor_Bottom_Interior 0x297 - -// gTileset_BattlePike -#define METATILE_BattlePike_CurtainFrames_Start 0x201 -#define METATILE_BattlePike_Curtain_Stage0_Tile0 0x24A -#define METATILE_BattlePike_Curtain_Stage0_Tile1 0x251 -#define METATILE_BattlePike_Curtain_Stage0_Tile2 0x252 -#define METATILE_BattlePike_Curtain_Stage0_Tile3 0x253 -#define METATILE_BattlePike_Curtain_Stage0_Tile4 0x259 -#define METATILE_BattlePike_Curtain_Stage0_Tile5 0x25A -#define METATILE_BattlePike_Curtain_Stage0_Tile6 0x25B -#define METATILE_BattlePike_Curtain_Stage1_Tile0 0x22A -#define METATILE_BattlePike_Curtain_Stage1_Tile1 0x231 -#define METATILE_BattlePike_Curtain_Stage1_Tile2 0x232 -#define METATILE_BattlePike_Curtain_Stage1_Tile3 0x233 -#define METATILE_BattlePike_Curtain_Stage1_Tile4 0x239 -#define METATILE_BattlePike_Curtain_Stage1_Tile5 0x23A -#define METATILE_BattlePike_Curtain_Stage1_Tile6 0x23B -#define METATILE_BattlePike_Curtain_Stage2_Tile0 0x20A -#define METATILE_BattlePike_Curtain_Stage2_Tile1 0x211 -#define METATILE_BattlePike_Curtain_Stage2_Tile2 0x212 -#define METATILE_BattlePike_Curtain_Stage2_Tile3 0x213 -#define METATILE_BattlePike_Curtain_Stage2_Tile4 0x219 -#define METATILE_BattlePike_Curtain_Stage2_Tile5 0x21A -#define METATILE_BattlePike_Curtain_Stage2_Tile6 0x21B -#define METATILE_BattlePike_Curtain_Stage3_Tile0 0x2AB -#define METATILE_BattlePike_Curtain_Stage3_Tile1 0x2B2 -#define METATILE_BattlePike_Curtain_Stage3_Tile2 0x2B3 -#define METATILE_BattlePike_Curtain_Stage3_Tile3 0x2B4 -#define METATILE_BattlePike_Curtain_Stage3_Tile4 0x2BA -#define METATILE_BattlePike_Curtain_Stage3_Tile5 0x2BB -#define METATILE_BattlePike_Curtain_Stage3_Tile6 0x2BC - -// gTileset_Lilycove -#define METATILE_Lilycove_Door 0x246 -#define METATILE_Lilycove_Door_Wooden 0x28E -#define METATILE_Lilycove_Door_DeptStore 0x30C -#define METATILE_Lilycove_Door_SafariZone 0x32D -#define METATILE_Lilycove_Wailmer0 0x290 -#define METATILE_Lilycove_Wailmer1 0x291 -#define METATILE_Lilycove_Wailmer2 0x2A0 -#define METATILE_Lilycove_Wailmer3 0x2A1 -#define METATILE_Lilycove_Wailmer0_Alt 0x298 -#define METATILE_Lilycove_Wailmer1_Alt 0x299 - -// gTileset_Contest -#define METATILE_Contest_WallShadow 0x221 -#define METATILE_Contest_FloorShadow 0x261 -#define METATILE_Contest_CounterFlap_Top 0x2D1 -#define METATILE_Contest_CounterFlap_Bottom 0x2D9 - -// gTileset_BattleTent -#define METATILE_BattleTent_Door 0x26B - -// gTileset_LilycoveMuseum -#define METATILE_LilycoveMuseum_Painting0_Left 0x25A -#define METATILE_LilycoveMuseum_Painting0_Right 0x25B -#define METATILE_LilycoveMuseum_Painting1_Left 0x25C -#define METATILE_LilycoveMuseum_Painting1_Right 0x25D -#define METATILE_LilycoveMuseum_Painting2_Left 0x25E -#define METATILE_LilycoveMuseum_Painting2_Right 0x25F -#define METATILE_LilycoveMuseum_Painting3_Left 0x260 -#define METATILE_LilycoveMuseum_Painting3_Right 0x261 -#define METATILE_LilycoveMuseum_Painting4_Left 0x262 -#define METATILE_LilycoveMuseum_Painting4_Right 0x263 - -// gTileset_MeteorFalls -#define METATILE_MeteorFalls_CaveEntrance_Top 0x246 -#define METATILE_MeteorFalls_CaveEntrance_Left 0x24D -#define METATILE_MeteorFalls_CaveEntrance_Bottom 0x24E -#define METATILE_MeteorFalls_CaveEntrance_Right 0x24F - -// gTileset_Facility -#define METATILE_Facility_NewMauvilleDoor_Closed_Tile0 0x314 -#define METATILE_Facility_NewMauvilleDoor_Closed_Tile1 0x315 -#define METATILE_Facility_NewMauvilleDoor_Closed_Tile2 0x316 -#define METATILE_Facility_NewMauvilleDoor_Closed_Tile3 0x31C -#define METATILE_Facility_NewMauvilleDoor_Closed_Tile4 0x31D -#define METATILE_Facility_NewMauvilleDoor_Closed_Tile5 0x31E -#define METATILE_Facility_NewMauvilleDoor_Open_Tile0 0x2C3 -#define METATILE_Facility_NewMauvilleDoor_Open_Tile1 0x2C4 -#define METATILE_Facility_NewMauvilleDoor_Open_Tile2 0x2C5 -#define METATILE_Facility_NewMauvilleDoor_Open_Tile3 0x2CB -#define METATILE_Facility_NewMauvilleDoor_Open_Tile4 0x2CC -#define METATILE_Facility_NewMauvilleDoor_Open_Tile5 0x2CD -#define METATILE_Facility_DataPad 0x3E4 - -// gTileset_GenericBuilding -#define METATILE_GenericBuilding_TableEdge 0x2F1 -#define METATILE_GenericBuilding_TrickHouse_Door_Closed 0x21B -#define METATILE_GenericBuilding_TrickHouse_Stairs_Down 0x219 - -// gTileset_TrickHousePuzzle -#define METATILE_TrickHousePuzzle_Stairs_Down 0x20B -#define METATILE_TrickHousePuzzle_Lever_Off 0x23E -#define METATILE_TrickHousePuzzle_Lever_On 0x23F -#define METATILE_TrickHousePuzzle_Button_Up 0x258 -#define METATILE_TrickHousePuzzle_Button_Pressed 0x259 -#define METATILE_TrickHousePuzzle_Door_Shuttered 0x26A -#define METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt 0x252 -#define METATILE_TrickHousePuzzle_Floor_ShadowTop 0x255 -#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0 0x24B -#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1 0x24C -#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2 0x253 -#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3 0x254 -#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0 0x23B -#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1 0x23C -#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2 0x243 -#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3 0x244 -#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0 0x248 -#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1 0x249 -#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2 0x250 -#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3 0x251 -#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0 0x238 -#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1 0x239 -#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2 0x240 -#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3 0x241 -#define METATILE_TrickHousePuzzle_BlueDoorV_Retracted 0x24D -#define METATILE_TrickHousePuzzle_RedDoorV_Retracted 0x24A -#define METATILE_TrickHousePuzzle_RedDoorV_Open0 0x23A -#define METATILE_TrickHousePuzzle_RedDoorV_Open1 0x242 -#define METATILE_TrickHousePuzzle_BlueDoorV_Open0 0x23D -#define METATILE_TrickHousePuzzle_BlueDoorV_Open1 0x245 -#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right 0x260 -#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left 0x261 -#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up 0x262 -#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down 0x263 -#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt 0x27B -#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt 0x27C -#define METATILE_TrickHousePuzzle_Arrow_YellowOnWhite_Right 0x298 - -// gTileset_BikeShop (also used by New Mauville) -#define METATILE_BikeShop_Barrier_Hidden_Top 0x269 -#define METATILE_BikeShop_Barrier_Hidden_Bottom 0x271 -#define METATILE_BikeShop_Floor_Shadow_Top 0x26D -#define METATILE_BikeShop_Wall_Edge_Top 0x281 -#define METATILE_BikeShop_Button_Pressed 0x24F -#define METATILE_BikeShop_Button_Green 0x22E -#define METATILE_BikeShop_Button_Blue 0x236 -#define METATILE_BikeShop_Barrier_Green_Top 0x2B6 -#define METATILE_BikeShop_Barrier_Green_TopMid 0x2BE -#define METATILE_BikeShop_Barrier_Green_BottomMid 0x2C6 -#define METATILE_BikeShop_Barrier_Green_Bottom 0x2CE -#define METATILE_BikeShop_Barrier_Blue_Top 0x2B7 -#define METATILE_BikeShop_Barrier_Blue_TopMid 0x2BF -#define METATILE_BikeShop_Barrier_Blue_BottomMid 0x2C7 -#define METATILE_BikeShop_Barrier_Blue_Bottom 0x2CF -#define METATILE_BikeShop_Generator_Off_Tile0 0x2F0 -#define METATILE_BikeShop_Generator_Off_Tile1 0x2F1 -#define METATILE_BikeShop_Generator_Off_Tile2 0x2F2 -#define METATILE_BikeShop_Generator_Off_Tile3 0x2F3 -#define METATILE_BikeShop_Generator_Off_Tile4 0x2F4 -#define METATILE_BikeShop_Generator_Off_Tile5 0x2F5 -#define METATILE_BikeShop_Generator_Off_Tile6 0x2F6 -#define METATILE_BikeShop_Generator_Off_Tile7 0x2F7 - -// gTileset_TrainerHill -#define METATILE_TrainerHill_GreenFloorTile 0x307 -#define METATILE_TrainerHill_CounterDoor 0x334 -#define METATILE_TrainerHill_Door_Elevator_Lobby 0x32C -#define METATILE_TrainerHill_Door_Elevator_Roof 0x383 - -// gTileset_Underwater -#define METATILE_Underwater_RockWall 0x21E -#define METATILE_Underwater_FloorShadow 0x228 +// gTileset_Rustboro +#define METATILE_Rustboro_Door_Gray 0x21F +#define METATILE_Rustboro_Door_Tan 0x22F // gTileset_SecretBase -#define METATILE_SecretBase_Wall_TopMid 0x202 -#define METATILE_SecretBase_Ground 0x20A -#define METATILE_SecretBase_PC 0x220 -#define METATILE_SecretBase_RegisterPC 0x221 -#define METATILE_SecretBase_PC_On 0x224 -#define METATILE_SecretBase_RedBrick_Top 0x225 -#define METATILE_SecretBase_RedBrick_Bottom 0x22D -#define METATILE_SecretBase_YellowBrick_Top 0x226 -#define METATILE_SecretBase_YellowBrick_Bottom 0x22E -#define METATILE_SecretBase_BlueBrick_Top 0x227 +#define METATILE_SecretBase_AttractMat_BottomLeft 0x313 +#define METATILE_SecretBase_AttractMat_BottomMid 0x314 +#define METATILE_SecretBase_AttractMat_BottomRight 0x315 +#define METATILE_SecretBase_AttractMat_Center 0x30C +#define METATILE_SecretBase_AttractMat_MidLeft 0x30B +#define METATILE_SecretBase_AttractMat_MidRight 0x30D +#define METATILE_SecretBase_AttractMat_TopLeft 0x303 +#define METATILE_SecretBase_AttractMat_TopMid 0x304 +#define METATILE_SecretBase_AttractMat_TopRight 0x305 +#define METATILE_SecretBase_BallPoster 0x330 +#define METATILE_SecretBase_BigPlant_BaseLeft1 0x2EC +#define METATILE_SecretBase_BigPlant_BaseLeft2 0x2EE +#define METATILE_SecretBase_BigPlant_BaseRight1 0x2ED +#define METATILE_SecretBase_BigPlant_BaseRight2 0x2EF +#define METATILE_SecretBase_BigPlant_TopLeft 0x2E4 +#define METATILE_SecretBase_BigPlant_TopRight 0x2E6 +#define METATILE_SecretBase_BlueBalloon 0x33C #define METATILE_SecretBase_BlueBrick_Bottom 0x22F -#define METATILE_SecretBase_MudBall 0x228 -#define METATILE_SecretBase_Fence_Horizontal 0x22C -#define METATILE_SecretBase_Fence_Vertical 0x233 -#define METATILE_SecretBase_SolidBoard_Top 0x234 -#define METATILE_SecretBase_SolidBoard_Bottom 0x23C -#define METATILE_SecretBase_RedTent_TopLeft 0x230 -#define METATILE_SecretBase_RedTent_TopMid 0x231 -#define METATILE_SecretBase_RedTent_TopRight 0x232 -#define METATILE_SecretBase_RedTent_MidLeft 0x238 -#define METATILE_SecretBase_RedTent_DoorTop 0x239 -#define METATILE_SecretBase_RedTent_MidRight 0x23A -#define METATILE_SecretBase_RedTent_BottomLeft 0x240 -#define METATILE_SecretBase_RedTent_Door 0x241 -#define METATILE_SecretBase_RedTent_BottomRight 0x23B +#define METATILE_SecretBase_BlueBrick_Top 0x227 +#define METATILE_SecretBase_BluePoster 0x333 +#define METATILE_SecretBase_BlueTent_BottomLeft 0x258 +#define METATILE_SecretBase_BlueTent_BottomRight 0x269 +#define METATILE_SecretBase_BlueTent_Door 0x259 +#define METATILE_SecretBase_BlueTent_DoorTop 0x251 +#define METATILE_SecretBase_BlueTent_MidLeft 0x250 +#define METATILE_SecretBase_BlueTent_MidRight 0x270 #define METATILE_SecretBase_BlueTent_TopLeft 0x248 #define METATILE_SecretBase_BlueTent_TopMid 0x249 #define METATILE_SecretBase_BlueTent_TopRight 0x268 -#define METATILE_SecretBase_BlueTent_MidLeft 0x250 -#define METATILE_SecretBase_BlueTent_DoorTop 0x251 -#define METATILE_SecretBase_BlueTent_MidRight 0x270 -#define METATILE_SecretBase_BlueTent_BottomLeft 0x258 -#define METATILE_SecretBase_BlueTent_Door 0x259 -#define METATILE_SecretBase_BlueTent_BottomRight 0x269 -#define METATILE_SecretBase_Slide_TopLeft 0x235 -#define METATILE_SecretBase_Slide_TopRight 0x236 -#define METATILE_SecretBase_Slide_StairLanding 0x23D -#define METATILE_SecretBase_Slide_SlideTop 0x23E -#define METATILE_SecretBase_Slide_Stairs 0x263 -#define METATILE_SecretBase_Slide_SlideBottom 0x264 -#define METATILE_SecretBase_Slide_MatLeft 0x26F -#define METATILE_SecretBase_Slide_MatRight 0x277 -#define METATILE_SecretBase_Stand_CornerLeft 0x26A -#define METATILE_SecretBase_Stand_MidLeft 0x26B -#define METATILE_SecretBase_Stand_MidRight 0x26C -#define METATILE_SecretBase_Stand_CornerRight 0x26D -#define METATILE_SecretBase_Stand_StairsLeft 0x272 -#define METATILE_SecretBase_Stand_BaseLeft 0x273 -#define METATILE_SecretBase_Stand_BaseRight 0x274 -#define METATILE_SecretBase_Stand_StairsRight 0x275 -#define METATILE_SecretBase_BreakableDoor_TopClosed 0x237 #define METATILE_SecretBase_BreakableDoor_BottomClosed 0x23F -#define METATILE_SecretBase_BreakableDoor_TopOpen 0x26E #define METATILE_SecretBase_BreakableDoor_BottomOpen 0x276 +#define METATILE_SecretBase_BreakableDoor_TopClosed 0x237 +#define METATILE_SecretBase_BreakableDoor_TopOpen 0x26E +#define METATILE_SecretBase_BrickChair 0x2C8 +#define METATILE_SecretBase_BrickDesk_BottomLeft 0x2B0 +#define METATILE_SecretBase_BrickDesk_BottomMid 0x2B1 +#define METATILE_SecretBase_BrickDesk_BottomRight 0x2B2 +#define METATILE_SecretBase_BrickDesk_Center 0x2A9 +#define METATILE_SecretBase_BrickDesk_MidLeft 0x2A8 +#define METATILE_SecretBase_BrickDesk_MidRight 0x2AA +#define METATILE_SecretBase_BrickDesk_TopLeft 0x2A0 +#define METATILE_SecretBase_BrickDesk_TopMid 0x2A1 +#define METATILE_SecretBase_BrickDesk_TopRight 0x2A2 +#define METATILE_SecretBase_CampChair 0x2C9 +#define METATILE_SecretBase_CampDesk_BottomLeft 0x2B4 +#define METATILE_SecretBase_CampDesk_BottomMid 0x2B5 +#define METATILE_SecretBase_CampDesk_BottomRight 0x2B6 +#define METATILE_SecretBase_CampDesk_Center 0x2AD +#define METATILE_SecretBase_CampDesk_MidLeft 0x2AC +#define METATILE_SecretBase_CampDesk_MidRight 0x2AE +#define METATILE_SecretBase_CampDesk_TopLeft 0x2A4 +#define METATILE_SecretBase_CampDesk_TopMid 0x2A5 +#define METATILE_SecretBase_CampDesk_TopRight 0x2A6 +#define METATILE_SecretBase_ColorfulPlant_BaseLeft1 0x2E8 +#define METATILE_SecretBase_ColorfulPlant_BaseLeft2 0x2EA +#define METATILE_SecretBase_ColorfulPlant_BaseRight1 0x2E9 +#define METATILE_SecretBase_ColorfulPlant_BaseRight2 0x2EB +#define METATILE_SecretBase_ColorfulPlant_TopLeft 0x2E0 +#define METATILE_SecretBase_ColorfulPlant_TopLeftWall 0x2E1 +#define METATILE_SecretBase_ColorfulPlant_TopRight 0x2E2 +#define METATILE_SecretBase_ColorfulPlant_TopRightWall 0x2E3 +#define METATILE_SecretBase_ComfortChair 0x2C1 +#define METATILE_SecretBase_ComfortDesk_BottomLeft 0x29E +#define METATILE_SecretBase_ComfortDesk_BottomMid 0x29F +#define METATILE_SecretBase_ComfortDesk_BottomRight 0x2AB +#define METATILE_SecretBase_ComfortDesk_TopLeft 0x296 +#define METATILE_SecretBase_ComfortDesk_TopMid 0x297 +#define METATILE_SecretBase_ComfortDesk_TopRight 0x2A3 +#define METATILE_SecretBase_CutePoster 0x334 +#define METATILE_SecretBase_CuteTV 0x2F6 +#define METATILE_SecretBase_Fence_Horizontal 0x22C +#define METATILE_SecretBase_Fence_Vertical 0x233 +#define METATILE_SecretBase_FireBlastMat_BottomLeft 0x265 +#define METATILE_SecretBase_FireBlastMat_BottomMid 0x266 +#define METATILE_SecretBase_FireBlastMat_BottomRight 0x267 +#define METATILE_SecretBase_FireBlastMat_Center 0x25E +#define METATILE_SecretBase_FireBlastMat_MidLeft 0x25D +#define METATILE_SecretBase_FireBlastMat_MidRight 0x25F +#define METATILE_SecretBase_FireBlastMat_TopLeft 0x25A +#define METATILE_SecretBase_FireBlastMat_TopMid 0x25B +#define METATILE_SecretBase_FireBlastMat_TopRight 0x25C +#define METATILE_SecretBase_FissureMat_BottomLeft 0x316 +#define METATILE_SecretBase_FissureMat_BottomMid 0x317 +#define METATILE_SecretBase_FissureMat_BottomRight 0x328 +#define METATILE_SecretBase_FissureMat_Center 0x30F +#define METATILE_SecretBase_FissureMat_MidLeft 0x30E +#define METATILE_SecretBase_FissureMat_MidRight 0x320 +#define METATILE_SecretBase_FissureMat_TopLeft 0x306 +#define METATILE_SecretBase_FissureMat_TopMid 0x307 +#define METATILE_SecretBase_FissureMat_TopRight 0x318 +#define METATILE_SecretBase_GlassOrnament_Base1 0x28A +#define METATILE_SecretBase_GlassOrnament_Base2 0x28B +#define METATILE_SecretBase_GlassOrnament_Top 0x282 +#define METATILE_SecretBase_GlassOrnament_TopWall 0x283 #define METATILE_SecretBase_GlitterMat 0x260 +#define METATILE_SecretBase_GoldShield_Base1 0x336 +#define METATILE_SecretBase_GoldShield_Base2 0x337 +#define METATILE_SecretBase_GoldShield_Top 0x32E +#define METATILE_SecretBase_GoldShield_TopWall 0x32F +#define METATILE_SecretBase_GorgeousPlant_BaseLeft1 0x2F8 +#define METATILE_SecretBase_GorgeousPlant_BaseLeft2 0x2FA +#define METATILE_SecretBase_GorgeousPlant_BaseRight1 0x2F9 +#define METATILE_SecretBase_GorgeousPlant_BaseRight2 0x2FB +#define METATILE_SecretBase_GorgeousPlant_TopLeft 0x2F0 +#define METATILE_SecretBase_GorgeousPlant_TopLeftWall 0x2F1 +#define METATILE_SecretBase_GorgeousPlant_TopRight 0x2F2 +#define METATILE_SecretBase_GorgeousPlant_TopRightWall 0x2F3 +#define METATILE_SecretBase_GreenPoster 0x331 +#define METATILE_SecretBase_Ground 0x20A +#define METATILE_SecretBase_HardChair 0x2CA +#define METATILE_SecretBase_HardDesk_BottomLeft 0x2B7 +#define METATILE_SecretBase_HardDesk_BottomMid 0x2CB +#define METATILE_SecretBase_HardDesk_BottomRight 0x2CC +#define METATILE_SecretBase_HardDesk_Center 0x2C3 +#define METATILE_SecretBase_HardDesk_MidLeft 0x2AF +#define METATILE_SecretBase_HardDesk_MidRight 0x2C4 +#define METATILE_SecretBase_HardDesk_TopLeft 0x2A7 +#define METATILE_SecretBase_HardDesk_TopMid 0x2BB +#define METATILE_SecretBase_HardDesk_TopRight 0x2BC +#define METATILE_SecretBase_HeavyChair 0x2BA +#define METATILE_SecretBase_HeavyDesk_BottomLeft 0x298 +#define METATILE_SecretBase_HeavyDesk_BottomMid 0x299 +#define METATILE_SecretBase_HeavyDesk_BottomRight 0x29A +#define METATILE_SecretBase_HeavyDesk_TopLeft 0x290 +#define METATILE_SecretBase_HeavyDesk_TopMid 0x291 +#define METATILE_SecretBase_HeavyDesk_TopRight 0x292 #define METATILE_SecretBase_JumpMat 0x261 -#define METATILE_SecretBase_SpinMat 0x262 +#define METATILE_SecretBase_KissPoster_Left 0x32C +#define METATILE_SecretBase_KissPoster_Right 0x32D +#define METATILE_SecretBase_LongPoster_Left 0x31E +#define METATILE_SecretBase_LongPoster_Right 0x31F +#define METATILE_SecretBase_MudBall 0x228 +#define METATILE_SecretBase_NoteMat_A 0x27D +#define METATILE_SecretBase_NoteMat_B 0x27E +#define METATILE_SecretBase_NoteMat_C_High 0x2B3 #define METATILE_SecretBase_NoteMat_C_Low 0x278 #define METATILE_SecretBase_NoteMat_D 0x279 #define METATILE_SecretBase_NoteMat_E 0x27A #define METATILE_SecretBase_NoteMat_F 0x27B #define METATILE_SecretBase_NoteMat_G 0x27C -#define METATILE_SecretBase_NoteMat_A 0x27D -#define METATILE_SecretBase_NoteMat_B 0x27E -#define METATILE_SecretBase_NoteMat_C_High 0x2B3 -#define METATILE_SecretBase_Tire_TopLeft 0x280 -#define METATILE_SecretBase_Tire_TopRight 0x281 -#define METATILE_SecretBase_Tire_BottomLeft 0x288 -#define METATILE_SecretBase_Tire_BottomRight 0x289 -#define METATILE_SecretBase_GlassOrnament_Top 0x282 -#define METATILE_SecretBase_GlassOrnament_Base1 0x28A -#define METATILE_SecretBase_GlassOrnament_TopWall 0x283 -#define METATILE_SecretBase_GlassOrnament_Base2 0x28B -#define METATILE_SecretBase_SandOrnament_BrokenTop 0x284 -#define METATILE_SecretBase_SandOrnament_BrokenBase 0x28C -#define METATILE_SecretBase_SandOrnament_Top 0x285 -#define METATILE_SecretBase_SandOrnament_Base1 0x28D -#define METATILE_SecretBase_SandOrnament_TopWall 0x286 -#define METATILE_SecretBase_SandOrnament_Base2 0x28E -#define METATILE_SecretBase_SmallDesk 0x287 -#define METATILE_SecretBase_PokemonDesk 0x28F -#define METATILE_SecretBase_HeavyDesk_TopLeft 0x290 -#define METATILE_SecretBase_HeavyDesk_TopMid 0x291 -#define METATILE_SecretBase_HeavyDesk_TopRight 0x292 -#define METATILE_SecretBase_HeavyDesk_BottomLeft 0x298 -#define METATILE_SecretBase_HeavyDesk_BottomMid 0x299 -#define METATILE_SecretBase_HeavyDesk_BottomRight 0x29A -#define METATILE_SecretBase_RaggedDesk_TopLeft 0x293 -#define METATILE_SecretBase_RaggedDesk_TopMid 0x294 -#define METATILE_SecretBase_RaggedDesk_TopRight 0x295 -#define METATILE_SecretBase_RaggedDesk_BottomLeft 0x29B -#define METATILE_SecretBase_RaggedDesk_BottomMid 0x29C -#define METATILE_SecretBase_RaggedDesk_BottomRight 0x29D -#define METATILE_SecretBase_ComfortDesk_TopLeft 0x296 -#define METATILE_SecretBase_ComfortDesk_TopMid 0x297 -#define METATILE_SecretBase_ComfortDesk_TopRight 0x2A3 -#define METATILE_SecretBase_ComfortDesk_BottomLeft 0x29E -#define METATILE_SecretBase_ComfortDesk_BottomMid 0x29F -#define METATILE_SecretBase_ComfortDesk_BottomRight 0x2AB -#define METATILE_SecretBase_BrickDesk_TopLeft 0x2A0 -#define METATILE_SecretBase_BrickDesk_TopMid 0x2A1 -#define METATILE_SecretBase_BrickDesk_TopRight 0x2A2 -#define METATILE_SecretBase_BrickDesk_MidLeft 0x2A8 -#define METATILE_SecretBase_BrickDesk_Center 0x2A9 -#define METATILE_SecretBase_BrickDesk_MidRight 0x2AA -#define METATILE_SecretBase_BrickDesk_BottomLeft 0x2B0 -#define METATILE_SecretBase_BrickDesk_BottomMid 0x2B1 -#define METATILE_SecretBase_BrickDesk_BottomRight 0x2B2 -#define METATILE_SecretBase_CampDesk_TopLeft 0x2A4 -#define METATILE_SecretBase_CampDesk_TopMid 0x2A5 -#define METATILE_SecretBase_CampDesk_TopRight 0x2A6 -#define METATILE_SecretBase_CampDesk_MidLeft 0x2AC -#define METATILE_SecretBase_CampDesk_Center 0x2AD -#define METATILE_SecretBase_CampDesk_MidRight 0x2AE -#define METATILE_SecretBase_CampDesk_BottomLeft 0x2B4 -#define METATILE_SecretBase_CampDesk_BottomMid 0x2B5 -#define METATILE_SecretBase_CampDesk_BottomRight 0x2B6 -#define METATILE_SecretBase_HardDesk_TopLeft 0x2A7 -#define METATILE_SecretBase_HardDesk_TopMid 0x2BB -#define METATILE_SecretBase_HardDesk_TopRight 0x2BC -#define METATILE_SecretBase_HardDesk_MidLeft 0x2AF -#define METATILE_SecretBase_HardDesk_Center 0x2C3 -#define METATILE_SecretBase_HardDesk_MidRight 0x2C4 -#define METATILE_SecretBase_HardDesk_BottomLeft 0x2B7 -#define METATILE_SecretBase_HardDesk_BottomMid 0x2CB -#define METATILE_SecretBase_HardDesk_BottomRight 0x2CC -#define METATILE_SecretBase_PrettyDesk_TopLeft 0x2BD -#define METATILE_SecretBase_PrettyDesk_TopMid 0x2BE -#define METATILE_SecretBase_PrettyDesk_TopRight 0x2BF -#define METATILE_SecretBase_PrettyDesk_MidLeft 0x2C5 -#define METATILE_SecretBase_PrettyDesk_Center 0x2C6 -#define METATILE_SecretBase_PrettyDesk_MidRight 0x2C7 -#define METATILE_SecretBase_PrettyDesk_BottomLeft 0x2CD -#define METATILE_SecretBase_PrettyDesk_BottomMid 0x2CE -#define METATILE_SecretBase_PrettyDesk_BottomRight 0x2CF -#define METATILE_SecretBase_SmallChair 0x2B8 -#define METATILE_SecretBase_PokemonChair 0x2B9 -#define METATILE_SecretBase_HeavyChair 0x2BA -#define METATILE_SecretBase_PrettyChair 0x2C0 -#define METATILE_SecretBase_ComfortChair 0x2C1 -#define METATILE_SecretBase_RaggedChair 0x2C2 -#define METATILE_SecretBase_BrickChair 0x2C8 -#define METATILE_SecretBase_CampChair 0x2C9 -#define METATILE_SecretBase_HardChair 0x2CA -#define METATILE_SecretBase_RedPlant_Top 0x2D0 -#define METATILE_SecretBase_RedPlant_Base1 0x2D8 -#define METATILE_SecretBase_RedPlant_TopWall 0x2D1 -#define METATILE_SecretBase_RedPlant_Base2 0x2D9 -#define METATILE_SecretBase_TropicalPlant_Top 0x2D2 -#define METATILE_SecretBase_TropicalPlant_Base1 0x2DA -#define METATILE_SecretBase_TropicalPlant_TopWall 0x2D3 -#define METATILE_SecretBase_TropicalPlant_Base2 0x2DB -#define METATILE_SecretBase_PrettyFlowers_Top 0x2D4 -#define METATILE_SecretBase_PrettyFlowers_Base1 0x2DC -#define METATILE_SecretBase_PrettyFlowers_TopWall 0x2D5 -#define METATILE_SecretBase_PrettyFlowers_Base2 0x2DD -#define METATILE_SecretBase_ColorfulPlant_TopLeft 0x2E0 -#define METATILE_SecretBase_ColorfulPlant_TopRight 0x2E2 -#define METATILE_SecretBase_ColorfulPlant_BaseLeft1 0x2E8 -#define METATILE_SecretBase_ColorfulPlant_BaseRight1 0x2E9 -#define METATILE_SecretBase_ColorfulPlant_TopLeftWall 0x2E1 -#define METATILE_SecretBase_ColorfulPlant_TopRightWall 0x2E3 -#define METATILE_SecretBase_ColorfulPlant_BaseLeft2 0x2EA -#define METATILE_SecretBase_ColorfulPlant_BaseRight2 0x2EB -#define METATILE_SecretBase_BigPlant_TopLeft 0x2E4 -#define METATILE_SecretBase_BigPlant_TopRight 0x2E6 -#define METATILE_SecretBase_BigPlant_BaseLeft1 0x2EC -#define METATILE_SecretBase_BigPlant_BaseRight1 0x2ED -#define METATILE_SecretBase_BigPlant_BaseLeft2 0x2EE -#define METATILE_SecretBase_BigPlant_BaseRight2 0x2EF -#define METATILE_SecretBase_GorgeousPlant_TopLeft 0x2F0 -#define METATILE_SecretBase_GorgeousPlant_TopRight 0x2F2 -#define METATILE_SecretBase_GorgeousPlant_BaseLeft1 0x2F8 -#define METATILE_SecretBase_GorgeousPlant_BaseRight1 0x2F9 -#define METATILE_SecretBase_GorgeousPlant_TopLeftWall 0x2F1 -#define METATILE_SecretBase_GorgeousPlant_TopRightWall 0x2F3 -#define METATILE_SecretBase_GorgeousPlant_BaseLeft2 0x2FA -#define METATILE_SecretBase_GorgeousPlant_BaseRight2 0x2FB -#define METATILE_SecretBase_TV 0x2F4 -#define METATILE_SecretBase_RoundTV 0x2F5 -#define METATILE_SecretBase_CuteTV 0x2F6 +#define METATILE_SecretBase_PC 0x220 +#define METATILE_SecretBase_PC_On 0x224 #define METATILE_SecretBase_PikaPoster_Left 0x31C #define METATILE_SecretBase_PikaPoster_Right 0x31D -#define METATILE_SecretBase_LongPoster_Left 0x31E -#define METATILE_SecretBase_LongPoster_Right 0x31F -#define METATILE_SecretBase_SeaPoster_Left 0x324 -#define METATILE_SecretBase_SeaPoster_Right 0x325 -#define METATILE_SecretBase_SkyPoster_Left 0x326 -#define METATILE_SecretBase_SkyPoster_Right 0x327 -#define METATILE_SecretBase_KissPoster_Left 0x32C -#define METATILE_SecretBase_KissPoster_Right 0x32D -#define METATILE_SecretBase_BallPoster 0x330 -#define METATILE_SecretBase_GreenPoster 0x331 -#define METATILE_SecretBase_RedPoster 0x332 -#define METATILE_SecretBase_BluePoster 0x333 -#define METATILE_SecretBase_CutePoster 0x334 -#define METATILE_SecretBase_SilverShield_Top 0x2D6 -#define METATILE_SecretBase_SilverShield_Base1 0x2DE -#define METATILE_SecretBase_SilverShield_TopWall 0x2D7 -#define METATILE_SecretBase_SilverShield_Base2 0x2DF -#define METATILE_SecretBase_GoldShield_Top 0x32E -#define METATILE_SecretBase_GoldShield_Base1 0x336 -#define METATILE_SecretBase_GoldShield_TopWall 0x32F -#define METATILE_SecretBase_GoldShield_Base2 0x337 -#define METATILE_SecretBase_RedBalloon 0x338 -#define METATILE_SecretBase_BlueBalloon 0x33C -#define METATILE_SecretBase_YellowBalloon 0x340 -#define METATILE_SecretBase_SurfMat_TopLeft 0x242 -#define METATILE_SecretBase_SurfMat_TopMid 0x243 -#define METATILE_SecretBase_SurfMat_TopRight 0x244 -#define METATILE_SecretBase_SurfMat_MidLeft 0x24A -#define METATILE_SecretBase_SurfMat_Center 0x24B -#define METATILE_SecretBase_SurfMat_MidRight 0x24C -#define METATILE_SecretBase_SurfMat_BottomLeft 0x252 -#define METATILE_SecretBase_SurfMat_BottomMid 0x253 -#define METATILE_SecretBase_SurfMat_BottomRight 0x254 -#define METATILE_SecretBase_ThunderMat_TopLeft 0x245 -#define METATILE_SecretBase_ThunderMat_TopMid 0x246 -#define METATILE_SecretBase_ThunderMat_TopRight 0x247 -#define METATILE_SecretBase_ThunderMat_MidLeft 0x24D -#define METATILE_SecretBase_ThunderMat_Center 0x24E -#define METATILE_SecretBase_ThunderMat_MidRight 0x24F -#define METATILE_SecretBase_ThunderMat_BottomLeft 0x255 -#define METATILE_SecretBase_ThunderMat_BottomMid 0x256 -#define METATILE_SecretBase_ThunderMat_BottomRight 0x257 -#define METATILE_SecretBase_FireBlastMat_TopLeft 0x25A -#define METATILE_SecretBase_FireBlastMat_TopMid 0x25B -#define METATILE_SecretBase_FireBlastMat_TopRight 0x25C -#define METATILE_SecretBase_FireBlastMat_MidLeft 0x25D -#define METATILE_SecretBase_FireBlastMat_Center 0x25E -#define METATILE_SecretBase_FireBlastMat_MidRight 0x25F -#define METATILE_SecretBase_FireBlastMat_BottomLeft 0x265 -#define METATILE_SecretBase_FireBlastMat_BottomMid 0x266 -#define METATILE_SecretBase_FireBlastMat_BottomRight 0x267 -#define METATILE_SecretBase_PowderSnowMat_TopLeft 0x300 -#define METATILE_SecretBase_PowderSnowMat_TopMid 0x301 -#define METATILE_SecretBase_PowderSnowMat_TopRight 0x302 -#define METATILE_SecretBase_PowderSnowMat_MidLeft 0x308 -#define METATILE_SecretBase_PowderSnowMat_Center 0x309 -#define METATILE_SecretBase_PowderSnowMat_MidRight 0x30A +#define METATILE_SecretBase_PokemonChair 0x2B9 +#define METATILE_SecretBase_PokemonDesk 0x28F #define METATILE_SecretBase_PowderSnowMat_BottomLeft 0x310 #define METATILE_SecretBase_PowderSnowMat_BottomMid 0x311 #define METATILE_SecretBase_PowderSnowMat_BottomRight 0x312 -#define METATILE_SecretBase_AttractMat_TopLeft 0x303 -#define METATILE_SecretBase_AttractMat_TopMid 0x304 -#define METATILE_SecretBase_AttractMat_TopRight 0x305 -#define METATILE_SecretBase_AttractMat_MidLeft 0x30B -#define METATILE_SecretBase_AttractMat_Center 0x30C -#define METATILE_SecretBase_AttractMat_MidRight 0x30D -#define METATILE_SecretBase_AttractMat_BottomLeft 0x313 -#define METATILE_SecretBase_AttractMat_BottomMid 0x314 -#define METATILE_SecretBase_AttractMat_BottomRight 0x315 -#define METATILE_SecretBase_FissureMat_TopLeft 0x306 -#define METATILE_SecretBase_FissureMat_TopMid 0x307 -#define METATILE_SecretBase_FissureMat_TopRight 0x318 -#define METATILE_SecretBase_FissureMat_MidLeft 0x30E -#define METATILE_SecretBase_FissureMat_Center 0x30F -#define METATILE_SecretBase_FissureMat_MidRight 0x320 -#define METATILE_SecretBase_FissureMat_BottomLeft 0x316 -#define METATILE_SecretBase_FissureMat_BottomMid 0x317 -#define METATILE_SecretBase_FissureMat_BottomRight 0x328 -#define METATILE_SecretBase_SpikesMat_TopLeft 0x319 -#define METATILE_SecretBase_SpikesMat_TopMid 0x31A -#define METATILE_SecretBase_SpikesMat_TopRight 0x31B -#define METATILE_SecretBase_SpikesMat_MidLeft 0x321 -#define METATILE_SecretBase_SpikesMat_Center 0x322 -#define METATILE_SecretBase_SpikesMat_MidRight 0x323 +#define METATILE_SecretBase_PowderSnowMat_Center 0x309 +#define METATILE_SecretBase_PowderSnowMat_MidLeft 0x308 +#define METATILE_SecretBase_PowderSnowMat_MidRight 0x30A +#define METATILE_SecretBase_PowderSnowMat_TopLeft 0x300 +#define METATILE_SecretBase_PowderSnowMat_TopMid 0x301 +#define METATILE_SecretBase_PowderSnowMat_TopRight 0x302 +#define METATILE_SecretBase_PrettyChair 0x2C0 +#define METATILE_SecretBase_PrettyDesk_BottomLeft 0x2CD +#define METATILE_SecretBase_PrettyDesk_BottomMid 0x2CE +#define METATILE_SecretBase_PrettyDesk_BottomRight 0x2CF +#define METATILE_SecretBase_PrettyDesk_Center 0x2C6 +#define METATILE_SecretBase_PrettyDesk_MidLeft 0x2C5 +#define METATILE_SecretBase_PrettyDesk_MidRight 0x2C7 +#define METATILE_SecretBase_PrettyDesk_TopLeft 0x2BD +#define METATILE_SecretBase_PrettyDesk_TopMid 0x2BE +#define METATILE_SecretBase_PrettyDesk_TopRight 0x2BF +#define METATILE_SecretBase_PrettyFlowers_Base1 0x2DC +#define METATILE_SecretBase_PrettyFlowers_Base2 0x2DD +#define METATILE_SecretBase_PrettyFlowers_Top 0x2D4 +#define METATILE_SecretBase_PrettyFlowers_TopWall 0x2D5 +#define METATILE_SecretBase_RaggedChair 0x2C2 +#define METATILE_SecretBase_RaggedDesk_BottomLeft 0x29B +#define METATILE_SecretBase_RaggedDesk_BottomMid 0x29C +#define METATILE_SecretBase_RaggedDesk_BottomRight 0x29D +#define METATILE_SecretBase_RaggedDesk_TopLeft 0x293 +#define METATILE_SecretBase_RaggedDesk_TopMid 0x294 +#define METATILE_SecretBase_RaggedDesk_TopRight 0x295 +#define METATILE_SecretBase_RedBalloon 0x338 +#define METATILE_SecretBase_RedBrick_Bottom 0x22D +#define METATILE_SecretBase_RedBrick_Top 0x225 +#define METATILE_SecretBase_RedPlant_Base1 0x2D8 +#define METATILE_SecretBase_RedPlant_Base2 0x2D9 +#define METATILE_SecretBase_RedPlant_Top 0x2D0 +#define METATILE_SecretBase_RedPlant_TopWall 0x2D1 +#define METATILE_SecretBase_RedPoster 0x332 +#define METATILE_SecretBase_RedTent_BottomLeft 0x240 +#define METATILE_SecretBase_RedTent_BottomRight 0x23B +#define METATILE_SecretBase_RedTent_Door 0x241 +#define METATILE_SecretBase_RedTent_DoorTop 0x239 +#define METATILE_SecretBase_RedTent_MidLeft 0x238 +#define METATILE_SecretBase_RedTent_MidRight 0x23A +#define METATILE_SecretBase_RedTent_TopLeft 0x230 +#define METATILE_SecretBase_RedTent_TopMid 0x231 +#define METATILE_SecretBase_RedTent_TopRight 0x232 +#define METATILE_SecretBase_RegisterPC 0x221 +#define METATILE_SecretBase_RoundTV 0x2F5 +#define METATILE_SecretBase_SandOrnament_Base1 0x28D +#define METATILE_SecretBase_SandOrnament_Base2 0x28E +#define METATILE_SecretBase_SandOrnament_BrokenBase 0x28C +#define METATILE_SecretBase_SandOrnament_BrokenTop 0x284 +#define METATILE_SecretBase_SandOrnament_Top 0x285 +#define METATILE_SecretBase_SandOrnament_TopWall 0x286 +#define METATILE_SecretBase_SeaPoster_Left 0x324 +#define METATILE_SecretBase_SeaPoster_Right 0x325 +#define METATILE_SecretBase_SilverShield_Base1 0x2DE +#define METATILE_SecretBase_SilverShield_Base2 0x2DF +#define METATILE_SecretBase_SilverShield_Top 0x2D6 +#define METATILE_SecretBase_SilverShield_TopWall 0x2D7 +#define METATILE_SecretBase_SkyPoster_Left 0x326 +#define METATILE_SecretBase_SkyPoster_Right 0x327 +#define METATILE_SecretBase_Slide_MatLeft 0x26F +#define METATILE_SecretBase_Slide_MatRight 0x277 +#define METATILE_SecretBase_Slide_SlideBottom 0x264 +#define METATILE_SecretBase_Slide_SlideTop 0x23E +#define METATILE_SecretBase_Slide_StairLanding 0x23D +#define METATILE_SecretBase_Slide_Stairs 0x263 +#define METATILE_SecretBase_Slide_TopLeft 0x235 +#define METATILE_SecretBase_Slide_TopRight 0x236 +#define METATILE_SecretBase_SmallChair 0x2B8 +#define METATILE_SecretBase_SmallDesk 0x287 +#define METATILE_SecretBase_SolidBoard_Bottom 0x23C +#define METATILE_SecretBase_SolidBoard_Top 0x234 #define METATILE_SecretBase_SpikesMat_BottomLeft 0x329 #define METATILE_SecretBase_SpikesMat_BottomMid 0x32A #define METATILE_SecretBase_SpikesMat_BottomRight 0x32B +#define METATILE_SecretBase_SpikesMat_Center 0x322 +#define METATILE_SecretBase_SpikesMat_MidLeft 0x321 +#define METATILE_SecretBase_SpikesMat_MidRight 0x323 +#define METATILE_SecretBase_SpikesMat_TopLeft 0x319 +#define METATILE_SecretBase_SpikesMat_TopMid 0x31A +#define METATILE_SecretBase_SpikesMat_TopRight 0x31B +#define METATILE_SecretBase_SpinMat 0x262 +#define METATILE_SecretBase_Stand_BaseLeft 0x273 +#define METATILE_SecretBase_Stand_BaseRight 0x274 +#define METATILE_SecretBase_Stand_CornerLeft 0x26A +#define METATILE_SecretBase_Stand_CornerRight 0x26D +#define METATILE_SecretBase_Stand_MidLeft 0x26B +#define METATILE_SecretBase_Stand_MidRight 0x26C +#define METATILE_SecretBase_Stand_StairsLeft 0x272 +#define METATILE_SecretBase_Stand_StairsRight 0x275 +#define METATILE_SecretBase_SurfMat_BottomLeft 0x252 +#define METATILE_SecretBase_SurfMat_BottomMid 0x253 +#define METATILE_SecretBase_SurfMat_BottomRight 0x254 +#define METATILE_SecretBase_SurfMat_Center 0x24B +#define METATILE_SecretBase_SurfMat_MidLeft 0x24A +#define METATILE_SecretBase_SurfMat_MidRight 0x24C +#define METATILE_SecretBase_SurfMat_TopLeft 0x242 +#define METATILE_SecretBase_SurfMat_TopMid 0x243 +#define METATILE_SecretBase_SurfMat_TopRight 0x244 +#define METATILE_SecretBase_TV 0x2F4 +#define METATILE_SecretBase_ThunderMat_BottomLeft 0x255 +#define METATILE_SecretBase_ThunderMat_BottomMid 0x256 +#define METATILE_SecretBase_ThunderMat_BottomRight 0x257 +#define METATILE_SecretBase_ThunderMat_Center 0x24E +#define METATILE_SecretBase_ThunderMat_MidLeft 0x24D +#define METATILE_SecretBase_ThunderMat_MidRight 0x24F +#define METATILE_SecretBase_ThunderMat_TopLeft 0x245 +#define METATILE_SecretBase_ThunderMat_TopMid 0x246 +#define METATILE_SecretBase_ThunderMat_TopRight 0x247 +#define METATILE_SecretBase_Tire_BottomLeft 0x288 +#define METATILE_SecretBase_Tire_BottomRight 0x289 +#define METATILE_SecretBase_Tire_TopLeft 0x280 +#define METATILE_SecretBase_Tire_TopRight 0x281 +#define METATILE_SecretBase_TropicalPlant_Base1 0x2DA +#define METATILE_SecretBase_TropicalPlant_Base2 0x2DB +#define METATILE_SecretBase_TropicalPlant_Top 0x2D2 +#define METATILE_SecretBase_TropicalPlant_TopWall 0x2D3 +#define METATILE_SecretBase_Wall_TopMid 0x202 +#define METATILE_SecretBase_YellowBalloon 0x340 +#define METATILE_SecretBase_YellowBrick_Bottom 0x22E +#define METATILE_SecretBase_YellowBrick_Top 0x226 -// gTileset_BattlePyramid -#define METATILE_BattlePyramid_Floor 0x28D -#define METATILE_BattlePyramid_Exit 0x28E +// gTileset_Shop +#define METATILE_Shop_Door_Elevator 0x285 +#define METATILE_Shop_Laptop1_Flash 0x258 +#define METATILE_Shop_Laptop1_Normal 0x29D +#define METATILE_Shop_Laptop2_Flash 0x260 +#define METATILE_Shop_Laptop2_Normal 0x2A5 + +// gTileset_Slateport +#define METATILE_Slateport_Door 0x2DC +#define METATILE_Slateport_Door_BattleTent 0x393 + +// gTileset_SootopolisGym +#define METATILE_SootopolisGym_Ice_Broken 0x206 +#define METATILE_SootopolisGym_Ice_Cracked 0x20E +#define METATILE_SootopolisGym_Stairs 0x207 + +// gTileset_Sootopolis +#define METATILE_Sootopolis_Door 0x21E +#define METATILE_Sootopolis_Door_Closed 0x248 +#define METATILE_Sootopolis_Door_PeakedRoof 0x21C +#define METATILE_Sootopolis_GymDoor_Closed 0x250 +#define METATILE_Sootopolis_RoughWater 0x290 + +// gTileset_TrainerHill +#define METATILE_TrainerHill_CounterDoor 0x334 +#define METATILE_TrainerHill_Door_Elevator_Lobby 0x32C +#define METATILE_TrainerHill_Door_Elevator_Roof 0x383 +#define METATILE_TrainerHill_GreenFloorTile 0x307 + +// gTileset_TrickHousePuzzle +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down 0x263 +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left 0x261 +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt 0x27B +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right 0x260 +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt 0x27C +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up 0x262 +#define METATILE_TrickHousePuzzle_Arrow_YellowOnWhite_Right 0x298 +#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0 0x23B +#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1 0x23C +#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2 0x243 +#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3 0x244 +#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0 0x24B +#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1 0x24C +#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2 0x253 +#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3 0x254 +#define METATILE_TrickHousePuzzle_BlueDoorV_Open0 0x23D +#define METATILE_TrickHousePuzzle_BlueDoorV_Open1 0x245 +#define METATILE_TrickHousePuzzle_BlueDoorV_Retracted 0x24D +#define METATILE_TrickHousePuzzle_Button_Pressed 0x259 +#define METATILE_TrickHousePuzzle_Button_Up 0x258 +#define METATILE_TrickHousePuzzle_Door_Shuttered 0x26A +#define METATILE_TrickHousePuzzle_Floor_ShadowTop 0x255 +#define METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt 0x252 +#define METATILE_TrickHousePuzzle_Lever_Off 0x23E +#define METATILE_TrickHousePuzzle_Lever_On 0x23F +#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0 0x238 +#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1 0x239 +#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2 0x240 +#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3 0x241 +#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0 0x248 +#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1 0x249 +#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2 0x250 +#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3 0x251 +#define METATILE_TrickHousePuzzle_RedDoorV_Open0 0x23A +#define METATILE_TrickHousePuzzle_RedDoorV_Open1 0x242 +#define METATILE_TrickHousePuzzle_RedDoorV_Retracted 0x24A +#define METATILE_TrickHousePuzzle_Stairs_Down 0x20B + +// gTileset_Underwater +#define METATILE_Underwater_FloorShadow 0x228 +#define METATILE_Underwater_RockWall 0x21E #endif // GUARD_METATILE_LABELS_H diff --git a/include/constants/moves.h b/include/constants/moves.h index 20cb32c545..dd00aacb45 100644 --- a/include/constants/moves.h +++ b/include/constants/moves.h @@ -858,8 +858,10 @@ #define MOVE_NOXIOUS_TORQUE 824 #define MOVE_COMBAT_TORQUE 825 #define MOVE_MAGICAL_TORQUE 826 +#define MOVE_PSYBLADE 827 +#define MOVE_HYDRO_STEAM 828 -#define MOVES_COUNT_GEN9 827 +#define MOVES_COUNT_GEN9 829 #define MOVES_COUNT MOVES_COUNT_GEN9 diff --git a/include/constants/party_menu.h b/include/constants/party_menu.h index 2c632d30cf..f28b75122f 100644 --- a/include/constants/party_menu.h +++ b/include/constants/party_menu.h @@ -48,6 +48,7 @@ #define PARTY_ACTION_MOVE_TUTOR 12 #define PARTY_ACTION_MINIGAME 13 #define PARTY_ACTION_REUSABLE_ITEM 14 // Unused. The only reusable items are handled separately +#define PARTY_ACTION_CHOOSE_FAINTED_MON 15 // IDs for DisplayPartyMenuStdMessage, to display the message at the bottom of the party menu #define PARTY_MSG_CHOOSE_MON 0 diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 35eca5bbc4..ddf879854e 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -191,6 +191,9 @@ #define FRIENDSHIP_200_TO_254 5 #define FRIENDSHIP_MAX 6 +// Friendship value that the majority of species use. This was changed in Generation 8 to 50. +#define STANDARD_FRIENDSHIP 70 + #define MAX_FRIENDSHIP 255 #define MAX_SHEEN 255 #define MAX_CONDITION 255 @@ -198,7 +201,11 @@ #define MAX_PER_STAT_IVS 31 #define MAX_IV_MASK 31 #define USE_RANDOM_IVS (MAX_PER_STAT_IVS + 1) +#if P_EV_CAP >= GEN_6 +#define MAX_PER_STAT_EVS 252 +#else #define MAX_PER_STAT_EVS 255 +#endif #define MAX_TOTAL_EVS 510 #if I_VITAMIN_EV_CAP >= GEN_8 #define EV_ITEM_RAISE_LIMIT MAX_PER_STAT_EVS @@ -307,6 +314,7 @@ #define EVO_SCRIPT_TRIGGER_DMG 36 // Pokémon has specified HP below max, then player interacts trigger #define EVO_DARK_SCROLL 37 // interacts with Scroll of Darkness #define EVO_WATER_SCROLL 38 // interacts with Scroll of Waters +#define EVO_ITEM_NIGHT 39 // specified item is used on Pokémon at night #define EVOS_PER_MON 10 @@ -331,6 +339,14 @@ #define MON_PIC_HEIGHT 64 #define MON_PIC_SIZE (MON_PIC_WIDTH * MON_PIC_HEIGHT / 2) +// Most pokemon have 2 frames (a default and an alternate for their animation). +// There are 4 exceptions: +// - Castform has 4 frames, 1 for each form +// - Deoxys has 2 frames, 1 for each form +// - Spinda has 1 frame, presumably to avoid the work of animating its spots +// - Unown has 1 frame, presumably to avoid the work of animating all 28 of its forms +#define MAX_MON_PIC_FRAMES 4 + #define BATTLE_ALIVE_EXCEPT_ACTIVE 0 #define BATTLE_ALIVE_ATK_SIDE 1 #define BATTLE_ALIVE_DEF_SIDE 2 diff --git a/include/constants/songs.h b/include/constants/songs.h index a7b6381fc8..a8782494ee 100644 --- a/include/constants/songs.h +++ b/include/constants/songs.h @@ -280,47 +280,47 @@ // Music #define START_MUS 350 -#define MUS_LITTLEROOT_TEST 350 // MUS_TETSUJI -#define MUS_GSC_ROUTE38 351 // MUS_FIELD13 +#define MUS_LITTLEROOT_TEST 350 // MUS_TETSUJI // Unused, likely a test track. +#define MUS_GSC_ROUTE38 351 // MUS_FIELD13 // Unused, likely a test track. #define MUS_CAUGHT 352 // MUS_KACHI22 #define MUS_VICTORY_WILD 353 // MUS_KACHI2 -#define MUS_VICTORY_GYM_LEADER 354 // MUS_KACHI3 +#define MUS_VICTORY_GYM_LEADER 354 // MUS_KACHI3 // Also used in Frontier Brain victories. #define MUS_VICTORY_LEAGUE 355 // MUS_KACHI5 -#define MUS_C_COMM_CENTER 356 // MUS_PCC -#define MUS_GSC_PEWTER 357 // MUS_NIBI -#define MUS_C_VS_LEGEND_BEAST 358 // MUS_SUIKUN -#define MUS_ROUTE101 359 // MUS_DOORO1 -#define MUS_ROUTE110 360 // MUS_DOORO_X1 -#define MUS_ROUTE120 361 // MUS_DOORO_X3 -#define MUS_PETALBURG 362 // MUS_MACHI_S2 -#define MUS_OLDALE 363 // MUS_MACHI_S4 +#define MUS_C_COMM_CENTER 356 // MUS_PCC // Unused, likely a test track. +#define MUS_GSC_PEWTER 357 // MUS_NIBI // Used in unused Contest Halls. +#define MUS_C_VS_LEGEND_BEAST 358 // MUS_SUIKUN // Unused, likely a test track. +#define MUS_ROUTE101 359 // MUS_DOORO1 // Also used in Routes 102 and 103. +#define MUS_ROUTE110 360 // MUS_DOORO_X1 // Also used in Routes 112, 114, 117, 111's non-desert section and 118's west half. +#define MUS_ROUTE120 361 // MUS_DOORO_X3 // Also used in Routes 121, 124, 125, 126, 127 and 128. +#define MUS_PETALBURG 362 // MUS_MACHI_S2 // Also used in Mr. Briney's House and Pretty Petal Flower Shop. +#define MUS_OLDALE 363 // MUS_MACHI_S4 // Also used in Lavaridge Town. #define MUS_GYM 364 // MUS_GIM #define MUS_SURF 365 // MUS_NAMINORI -#define MUS_PETALBURG_WOODS 366 // MUS_DAN01 +#define MUS_PETALBURG_WOODS 366 // MUS_DAN01 // Also used in Artisan Cave, Fiery Path, Granite Cave, Jagged Pass, Marine Cave, Rusturf Tunnel, Scorched Slab and Terra Cave. #define MUS_LEVEL_UP 367 // MUS_FANFA1 #define MUS_HEAL 368 // MUS_ME_ASA #define MUS_OBTAIN_BADGE 369 // MUS_ME_BACHI #define MUS_OBTAIN_ITEM 370 // MUS_FANFA4 -#define MUS_EVOLVED 371 // MUS_FANFA5 +#define MUS_EVOLVED 371 // MUS_FANFA5 // Also used in egg hatching, trades and upon catching. #define MUS_OBTAIN_TMHM 372 // MUS_ME_WAZA -#define MUS_LILYCOVE_MUSEUM 373 // MUS_BIJYUTU -#define MUS_ROUTE122 374 // MUS_DOORO_X4 +#define MUS_LILYCOVE_MUSEUM 373 // MUS_BIJYUTU // Also used in the Battle Frontier's Ranking Hall. +#define MUS_ROUTE122 374 // MUS_DOORO_X4 // Also used in Route 123 and Birch's intro speech. #define MUS_OCEANIC_MUSEUM 375 // MUS_FUNE_KAN -#define MUS_EVOLUTION_INTRO 376 // MUS_ME_SHINKA -#define MUS_EVOLUTION 377 // MUS_SHINKA +#define MUS_EVOLUTION_INTRO 376 // MUS_ME_SHINKA // Also used in egg hatching. +#define MUS_EVOLUTION 377 // MUS_SHINKA // Also used in egg hatching and trades. #define MUS_MOVE_DELETED 378 // MUS_ME_WASURE #define MUS_ENCOUNTER_GIRL 379 // MUS_SYOUJOEYE #define MUS_ENCOUNTER_MALE 380 // MUS_BOYEYE -#define MUS_ABANDONED_SHIP 381 // MUS_DAN02 -#define MUS_FORTREE 382 // MUS_MACHI_S3 +#define MUS_ABANDONED_SHIP 381 // MUS_DAN02 // Also used in Faraway and Southern Islands. +#define MUS_FORTREE 382 // MUS_MACHI_S3 // Also used in Secret Bases and the Safari Zone's entrance. #define MUS_BIRCH_LAB 383 // MUS_ODAMAKI -#define MUS_B_TOWER_RS 384 // MUS_B_TOWER +#define MUS_B_TOWER_RS 384 // MUS_B_TOWER // Used in Battle Tents, Trainer Hill and Battle Frontier's lounges and Exchange Service Corner. #define MUS_ENCOUNTER_SWIMMER 385 // MUS_SWIMEYE -#define MUS_CAVE_OF_ORIGIN 386 // MUS_DAN03 +#define MUS_CAVE_OF_ORIGIN 386 // MUS_DAN03 // Also used in Meteor Falls. #define MUS_OBTAIN_BERRY 387 // MUS_ME_KINOMI #define MUS_AWAKEN_LEGEND 388 // MUS_ME_TAMA -#define MUS_SLOTS_JACKPOT 389 // MUS_ME_B_BIG -#define MUS_SLOTS_WIN 390 // MUS_ME_B_SMALL +#define MUS_SLOTS_JACKPOT 389 // MUS_ME_B_BIG // Also used in the Roulette. +#define MUS_SLOTS_WIN 390 // MUS_ME_B_SMALL // Also used in the Roulette. #define MUS_TOO_BAD 391 // MUS_ME_ZANNEN #define MUS_ROULETTE 392 // MUS_BD_TIME #define MUS_LINK_CONTEST_P1 393 // MUS_TEST1 @@ -329,17 +329,17 @@ #define MUS_LINK_CONTEST_P4 396 // MUS_TEST4 #define MUS_ENCOUNTER_RICH 397 // MUS_TEST #define MUS_VERDANTURF 398 // MUS_GOMACHI0 -#define MUS_RUSTBORO 399 // MUS_GOTOWN -#define MUS_POKE_CENTER 400 // MUS_POKECEN -#define MUS_ROUTE104 401 // MUS_NEXTROAD -#define MUS_ROUTE119 402 // MUS_GRANROAD +#define MUS_RUSTBORO 399 // MUS_GOTOWN // Also used in Mauville City, Mossdeep City, Daycare, Weather Institute and several Route houses. +#define MUS_POKE_CENTER 400 // MUS_POKECEN // Also used in the Pokémon League's lobby. +#define MUS_ROUTE104 401 // MUS_NEXTROAD // Also used in Routes 105, 106, 107, 108, 109, 115 and 116. +#define MUS_ROUTE119 402 // MUS_GRANROAD // Also used in Routes 129, 130, 131, 132, 133, 134 and 118's east half. #define MUS_CYCLING 403 // MUS_CYCLING -#define MUS_POKE_MART 404 // MUS_FRIENDLY +#define MUS_POKE_MART 404 // MUS_FRIENDLY // Also used in Lilycove's Department Store. #define MUS_LITTLEROOT 405 // MUS_MISHIRO -#define MUS_MT_CHIMNEY 406 // MUS_TOZAN +#define MUS_MT_CHIMNEY 406 // MUS_TOZAN // Also used in Desert Underpass, Mirage Tower, Seafloor Cavern and Sky Pillar. #define MUS_ENCOUNTER_FEMALE 407 // MUS_GIRLEYE -#define MUS_LILYCOVE 408 // MUS_MINAMO -#define MUS_ROUTE111 409 // MUS_ASHROAD +#define MUS_LILYCOVE 408 // MUS_MINAMO // Also used in Pacifidlog Town and the Diving Treasure Hunter's house. +#define MUS_DESERT 409 // MUS_ASHROAD #define MUS_HELP 410 // MUS_EVENT0 #define MUS_UNDERWATER 411 // MUS_DEEPDEEP #define MUS_VICTORY_TRAINER 412 // MUS_KACHI1 @@ -352,29 +352,29 @@ #define MUS_ENCOUNTER_AQUA 419 // MUS_AQA_0 #define MUS_FOLLOW_ME 420 // MUS_TSURETEK #define MUS_ENCOUNTER_BRENDAN 421 // MUS_BOY_SUP -#define MUS_EVER_GRANDE 422 // MUS_RAINBOW +#define MUS_EVER_GRANDE 422 // MUS_RAINBOW // Also used in link rooms. #define MUS_ENCOUNTER_SUSPICIOUS 423 // MUS_AYASII #define MUS_VICTORY_AQUA_MAGMA 424 // MUS_KACHI4 #define MUS_CABLE_CAR 425 // MUS_ROPEWAY #define MUS_GAME_CORNER 426 // MUS_CASINO -#define MUS_DEWFORD 427 // MUS_HIGHTOWN +#define MUS_DEWFORD 427 // MUS_HIGHTOWN // Also used in Route 109's Seashore house. #define MUS_SAFARI_ZONE 428 // MUS_SAFARI -#define MUS_VICTORY_ROAD 429 // MUS_C_ROAD +#define MUS_VICTORY_ROAD 429 // MUS_C_ROAD // Also used in Pokémon League's E4/Champion rooms and halls. #define MUS_AQUA_MAGMA_HIDEOUT 430 // MUS_AJITO #define MUS_SAILING 431 // MUS_M_BOAT -#define MUS_MT_PYRE 432 // MUS_M_DUNGON -#define MUS_SLATEPORT 433 // MUS_FINECITY +#define MUS_MT_PYRE 432 // MUS_M_DUNGON // Also used in New Mauville and Shoal Cave. +#define MUS_SLATEPORT 433 // MUS_FINECITY // Also used in Cycling Road's entrances. #define MUS_MT_PYRE_EXTERIOR 434 // MUS_MACHUPI #define MUS_SCHOOL 435 // MUS_P_SCHOOL #define MUS_HALL_OF_FAME 436 // MUS_DENDOU -#define MUS_FALLARBOR 437 // MUS_TONEKUSA -#define MUS_SEALED_CHAMBER 438 // MUS_MABOROSI +#define MUS_FALLARBOR 437 // MUS_TONEKUSA // Also used in Route 114's houses. +#define MUS_SEALED_CHAMBER 438 // MUS_MABOROSI // Also used in Ancient Tomb, Desert Ruins and Island Cave. #define MUS_CONTEST_WINNER 439 // MUS_CON_FAN #define MUS_CONTEST 440 // MUS_CONTEST0 #define MUS_ENCOUNTER_MAGMA 441 // MUS_MGM0 #define MUS_INTRO_BATTLE 442 // MUS_T_BATTLE -#define MUS_ABNORMAL_WEATHER 443 // MUS_OOAME (Replaces MUS_WEATHER_KYOGRE from R/S) -#define MUS_WEATHER_GROUDON 444 // MUS_HIDERI (Unused, from R/S) +#define MUS_ABNORMAL_WEATHER 443 // MUS_OOAME // Replaces MUS_WEATHER_KYOGRE from R/S. +#define MUS_WEATHER_GROUDON 444 // MUS_HIDERI // Unused, from R/S. #define MUS_SOOTOPOLIS 445 // MUS_RUNECITY #define MUS_CONTEST_RESULTS 446 // MUS_CON_K #define MUS_HALL_OF_FAME_ROOM 447 // MUS_EIKOU_R @@ -383,7 +383,7 @@ #define MUS_ENCOUNTER_ELITE_FOUR 450 // MUS_SITENNOU #define MUS_ENCOUNTER_HIKER 451 // MUS_YAMA_EYE #define MUS_CONTEST_LOBBY 452 // MUS_CONLOBBY -#define MUS_ENCOUNTER_INTERVIEWER 453 // MUS_INTER_V +#define MUS_ENCOUNTER_INTERVIEWER 453 // MUS_INTER_V // Also used during Petalburg City report at the beginning of the game. #define MUS_ENCOUNTER_CHAMPION 454 // MUS_DAIGO #define MUS_CREDITS 455 // MUS_THANKFOR #define MUS_END 456 // MUS_END @@ -400,7 +400,7 @@ #define MUS_B_DOME 467 // MUS_B_DOME #define MUS_B_PIKE 468 // MUS_B_TUBE #define MUS_B_FACTORY 469 // MUS_B_FACTORY -#define MUS_VS_RAYQUAZA 470 // MUS_VS_REKKU (Identical to MUS_VS_KYOGRE_GROUDON) +#define MUS_VS_RAYQUAZA 470 // MUS_VS_REKKU // Identical to MUS_VS_KYOGRE_GROUDON. #define MUS_VS_FRONTIER_BRAIN 471 // MUS_VS_FRONT #define MUS_VS_MEW 472 // MUS_VS_MEW #define MUS_B_DOME_LOBBY 473 // MUS_B_DOME1 @@ -453,9 +453,9 @@ #define MUS_RG_SILPH 519 // MUS_RG_SHIRUHU #define MUS_RG_FUCHSIA 520 // MUS_RG_HANADA #define MUS_RG_CELADON 521 // MUS_RG_TAMAMUSI -#define MUS_RG_VICTORY_TRAINER 522 // MUS_RG_WIN_TRE (Identical to MUS_VICTORY_TRAINER) -#define MUS_RG_VICTORY_WILD 523 // MUS_RG_WIN_YASEI (Identical to MUS_VICTORY_WILD) -#define MUS_RG_VICTORY_GYM_LEADER 524 // MUS_RG_WIN_GYM (Identical to MUS_VICTORY_GYM_LEADER) +#define MUS_RG_VICTORY_TRAINER 522 // MUS_RG_WIN_TRE // Identical to MUS_VICTORY_TRAINER. +#define MUS_RG_VICTORY_WILD 523 // MUS_RG_WIN_YASEI // Identical to MUS_VICTORY_WILD. +#define MUS_RG_VICTORY_GYM_LEADER 524 // MUS_RG_WIN_GYM // Identical to MUS_VICTORY_GYM_LEADER. #define MUS_RG_VERMILLION 525 // MUS_RG_KUCHIBA #define MUS_RG_PEWTER 526 // MUS_RG_NIBI #define MUS_RG_ENCOUNTER_RIVAL 527 // MUS_RG_RIVAL1 @@ -474,11 +474,11 @@ #define MUS_RG_NET_CENTER 540 // MUS_RG_NETWORK #define MUS_RG_MYSTERY_GIFT 541 // MUS_RG_OKURIMONO #define MUS_RG_BERRY_PICK 542 // MUS_RG_KINOMIKUI -#define MUS_RG_SEVII_CAVE 543 // MUS_RG_NANADUNGEON (Identical to MUS_RG_MT_MOON) -#define MUS_RG_TEACHY_TV_SHOW 544 // MUS_RG_OSHIE_TV (Identical to MUS_RG_FOLLOW_ME) +#define MUS_RG_SEVII_CAVE 543 // MUS_RG_NANADUNGEON // Identical to MUS_RG_MT_MOON. +#define MUS_RG_TEACHY_TV_SHOW 544 // MUS_RG_OSHIE_TV // Identical to MUS_RG_FOLLOW_ME. #define MUS_RG_SEVII_ROUTE 545 // MUS_RG_NANASHIMA -#define MUS_RG_SEVII_DUNGEON 546 // MUS_RG_NANAISEKI (Identical to MUS_RG_VIRIDIAN_FOREST) -#define MUS_RG_SEVII_123 547 // MUS_RG_NANA123 (Identical to MUS_RG_PEWTER) +#define MUS_RG_SEVII_DUNGEON 546 // MUS_RG_NANAISEKI // Identical to MUS_RG_VIRIDIAN_FOREST. +#define MUS_RG_SEVII_123 547 // MUS_RG_NANA123 // Identical to MUS_RG_PEWTER #define MUS_RG_SEVII_45 548 // MUS_RG_NANA45 #define MUS_RG_SEVII_67 549 // MUS_RG_NANA67 #define MUS_RG_POKE_FLUTE 550 // MUS_RG_POKEFUE diff --git a/include/constants/species.h b/include/constants/species.h index 5a46e856fb..ae36497e71 100644 --- a/include/constants/species.h +++ b/include/constants/species.h @@ -1368,8 +1368,11 @@ #define SPECIES_CALYREX_ICE_RIDER FORMS_START + 327 #define SPECIES_CALYREX_SHADOW_RIDER FORMS_START + 328 +// Basculegion +#define SPECIES_BASCULEGION_FEMALE FORMS_START + 329 + #define FORMS_START SPECIES_ENAMORUS -#define SPECIES_EGG SPECIES_CALYREX_SHADOW_RIDER + 1 +#define SPECIES_EGG SPECIES_BASCULEGION_FEMALE + 1 #define NUM_SPECIES SPECIES_EGG diff --git a/include/constants/trade.h b/include/constants/trade.h index e8afc2a77f..e387d13cd8 100644 --- a/include/constants/trade.h +++ b/include/constants/trade.h @@ -4,29 +4,19 @@ #define TRADE_PLAYER 0 #define TRADE_PARTNER 1 -#define LINK_TRADE_TIMEOUT 300 - // In-game Trade IDs #define INGAME_TRADE_SEEDOT 0 #define INGAME_TRADE_PLUSLE 1 #define INGAME_TRADE_HORSEA 2 #define INGAME_TRADE_MEOWTH 3 -// Flag IDs for sending link data -#define INITIATE_TRADE 1 -#define CANCEL_TRADE 2 -#define WANTS_TO_TRADE 1 -#define WANTS_TO_CANCEL 2 -#define READY_FINISH_TRADE 1 -#define FINISH_TRADE 2 - // Return values for CanTradeSelectedMon and CanSpinTradeMon -#define CAN_TRADE_MON 0 -#define CANT_TRADE_LAST_MON 1 -#define CANT_TRADE_NATIONAL 2 -#define CANT_TRADE_EGG_YET 3 -#define CANT_TRADE_INVALID_MON 4 -#define CANT_TRADE_EGG_YET2 5 +#define CAN_TRADE_MON 0 +#define CANT_TRADE_LAST_MON 1 +#define CANT_TRADE_NATIONAL 2 +#define CANT_TRADE_EGG_YET 3 +#define CANT_TRADE_INVALID_MON 4 +#define CANT_TRADE_PARTNER_EGG_YET 5 // Return values for CheckValidityOfTradeMons #define PLAYER_MON_INVALID 0 @@ -38,63 +28,6 @@ #define TRADE_PLAYER_NOT_READY 1 #define TRADE_PARTNER_NOT_READY 2 -// Indexes for sTradeActionTexts -#define TRADE_TEXT_CANCEL 0 -#define TRADE_TEXT_CHOOSE_MON 1 -#define TRADE_TEXT_SUMMARY 2 -#define TRADE_TEXT_TRADE 3 -#define TRADE_TEXT_CANCEL_TRADE 4 -#define TRADE_TEXT_JP_QUIT 5 - -// Checked to confirm DrawTradeMenuParty has reached final state -#define DRAW_PARTY_FINISH 5 - -// Message indexes for sTradeMessages -#define TRADE_MSG_STANDBY 0 -#define TRADE_MSG_CANCELED 1 -#define TRADE_MSG_ONLY_MON1 2 -#define TRADE_MSG_ONLY_MON2 3 -#define TRADE_MSG_WAITING_FOR_FRIEND 4 -#define TRADE_MSG_FRIEND_WANTS_TO_TRADE 5 -#define TRADE_MSG_MON_CANT_BE_TRADED 6 -#define TRADE_MSG_EGG_CANT_BE_TRADED 7 -#define TRADE_MSG_FRIENDS_MON_CANT_BE_TRADED 8 - -// IDs for QueueAction -#define QUEUE_SEND_DATA 0 -#define QUEUE_STANDBY 1 -#define QUEUE_ONLY_MON1 2 -#define QUEUE_ONLY_MON2 3 -#define QUEUE_UNUSED1 4 -#define QUEUE_UNUSED2 5 -#define QUEUE_MON_CANT_BE_TRADED 6 -#define QUEUE_EGG_CANT_BE_TRADED 7 -#define QUEUE_FRIENDS_MON_CANT_BE_TRADED 8 - -#define QUEUE_DELAY_MSG 3 -#define QUEUE_DELAY_DATA 5 - -// IDs for CallTradeMenuFunc -#define TRADEMENUFUNC_MAIN_MENU 0 -#define TRADEMENUFUNC_SELECTED_MON 1 -#define TRADEMENUFUNC_SHOW_MON_SUMMARY 2 -#define TRADEMENUFUNC_CONFIRM_OR_CANCEL_TRADE 3 -#define TRADEMENUFUNC_CANCEL_TRADE_PROMPT 4 -#define TRADEMENUFUNC_UNUSED_5 5 -#define TRADEMENUFUNC_BOTH_MONS_SELECTED 6 -#define TRADEMENUFUNC_CONFIRM_TRADE_PROMPT 7 -#define TRADEMENUFUNC_REDRAW_MAIN_MENU 8 -#define TRADEMENUFUNC_LINK_TRADE_FADE_OUT 9 -#define TRADEMENUFUNC_LINK_TRADE_WAIT_FADE 10 -#define TRADEMENUFUNC_CANCEL_TRADE_1 11 -#define TRADEMENUFUNC_CANCEL_TRADE_2 12 -#define TRADEMENUFUNC_START_LINK_TRADE 13 -#define TRADEMENUFUNC_DELAY_TRADE_CONFIRM 14 -#define TRADEMENUFUNC_UNUSED_15 15 -#define TRADEMENUFUNC_LINK_TRADE_WAIT_QUEUE 16 -#define TRADEMENUFUNC_PARTNER_MON_INVALID 17 -#define TRADEMENUFUNC_STANDBY 100 - // Message indexes for sUnionRoomTradeMessages #define UR_TRADE_MSG_NONE 0 #define UR_TRADE_MSG_NOT_MON_PARTNER_WANTS 1 diff --git a/include/constants/trainers.h b/include/constants/trainers.h index 39ca2a2b86..25660ac073 100644 --- a/include/constants/trainers.h +++ b/include/constants/trainers.h @@ -374,7 +374,12 @@ // All trainer parties specify the IV, level, and species for each Pokémon in the // party. Some trainer parties also specify held items and custom moves for each // Pokémon. -#define F_TRAINER_PARTY_CUSTOM_MOVESET (1 << 0) -#define F_TRAINER_PARTY_HELD_ITEM (1 << 1) +#define F_TRAINER_PARTY_CUSTOM_MOVESET (1 << 0) +#define F_TRAINER_PARTY_HELD_ITEM (1 << 1) +#define F_TRAINER_PARTY_EVERYTHING_CUSTOMIZED (1 << 3) + +// Trainer party defines +#define TRAINER_MON_MALE 1 +#define TRAINER_MON_FEMALE 2 #endif // GUARD_TRAINERS_H diff --git a/include/data.h b/include/data.h index b018da3f3b..6e41ac703a 100644 --- a/include/data.h +++ b/include/data.h @@ -7,6 +7,13 @@ #define MAX_TRAINER_ITEMS 4 +#define TRAINER_PIC_WIDTH 64 +#define TRAINER_PIC_HEIGHT 64 +#define TRAINER_PIC_SIZE (TRAINER_PIC_WIDTH * TRAINER_PIC_HEIGHT / 2) + +// Red and Leaf's back pics have 5 frames, but this is presumably irrelevant in the places this is used. +#define MAX_TRAINER_PIC_FRAMES 4 + enum { BATTLER_AFFINE_NORMAL, BATTLER_AFFINE_EMERGE, @@ -24,6 +31,26 @@ struct MonCoords #define MON_COORDS_SIZE(width, height)(DIV_ROUND_UP(width, 8) << 4 | DIV_ROUND_UP(height, 8)) #define GET_MON_COORDS_WIDTH(size)((size >> 4) * 8) #define GET_MON_COORDS_HEIGHT(size)((size & 0xF) * 8) +#define TRAINER_PARTY_IVS(hp, atk, def, speed, spatk, spdef) (hp | (atk << 5) | (def << 10) | (speed << 15) | (spatk << 20) | (spdef << 25)) +#define TRAINER_PARTY_EVS(hp, atk, def, speed, spatk, spdef) ((const u8[6]){hp,atk,def,spatk,spdef,speed}) +#define TRAINER_PARTY_NATURE(nature) (nature+1) + +struct TrainerMonCustomized +{ + const u8 *nickname; + const u8 *ev; + u32 iv; + u16 moves[4]; + u16 species; + u16 heldItem; + u16 ability; + u8 lvl; + u8 ball; + u8 friendship; + u8 nature : 5; + bool8 gender : 2; + bool8 isShiny : 1; +}; struct TrainerMonNoItemDefaultMoves { @@ -61,6 +88,7 @@ struct TrainerMonItemCustomMoves #define NO_ITEM_CUSTOM_MOVES(party) { .NoItemCustomMoves = party }, .partySize = ARRAY_COUNT(party), .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET #define ITEM_DEFAULT_MOVES(party) { .ItemDefaultMoves = party }, .partySize = ARRAY_COUNT(party), .partyFlags = F_TRAINER_PARTY_HELD_ITEM #define ITEM_CUSTOM_MOVES(party) { .ItemCustomMoves = party }, .partySize = ARRAY_COUNT(party), .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM +#define EVERYTHING_CUSTOMIZED(party) { .EverythingCustomized = party}, .partySize = ARRAY_COUNT(party), .partyFlags = F_TRAINER_PARTY_EVERYTHING_CUSTOMIZED union TrainerMonPtr { @@ -68,20 +96,21 @@ union TrainerMonPtr const struct TrainerMonNoItemCustomMoves *NoItemCustomMoves; const struct TrainerMonItemDefaultMoves *ItemDefaultMoves; const struct TrainerMonItemCustomMoves *ItemCustomMoves; + const struct TrainerMonCustomized *EverythingCustomized; }; struct Trainer { - /*0x00*/ u8 partyFlags; - /*0x01*/ u8 trainerClass; - /*0x02*/ u8 encounterMusic_gender; // last bit is gender - /*0x03*/ u8 trainerPic; - /*0x04*/ u8 trainerName[TRAINER_NAME_LENGTH + 1]; - /*0x10*/ u16 items[MAX_TRAINER_ITEMS]; - /*0x18*/ bool8 doubleBattle; - /*0x1C*/ u32 aiFlags; - /*0x20*/ u8 partySize; - /*0x24*/ union TrainerMonPtr party; + /*0x00*/ u32 aiFlags; + /*0x04*/ union TrainerMonPtr party; + /*0x08*/ u16 items[MAX_TRAINER_ITEMS]; + /*0x10*/ u8 trainerClass; + /*0x11*/ u8 encounterMusic_gender; // last bit is gender + /*0x12*/ u8 trainerPic; + /*0x13*/ u8 trainerName[TRAINER_NAME_LENGTH + 1]; + /*0x1E*/ bool8 doubleBattle:1; + u8 partyFlags:7; + /*0x1F*/ u8 partySize; }; #define TRAINER_ENCOUNTER_MUSIC(trainer)((gTrainers[trainer].encounterMusic_gender & 0x7F)) diff --git a/include/easy_chat.h b/include/easy_chat.h index d84af93fc8..2cec441d55 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -128,11 +128,11 @@ void InitializeEasyChatWordArray(u16 *words, u16 length); u8 *ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 columns, u16 rows); bool8 IsBardWordInvalid(u16 word); u16 GetRandomEasyChatWordFromGroup(u16 group); -u16 GetNewHipsterPhraseToTeach(void); +u16 UnlockRandomTrendySaying(void); u16 EasyChat_GetNumWordsInGroup(u8); u16 GetRandomEasyChatWordFromUnlockedGroup(u16); void DoEasyChatScreen(u8 type, u16 *words, MainCallback callback, u8 displayedPersonType); void InitQuestionnaireWords(void); -void UnlockAdditionalPhrase(u8 additionalPhraseId); +void UnlockTrendySaying(u8 wordIndex); #endif // GUARD_EASYCHAT_H diff --git a/include/field_control_avatar.h b/include/field_control_avatar.h index e02fcd5afe..b259eb53c1 100644 --- a/include/field_control_avatar.h +++ b/include/field_control_avatar.h @@ -32,7 +32,7 @@ bool8 TryDoDiveWarp(struct MapPosition *position, u16 b); int SetCableClubWarp(void); u8 TrySetDiveWarp(void); const u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatileBehavior, u8 direction); -u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position); +const u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position); void ClearPoisonStepCounter(void); #endif // GUARD_FIELDCONTROLAVATAR_H diff --git a/include/fieldmap.h b/include/fieldmap.h index f2dbefae86..47072bd1be 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -48,8 +48,8 @@ void LoadSecondaryTilesetPalette(struct MapLayout const *mapLayout); void CopySecondaryTilesetToVramUsingHeap(struct MapLayout const *mapLayout); void CopyPrimaryTilesetToVram(const struct MapLayout *); void CopySecondaryTilesetToVram(const struct MapLayout *); -struct MapHeader const *const GetMapHeaderFromConnection(struct MapConnection *connection); -struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y); +const struct MapHeader *const GetMapHeaderFromConnection(const struct MapConnection *connection); +const struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y); void MapGridSetMetatileImpassabilityAt(int x, int y, bool32 impassable); // field_region_map.c diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 26e5c44bf1..7461929c3a 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -50,10 +50,10 @@ struct MapLayout { /*0x00*/ s32 width; /*0x04*/ s32 height; - /*0x08*/ u16 *border; - /*0x0C*/ u16 *map; - /*0x10*/ struct Tileset *primaryTileset; - /*0x14*/ struct Tileset *secondaryTileset; + /*0x08*/ const u16 *border; + /*0x0C*/ const u16 *map; + /*0x10*/ const struct Tileset *primaryTileset; + /*0x14*/ const struct Tileset *secondaryTileset; }; struct BackupMapLayout @@ -67,7 +67,7 @@ struct ObjectEventTemplate { /*0x00*/ u8 localId; /*0x01*/ u8 graphicsId; - /*0x02*/ u8 inConnection; // Leftover from FRLG + /*0x02*/ u8 kind; // Always OBJ_KIND_NORMAL in Emerald. /*0x03*/ //u8 padding1; /*0x04*/ s16 x; /*0x06*/ s16 y; @@ -98,7 +98,7 @@ struct CoordEvent u8 elevation; u16 trigger; u16 index; - u8 *script; + const u8 *script; }; struct BgEvent @@ -107,7 +107,7 @@ struct BgEvent u8 elevation; u8 kind; // The "kind" field determines how to access bgUnion union below. union { - u8 *script; + const u8 *script; struct { u16 item; u16 hiddenItemId; @@ -122,10 +122,10 @@ struct MapEvents u8 warpCount; u8 coordEventCount; u8 bgEventCount; - struct ObjectEventTemplate *objectEvents; - struct WarpEvent *warps; - struct CoordEvent *coordEvents; - struct BgEvent *bgEvents; + const struct ObjectEventTemplate *objectEvents; + const struct WarpEvent *warps; + const struct CoordEvent *coordEvents; + const struct BgEvent *bgEvents; }; struct MapConnection @@ -139,7 +139,7 @@ struct MapConnection struct MapConnections { s32 count; - struct MapConnection *connections; + const struct MapConnection *connections; }; struct MapHeader diff --git a/include/global.h b/include/global.h index 7324335d2e..c20f2ed427 100644 --- a/include/global.h +++ b/include/global.h @@ -27,8 +27,8 @@ /// IDE support #if defined(__APPLE__) || defined(__CYGWIN__) || defined(__INTELLISENSE__) // We define these when using certain IDEs to fool preproc -#define _(x) (x) -#define __(x) (x) +#define _(x) {x} +#define __(x) {x} #define INCBIN(...) {0} #define INCBIN_U8 INCBIN #define INCBIN_U16 INCBIN @@ -137,7 +137,7 @@ #define NUM_DEX_FLAG_BYTES ROUND_BITS_TO_BYTES(POKEMON_SLOTS_NUMBER) #define NUM_FLAG_BYTES ROUND_BITS_TO_BYTES(FLAGS_COUNT) -#define NUM_ADDITIONAL_PHRASE_BYTES ROUND_BITS_TO_BYTES(NUM_ADDITIONAL_PHRASES) +#define NUM_TRENDY_SAYING_BYTES ROUND_BITS_TO_BYTES(NUM_TRENDY_SAYINGS) // Calls m0/m1/.../m8 depending on how many arguments are passed. #define VARARG_8(m, ...) CAT(m, NARG_8(__VA_ARGS__))(__VA_ARGS__) @@ -147,6 +147,9 @@ #define CAT(a, b) CAT_(a, b) #define CAT_(a, b) a ## b +// Converts a string to a compound literal, essentially making it a pointer to const u8 +#define COMPOUND_STRING(str) (const u8[]) _(str) + // This produces an error at compile-time if expr is zero. // It looks like file.c:line: size of array `id' is negative #define STATIC_ASSERT(expr, id) typedef char id[(expr) ? 1 : -1]; @@ -684,7 +687,7 @@ struct MauvilleManGiddy struct MauvilleManHipster { u8 id; - bool8 alreadySpoken; + bool8 taughtWord; u8 language; }; @@ -1042,7 +1045,7 @@ struct SaveBlock1 /*0x2BC8*/ u16 easyChatBattleWon[EASY_CHAT_BATTLE_WORDS_COUNT]; /*0x2BD4*/ u16 easyChatBattleLost[EASY_CHAT_BATTLE_WORDS_COUNT]; /*0x2BE0*/ struct Mail mail[MAIL_COUNT]; - /*0x2E20*/ u8 additionalPhrases[NUM_ADDITIONAL_PHRASE_BYTES]; // bitfield for 33 additional phrases in easy chat system + /*0x2E20*/ u8 unlockedTrendySayings[NUM_TRENDY_SAYING_BYTES]; // Bitfield for unlockable Easy Chat words in EC_GROUP_TRENDY_SAYING /*0x2E25*/ //u8 padding5[3]; /*0x2E28*/ OldMan oldMan; /*0x2e64*/ struct DewfordTrend dewfordTrends[SAVED_TRENDS_COUNT]; diff --git a/include/graphics.h b/include/graphics.h index 55174442c5..76f6e5d7cf 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -867,9 +867,9 @@ extern const u32 gMonFrontPic_Mimikyu[]; extern const u32 gMonFrontPic_Bruxish[]; extern const u32 gMonFrontPic_Drampa[]; extern const u32 gMonFrontPic_Dhelmise[]; -extern const u32 gMonFrontPic_Jangmoo[]; -extern const u32 gMonFrontPic_Hakamoo[]; -extern const u32 gMonFrontPic_Kommoo[]; +extern const u32 gMonFrontPic_JangmoO[]; +extern const u32 gMonFrontPic_HakamoO[]; +extern const u32 gMonFrontPic_KommoO[]; extern const u32 gMonFrontPic_TapuKoko[]; extern const u32 gMonFrontPic_TapuLele[]; extern const u32 gMonFrontPic_TapuBulu[]; @@ -986,14 +986,13 @@ extern const u32 gMonFrontPic_Regidrago[]; extern const u32 gMonFrontPic_Glastrier[]; extern const u32 gMonFrontPic_Spectrier[]; extern const u32 gMonFrontPic_Calyrex[]; -//extern const u32 gMonFrontPic_Wyrdeer[]; +extern const u32 gMonFrontPic_Wyrdeer[]; extern const u32 gMonFrontPic_Kleavor[]; extern const u32 gMonFrontPic_Ursaluna[]; -//extern const u32 gMonFrontPic_Basculegion[]; -//extern const u32 gMonFrontPic_BasculegionF[]; -//extern const u32 gMonFrontPic_Sneasler[]; +extern const u32 gMonFrontPic_Basculegion[]; +extern const u32 gMonFrontPic_Sneasler[]; extern const u32 gMonFrontPic_Overqwil[]; -//extern const u32 gMonFrontPic_Enamorus[]; +extern const u32 gMonFrontPic_Enamorus[]; #endif extern const u32 gMonFrontPic_VenusaurMega[]; extern const u32 gMonFrontPic_CharizardMegaX[]; @@ -1098,7 +1097,7 @@ extern const u32 gMonFrontPic_TyphlosionHisuian[]; extern const u32 gMonFrontPic_QwilfishHisuian[]; extern const u32 gMonFrontPic_SneaselHisuian[]; #if P_GEN_5_POKEMON == TRUE -//extern const u32 gMonFrontPic_SamurottHisuian[]; +extern const u32 gMonFrontPic_SamurottHisuian[]; extern const u32 gMonFrontPic_LilligantHisuian[]; extern const u32 gMonFrontPic_ZoruaHisuian[]; extern const u32 gMonFrontPic_ZoroarkHisuian[]; @@ -1110,7 +1109,7 @@ extern const u32 gMonFrontPic_GoodraHisuian[]; extern const u32 gMonFrontPic_AvaluggHisuian[]; #endif #if P_GEN_7_POKEMON == TRUE -//extern const u32 gMonFrontPic_DecidueyeHisuian[]; +extern const u32 gMonFrontPic_DecidueyeHisuian[]; #endif extern const u32 gMonFrontPic_PikachuCosplay[]; extern const u32 gMonFrontPic_PikachuRockStar[]; @@ -1276,7 +1275,8 @@ extern const u32 gMonFrontPic_UrshifuRapidStrikeStyle[]; extern const u32 gMonFrontPic_ZarudeDada[]; extern const u32 gMonFrontPic_CalyrexIceRider[]; extern const u32 gMonFrontPic_CalyrexShadowRider[]; -//extern const u32 gMonFrontPic_EnamorusTherian[]; +extern const u32 gMonFrontPic_EnamorusTherian[]; +extern const u32 gMonFrontPic_BasculegionFemale[]; #endif extern const u32 gMonFrontPic_Egg[]; @@ -2081,9 +2081,9 @@ extern const u32 gMonBackPic_Mimikyu[]; extern const u32 gMonBackPic_Bruxish[]; extern const u32 gMonBackPic_Drampa[]; extern const u32 gMonBackPic_Dhelmise[]; -extern const u32 gMonBackPic_Jangmoo[]; -extern const u32 gMonBackPic_Hakamoo[]; -extern const u32 gMonBackPic_Kommoo[]; +extern const u32 gMonBackPic_JangmoO[]; +extern const u32 gMonBackPic_HakamoO[]; +extern const u32 gMonBackPic_KommoO[]; extern const u32 gMonBackPic_TapuKoko[]; extern const u32 gMonBackPic_TapuLele[]; extern const u32 gMonBackPic_TapuBulu[]; @@ -2200,14 +2200,13 @@ extern const u32 gMonBackPic_Regidrago[]; extern const u32 gMonBackPic_Glastrier[]; extern const u32 gMonBackPic_Spectrier[]; extern const u32 gMonBackPic_Calyrex[]; -//extern const u32 gMonBackPic_Wyrdeer[]; +extern const u32 gMonBackPic_Wyrdeer[]; extern const u32 gMonBackPic_Kleavor[]; extern const u32 gMonBackPic_Ursaluna[]; -//extern const u32 gMonBackPic_Basculegion[]; -//extern const u32 gMonBackPic_BasculegionF[]; -//extern const u32 gMonBackPic_Sneasler[]; +extern const u32 gMonBackPic_Basculegion[]; +extern const u32 gMonBackPic_Sneasler[]; extern const u32 gMonBackPic_Overqwil[]; -//extern const u32 gMonBackPic_Enamorus[]; +extern const u32 gMonBackPic_Enamorus[]; #endif extern const u32 gMonBackPic_VenusaurMega[]; extern const u32 gMonBackPic_CharizardMegaX[]; @@ -2312,7 +2311,7 @@ extern const u32 gMonBackPic_TyphlosionHisuian[]; extern const u32 gMonBackPic_QwilfishHisuian[]; extern const u32 gMonBackPic_SneaselHisuian[]; #if P_GEN_5_POKEMON == TRUE -//extern const u32 gMonBackPic_SamurottHisuian[]; +extern const u32 gMonBackPic_SamurottHisuian[]; extern const u32 gMonBackPic_LilligantHisuian[]; extern const u32 gMonBackPic_ZoruaHisuian[]; extern const u32 gMonBackPic_ZoroarkHisuian[]; @@ -2324,7 +2323,7 @@ extern const u32 gMonBackPic_GoodraHisuian[]; extern const u32 gMonBackPic_AvaluggHisuian[]; #endif #if P_GEN_7_POKEMON == TRUE -//extern const u32 gMonBackPic_DecidueyeHisuian[]; +extern const u32 gMonBackPic_DecidueyeHisuian[]; #endif extern const u32 gMonBackPic_PikachuCosplay[]; extern const u32 gMonBackPic_PikachuRockStar[]; @@ -2488,7 +2487,8 @@ extern const u32 gMonBackPic_UrshifuRapidStrikeStyle[]; extern const u32 gMonBackPic_ZarudeDada[]; extern const u32 gMonBackPic_CalyrexIceRider[]; extern const u32 gMonBackPic_CalyrexShadowRider[]; -//extern const u32 gMonBackPic_EnamorusTherian[]; +extern const u32 gMonBackPic_EnamorusTherian[]; +extern const u32 gMonBackPic_BasculegionFemale[]; #endif extern const u32 gMonPalette_CircledQuestionMark[]; @@ -3287,9 +3287,9 @@ extern const u32 gMonPalette_Mimikyu[]; extern const u32 gMonPalette_Bruxish[]; extern const u32 gMonPalette_Drampa[]; extern const u32 gMonPalette_Dhelmise[]; -extern const u32 gMonPalette_Jangmoo[]; -extern const u32 gMonPalette_Hakamoo[]; -extern const u32 gMonPalette_Kommoo[]; +extern const u32 gMonPalette_JangmoO[]; +extern const u32 gMonPalette_HakamoO[]; +extern const u32 gMonPalette_KommoO[]; extern const u32 gMonPalette_TapuKoko[]; extern const u32 gMonPalette_TapuLele[]; extern const u32 gMonPalette_TapuBulu[]; @@ -3406,14 +3406,13 @@ extern const u32 gMonPalette_Regidrago[]; extern const u32 gMonPalette_Glastrier[]; extern const u32 gMonPalette_Spectrier[]; extern const u32 gMonPalette_Calyrex[]; -//extern const u32 gMonPalette_Wyrdeer[]; +extern const u32 gMonPalette_Wyrdeer[]; extern const u32 gMonPalette_Kleavor[]; extern const u32 gMonPalette_Ursaluna[]; -//extern const u32 gMonPalette_Basculegion[]; -//extern const u32 gMonPalette_BasculegionF[]; -//extern const u32 gMonPalette_Sneasler[]; +extern const u32 gMonPalette_Basculegion[]; +extern const u32 gMonPalette_Sneasler[]; extern const u32 gMonPalette_Overqwil[]; -//extern const u32 gMonPalette_Enamorus[]; +extern const u32 gMonPalette_Enamorus[]; #endif extern const u32 gMonPalette_VenusaurMega[]; extern const u32 gMonPalette_CharizardMegaX[]; @@ -3518,7 +3517,7 @@ extern const u32 gMonPalette_TyphlosionHisuian[]; extern const u32 gMonPalette_QwilfishHisuian[]; extern const u32 gMonPalette_SneaselHisuian[]; #if P_GEN_5_POKEMON == TRUE -//extern const u32 gMonPalette_SamurottHisuian[]; +extern const u32 gMonPalette_SamurottHisuian[]; extern const u32 gMonPalette_LilligantHisuian[]; extern const u32 gMonPalette_ZoruaHisuian[]; extern const u32 gMonPalette_ZoroarkHisuian[]; @@ -3530,7 +3529,7 @@ extern const u32 gMonPalette_GoodraHisuian[]; extern const u32 gMonPalette_AvaluggHisuian[]; #endif #if P_GEN_7_POKEMON == TRUE -//extern const u32 gMonPalette_DecidueyeHisuian[]; +extern const u32 gMonPalette_DecidueyeHisuian[]; #endif extern const u32 gMonPalette_PikachuCosplay[]; extern const u32 gMonPalette_PikachuRockStar[]; @@ -3720,7 +3719,8 @@ extern const u32 gMonPalette_UrshifuRapidStrikeStyle[]; extern const u32 gMonPalette_ZarudeDada[]; extern const u32 gMonPalette_CalyrexIceRider[]; extern const u32 gMonPalette_CalyrexShadowRider[]; -//extern const u32 gMonPalette_EnamorusTherian[]; +extern const u32 gMonPalette_EnamorusTherian[]; +extern const u32 gMonPalette_BasculegionFemale[]; #endif extern const u32 gMonPalette_Egg[]; @@ -4520,9 +4520,9 @@ extern const u32 gMonShinyPalette_Mimikyu[]; extern const u32 gMonShinyPalette_Bruxish[]; extern const u32 gMonShinyPalette_Drampa[]; extern const u32 gMonShinyPalette_Dhelmise[]; -extern const u32 gMonShinyPalette_Jangmoo[]; -extern const u32 gMonShinyPalette_Hakamoo[]; -extern const u32 gMonShinyPalette_Kommoo[]; +extern const u32 gMonShinyPalette_JangmoO[]; +extern const u32 gMonShinyPalette_HakamoO[]; +extern const u32 gMonShinyPalette_KommoO[]; extern const u32 gMonShinyPalette_TapuKoko[]; extern const u32 gMonShinyPalette_TapuLele[]; extern const u32 gMonShinyPalette_TapuBulu[]; @@ -4639,14 +4639,13 @@ extern const u32 gMonShinyPalette_Regidrago[]; extern const u32 gMonShinyPalette_Glastrier[]; extern const u32 gMonShinyPalette_Spectrier[]; extern const u32 gMonShinyPalette_Calyrex[]; -//extern const u32 gMonShinyPalette_Wyrdeer[]; +extern const u32 gMonShinyPalette_Wyrdeer[]; extern const u32 gMonShinyPalette_Kleavor[]; extern const u32 gMonShinyPalette_Ursaluna[]; -//extern const u32 gMonShinyPalette_Basculegion[]; -//extern const u32 gMonShinyPalette_BasculegionF[]; -//extern const u32 gMonShinyPalette_Sneasler[]; +extern const u32 gMonShinyPalette_Basculegion[]; +extern const u32 gMonShinyPalette_Sneasler[]; extern const u32 gMonShinyPalette_Overqwil[]; -//extern const u32 gMonShinyPalette_Enamorus[]; +extern const u32 gMonShinyPalette_Enamorus[]; #endif extern const u32 gMonShinyPalette_VenusaurMega[]; extern const u32 gMonShinyPalette_CharizardMegaX[]; @@ -4751,7 +4750,7 @@ extern const u32 gMonShinyPalette_TyphlosionHisuian[]; extern const u32 gMonShinyPalette_QwilfishHisuian[]; extern const u32 gMonShinyPalette_SneaselHisuian[]; #if P_GEN_5_POKEMON == TRUE -//extern const u32 gMonShinyPalette_SamurottHisuian[]; +extern const u32 gMonShinyPalette_SamurottHisuian[]; extern const u32 gMonShinyPalette_LilligantHisuian[]; extern const u32 gMonShinyPalette_ZoruaHisuian[]; extern const u32 gMonShinyPalette_ZoroarkHisuian[]; @@ -4763,7 +4762,7 @@ extern const u32 gMonShinyPalette_GoodraHisuian[]; extern const u32 gMonShinyPalette_AvaluggHisuian[]; #endif #if P_GEN_7_POKEMON == TRUE -//extern const u32 gMonShinyPalette_DecidueyeHisuian[]; +extern const u32 gMonShinyPalette_DecidueyeHisuian[]; #endif extern const u32 gMonShinyPalette_PikachuCosplay[]; extern const u32 gMonShinyPalette_PikachuRockStar[]; @@ -4947,7 +4946,8 @@ extern const u32 gMonShinyPalette_UrshifuRapidStrikeStyle[]; extern const u32 gMonShinyPalette_ZarudeDada[]; extern const u32 gMonShinyPalette_CalyrexIceRider[]; extern const u32 gMonShinyPalette_CalyrexShadowRider[]; -//extern const u32 gMonShinyPalette_EnamorusTherian[]; +extern const u32 gMonShinyPalette_EnamorusTherian[]; +extern const u32 gMonShinyPalette_BasculegionFemale[]; #endif extern const u8 gMonIcon_QuestionMark[]; @@ -5747,9 +5747,9 @@ extern const u8 gMonIcon_Mimikyu[]; extern const u8 gMonIcon_Bruxish[]; extern const u8 gMonIcon_Drampa[]; extern const u8 gMonIcon_Dhelmise[]; -extern const u8 gMonIcon_Jangmoo[]; -extern const u8 gMonIcon_Hakamoo[]; -extern const u8 gMonIcon_Kommoo[]; +extern const u8 gMonIcon_JangmoO[]; +extern const u8 gMonIcon_HakamoO[]; +extern const u8 gMonIcon_KommoO[]; extern const u8 gMonIcon_TapuKoko[]; extern const u8 gMonIcon_TapuLele[]; extern const u8 gMonIcon_TapuBulu[]; @@ -5870,7 +5870,6 @@ extern const u8 gMonIcon_Wyrdeer[]; extern const u8 gMonIcon_Kleavor[]; extern const u8 gMonIcon_Ursaluna[]; extern const u8 gMonIcon_Basculegion[]; -extern const u8 gMonIcon_BasculegionF[]; extern const u8 gMonIcon_Sneasler[]; extern const u8 gMonIcon_Overqwil[]; extern const u8 gMonIcon_Enamorus[]; @@ -6168,6 +6167,7 @@ extern const u8 gMonIcon_ZarudeDada[]; extern const u8 gMonIcon_CalyrexIceRider[]; extern const u8 gMonIcon_CalyrexShadowRider[]; extern const u8 gMonIcon_EnamorusTherian[]; +extern const u8 gMonIcon_BasculegionFemale[]; #endif extern const u8 gMonIcon_Egg[]; @@ -6960,9 +6960,9 @@ extern const u8 gMonFootprint_Mimikyu[]; extern const u8 gMonFootprint_Bruxish[]; extern const u8 gMonFootprint_Drampa[]; extern const u8 gMonFootprint_Dhelmise[]; -extern const u8 gMonFootprint_Jangmo_o[]; -extern const u8 gMonFootprint_Hakamo_o[]; -extern const u8 gMonFootprint_Kommo_o[]; +extern const u8 gMonFootprint_JangmoO[]; +extern const u8 gMonFootprint_HakamoO[]; +extern const u8 gMonFootprint_KommoO[]; extern const u8 gMonFootprint_Tapu_Koko[]; extern const u8 gMonFootprint_Tapu_Lele[]; extern const u8 gMonFootprint_Tapu_Bulu[]; @@ -7997,6 +7997,12 @@ extern const u32 gItemIcon_RibbonSweet[]; extern const u32 gItemIconPalette_RibbonSweet[]; extern const u32 gItemIcon_Everstone[]; extern const u32 gItemIconPalette_Everstone[]; +extern const u32 gItemIcon_BlackAugurite[]; +extern const u32 gItemIconPalette_BlackAugurite[]; +extern const u32 gItemIcon_LinkingCord[]; +extern const u32 gItemIconPalette_LinkingCord[]; +extern const u32 gItemIcon_PeatBlock[]; +extern const u32 gItemIconPalette_PeatBlock[]; // Nectars extern const u32 gItemIcon_RedNectar[]; extern const u32 gItemIconPalette_RedNectar[]; @@ -8834,6 +8840,45 @@ extern const u32 gItemIcon_Gem[]; extern const u32 gItemIconPalette_Ruby[]; extern const u32 gItemIconPalette_Sapphire[]; +// GEN IX ITEMS +extern const u32 gItemIcon_AbilityShield[]; +extern const u32 gItemIconPalette_AbilityShield[]; +extern const u32 gItemIcon_AuspiciousArmor[]; +extern const u32 gItemIconPalette_AuspiciousArmor[]; +extern const u32 gItemIcon_BigBambooShoot[]; +extern const u32 gItemIconPalette_BigBambooShoot[]; +extern const u32 gItemIcon_BoosterEnergy[]; +extern const u32 gItemIconPalette_BoosterEnergy[]; +extern const u32 gItemIcon_CovertCloak[]; +extern const u32 gItemIconPalette_CovertCloak[]; +extern const u32 gItemIcon_GimmighoulCoin[]; +extern const u32 gItemIconPalette_GimmighoulCoin[]; +extern const u32 gItemIcon_LeadersCrest[]; +extern const u32 gItemIconPalette_LeadersCrest[]; +extern const u32 gItemIcon_LoadedDice[]; +extern const u32 gItemIconPalette_LoadedDice[]; +extern const u32 gItemIcon_MaliciousArmor[]; +extern const u32 gItemIconPalette_MaliciousArmor[]; +extern const u32 gItemIcon_MirrorHerb[]; +extern const u32 gItemIconPalette_MirrorHerb[]; +extern const u32 gItemIcon_PunchingGlove[]; +extern const u32 gItemIconPalette_PunchingGlove[]; +extern const u32 gItemIcon_ScrollOfDarkness[]; +extern const u32 gItemIconPalette_ScrollOfDarkness[]; +extern const u32 gItemIcon_ScrollOfWaters[]; +extern const u32 gItemIconPalette_ScrollOfWaters[]; +extern const u32 gItemIcon_TeraOrb[]; +extern const u32 gItemIconPalette_TeraOrb[]; +extern const u32 gItemIcon_TinyBambooShoot[]; +extern const u32 gItemIconPalette_TinyBambooShoot[]; + +extern const u32 gItemIcon_AdamantCrystal[]; +extern const u32 gItemIconPalette_AdamantCrystal[]; +extern const u32 gItemIcon_GriseousCore[]; +extern const u32 gItemIconPalette_GriseousCore[]; +extern const u32 gItemIcon_LustrousGlobe[]; +extern const u32 gItemIconPalette_LustrousGlobe[]; + extern const u32 gItemIcon_ReturnToFieldArrow[]; extern const u32 gItemIconPalette_ReturnToFieldArrow[]; @@ -10359,10 +10404,10 @@ extern const u32 gUsePokeblockCondition_Gfx[]; extern const u16 gUnionRoomChat_Background_Pal[]; extern const u32 gUnionRoomChat_Background_Gfx[]; extern const u32 gUnionRoomChat_Background_Tilemap[]; -extern const u16 gUnionRoomChat_Window_Pal1[]; -extern const u16 gUnionRoomChat_Window_Pal2[]; -extern const u32 gUnionRoomChat_Border_Gfx[]; -extern const u32 gUnionRoomChat_Border_Tilemap[]; +extern const u16 gUnionRoomChat_InputText_Pal[]; +extern const u16 gUnionRoomChat_Keyboard_Pal[]; +extern const u32 gUnionRoomChat_Keyboard_Gfx[]; +extern const u32 gUnionRoomChat_Keyboard_Tilemap[]; extern const u32 gUnionRoomChat_RButtonLabels[]; // Use Pokeblock diff --git a/include/item.h b/include/item.h index cf2209e0e6..a99782f803 100644 --- a/include/item.h +++ b/include/item.h @@ -19,7 +19,6 @@ struct Item u8 type; ItemUseFunc fieldUseFunc; u8 battleUsage; - ItemUseFunc battleUseFunc; u8 secondaryId; u8 flingPower; }; @@ -72,8 +71,9 @@ u8 ItemId_GetPocket(u16 itemId); u8 ItemId_GetType(u16 itemId); ItemUseFunc ItemId_GetFieldFunc(u16 itemId); u8 ItemId_GetBattleUsage(u16 itemId); -ItemUseFunc ItemId_GetBattleFunc(u16 itemId); u8 ItemId_GetSecondaryId(u16 itemId); u8 ItemId_GetFlingPower(u16 itemId); +u32 GetItemStatus1Mask(u16 itemId); +u32 GetItemStatus2Mask(u16 itemId); #endif // GUARD_ITEM_H diff --git a/include/item_use.h b/include/item_use.h index 812e984ec8..afa87c6973 100644 --- a/include/item_use.h +++ b/include/item_use.h @@ -30,12 +30,9 @@ void ItemUseOutOfBattle_FormChange(u8); void ItemUseOutOfBattle_FormChange_ConsumedOnUse(u8); void ItemUseOutOfBattle_Honey(u8); void ItemUseOutOfBattle_CannotUse(u8); -void ItemUseInBattle_PokeBall(u8); -void ItemUseInBattle_StatIncrease(u8); -void ItemUseInBattle_Medicine(u8); -void ItemUseInBattle_PPRecovery(u8); -void ItemUseInBattle_Escape(u8); -void ItemUseInBattle_EnigmaBerry(u8); +void ItemUseInBattle_BagMenu(u8 taskId); +void ItemUseInBattle_PartyMenu(u8 taskId); +void ItemUseInBattle_PartyMenuChooseMove(u8 taskId); void Task_UseDigEscapeRopeOnField(u8 taskId); u8 CanUseDigOrEscapeRopeOnCurMap(void); u8 CheckIfItemIsTMHMOrEvolutionStone(u16 itemId); diff --git a/include/link_rfu.h b/include/link_rfu.h index cf4bb2ca76..f3ae61afba 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -83,7 +83,7 @@ struct RfuGameCompatibilityData u16 hasNews:1; u16 hasCard:1; u16 unknown:1; // Never read - u16 isChampion:1; + u16 canLinkNationally:1; u16 hasNationalDex:1; u16 gameClear:1; u16 version:4; diff --git a/include/menu_specialized.h b/include/menu_specialized.h index 10a2110464..06a188b8a0 100644 --- a/include/menu_specialized.h +++ b/include/menu_specialized.h @@ -15,6 +15,15 @@ enum { MAILBOXWIN_COUNT }; +// Window IDs for the move relearner +enum { + RELEARNERWIN_DESC_BATTLE, + RELEARNERWIN_DESC_CONTEST, + RELEARNERWIN_MOVE_LIST, + RELEARNERWIN_MSG, + RELEARNERWIN_YESNO, +}; + enum { TAG_CONDITION_MON = 100, TAG_CONDITION_BALL, @@ -117,11 +126,11 @@ void DestroyConditionSparkleSprites(struct Sprite **sprites); void FreeConditionSparkles(struct Sprite **sprites); // Move relearner -void MoveRelearnerPrintText(u8 *str); +void MoveRelearnerPrintMessage(u8 *str); bool16 MoveRelearnerRunTextPrinters(void); void MoveRelearnerCreateYesNoMenu(void); u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices); -void InitMoveRelearnerWindows(bool8 useContextWindow); +void InitMoveRelearnerWindows(bool8 useContestWindow); // Level up window void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bgClr, u8 fgClr, u8 shadowClr); diff --git a/include/mystery_gift_menu.h b/include/mystery_gift_menu.h index dc30d30519..665c4596e7 100644 --- a/include/mystery_gift_menu.h +++ b/include/mystery_gift_menu.h @@ -5,11 +5,11 @@ extern bool8 gGiftIsFromEReader; u16 GetMysteryGiftBaseBlock(void); void CB2_MysteryGiftEReader(void); -void PrintMysteryGiftOrEReaderTopMenu(bool8 isJapanese, bool32 usePickOkCancel); +void PrintMysteryGiftOrEReaderHeader(bool8 isJapanese, bool32 usePickOkCancel); void MG_DrawCheckerboardPattern(u32 bg); void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void); bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str); -void AddTextPrinterToWindow1(const u8 *src); +void MG_AddMessageTextPrinter(const u8 *src); void CB2_InitEReader(void); void CB2_InitMysteryGift(void); void MG_DrawTextBorder(u8 windowId); diff --git a/include/party_menu.h b/include/party_menu.h index afb320e18c..31e5910748 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -48,6 +48,8 @@ void LoadHeldItemIcons(void); void DrawHeldItemIconsForTrade(u8 *partyCounts, u8 *partySpriteIds, u8 whichParty); void LoadPartyMenuAilmentGfx(void); void CB2_ShowPartyMenuForItemUse(void); +void ItemUseCB_BattleScript(u8 taskId, TaskFunc task); +void ItemUseCB_BattleChooseMove(u8 taskId, TaskFunc task); void ItemUseCB_Medicine(u8 taskId, TaskFunc task); void ItemUseCB_AbilityCapsule(u8 taskId, TaskFunc task); void ItemUseCB_AbilityPatch(u8 taskId, TaskFunc task); @@ -64,6 +66,7 @@ void ItemUseCB_SacredAsh(u8 taskId, TaskFunc task); void ItemUseCB_EvolutionStone(u8 taskId, TaskFunc task); void ItemUseCB_FormChange(u8 taskId, TaskFunc task); void ItemUseCB_FormChange_ConsumedOnUse(u8 taskId, TaskFunc task); +const u8* GetItemEffect(u16 item); u8 GetItemEffectType(u16 item); void CB2_PartyMenuFromStartMenu(void); void CB2_ChooseMonToGiveItem(void); diff --git a/include/pokemon.h b/include/pokemon.h index 05b9d1ac9a..581677cae7 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -2,6 +2,7 @@ #define GUARD_POKEMON_H #include "sprite.h" +#include "constants/items.h" #include "constants/region_map_sections.h" #include "constants/map_groups.h" @@ -75,7 +76,7 @@ enum { MON_DATA_SPATK, MON_DATA_SPDEF, MON_DATA_MAIL, - MON_DATA_SPECIES2, + MON_DATA_SPECIES_OR_EGG, MON_DATA_IVS, MON_DATA_CHAMPION_RIBBON, MON_DATA_WINNING_RIBBON, @@ -90,7 +91,7 @@ enum { MON_DATA_EARTH_RIBBON, MON_DATA_WORLD_RIBBON, MON_DATA_UNUSED_RIBBONS, - MON_DATA_EVENT_LEGAL, + MON_DATA_MODERN_FATEFUL_ENCOUNTER, MON_DATA_KNOWN_MOVES, MON_DATA_RIBBON_COUNT, MON_DATA_RIBBONS, @@ -153,27 +154,34 @@ struct PokemonSubstruct3 /* 0x07 */ u32 isEgg:1; /* 0x07 */ u32 unused2:1; - /* 0x08 */ u32 coolRibbon:3; - /* 0x08 */ u32 beautyRibbon:3; - /* 0x08 */ u32 cuteRibbon:3; - /* 0x09 */ u32 smartRibbon:3; - /* 0x09 */ u32 toughRibbon:3; - /* 0x09 */ u32 championRibbon:1; - /* 0x0A */ u32 winningRibbon:1; - /* 0x0A */ u32 victoryRibbon:1; - /* 0x0A */ u32 artistRibbon:1; - /* 0x0A */ u32 effortRibbon:1; - /* 0x0A */ u32 marineRibbon:1; // never distributed - /* 0x0A */ u32 landRibbon:1; // never distributed - /* 0x0A */ u32 skyRibbon:1; // never distributed - /* 0x0A */ u32 countryRibbon:1; // distributed during Pokémon Festa '04 and '05 to tournament winners - /* 0x0B */ u32 nationalRibbon:1; - /* 0x0B */ u32 earthRibbon:1; - /* 0x0B */ u32 worldRibbon:1; // distributed during Pokémon Festa '04 and '05 to tournament winners - /* 0x0B */ u32 unusedRibbons:2; // discarded in Gen 4 + /* 0x08 */ u32 coolRibbon:3; // Stores the highest contest rank achieved in the Cool category. + /* 0x08 */ u32 beautyRibbon:3; // Stores the highest contest rank achieved in the Beauty category. + /* 0x08 */ u32 cuteRibbon:3; // Stores the highest contest rank achieved in the Cute category. + /* 0x09 */ u32 smartRibbon:3; // Stores the highest contest rank achieved in the Smart category. + /* 0x09 */ u32 toughRibbon:3; // Stores the highest contest rank achieved in the Tough category. + /* 0x09 */ u32 championRibbon:1; // Given when defeating the Champion. Because both RSE and FRLG use it, later generations don't specify from which region it comes from. + /* 0x0A */ u32 winningRibbon:1; // Given at the Battle Tower's Level 50 challenge by winning a set of seven battles that extends the current streak to 56 or more. + /* 0x0A */ u32 victoryRibbon:1; // Given at the Battle Tower's Level 100 challenge by winning a set of seven battles that extends the current streak to 56 or more. + /* 0x0A */ u32 artistRibbon:1; // Given at the Contest Hall by winning a Master Rank contest with at least 800 points, and agreeing to have the Pokémon's portrait placed in the museum after being offered. + /* 0x0A */ u32 effortRibbon:1; // Given at Slateport's market to Pokémon with maximum EVs. + /* 0x0A */ u32 marineRibbon:1; // Never distributed. + /* 0x0A */ u32 landRibbon:1; // Never distributed. + /* 0x0A */ u32 skyRibbon:1; // Never distributed. + /* 0x0A */ u32 countryRibbon:1; // Distributed during Pokémon Festa '04 and '05 to tournament winners. + /* 0x0B */ u32 nationalRibbon:1; // Given to purified Shadow Pokémon in Colosseum/XD. + /* 0x0B */ u32 earthRibbon:1; // Given to teams that have beaten Mt. Battle's 100-battle challenge in Colosseum/XD. + /* 0x0B */ u32 worldRibbon:1; // Distributed during Pokémon Festa '04 and '05 to tournament winners. + /* 0x0B */ u32 unusedRibbons:2; // Discarded in Gen 4. /* 0x0B */ u32 abilityNum:2; - /* 0x0B */ u32 eventLegal:1; // controls Mew & Deoxys obedience; if set, Pokémon is a fateful encounter in Gen 4+; set for in-game event island legendaries, some distributed events, and Pokémon from XD: Gale of Darkness. -}; /* size = 12 */ + + // The functionality of this bit changed in FRLG: + // In RS, this bit does nothing, is never set, & is accidentally unset when hatching Eggs. + // In FRLG & Emerald, this controls Mew & Deoxys obedience and whether they can be traded. + // If set, a Pokémon is a fateful encounter in FRLG's summary screen if hatched & for all Pokémon in Gen 4+ summary screens. + // Set for in-game event island legendaries, events distributed after a certain date, & Pokémon from XD: Gale of Darkness. + // Not to be confused with METLOC_FATEFUL_ENCOUNTER. + /* 0x0B */ u32 modernFatefulEncounter:1; +}; // Number of bytes in the largest Pokémon substruct. // They are assumed to be the same size, and will be padded to @@ -339,7 +347,6 @@ struct BattleMove u32 flags; u8 split; u8 argument; - u8 zMovePower; u8 zMoveEffect; }; @@ -395,7 +402,7 @@ extern const struct BattleMove gBattleMoves[]; extern const u8 gFacilityClassToPicIndex[]; extern const u8 gFacilityClassToTrainerClass[]; extern const struct SpeciesInfo gSpeciesInfo[]; -extern const u8 *const gItemEffectTable[]; +extern const u8 *const gItemEffectTable[ITEMS_COUNT]; extern const u32 gExperienceTables[][MAX_LEVEL + 1]; extern const struct LevelUpMove *const gLevelUpLearnsets[]; extern const u16 *const gTeachableLearnsets[]; @@ -426,11 +433,10 @@ void CreateBattleTowerMon_HandleLevel(struct Pokemon *mon, struct BattleTowerPok void CreateApprenticeMon(struct Pokemon *mon, const struct Apprentice *src, u8 monId); void CreateMonWithEVSpreadNatureOTID(struct Pokemon *mon, u16 species, u8 level, u8 nature, u8 fixedIV, u8 evSpread, u32 otId); void ConvertPokemonToBattleTowerPokemon(struct Pokemon *mon, struct BattleTowerPokemon *dest); -void CreateEventLegalMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId); bool8 ShouldIgnoreDeoxysForm(u8 caseId, u8 battlerId); u16 GetUnionRoomTrainerPic(void); u16 GetUnionRoomTrainerClass(void); -void CreateEventLegalEnemyMon(void); +void CreateEnemyEventMon(void); void CalculateMonStats(struct Pokemon *mon); void BoxMonToMon(const struct BoxPokemon *src, struct Pokemon *dest); u8 GetLevelFromMonExp(struct Pokemon *mon); diff --git a/include/random.h b/include/random.h index 6bf61de6c6..e7c2a3e284 100644 --- a/include/random.h +++ b/include/random.h @@ -20,4 +20,94 @@ u16 Random2(void); void SeedRng(u16 seed); void SeedRng2(u16 seed); +/* Structured random number generator. + * Instead of the caller converting bits from Random() to a meaningful + * value, the caller provides metadata that is used to return the + * meaningful value directly. This allows code to interpret the random + * call, for example, battle tests know what the domain of a random call + * is, and can exhaustively test it. + * + * RandomTag identifies the purpose of the value. + * + * RandomUniform(tag, lo, hi) returns a number from lo to hi inclusive + * with uniform probability. + * + * 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). + * + * RandomPercentage(tag, t) returns FALSE with probability (1-t)/100, + * and TRUE with probability t/100. + * + * RandomWeighted(tag, w0, w1, ... wN) returns a number from 0 to N + * inclusive. The return value is proportional to the weights, e.g. + * RandomWeighted(..., 1, 1) returns 50% 0s and 50% 1s. + * RandomWeighted(..., 2, 1) returns 2/3 0s and 1/3 1s. */ + +enum RandomTag +{ + RNG_NONE, + RNG_ACCURACY, + RNG_CONFUSION, + RNG_CRITICAL_HIT, + RNG_CUTE_CHARM, + RNG_DAMAGE_MODIFIER, + RNG_DIRE_CLAW, + RNG_FLAME_BODY, + RNG_FORCE_RANDOM_SWITCH, + RNG_FROZEN, + RNG_HOLD_EFFECT_FLINCH, + RNG_INFATUATION, + RNG_PARALYSIS, + RNG_POISON_POINT, + RNG_RAMPAGE_TURNS, + RNG_SECONDARY_EFFECT, + RNG_SLEEP_TURNS, + RNG_SPEED_TIE, + RNG_STATIC, + RNG_STENCH, + RNG_TRI_ATTACK, +}; + +#define RandomWeighted(tag, ...) \ + ({ \ + const u8 weights[] = { __VA_ARGS__ }; \ + u32 sum, i; \ + for (i = 0, sum = 0; i < ARRAY_COUNT(weights); i++) \ + sum += weights[i]; \ + RandomWeightedArray(tag, sum, ARRAY_COUNT(weights), weights); \ + }) + +#define RandomPercentage(tag, t) \ + ({ \ + u32 r; \ + if (t <= 0) \ + { \ + r = FALSE; \ + } \ + else if (t >= 100) \ + { \ + r = TRUE; \ + } \ + else \ + { \ + const u8 weights[] = { 100 - t, t }; \ + r = RandomWeightedArray(tag, 100, ARRAY_COUNT(weights), weights); \ + } \ + r; \ + }) + +#define RandomElement(tag, array) \ + ({ \ + *(typeof((array)[0]) *)RandomElementArray(tag, array, sizeof((array)[0]), ARRAY_COUNT(array)); \ + }) + +u32 RandomUniform(enum RandomTag, u32 lo, u32 hi); +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 RandomWeightedArrayDefault(enum RandomTag, u32 sum, u32 n, const u8 *weights); +const void *RandomElementArrayDefault(enum RandomTag, const void *array, size_t size, size_t count); + #endif // GUARD_RANDOM_H diff --git a/include/recorded_battle.h b/include/recorded_battle.h index fbe14a6569..d04e89c362 100644 --- a/include/recorded_battle.h +++ b/include/recorded_battle.h @@ -44,6 +44,7 @@ enum RECORDED_MOVE_TARGET, RECORDED_PARTY_INDEX, RECORDED_BATTLE_PALACE_ACTION, + RECORDED_ITEM_ID, }; extern u32 gRecordedBattleRngSeed; diff --git a/include/region_map.h b/include/region_map.h index 85793badcb..9f0b110a65 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -21,7 +21,8 @@ enum { MAPSECTYPE_ROUTE, MAPSECTYPE_CITY_CANFLY, MAPSECTYPE_CITY_CANTFLY, - MAPSECTYPE_BATTLE_FRONTIER + MAPSECTYPE_BATTLE_FRONTIER, + NUM_MAPSEC_TYPES }; struct RegionMap { diff --git a/include/strings.h b/include/strings.h index 959bb8c22d..72109ed945 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1025,6 +1025,8 @@ extern const u8 gText_ThrowInPremierBall[]; extern const u8 gText_ShopBuy[]; extern const u8 gText_ShopSell[]; extern const u8 gText_ShopQuit[]; +extern const u8 gText_ThatItemIsSoldOut[]; +extern const u8 gText_SoldOut[]; extern const u8 gText_OhABite[]; extern const u8 gText_PokemonOnHook[]; diff --git a/include/trade.h b/include/trade.h index d63749653a..6b621038fc 100644 --- a/include/trade.h +++ b/include/trade.h @@ -12,8 +12,8 @@ extern const struct WindowTemplate gTradeEvolutionSceneYesNoWindowTemplate; s32 GetGameProgressForLinkTrade(void); void CB2_StartCreateTradeMenu(void); void CB2_LinkTrade(void); -int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isEventLegal); -int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isEventLegal); +int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isModernFatefulEncounter); +int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isModernFatefulEncounter); int CanSpinTradeMon(struct Pokemon *, u16); void InitTradeSequenceBgGpuRegs(void); void LinkTradeDrawWindow(void); diff --git a/make_tools.mk b/make_tools.mk index 5a5291b77b..c2c5a800cf 100644 --- a/make_tools.mk +++ b/make_tools.mk @@ -1,5 +1,6 @@ MAKEFLAGS += --no-print-directory +# Inclusive list. If you don't want a tool to be built, don't add it here. TOOLDIRS := tools/aif2pcm tools/bin2c tools/gbafix tools/gbagfx tools/jsonproc tools/mapjson tools/mid2agb tools/preproc tools/ramscrgen tools/rsfont tools/scaninc .PHONY: all $(TOOLDIRS) diff --git a/sound/cry_tables.inc b/sound/cry_tables.inc index 7714cd00ec..618c610e6a 100644 --- a/sound/cry_tables.inc +++ b/sound/cry_tables.inc @@ -1126,9 +1126,9 @@ gCryTable:: cry Cry_Bruxish cry Cry_Drampa cry Cry_Dhelmise - cry Cry_Jangmoo - cry Cry_Hakamoo - cry Cry_Kommoo + cry Cry_JangmoO + cry Cry_HakamoO + cry Cry_KommoO cry Cry_TapuKoko cry Cry_TapuLele cry Cry_TapuBulu @@ -1334,13 +1334,13 @@ gCryTable:: cry Cry_Glastrier cry Cry_Spectrier cry Cry_Calyrex - cry Cry_Unown //Cry_Wyrdeer - cry Cry_Unown //Cry_Kleavor - cry Cry_Unown //Cry_Ursaluna - cry Cry_Unown //Cry_Basculegion - cry Cry_Unown //Cry_Sneasler - cry Cry_Unown //Cry_Overqwil - cry Cry_Unown //Cry_Enamorus + cry Cry_Wyrdeer + cry Cry_Kleavor + cry Cry_Ursaluna + cry Cry_Basculegion + cry Cry_Sneasler + cry Cry_Overqwil + cry Cry_Enamorus .else cry Cry_Unown cry Cry_Unown @@ -1749,7 +1749,7 @@ gCryTable:: cry Cry_TornadusTherian cry Cry_ThundurusTherian cry Cry_LandorusTherian - cry Cry_Bulbasaur //Cry_EnamorusTherian + cry Cry_EnamorusTherian @ Kyurem cry Cry_KyuremWhite cry Cry_KyuremBlack @@ -3248,9 +3248,9 @@ gCryTable_Reverse:: cry_reverse Cry_Bruxish cry_reverse Cry_Drampa cry_reverse Cry_Dhelmise - cry_reverse Cry_Jangmoo - cry_reverse Cry_Hakamoo - cry_reverse Cry_Kommoo + cry_reverse Cry_JangmoO + cry_reverse Cry_HakamoO + cry_reverse Cry_KommoO cry_reverse Cry_TapuKoko cry_reverse Cry_TapuLele cry_reverse Cry_TapuBulu @@ -3456,13 +3456,13 @@ gCryTable_Reverse:: cry_reverse Cry_Glastrier cry_reverse Cry_Spectrier cry_reverse Cry_Calyrex - cry_reverse Cry_Unown //Cry_Wyrdeer - cry_reverse Cry_Unown //Cry_Kleavor - cry_reverse Cry_Unown //Cry_Ursaluna - cry_reverse Cry_Unown //Cry_Basculegion - cry_reverse Cry_Unown //Cry_Sneasler - cry_reverse Cry_Unown //Cry_Overqwil - cry_reverse Cry_Unown //Cry_Enamorus + cry_reverse Cry_Wyrdeer + cry_reverse Cry_Kleavor + cry_reverse Cry_Ursaluna + cry_reverse Cry_Basculegion + cry_reverse Cry_Sneasler + cry_reverse Cry_Overqwil + cry_reverse Cry_Enamorus .else cry_reverse Cry_Unown cry_reverse Cry_Unown @@ -3862,7 +3862,7 @@ gCryTable_Reverse:: cry_reverse Cry_TornadusTherian cry_reverse Cry_ThundurusTherian cry_reverse Cry_LandorusTherian - cry_reverse Cry_Bulbasaur //Cry_EnamorusTherian + cry_reverse Cry_EnamorusTherian @ Kyurem cry_reverse Cry_KyuremWhite cry_reverse Cry_KyuremBlack diff --git a/sound/direct_sound_data.inc b/sound/direct_sound_data.inc index fb4c6b44f6..05a1b7145e 100644 --- a/sound/direct_sound_data.inc +++ b/sound/direct_sound_data.inc @@ -3518,15 +3518,15 @@ Cry_Dhelmise:: .incbin "sound/direct_sound_samples/cries/dhelmise.bin" .align 2 -Cry_Jangmoo:: +Cry_JangmoO:: .incbin "sound/direct_sound_samples/cries/jangmo_o.bin" .align 2 -Cry_Hakamoo:: +Cry_HakamoO:: .incbin "sound/direct_sound_samples/cries/hakamo_o.bin" .align 2 -Cry_Kommoo:: +Cry_KommoO:: .incbin "sound/direct_sound_samples/cries/kommo_o.bin" .align 2 @@ -3986,7 +3986,7 @@ Cry_Spectrier:: .align 2 Cry_Calyrex:: .incbin "sound/direct_sound_samples/cries/calyrex.bin" -/* + .align 2 Cry_Wyrdeer:: .incbin "sound/direct_sound_samples/cries/wyrdeer.bin" @@ -4014,7 +4014,7 @@ Cry_Overqwil:: .align 2 Cry_Enamorus:: .incbin "sound/direct_sound_samples/cries/enamorus.bin" -*/ + .endif .align 2 @@ -4360,11 +4360,10 @@ Cry_CalyrexIceRider:: Cry_CalyrexShadowRider:: .incbin "sound/direct_sound_samples/cries/calyrex_shadow_rider.bin" -/* .align 2 Cry_EnamorusTherian:: .incbin "sound/direct_sound_samples/cries/enamorus_therian.bin" -*/ + .endif .align 2 diff --git a/sound/direct_sound_samples/cries/basculegion.aif b/sound/direct_sound_samples/cries/basculegion.aif new file mode 100644 index 0000000000..a1405ee8d7 Binary files /dev/null and b/sound/direct_sound_samples/cries/basculegion.aif differ diff --git a/sound/direct_sound_samples/cries/enamorus.aif b/sound/direct_sound_samples/cries/enamorus.aif new file mode 100644 index 0000000000..40957d49da Binary files /dev/null and b/sound/direct_sound_samples/cries/enamorus.aif differ diff --git a/sound/direct_sound_samples/cries/enamorus_therian.aif b/sound/direct_sound_samples/cries/enamorus_therian.aif new file mode 100644 index 0000000000..416f59abb1 Binary files /dev/null and b/sound/direct_sound_samples/cries/enamorus_therian.aif differ diff --git a/sound/direct_sound_samples/cries/kleavor.aif b/sound/direct_sound_samples/cries/kleavor.aif new file mode 100644 index 0000000000..1052cabd3a Binary files /dev/null and b/sound/direct_sound_samples/cries/kleavor.aif differ diff --git a/sound/direct_sound_samples/cries/overqwil.aif b/sound/direct_sound_samples/cries/overqwil.aif new file mode 100644 index 0000000000..56b3d97558 Binary files /dev/null and b/sound/direct_sound_samples/cries/overqwil.aif differ diff --git a/sound/direct_sound_samples/cries/sneasler.aif b/sound/direct_sound_samples/cries/sneasler.aif new file mode 100644 index 0000000000..fa2fbef2bc Binary files /dev/null and b/sound/direct_sound_samples/cries/sneasler.aif differ diff --git a/sound/direct_sound_samples/cries/ursaluna.aif b/sound/direct_sound_samples/cries/ursaluna.aif new file mode 100644 index 0000000000..7f054dc5cb Binary files /dev/null and b/sound/direct_sound_samples/cries/ursaluna.aif differ diff --git a/sound/direct_sound_samples/cries/wyrdeer.aif b/sound/direct_sound_samples/cries/wyrdeer.aif new file mode 100644 index 0000000000..4e932c758c Binary files /dev/null and b/sound/direct_sound_samples/cries/wyrdeer.aif differ diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 1765af94b2..6c60705d5a 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -257,6 +257,8 @@ static void CopyBattlerDataToAIParty(u32 bPosition, u32 side) void Ai_InitPartyStruct(void) { u32 i; + bool32 isOmniscient = (AI_THINKING_STRUCT->aiFlags & AI_FLAG_OMNISCIENT); + struct Pokemon *mon; AI_PARTY->count[B_SIDE_PLAYER] = gPlayerPartyCount; AI_PARTY->count[B_SIDE_OPPONENT] = gEnemyPartyCount; @@ -278,6 +280,17 @@ void Ai_InitPartyStruct(void) { if (GetMonData(&gPlayerParty[i], MON_DATA_HP) == 0) AI_PARTY->mons[B_SIDE_PLAYER][i].isFainted = TRUE; + + if (isOmniscient) + { + u32 j; + mon = &gPlayerParty[i]; + AI_PARTY->mons[B_SIDE_PLAYER][i].item = GetMonData(mon, MON_DATA_HELD_ITEM); + AI_PARTY->mons[B_SIDE_PLAYER][i].heldEffect = ItemId_GetHoldEffect(AI_PARTY->mons[B_SIDE_PLAYER][i].item); + AI_PARTY->mons[B_SIDE_PLAYER][i].ability = GetMonAbility(mon); + for (j = 0; j < MAX_MON_MOVES; j++) + AI_PARTY->mons[B_SIDE_PLAYER][i].moves[j] = GetMonData(mon, MON_DATA_MOVE1 + j); + } } } @@ -354,7 +367,7 @@ void GetAiLogicData(void) for (battlerAtk = 0; battlerAtk < gBattlersCount; battlerAtk++) { if (!IsBattlerAlive(battlerAtk) - || !IsBattlerAIControlled(battlerAtk)) { + || !IsAiBattlerAware(battlerAtk)) { continue; } @@ -974,7 +987,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } break; case EFFECT_DREAM_EATER: - if (!(gBattleMons[battlerDef].status1 & STATUS1_SLEEP) || AI_DATA->abilities[battlerDef] == ABILITY_COMATOSE) + if (!AI_IsBattlerAsleepOrComatose(battlerDef)) score -= 8; else if (effectiveness == AI_EFFECTIVENESS_x0) score -= 10; @@ -982,6 +995,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) // stat raising effects case EFFECT_ATTACK_UP: case EFFECT_ATTACK_UP_2: + case EFFECT_ATTACK_UP_USER_ALLY: if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_ATK) || !HasMoveWithSplit(battlerAtk, SPLIT_PHYSICAL)) score -= 10; break; @@ -1116,10 +1130,9 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; case EFFECT_GROWTH: case EFFECT_ATTACK_SPATK_UP: // work up - if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_ATK) || !HasMoveWithSplit(battlerAtk, SPLIT_PHYSICAL)) + if ((!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_ATK) && !BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPATK)) + || (!HasDamagingMove(battlerAtk))) score -= 10; - else if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPATK) || !HasMoveWithSplit(battlerAtk, SPLIT_SPECIAL)) - score -= 8; break; case EFFECT_ROTOTILLER: if (isDoubleBattle) @@ -1453,7 +1466,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; case EFFECT_SNORE: case EFFECT_SLEEP_TALK: - if (IsWakeupTurn(battlerAtk) || (!(gBattleMons[battlerAtk].status1 & STATUS1_SLEEP) || AI_DATA->abilities[battlerAtk] != ABILITY_COMATOSE)) + if (IsWakeupTurn(battlerAtk) || !AI_IsBattlerAsleepOrComatose(battlerAtk)) score -= 10; // if mon will wake up, is not asleep, or is not comatose break; case EFFECT_MEAN_LOOK: @@ -1463,7 +1476,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_NIGHTMARE: if (gBattleMons[battlerDef].status2 & STATUS2_NIGHTMARE) score -= 10; - else if (!(gBattleMons[battlerDef].status1 & STATUS1_SLEEP) || AI_DATA->abilities[battlerDef] == ABILITY_COMATOSE) + else if (!AI_IsBattlerAsleepOrComatose(battlerDef)) score -= 8; else if (DoesPartnerHaveSameMoveEffect(BATTLE_PARTNER(battlerAtk), battlerDef, move, AI_DATA->partnerMove)) score -= 10; @@ -2446,7 +2459,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } break; case EFFECT_ELECTRIFY: - if (AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_FASTER + if (AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_SLOWER //|| GetMoveTypeSpecial(battlerDef, predictedMove) == TYPE_ELECTRIC // Move will already be electric type || PartnerMoveIsSameAsAttacker(BATTLE_PARTNER(battlerAtk), battlerDef, move, AI_DATA->partnerMove)) score -= 10; @@ -2610,6 +2623,15 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (gBattleMons[battlerAtk].hp <= gBattleMons[battlerAtk].maxHP / 3) score -= 10; break;*/ + case EFFECT_REVIVAL_BLESSING: + if (GetFirstFaintedPartyIndex(battlerAtk) == PARTY_SIZE) + score -= 10; + else if (CanAIFaintTarget(battlerAtk, battlerDef, 0)) + score -= 10; + else if (CanTargetFaintAi(battlerDef, battlerAtk) + && AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_SLOWER) + score -= 10; + break; case EFFECT_PLACEHOLDER: return 0; // cannot even select } // move effect checks @@ -2631,7 +2653,7 @@ static s16 AI_TryToFaint(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (CanIndexMoveFaintTarget(battlerAtk, battlerDef, AI_THINKING_STRUCT->movesetIndex, 0) && gBattleMoves[move].effect != EFFECT_EXPLOSION) { // this move can faint the target - if (!WillAIStrikeFirst() || GetMovePriority(battlerAtk, move) > 0) + if (WillAIStrikeFirst() || GetMovePriority(battlerAtk, move) > 0) score += 4; // we go first or we're using priority move else score += 2; @@ -3191,6 +3213,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) // stat raising effects case EFFECT_ATTACK_UP: case EFFECT_ATTACK_UP_2: + case EFFECT_ATTACK_UP_USER_ALLY: if (MovesWithSplitUnusable(battlerAtk, battlerDef, SPLIT_PHYSICAL)) { score -= 8; @@ -3476,6 +3499,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; case EFFECT_TOXIC: case EFFECT_POISON: + case EFFECT_BARB_BARRAGE: IncreasePoisonScore(battlerAtk, battlerDef, move, &score); break; case EFFECT_LIGHT_SCREEN: @@ -3778,7 +3802,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_NIGHTMARE: if (AI_DATA->abilities[battlerDef] != ABILITY_MAGIC_GUARD && !(gBattleMons[battlerDef].status2 & STATUS2_NIGHTMARE) - && (AI_DATA->abilities[battlerDef] == ABILITY_COMATOSE || gBattleMons[battlerDef].status1 & STATUS1_SLEEP)) + && AI_IsBattlerAsleepOrComatose(battlerDef)) { score += 5; if (IsBattlerTrapped(battlerDef, TRUE)) @@ -3869,6 +3893,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; case EFFECT_SPIKES: + case EFFECT_HIT_SET_ENTRY_HAZARD: case EFFECT_STEALTH_ROCK: case EFFECT_STICKY_WEB: case EFFECT_TOXIC_SPIKES: @@ -4639,7 +4664,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score += 2; // Give target more weaknesses break; case EFFECT_ELECTRIFY: - if (predictedMove != MOVE_NONE && gBattleMoves[predictedMove].type == TYPE_NORMAL + if (predictedMove != MOVE_NONE && (AI_DATA->abilities[battlerAtk] == ABILITY_VOLT_ABSORB || AI_DATA->abilities[battlerAtk] == ABILITY_MOTOR_DRIVE || AI_DATA->abilities[battlerAtk] == ABILITY_LIGHTNING_ROD)) @@ -4792,6 +4817,10 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score++; } break; + case EFFECT_REVIVAL_BLESSING: + if (GetFirstFaintedPartyIndex(battlerAtk) != PARTY_SIZE) + score += 2; + break; //case EFFECT_EXTREME_EVOBOOST: // TODO //break; //case EFFECT_CLANGOROUS_SOUL: // TODO @@ -4824,6 +4853,7 @@ static s16 AI_SetupFirstTurn(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) switch (gBattleMoves[move].effect) { case EFFECT_ATTACK_UP: + case EFFECT_ATTACK_UP_USER_ALLY: case EFFECT_DEFENSE_UP: case EFFECT_SPEED_UP: case EFFECT_SPECIAL_ATTACK_UP: @@ -4904,6 +4934,7 @@ static s16 AI_SetupFirstTurn(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_HAIL: case EFFECT_GEOMANCY: case EFFECT_VICTORY_DANCE: + case EFFECT_HIT_SET_ENTRY_HAZARD: score += 2; break; default: @@ -5154,6 +5185,7 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) switch (effect) { case EFFECT_ATTACK_UP: + case EFFECT_ATTACK_UP_USER_ALLY: case EFFECT_DEFENSE_UP: case EFFECT_SPEED_UP: case EFFECT_SPECIAL_ATTACK_UP: diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 0ae1c8a9af..29911d798f 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -10,6 +10,8 @@ #include "constants/hold_effects.h" #include "battle_setup.h" #include "data.h" +#include "item.h" +#include "party_menu.h" #include "pokemon.h" #include "random.h" #include "util.h" @@ -27,6 +29,15 @@ static bool32 AiExpectsToFaintPlayer(void); static bool32 AI_ShouldHeal(u32 healAmount); static bool32 AI_OpponentCanFaintAiWithMod(u32 healAmount); +static bool32 IsAceMon(u32 battlerId, u32 monPartyId) +{ + if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON + && !(gBattleStruct->forcedSwitch & gBitTable[battlerId]) + && monPartyId == CalculateEnemyPartyCount()-1) + return TRUE; + return FALSE; +} + void GetAIPartyIndexes(u32 battlerId, s32 *firstId, s32 *lastId) { if (BATTLE_TWO_VS_ONE_OPPONENT && (battlerId & BIT_SIDE) == B_SIDE_OPPONENT) @@ -103,14 +114,13 @@ static bool8 ShouldSwitchIfWonderGuard(void) { if (GetMonData(&party[i], MON_DATA_HP) == 0) continue; - if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE) + if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE) continue; - if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG) + if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) continue; if (i == gBattlerPartyIndexes[gActiveBattler]) continue; - if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON - && i == (CalculateEnemyPartyCount()-1)) + if (IsAceMon(gActiveBattler, i)) continue; for (opposingBattler = GetBattlerAtPosition(opposingPosition), j = 0; j < MAX_MON_MOVES; j++) @@ -190,9 +200,8 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void) if (GetMonData(&party[i], MON_DATA_HP) == 0) continue; - if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE) - continue; - if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG) + species = GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG); + if (species == SPECIES_NONE || species == SPECIES_EGG) continue; if (i == gBattlerPartyIndexes[battlerIn1]) continue; @@ -202,16 +211,10 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void) continue; if (i == *(gBattleStruct->monToSwitchIntoId + battlerIn2)) continue; - if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON - && i == (CalculateEnemyPartyCount()-1)) + if (IsAceMon(gActiveBattler, i)) continue; - - species = GetMonData(&party[i], MON_DATA_SPECIES); - if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0) - monAbility = gSpeciesInfo[species].abilities[1]; - else - monAbility = gSpeciesInfo[species].abilities[0]; + monAbility = GetMonAbility(&party[i]); if (absorbingTypeAbility == monAbility && Random() & 1) { @@ -267,7 +270,7 @@ static bool8 ShouldSwitchIfGameStatePrompt(void) ) switchMon = FALSE; - if (IsBattlerAlive(BATTLE_PARTNER(gActiveBattler)) + if (IsBattlerAlive(BATTLE_PARTNER(gActiveBattler)) && (gBattleMoves[AI_DATA->partnerMove].effect == EFFECT_MISTY_TERRAIN || gBattleMoves[AI_DATA->partnerMove].effect == EFFECT_ELECTRIC_TERRAIN) && IsBattlerGrounded(gActiveBattler) @@ -277,20 +280,19 @@ static bool8 ShouldSwitchIfGameStatePrompt(void) if (*(gBattleStruct->AI_monToSwitchIntoId + BATTLE_PARTNER(gActiveBattler)) != PARTY_SIZE) //Partner is switching { GetAIPartyIndexes(gActiveBattler, &firstId, &lastId); - + if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) party = gPlayerParty; - + for (i = firstId; i < lastId; i++) { - if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON - && i == (CalculateEnemyPartyCount()-1)) - break; + if (IsAceMon(gActiveBattler, i)) + continue; //Look for mon in party that is able to be switched into and has ability that sets terrain if (GetMonData(&party[i], MON_DATA_HP) != 0 - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && i != gBattlerPartyIndexes[gActiveBattler] && i != gBattlerPartyIndexes[BATTLE_PARTNER(gActiveBattler)] && IsBattlerGrounded(gActiveBattler) @@ -305,7 +307,7 @@ static bool8 ShouldSwitchIfGameStatePrompt(void) } } } - + //Check if Active Pokemon can KO opponent instead of switching //Will still fall asleep, but take out opposing Pokemon first if (AiExpectsToFaintPlayer()) @@ -328,7 +330,7 @@ static bool8 ShouldSwitchIfGameStatePrompt(void) && AI_DATA->abilities[opposingBattler] != ABILITY_UNAWARE && AI_DATA->abilities[opposingBattler] != ABILITY_KEEN_EYE && !(gBattleMons[gActiveBattler].status2 & STATUS2_FORESIGHT) - && !(gStatuses3[gActiveBattler] & STATUS3_MIRACLE_EYED)) + && !(gStatuses3[gActiveBattler] & STATUS3_MIRACLE_EYED)) switchMon = FALSE; } @@ -343,7 +345,7 @@ static bool8 ShouldSwitchIfGameStatePrompt(void) && gBattleMons[gActiveBattler].hp >= (gBattleMons[gActiveBattler].maxHP / 3) && (Random() % (moduloChance*chanceReducer)) == 0) switchMon = TRUE; - + //Cursed moduloChance = 2; //50% if (gBattleMons[gActiveBattler].status2 & STATUS2_CURSED @@ -370,7 +372,7 @@ static bool8 ShouldSwitchIfGameStatePrompt(void) //Todo //Pass Wish Heal - + //Semi-Invulnerable if (gStatuses3[opposingBattler] & STATUS3_SEMI_INVULNERABLE) { @@ -416,7 +418,7 @@ static bool8 ShouldSwitchIfAbilityBenefit(void) switch(AI_DATA->abilities[gActiveBattler]) { case ABILITY_NATURAL_CURE: moduloChance = 4; //25% - //Attempt to cure bad ailment + //Attempt to cure bad ailment if (gBattleMons[gActiveBattler].status1 & (STATUS1_SLEEP | STATUS1_FREEZE | STATUS1_TOXIC_POISON) && GetMostSuitableMonToSwitchInto() != PARTY_SIZE) break; @@ -432,17 +434,17 @@ static bool8 ShouldSwitchIfAbilityBenefit(void) case ABILITY_REGENERATOR: moduloChance = 2; //50% //Don't switch if ailment - if (gBattleMons[gActiveBattler].status1 & STATUS1_ANY) - return FALSE; + if (gBattleMons[gActiveBattler].status1 & STATUS1_ANY) + return FALSE; if ((gBattleMons[gActiveBattler].hp <= ((gBattleMons[gActiveBattler].maxHP * 2) / 3)) && GetMostSuitableMonToSwitchInto() != PARTY_SIZE && Random() % (moduloChance*chanceReducer) == 0) break; - + return FALSE; default: - return FALSE; + return FALSE; } *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE; @@ -564,9 +566,8 @@ static bool8 FindMonWithFlagsAndSuperEffective(u16 flags, u8 moduloPercent) if (GetMonData(&party[i], MON_DATA_HP) == 0) continue; - if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE) - continue; - if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG) + species = GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG); + if (species == SPECIES_NONE || species == SPECIES_EGG) continue; if (i == gBattlerPartyIndexes[battlerIn1]) continue; @@ -576,16 +577,10 @@ static bool8 FindMonWithFlagsAndSuperEffective(u16 flags, u8 moduloPercent) continue; if (i == *(gBattleStruct->monToSwitchIntoId + battlerIn2)) continue; - if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON - && i == (CalculateEnemyPartyCount()-1)) + if (IsAceMon(gActiveBattler, i)) continue; - - species = GetMonData(&party[i], MON_DATA_SPECIES); - if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0) - monAbility = gSpeciesInfo[species].abilities[1]; - else - monAbility = gSpeciesInfo[species].abilities[0]; + monAbility = GetMonAbility(&party[i]); CalcPartyMonTypeEffectivenessMultiplier(gLastLandedMoves[gActiveBattler], species, monAbility); if (gMoveResultFlags & flags) @@ -619,6 +614,7 @@ bool32 ShouldSwitch(void) struct Pokemon *party; s32 i; s32 availableToSwitch; + bool32 hasAceMon = FALSE; if (gBattleMons[gActiveBattler].status2 & (STATUS2_WRAPPED | STATUS2_ESCAPE_PREVENTION)) return FALSE; @@ -656,9 +652,9 @@ bool32 ShouldSwitch(void) { if (GetMonData(&party[i], MON_DATA_HP) == 0) continue; - if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE) + if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE) continue; - if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG) + if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) continue; if (i == gBattlerPartyIndexes[battlerIn1]) continue; @@ -668,15 +664,22 @@ bool32 ShouldSwitch(void) continue; if (i == *(gBattleStruct->monToSwitchIntoId + battlerIn2)) continue; - if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON - && i == (CalculateEnemyPartyCount()-1)) + if (IsAceMon(gActiveBattler, i)) + { + hasAceMon = TRUE; continue; + } availableToSwitch++; } if (availableToSwitch == 0) - return FALSE; + { + if (hasAceMon) // If the ace mon is the only available mon, use it + availableToSwitch++; + else + return FALSE; + } //NOTE: The sequence of the below functions matter! Do not change unless you have carefully considered the outcome. //Since the order is sequencial, and some of these functions prompt switch to specific party members. @@ -694,14 +697,14 @@ bool32 ShouldSwitch(void) return TRUE; if (ShouldSwitchIfAbilityBenefit()) return TRUE; - + //Removing switch capabilites under specific conditions //These Functions prevent the "FindMonWithFlagsAndSuperEffective" from getting out of hand. if (HasSuperEffectiveMoveAgainstOpponents(FALSE)) return FALSE; if (AreStatsRaised()) return FALSE; - + //Default Function //Can prompt switch if AI has a pokemon in party that resists current opponent & has super effective move if (FindMonWithFlagsAndSuperEffective(MOVE_RESULT_DOESNT_AFFECT_FOE, 2) @@ -758,8 +761,7 @@ void AI_TrySwitchOrUseItem(void) continue; if (monToSwitchId == *(gBattleStruct->monToSwitchIntoId + battlerIn2)) continue; - if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON - && monToSwitchId == (CalculateEnemyPartyCount()-1)) + if (IsAceMon(gActiveBattler, monToSwitchId)) continue; break; @@ -916,7 +918,7 @@ u8 GetMostSuitableMonToSwitchInto(void) s32 lastId = 0; // + 1 struct Pokemon *party; s32 i, j, aliveCount = 0; - u8 invalidMons = 0; + u32 invalidMons = 0, aceMonId = PARTY_SIZE; if (*(gBattleStruct->monToSwitchIntoId + gActiveBattler) != PARTY_SIZE) return *(gBattleStruct->monToSwitchIntoId + gActiveBattler); @@ -952,18 +954,27 @@ u8 GetMostSuitableMonToSwitchInto(void) // Get invalid slots ids. for (i = firstId; i < lastId; i++) { - if (GetMonData(&party[i], MON_DATA_SPECIES) == SPECIES_NONE + u16 species = GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG); + if (species == SPECIES_NONE + || species == SPECIES_EGG || GetMonData(&party[i], MON_DATA_HP) == 0 || gBattlerPartyIndexes[battlerIn1] == i || gBattlerPartyIndexes[battlerIn2] == i || i == *(gBattleStruct->monToSwitchIntoId + battlerIn1) || i == *(gBattleStruct->monToSwitchIntoId + battlerIn2) - || (GetMonAbility(&party[i]) == ABILITY_TRUANT && IsTruantMonVulnerable(gActiveBattler, opposingBattler)) // While not really invalid per say, not really wise to switch into this mon. - || ((AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON) - && i == (CalculateEnemyPartyCount() - 1))) //Save Ace Pokemon for last + || (GetMonAbility(&party[i]) == ABILITY_TRUANT && IsTruantMonVulnerable(gActiveBattler, opposingBattler))) // While not really invalid per say, not really wise to switch into this mon.) + { invalidMons |= gBitTable[i]; + } + else if (IsAceMon(gActiveBattler, i))// Save Ace Pokemon for last. + { + aceMonId = i; + invalidMons |= gBitTable[i]; + } else + { aliveCount++; + } } bestMonId = GetBestMonBatonPass(party, firstId, lastId, invalidMons, aliveCount); @@ -978,23 +989,12 @@ u8 GetMostSuitableMonToSwitchInto(void) if (bestMonId != PARTY_SIZE) return bestMonId; - return PARTY_SIZE; -} + // If ace mon is the last available Pokemon and U-Turn/Volt Switch was used - switch to the mon. + if (aceMonId != PARTY_SIZE + && (gBattleMoves[gLastUsedMove].effect == EFFECT_HIT_ESCAPE || gBattleMoves[gLastUsedMove].effect == EFFECT_PARTING_SHOT)) + return aceMonId; -static u8 GetAI_ItemType(u16 itemId, const u8 *itemEffect) -{ - if (itemId == ITEM_FULL_RESTORE) - return AI_ITEM_FULL_RESTORE; - else if (itemEffect[4] & ITEM4_HEAL_HP) - return AI_ITEM_HEAL_HP; - else if (itemEffect[3] & ITEM3_STATUS_ALL) - return AI_ITEM_CURE_CONDITION; - else if ((itemEffect[0] & ITEM0_DIRE_HIT) || itemEffect[1]) - return AI_ITEM_X_STAT; - else if (itemEffect[3] & ITEM3_GUARD_SPEC) - return AI_ITEM_GUARD_SPEC; - else - return AI_ITEM_NOT_RECOGNIZABLE; + return PARTY_SIZE; } static bool32 AiExpectsToFaintPlayer(void) @@ -1042,8 +1042,8 @@ static bool8 ShouldUseItem(void) for (i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_HP) != 0 - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG) + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) { validMons++; } @@ -1056,96 +1056,70 @@ static bool8 ShouldUseItem(void) u8 paramOffset; u8 battlerSide; - if (i != 0 && validMons > (gBattleResources->battleHistory->itemsNo - i) + 1) - continue; item = gBattleResources->battleHistory->trainerItems[i]; if (item == ITEM_NONE) continue; - if (gItemEffectTable[item - ITEM_POTION] == NULL) + itemEffects = GetItemEffect(item); + if (itemEffects == NULL) continue; - if (item == ITEM_ENIGMA_BERRY_E_READER) - itemEffects = gSaveBlock1Ptr->enigmaBerry.itemEffect; - else - itemEffects = gItemEffectTable[item - ITEM_POTION]; - - *(gBattleStruct->AI_itemType + gActiveBattler / 2) = GetAI_ItemType(item, itemEffects); - - switch (*(gBattleStruct->AI_itemType + gActiveBattler / 2)) + switch (ItemId_GetBattleUsage(item)) { - case AI_ITEM_FULL_RESTORE: + case EFFECT_ITEM_HEAL_AND_CURE_STATUS: shouldUse = AI_ShouldHeal(0); break; - case AI_ITEM_HEAL_HP: + case EFFECT_ITEM_RESTORE_HP: shouldUse = AI_ShouldHeal(itemEffects[GetItemEffectParamOffset(item, 4, 4)]); break; - case AI_ITEM_CURE_CONDITION: - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) = 0; + case EFFECT_ITEM_CURE_STATUS: if (itemEffects[3] & ITEM3_SLEEP && gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP) - { - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_SLEEP); shouldUse = TRUE; - } if (itemEffects[3] & ITEM3_POISON && (gBattleMons[gActiveBattler].status1 & STATUS1_POISON || gBattleMons[gActiveBattler].status1 & STATUS1_TOXIC_POISON)) - { - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_POISON); shouldUse = TRUE; - } if (itemEffects[3] & ITEM3_BURN && gBattleMons[gActiveBattler].status1 & STATUS1_BURN) - { - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_BURN); shouldUse = TRUE; - } if (itemEffects[3] & ITEM3_FREEZE && gBattleMons[gActiveBattler].status1 & STATUS1_FREEZE) - { - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_FREEZE); shouldUse = TRUE; - } if (itemEffects[3] & ITEM3_PARALYSIS && gBattleMons[gActiveBattler].status1 & STATUS1_PARALYSIS) - { - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_PARALYSIS); shouldUse = TRUE; - } if (itemEffects[3] & ITEM3_CONFUSION && gBattleMons[gActiveBattler].status2 & STATUS2_CONFUSION) - { - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_CONFUSION); shouldUse = TRUE; - } break; - case AI_ITEM_X_STAT: - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) = 0; - if (gDisableStructs[gActiveBattler].isFirstTurn == 0) + case EFFECT_ITEM_INCREASE_STAT: + case EFFECT_ITEM_INCREASE_ALL_STATS: + if (!gDisableStructs[gActiveBattler].isFirstTurn + || AI_OpponentCanFaintAiWithMod(0)) break; - if (itemEffects[1] & ITEM1_X_ATTACK) - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_ATTACK); - if (itemEffects[1] & ITEM1_X_DEFENSE) - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_DEFEND); - if (itemEffects[1] & ITEM1_X_SPEED) - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_SPEED); - if (itemEffects[1] & ITEM1_X_SPATK) - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_SPATK); - if (itemEffects[1] & ITEM1_X_SPDEF) - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_SPDEF); - if (itemEffects[1] & ITEM1_X_ACCURACY) - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_ACCURACY); - if (itemEffects[0] & ITEM0_DIRE_HIT) - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_DIRE_HIT); shouldUse = TRUE; break; - case AI_ITEM_GUARD_SPEC: + case EFFECT_ITEM_SET_FOCUS_ENERGY: + if (!gDisableStructs[gActiveBattler].isFirstTurn + || gBattleMons[gActiveBattler].status2 & STATUS2_FOCUS_ENERGY + || AI_OpponentCanFaintAiWithMod(0)) + break; + shouldUse = TRUE; + break; + case EFFECT_ITEM_SET_MIST: battlerSide = GetBattlerSide(gActiveBattler); - if (gDisableStructs[gActiveBattler].isFirstTurn != 0 && gSideTimers[battlerSide].mistTimer == 0) + if (gDisableStructs[gActiveBattler].isFirstTurn && gSideTimers[battlerSide].mistTimer == 0) shouldUse = TRUE; break; - case AI_ITEM_NOT_RECOGNIZABLE: + case EFFECT_ITEM_REVIVE: + gBattleStruct->itemPartyIndex[gActiveBattler] = GetFirstFaintedPartyIndex(gActiveBattler); + if (gBattleStruct->itemPartyIndex[gActiveBattler] != PARTY_SIZE) // Revive if possible. + shouldUse = TRUE; + break; + default: return FALSE; } - if (shouldUse) { + // Set selected party ID to current battler if none chosen. + if (gBattleStruct->itemPartyIndex[gActiveBattler] == PARTY_SIZE) + gBattleStruct->itemPartyIndex[gActiveBattler] = gBattlerPartyIndexes[gActiveBattler]; BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_ITEM, 0); - *(gBattleStruct->chosenItem + (gActiveBattler / 2) * 2) = item; + gBattleStruct->chosenItem[gActiveBattler] = item; gBattleResources->battleHistory->trainerItems[i] = 0; return shouldUse; } diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 531a4aa6b7..53b5ebed6c 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -457,7 +457,7 @@ void RecordLastUsedMoveByTarget(void) RecordKnownMove(gBattlerTarget, gLastMoves[gBattlerTarget]); } -bool32 IsBattlerAIControlled(u32 battlerId) +bool32 BattlerHasAi(u32 battlerId) { switch (GetBattlerPosition(battlerId)) { @@ -473,6 +473,14 @@ bool32 IsBattlerAIControlled(u32 battlerId) } } +bool32 IsAiBattlerAware(u32 battlerId) +{ + if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_OMNISCIENT) + return TRUE; + + return BattlerHasAi(battlerId); +} + void ClearBattlerMoveHistory(u8 battlerId) { memset(BATTLE_HISTORY->usedMoves[battlerId], 0, sizeof(BATTLE_HISTORY->usedMoves[battlerId])); @@ -529,7 +537,7 @@ void ClearBattlerItemEffectHistory(u8 battlerId) void SaveBattlerData(u8 battlerId) { - if (!IsBattlerAIControlled(battlerId)) + if (!BattlerHasAi(battlerId)) { u32 i; @@ -539,22 +547,73 @@ void SaveBattlerData(u8 battlerId) for (i = 0; i < 4; i++) AI_THINKING_STRUCT->saved[battlerId].moves[i] = gBattleMons[battlerId].moves[i]; } + // Save and restore types even for AI controlled battlers in case it gets changed during move evaluation process. + AI_THINKING_STRUCT->saved[battlerId].types[0] = gBattleMons[battlerId].type1; + AI_THINKING_STRUCT->saved[battlerId].types[1] = gBattleMons[battlerId].type2; +} + +static bool32 ShouldFailForIllusion(u16 illusionSpecies, u32 battlerId) +{ + u32 i, j; + + if (BATTLE_HISTORY->abilities[battlerId] == ABILITY_ILLUSION) + return FALSE; + + // Don't fall for Illusion if the mon used a move it cannot know. + for (i = 0; i < MAX_MON_MOVES; i++) + { + u16 move = BATTLE_HISTORY->usedMoves[battlerId][i]; + if (move == MOVE_NONE) + continue; + + for (j = 0; gLevelUpLearnsets[illusionSpecies][j].move != MOVE_UNAVAILABLE; j++) + { + if (gLevelUpLearnsets[illusionSpecies][j].move == move) + break; + } + // The used move is in the learnsets of the fake species. + if (gLevelUpLearnsets[illusionSpecies][j].move != MOVE_UNAVAILABLE) + continue; + + // The used move can be learned from Tm/Hm or Move Tutors. + if (CanLearnTeachableMove(illusionSpecies, move)) + continue; + + // 'Illegal move', AI won't fail for the illusion. + return FALSE; + } + + return TRUE; } void SetBattlerData(u8 battlerId) { - if (!IsBattlerAIControlled(battlerId)) + if (!BattlerHasAi(battlerId)) { - struct Pokemon *illusionMon; - u32 i; + u32 i, species, illusionSpecies; + + // Simulate Illusion + species = gBattleMons[battlerId].species; + illusionSpecies = GetIllusionMonSpecies(battlerId); + if (illusionSpecies != SPECIES_NONE && ShouldFailForIllusion(illusionSpecies, battlerId)) + { + // If the battler's type has not been changed, AI assumes the types of the illusion mon. + if (gBattleMons[battlerId].type1 == gSpeciesInfo[species].types[0] + && gBattleMons[battlerId].type2 == gSpeciesInfo[species].types[1]) + { + gBattleMons[battlerId].type1 = gSpeciesInfo[illusionSpecies].types[0]; + gBattleMons[battlerId].type2 = gSpeciesInfo[illusionSpecies].types[1]; + } + species = illusionSpecies; + } // Use the known battler's ability. if (BATTLE_HISTORY->abilities[battlerId] != ABILITY_NONE) gBattleMons[battlerId].ability = BATTLE_HISTORY->abilities[battlerId]; // Check if mon can only have one ability. - else if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[1] == ABILITY_NONE - || gSpeciesInfo[gBattleMons[battlerId].species].abilities[1] == gSpeciesInfo[gBattleMons[battlerId].species].abilities[0]) - gBattleMons[battlerId].ability = gSpeciesInfo[gBattleMons[battlerId].species].abilities[0]; + else if (gSpeciesInfo[species].abilities[1] == ABILITY_NONE + || gSpeciesInfo[species].abilities[1] == gSpeciesInfo[species].abilities[0]) + gBattleMons[battlerId].ability = gSpeciesInfo[species].abilities[0]; // The ability is unknown. else gBattleMons[battlerId].ability = ABILITY_NONE; @@ -567,16 +626,12 @@ void SetBattlerData(u8 battlerId) if (BATTLE_HISTORY->usedMoves[battlerId][i] == 0) gBattleMons[battlerId].moves[i] = 0; } - - // Simulate Illusion - if ((illusionMon = GetIllusionMonPtr(battlerId)) != NULL) - gBattleMons[battlerId].species = GetMonData(illusionMon, MON_DATA_SPECIES2); } } void RestoreBattlerData(u8 battlerId) { - if (!IsBattlerAIControlled(battlerId)) + if (!BattlerHasAi(battlerId)) { u32 i; @@ -586,6 +641,8 @@ void RestoreBattlerData(u8 battlerId) for (i = 0; i < 4; i++) gBattleMons[battlerId].moves[i] = AI_THINKING_STRUCT->saved[battlerId].moves[i]; } + gBattleMons[battlerId].type1 = AI_THINKING_STRUCT->saved[battlerId].types[0]; + gBattleMons[battlerId].type2 = AI_THINKING_STRUCT->saved[battlerId].types[1]; } u32 GetHealthPercentage(u8 battlerId) @@ -744,11 +801,16 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef, u8 *typeEffectiveness, SetBattlerData(battlerDef); gBattleStruct->dynamicMoveType = 0; + + if (move == MOVE_NATURE_POWER) + move = GetNaturePowerMove(); + SetTypeBeforeUsingMove(move, battlerAtk); GET_MOVE_TYPE(move, moveType); if (gBattleMoves[move].power) { + ProteanTryChangeType(battlerAtk, AI_DATA->abilities[battlerAtk], move, moveType); critChance = GetInverseCritChance(battlerAtk, battlerDef, move); normalDmg = CalculateMoveDamageAndEffectiveness(move, battlerAtk, battlerDef, moveType, &effectivenessMultiplier); critDmg = CalculateMoveDamage(move, battlerAtk, battlerDef, moveType, 0, TRUE, FALSE, FALSE); @@ -802,6 +864,7 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef, u8 *typeEffectiveness, } else { + effectivenessMultiplier = CalcTypeEffectivenessMultiplier(move, moveType, battlerAtk, battlerDef, FALSE); dmg = 0; } @@ -1066,7 +1129,7 @@ bool32 CanTargetFaintAi(u8 battlerDef, u8 battlerAtk) { s32 i, dmg; u32 unusable = AI_DATA->moveLimitations[battlerDef]; - u16 *moves = gBattleResources->battleHistory->usedMoves[battlerDef]; + u16 *moves = GetMovesArray(battlerDef); for (i = 0; i < MAX_MON_MOVES; i++) { @@ -1166,17 +1229,17 @@ s32 AI_GetAbility(u32 battlerId) // We've had ability overwritten by e.g. Worry Seed. It is not part of AI_PARTY in case of switching if (gBattleStruct->overwrittenAbilities[battlerId]) return gBattleStruct->overwrittenAbilities[battlerId]; - + // The AI knows its own ability. - if (IsBattlerAIControlled(battlerId)) + if (IsAiBattlerAware(battlerId)) return knownAbility; // Check neutralizing gas, gastro acid if (knownAbility == ABILITY_NONE) return knownAbility; - if (BATTLE_HISTORY->abilities[battlerId] != ABILITY_NONE) - return BATTLE_HISTORY->abilities[battlerId]; + if (AI_PARTY->mons[GetBattlerSide(battlerId)][gBattlerPartyIndexes[battlerId]].ability != ABILITY_NONE) + return AI_PARTY->mons[GetBattlerSide(battlerId)][gBattlerPartyIndexes[battlerId]].ability; // Abilities that prevent fleeing - treat as always known if (knownAbility == ABILITY_SHADOW_TAG || knownAbility == ABILITY_MAGNET_PULL || knownAbility == ABILITY_ARENA_TRAP) @@ -1201,8 +1264,8 @@ u16 AI_GetHoldEffect(u32 battlerId) { u32 holdEffect; - if (!IsBattlerAIControlled(battlerId)) - holdEffect = BATTLE_HISTORY->itemEffects[battlerId]; + if (!IsAiBattlerAware(battlerId)) + holdEffect = AI_PARTY->mons[GetBattlerSide(battlerId)][gBattlerPartyIndexes[battlerId]].heldEffect; else holdEffect = GetBattlerHoldEffect(battlerId, FALSE); @@ -1826,7 +1889,7 @@ bool32 CanIndexMoveFaintTarget(u8 battlerAtk, u8 battlerDef, u8 index, u8 numHit u16 *GetMovesArray(u32 battler) { - if (IsBattlerAIControlled(battler) || IsBattlerAIControlled(BATTLE_PARTNER(battler))) + if (IsAiBattlerAware(battler) || IsAiBattlerAware(BATTLE_PARTNER(battler))) return gBattleMons[battler].moves; else return gBattleResources->battleHistory->usedMoves[battler]; @@ -3081,7 +3144,7 @@ u16 GetAllyChosenMove(u8 battlerId) { u8 partnerBattler = BATTLE_PARTNER(battlerId); - if (!IsBattlerAlive(partnerBattler) || !IsBattlerAIControlled(partnerBattler)) + if (!IsBattlerAlive(partnerBattler) || !IsAiBattlerAware(partnerBattler)) return MOVE_NONE; else if (partnerBattler > battlerId) // Battler with the lower id chooses the move first. return gLastMoves[partnerBattler]; @@ -3322,8 +3385,8 @@ s32 CountUsablePartyMons(u8 battlerId) { if (i != battlerOnField1 && i != battlerOnField2 && GetMonData(&party[i], MON_DATA_HP) != 0 - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG) + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) { ret++; } @@ -3346,8 +3409,8 @@ bool32 IsPartyFullyHealedExceptBattler(u8 battlerId) { if (i != gBattlerPartyIndexes[battlerId] && GetMonData(&party[i], MON_DATA_HP) != 0 - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && GetMonData(&party[i], MON_DATA_HP) < GetMonData(&party[i], MON_DATA_MAX_HP)) return FALSE; } @@ -3694,3 +3757,8 @@ bool32 ShouldUseZMove(u8 battlerAtk, u8 battlerDef, u16 chosenMove) return FALSE; } + +bool32 AI_IsBattlerAsleepOrComatose(u8 battlerId) +{ + return (gBattleMons[battlerId].status1 & STATUS1_SLEEP) || AI_DATA->abilities[battlerId] == ABILITY_COMATOSE; +} diff --git a/src/battle_anim.c b/src/battle_anim.c index 610c243216..4191fe7aa1 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -3,6 +3,7 @@ #include "battle_anim.h" #include "battle_controllers.h" #include "battle_interface.h" +#include "battle_util.h" #include "bg.h" #include "contest.h" #include "decompress.h" @@ -81,7 +82,9 @@ static void Cmd_visible(void); static void Cmd_teamattack_moveback(void); static void Cmd_teamattack_movefwd(void); static void Cmd_stopsound(void); - +static void Cmd_createvisualtaskontargets(void); +static void Cmd_createspriteontargets(void); +static void Cmd_createspriteontargets_onpos(void); static void RunAnimScriptCommand(void); static void Task_UpdateMonBg(u8 taskId); static void FlipBattlerBgTiles(void); @@ -169,6 +172,9 @@ static void (* const sScriptCmdTable[])(void) = Cmd_teamattack_moveback, // 0x2D Cmd_teamattack_movefwd, // 0x2E Cmd_stopsound, // 0x2F + Cmd_createvisualtaskontargets, // 0x30 + Cmd_createspriteontargets, // 0x31 + Cmd_createspriteontargets_onpos, // 0x32 }; void ClearBattleAnimationVars(void) @@ -268,6 +274,7 @@ void LaunchBattleAnimation(u32 animType, u32 animId) case B_ANIM_DOOM_DESIRE_HIT: case B_ANIM_WISH_HEAL: case B_ANIM_MEGA_EVOLUTION: + case B_ANIM_PRIMAL_REVERSION: case B_ANIM_GULP_MISSILE: hideHpBoxes = TRUE; break; @@ -425,29 +432,48 @@ static void Cmd_unloadspritegfx(void) ClearSpriteIndex(GET_TRUE_SPRITE_INDEX(index)); } -static void Cmd_createsprite(void) +static u8 GetBattleAnimMoveTargets(u8 battlerArgIndex, u8 *targets) { - s32 i; - const struct SpriteTemplate *template; - u8 argVar; - u8 argsCount; - s16 subpriority; - - sBattleAnimScriptPtr++; - template = (const struct SpriteTemplate *)(T2_READ_32(sBattleAnimScriptPtr)); - sBattleAnimScriptPtr += 4; - - argVar = sBattleAnimScriptPtr[0]; - sBattleAnimScriptPtr++; - - argsCount = sBattleAnimScriptPtr[0]; - sBattleAnimScriptPtr++; - for (i = 0; i < argsCount; i++) + u8 numTargets = 1; + switch (GetBattlerMoveTargetType(gBattleAnimAttacker, gAnimMoveIndex)) { - gBattleAnimArgs[i] = T1_READ_16(sBattleAnimScriptPtr); - sBattleAnimScriptPtr += 2; + case MOVE_TARGET_BOTH: + targets[0] = gBattleAnimArgs[battlerArgIndex]; + numTargets = 1; + if (IsBattlerAlive(BATTLE_PARTNER(targets[0]))) + { + targets[1] = BATTLE_PARTNER(targets[0]); + numTargets = 2; + } + break; + case MOVE_TARGET_FOES_AND_ALLY: + targets[0] = gBattleAnimArgs[battlerArgIndex]; + numTargets = 1; + if (IsBattlerAlive(BATTLE_PARTNER(targets[0]))) + { + targets[1] = BATTLE_PARTNER(targets[0]); + numTargets++; + } + + if (IsBattlerAlive(BATTLE_PARTNER(BATTLE_OPPOSITE(targets[0])))) + { + targets[2] = BATTLE_PARTNER(BATTLE_OPPOSITE(targets[0])); + numTargets++; + } + break; + default: + targets[0] = gBattleAnimArgs[battlerArgIndex]; // original + numTargets = 1; + break; } + return numTargets; +} + +static s16 GetSubpriorityForMoveAnim(u8 argVar) +{ + s16 subpriority; + if (argVar & ANIMSPRITE_IS_TARGET) { argVar ^= ANIMSPRITE_IS_TARGET; @@ -471,6 +497,34 @@ static void Cmd_createsprite(void) if (subpriority < 3) subpriority = 3; + return subpriority; +} + +static void Cmd_createsprite(void) +{ + s32 i; + const struct SpriteTemplate *template; + u8 argVar; + u8 argsCount; + s16 subpriority; + + sBattleAnimScriptPtr++; + template = (const struct SpriteTemplate *)(T2_READ_32(sBattleAnimScriptPtr)); + sBattleAnimScriptPtr += 4; + + argVar = sBattleAnimScriptPtr[0]; + sBattleAnimScriptPtr++; + + argsCount = sBattleAnimScriptPtr[0]; + sBattleAnimScriptPtr++; + for (i = 0; i < argsCount; i++) + { + gBattleAnimArgs[i] = T1_READ_16(sBattleAnimScriptPtr); + sBattleAnimScriptPtr += 2; + } + + subpriority = GetSubpriorityForMoveAnim(argVar); + CreateSpriteAndAnimate( template, GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2), @@ -479,6 +533,85 @@ static void Cmd_createsprite(void) gAnimVisualTaskCount++; } +static void CreateSpriteOnTargets(const struct SpriteTemplate *template, u8 argVar, u8 battlerArgIndex, u8 argsCount, bool32 overwriteAnimTgt) +{ + u32 i; + u8 targets[MAX_BATTLERS_COUNT]; + int ntargets; + s16 subpriority; + + for (i = 0; i < argsCount; i++) + { + gBattleAnimArgs[i] = T1_READ_16(sBattleAnimScriptPtr); + sBattleAnimScriptPtr += 2; + } + + subpriority = GetSubpriorityForMoveAnim(argVar); + + ntargets = GetBattleAnimMoveTargets(battlerArgIndex, targets); + + for (i = 0; i < ntargets; i++) { + + if (overwriteAnimTgt) + gBattleAnimArgs[battlerArgIndex] = targets[i]; + + CreateSpriteAndAnimate( + template, + GetBattlerSpriteCoord(targets[i], BATTLER_COORD_X_2), + GetBattlerSpriteCoord(targets[i], BATTLER_COORD_Y_PIC_OFFSET), + subpriority); + gAnimVisualTaskCount++; + } +} + +// will NOT overwrite gBattleAnimArgs +static void Cmd_createspriteontargets_onpos(void) +{ + const struct SpriteTemplate *template; + u8 argVar; + u8 argsCount; + u8 battlerArgIndex; + + sBattleAnimScriptPtr++; + template = (const struct SpriteTemplate *)(T2_READ_32(sBattleAnimScriptPtr)); + sBattleAnimScriptPtr += 4; + + argVar = sBattleAnimScriptPtr[0]; + sBattleAnimScriptPtr++; + + battlerArgIndex = sBattleAnimScriptPtr[0]; + sBattleAnimScriptPtr++; + + argsCount = sBattleAnimScriptPtr[0]; + sBattleAnimScriptPtr++; + + CreateSpriteOnTargets(template, argVar, battlerArgIndex, argsCount, FALSE); +} + +// DOES overwrite gBattleAnimArgs +static void Cmd_createspriteontargets(void) +{ + const struct SpriteTemplate *template; + u8 argVar; + u8 argsCount; + u8 battlerArgIndex; + + sBattleAnimScriptPtr++; + template = (const struct SpriteTemplate *)(T2_READ_32(sBattleAnimScriptPtr)); + sBattleAnimScriptPtr += 4; + + argVar = sBattleAnimScriptPtr[0]; + sBattleAnimScriptPtr++; + + battlerArgIndex = sBattleAnimScriptPtr[0]; + sBattleAnimScriptPtr++; + + argsCount = sBattleAnimScriptPtr[0]; + sBattleAnimScriptPtr++; + + CreateSpriteOnTargets(template, argVar, battlerArgIndex, argsCount, TRUE); +} + static void Cmd_createvisualtask(void) { TaskFunc taskFunc; @@ -509,6 +642,48 @@ static void Cmd_createvisualtask(void) gAnimVisualTaskCount++; } +static void Cmd_createvisualtaskontargets(void) +{ + TaskFunc taskFunc; + u8 taskPriority; + u8 taskId; + u8 numArgs; + u8 battlerArgIndex; // index in gBattleAnimArgs that has the battlerId + s32 i; + u8 targets[MAX_BATTLERS_COUNT] = {0}; + + sBattleAnimScriptPtr++; + + taskFunc = (TaskFunc)T2_READ_32(sBattleAnimScriptPtr); + sBattleAnimScriptPtr += 4; + + taskPriority = sBattleAnimScriptPtr[0]; + sBattleAnimScriptPtr++; + + battlerArgIndex = sBattleAnimScriptPtr[0]; + sBattleAnimScriptPtr++; + + numArgs = sBattleAnimScriptPtr[0]; + sBattleAnimScriptPtr++; + + // copy task arguments + for (i = 0; i < numArgs; i++) { + gBattleAnimArgs[i] = T1_READ_16(sBattleAnimScriptPtr); + sBattleAnimScriptPtr += 2; + } + + numArgs = GetBattleAnimMoveTargets(battlerArgIndex, targets); + + for (i = 0; i < numArgs; i++) + { + gBattleAnimArgs[battlerArgIndex] = targets[i]; + taskId = CreateTask(taskFunc, taskPriority); + taskFunc(taskId); + gAnimVisualTaskCount++; + } +} + + static void Cmd_delay(void) { sBattleAnimScriptPtr++; diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index 761a1886c4..8dae620293 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -4806,8 +4806,8 @@ void AnimTask_CycleMagicalLeafPal(u8 taskId) void AnimNeedleArmSpike(struct Sprite *sprite) { - u8 a; - u8 b; + s16 a; + s16 b; u16 c; u16 x; u16 y; @@ -4820,13 +4820,27 @@ void AnimNeedleArmSpike(struct Sprite *sprite) { if (gBattleAnimArgs[0] == 0) { - a = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); - b = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); + if (IsDoubleBattle()) + { + SetAverageBattlerPositions(gBattleAnimAttacker, TRUE, &a, &b); + } + else + { + a = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + b = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); + } } else { - a = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); - b = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); + if (IsDoubleBattle()) + { + SetAverageBattlerPositions(gBattleAnimTarget, TRUE, &a, &b); + } + else + { + a = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + b = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); + } } sprite->data[0] = gBattleAnimArgs[4]; diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index 8aaab10a5c..f9879583a6 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -3059,7 +3059,7 @@ void AnimTask_LoadMusicNotesPals(u8 taskId) for (i = 1; i < NUM_MUSIC_NOTE_PAL_TAGS; i++) paletteNums[i] = AllocSpritePalette(ANIM_SPRITES_START - i); - gMonSpritesGfxPtr->buffer = AllocZeroed(0x2000); + gMonSpritesGfxPtr->buffer = AllocZeroed(MON_PIC_SIZE * MAX_MON_PIC_FRAMES); LZDecompressWram(gBattleAnimSpritePal_MusicNotes2, gMonSpritesGfxPtr->buffer); for (i = 0; i < NUM_MUSIC_NOTE_PAL_TAGS; i++) LoadPalette(&gMonSpritesGfxPtr->buffer[i * 32], (u16)(OBJ_PLTT_ID(paletteNums[i])), PLTT_SIZE_4BPP); diff --git a/src/battle_anim_ice.c b/src/battle_anim_ice.c index 44c1a4f22c..e6a5607b5a 100644 --- a/src/battle_anim_ice.c +++ b/src/battle_anim_ice.c @@ -1289,7 +1289,7 @@ static void InitPoisonGasCloudAnim(struct Sprite *sprite) sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); - + #if B_UPDATED_MOVE_DATA >= GEN_5 { s16 x, y; diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index c512b67df9..7f38da7cb5 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -1080,7 +1080,7 @@ void UpdateAnimBg3ScreenSize(bool8 largeScreenSize) } } -void TradeMenuBouncePartySprites(struct Sprite *sprite) +void Trade_MoveSelectedMonToTarget(struct Sprite *sprite) { sprite->data[1] = sprite->x; sprite->data[3] = sprite->y; @@ -2138,7 +2138,7 @@ u8 CreateAdditionalMonSpriteForMoveAnim(u16 species, bool8 isBackpic, u8 id, s16 u16 palette = AllocSpritePalette(sSpriteTemplates_MoveEffectMons[id].paletteTag); if (gMonSpritesGfxPtr != NULL && gMonSpritesGfxPtr->buffer == NULL) - gMonSpritesGfxPtr->buffer = AllocZeroed(0x2000); + gMonSpritesGfxPtr->buffer = AllocZeroed(MON_PIC_SIZE * MAX_MON_PIC_FRAMES); if (!isBackpic) { LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), OBJ_PLTT_ID(palette), PLTT_SIZE_4BPP); diff --git a/src/battle_anim_sound_tasks.c b/src/battle_anim_sound_tasks.c index d96a4cea46..bd4638224f 100644 --- a/src/battle_anim_sound_tasks.c +++ b/src/battle_anim_sound_tasks.c @@ -283,6 +283,11 @@ void SoundTask_WaitForCry(u8 taskId) } } +void SoundTask_PlayNormalCry(u8 taskId) +{ + PlayCry_ByMode(gBattleMons[gBattleAnimAttacker].species, BattleAnimAdjustPanning(SOUND_PAN_ATTACKER), CRY_MODE_NORMAL); + gTasks[taskId].func = SoundTask_WaitForCry; +} #define tSpecies data[1] #define tPan data[2] diff --git a/src/battle_anim_utility_funcs.c b/src/battle_anim_utility_funcs.c index c569d54e86..b946cc0505 100644 --- a/src/battle_anim_utility_funcs.c +++ b/src/battle_anim_utility_funcs.c @@ -906,7 +906,7 @@ void AnimTask_GetFieldTerrain(u8 taskId) void AnimTask_AllocBackupPalBuffer(u8 taskId) { - gMonSpritesGfxPtr->buffer = AllocZeroed(0x2000); + gMonSpritesGfxPtr->buffer = AllocZeroed(MON_PIC_SIZE * MAX_MON_PIC_FRAMES); DestroyAnimVisualTask(taskId); } diff --git a/src/battle_bg.c b/src/battle_bg.c index e56884b55d..0ed1eec2e7 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -185,7 +185,7 @@ static const struct WindowTemplate sStandardBattleWindowTemplates[] = .bg = 0, .tilemapLeft = 2, .tilemapTop = 55, - .width = 12, //for z move names + .width = 16, //for z move names .height = 2, .paletteNum = 5, .baseBlock = 0x0300, diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 97fc21df9e..908363907b 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -1149,7 +1149,9 @@ static void StartSendOutAnim(u8 battlerId, bool8 dontClearSubstituteBit) ClearTemporarySpeciesSpriteData(battlerId, dontClearSubstituteBit); gBattlerPartyIndexes[battlerId] = gBattleResources->bufferA[battlerId][1]; - species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES); + species = GetIllusionMonSpecies(battlerId); + if (species == SPECIES_NONE) + species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES); gBattleControllerData[battlerId] = CreateInvisibleSpriteWithCallback(SpriteCB_WaitForBattlerBallReleaseAnim); BattleLoadOpponentMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[battlerId]], battlerId); SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(battlerId)); diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 0a9626a13c..4eda81b094 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -20,6 +20,7 @@ #include "main.h" #include "m4a.h" #include "palette.h" +#include "party_menu.h" #include "pokeball.h" #include "pokemon.h" #include "random.h" @@ -33,6 +34,7 @@ #include "constants/battle_anim.h" #include "constants/items.h" #include "constants/moves.h" +#include "constants/party_menu.h" #include "constants/songs.h" #include "constants/trainers.h" #include "trainer_hill.h" @@ -226,9 +228,11 @@ static void Intro_DelayAndEnd(void) } } -static bool32 TwoIntroMons(u32 battlerId) // Double battle with both player pokemon active. +static bool32 TwoIntroMons(u32 battlerId) // Double battle with both opponent pokemon active. { - return (IsDoubleBattle() && IsValidForBattle(&gEnemyParty[gBattlerPartyIndexes[BATTLE_PARTNER(battlerId)]])); + return (IsDoubleBattle() + && IsValidForBattle(&gEnemyParty[gBattlerPartyIndexes[battlerId]]) + && IsValidForBattle(&gEnemyParty[gBattlerPartyIndexes[BATTLE_PARTNER(battlerId)]])); } static void Intro_WaitForShinyAnimAndHealthbox(void) @@ -1177,7 +1181,9 @@ static void StartSendOutAnim(u8 battlerId, bool8 dontClearSubstituteBit) ClearTemporarySpeciesSpriteData(battlerId, dontClearSubstituteBit); gBattlerPartyIndexes[battlerId] = gBattleResources->bufferA[battlerId][1]; - species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES); + species = GetIllusionMonSpecies(battlerId); + if (species == SPECIES_NONE) + species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES); gBattleControllerData[battlerId] = CreateInvisibleSpriteWithCallback(SpriteCB_WaitForBattlerBallReleaseAnim); BattleLoadOpponentMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[battlerId]], battlerId); SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(battlerId)); @@ -1663,7 +1669,7 @@ static void OpponentHandleChooseMove(void) static void OpponentHandleChooseItem(void) { - BtlController_EmitOneReturnValue(BUFFER_B, *(gBattleStruct->chosenItem + (gActiveBattler / 2) * 2)); + BtlController_EmitOneReturnValue(BUFFER_B, gBattleStruct->chosenItem[gActiveBattler]); OpponentBufferExecCompleted(); } @@ -1672,7 +1678,13 @@ static void OpponentHandleChoosePokemon(void) s32 chosenMonId; s32 pokemonInBattle = 1; - if (*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) == PARTY_SIZE) + // Choosing Revival Blessing target + if ((gBattleResources->bufferA[gActiveBattler][1] & 0xF) == PARTY_ACTION_CHOOSE_FAINTED_MON) + { + chosenMonId = gSelectedMonPartyId = GetFirstFaintedPartyIndex(gActiveBattler); + } + // Switching out + else if (*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) == PARTY_SIZE) { chosenMonId = GetMostSuitableMonToSwitchInto(); @@ -1707,17 +1719,17 @@ static void OpponentHandleChoosePokemon(void) } } } + *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = chosenMonId; } else { chosenMonId = *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler); *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE; + *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = chosenMonId; } - - - *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = chosenMonId; BtlController_EmitChosenMonReturnValue(BUFFER_B, chosenMonId, NULL); OpponentBufferExecCompleted(); + } static u8 CountAIAliveNonEggMonsExcept(u8 slotToIgnore) @@ -1959,7 +1971,7 @@ static void SpriteCB_FreeOpponentSprite(struct Sprite *sprite) static void Task_StartSendOutAnim(u8 taskId) { - u8 savedActiveBank = gActiveBattler; + u8 savedActiveBattler = gActiveBattler; gActiveBattler = gTasks[taskId].data[0]; if ((!TwoIntroMons(gActiveBattler) || (gBattleTypeFlags & BATTLE_TYPE_MULTI)) && !BATTLE_TWO_VS_ONE_OPPONENT) @@ -1967,7 +1979,7 @@ static void Task_StartSendOutAnim(u8 taskId) gBattleResources->bufferA[gActiveBattler][1] = gBattlerPartyIndexes[gActiveBattler]; StartSendOutAnim(gActiveBattler, FALSE); } - else if ((gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)) + else if ((gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) || (BATTLE_TWO_VS_ONE_OPPONENT && !TwoIntroMons(gActiveBattler))) { gBattleResources->bufferA[gActiveBattler][1] = gBattlerPartyIndexes[gActiveBattler]; StartSendOutAnim(gActiveBattler, FALSE); @@ -1982,7 +1994,7 @@ static void Task_StartSendOutAnim(u8 taskId) gActiveBattler ^= BIT_FLANK; } gBattlerControllerFuncs[gActiveBattler] = Intro_TryShinyAnimShowHealthbox; - gActiveBattler = savedActiveBank; + gActiveBattler = savedActiveBattler; DestroyTask(taskId); } diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index e0d47630ae..1065994164 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -882,6 +882,7 @@ static void HandleMoveSwitching(void) if (JOY_NEW(A_BUTTON | SELECT_BUTTON)) { + struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleResources->bufferA[gActiveBattler][4]); PlaySE(SE_SELECT); if (gMoveSelectionCursor[gActiveBattler] != gMultiUsePlayerCursor) @@ -973,6 +974,7 @@ static void HandleMoveSwitching(void) MoveSelectionDisplayPpString(); MoveSelectionDisplayPpNumber(); MoveSelectionDisplayMoveType(); + GetUsableZMoves(gActiveBattler, moveInfo->moves); } else if (JOY_NEW(B_BUTTON | SELECT_BUTTON)) { @@ -2905,7 +2907,8 @@ static void PlayerHandleChoosePokemon(void) for (i = 0; i < ARRAY_COUNT(gBattlePartyCurrentOrder); i++) gBattlePartyCurrentOrder[i] = gBattleResources->bufferA[gActiveBattler][4 + i]; - if (gBattleTypeFlags & BATTLE_TYPE_ARENA && (gBattleResources->bufferA[gActiveBattler][1] & 0xF) != PARTY_ACTION_CANT_SWITCH) + if (gBattleTypeFlags & BATTLE_TYPE_ARENA && (gBattleResources->bufferA[gActiveBattler][1] & 0xF) != PARTY_ACTION_CANT_SWITCH + && (gBattleResources->bufferA[gActiveBattler][1] & 0xF) != PARTY_ACTION_CHOOSE_FAINTED_MON) { BtlController_EmitChosenMonReturnValue(BUFFER_B, gBattlerPartyIndexes[gActiveBattler] + 1, gBattlePartyCurrentOrder); PlayerBufferExecCompleted(); diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index 88bc4f974d..4c54b68aa3 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -16,6 +16,7 @@ #include "main.h" #include "m4a.h" #include "palette.h" +#include "party_menu.h" #include "pokeball.h" #include "pokemon.h" #include "reshow_battle_screen.h" @@ -27,6 +28,7 @@ #include "window.h" #include "constants/battle_anim.h" #include "constants/songs.h" +#include "constants/party_menu.h" #include "constants/trainers.h" static void PlayerPartnerHandleGetMonData(void); @@ -1549,25 +1551,33 @@ static void PlayerPartnerHandleChooseItem(void) static void PlayerPartnerHandleChoosePokemon(void) { - s32 chosenMonId = GetMostSuitableMonToSwitchInto(); - - if (chosenMonId == PARTY_SIZE) // just switch to the next mon + s32 chosenMonId; + // Choosing Revival Blessing target + if ((gBattleResources->bufferA[gActiveBattler][1] & 0xF) == PARTY_ACTION_CHOOSE_FAINTED_MON) { - u8 playerMonIdentity = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); - u8 selfIdentity = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT); - - for (chosenMonId = PARTY_SIZE / 2; chosenMonId < PARTY_SIZE; chosenMonId++) + chosenMonId = gSelectedMonPartyId = GetFirstFaintedPartyIndex(gActiveBattler); + } + // Switching out + else + { + chosenMonId = GetMostSuitableMonToSwitchInto(); + if (chosenMonId == PARTY_SIZE) // just switch to the next mon { - if (GetMonData(&gPlayerParty[chosenMonId], MON_DATA_HP) != 0 - && chosenMonId != gBattlerPartyIndexes[playerMonIdentity] - && chosenMonId != gBattlerPartyIndexes[selfIdentity]) + u8 playerMonIdentity = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); + u8 selfIdentity = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT); + + for (chosenMonId = PARTY_SIZE / 2; chosenMonId < PARTY_SIZE; chosenMonId++) { - break; + if (GetMonData(&gPlayerParty[chosenMonId], MON_DATA_HP) != 0 + && chosenMonId != gBattlerPartyIndexes[playerMonIdentity] + && chosenMonId != gBattlerPartyIndexes[selfIdentity]) + { + break; + } } } + *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = chosenMonId; } - - *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = chosenMonId; BtlController_EmitChosenMonReturnValue(BUFFER_B, chosenMonId, NULL); PlayerPartnerBufferExecCompleted(); } diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 2e93d625d7..e7fc6fd84a 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -10,11 +10,13 @@ #include "battle_tv.h" #include "bg.h" #include "data.h" +#include "item_menu.h" #include "item_use.h" #include "link.h" #include "main.h" #include "m4a.h" #include "palette.h" +#include "party_menu.h" #include "pokeball.h" #include "pokemon.h" #include "recorded_battle.h" @@ -1436,12 +1438,17 @@ static void RecordedOpponentHandleChooseMove(void) static void RecordedOpponentHandleChooseItem(void) { + u8 byte1 = RecordedBattle_GetBattlerAction(RECORDED_ITEM_ID, gActiveBattler); + u8 byte2 = RecordedBattle_GetBattlerAction(RECORDED_ITEM_ID, gActiveBattler); + gBattleStruct->chosenItem[gActiveBattler] = (byte1 << 8) | byte2; + BtlController_EmitOneReturnValue(BUFFER_B, gBattleStruct->chosenItem[gActiveBattler]); RecordedOpponentBufferExecCompleted(); } static void RecordedOpponentHandleChoosePokemon(void) { *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = RecordedBattle_GetBattlerAction(RECORDED_PARTY_INDEX, gActiveBattler); + gSelectedMonPartyId = gBattleStruct->monToSwitchIntoId[gActiveBattler]; // Revival Blessing BtlController_EmitChosenMonReturnValue(BUFFER_B, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL); RecordedOpponentBufferExecCompleted(); } diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index 1906df8a8a..87f5758399 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -7,11 +7,13 @@ #include "battle_interface.h" #include "bg.h" #include "data.h" +#include "item_menu.h" #include "item_use.h" #include "link.h" #include "main.h" #include "m4a.h" #include "palette.h" +#include "party_menu.h" #include "pokeball.h" #include "pokemon.h" #include "recorded_battle.h" @@ -1460,12 +1462,17 @@ static void RecordedPlayerHandleChooseMove(void) static void RecordedPlayerHandleChooseItem(void) { + u8 byte1 = RecordedBattle_GetBattlerAction(RECORDED_ITEM_ID, gActiveBattler); + u8 byte2 = RecordedBattle_GetBattlerAction(RECORDED_ITEM_ID, gActiveBattler); + gBattleStruct->chosenItem[gActiveBattler] = (byte1 << 8) | byte2; + BtlController_EmitOneReturnValue(BUFFER_B, gBattleStruct->chosenItem[gActiveBattler]); RecordedPlayerBufferExecCompleted(); } static void RecordedPlayerHandleChoosePokemon(void) { *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = RecordedBattle_GetBattlerAction(RECORDED_PARTY_INDEX, gActiveBattler); + gSelectedMonPartyId = gBattleStruct->monToSwitchIntoId[gActiveBattler]; // Revival Blessing BtlController_EmitChosenMonReturnValue(BUFFER_B, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL); RecordedPlayerBufferExecCompleted(); } diff --git a/src/battle_controllers.c b/src/battle_controllers.c index 0814f6d126..d5d3e479e0 100644 --- a/src/battle_controllers.c +++ b/src/battle_controllers.c @@ -589,10 +589,10 @@ static void InitLinkBtlControllers(void) bool32 IsValidForBattle(struct Pokemon *mon) { - u32 species = GetMonData(mon, MON_DATA_SPECIES2); + u32 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); return (species != SPECIES_NONE && species != SPECIES_EGG && GetMonData(mon, MON_DATA_HP) != 0 - && GetMonData(mon, MON_DATA_IS_EGG) == 0); + && GetMonData(mon, MON_DATA_IS_EGG) == FALSE); } static void SetBattlePartyIds(void) diff --git a/src/battle_debug.c b/src/battle_debug.c index 027be03a45..1d690caaa0 100644 --- a/src/battle_debug.c +++ b/src/battle_debug.c @@ -774,7 +774,7 @@ static void Task_ShowAiPoints(u8 taskId) // Swap battler if it's player mon data->aiBattlerId = data->battlerId; - while (!IsBattlerAIControlled(data->aiBattlerId)) + while (!BattlerHasAi(data->aiBattlerId)) { if (++data->aiBattlerId >= gBattlersCount) data->aiBattlerId = 0; @@ -931,7 +931,7 @@ static void Task_ShowAiKnowledge(u8 taskId) // Swap battler if it's player mon data->aiBattlerId = data->battlerId; - while (!IsBattlerAIControlled(data->aiBattlerId)) + while (!BattlerHasAi(data->aiBattlerId)) { if (++data->aiBattlerId >= gBattlersCount) data->aiBattlerId = 0; diff --git a/src/battle_dome.c b/src/battle_dome.c index a5f73316ee..deae7e64f5 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -73,9 +73,33 @@ struct TourneyTreeLineSection #define tMode data[2] #define tPrevTaskId data[3] -#define EFFECTIVENESS_MODE_GOOD 0 -#define EFFECTIVENESS_MODE_BAD 1 -#define EFFECTIVENESS_MODE_AI_VS_AI 2 +enum { + EFFECTIVENESS_MODE_GOOD, + EFFECTIVENESS_MODE_BAD, + EFFECTIVENESS_MODE_AI_VS_AI, +}; + +// Window IDs for the tourney tree +enum { + TOURNEYWIN_NAMES_LEFT, + TOURNEYWIN_NAMES_RIGHT, + TOURNEYWIN_TITLE, +}; + +// Window IDs for the trainer (WIN_TRAINER_*) and match (WIN_MATCH_*) info cards. +// All 9 have a duplicate window at WIN + NUM_INFO_CARD_WINDOWS used by the alternate info card +enum { + WIN_TRAINER_NAME, + WIN_TRAINER_MON1_NAME, + WIN_TRAINER_MON2_NAME, // Used implicitly + WIN_TRAINER_MON3_NAME, // Used implicitly + WIN_TRAINER_FLAVOR_TEXT = WIN_TRAINER_MON1_NAME + FRONTIER_PARTY_SIZE, // Trainer's potential, battle style, and stat texts + WIN_MATCH_NUMBER, + WIN_MATCH_TRAINER_NAME_LEFT, + WIN_MATCH_TRAINER_NAME_RIGHT, + WIN_MATCH_WIN_TEXT, + NUM_INFO_CARD_WINDOWS +}; static u8 GetDomeTrainerMonIvs(u16); static void SwapDomeTrainers(int, int, u16 *); @@ -670,7 +694,7 @@ static const struct BgTemplate sInfoCardBgTemplates[4] = static const struct WindowTemplate sTourneyTreeWindowTemplates[] = { - { + [TOURNEYWIN_NAMES_LEFT] = { .bg = 0, .tilemapLeft = 0, .tilemapTop = 3, @@ -679,7 +703,7 @@ static const struct WindowTemplate sTourneyTreeWindowTemplates[] = .paletteNum = 15, .baseBlock = 16, }, - { + [TOURNEYWIN_NAMES_RIGHT] = { .bg = 0, .tilemapLeft = 22, .tilemapTop = 3, @@ -688,7 +712,7 @@ static const struct WindowTemplate sTourneyTreeWindowTemplates[] = .paletteNum = 15, .baseBlock = 144, }, - { + [TOURNEYWIN_TITLE] = { .bg = 0, .tilemapLeft = 8, .tilemapTop = 1, @@ -702,7 +726,7 @@ static const struct WindowTemplate sTourneyTreeWindowTemplates[] = static const struct WindowTemplate sInfoCardWindowTemplates[] = { - { + [WIN_TRAINER_NAME] = { .bg = 0, .tilemapLeft = 2, .tilemapTop = 2, @@ -711,7 +735,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 1, }, - { + [WIN_TRAINER_MON1_NAME] = { .bg = 0, .tilemapLeft = 16, .tilemapTop = 5, @@ -720,7 +744,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 53, }, - { + [WIN_TRAINER_MON2_NAME] = { .bg = 0, .tilemapLeft = 19, .tilemapTop = 7, @@ -729,7 +753,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 69, }, - { + [WIN_TRAINER_MON3_NAME] = { .bg = 0, .tilemapLeft = 16, .tilemapTop = 10, @@ -738,7 +762,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 96, }, - { + [WIN_TRAINER_FLAVOR_TEXT] = { .bg = 0, .tilemapLeft = 2, .tilemapTop = 12, @@ -747,7 +771,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 112, }, - { + [WIN_MATCH_NUMBER] = { .bg = 0, .tilemapLeft = 5, .tilemapTop = 2, @@ -756,7 +780,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 294, }, - { + [WIN_MATCH_TRAINER_NAME_LEFT] = { .bg = 0, .tilemapLeft = 2, .tilemapTop = 5, @@ -765,7 +789,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 340, }, - { + [WIN_MATCH_TRAINER_NAME_RIGHT] = { .bg = 0, .tilemapLeft = 20, .tilemapTop = 5, @@ -774,7 +798,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 356, }, - { + [WIN_MATCH_WIN_TEXT] = { .bg = 0, .tilemapLeft = 2, .tilemapTop = 16, @@ -783,7 +807,9 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 372, }, - { + // Duplicate windows used by the alternate info card + // Same as above but on bg 1 instead of bg 0 + [WIN_TRAINER_NAME + NUM_INFO_CARD_WINDOWS] = { .bg = 1, .tilemapLeft = 2, .tilemapTop = 2, @@ -792,7 +818,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 1, }, - { + [WIN_TRAINER_MON1_NAME + NUM_INFO_CARD_WINDOWS] = { .bg = 1, .tilemapLeft = 16, .tilemapTop = 5, @@ -801,7 +827,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 53, }, - { + [WIN_TRAINER_MON2_NAME + NUM_INFO_CARD_WINDOWS] = { .bg = 1, .tilemapLeft = 19, .tilemapTop = 7, @@ -810,7 +836,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 69, }, - { + [WIN_TRAINER_MON3_NAME + NUM_INFO_CARD_WINDOWS] = { .bg = 1, .tilemapLeft = 16, .tilemapTop = 10, @@ -819,7 +845,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 96, }, - { + [WIN_TRAINER_FLAVOR_TEXT + NUM_INFO_CARD_WINDOWS] = { .bg = 1, .tilemapLeft = 2, .tilemapTop = 12, @@ -828,7 +854,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 112, }, - { + [WIN_MATCH_NUMBER + NUM_INFO_CARD_WINDOWS] = { .bg = 1, .tilemapLeft = 5, .tilemapTop = 2, @@ -837,7 +863,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 294, }, - { + [WIN_MATCH_TRAINER_NAME_LEFT + NUM_INFO_CARD_WINDOWS] = { .bg = 1, .tilemapLeft = 2, .tilemapTop = 5, @@ -846,7 +872,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 340, }, - { + [WIN_MATCH_TRAINER_NAME_RIGHT + NUM_INFO_CARD_WINDOWS] = { .bg = 1, .tilemapLeft = 20, .tilemapTop = 5, @@ -855,7 +881,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 356, }, - { + [WIN_MATCH_WIN_TEXT + NUM_INFO_CARD_WINDOWS] = { .bg = 1, .tilemapLeft = 2, .tilemapTop = 16, @@ -1397,26 +1423,27 @@ static const u8 sCompetitorRangeByMatch[DOME_TOURNAMENT_MATCHES_COUNT][3] = { NUM_POSSIBLE_MATCH_TRAINERS(DOME_FINAL) * 0, NUM_POSSIBLE_MATCH_TRAINERS(DOME_FINAL), DOME_FINAL}, }; -// 1st value is the windowId (0 for left column, 1 for right column) -// 2nd value is the y coord +#define NAME_ROW_HEIGHT 16 + +// 1st value is the windowId, 2nd value is the y coord static const u8 sTrainerNamePositions[DOME_TOURNAMENT_TRAINERS_COUNT][2] = { - { 0, 0}, - { 1, 112}, - { 1, 0}, - { 0, 112}, - { 0, 48}, - { 1, 64}, - { 1, 48}, - { 0, 64}, - { 0, 16}, - { 1, 96}, - { 1, 16}, - { 0, 96}, - { 0, 32}, - { 1, 80}, - { 1, 32}, - { 0, 80}, + { TOURNEYWIN_NAMES_LEFT, 0 * NAME_ROW_HEIGHT}, + { TOURNEYWIN_NAMES_RIGHT, 7 * NAME_ROW_HEIGHT}, + { TOURNEYWIN_NAMES_RIGHT, 0 * NAME_ROW_HEIGHT}, + { TOURNEYWIN_NAMES_LEFT, 7 * NAME_ROW_HEIGHT}, + { TOURNEYWIN_NAMES_LEFT, 3 * NAME_ROW_HEIGHT}, + { TOURNEYWIN_NAMES_RIGHT, 4 * NAME_ROW_HEIGHT}, + { TOURNEYWIN_NAMES_RIGHT, 3 * NAME_ROW_HEIGHT}, + { TOURNEYWIN_NAMES_LEFT, 4 * NAME_ROW_HEIGHT}, + { TOURNEYWIN_NAMES_LEFT, 1 * NAME_ROW_HEIGHT}, + { TOURNEYWIN_NAMES_RIGHT, 6 * NAME_ROW_HEIGHT}, + { TOURNEYWIN_NAMES_RIGHT, 1 * NAME_ROW_HEIGHT}, + { TOURNEYWIN_NAMES_LEFT, 6 * NAME_ROW_HEIGHT}, + { TOURNEYWIN_NAMES_LEFT, 2 * NAME_ROW_HEIGHT}, + { TOURNEYWIN_NAMES_RIGHT, 5 * NAME_ROW_HEIGHT}, + { TOURNEYWIN_NAMES_RIGHT, 2 * NAME_ROW_HEIGHT}, + { TOURNEYWIN_NAMES_LEFT, 5 * NAME_ROW_HEIGHT}, }; // Coords for the pokeballs on the tourney tree that act as buttons to view trainer/match info @@ -2427,7 +2454,7 @@ static void InitDomeTrainers(void) break; } - if (sTrainerNamePositions[i][0] != 0) + if (sTrainerNamePositions[i][0] != TOURNEYWIN_NAMES_LEFT) { j = 0; DOME_TRAINERS[j].trainerId = TRAINER_FRONTIER_BRAIN; @@ -3420,11 +3447,11 @@ static void Task_HandleInfoCardInput(u8 taskId) case MATCHCARD_INPUT_UP ... MATCHCARD_INPUT_RIGHT: gTasks[taskId].data[5] = i; if (gTasks[taskId].tUsingAlternateSlot) - windowId = 9; + windowId = NUM_INFO_CARD_WINDOWS; else windowId = 0; - for (i = windowId; i < windowId + 9; i++) + for (i = windowId; i < windowId + NUM_INFO_CARD_WINDOWS; i++) { CopyWindowToVram(i, COPYWIN_GFX); FillWindowPixelBuffer(i, PIXEL_FILL(0)); @@ -4246,14 +4273,14 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId) int trainerId = 0; u8 nature = 0; int arrId = 0; - int windowId = 0; + int windowId = WIN_TRAINER_NAME; int x = 0, y = 0; u8 palSlot = 0; s16 *allocatedArray = AllocZeroed(sizeof(s16) * ALLOC_ARRAY_SIZE); trainerId = DOME_TRAINERS[trainerTourneyId].trainerId; if (flags & CARD_ALTERNATE_SLOT) - arrId = 2 * (FRONTIER_PARTY_SIZE + 1), windowId = 9, palSlot = 2; + arrId = 2 * (FRONTIER_PARTY_SIZE + 1), windowId = WIN_TRAINER_NAME + NUM_INFO_CARD_WINDOWS, palSlot = 2; if (flags & MOVE_CARD_RIGHT) x = DISPLAY_WIDTH + 16; if (flags & MOVE_CARD_DOWN) @@ -4371,19 +4398,19 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId) else textPrinter.currentChar = gSpeciesNames[gFacilityTrainerMons[DOME_MONS[trainerTourneyId][i]].species]; - textPrinter.windowId = 1 + i + windowId; + textPrinter.windowId = WIN_TRAINER_MON1_NAME + i + windowId; if (i == 1) textPrinter.currentX = 7; else textPrinter.currentX = 0; - PutWindowTilemap(1 + i + windowId); - CopyWindowToVram(1 + i + windowId, COPYWIN_FULL); + PutWindowTilemap(WIN_TRAINER_MON1_NAME + i + windowId); + CopyWindowToVram(WIN_TRAINER_MON1_NAME + i + windowId, COPYWIN_FULL); AddTextPrinter(&textPrinter, 0, NULL); } - PutWindowTilemap(windowId + 4); - CopyWindowToVram(windowId + 4, COPYWIN_FULL); + PutWindowTilemap(windowId + WIN_TRAINER_FLAVOR_TEXT); + CopyWindowToVram(windowId + WIN_TRAINER_FLAVOR_TEXT, COPYWIN_FULL); // Print text about trainers potential in the tourney if (trainerId == TRAINER_FRONTIER_BRAIN) @@ -4392,7 +4419,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId) textPrinter.currentChar = sBattleDomePotentialTexts[trainerTourneyId]; textPrinter.fontId = FONT_NORMAL; - textPrinter.windowId = windowId + 4; + textPrinter.windowId = windowId + WIN_TRAINER_FLAVOR_TEXT; textPrinter.currentX = 0; textPrinter.y = 4; textPrinter.currentY = 4; @@ -4713,7 +4740,7 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo) u8 palSlot = 0; if (flags & CARD_ALTERNATE_SLOT) - arrId = 2 * (FRONTIER_PARTY_SIZE + 1), windowId = 9, palSlot = 2; + arrId = 2 * (FRONTIER_PARTY_SIZE + 1), windowId = NUM_INFO_CARD_WINDOWS, palSlot = 2; if (flags & MOVE_CARD_RIGHT) x = DISPLAY_WIDTH + 16; if (flags & MOVE_CARD_DOWN) @@ -4855,10 +4882,10 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo) textPrinter.shadowColor = TEXT_DYNAMIC_COLOR_4; StringExpandPlaceholders(gStringVar4, sBattleDomeWinTexts[winStringId]); textPrinter.currentChar = gStringVar4; - textPrinter.windowId = windowId + 8; + textPrinter.windowId = windowId + WIN_MATCH_WIN_TEXT; textPrinter.fontId = FONT_NORMAL; - PutWindowTilemap(windowId + 8); - CopyWindowToVram(windowId + 8, COPYWIN_FULL); + PutWindowTilemap(windowId + WIN_MATCH_WIN_TEXT); + CopyWindowToVram(windowId + WIN_MATCH_WIN_TEXT, COPYWIN_FULL); textPrinter.currentX = 0; textPrinter.currentY = textPrinter.y = 0; AddTextPrinter(&textPrinter, 0, NULL); @@ -4874,11 +4901,11 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo) textPrinter.fontId = FONT_SHORT; textPrinter.letterSpacing = 2; textPrinter.currentChar = gStringVar1; - textPrinter.windowId = windowId + 6; + textPrinter.windowId = windowId + WIN_MATCH_TRAINER_NAME_LEFT; textPrinter.currentX = GetStringCenterAlignXOffsetWithLetterSpacing(textPrinter.fontId, textPrinter.currentChar, 0x40, textPrinter.letterSpacing); textPrinter.currentY = textPrinter.y = 2; - PutWindowTilemap(windowId + 6); - CopyWindowToVram(windowId + 6, COPYWIN_FULL); + PutWindowTilemap(windowId + WIN_MATCH_TRAINER_NAME_LEFT); + CopyWindowToVram(windowId + WIN_MATCH_TRAINER_NAME_LEFT, COPYWIN_FULL); AddTextPrinter(&textPrinter, 0, NULL); // Print right trainer's name. @@ -4890,21 +4917,21 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo) CopyDomeTrainerName(gStringVar1, trainerIds[1]); textPrinter.currentChar = gStringVar1; - textPrinter.windowId = windowId + 7; + textPrinter.windowId = windowId + WIN_MATCH_TRAINER_NAME_RIGHT; textPrinter.currentX = GetStringCenterAlignXOffsetWithLetterSpacing(textPrinter.fontId, textPrinter.currentChar, 0x40, textPrinter.letterSpacing); textPrinter.currentY = textPrinter.y = 2; - PutWindowTilemap(windowId + 7); - CopyWindowToVram(windowId + 7, COPYWIN_FULL); + PutWindowTilemap(windowId + WIN_MATCH_TRAINER_NAME_RIGHT); + CopyWindowToVram(windowId + WIN_MATCH_TRAINER_NAME_RIGHT, COPYWIN_FULL); AddTextPrinter(&textPrinter, 0, NULL); // Print match number. textPrinter.letterSpacing = 0; textPrinter.currentChar = sBattleDomeMatchNumberTexts[matchNo]; - textPrinter.windowId = windowId + 5; + textPrinter.windowId = windowId + WIN_MATCH_NUMBER; textPrinter.currentX = GetStringCenterAlignXOffsetWithLetterSpacing(textPrinter.fontId, textPrinter.currentChar, 0xA0, textPrinter.letterSpacing); textPrinter.currentY = textPrinter.y = 2; - PutWindowTilemap(windowId + 5); - CopyWindowToVram(windowId + 5, COPYWIN_FULL); + PutWindowTilemap(windowId + WIN_MATCH_NUMBER); + CopyWindowToVram(windowId + WIN_MATCH_NUMBER, COPYWIN_FULL); AddTextPrinter(&textPrinter, 0, NULL); } @@ -5338,7 +5365,7 @@ static void Task_ShowTourneyTree(u8 taskId) case 4: textPrinter.fontId = FONT_SHORT; textPrinter.currentChar = gText_BattleTourney; - textPrinter.windowId = 2; + textPrinter.windowId = TOURNEYWIN_TITLE; textPrinter.x = 0; textPrinter.y = 0; textPrinter.letterSpacing = 2; @@ -5424,7 +5451,7 @@ static void Task_ShowTourneyTree(u8 taskId) } } - if (sTrainerNamePositions[i][0] == 0) + if (sTrainerNamePositions[i][0] == TOURNEYWIN_NAMES_LEFT) textPrinter.currentX = GetStringWidthDifference(textPrinter.fontId, gDisplayedStringBattle, 0x3D, textPrinter.letterSpacing); else textPrinter.currentX = 3; @@ -5436,12 +5463,12 @@ static void Task_ShowTourneyTree(u8 taskId) gTasks[taskId].tState++; break; case 5: - PutWindowTilemap(0); - PutWindowTilemap(1); - PutWindowTilemap(2); - CopyWindowToVram(0, COPYWIN_FULL); - CopyWindowToVram(1, COPYWIN_FULL); - CopyWindowToVram(2, COPYWIN_FULL); + PutWindowTilemap(TOURNEYWIN_NAMES_LEFT); + PutWindowTilemap(TOURNEYWIN_NAMES_RIGHT); + PutWindowTilemap(TOURNEYWIN_TITLE); + CopyWindowToVram(TOURNEYWIN_NAMES_LEFT, COPYWIN_FULL); + CopyWindowToVram(TOURNEYWIN_NAMES_RIGHT, COPYWIN_FULL); + CopyWindowToVram(TOURNEYWIN_TITLE, COPYWIN_FULL); SetHBlankCallback(HblankCb_TourneyTree); SetVBlankCallback(VblankCb_TourneyTree); if (r4 == 2) @@ -5538,7 +5565,7 @@ static void Task_HandleStaticTourneyTreeInput(u8 taskId) if (DOME_TRAINERS[i].eliminatedAt == gSaveBlock2Ptr->frontier.curChallengeBattleNum - 1 && DOME_TRAINERS[i].isEliminated) { - if (sTrainerNamePositions[i][0] == 0) + if (sTrainerNamePositions[i][0] == TOURNEYWIN_NAMES_LEFT) textPrinter.currentX = GetStringWidthDifference(textPrinter.fontId, gDisplayedStringBattle, 0x3D, textPrinter.letterSpacing); else textPrinter.currentX = 3; diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 193452613b..bc541f0a01 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -557,6 +557,9 @@ static void BattleLoadMonSpriteGfx(struct Pokemon *mon, u32 battlerId, bool32 op if (illusionMon != NULL) mon = illusionMon; + if (GetMonData(mon, MON_DATA_IS_EGG)) // Don't load GFX of egg pokemon. + return; + monsPersonality = GetMonData(mon, MON_DATA_PERSONALITY); if (gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies == SPECIES_NONE) { @@ -688,6 +691,7 @@ bool8 BattleLoadAllHealthBoxesGfx(u8 state) { LoadSpritePalette(&sSpritePalettes_HealthBoxHealthBar[0]); LoadSpritePalette(&sSpritePalettes_HealthBoxHealthBar[1]); + MegaIndicator_LoadSpritesGfx(); } else if (!IsDoubleBattle()) { diff --git a/src/battle_interface.c b/src/battle_interface.c index 9c0db8b074..bbe61a3727 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -182,6 +182,10 @@ static void SpriteCB_StatusSummaryBalls_Exit(struct Sprite *); static void SpriteCB_StatusSummaryBalls_OnSwitchout(struct Sprite *); static void SpriteCb_MegaTrigger(struct Sprite *); +static void MegaIndicator_SetVisibilities(u32 healthboxId, bool32 invisible); +static void MegaIndicator_UpdateLevel(u32 healthboxId, u32 level); +static void MegaIndicator_CreateSprites(u32 battlerId, u32 healthboxSpriteId); +static void MegaIndicator_UpdateOamPriorities(u32 healthboxId, u32 oamPriority); static void SpriteCb_MegaIndicator(struct Sprite *); static u8 GetStatusIconForBattlerId(u8, u8); @@ -602,7 +606,7 @@ static const struct WindowTemplate sHealthboxWindowTemplate = { .baseBlock = 0 }; -static const u8 sMegaTriggerGfx[] = INCBIN_U8("graphics/battle_interface/mega_trigger.4bpp"); +static const u8 ALIGNED(4) sMegaTriggerGfx[] = INCBIN_U8("graphics/battle_interface/mega_trigger.4bpp"); static const u16 sMegaTriggerPal[] = INCBIN_U16("graphics/battle_interface/mega_trigger.gbapal"); static const struct SpriteSheet sSpriteSheet_MegaTrigger = @@ -660,90 +664,6 @@ static const struct SpriteTemplate sSpriteTemplate_MegaTrigger = .callback = SpriteCb_MegaTrigger }; -static const u8 sMegaIndicatorGfx[] = INCBIN_U8("graphics/battle_interface/mega_indicator.4bpp"); -static const u16 sMegaIndicatorPal[] = INCBIN_U16("graphics/battle_interface/mega_indicator.gbapal"); - -static const struct SpriteSheet sSpriteSheet_MegaIndicator = -{ - sMegaIndicatorGfx, sizeof(sMegaIndicatorGfx), TAG_MEGA_INDICATOR_TILE -}; -static const struct SpritePalette sSpritePalette_MegaIndicator = -{ - sMegaIndicatorPal, TAG_MEGA_INDICATOR_PAL -}; - -static const u8 sAlphaIndicatorGfx[] = INCBIN_U8("graphics/battle_interface/alpha_indicator.4bpp"); -static const u16 sAlphaIndicatorPal[] = INCBIN_U16("graphics/battle_interface/alpha_indicator.gbapal"); -static const u8 sOmegaIndicatorGfx[] = INCBIN_U8("graphics/battle_interface/omega_indicator.4bpp"); -static const u16 sOmegaIndicatorPal[] = INCBIN_U16("graphics/battle_interface/omega_indicator.gbapal"); - -static const struct SpriteSheet sSpriteSheet_AlphaIndicator = -{ - sAlphaIndicatorGfx, sizeof(sAlphaIndicatorGfx), TAG_ALPHA_INDICATOR_TILE -}; -static const struct SpritePalette sSpritePalette_AlphaIndicator = -{ - sAlphaIndicatorPal, TAG_ALPHA_INDICATOR_PAL -}; -static const struct SpriteSheet sSpriteSheet_OmegaIndicator = -{ - sOmegaIndicatorGfx, sizeof(sOmegaIndicatorGfx), TAG_OMEGA_INDICATOR_TILE -}; -static const struct SpritePalette sSpritePalette_OmegaIndicator = -{ - sOmegaIndicatorPal, TAG_OMEGA_INDICATOR_PAL -}; - -static const struct OamData sOamData_MegaIndicator = -{ - .y = 0, - .affineMode = 0, - .objMode = 0, - .mosaic = 0, - .bpp = 0, - .shape = SPRITE_SHAPE(16x16), - .x = 0, - .matrixNum = 0, - .size = SPRITE_SIZE(16x16), - .tileNum = 0, - .priority = 1, - .paletteNum = 0, - .affineParam = 0, -}; - -static const struct SpriteTemplate sSpriteTemplate_MegaIndicator = -{ - .tileTag = TAG_MEGA_INDICATOR_TILE, - .paletteTag = TAG_MEGA_INDICATOR_PAL, - .oam = &sOamData_MegaIndicator, - .anims = gDummySpriteAnimTable, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCb_MegaIndicator, -}; - -static const struct SpriteTemplate sSpriteTemplate_AlphaIndicator = -{ - .tileTag = TAG_ALPHA_INDICATOR_TILE, - .paletteTag = TAG_ALPHA_INDICATOR_PAL, - .oam = &sOamData_MegaIndicator, - .anims = gDummySpriteAnimTable, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCb_MegaIndicator, -}; - -static const struct SpriteTemplate sSpriteTemplate_OmegaIndicator = -{ - .tileTag = TAG_OMEGA_INDICATOR_TILE, - .paletteTag = TAG_OMEGA_INDICATOR_PAL, - .oam = &sOamData_MegaIndicator, - .anims = gDummySpriteAnimTable, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCb_MegaIndicator, -}; - // Because the healthbox is too large to fit into one sprite, it is divided into two sprites. // healthboxLeft or healthboxMain is the left part that is used as the 'main' sprite. // healthboxRight or healthboxOther is the right part of the healthbox. @@ -751,26 +671,18 @@ static const struct SpriteTemplate sSpriteTemplate_OmegaIndicator = // data fields for healthboxMain // oam.affineParam holds healthboxRight spriteId +#define hMain_MegaIndicatorIds data[3] // Mega, Alpha, Omega as u8 in data[3], data[3] + 1, data[4] #define hMain_HealthBarSpriteId data[5] #define hMain_Battler data[6] #define hMain_Data7 data[7] // data fields for healthboxRight #define hOther_HealthBoxSpriteId data[5] -#define hOther_IndicatorSpriteId data[6] // For Mega Evo // data fields for healthbar #define hBar_HealthBoxSpriteId data[5] #define hBar_Data6 data[6] -u8 GetMegaIndicatorSpriteId(u32 healthboxSpriteId) -{ - u8 spriteId = gSprites[healthboxSpriteId].oam.affineParam; - if (spriteId >= MAX_SPRITES) - return 0xFF; - return gSprites[spriteId].hOther_IndicatorSpriteId; -} - static void InitLastUsedBallAssets(void) { gBattleStruct->ballSpriteIds[0] = MAX_SPRITES; @@ -778,12 +690,17 @@ static void InitLastUsedBallAssets(void) } // This function is here to cover a specific case - one player's mon in a 2 vs 1 double battle. In this scenario - display singles layout. +// The same goes for a 2 vs 1 where opponent has only one pokemon. u32 WhichBattleCoords(u32 battlerId) // 0 - singles, 1 - doubles { if (GetBattlerPosition(battlerId) == B_POSITION_PLAYER_LEFT && gPlayerPartyCount == 1 && !(gBattleTypeFlags & BATTLE_TYPE_MULTI)) return 0; + else if (GetBattlerPosition(battlerId) == B_POSITION_OPPONENT_LEFT + && gEnemyPartyCount == 1 + && !(gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)) + return 0; else return IsDoubleBattle(); } @@ -864,19 +781,13 @@ u8 CreateBattlerHealthboxSprites(u8 battlerId) gSprites[healthboxLeftSpriteId].invisible = TRUE; gSprites[healthboxRightSpriteId].invisible = TRUE; - gSprites[healthboxRightSpriteId].hOther_IndicatorSpriteId = 0xFF; healthBarSpritePtr->hBar_HealthBoxSpriteId = healthboxLeftSpriteId; healthBarSpritePtr->hBar_Data6 = data6; healthBarSpritePtr->invisible = TRUE; - // Create mega indicator sprite if is a mega evolved or a primal reverted mon. - if (gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]] - || gBattleStruct->mega.primalRevertedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) - { - megaIndicatorSpriteId = CreateMegaIndicatorSprite(battlerId, 0); - gSprites[megaIndicatorSpriteId].invisible = TRUE; - } + // Create mega indicator sprites. + MegaIndicator_CreateSprites(battlerId, healthboxLeftSpriteId); gBattleStruct->ballSpriteIds[0] = MAX_SPRITES; gBattleStruct->ballSpriteIds[1] = MAX_SPRITES; @@ -899,8 +810,6 @@ u8 CreateSafariPlayerHealthboxSprites(void) gSprites[healthboxLeftSpriteId].oam.affineParam = healthboxRightSpriteId; gSprites[healthboxRightSpriteId].hOther_HealthBoxSpriteId = healthboxLeftSpriteId; - gSprites[healthboxRightSpriteId].hOther_IndicatorSpriteId = 0xFF; - gSprites[healthboxRightSpriteId].callback = SpriteCB_HealthBoxOther; return healthboxLeftSpriteId; @@ -940,19 +849,12 @@ static void SpriteCB_HealthBar(struct Sprite *sprite) static void SpriteCB_HealthBoxOther(struct Sprite *sprite) { u8 healthboxMainSpriteId = sprite->hOther_HealthBoxSpriteId; - u8 megaSpriteId = sprite->hOther_IndicatorSpriteId; sprite->x = gSprites[healthboxMainSpriteId].x + 64; sprite->y = gSprites[healthboxMainSpriteId].y; sprite->x2 = gSprites[healthboxMainSpriteId].x2; sprite->y2 = gSprites[healthboxMainSpriteId].y2; - - if (megaSpriteId != 0xFF) - { - gSprites[megaSpriteId].x2 = sprite->x2; - gSprites[megaSpriteId].y2 = sprite->y2; - } } void SetBattleBarStruct(u8 battlerId, u8 healthboxSpriteId, s32 maxVal, s32 oldVal, s32 receivedValue) @@ -966,28 +868,18 @@ void SetBattleBarStruct(u8 battlerId, u8 healthboxSpriteId, s32 maxVal, s32 oldV void SetHealthboxSpriteInvisible(u8 healthboxSpriteId) { - DestroyMegaIndicatorSprite(healthboxSpriteId); gSprites[healthboxSpriteId].invisible = TRUE; gSprites[gSprites[healthboxSpriteId].hMain_HealthBarSpriteId].invisible = TRUE; gSprites[gSprites[healthboxSpriteId].oam.affineParam].invisible = TRUE; + MegaIndicator_SetVisibilities(healthboxSpriteId, TRUE); } void SetHealthboxSpriteVisible(u8 healthboxSpriteId) { - u8 battlerId = gSprites[healthboxSpriteId].hMain_Battler; - gSprites[healthboxSpriteId].invisible = FALSE; gSprites[gSprites[healthboxSpriteId].hMain_HealthBarSpriteId].invisible = FALSE; gSprites[gSprites[healthboxSpriteId].oam.affineParam].invisible = FALSE; - if (gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]] - || gBattleStruct->mega.primalRevertedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) - { - u8 spriteId = GetMegaIndicatorSpriteId(healthboxSpriteId); - if (spriteId != 0xFF) - gSprites[spriteId].invisible = FALSE; - else - CreateMegaIndicatorSprite(battlerId, 0); - } + MegaIndicator_SetVisibilities(healthboxSpriteId, FALSE); } static void UpdateSpritePos(u8 spriteId, s16 x, s16 y) @@ -996,39 +888,24 @@ static void UpdateSpritePos(u8 spriteId, s16 x, s16 y) gSprites[spriteId].y = y; } -void DestoryHealthboxSprite(u8 healthboxSpriteId) -{ - DestroyMegaIndicatorSprite(healthboxSpriteId); - DestroySprite(&gSprites[gSprites[healthboxSpriteId].oam.affineParam]); - DestroySprite(&gSprites[gSprites[healthboxSpriteId].hMain_HealthBarSpriteId]); - DestroySprite(&gSprites[healthboxSpriteId]); -} - void DummyBattleInterfaceFunc(u8 healthboxSpriteId, bool8 isDoubleBattleBattlerOnly) { } -static void TryToggleHealboxVisibility(u8 priority, u8 healthboxLeftSpriteId, u8 healthboxRightSpriteId, u8 healthbarSpriteId, u8 indicatorSpriteId) +static void TryToggleHealboxVisibility(u32 priority, u32 healthboxLeftSpriteId, u32 healthboxRightSpriteId, u32 healthbarSpriteId) { - u8 spriteIds[4] = {healthboxLeftSpriteId, healthboxRightSpriteId, healthbarSpriteId, indicatorSpriteId}; - int i; + bool32 invisible = FALSE; - for (i = 0; i < NELEMS(spriteIds); i++) - { - if (spriteIds[i] == 0xFF) - continue; + if (priority == 0) // start of anim -> make invisible + invisible = TRUE; + else if (priority == 1) // end of anim -> make visible + invisible = FALSE; - switch (priority) - { - case 0: //start of anim -> make invisible - gSprites[spriteIds[i]].invisible = TRUE; - break; - case 1: //end of anim -> make visible - gSprites[spriteIds[i]].invisible = FALSE; - break; - } - } + gSprites[healthboxLeftSpriteId].invisible = invisible; + gSprites[healthboxRightSpriteId].invisible = invisible; + gSprites[healthbarSpriteId].invisible = invisible; + MegaIndicator_SetVisibilities(healthboxLeftSpriteId, invisible); } void UpdateOamPriorityInAllHealthboxes(u8 priority, bool32 hideHPBoxes) @@ -1040,17 +917,16 @@ void UpdateOamPriorityInAllHealthboxes(u8 priority, bool32 hideHPBoxes) u8 healthboxLeftSpriteId = gHealthboxSpriteIds[i]; u8 healthboxRightSpriteId = gSprites[gHealthboxSpriteIds[i]].oam.affineParam; u8 healthbarSpriteId = gSprites[gHealthboxSpriteIds[i]].hMain_HealthBarSpriteId; - u8 indicatorSpriteId = GetMegaIndicatorSpriteId(healthboxLeftSpriteId); gSprites[healthboxLeftSpriteId].oam.priority = priority; gSprites[healthboxRightSpriteId].oam.priority = priority; gSprites[healthbarSpriteId].oam.priority = priority; - if (indicatorSpriteId != 0xFF) - gSprites[indicatorSpriteId].oam.priority = priority; + + MegaIndicator_UpdateOamPriorities(healthboxLeftSpriteId, priority); #if B_HIDE_HEALTHBOX_IN_ANIMS if (hideHPBoxes && IsBattlerAlive(i)) - TryToggleHealboxVisibility(priority, healthboxLeftSpriteId, healthboxRightSpriteId, healthbarSpriteId, indicatorSpriteId); + TryToggleHealboxVisibility(priority, healthboxLeftSpriteId, healthboxRightSpriteId, healthbarSpriteId); #endif } } @@ -1109,6 +985,8 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl) { objVram = ConvertIntToDecimalStringN(text, lvl, STR_CONV_MODE_LEFT_ALIGN, 3); xPos = 5 * (3 - (objVram - (text + 2))) - 1; + MegaIndicator_UpdateLevel(healthboxSpriteId, lvl); + MegaIndicator_SetVisibilities(healthboxSpriteId, FALSE); } else { @@ -1119,7 +997,6 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl) xPos = 5 * (3 - (objVram - (text + 2))); } - xPos = 5 * (3 - (objVram - (text + 2))); windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, xPos, 3, 2, &windowId); spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP; @@ -1418,7 +1295,7 @@ void SwapHpBarsWithHpText(void) } } -// Mega Evolution gfx functions. +// Mega Evolution Trigger icon functions. void ChangeMegaTriggerSprite(u8 spriteId, u8 animId) { StartSpriteAnim(&gSprites[spriteId], animId); @@ -1543,6 +1420,64 @@ void DestroyMegaTriggerSprite(void) gBattleStruct->mega.triggerSpriteId = 0xFF; } +#undef tBattler +#undef tHide + +// Code for Mega Evolution (And Alpha/Omega) Trigger icon visible on the battler's healthbox. +enum +{ + INDICATOR_MEGA, + INDICATOR_ALPHA, + INDICATOR_OMEGA, + INDICATOR_COUNT, +}; + +static const u8 ALIGNED(4) sMegaIndicatorGfx[] = INCBIN_U8("graphics/battle_interface/mega_indicator.4bpp"); +static const u16 sMegaIndicatorPal[] = INCBIN_U16("graphics/battle_interface/mega_indicator.gbapal"); +static const u8 ALIGNED(4) sAlphaIndicatorGfx[] = INCBIN_U8("graphics/battle_interface/alpha_indicator.4bpp"); +static const u8 ALIGNED(4) sOmegaIndicatorGfx[] = INCBIN_U8("graphics/battle_interface/omega_indicator.4bpp"); +static const u16 sAlphaOmegaIndicatorPal[] = INCBIN_U16("graphics/battle_interface/alpha_indicator.gbapal"); + +static const struct SpriteSheet sMegaIndicator_SpriteSheets[] = +{ + [INDICATOR_MEGA] = {sMegaIndicatorGfx, sizeof(sMegaIndicatorGfx), TAG_MEGA_INDICATOR_TILE}, + [INDICATOR_ALPHA] = {sAlphaIndicatorGfx, sizeof(sAlphaIndicatorGfx), TAG_ALPHA_INDICATOR_TILE}, + [INDICATOR_OMEGA] = {sOmegaIndicatorGfx, sizeof(sOmegaIndicatorGfx), TAG_OMEGA_INDICATOR_TILE}, + [INDICATOR_COUNT] = {0} +}; +static const struct SpritePalette sMegaIndicator_SpritePalettes[] = +{ + [INDICATOR_MEGA] = {sMegaIndicatorPal, TAG_MEGA_INDICATOR_PAL}, + [INDICATOR_ALPHA] = {sAlphaOmegaIndicatorPal, TAG_ALPHA_OMEGA_INDICATOR_PAL}, + [INDICATOR_OMEGA] = {sAlphaOmegaIndicatorPal, TAG_ALPHA_OMEGA_INDICATOR_PAL}, + [INDICATOR_COUNT] = {0} +}; + +static const struct OamData sOamData_MegaIndicator = +{ + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), + .priority = 1, +}; + +static const struct SpriteTemplate sSpriteTemplate_MegaIndicator = +{ + .tileTag = TAG_MEGA_INDICATOR_TILE, + .paletteTag = TAG_MEGA_INDICATOR_PAL, + .oam = &sOamData_MegaIndicator, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCb_MegaIndicator, +}; + +static const u16 sMegaIndicatorTags[][2] = +{ + [INDICATOR_MEGA] = {TAG_MEGA_INDICATOR_TILE, TAG_MEGA_INDICATOR_PAL}, + [INDICATOR_ALPHA] = {TAG_ALPHA_INDICATOR_TILE, TAG_ALPHA_OMEGA_INDICATOR_PAL}, + [INDICATOR_OMEGA] = {TAG_OMEGA_INDICATOR_TILE, TAG_ALPHA_OMEGA_INDICATOR_PAL}, +}; + static const s8 sIndicatorPositions[][2] = { [B_POSITION_PLAYER_LEFT] = {52, -9}, @@ -1551,89 +1486,131 @@ static const s8 sIndicatorPositions[][2] = [B_POSITION_OPPONENT_RIGHT] = {44, -9}, }; -u32 CreateMegaIndicatorSprite(u32 battlerId, u32 which) +// for sprite data fields +#define tBattler data[0] +#define tType data[1] // Indicator type: mega, alpha, omega +#define tPosX data[2] +#define tLevelXDelta data[3] // X position depends whether level has 3, 2 or 1 digit + +void MegaIndicator_LoadSpritesGfx(void) { - u32 spriteId, position; - s16 x, y; - - if (gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) - { - LoadSpritePalette(&sSpritePalette_MegaIndicator); - LoadSpriteSheet(&sSpriteSheet_MegaIndicator); - } - else if (gBattleStruct->mega.primalRevertedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) - { - if (GET_BASE_SPECIES_ID(gBattleMons[battlerId].species) == SPECIES_GROUDON) - { - LoadSpritePalette(&sSpritePalette_OmegaIndicator); - LoadSpriteSheet(&sSpriteSheet_OmegaIndicator); - } - else if (GET_BASE_SPECIES_ID(gBattleMons[battlerId].species) == SPECIES_KYOGRE) - { - LoadSpritePalette(&sSpritePalette_AlphaIndicator); - LoadSpriteSheet(&sSpriteSheet_AlphaIndicator); - } - } - - position = GetBattlerPosition(battlerId); - GetBattlerHealthboxCoords(battlerId, &x, &y); - - x += sIndicatorPositions[position][0]; - y += sIndicatorPositions[position][1]; - - if (gBattleMons[battlerId].level >= 100) - x -= 4; - else if (gBattleMons[battlerId].level < 10) - x += 5; - - if (gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) - { - spriteId = CreateSpriteAtEnd(&sSpriteTemplate_MegaIndicator, x, y, 0); - } - else if (gBattleStruct->mega.primalRevertedPartyIds[GetBattlerSide(battlerId)] & gBitTable[gBattlerPartyIndexes[battlerId]]) - { - if (GET_BASE_SPECIES_ID(gBattleMons[battlerId].species) == SPECIES_GROUDON) - spriteId = CreateSpriteAtEnd(&sSpriteTemplate_OmegaIndicator, x, y, 0); - else if (GET_BASE_SPECIES_ID(gBattleMons[battlerId].species) == SPECIES_KYOGRE) - spriteId = CreateSpriteAtEnd(&sSpriteTemplate_AlphaIndicator, x, y, 0); - } - - gSprites[gSprites[gHealthboxSpriteIds[battlerId]].oam.affineParam].hOther_IndicatorSpriteId = spriteId; - gSprites[spriteId].tBattler = battlerId; - return spriteId; + LoadSpriteSheets(sMegaIndicator_SpriteSheets); + LoadSpritePalettes(sMegaIndicator_SpritePalettes); } -void DestroyMegaIndicatorSprite(u32 healthboxSpriteId) +static bool32 MegaIndicator_ShouldBeInvisible(u32 battlerId, u32 indicatorType) +{ + u32 side = GetBattlerSide(battlerId); + if (indicatorType == INDICATOR_MEGA) + { + if (gBattleStruct->mega.evolvedPartyIds[side] & gBitTable[gBattlerPartyIndexes[battlerId]]) + return FALSE; + } + else + { + if (indicatorType == INDICATOR_ALPHA) + { + if (gBattleMons[battlerId].species != SPECIES_KYOGRE_PRIMAL) + return TRUE; + } + else if (indicatorType == INDICATOR_OMEGA) + { + if (gBattleMons[battlerId].species != SPECIES_GROUDON_PRIMAL) + return TRUE; + } + if (gBattleStruct->mega.primalRevertedPartyIds[side] & gBitTable[gBattlerPartyIndexes[battlerId]]) + return FALSE; + } + return TRUE; +} + +static u8 *MegaIndicator_GetSpriteIds(u32 healthboxSpriteId) +{ + u8 *spriteIds = (u8 *)(&gSprites[healthboxSpriteId].hMain_MegaIndicatorIds); + return spriteIds; +} + +void MegaIndicator_SetVisibilities(u32 healthboxId, bool32 invisible) { u32 i; - s16 *spriteId = &gSprites[gSprites[healthboxSpriteId].oam.affineParam].hOther_IndicatorSpriteId; + u8 *spriteIds = MegaIndicator_GetSpriteIds(healthboxId); + u32 battlerId = gSprites[healthboxId].hMain_Battler; - if (*spriteId != 0xFF) - { - DestroySprite(&gSprites[*spriteId]); - *spriteId = 0xFF; - } + if (GetSafariZoneFlag()) + return; - for (i = 0; i < MAX_BATTLERS_COUNT; i++) + for (i = 0; i < INDICATOR_COUNT; i++) { - if (gSprites[gSprites[gHealthboxSpriteIds[i]].oam.affineParam].hOther_IndicatorSpriteId != 0xFF) - break; + if (invisible == TRUE) + gSprites[spriteIds[i]].invisible = TRUE; + else // Try visible. + gSprites[spriteIds[i]].invisible = MegaIndicator_ShouldBeInvisible(battlerId, i); } - // Free Sprite pal/tiles only if no indicator sprite is active for all battlers. - if (i == MAX_BATTLERS_COUNT) +} + +static void MegaIndicator_UpdateOamPriorities(u32 healthboxId, u32 oamPriority) +{ + u32 i; + u8 *spriteIds = MegaIndicator_GetSpriteIds(healthboxId); + for (i = 0; i < INDICATOR_COUNT; i++) + gSprites[spriteIds[i]].oam.priority = oamPriority; +} + +static void MegaIndicator_UpdateLevel(u32 healthboxId, u32 level) +{ + u32 i; + s16 xDelta = 0; + u8 *spriteIds = MegaIndicator_GetSpriteIds(healthboxId); + + if (level >= 100) + xDelta -= 4; + else if (level < 10) + xDelta += 5; + + for (i = 0; i < INDICATOR_COUNT; i++) + gSprites[spriteIds[i]].tLevelXDelta = xDelta; +} + +static void MegaIndicator_CreateSprites(u32 battlerId, u32 healthboxSpriteId) +{ + u32 position, i, level; + u8 *spriteIds; + s16 xHealthbox = 0, y = 0; + s32 x = 0; + + position = GetBattlerPosition(battlerId); + GetBattlerHealthboxCoords(battlerId, &xHealthbox, &y); + + x = sIndicatorPositions[position][0]; + y += sIndicatorPositions[position][1]; + + spriteIds = MegaIndicator_GetSpriteIds(healthboxSpriteId); + for (i = 0; i < INDICATOR_COUNT; i++) { - FreeSpritePaletteByTag(TAG_MEGA_INDICATOR_PAL); - FreeSpriteTilesByTag(TAG_MEGA_INDICATOR_TILE); + struct SpriteTemplate sprTemplate = sSpriteTemplate_MegaIndicator; + sprTemplate.tileTag = sMegaIndicatorTags[i][0]; + sprTemplate.paletteTag = sMegaIndicatorTags[i][1]; + spriteIds[i] = CreateSpriteAtEnd(&sprTemplate, 0, y, 0); + gSprites[spriteIds[i]].tType = i; + gSprites[spriteIds[i]].tBattler = battlerId; + gSprites[spriteIds[i]].tPosX = x; + gSprites[spriteIds[i]].invisible = TRUE; } } static void SpriteCb_MegaIndicator(struct Sprite *sprite) { + u32 battlerId = sprite->tBattler; + sprite->x = gSprites[gHealthboxSpriteIds[battlerId]].x + sprite->tPosX + sprite->tLevelXDelta; + sprite->x2 = gSprites[gHealthboxSpriteIds[battlerId]].x2; + sprite->y2 = gSprites[gHealthboxSpriteIds[battlerId]].y2; } #undef tBattler -#undef tHide +#undef tType +#undef tPosX +#undef tLevelXDelta #define tBattler data[0] #define tSummaryBarSpriteId data[1] @@ -2788,7 +2765,7 @@ static void SafariTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 wi #define tSpriteId1 data[6] #define tSpriteId2 data[7] -static const u8 sAbilityPopUpGfx[] = INCBIN_U8("graphics/battle_interface/ability_pop_up.4bpp"); +static const u8 ALIGNED(4) sAbilityPopUpGfx[] = INCBIN_U8("graphics/battle_interface/ability_pop_up.4bpp"); static const u16 sAbilityPopUpPalette[] = INCBIN_U16("graphics/battle_interface/ability_pop_up.gbapal"); static const struct SpriteSheet sSpriteSheet_AbilityPopUp = @@ -3247,9 +3224,9 @@ static const struct SpriteTemplate sSpriteTemplate_LastUsedBallWindow = }; #if B_LAST_USED_BALL_BUTTON == R_BUTTON - static const u8 sLastUsedBallWindowGfx[] = INCBIN_U8("graphics/battle_interface/last_used_ball_r.4bpp"); + static const u8 ALIGNED(4) sLastUsedBallWindowGfx[] = INCBIN_U8("graphics/battle_interface/last_used_ball_r.4bpp"); #else - static const u8 sLastUsedBallWindowGfx[] = INCBIN_U8("graphics/battle_interface/last_used_ball_l.4bpp"); + static const u8 ALIGNED(4) sLastUsedBallWindowGfx[] = INCBIN_U8("graphics/battle_interface/last_used_ball_l.4bpp"); #endif static const struct SpriteSheet sSpriteSheet_LastUsedBallWindow = { diff --git a/src/battle_main.c b/src/battle_main.c index 90540fa922..1a3177b37c 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -118,6 +118,9 @@ static void HandleEndTurn_FinishBattle(void); static void SpriteCB_UnusedBattleInit(struct Sprite *sprite); 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; @@ -591,6 +594,7 @@ static void CB2_InitBattleInternal(void) if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS && !BATTLE_TWO_VS_ONE_OPPONENT) CreateNPCTrainerParty(&gEnemyParty[PARTY_SIZE / 2], gTrainerBattleOpponent_B, FALSE); SetWildMonHeldItem(); + CalculateEnemyPartyCount(); } gMain.inBattle = TRUE; @@ -623,33 +627,33 @@ static void CB2_InitBattleInternal(void) gBattleCommunication[MULTIUSE_STATE] = 0; } -#define BUFFER_PARTY_VS_SCREEN_STATUS(party, flags, i) \ - for ((i) = 0; (i) < PARTY_SIZE; (i)++) \ - { \ - u16 species = GetMonData(&(party)[(i)], MON_DATA_SPECIES2); \ - u16 hp = GetMonData(&(party)[(i)], MON_DATA_HP); \ - u32 status = GetMonData(&(party)[(i)], MON_DATA_STATUS); \ - \ - if (species == SPECIES_NONE) \ - continue; \ - \ - /* Is healthy mon? */ \ - if (species != SPECIES_EGG && hp != 0 && status == 0) \ - (flags) |= 1 << (i) * 2; \ - \ - if (species == SPECIES_NONE) /* Redundant */ \ - continue; \ - \ - /* Is Egg or statused? */ \ - if (hp != 0 && (species == SPECIES_EGG || status != 0)) \ - (flags) |= 2 << (i) * 2; \ - \ - if (species == SPECIES_NONE) /* Redundant */ \ - continue; \ - \ - /* Is fainted? */ \ - if (species != SPECIES_EGG && hp == 0) \ - (flags) |= 3 << (i) * 2; \ +#define BUFFER_PARTY_VS_SCREEN_STATUS(party, flags, i) \ + for ((i) = 0; (i) < PARTY_SIZE; (i)++) \ + { \ + u16 species = GetMonData(&(party)[(i)], MON_DATA_SPECIES_OR_EGG); \ + u16 hp = GetMonData(&(party)[(i)], MON_DATA_HP); \ + u32 status = GetMonData(&(party)[(i)], MON_DATA_STATUS); \ + \ + if (species == SPECIES_NONE) \ + continue; \ + \ + /* Is healthy mon? */ \ + if (species != SPECIES_EGG && hp != 0 && status == 0) \ + (flags) |= 1 << (i) * 2; \ + \ + if (species == SPECIES_NONE) /* Redundant */ \ + continue; \ + \ + /* Is Egg or statused? */ \ + if (hp != 0 && (species == SPECIES_EGG || status != 0)) \ + (flags) |= 2 << (i) * 2; \ + \ + if (species == SPECIES_NONE) /* Redundant */ \ + continue; \ + \ + /* Is fainted? */ \ + if (species != SPECIES_EGG && hp == 0) \ + (flags) |= 3 << (i) * 2; \ } // For Vs Screen at link battle start @@ -1869,72 +1873,152 @@ static void SpriteCB_UnusedBattleInit_Main(struct Sprite *sprite) } } -static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 firstTrainer) +static u32 Crc32B (const u8 *data, u32 size) +{ + s32 i, j; + u32 byte, crc, mask; + + i = 0; + crc = 0xFFFFFFFF; + for (i = 0; i < size; ++i) + { + byte = data[i]; + crc = crc ^ byte; + for (j = 7; j >= 0; --j) + { + mask = -(crc & 1); + crc = (crc >> 1) ^ (0xEDB88320 & mask); + } + } + return ~crc; +} + +static u32 GeneratePartyHash(const struct Trainer *trainer, u32 i) +{ + const u8 *buffer; + u32 n; + if (trainer->partyFlags == 0) + { + buffer = (const u8 *) &trainer->party.NoItemDefaultMoves[i]; + n = sizeof(*trainer->party.NoItemDefaultMoves); + } + else if (trainer->partyFlags == F_TRAINER_PARTY_CUSTOM_MOVESET) + { + buffer = (const u8 *) &trainer->party.NoItemCustomMoves[i]; + n = sizeof(*trainer->party.NoItemCustomMoves); + } + else if (trainer->partyFlags == F_TRAINER_PARTY_HELD_ITEM) + { + buffer = (const u8 *) &trainer->party.ItemDefaultMoves[i]; + n = sizeof(*trainer->party.ItemDefaultMoves); + } + else if (trainer->partyFlags == (F_TRAINER_PARTY_HELD_ITEM | F_TRAINER_PARTY_CUSTOM_MOVESET)) + { + buffer = (const u8 *) &trainer->party.ItemCustomMoves[i]; + n = sizeof(*trainer->party.ItemCustomMoves); + } + else if (trainer->partyFlags == F_TRAINER_PARTY_EVERYTHING_CUSTOMIZED) + { + buffer = (const u8 *) &trainer->party.EverythingCustomized[i]; + n = sizeof(*trainer->party.EverythingCustomized); + } + return Crc32B(buffer, n); +} + +void ModifyPersonalityForNature(u32 *personality, u32 newNature) +{ + u32 nature = GetNatureFromPersonality(*personality); + s32 diff = abs(nature - newNature); + s32 sign = (nature > newNature) ? 1 : -1; + if (diff > NUM_NATURES / 2) + { + diff = NUM_NATURES - diff; + sign *= -1; + } + *personality -= (diff * sign); +} + +u32 GeneratePersonalityForGender(u32 gender, u32 species) +{ + const struct SpeciesInfo *speciesInfo = &gSpeciesInfo[species]; + if (gender == MON_MALE) + return ((255 - speciesInfo->genderRatio) / 2) + speciesInfo->genderRatio; + else + return speciesInfo->genderRatio / 2; +} + +static void CustomTrainerPartyAssignMoves(struct Pokemon *mon, const struct TrainerMonCustomized *partyEntry) +{ + bool32 noMoveSet = TRUE; + u32 j; + + for (j = 0; j < MAX_MON_MOVES; ++j) + { + if (partyEntry->moves[j] != MOVE_NONE) + noMoveSet = FALSE; + } + if (noMoveSet) + { + // TODO: Figure out a default strategy when moves are not set, to generate a good moveset + return; + } + + for (j = 0; j < MAX_MON_MOVES; ++j) + { + SetMonData(mon, MON_DATA_MOVE1 + j, &partyEntry->moves[j]); + SetMonData(mon, MON_DATA_PP1 + j, &gBattleMoves[partyEntry->moves[j]].pp); + } +} + +u8 CreateNPCTrainerPartyFromTrainer(struct Pokemon *party, const struct Trainer *trainer, bool32 firstTrainer, u32 battleTypeFlags) { - u32 nameHash = 0; u32 personalityValue; u8 fixedIV; s32 i, j; u8 monsCount; - u16 ball; - - if (trainerNum == TRAINER_SECRET_BASE) - return 0; - - if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && !(gBattleTypeFlags & (BATTLE_TYPE_FRONTIER + s32 ball = -1; + if (battleTypeFlags & BATTLE_TYPE_TRAINER && !(battleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_TRAINER_HILL))) { if (firstTrainer == TRUE) ZeroEnemyPartyMons(); - if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) + if (battleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) { - if (gTrainers[trainerNum].partySize > PARTY_SIZE / 2) + if (trainer->partySize > PARTY_SIZE / 2) monsCount = PARTY_SIZE / 2; else - monsCount = gTrainers[trainerNum].partySize; + monsCount = trainer->partySize; } else { - monsCount = gTrainers[trainerNum].partySize; + monsCount = trainer->partySize; } for (i = 0; i < monsCount; i++) { - - if (gTrainers[trainerNum].doubleBattle == TRUE) + u32 personalityHash = GeneratePartyHash(trainer, i); + if (trainer->doubleBattle == TRUE) personalityValue = 0x80; - else if (gTrainers[trainerNum].encounterMusic_gender & F_TRAINER_FEMALE) + else if (trainer->encounterMusic_gender & F_TRAINER_FEMALE) personalityValue = 0x78; // Use personality more likely to result in a female Pokémon else personalityValue = 0x88; // Use personality more likely to result in a male Pokémon - for (j = 0; gTrainers[trainerNum].trainerName[j] != EOS; j++) - nameHash += gTrainers[trainerNum].trainerName[j]; - - switch (gTrainers[trainerNum].partyFlags) + personalityValue += personalityHash << 8; + switch (trainer->partyFlags) { case 0: { - const struct TrainerMonNoItemDefaultMoves *partyData = gTrainers[trainerNum].party.NoItemDefaultMoves; - - for (j = 0; gSpeciesNames[partyData[i].species][j] != EOS; j++) - nameHash += gSpeciesNames[partyData[i].species][j]; - - personalityValue += nameHash << 8; + const struct TrainerMonNoItemDefaultMoves *partyData = trainer->party.NoItemDefaultMoves; fixedIV = partyData[i].iv * MAX_PER_STAT_IVS / 255; CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, OT_ID_RANDOM_NO_SHINY, 0); break; } case F_TRAINER_PARTY_CUSTOM_MOVESET: { - const struct TrainerMonNoItemCustomMoves *partyData = gTrainers[trainerNum].party.NoItemCustomMoves; - - for (j = 0; gSpeciesNames[partyData[i].species][j] != EOS; j++) - nameHash += gSpeciesNames[partyData[i].species][j]; - - personalityValue += nameHash << 8; + const struct TrainerMonNoItemCustomMoves *partyData = trainer->party.NoItemCustomMoves; fixedIV = partyData[i].iv * MAX_PER_STAT_IVS / 255; CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, OT_ID_RANDOM_NO_SHINY, 0); @@ -1947,12 +2031,7 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir } case F_TRAINER_PARTY_HELD_ITEM: { - const struct TrainerMonItemDefaultMoves *partyData = gTrainers[trainerNum].party.ItemDefaultMoves; - - for (j = 0; gSpeciesNames[partyData[i].species][j] != EOS; j++) - nameHash += gSpeciesNames[partyData[i].species][j]; - - personalityValue += nameHash << 8; + const struct TrainerMonItemDefaultMoves *partyData = trainer->party.ItemDefaultMoves; fixedIV = partyData[i].iv * MAX_PER_STAT_IVS / 255; CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, OT_ID_RANDOM_NO_SHINY, 0); @@ -1961,12 +2040,7 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir } case F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM: { - const struct TrainerMonItemCustomMoves *partyData = gTrainers[trainerNum].party.ItemCustomMoves; - - for (j = 0; gSpeciesNames[partyData[i].species][j] != EOS; j++) - nameHash += gSpeciesNames[partyData[i].species][j]; - - personalityValue += nameHash << 8; + const struct TrainerMonItemCustomMoves *partyData = trainer->party.ItemCustomMoves; fixedIV = partyData[i].iv * MAX_PER_STAT_IVS / 255; CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, OT_ID_RANDOM_NO_SHINY, 0); @@ -1979,18 +2053,89 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir } break; } + case F_TRAINER_PARTY_EVERYTHING_CUSTOMIZED: + { + const struct TrainerMonCustomized *partyData = trainer->party.EverythingCustomized; + u32 otIdType = OT_ID_RANDOM_NO_SHINY; + u32 fixedOtId = 0; + if (partyData[i].gender == TRAINER_MON_MALE) + personalityValue = (personalityValue & 0xFFFFFF00) | GeneratePersonalityForGender(MON_MALE, partyData[i].species); + else if (partyData[i].gender == TRAINER_MON_FEMALE) + personalityValue = (personalityValue & 0xFFFFFF00) | GeneratePersonalityForGender(MON_FEMALE, partyData[i].species); + if (partyData[i].nature != 0) + ModifyPersonalityForNature(&personalityValue, partyData[i].nature - 1); + if (partyData[i].isShiny) + { + otIdType = OT_ID_PRESET; + fixedOtId = HIHALF(personalityValue) ^ LOHALF(personalityValue); + } + CreateMon(&party[i], partyData[i].species, partyData[i].lvl, 0, TRUE, personalityValue, otIdType, fixedOtId); + SetMonData(&party[i], MON_DATA_HELD_ITEM, &partyData[i].heldItem); + + CustomTrainerPartyAssignMoves(&party[i], &partyData[i]); + SetMonData(&party[i], MON_DATA_IVS, &(partyData[i].iv)); + if (partyData[i].ev != NULL) + { + SetMonData(&party[i], MON_DATA_HP_EV, &(partyData[i].ev[0])); + SetMonData(&party[i], MON_DATA_ATK_EV, &(partyData[i].ev[1])); + SetMonData(&party[i], MON_DATA_DEF_EV, &(partyData[i].ev[2])); + SetMonData(&party[i], MON_DATA_SPATK_EV, &(partyData[i].ev[3])); + SetMonData(&party[i], MON_DATA_SPDEF_EV, &(partyData[i].ev[4])); + SetMonData(&party[i], MON_DATA_SPEED_EV, &(partyData[i].ev[5])); + } + if (partyData[i].ability != ABILITY_NONE) + { + const struct SpeciesInfo *speciesInfo = &gSpeciesInfo[partyData[i].species]; + u32 maxAbilities = ARRAY_COUNT(speciesInfo->abilities); + for (j = 0; j < maxAbilities; ++j) + { + if (speciesInfo->abilities[j] == partyData[i].ability) + break; + } + if (j < maxAbilities) + SetMonData(&party[i], MON_DATA_ABILITY_NUM, &j); + } + SetMonData(&party[i], MON_DATA_FRIENDSHIP, &(partyData[i].friendship)); + if (partyData[i].ball != ITEM_NONE) + { + ball = partyData[i].ball; + SetMonData(&party[i], MON_DATA_POKEBALL, &ball); + } + if (partyData[i].nickname != NULL) + { + SetMonData(&party[i], MON_DATA_NICKNAME, partyData[i].nickname); + } + CalculateMonStats(&party[i]); + } } #if B_TRAINER_CLASS_POKE_BALLS >= GEN_7 - ball = (sTrainerBallTable[gTrainers[trainerNum].trainerClass]) ? sTrainerBallTable[gTrainers[trainerNum].trainerClass] : ITEM_POKE_BALL; - SetMonData(&party[i], MON_DATA_POKEBALL, &ball); + if (ball == -1) + { + ball = (sTrainerBallTable[trainer->trainerClass]) ? sTrainerBallTable[trainer->trainerClass] : ITEM_POKE_BALL; + SetMonData(&party[i], MON_DATA_POKEBALL, &ball); + } #endif } - - gBattleTypeFlags |= gTrainers[trainerNum].doubleBattle; } - return gTrainers[trainerNum].partySize; + return trainer->partySize; +} + +static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 firstTrainer) +{ + u8 retVal; + if (trainerNum == TRAINER_SECRET_BASE) + return 0; + retVal = CreateNPCTrainerPartyFromTrainer(party, &gTrainers[trainerNum], firstTrainer, gBattleTypeFlags); + + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && !(gBattleTypeFlags & (BATTLE_TYPE_FRONTIER + | BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_TRAINER_HILL))) + { + gBattleTypeFlags |= gTrainers[trainerNum].doubleBattle; + } + return retVal; } void VBlankCB_Battle(void) @@ -2878,10 +3023,6 @@ static void SpriteCB_BounceEffect(struct Sprite *sprite) gSprites[bouncerSpriteId].y2 = y; sprite->sSinIndex = (sprite->sSinIndex + sprite->sDelta) & 0xFF; - - bouncerSpriteId = GetMegaIndicatorSpriteId(sprite->sBouncerSpriteId); - if (sprite->sWhich == BOUNCE_HEALTHBOX && bouncerSpriteId != 0xFF) - gSprites[bouncerSpriteId].y2 = y; } #undef sSinIndex @@ -3049,13 +3190,14 @@ static void BattleStartClearSetData(void) { gBattleStruct->usedHeldItems[i][B_SIDE_PLAYER] = 0; gBattleStruct->usedHeldItems[i][B_SIDE_OPPONENT] = 0; - gBattleStruct->itemStolen[i].originalItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); + gBattleStruct->itemLost[i].originalItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); gPartyCriticalHits[i] = 0; gBattleStruct->allowedToChangeFormInWeather[i][B_SIDE_PLAYER] = FALSE; gBattleStruct->allowedToChangeFormInWeather[i][B_SIDE_OPPONENT] = FALSE; } gBattleStruct->swapDamageCategory = FALSE; // Photon Geyser, Shell Side Arm, Light That Burns the Sky + gSelectedMonPartyId = PARTY_SIZE; // Revival Blessing } void SwitchInClearSetData(void) @@ -3168,6 +3310,9 @@ void SwitchInClearSetData(void) gBattleStruct->overwrittenAbilities[gActiveBattler] = ABILITY_NONE; + // Clear selected party ID so Revival Blessing doesn't get confused. + gSelectedMonPartyId = PARTY_SIZE; + Ai_UpdateSwitchInData(gActiveBattler); } @@ -3443,8 +3588,8 @@ static void DoBattleIntro(void) for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE - || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE + || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) { hpStatus[i].hp = HP_EMPTY_SLOT; hpStatus[i].status = 0; @@ -3462,8 +3607,8 @@ static void DoBattleIntro(void) for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE - || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE + || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) { hpStatus[i].hp = HP_EMPTY_SLOT; hpStatus[i].status = 0; @@ -3655,7 +3800,7 @@ static void TryDoEventsBeforeFirstTurn(void) { for (i = 0; i < gBattlersCount; i++) { - if (gBattleMons[i].hp == 0 || gBattleMons[i].species == SPECIES_NONE) + if (gBattleMons[i].hp == 0 || gBattleMons[i].species == SPECIES_NONE || GetMonData(GetBattlerPartyData(i), MON_DATA_IS_EGG)) gAbsentBattlerFlags |= gBitTable[i]; } } @@ -3742,7 +3887,7 @@ static void TryDoEventsBeforeFirstTurn(void) gChosenActionByBattler[i] = B_ACTION_NONE; gChosenMoveByBattler[i] = MOVE_NONE; // Record party slots of player's mons that appeared in battle - if (!IsBattlerAIControlled(i)) + if (!BattlerHasAi(i)) gBattleStruct->appearedInBattle |= gBitTable[gBattlerPartyIndexes[i]]; } TurnValuesCleanUp(FALSE); @@ -3866,8 +4011,8 @@ void BattleTurnPassed(void) BattleScriptExecute(BattleScript_PalacePrintFlavorText); else if (gBattleTypeFlags & BATTLE_TYPE_ARENA && gBattleStruct->arenaTurnCounter == 0) BattleScriptExecute(BattleScript_ArenaTurnBeginning); - else if (ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), gTrainerBattleOpponent_A, TRAINER_SLIDE_LAST_LOW_HP)) - BattleScriptExecute(BattleScript_TrainerSlideMsgEnd2); + else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_LAST_LOW_HP))) + BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2); } u8 IsRunningFromBattleImpossible(void) @@ -3979,7 +4124,8 @@ static void HandleTurnActionSelectionState(void) // Do AI score computations here so we can use them in AI_TrySwitchOrUseItem if ((gBattleTypeFlags & BATTLE_TYPE_HAS_AI || IsWildMonSmart()) - && (IsBattlerAIControlled(gActiveBattler) && !(gBattleTypeFlags & BATTLE_TYPE_PALACE))) { + && (BattlerHasAi(gActiveBattler) && !(gBattleTypeFlags & BATTLE_TYPE_PALACE))) + { gBattleStruct->aiMoveOrAction[gActiveBattler] = ComputeBattleAiScores(gActiveBattler); } break; @@ -4017,6 +4163,7 @@ static void HandleTurnActionSelectionState(void) } else { + gBattleStruct->itemPartyIndex[gActiveBattler] = PARTY_SIZE; BtlController_EmitChooseAction(BUFFER_A, gChosenActionByBattler[0], gBattleResources->bufferB[0][1] | (gBattleResources->bufferB[0][2] << 8)); MarkBattlerForControllerExec(gActiveBattler); gBattleCommunication[gActiveBattler]++; @@ -4084,10 +4231,11 @@ static void HandleTurnActionSelectionState(void) return; } - if ((gBattleTypeFlags & (BATTLE_TYPE_LINK + if (((gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_FRONTIER_NO_PYRAMID | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_RECORDED_LINK)) + && !gTestRunnerEnabled) // Or if currently held by Sky Drop || gStatuses3[gActiveBattler] & STATUS3_SKY_DROPPED) { @@ -4886,11 +5034,8 @@ static void CheckMegaEvolutionBeforeTurn(void) if (gBattleStruct->mega.toEvolve & gBitTable[gActiveBattler] && !(gProtectStructs[gActiveBattler].noValidMoves)) { - struct Pokemon *mon; - if (GetBattlerSide(gActiveBattler) == B_SIDE_OPPONENT) - mon = &gEnemyParty[gBattlerPartyIndexes[gActiveBattler]]; - else - mon = &gPlayerParty[gBattlerPartyIndexes[gActiveBattler]]; + struct Pokemon *mon = GetBattlerPartyData(gActiveBattler); + gBattleStruct->mega.toEvolve &= ~(gBitTable[gActiveBattler]); gLastUsedItem = gBattleMons[gActiveBattler].item; if (GetWishMegaEvolutionSpecies(GetMonData(mon, MON_DATA_SPECIES), GetMonData(mon, MON_DATA_MOVE1), GetMonData(mon, MON_DATA_MOVE2), GetMonData(mon, MON_DATA_MOVE3), GetMonData(mon, MON_DATA_MOVE4))) @@ -4954,6 +5099,9 @@ static void CheckChosenMoveForEffectsBeforeTurnStarts(void) case MOVE_BEAK_BLAST: BattleScriptExecute(BattleScript_BeakBlastSetUp); return; + case MOVE_SHELL_TRAP: + BattleScriptExecute(BattleScript_ShellTrapSetUp); + return; } } } @@ -5240,9 +5388,9 @@ static void HandleEndTurn_FinishBattle(void) TestRunner_Battle_AfterLastTurn(); BeginFastPaletteFade(3); FadeOutMapMusic(5); - #if B_TRAINERS_KNOCK_OFF_ITEMS == TRUE + #if B_TRAINERS_KNOCK_OFF_ITEMS == TRUE || B_RESTORE_HELD_BATTLE_ITEMS == TRUE if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) - TryRestoreStolenItems(); + TryRestoreHeldItems(); #endif for (i = 0; i < PARTY_SIZE; i++) { @@ -5254,8 +5402,8 @@ static void HandleEndTurn_FinishBattle(void) // Recalculate the stats of every party member before the end for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) { CalculateMonStats(&gPlayerParty[i]); } diff --git a/src/battle_message.c b/src/battle_message.c index ad830de289..38dba81bef 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -177,8 +177,8 @@ static const u8 sText_PkmnCausedUproar[] = _("{B_ATK_NAME_WITH_PREFIX} caused\na static const u8 sText_PkmnMakingUproar[] = _("{B_ATK_NAME_WITH_PREFIX} is making\nan UPROAR!"); static const u8 sText_PkmnCalmedDown[] = _("{B_ATK_NAME_WITH_PREFIX} calmed down."); static const u8 sText_PkmnCantSleepInUproar[] = _("But {B_DEF_NAME_WITH_PREFIX} can't\nsleep in an UPROAR!"); -static const u8 sText_PkmnStockpiled[] = _("{B_ATK_NAME_WITH_PREFIX} STOCKPILED\n{B_BUFF1}!"); -static const u8 sText_PkmnCantStockpile[] = _("{B_ATK_NAME_WITH_PREFIX} can't\nSTOCKPILE any more!"); +static const u8 sText_PkmnStockpiled[] = _("{B_ATK_NAME_WITH_PREFIX} stockpiled\n{B_BUFF1}!"); +static const u8 sText_PkmnCantStockpile[] = _("{B_ATK_NAME_WITH_PREFIX} can't\nstockpile any more!"); static const u8 sText_PkmnCantSleepInUproar2[] = _("But {B_DEF_NAME_WITH_PREFIX} can't\nsleep in an UPROAR!"); static const u8 sText_UproarKeptPkmnAwake[] = _("But the UPROAR kept\n{B_DEF_NAME_WITH_PREFIX} awake!"); static const u8 sText_PkmnStayedAwakeUsing[] = _("{B_DEF_NAME_WITH_PREFIX} stayed awake\nusing its {B_DEF_ABILITY}!"); @@ -209,7 +209,7 @@ static const u8 sText_PkmnFellIntoNightmare[] = _("{B_DEF_NAME_WITH_PREFIX} fell static const u8 sText_PkmnLockedInNightmare[] = _("{B_ATK_NAME_WITH_PREFIX} is locked\nin a NIGHTMARE!"); static const u8 sText_PkmnLaidCurse[] = _("{B_ATK_NAME_WITH_PREFIX} cut its own HP and\nlaid a CURSE on {B_DEF_NAME_WITH_PREFIX}!"); static const u8 sText_PkmnAfflictedByCurse[] = _("{B_ATK_NAME_WITH_PREFIX} is afflicted\nby the CURSE!"); -static const u8 sText_SpikesScattered[] = _("Spikes were scattered all around\nthe opponent's side!"); +static const u8 sText_SpikesScattered[] = _("Spikes were scattered all around\n{B_DEF_TEAM2} team!"); static const u8 sText_PkmnHurtBySpikes[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is hurt\nby spikes!"); static const u8 sText_PkmnIdentified[] = _("{B_ATK_NAME_WITH_PREFIX} identified\n{B_DEF_NAME_WITH_PREFIX}!"); static const u8 sText_PkmnPerishCountFell[] = _("{B_ATK_NAME_WITH_PREFIX}'s PERISH count\nfell to {B_BUFF1}!"); @@ -284,7 +284,7 @@ static const u8 sText_PkmnPreventsPoisoningWith[] = _("{B_EFF_NAME_WITH_PREFIX}' static const u8 sText_PkmnPreventsConfusionWith[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}\nprevents confusion!"); static const u8 sText_PkmnRaisedFirePowerWith[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}\nraised its FIRE power!"); static const u8 sText_PkmnAnchorsItselfWith[] = _("{B_DEF_NAME_WITH_PREFIX} anchors\nitself with {B_DEF_ABILITY}!"); -static const u8 sText_PkmnCutsAttackWith[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\ncuts {B_DEF_NAME_WITH_PREFIX}'s ATTACK!"); +static const u8 sText_PkmnCutsAttackWith[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\ncuts {B_DEF_NAME_WITH_PREFIX}'s attack!"); static const u8 sText_PkmnPreventsStatLossWith[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\nprevents stat loss!"); static const u8 sText_PkmnHurtsWith[] = _("{B_ATK_NAME_WITH_PREFIX} was hurt by\n{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}!"); static const u8 sText_PkmnTraced[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} TRACED\n{B_BUFF1}'s {B_BUFF2}!"); @@ -360,8 +360,8 @@ static const u8 sText_SunlightFaded[] = _("The sunlight faded."); static const u8 sText_StartedHail[] = _("It started to hail!"); static const u8 sText_HailContinues[] = _("Hail continues to fall."); static const u8 sText_HailStopped[] = _("The hail stopped."); -static const u8 sText_FailedToSpitUp[] = _("But it failed to SPIT UP\na thing!"); -static const u8 sText_FailedToSwallow[] = _("But it failed to SWALLOW\na thing!"); +static const u8 sText_FailedToSpitUp[] = _("But it failed to spit up\na thing!"); +static const u8 sText_FailedToSwallow[] = _("But it failed to swallow\na thing!"); static const u8 sText_WindBecameHeatWave[] = _("The wind turned into a\nHEAT WAVE!"); static const u8 sText_StatChangesGone[] = _("All stat changes were\neliminated!"); static const u8 sText_CoinsScattered[] = _("Coins scattered everywhere!"); @@ -435,11 +435,11 @@ static const u8 sText_ExclamationMark3[] = _("!"); static const u8 sText_ExclamationMark4[] = _("!"); static const u8 sText_ExclamationMark5[] = _("!"); static const u8 sText_HP[] = _("HP"); -static const u8 sText_Attack[] = _("attack"); -static const u8 sText_Defense[] = _("defense"); -static const u8 sText_Speed[] = _("speed"); -static const u8 sText_SpAttack[] = _("sp. attack"); -static const u8 sText_SpDefense[] = _("sp. defense"); +static const u8 sText_Attack[] = _("Attack"); +static const u8 sText_Defense[] = _("Defense"); +static const u8 sText_Speed[] = _("Speed"); +static const u8 sText_SpAttack[] = _("Sp. Atk"); +static const u8 sText_SpDefense[] = _("Sp. Def"); static const u8 sText_Accuracy[] = _("accuracy"); static const u8 sText_Evasiveness[] = _("evasiveness"); @@ -465,9 +465,9 @@ const u8 *const gPokeblockWasTooXStringTable[FLAVOR_COUNT] = [FLAVOR_SOUR] = sText_PokeblockWasTooSour }; -static const u8 sText_PlayerUsedItem[] = _("{B_PLAYER_NAME} used\n{B_LAST_ITEM}!"); +static const u8 sText_PlayerUsedItem[] = _("You used\n{B_LAST_ITEM}!"); static const u8 sText_WallyUsedItem[] = _("WALLY used\n{B_LAST_ITEM}!"); -static const u8 sText_Trainer1UsedItem[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME}\nused {B_LAST_ITEM}!"); +static const u8 sText_Trainer1UsedItem[] = _("{B_ATK_TRAINER_CLASS} {B_ATK_TRAINER_NAME}\nused {B_LAST_ITEM}!"); static const u8 sText_TrainerBlockedBall[] = _("The TRAINER blocked the BALL!"); static const u8 sText_DontBeAThief[] = _("Don't be a thief!"); static const u8 sText_ItDodgedBall[] = _("It dodged the thrown BALL!\nThis POKéMON can't be caught!"); @@ -476,8 +476,8 @@ static const u8 sText_PkmnBrokeFree[] = _("Oh, no!\nThe POKéMON broke free!"); static const u8 sText_ItAppearedCaught[] = _("Aww!\nIt appeared to be caught!"); static const u8 sText_AarghAlmostHadIt[] = _("Aargh!\nAlmost had it!"); static const u8 sText_ShootSoClose[] = _("Shoot!\nIt was so close, too!"); -static const u8 sText_GotchaPkmnCaught[] = _("Gotcha!\n{B_DEF_NAME} was caught!{WAIT_SE}{PLAY_BGM MUS_CAUGHT}\p"); -static const u8 sText_GotchaPkmnCaught2[] = _("Gotcha!\n{B_DEF_NAME} was caught!{WAIT_SE}{PLAY_BGM MUS_CAUGHT}{PAUSE 127}"); +static const u8 sText_GotchaPkmnCaughtPlayer[] = _("Gotcha!\n{B_DEF_NAME} was caught!{WAIT_SE}{PLAY_BGM MUS_CAUGHT}\p"); +static const u8 sText_GotchaPkmnCaughtWally[] = _("Gotcha!\n{B_DEF_NAME} was caught!{WAIT_SE}{PLAY_BGM MUS_CAUGHT}{PAUSE 127}"); static const u8 sText_GiveNicknameCaptured[] = _("Give a nickname to the\ncaptured {B_DEF_NAME}?"); static const u8 sText_PkmnSentToPC[] = _("{B_DEF_NAME} was sent to\n{B_PC_CREATOR_NAME} PC."); static const u8 sText_Someones[] = _("someone's"); @@ -555,7 +555,7 @@ static const u8 sText_VanishedInstantly[] =_("{B_ATK_NAME_WITH_PREFIX} vanished\ static const u8 sText_ProtectedTeam[] =_("{B_CURRENT_MOVE} protected\n{B_ATK_TEAM2} team!"); static const u8 sText_SharedItsGuard[] =_("{B_ATK_NAME_WITH_PREFIX} shared its\nguard with the target!"); static const u8 sText_SharedItsPower[] =_("{B_ATK_NAME_WITH_PREFIX} shared its\npower with the target!"); -static const u8 sText_SwapsDefAndSpDefOfAllPkmn[] =_("It created a bizarre area in which the\nDefense and Sp.Def stats are swapped!"); +static const u8 sText_SwapsDefAndSpDefOfAllPkmn[] =_("It created a bizarre area in which the\nDefense and Sp. Def stats are swapped!"); static const u8 sText_BecameNimble[] =_("{B_ATK_NAME_WITH_PREFIX} became nimble!"); static const u8 sText_HurledIntoTheAir[] =_("{B_DEF_NAME_WITH_PREFIX} was hurled\ninto the air!"); static const u8 sText_HeldItemsLoseEffects[] =_("It created a bizarre area in which\nPokémon's held items lose their effects!"); @@ -631,6 +631,10 @@ static const u8 sText_NotDoneYet[] = _("This move effect is not done yet!\p"); static const u8 sText_PkmnBlewAwayToxicSpikes[] = _("{B_ATK_NAME_WITH_PREFIX} blew away\nToxic Spikes!"); static const u8 sText_PkmnBlewAwayStickyWeb[] = _("{B_ATK_NAME_WITH_PREFIX} blew away\nSticky Web!"); static const u8 sText_PkmnBlewAwayStealthRock[] = _("{B_ATK_NAME_WITH_PREFIX} blew away\nStealth Rock!"); +static const u8 sText_SpikesDisappearedFromTeam[] = _("The spikes disappeared from\nthe ground around {B_ATK_TEAM2} team!"); +static const u8 sText_ToxicSpikesDisappearedFromTeam[] = _("The poison spikes disappeared from\nthe ground around {B_ATK_TEAM2} team!"); +static const u8 sText_StealthRockDisappearedFromTeam[] = _("The pointed stones disappeared\nfrom around {B_ATK_TEAM2} team!"); +static const u8 sText_StickyWebDisappearedFromTeam[] = _("The sticky web has disappeared from\nthe ground around {B_ATK_TEAM2} team!"); static const u8 sText_StickyWebUsed[] = _("A sticky web spreads out on the\nground around {B_DEF_TEAM2} team!"); static const u8 sText_QuashSuccess[] = _("The opposing {B_DEF_NAME_WITH_PREFIX}'s\nmove was postponed!"); static const u8 sText_IonDelugeOn[] = _("A deluge of ions showers\nthe battlefield!"); @@ -774,9 +778,23 @@ static const u8 sText_StatWasHeightened[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s static const u8 sText_ElectricTerrainActivatedAbility[] = _("The Electric Terrain activated\n{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_LAST_ABILITY}!"); static const u8 sText_AbilityWeakenedSurroundingMonsStat[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\nweakened the {B_BUFF1} of\lall surrounding Pokémon!\p"); static const u8 sText_AttackerGainedStrengthFromTheFallen[] = _("{B_ATK_NAME_WITH_PREFIX} gained strength\nfrom the fallen!"); +static const u8 sText_PrepareShellTrap[] = _("{B_ATK_NAME_WITH_PREFIX} set a shell trap!"); +static const u8 sText_ShellTrapDidntWork[] = _("{B_ATK_NAME_WITH_PREFIX}'s shell trap didn't work!"); +static const u8 sText_CouldntFullyProtect[] = _("{B_DEF_NAME_WITH_PREFIX} couldn't fully protect\nitself and got hurt!"); +static const u8 sText_StockpiledEffectWoreOff[] = _("{B_ATK_NAME_WITH_PREFIX}'s stockpiled\neffect wore off!"); +static const u8 sText_PkmnRevivedReadyToFight[] = _("{B_BUFF1} was revived and\nis ready to fight again!"); +static const u8 sText_ItemRestoredSpeciesHealth[] = _("{B_BUFF1} had its\nHP restored!"); +static const u8 sText_ItemCuredSpeciesStatus[] = _("{B_BUFF1} had\nits status healed!"); +static const u8 sText_ItemRestoredSpeciesPP[] = _("{B_BUFF1} had its\nPP restored!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_ITEMRESTOREDSPECIESHEALTH - BATTLESTRINGS_TABLE_START] = sText_ItemRestoredSpeciesHealth, + [STRINGID_ITEMCUREDSPECIESSTATUS - BATTLESTRINGS_TABLE_START] = sText_ItemCuredSpeciesStatus, + [STRINGID_ITEMRESTOREDSPECIESPP - BATTLESTRINGS_TABLE_START] = sText_ItemRestoredSpeciesPP, + [STRINGID_PKMNREVIVEDREADYTOFIGHT - BATTLESTRINGS_TABLE_START] = sText_PkmnRevivedReadyToFight, + [STRINGID_STOCKPILEDEFFECTWOREOFF - BATTLESTRINGS_TABLE_START] = sText_StockpiledEffectWoreOff, + [STRINGID_COULDNTFULLYPROTECT - BATTLESTRINGS_TABLE_START] = sText_CouldntFullyProtect, [STRINGID_ATTACKERGAINEDSTRENGTHFROMTHEFALLEN - BATTLESTRINGS_TABLE_START] = sText_AttackerGainedStrengthFromTheFallen, [STRINGID_ABILITYWEAKENEDFSURROUNDINGMONSSTAT - BATTLESTRINGS_TABLE_START] = sText_AbilityWeakenedSurroundingMonsStat, [STRINGID_ELECTRICTERRAINACTIVATEDABILITY - BATTLESTRINGS_TABLE_START] = sText_ElectricTerrainActivatedAbility, @@ -800,6 +818,8 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_ZMOVEHPTRAP - BATTLESTRINGS_TABLE_START] = sText_ZMoveHpSwitchInTrap, [STRINGID_PLAYERLOSTTOENEMYTRAINER - BATTLESTRINGS_TABLE_START] = sText_PlayerLostToEnemyTrainer, [STRINGID_PLAYERPAIDPRIZEMONEY - BATTLESTRINGS_TABLE_START] = sText_PlayerPaidPrizeMoney, + [STRINGID_SHELLTRAPDIDNTWORK - BATTLESTRINGS_TABLE_START] = sText_ShellTrapDidntWork, + [STRINGID_PREPARESHELLTRAP - BATTLESTRINGS_TABLE_START] = sText_PrepareShellTrap, [STRINGID_COURTCHANGE - BATTLESTRINGS_TABLE_START] = sText_CourtChange, [STRINGID_HEATUPBEAK - BATTLESTRINGS_TABLE_START] = sText_HeatingUpBeak, [STRINGID_METEORBEAMCHARGING - BATTLESTRINGS_TABLE_START] = sText_MeteorBeamCharging, @@ -1133,8 +1153,8 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_ITAPPEAREDCAUGHT - BATTLESTRINGS_TABLE_START] = sText_ItAppearedCaught, [STRINGID_AARGHALMOSTHADIT - BATTLESTRINGS_TABLE_START] = sText_AarghAlmostHadIt, [STRINGID_SHOOTSOCLOSE - BATTLESTRINGS_TABLE_START] = sText_ShootSoClose, - [STRINGID_GOTCHAPKMNCAUGHT - BATTLESTRINGS_TABLE_START] = sText_GotchaPkmnCaught, - [STRINGID_GOTCHAPKMNCAUGHT2 - BATTLESTRINGS_TABLE_START] = sText_GotchaPkmnCaught2, + [STRINGID_GOTCHAPKMNCAUGHTPLAYER - BATTLESTRINGS_TABLE_START] = sText_GotchaPkmnCaughtPlayer, + [STRINGID_GOTCHAPKMNCAUGHTWALLY - BATTLESTRINGS_TABLE_START] = sText_GotchaPkmnCaughtWally, [STRINGID_GIVENICKNAMECAPTURED - BATTLESTRINGS_TABLE_START] = sText_GiveNicknameCaptured, [STRINGID_PKMNSENTTOPC - BATTLESTRINGS_TABLE_START] = sText_PkmnSentToPC, [STRINGID_PKMNDATAADDEDTODEX - BATTLESTRINGS_TABLE_START] = sText_PkmnDataAddedToDex, @@ -1361,6 +1381,10 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_PKMNBLEWAWAYTOXICSPIKES - BATTLESTRINGS_TABLE_START] = sText_PkmnBlewAwayToxicSpikes, [STRINGID_PKMNBLEWAWAYSTICKYWEB - BATTLESTRINGS_TABLE_START] = sText_PkmnBlewAwayStickyWeb, [STRINGID_PKMNBLEWAWAYSTEALTHROCK - BATTLESTRINGS_TABLE_START] = sText_PkmnBlewAwayStealthRock, + [STRINGID_SPIKESDISAPPEAREDFROMTEAM - BATTLESTRINGS_TABLE_START] = sText_SpikesDisappearedFromTeam, + [STRINGID_TOXICSPIKESDISAPPEAREDFROMTEAM - BATTLESTRINGS_TABLE_START] = sText_ToxicSpikesDisappearedFromTeam, + [STRINGID_STEALTHROCKDISAPPEAREDFROMTEAM - BATTLESTRINGS_TABLE_START] = sText_StealthRockDisappearedFromTeam, + [STRINGID_STICKYWEBDISAPPEAREDFROMTEAM - BATTLESTRINGS_TABLE_START] = sText_StickyWebDisappearedFromTeam, [STRINGID_IONDELUGEON - BATTLESTRINGS_TABLE_START] = sText_IonDelugeOn, [STRINGID_TOPSYTURVYSWITCHEDSTATS - BATTLESTRINGS_TABLE_START] = sText_TopsyTurvySwitchedStats, [STRINGID_TERRAINBECOMESMISTY - BATTLESTRINGS_TABLE_START] = sText_TerrainBecomesMisty, @@ -1406,6 +1430,11 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_PKMNSABILITYPREVENTSABILITY - BATTLESTRINGS_TABLE_START] = sText_PkmnsAbilityPreventsAbility, }; +const u16 gTrainerUsedItemStringIds[] = +{ + STRINGID_PLAYERUSEDITEM, STRINGID_TRAINER1USEDITEM +}; + const u16 gZEffectStringIds[] = { [B_MSG_Z_RESET_STATS] = STRINGID_ZMOVERESETSSTATS, @@ -1432,9 +1461,12 @@ const u16 gTerrainStringIds[] = STRINGID_TERRAINBECOMESMISTY, STRINGID_TERRAINBECOMESGRASSY, STRINGID_TERRAINBECOMESELECTRIC, STRINGID_TERRAINBECOMESPSYCHIC, STRINGID_TERRAINREMOVED, }; -const u16 gTerrainEndingStringIds[] = +const u16 gTerrainEndingStringIds[B_MSG_TERRAINENDS_COUNT] = { - STRINGID_MISTYTERRAINENDS, STRINGID_GRASSYTERRAINENDS, STRINGID_ELECTRICTERRAINENDS, STRINGID_PSYCHICTERRAINENDS + [B_MSG_TERRAINENDS_MISTY] = STRINGID_MISTYTERRAINENDS, + [B_MSG_TERRAINENDS_ELECTRIC] = STRINGID_ELECTRICTERRAINENDS, + [B_MSG_TERRAINENDS_PSYCHIC] = STRINGID_PSYCHICTERRAINENDS, + [B_MSG_TERRAINENDS_GRASS] = STRINGID_GRASSYTERRAINENDS, }; const u16 gTerrainPreventsStringIds[] = @@ -1456,7 +1488,10 @@ const u16 gHealingWishStringIds[] = const u16 gDmgHazardsStringIds[] = { - STRINGID_PKMNHURTBYSPIKES, STRINGID_STEALTHROCKDMG + [B_MSG_PKMNHURTBYSPIKES] = STRINGID_PKMNHURTBYSPIKES, + [B_MSG_STEALTHROCKDMG] = STRINGID_STEALTHROCKDMG, + [B_MSG_POINTEDSTONESFLOAT] = STRINGID_POINTEDSTONESFLOAT, + [B_MSG_SPIKESSCATTERED] = STRINGID_SPIKESSCATTERED }; const u16 gSwitchInAbilityStringIds[] = @@ -1796,16 +1831,6 @@ const u16 gSafariPokeblockResultStringIds[] = [B_MSG_MON_IGNORED] = STRINGID_PKMNIGNOREDX }; -const u16 gTrainerItemCuredStatusStringIds[] = -{ - [AI_HEAL_CONFUSION] = STRINGID_PKMNSITEMSNAPPEDOUT, - [AI_HEAL_PARALYSIS] = STRINGID_PKMNSITEMCUREDPARALYSIS, - [AI_HEAL_FREEZE] = STRINGID_PKMNSITEMDEFROSTEDIT, - [AI_HEAL_BURN] = STRINGID_PKMNSITEMHEALEDBURN, - [AI_HEAL_POISON] = STRINGID_PKMNSITEMCUREDPOISON, - [AI_HEAL_SLEEP] = STRINGID_PKMNSITEMWOKEIT -}; - const u16 gBerryEffectStringIds[] = { [B_MSG_CURED_PROBLEM] = STRINGID_PKMNSITEMCUREDPROBLEM, @@ -2083,288 +2108,236 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .fontId = FONT_NORMAL, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 1, - .fgColor = TEXT_COLOR_WHITE, - .bgColor = TEXT_DYNAMIC_COLOR_6, - .shadowColor = TEXT_COLOR_GREEN, + .fgColor = 1, + .bgColor = 15, + .shadowColor = 6, }, [B_WIN_ACTION_PROMPT] = { .fillValue = PIXEL_FILL(0xF), .fontId = FONT_NORMAL, .x = 1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_COLOR_WHITE, - .bgColor = TEXT_DYNAMIC_COLOR_6, - .shadowColor = TEXT_COLOR_GREEN, + .fgColor = 1, + .bgColor = 15, + .shadowColor = 6, }, [B_WIN_ACTION_MENU] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_MOVE_NAME_1] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NARROW, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_MOVE_NAME_2] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NARROW, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_MOVE_NAME_3] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NARROW, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_MOVE_NAME_4] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NARROW, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_PP] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NARROW, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_3, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_2, + .fgColor = 12, + .bgColor = 14, + .shadowColor = 11, }, [B_WIN_DUMMY] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_PP_REMAINING] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = 2, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_3, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_2, + .fgColor = 12, + .bgColor = 14, + .shadowColor = 11, }, [B_WIN_MOVE_TYPE] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NARROW, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_SWITCH_PROMPT] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NARROW, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_YESNO] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_LEVEL_UP_BOX] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_LEVEL_UP_BANNER] = { .fillValue = PIXEL_FILL(0), .fontId = FONT_NORMAL, .x = 32, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_COLOR_WHITE, - .bgColor = TEXT_COLOR_TRANSPARENT, - .shadowColor = TEXT_COLOR_DARK_GRAY, + .fgColor = 1, + .shadowColor = 2, }, [B_WIN_VS_PLAYER] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_VS_OPPONENT] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_VS_MULTI_PLAYER_1] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_VS_MULTI_PLAYER_2] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_VS_MULTI_PLAYER_3] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_VS_MULTI_PLAYER_4] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_VS_OUTCOME_DRAW] = { .fillValue = PIXEL_FILL(0), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_COLOR_WHITE, - .bgColor = TEXT_COLOR_TRANSPARENT, - .shadowColor = TEXT_COLOR_GREEN, + .fgColor = 1, + .shadowColor = 6, }, [B_WIN_VS_OUTCOME_LEFT] = { .fillValue = PIXEL_FILL(0), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_COLOR_WHITE, - .bgColor = TEXT_COLOR_TRANSPARENT, - .shadowColor = TEXT_COLOR_GREEN, + .fgColor = 1, + .shadowColor = 6, }, [B_WIN_VS_OUTCOME_RIGHT] = { .fillValue = PIXEL_FILL(0x0), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_COLOR_WHITE, - .bgColor = TEXT_COLOR_TRANSPARENT, - .shadowColor = TEXT_COLOR_GREEN, + .fgColor = 1, + .shadowColor = 6, }, }; @@ -2375,276 +2348,229 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .fontId = FONT_NORMAL, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 1, - .fgColor = TEXT_COLOR_WHITE, - .bgColor = TEXT_DYNAMIC_COLOR_6, - .shadowColor = TEXT_COLOR_GREEN, + .fgColor = 1, + .bgColor = 15, + .shadowColor = 6, }, [B_WIN_ACTION_PROMPT] = { .fillValue = PIXEL_FILL(0xF), .fontId = FONT_NORMAL, .x = 1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_COLOR_WHITE, - .bgColor = TEXT_DYNAMIC_COLOR_6, - .shadowColor = TEXT_COLOR_GREEN, + .fgColor = 1, + .bgColor = 15, + .shadowColor = 6, }, [B_WIN_ACTION_MENU] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_MOVE_NAME_1] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NARROW, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_MOVE_NAME_2] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NARROW, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_MOVE_NAME_3] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NARROW, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_MOVE_NAME_4] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NARROW, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_PP] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NARROW, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_3, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_2, + .fgColor = 12, + .bgColor = 14, + .shadowColor = 11, }, [B_WIN_DUMMY] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_PP_REMAINING] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = 2, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_3, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_2, + .fgColor = 12, + .bgColor = 14, + .shadowColor = 11, }, [B_WIN_MOVE_TYPE] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NARROW, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_SWITCH_PROMPT] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NARROW, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_YESNO] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_LEVEL_UP_BOX] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [B_WIN_LEVEL_UP_BANNER] = { .fillValue = PIXEL_FILL(0), .fontId = FONT_NORMAL, .x = 32, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_COLOR_WHITE, - .bgColor = TEXT_COLOR_TRANSPARENT, - .shadowColor = TEXT_COLOR_DARK_GRAY, + .fgColor = 1, + .shadowColor = 2, }, [ARENA_WIN_PLAYER_NAME] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_COLOR_WHITE, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 1, + .bgColor = 14, + .shadowColor = 15, }, [ARENA_WIN_VS] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [ARENA_WIN_OPPONENT_NAME] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [ARENA_WIN_MIND] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [ARENA_WIN_SKILL] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [ARENA_WIN_BODY] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [ARENA_WIN_JUDGMENT_TITLE] = { .fillValue = PIXEL_FILL(0xE), .fontId = FONT_NORMAL, .x = -1, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 0, - .fgColor = TEXT_DYNAMIC_COLOR_4, - .bgColor = TEXT_DYNAMIC_COLOR_5, - .shadowColor = TEXT_DYNAMIC_COLOR_6, + .fgColor = 13, + .bgColor = 14, + .shadowColor = 15, }, [ARENA_WIN_JUDGMENT_TEXT] = { .fillValue = PIXEL_FILL(0x1), .fontId = FONT_NORMAL, .x = 0, .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, .speed = 1, - .fgColor = TEXT_COLOR_DARK_GRAY, - .bgColor = TEXT_COLOR_WHITE, - .shadowColor = TEXT_COLOR_LIGHT_GRAY, + .fgColor = 2, + .bgColor = 1, + .shadowColor = 3, }, }; @@ -3913,8 +3839,13 @@ void SetPpNumbersPaletteInMoveSelection(void) { struct ChooseMoveStruct *chooseMoveStruct = (struct ChooseMoveStruct *)(&gBattleResources->bufferA[gActiveBattler][4]); const u16 *palPtr = gPPTextPalette; - u8 var = GetCurrentPpToMaxPpState(chooseMoveStruct->currentPp[gMoveSelectionCursor[gActiveBattler]], + u8 var; + + if (!gBattleStruct->zmove.viewing) + var = GetCurrentPpToMaxPpState(chooseMoveStruct->currentPp[gMoveSelectionCursor[gActiveBattler]], chooseMoveStruct->maxPp[gMoveSelectionCursor[gActiveBattler]]); + else + var = GetCurrentPpToMaxPpState(chooseMoveStruct->currentPp[gMoveSelectionCursor[gActiveBattler]], gBattleMoves[gMoveSelectionCursor[gActiveBattler]].pp); gPlttBufferUnfaded[92] = palPtr[(var * 2) + 0]; gPlttBufferUnfaded[91] = palPtr[(var * 2) + 1]; @@ -3977,13 +3908,13 @@ static const struct TrainerSlide sTrainerSlides[] = */ }; -static u32 GetEnemyMonCount(bool32 onlyAlive) +static u32 GetEnemyMonCount(u32 firstId, u32 lastId, bool32 onlyAlive) { u32 i, count = 0; - for (i = 0; i < PARTY_SIZE; i++) + for (i = firstId; i < lastId; i++) { - u32 species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2, NULL); + u32 species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG, NULL); if (species != SPECIES_NONE && species != SPECIES_EGG && (!onlyAlive || GetMonData(&gEnemyParty[i], MON_DATA_HP, NULL))) @@ -4001,12 +3932,33 @@ static bool32 IsBattlerHpLow(u32 battler) return FALSE; } -bool32 ShouldDoTrainerSlide(u32 battlerId, u32 trainerId, u32 which) +u32 ShouldDoTrainerSlide(u32 battlerId, u32 which) { - s32 i; + u32 i, firstId, lastId, trainerId, retValue = 1; if (!(gBattleTypeFlags & BATTLE_TYPE_TRAINER) || GetBattlerSide(battlerId) != B_SIDE_OPPONENT) - return FALSE; + return 0; + + // Two opponents support. + if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) + { + if (gBattlerPartyIndexes[battlerId] >= 3) + { + firstId = 3, lastId = PARTY_SIZE; + trainerId = gTrainerBattleOpponent_B; + retValue = 2; + } + else + { + firstId = 0, lastId = 3; + trainerId = gTrainerBattleOpponent_A; + } + } + else + { + firstId = 0, lastId = PARTY_SIZE; + trainerId = gTrainerBattleOpponent_A; + } for (i = 0; i < ARRAY_COUNT(sTrainerSlides); i++) { @@ -4016,28 +3968,28 @@ bool32 ShouldDoTrainerSlide(u32 battlerId, u32 trainerId, u32 which) switch (which) { case TRAINER_SLIDE_LAST_SWITCHIN: - if (sTrainerSlides[i].msgLastSwitchIn != NULL && GetEnemyMonCount(TRUE) == 1) + if (sTrainerSlides[i].msgLastSwitchIn != NULL && !CanBattlerSwitch(battlerId)) { gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgLastSwitchIn; - return TRUE; + return retValue; } break; case TRAINER_SLIDE_LAST_LOW_HP: if (sTrainerSlides[i].msgLastLowHp != NULL - && GetEnemyMonCount(TRUE) == 1 + && GetEnemyMonCount(firstId, lastId, TRUE) == 1 && IsBattlerHpLow(battlerId) && !gBattleStruct->trainerSlideLowHpMsgDone) { gBattleStruct->trainerSlideLowHpMsgDone = TRUE; gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgLastLowHp; - return TRUE; + return retValue; } break; case TRAINER_SLIDE_FIRST_DOWN: - if (sTrainerSlides[i].msgFirstDown != NULL && GetEnemyMonCount(TRUE) == GetEnemyMonCount(FALSE) - 1) + if (sTrainerSlides[i].msgFirstDown != NULL && GetEnemyMonCount(firstId, lastId, TRUE) == GetEnemyMonCount(firstId, lastId, FALSE) - 1) { gBattleStruct->trainerSlideMsg = sTrainerSlides[i].msgFirstDown; - return TRUE; + return retValue; } break; } @@ -4045,5 +3997,5 @@ bool32 ShouldDoTrainerSlide(u32 battlerId, u32 trainerId, u32 which) } } - return FALSE; + return 0; } diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c index 336582ba59..ffed249805 100644 --- a/src/battle_pyramid.c +++ b/src/battle_pyramid.c @@ -284,7 +284,7 @@ static const u8 sFloorTemplateOffsets[FRONTIER_STAGES_PER_CHALLENGE] = 0, 4, 9, 14, 19, 24, 29 }; -static const u16 sPickupItemsLvl50[TOTAL_ROUNDS][PICKUP_ITEMS_PER_ROUND] = +static const u16 sPickupItemsLvl50[TOTAL_PYRAMID_ROUNDS][PICKUP_ITEMS_PER_ROUND] = { {ITEM_HYPER_POTION, ITEM_FLUFFY_TAIL, ITEM_CHERI_BERRY, ITEM_ETHER, ITEM_LUM_BERRY, ITEM_REVIVE, ITEM_BRIGHT_POWDER, ITEM_SHELL_BELL, ITEM_MAX_REVIVE, ITEM_SACRED_ASH}, {ITEM_HYPER_POTION, ITEM_DIRE_HIT, ITEM_PECHA_BERRY, ITEM_ETHER, ITEM_LEPPA_BERRY, ITEM_REVIVE, ITEM_LEFTOVERS, ITEM_CHOICE_BAND, ITEM_FULL_RESTORE, ITEM_MAX_ELIXIR}, @@ -308,7 +308,7 @@ static const u16 sPickupItemsLvl50[TOTAL_ROUNDS][PICKUP_ITEMS_PER_ROUND] = {ITEM_HYPER_POTION, ITEM_X_DEFENSE, ITEM_LUM_BERRY, ITEM_ETHER, ITEM_LEPPA_BERRY, ITEM_REVIVE, ITEM_QUICK_CLAW, ITEM_KINGS_ROCK, ITEM_FULL_RESTORE, ITEM_MAX_ELIXIR}, }; -static const u16 sPickupItemsLvlOpen[TOTAL_ROUNDS][PICKUP_ITEMS_PER_ROUND] = +static const u16 sPickupItemsLvlOpen[TOTAL_PYRAMID_ROUNDS][PICKUP_ITEMS_PER_ROUND] = { {ITEM_HYPER_POTION, ITEM_FLUFFY_TAIL, ITEM_CHERI_BERRY, ITEM_ETHER, ITEM_LUM_BERRY, ITEM_REVIVE, ITEM_BRIGHT_POWDER, ITEM_SHELL_BELL, ITEM_MAX_REVIVE, ITEM_SACRED_ASH}, {ITEM_HYPER_POTION, ITEM_DIRE_HIT, ITEM_PECHA_BERRY, ITEM_ETHER, ITEM_LEPPA_BERRY, ITEM_REVIVE, ITEM_LEFTOVERS, ITEM_CHOICE_BAND, ITEM_FULL_RESTORE, ITEM_MAX_ELIXIR}, @@ -977,10 +977,10 @@ static void SetPickupItem(void) u8 id; u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; u32 floor = gSaveBlock2Ptr->frontier.curChallengeBattleNum; - u32 round = (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvlMode] / FRONTIER_STAGES_PER_CHALLENGE) % TOTAL_ROUNDS; + u32 round = (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvlMode] / FRONTIER_STAGES_PER_CHALLENGE) % TOTAL_PYRAMID_ROUNDS; - if (round >= TOTAL_ROUNDS) - round = TOTAL_ROUNDS - 1; + if (round >= TOTAL_PYRAMID_ROUNDS) + round = TOTAL_PYRAMID_ROUNDS - 1; id = GetPyramidFloorTemplateId(); itemIndex = (gSpecialVar_LastTalked - sPyramidFloorTemplates[id].numTrainers) - 1; @@ -1345,10 +1345,10 @@ void GenerateBattlePyramidWildMon(void) const struct PyramidWildMon *wildMons; u32 id; u32 lvl = gSaveBlock2Ptr->frontier.lvlMode; - u16 round = (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvl] / FRONTIER_STAGES_PER_CHALLENGE) % TOTAL_ROUNDS; + u16 round = (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvl] / FRONTIER_STAGES_PER_CHALLENGE) % TOTAL_PYRAMID_ROUNDS; - if (round >= TOTAL_ROUNDS) - round = TOTAL_ROUNDS - 1; + if (round >= TOTAL_PYRAMID_ROUNDS) + round = TOTAL_PYRAMID_ROUNDS - 1; if (lvl != FRONTIER_LVL_50) wildMons = sOpenLevelWildMonPointers[round]; @@ -1961,8 +1961,8 @@ u16 GetBattlePyramidPickupItemId(void) u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; int round = (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvlMode] / FRONTIER_STAGES_PER_CHALLENGE); - if (round >= TOTAL_ROUNDS) - round = TOTAL_ROUNDS - 1; + if (round >= TOTAL_PYRAMID_ROUNDS) + round = TOTAL_PYRAMID_ROUNDS - 1; rand = Random() % 100; diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index d580cf6800..9d5cee94a5 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -1299,11 +1299,18 @@ static void TryCloseBagToGiveItem(u8 taskId) static void BagAction_UseInBattle(u8 taskId) { - if (ItemId_GetBattleFunc(gSpecialVar_ItemId) != NULL) - { - CloseMenuActionWindow(); - ItemId_GetBattleFunc(gSpecialVar_ItemId)(taskId); - } + // Safety check + u16 type = ItemId_GetType(gSpecialVar_ItemId); + if (!ItemId_GetBattleUsage(gSpecialVar_ItemId)) + return; + + CloseMenuActionWindow(); + if (type == ITEM_USE_BAG_MENU) + ItemUseInBattle_BagMenu(taskId); + else if (type == ITEM_USE_PARTY_MENU) + ItemUseInBattle_PartyMenu(taskId); + else if (type == ITEM_USE_PARTY_MENU_MOVES) + ItemUseInBattle_PartyMenuChooseMove(taskId); } static void Task_BeginItemSwap(u8 taskId) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 00ff0737b6..cda76135be 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -23,6 +23,7 @@ #include "main.h" #include "palette.h" #include "money.h" +#include "malloc.h" #include "bg.h" #include "string_util.h" #include "pokemon_icon.h" @@ -51,6 +52,7 @@ #include "constants/battle_string_ids.h" #include "constants/hold_effects.h" #include "constants/items.h" +#include "constants/item_effects.h" #include "constants/map_types.h" #include "constants/moves.h" #include "constants/party_menu.h" @@ -60,6 +62,37 @@ #include "battle_util.h" #include "constants/pokemon.h" +// Helper for accessing command arguments and advancing gBattlescriptCurrInstr. +// +// For example accuracycheck is defined as: +// +// .macro accuracycheck failInstr:req, move:req +// .byte 0x1 +// .4byte \failInstr +// .2byte \move +// .endm +// +// Which corresponds to: +// +// CMD_ARGS(const u8 *failInstr, u16 move); +// +// The arguments can be accessed as cmd->failInstr and cmd->move. +// gBattlescriptCurrInstr = cmd->nextInstr; advances to the next instruction. +#define CMD_ARGS(...) const struct __attribute__((packed)) { u8 opcode; MEMBERS(__VA_ARGS__) const u8 nextInstr[0]; } *const cmd = (const void *)gBattlescriptCurrInstr +#define VARIOUS_ARGS(...) CMD_ARGS(u8 battler, u8 id, ##__VA_ARGS__) +#define NATIVE_ARGS(...) CMD_ARGS(void (*func)(void), ##__VA_ARGS__) + +#define MEMBERS(...) VARARG_8(MEMBERS_, __VA_ARGS__) +#define MEMBERS_0() +#define MEMBERS_1(a) a; +#define MEMBERS_2(a, b) a; b; +#define MEMBERS_3(a, b, c) a; b; c; +#define MEMBERS_4(a, b, c, d) a; b; c; d; +#define MEMBERS_5(a, b, c, d, e) a; b; c; d; e; +#define MEMBERS_6(a, b, c, d, e, f) a; b; c; d; e; f; +#define MEMBERS_7(a, b, c, d, e, f, g) a; b; c; d; e; f; g; +#define MEMBERS_8(a, b, c, d, e, f, g, h) a; b; c; d; e; f; g; h; + extern struct Evolution gEvolutionTable[][EVOS_PER_MON]; extern const u8 *const gBattleScriptsForMoveEffects[]; @@ -318,6 +351,8 @@ static void SpriteCB_MonIconOnLvlUpBanner(struct Sprite *sprite); static bool32 CriticalCapture(u32 odds); static void BestowItem(u32 battlerAtk, u32 battlerDef); static bool8 IsFinalStrikeEffect(u16 move); +static void TryUpdateRoundTurnOrder(void); +static bool32 ChangeOrderTargetAfterAttacker(void); static void Cmd_attackcanceler(void); static void Cmd_accuracycheck(void); @@ -1410,8 +1445,23 @@ static bool32 TryAegiFormChange(void) return TRUE; } +bool32 ProteanTryChangeType(u32 battler, u32 ability, u32 move, u32 moveType) +{ + if ((ability == ABILITY_PROTEAN || ability == ABILITY_LIBERO) + && (gBattleMons[battler].type1 != moveType || gBattleMons[battler].type2 != moveType + || (gBattleMons[battler].type3 != moveType && gBattleMons[battler].type3 != TYPE_MYSTERY)) + && move != MOVE_STRUGGLE) + { + SET_BATTLER_TYPE(gBattlerAttacker, moveType); + return TRUE; + } + return FALSE; +} + static void Cmd_attackcanceler(void) { + CMD_ARGS(); + s32 i, moveType; u16 attackerAbility = GetBattlerAbility(gBattlerAttacker); @@ -1464,13 +1514,9 @@ static void Cmd_attackcanceler(void) } // Check Protean activation. - if ((attackerAbility == ABILITY_PROTEAN || attackerAbility == ABILITY_LIBERO) - && (gBattleMons[gBattlerAttacker].type1 != moveType || gBattleMons[gBattlerAttacker].type2 != moveType || - (gBattleMons[gBattlerAttacker].type3 != moveType && gBattleMons[gBattlerAttacker].type3 != TYPE_MYSTERY)) - && gCurrentMove != MOVE_STRUGGLE) + if (ProteanTryChangeType(gBattlerAttacker, attackerAbility, gCurrentMove, moveType)) { PREPARE_TYPE_BUFFER(gBattleTextBuff1, moveType); - SET_BATTLER_TYPE(gBattlerAttacker, moveType); gBattlerAbility = gBattlerAttacker; BattleScriptPushCursor(); PrepareStringBattle(STRINGID_EMPTYSTRING3, gBattlerAttacker); @@ -1529,6 +1575,7 @@ static void Cmd_attackcanceler(void) PressurePPLose(gBattlerAttacker, gBattlerTarget, MOVE_MAGIC_COAT); gProtectStructs[gBattlerTarget].usesBouncedMove = TRUE; gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleStruct->atkCancellerTracker = CANCELLER_POWDER_MOVE; // Edge case for bouncing a powder move against a grass type pokemon. if (BlocksPrankster(gCurrentMove, gBattlerTarget, gBattlerAttacker, TRUE)) { // Opponent used a prankster'd magic coat -> reflected status move should fail against a dark-type attacker @@ -1546,11 +1593,20 @@ static void Cmd_attackcanceler(void) && gBattleMoves[gCurrentMove].flags & FLAG_MAGIC_COAT_AFFECTED && !gProtectStructs[gBattlerAttacker].usesBouncedMove) { - RecordAbilityBattle(gBattlerTarget, ABILITY_MAGIC_BOUNCE); gProtectStructs[gBattlerTarget].usesBouncedMove = TRUE; gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleStruct->atkCancellerTracker = CANCELLER_POWDER_MOVE; // Edge case for bouncing a powder move against a grass type pokemon. BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_MagicCoatBounce; + gBattlerAbility = gBattlerTarget; + return; + } + + // Z-moves and Max Moves bypass protection, but deal reduced damage (factored in CalcFinalDmg) + if (gBattleStruct->zmove.active && IS_BATTLER_PROTECTED(gBattlerTarget)) + { + BattleScriptPush(cmd->nextInstr); + gBattlescriptCurrInstr = BattleScript_CouldntFullyProtect; return; } @@ -1602,16 +1658,16 @@ static void Cmd_attackcanceler(void) gMultiHitCounter = 0; } gBattleCommunication[MISS_TYPE] = B_MSG_PROTECTED; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } else if (gProtectStructs[gBattlerTarget].beakBlastCharge && IsMoveMakingContact(gCurrentMove, gBattlerAttacker)) { gProtectStructs[gBattlerAttacker].touchedProtectLike = TRUE; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } } @@ -1636,15 +1692,17 @@ static bool32 JumpIfMoveFailed(u8 adder, u16 move) static void Cmd_jumpifaffectedbyprotect(void) { + CMD_ARGS(const u8 *failInstr); + if (IsBattlerProtected(gBattlerTarget, gCurrentMove)) { gMoveResultFlags |= MOVE_RESULT_MISSED; - JumpIfMoveFailed(5, 0); + JumpIfMoveFailed(sizeof(*cmd), MOVE_NONE); gBattleCommunication[MISS_TYPE] = B_MSG_PROTECTED; } else { - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } @@ -1835,7 +1893,9 @@ u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, u32 atkAbility, u static void Cmd_accuracycheck(void) { - u16 type, move = T2_READ_16(gBattlescriptCurrInstr + 5); + CMD_ARGS(const u8 *failInstr, u16 move); + + u16 type, move = cmd->move; u16 moveTarget = GetBattlerMoveTargetType(gBattlerAttacker, move); if (move == ACC_CURR_MOVE) @@ -1844,30 +1904,40 @@ static void Cmd_accuracycheck(void) if (move == NO_ACC_CALC_CHECK_LOCK_ON) { if (gStatuses3[gBattlerTarget] & STATUS3_ALWAYS_HITS && gDisableStructs[gBattlerTarget].battlerWithSureHit == gBattlerAttacker) - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; else if (gStatuses3[gBattlerTarget] & (STATUS3_SEMI_INVULNERABLE)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; else if (!JumpIfMoveAffectedByProtect(0)) - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } else if (gSpecialStatuses[gBattlerAttacker].parentalBondState == PARENTAL_BOND_2ND_HIT || (gSpecialStatuses[gBattlerAttacker].multiHitOn && (gBattleMoves[move].effect != EFFECT_TRIPLE_KICK || GetBattlerAbility(gBattlerAttacker) == ABILITY_SKILL_LINK))) { // No acc checks for second hit of Parental Bond or multi hit moves, except Triple Kick/Triple Axel - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } else { + u32 accuracy; + GET_MOVE_TYPE(move, type); if (JumpIfMoveAffectedByProtect(move)) return; if (AccuracyCalcHelper(move)) return; - // final calculation - if ((Random() % 100 + 1) > GetTotalAccuracy(gBattlerAttacker, gBattlerTarget, move, GetBattlerAbility(gBattlerAttacker), GetBattlerAbility(gBattlerTarget), - GetBattlerHoldEffect(gBattlerAttacker, TRUE), GetBattlerHoldEffect(gBattlerTarget, TRUE))) + accuracy = GetTotalAccuracy( + gBattlerAttacker, + gBattlerTarget, + move, + GetBattlerAbility(gBattlerAttacker), + GetBattlerAbility(gBattlerTarget), + GetBattlerHoldEffect(gBattlerAttacker, TRUE), + GetBattlerHoldEffect(gBattlerTarget, TRUE) + ); + + if (!RandomPercentage(RNG_ACCURACY, accuracy)) { gMoveResultFlags |= MOVE_RESULT_MISSED; if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_BLUNDER_POLICY) @@ -1888,6 +1958,8 @@ static void Cmd_accuracycheck(void) static void Cmd_attackstring(void) { + CMD_ARGS(); + if (gBattleControllerExecFlags) return; @@ -1896,12 +1968,14 @@ static void Cmd_attackstring(void) PrepareStringBattle(STRINGID_USEDMOVE, gBattlerAttacker); gHitMarker |= HITMARKER_ATTACKSTRING_PRINTED; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; gBattleCommunication[MSG_DISPLAY] = 0; } static void Cmd_ppreduce(void) { + CMD_ARGS(); + s32 i, ppToDeduct = 1; if (gBattleControllerExecFlags) @@ -1961,7 +2035,7 @@ static void Cmd_ppreduce(void) } gHitMarker &= ~HITMARKER_NO_PPDEDUCT; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } // The chance is 1/N for each stage. @@ -2030,6 +2104,8 @@ s8 GetInverseCritChance(u8 battlerAtk, u8 battlerDef, u32 move) static void Cmd_critcalc(void) { + CMD_ARGS(); + u16 partySlot; s32 critChance = CalcCritChanceStage(gBattlerAttacker, gBattlerTarget, gCurrentMove, TRUE); gPotentialItemEffectBattler = gBattlerAttacker; @@ -2040,10 +2116,8 @@ static void Cmd_critcalc(void) gIsCriticalHit = FALSE; else if (critChance == -2) gIsCriticalHit = TRUE; - else if (Random() % sCriticalHitChance[critChance] == 0) - gIsCriticalHit = TRUE; else - gIsCriticalHit = FALSE; + gIsCriticalHit = RandomWeighted(RNG_CRITICAL_HIT, sCriticalHitChance[critChance] - 1, 1); // Counter for EVO_CRITICAL_HITS. partySlot = gBattlerPartyIndexes[gBattlerAttacker]; @@ -2051,30 +2125,36 @@ static void Cmd_critcalc(void) && !(gBattleTypeFlags & BATTLE_TYPE_MULTI && GetBattlerPosition(gBattlerAttacker) == B_POSITION_PLAYER_LEFT)) gPartyCriticalHits[partySlot]++; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_damagecalc(void) { + CMD_ARGS(); + u8 moveType; GET_MOVE_TYPE(gCurrentMove, moveType); gBattleMoveDamage = CalculateMoveDamage(gCurrentMove, gBattlerAttacker, gBattlerTarget, moveType, 0, gIsCriticalHit, TRUE, TRUE); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_typecalc(void) { + CMD_ARGS(); + u8 moveType; GET_MOVE_TYPE(gCurrentMove, moveType); CalcTypeEffectivenessMultiplier(gCurrentMove, moveType, gBattlerAttacker, gBattlerTarget, TRUE); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_adjustdamage(void) { + CMD_ARGS(); + u8 holdEffect, param; u32 moveType; u32 friendshipScore = GetBattlerFriendshipScore(gBattlerTarget); @@ -2157,7 +2237,7 @@ static void Cmd_adjustdamage(void) #endif END: - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && gBattleMoveDamage >= 1) gSpecialStatuses[gBattlerAttacker].damagedMons |= gBitTable[gBattlerTarget]; @@ -2200,6 +2280,8 @@ END: static void Cmd_multihitresultmessage(void) { + CMD_ARGS(); + if (gBattleControllerExecFlags) return; @@ -2225,7 +2307,7 @@ static void Cmd_multihitresultmessage(void) return; } } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; // Print berry reducing message after result message. if (gSpecialStatuses[gBattlerTarget].berryReduced @@ -2239,6 +2321,8 @@ static void Cmd_multihitresultmessage(void) static void Cmd_attackanimation(void) { + CMD_ARGS(); + u16 moveTarget = GetBattlerMoveTargetType(gBattlerAttacker, gCurrentMove); if (gBattleControllerExecFlags) @@ -2250,7 +2334,7 @@ static void Cmd_attackanimation(void) // In a wild double battle gotta use the teleport animation if two wild pokemon are alive. && !(gCurrentMove == MOVE_TELEPORT && WILD_DOUBLE_BATTLE && GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT && IsBattlerAlive(BATTLE_PARTNER(gBattlerAttacker)))) { - BattleScriptPush(gBattlescriptCurrInstr + 1); + BattleScriptPush(cmd->nextInstr); gBattlescriptCurrInstr = BattleScript_Pausex20; gBattleScripting.animTurn++; gBattleScripting.animTargetsHit++; @@ -2259,7 +2343,7 @@ static void Cmd_attackanimation(void) { if (gSpecialStatuses[gBattlerAttacker].parentalBondState == PARENTAL_BOND_2ND_HIT) // No animation on second hit { - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; return; } @@ -2268,7 +2352,7 @@ static void Cmd_attackanimation(void) || moveTarget & MOVE_TARGET_DEPENDS) && gBattleScripting.animTargetsHit) { - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; return; } if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)) @@ -2293,11 +2377,11 @@ static void Cmd_attackanimation(void) gBattleScripting.animTurn++; gBattleScripting.animTargetsHit++; MarkBattlerForControllerExec(gBattlerAttacker); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - BattleScriptPush(gBattlescriptCurrInstr + 1); + BattleScriptPush(cmd->nextInstr); gBattlescriptCurrInstr = BattleScript_Pausex20; } } @@ -2305,18 +2389,22 @@ static void Cmd_attackanimation(void) static void Cmd_waitanimation(void) { + CMD_ARGS(); + if (gBattleControllerExecFlags == 0) - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_healthbarupdate(void) { + CMD_ARGS(u8 battler); + if (gBattleControllerExecFlags) return; if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) || (gHitMarker & HITMARKER_PASSIVE_DAMAGE)) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); if (DoesSubstituteBlockMove(gBattlerAttacker, gActiveBattler, gCurrentMove) && gDisableStructs[gActiveBattler].substituteHP && !(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE)) { @@ -2334,11 +2422,13 @@ static void Cmd_healthbarupdate(void) } } - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_datahpupdate(void) { + CMD_ARGS(u8 battler); + u32 moveType; if (gBattleControllerExecFlags) @@ -2353,7 +2443,7 @@ static void Cmd_datahpupdate(void) if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) || (gHitMarker & HITMARKER_PASSIVE_DAMAGE)) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); if (DoesSubstituteBlockMove(gBattlerAttacker, gActiveBattler, gCurrentMove) && gDisableStructs[gActiveBattler].substituteHP && !(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE)) { if (gDisableStructs[gActiveBattler].substituteHP >= gBattleMoveDamage) @@ -2373,7 +2463,7 @@ static void Cmd_datahpupdate(void) // check substitute fading if (gDisableStructs[gActiveBattler].substituteHP == 0) { - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_SubstituteFade; return; @@ -2382,7 +2472,7 @@ static void Cmd_datahpupdate(void) else if (DoesDisguiseBlockMove(gBattlerAttacker, gActiveBattler, gCurrentMove)) { gBattleMons[gActiveBattler].species = SPECIES_MIMIKYU_BUSTED; - BattleScriptPush(gBattlescriptCurrInstr + 2); + BattleScriptPush(cmd->nextInstr); gBattlescriptCurrInstr = BattleScript_TargetFormChange; } else @@ -2404,7 +2494,7 @@ static void Cmd_datahpupdate(void) else { gTakenDmg[gActiveBattler] += gBattleMoveDamage; - if (gBattlescriptCurrInstr[1] == BS_TARGET) + if (cmd->battler == BS_TARGET) gTakenDmgByBattler[gActiveBattler] = gBattlerAttacker; else gTakenDmgByBattler[gActiveBattler] = gBattlerTarget; @@ -2428,7 +2518,7 @@ static void Cmd_datahpupdate(void) { gProtectStructs[gActiveBattler].physicalDmg = gHpDealt; gSpecialStatuses[gActiveBattler].physicalDmg = gHpDealt; - if (gBattlescriptCurrInstr[1] == BS_TARGET) + if (cmd->battler == BS_TARGET) { gProtectStructs[gActiveBattler].physicalBattlerId = gBattlerAttacker; gSpecialStatuses[gActiveBattler].physicalBattlerId = gBattlerAttacker; @@ -2443,7 +2533,7 @@ static void Cmd_datahpupdate(void) { gProtectStructs[gActiveBattler].specialDmg = gHpDealt; gSpecialStatuses[gActiveBattler].specialDmg = gHpDealt; - if (gBattlescriptCurrInstr[1] == BS_TARGET) + if (cmd->battler == BS_TARGET) { gProtectStructs[gActiveBattler].specialBattlerId = gBattlerAttacker; gSpecialStatuses[gActiveBattler].specialBattlerId = gBattlerAttacker; @@ -2462,15 +2552,17 @@ static void Cmd_datahpupdate(void) } else { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); if (gSpecialStatuses[gActiveBattler].dmg == 0) gSpecialStatuses[gActiveBattler].dmg = 0xFFFF; } - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_critmessage(void) { + CMD_ARGS(); + if (gBattleControllerExecFlags == 0) { if (gIsCriticalHit == TRUE && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)) @@ -2478,12 +2570,14 @@ static void Cmd_critmessage(void) PrepareStringBattle(STRINGID_CRITICALHIT, gBattlerAttacker); gBattleCommunication[MSG_DISPLAY] = 1; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_effectivenesssound(void) { + CMD_ARGS(); + if (gBattleControllerExecFlags) return; @@ -2527,11 +2621,13 @@ static void Cmd_effectivenesssound(void) break; } } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_resultmessage(void) { + CMD_ARGS(); + u32 stringId = 0; if (gBattleControllerExecFlags) @@ -2638,7 +2734,7 @@ static void Cmd_resultmessage(void) if (stringId) PrepareStringBattle(stringId, gBattlerAttacker); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; // Print berry reducing message after result message. if (gSpecialStatuses[gBattlerTarget].berryReduced @@ -2652,42 +2748,48 @@ static void Cmd_resultmessage(void) static void Cmd_printstring(void) { + CMD_ARGS(u16 id); + if (gBattleControllerExecFlags == 0) { - u16 var = T2_READ_16(gBattlescriptCurrInstr + 1); + u16 id = cmd->id; - gBattlescriptCurrInstr += 3; - PrepareStringBattle(var, gBattlerAttacker); + gBattlescriptCurrInstr = cmd->nextInstr; + PrepareStringBattle(id, gBattlerAttacker); gBattleCommunication[MSG_DISPLAY] = 1; } } static void Cmd_printselectionstring(void) { + CMD_ARGS(u16 id); + gActiveBattler = gBattlerAttacker; - BtlController_EmitPrintSelectionString(BUFFER_A, T2_READ_16(gBattlescriptCurrInstr + 1)); + BtlController_EmitPrintSelectionString(BUFFER_A, cmd->id); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 3; + gBattlescriptCurrInstr = cmd->nextInstr; gBattleCommunication[MSG_DISPLAY] = 1; } static void Cmd_waitmessage(void) { + CMD_ARGS(u16 time); + if (gBattleControllerExecFlags == 0) { if (!gBattleCommunication[MSG_DISPLAY]) { - gBattlescriptCurrInstr += 3; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - u16 toWait = T2_READ_16(gBattlescriptCurrInstr + 1); + u16 toWait = cmd->time; if (++gPauseCounterBattle >= toWait) { gPauseCounterBattle = 0; - gBattlescriptCurrInstr += 3; + gBattlescriptCurrInstr = cmd->nextInstr; gBattleCommunication[MSG_DISPLAY] = 0; } } @@ -2696,12 +2798,14 @@ static void Cmd_waitmessage(void) static void Cmd_printfromtable(void) { + CMD_ARGS(const u16 *ptr); + if (gBattleControllerExecFlags == 0) { - const u16 *ptr = (const u16 *) T1_READ_PTR(gBattlescriptCurrInstr + 1); + const u16 *ptr = cmd->ptr; ptr += gBattleCommunication[MULTISTRING_CHOOSER]; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; PrepareStringBattle(*ptr, gBattlerAttacker); gBattleCommunication[MSG_DISPLAY] = 1; } @@ -2709,16 +2813,18 @@ static void Cmd_printfromtable(void) static void Cmd_printselectionstringfromtable(void) { + CMD_ARGS(const u16 *ptr); + if (gBattleControllerExecFlags == 0) { - const u16 *ptr = (const u16 *) T1_READ_PTR(gBattlescriptCurrInstr + 1); + const u16 *ptr = cmd->ptr; ptr += gBattleCommunication[MULTISTRING_CHOOSER]; gActiveBattler = gBattlerAttacker; BtlController_EmitPrintSelectionString(BUFFER_A, *ptr); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; gBattleCommunication[MSG_DISPLAY] = 1; } } @@ -2789,6 +2895,7 @@ void SetMoveEffect(bool32 primary, u32 certain) bool32 mirrorArmorReflected = (GetBattlerAbility(gBattlerTarget) == ABILITY_MIRROR_ARMOR); u32 flags = 0; u16 battlerAbility; + bool8 activateAfterFaint = FALSE; if (gSpecialStatuses[gBattlerAttacker].parentalBondState == PARENTAL_BOND_1ST_HIT && gBattleMons[gBattlerTarget].hp != 0 @@ -2803,9 +2910,17 @@ void SetMoveEffect(bool32 primary, u32 certain) case MOVE_EFFECT_KNOCK_OFF: case MOVE_EFFECT_SMACK_DOWN: case MOVE_EFFECT_REMOVE_STATUS: + case MOVE_EFFECT_STOCKPILE_WORE_OFF: gBattleStruct->moveEffect2 = gBattleScripting.moveEffect; gBattlescriptCurrInstr++; return; + case MOVE_EFFECT_STEALTH_ROCK: + case MOVE_EFFECT_SPIKES: + case MOVE_EFFECT_PAYDAY: + case MOVE_EFFECT_STEAL_ITEM: + case MOVE_EFFECT_BUG_BITE: + activateAfterFaint = TRUE; + break; } if (gBattleScripting.moveEffect & MOVE_EFFECT_AFFECTS_USER) @@ -2846,10 +2961,7 @@ void SetMoveEffect(bool32 primary, u32 certain) if (TestSheerForceFlag(gBattlerAttacker, gCurrentMove) && affectsUser != MOVE_EFFECT_AFFECTS_USER) INCREMENT_RESET_RETURN - if (gBattleMons[gEffectBattler].hp == 0 - && gBattleScripting.moveEffect != MOVE_EFFECT_PAYDAY - && gBattleScripting.moveEffect != MOVE_EFFECT_STEAL_ITEM - && gBattleScripting.moveEffect != MOVE_EFFECT_BUG_BITE) + if (gBattleMons[gEffectBattler].hp == 0 && !activateAfterFaint) INCREMENT_RESET_RETURN if (DoesSubstituteBlockMove(gBattlerAttacker, gEffectBattler, gCurrentMove) && affectsUser != MOVE_EFFECT_AFFECTS_USER) @@ -3056,9 +3168,9 @@ void SetMoveEffect(bool32 primary, u32 certain) if (sStatusFlagsForMoveEffects[gBattleScripting.moveEffect] == STATUS1_SLEEP) #if B_SLEEP_TURNS >= GEN_5 - gBattleMons[gEffectBattler].status1 |= ((Random() % 3) + 2); + gBattleMons[gEffectBattler].status1 |= STATUS1_SLEEP_TURN(1 + RandomUniform(RNG_SLEEP_TURNS, 1, 3)); #else - gBattleMons[gEffectBattler].status1 |= ((Random() % 4) + 3); + gBattleMons[gEffectBattler].status1 |= STATUS1_SLEEP_TURN(1 + RandomUniform(RNG_SLEEP_TURNS, 2, 5)); #endif else gBattleMons[gEffectBattler].status1 |= sStatusFlagsForMoveEffects[gBattleScripting.moveEffect]; @@ -3207,7 +3319,8 @@ void SetMoveEffect(bool32 primary, u32 certain) } else { - gBattleScripting.moveEffect = Random() % 3 + 3; + static const u8 sTriAttackEffects[] = { MOVE_EFFECT_BURN, MOVE_EFFECT_FREEZE, MOVE_EFFECT_PARALYSIS }; + gBattleScripting.moveEffect = RandomElement(RNG_TRI_ATTACK, sTriAttackEffects); SetMoveEffect(FALSE, 0); } break; @@ -3461,7 +3574,7 @@ void SetMoveEffect(bool32 primary, u32 certain) { gBattleMons[gEffectBattler].status2 |= STATUS2_MULTIPLETURNS; gLockedMoves[gEffectBattler] = gCurrentMove; - gBattleMons[gEffectBattler].status2 |= STATUS2_LOCK_CONFUSE_TURN((Random() & 1) + 2); // thrash for 2-3 turns + gBattleMons[gEffectBattler].status2 |= STATUS2_LOCK_CONFUSE_TURN(RandomUniform(RNG_RAMPAGE_TURNS, 2, 3)); } break; case MOVE_EFFECT_SP_ATK_TWO_DOWN: // Overheat @@ -3634,7 +3747,7 @@ void SetMoveEffect(bool32 primary, u32 certain) BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_BothCanNoLongerEscape; } - if (!gBattleMons[gBattlerTarget].status2 & STATUS2_ESCAPE_PREVENTION) + if (!(gBattleMons[gBattlerTarget].status2 & STATUS2_ESCAPE_PREVENTION)) gDisableStructs[gBattlerTarget].battlerPreventingEscape = gBattlerAttacker; if (!(gBattleMons[gBattlerAttacker].status2 & STATUS2_ESCAPE_PREVENTION)) @@ -3660,6 +3773,34 @@ void SetMoveEffect(bool32 primary, u32 certain) BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_DoubleShockRemoveType; break; + case MOVE_EFFECT_ROUND: + TryUpdateRoundTurnOrder(); // If another Pokémon uses Round before the user this turn, the user will use Round directly after it + gBattlescriptCurrInstr++; + break; + case MOVE_EFFECT_DIRE_CLAW: + if (!gBattleMons[gEffectBattler].status1) + { + static const u8 sDireClawEffects[] = { MOVE_EFFECT_POISON, MOVE_EFFECT_PARALYSIS, MOVE_EFFECT_SLEEP }; + gBattleScripting.moveEffect = RandomElement(RNG_DIRE_CLAW, sDireClawEffects); + SetMoveEffect(TRUE, 0); + } + break; + case MOVE_EFFECT_STEALTH_ROCK: + if (!(gSideStatuses[GetBattlerSide(gEffectBattler)] & SIDE_STATUS_STEALTH_ROCK)) + { + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_POINTEDSTONESFLOAT; + BattleScriptPush(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_StealthRockActivates; + } + break; + case MOVE_EFFECT_SPIKES: + if (gSideTimers[GetBattlerSide(gEffectBattler)].spikesAmount < 3) + { + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SPIKESSCATTERED; + BattleScriptPush(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_SpikesActivates; + } + break; } } } @@ -3669,6 +3810,8 @@ void SetMoveEffect(bool32 primary, u32 certain) static void Cmd_seteffectwithchance(void) { + CMD_ARGS(); + u32 percentChance; if (GetBattlerAbility(gBattlerAttacker) == ABILITY_SERENE_GRACE) @@ -3676,24 +3819,27 @@ static void Cmd_seteffectwithchance(void) else percentChance = gBattleMoves[gCurrentMove].secondaryEffectChance; - if (gBattleScripting.moveEffect & MOVE_EFFECT_CERTAIN - && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)) + if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) + && gBattleScripting.moveEffect) { - gBattleScripting.moveEffect &= ~MOVE_EFFECT_CERTAIN; - SetMoveEffect(FALSE, MOVE_EFFECT_CERTAIN); - } - else if (Random() % 100 < percentChance - && gBattleScripting.moveEffect - && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)) - { - if (percentChance >= 100) + if (gBattleScripting.moveEffect & MOVE_EFFECT_CERTAIN + || percentChance >= 100) + { + gBattleScripting.moveEffect &= ~MOVE_EFFECT_CERTAIN; SetMoveEffect(FALSE, MOVE_EFFECT_CERTAIN); - else + } + else if (RandomPercentage(RNG_SECONDARY_EFFECT, percentChance)) + { SetMoveEffect(FALSE, 0); + } + else + { + gBattlescriptCurrInstr = cmd->nextInstr; + } } else { - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } gBattleScripting.moveEffect = 0; @@ -3702,17 +3848,23 @@ static void Cmd_seteffectwithchance(void) static void Cmd_seteffectprimary(void) { + CMD_ARGS(); + SetMoveEffect(TRUE, 0); } static void Cmd_seteffectsecondary(void) { + CMD_ARGS(); + SetMoveEffect(FALSE, 0); } static void Cmd_clearstatusfromeffect(void) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + CMD_ARGS(u8 battler); + + gActiveBattler = GetBattlerForBattleScript(cmd->battler); if (gBattleScripting.moveEffect <= PRIMARY_STATUS_MOVE_EFFECT) gBattleMons[gActiveBattler].status1 &= (~sStatusFlagsForMoveEffects[gBattleScripting.moveEffect]); @@ -3720,66 +3872,67 @@ static void Cmd_clearstatusfromeffect(void) gBattleMons[gActiveBattler].status2 &= (~sStatusFlagsForMoveEffects[gBattleScripting.moveEffect]); gBattleScripting.moveEffect = 0; - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; gBattleScripting.multihitMoveEffect = 0; } static void Cmd_tryfaintmon(void) { - const u8 *BS_ptr; + CMD_ARGS(u8 battler, bool8 isSpikes, const u8 *instr); + const u8 *instr; - if (gBattlescriptCurrInstr[2] != 0) + if (cmd->isSpikes != 0) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); if (gHitMarker & HITMARKER_FAINTED(gActiveBattler)) { - BS_ptr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + instr = cmd->instr; BattleScriptPop(); - gBattlescriptCurrInstr = BS_ptr; + gBattlescriptCurrInstr = instr; gSideStatuses[GetBattlerSide(gActiveBattler)] &= ~(SIDE_STATUS_SPIKES_DAMAGED | SIDE_STATUS_TOXIC_SPIKES_DAMAGED | SIDE_STATUS_STEALTH_ROCK_DAMAGED | SIDE_STATUS_STICKY_WEB_DAMAGED); } else { - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } } else { u8 battlerId; - if (gBattlescriptCurrInstr[1] == BS_ATTACKER) + if (cmd->battler == BS_ATTACKER) { gActiveBattler = gBattlerAttacker; battlerId = gBattlerTarget; - BS_ptr = BattleScript_FaintAttacker; + instr = BattleScript_FaintAttacker; } else { gActiveBattler = gBattlerTarget; battlerId = gBattlerAttacker; - BS_ptr = BattleScript_FaintTarget; + instr = BattleScript_FaintTarget; } if (!(gAbsentBattlerFlags & gBitTable[gActiveBattler]) && gBattleMons[gActiveBattler].hp == 0) { gHitMarker |= HITMARKER_FAINTED(gActiveBattler); - BattleScriptPush(gBattlescriptCurrInstr + 7); - gBattlescriptCurrInstr = BS_ptr; + BattleScriptPush(cmd->nextInstr); + gBattlescriptCurrInstr = instr; if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) { gHitMarker |= HITMARKER_PLAYER_FAINTED; if (gBattleResults.playerFaintCounter < 255) gBattleResults.playerFaintCounter++; AdjustFriendshipOnBattleFaint(gActiveBattler); - gSideTimers[0].retaliateTimer = 2; + gSideTimers[B_SIDE_PLAYER].retaliateTimer = 2; } else { if (gBattleResults.opponentFaintCounter < 255) gBattleResults.opponentFaintCounter++; gBattleResults.lastOpponentSpecies = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES, NULL); - gSideTimers[1].retaliateTimer = 2; + gSideTimers[B_SIDE_OPPONENT].retaliateTimer = 2; } if ((gHitMarker & HITMARKER_DESTINYBOND) && gBattleMons[gBattlerAttacker].hp != 0) { @@ -3808,27 +3961,31 @@ static void Cmd_tryfaintmon(void) } else { - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } } } static void Cmd_dofaintanimation(void) { + CMD_ARGS(u8 battler); + if (gBattleControllerExecFlags == 0) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); BtlController_EmitFaintAnimation(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_cleareffectsonfaint(void) { + CMD_ARGS(u8 battler); + if (gBattleControllerExecFlags == 0) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); if (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || gBattleMons[gActiveBattler].hp == 0) { @@ -3838,44 +3995,50 @@ static void Cmd_cleareffectsonfaint(void) } FaintClearSetData(); // Effects like attractions, trapping, etc. - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_jumpifstatus(void) { - u8 battlerId = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - u32 flags = T2_READ_32(gBattlescriptCurrInstr + 2); - const u8 *jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 6); + CMD_ARGS(u8 battler, u32 flags, const u8 *jumpInstr); + + u8 battlerId = GetBattlerForBattleScript(cmd->battler); + u32 flags = cmd->flags; + const u8 *jumpInstr = cmd->jumpInstr; if (gBattleMons[battlerId].status1 & flags && gBattleMons[battlerId].hp != 0) - gBattlescriptCurrInstr = jumpPtr; + gBattlescriptCurrInstr = jumpInstr; else - gBattlescriptCurrInstr += 10; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_jumpifstatus2(void) { - u8 battlerId = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - u32 flags = T2_READ_32(gBattlescriptCurrInstr + 2); - const u8 *jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 6); + CMD_ARGS(u8 battler, u32 flags, const u8 *jumpInstr); + + u8 battlerId = GetBattlerForBattleScript(cmd->battler); + u32 flags = cmd->flags; + const u8 *jumpInstr = cmd->jumpInstr; if (gBattleMons[battlerId].status2 & flags && gBattleMons[battlerId].hp != 0) - gBattlescriptCurrInstr = jumpPtr; + gBattlescriptCurrInstr = jumpInstr; else - gBattlescriptCurrInstr += 10; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_jumpifability(void) { + CMD_ARGS(u8 battler, u16 ability, const u8 *jumpInstr); + u32 battlerId; bool32 hasAbility = FALSE; - u32 ability = T2_READ_16(gBattlescriptCurrInstr + 2); + u32 ability = cmd->ability; - switch (gBattlescriptCurrInstr[1]) + switch (cmd->battler) { default: - battlerId = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + battlerId = GetBattlerForBattleScript(cmd->battler); if (GetBattlerAbility(battlerId) == ability) hasAbility = TRUE; break; @@ -3900,103 +4063,113 @@ static void Cmd_jumpifability(void) if (hasAbility) { gLastUsedAbility = ability; - gBattlescriptCurrInstr = T2_READ_PTR(gBattlescriptCurrInstr + 4); + gBattlescriptCurrInstr = cmd->jumpInstr; RecordAbilityBattle(battlerId, gLastUsedAbility); gBattlerAbility = battlerId; } else { - gBattlescriptCurrInstr += 8; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_jumpifsideaffecting(void) { + CMD_ARGS(u8 battler, u32 flags, const u8 *jumpInstr); + u8 side; u32 flags; - const u8 *jumpPtr; + const u8 *jumpInstr; - if (gBattlescriptCurrInstr[1] == BS_ATTACKER) + if (cmd->battler == BS_ATTACKER) side = GET_BATTLER_SIDE(gBattlerAttacker); else side = GET_BATTLER_SIDE(gBattlerTarget); - flags = T2_READ_32(gBattlescriptCurrInstr + 2); - jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 6); + flags = cmd->flags; + jumpInstr = cmd->jumpInstr; if (gSideStatuses[side] & flags) - gBattlescriptCurrInstr = jumpPtr; + gBattlescriptCurrInstr = jumpInstr; else - gBattlescriptCurrInstr += 10; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_jumpifstat(void) { - bool32 ret = 0; - u8 battlerId = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - u8 statId = gBattlescriptCurrInstr[3]; - u8 cmpTo = gBattlescriptCurrInstr[4]; - u8 cmpKind = gBattlescriptCurrInstr[2]; + CMD_ARGS(u8 battler, u8 comparison, u8 stat, u8 value, const u8 *jumpInstr); - ret = CompareStat(battlerId, statId, cmpTo, cmpKind); + bool32 ret = 0; + u8 battlerId = GetBattlerForBattleScript(cmd->battler); + u8 stat = cmd->stat; + u8 value = cmd->value; + u8 comparison = cmd->comparison; + + ret = CompareStat(battlerId, stat, value, comparison); if (ret) - gBattlescriptCurrInstr = T2_READ_PTR(gBattlescriptCurrInstr + 5); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 9; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_jumpifstatus3condition(void) { - u32 status; - const u8 *jumpPtr; + CMD_ARGS(u8 battler, u32 flags, bool8 jumpIfTrue, const u8 *jumpInstr); - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - status = T2_READ_32(gBattlescriptCurrInstr + 2); - jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 7); + u32 flags; + const u8 *jumpInstr; - if (gBattlescriptCurrInstr[6]) + gActiveBattler = GetBattlerForBattleScript(cmd->battler); + flags = cmd->flags; + jumpInstr = cmd->jumpInstr; + + if (cmd->jumpIfTrue) { - if ((gStatuses3[gActiveBattler] & status) != 0) - gBattlescriptCurrInstr += 11; + if ((gStatuses3[gActiveBattler] & flags) != 0) + gBattlescriptCurrInstr = cmd->nextInstr; else - gBattlescriptCurrInstr = jumpPtr; + gBattlescriptCurrInstr = jumpInstr; } else { - if ((gStatuses3[gActiveBattler] & status) != 0) - gBattlescriptCurrInstr = jumpPtr; + if ((gStatuses3[gActiveBattler] & flags) != 0) + gBattlescriptCurrInstr = jumpInstr; else - gBattlescriptCurrInstr += 11; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_jumpbasedontype(void) { - u8 battlerId = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - u8 type = gBattlescriptCurrInstr[2]; - const u8 *jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 4); + CMD_ARGS(u8 battler, u8 type, u8 jumpIfType, const u8 *jumpInstr); + + u8 battlerId = GetBattlerForBattleScript(cmd->battler); + u8 type = cmd->type; + const u8 *jumpInstr = cmd->jumpInstr; // jumpiftype - if (gBattlescriptCurrInstr[3]) + if (cmd->jumpIfType) { if (IS_BATTLER_OF_TYPE(battlerId, type)) - gBattlescriptCurrInstr = jumpPtr; + gBattlescriptCurrInstr = jumpInstr; else - gBattlescriptCurrInstr += 8; + gBattlescriptCurrInstr = cmd->nextInstr; } // jumpifnottype else { if (!IS_BATTLER_OF_TYPE(battlerId, type)) - gBattlescriptCurrInstr = jumpPtr; + gBattlescriptCurrInstr = jumpInstr; else - gBattlescriptCurrInstr += 8; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_getexp(void) { + CMD_ARGS(u8 battler); + u16 item; s32 i; // also used as stringId u8 holdEffect; @@ -4004,7 +4177,7 @@ static void Cmd_getexp(void) s32 viaExpShare = 0; u32 *exp = &gBattleStruct->expValue; - gBattlerFainted = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gBattlerFainted = GetBattlerForBattleScript(cmd->battler); sentIn = gSentPokesToOpponent[(gBattlerFainted & 2) >> 1]; switch (gBattleScripting.getexpState) @@ -4036,6 +4209,8 @@ static void Cmd_getexp(void) { if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) == SPECIES_NONE || GetMonData(&gPlayerParty[i], MON_DATA_HP) == 0) continue; + if (GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG)) + continue; if (gBitTable[i] & sentIn) viaSentIn++; @@ -4125,7 +4300,8 @@ static void Cmd_getexp(void) gBattleStruct->wildVictorySong++; } - if (GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_HP)) + if (GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_HP) + && !GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_IS_EGG)) { if (gBattleStruct->sentInPokes & 1) gBattleMoveDamage = *exp; @@ -4299,7 +4475,7 @@ static void Cmd_getexp(void) // not sure why gf clears the item and ability here gBattleMons[gBattlerFainted].item = ITEM_NONE; gBattleMons[gBattlerFainted].ability = ABILITY_NONE; - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } break; } @@ -4385,6 +4561,8 @@ bool32 NoAliveMonsForEitherParty(void) // sets gBattleOutcome accordingly, if necessary. static void Cmd_checkteamslost(void) { + CMD_ARGS(const u8 *jumpInstr); + if (gBattleControllerExecFlags) return; @@ -4429,21 +4607,21 @@ static void Cmd_checkteamslost(void) if (gBattleTypeFlags & BATTLE_TYPE_MULTI) { if (emptyOpponentSpots + emptyPlayerSpots > 1) - gBattlescriptCurrInstr = T2_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { if (emptyOpponentSpots != 0 && emptyPlayerSpots != 0) - gBattlescriptCurrInstr = T2_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } else { - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } @@ -4459,315 +4637,361 @@ static void MoveValuesCleanUp(void) static void Cmd_movevaluescleanup(void) { + CMD_ARGS(); + MoveValuesCleanUp(); - gBattlescriptCurrInstr += 1; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_setmultihit(void) { - gMultiHitCounter = gBattlescriptCurrInstr[1]; - gBattlescriptCurrInstr += 2; + CMD_ARGS(u8 value); + + gMultiHitCounter = cmd->value; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_decrementmultihit(void) { + CMD_ARGS(const u8 *loopInstr); + if (--gMultiHitCounter == 0) - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; else - gBattlescriptCurrInstr = T2_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->loopInstr; } static void Cmd_goto(void) { - gBattlescriptCurrInstr = T2_READ_PTR(gBattlescriptCurrInstr + 1); + CMD_ARGS(const u8 *instr); + + gBattlescriptCurrInstr = cmd->instr; } static void Cmd_jumpifbyte(void) { - u8 caseID = gBattlescriptCurrInstr[1]; - const u8 *memByte = T2_READ_PTR(gBattlescriptCurrInstr + 2); - u8 value = gBattlescriptCurrInstr[6]; - const u8 *jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 7); + CMD_ARGS(u8 comparison, const u8 *bytePtr, u8 value, const u8 *jumpInstr); - gBattlescriptCurrInstr += 11; + u8 comparison = cmd->comparison; + const u8 *bytePtr = cmd->bytePtr; + u8 value = cmd->value; + const u8 *jumpInstr = cmd->jumpInstr; - switch (caseID) + gBattlescriptCurrInstr = cmd->nextInstr; + + switch (comparison) { case CMP_EQUAL: - if (*memByte == value) - gBattlescriptCurrInstr = jumpPtr; + if (*bytePtr == value) + gBattlescriptCurrInstr = jumpInstr; break; case CMP_NOT_EQUAL: - if (*memByte != value) - gBattlescriptCurrInstr = jumpPtr; + if (*bytePtr != value) + gBattlescriptCurrInstr = jumpInstr; break; case CMP_GREATER_THAN: - if (*memByte > value) - gBattlescriptCurrInstr = jumpPtr; + if (*bytePtr > value) + gBattlescriptCurrInstr = jumpInstr; break; case CMP_LESS_THAN: - if (*memByte < value) - gBattlescriptCurrInstr = jumpPtr; + if (*bytePtr < value) + gBattlescriptCurrInstr = jumpInstr; break; case CMP_COMMON_BITS: - if (*memByte & value) - gBattlescriptCurrInstr = jumpPtr; + if (*bytePtr & value) + gBattlescriptCurrInstr = jumpInstr; break; case CMP_NO_COMMON_BITS: - if (!(*memByte & value)) - gBattlescriptCurrInstr = jumpPtr; + if (!(*bytePtr & value)) + gBattlescriptCurrInstr = jumpInstr; break; } } static void Cmd_jumpifhalfword(void) { - u8 caseID = gBattlescriptCurrInstr[1]; - const u16 *memHword = T2_READ_PTR(gBattlescriptCurrInstr + 2); - u16 value = T2_READ_16(gBattlescriptCurrInstr + 6); - const u8 *jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 8); + CMD_ARGS(u8 comparison, const u16 *halfwordPtr, u16 value, const u8 *jumpInstr); - gBattlescriptCurrInstr += 12; + u8 comparison = cmd->comparison; + const u16 *halfwordPtr = cmd->halfwordPtr; + u16 value = cmd->value; + const u8 *jumpInstr = cmd->jumpInstr; - switch (caseID) + gBattlescriptCurrInstr = cmd->nextInstr; + + switch (comparison) { case CMP_EQUAL: - if (*memHword == value) - gBattlescriptCurrInstr = jumpPtr; + if (*halfwordPtr == value) + gBattlescriptCurrInstr = jumpInstr; break; case CMP_NOT_EQUAL: - if (*memHword != value) - gBattlescriptCurrInstr = jumpPtr; + if (*halfwordPtr != value) + gBattlescriptCurrInstr = jumpInstr; break; case CMP_GREATER_THAN: - if (*memHword > value) - gBattlescriptCurrInstr = jumpPtr; + if (*halfwordPtr > value) + gBattlescriptCurrInstr = jumpInstr; break; case CMP_LESS_THAN: - if (*memHword < value) - gBattlescriptCurrInstr = jumpPtr; + if (*halfwordPtr < value) + gBattlescriptCurrInstr = jumpInstr; break; case CMP_COMMON_BITS: - if (*memHword & value) - gBattlescriptCurrInstr = jumpPtr; + if (*halfwordPtr & value) + gBattlescriptCurrInstr = jumpInstr; break; case CMP_NO_COMMON_BITS: - if (!(*memHword & value)) - gBattlescriptCurrInstr = jumpPtr; + if (!(*halfwordPtr & value)) + gBattlescriptCurrInstr = jumpInstr; break; } } static void Cmd_jumpifword(void) { - u8 caseID = gBattlescriptCurrInstr[1]; - const u32 *memWord = T2_READ_PTR(gBattlescriptCurrInstr + 2); - u32 value = T1_READ_32(gBattlescriptCurrInstr + 6); - const u8 *jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 10); + CMD_ARGS(u8 comparison, const u32 *wordPtr, u32 value, const u8 *jumpInstr); - gBattlescriptCurrInstr += 14; + u8 comparison = cmd->comparison; + const u32 *wordPtr = cmd->wordPtr; + u32 value = cmd->value; + const u8 *jumpInstr = cmd->jumpInstr; - switch (caseID) + gBattlescriptCurrInstr = cmd->nextInstr; + + switch (comparison) { case CMP_EQUAL: - if (*memWord == value) - gBattlescriptCurrInstr = jumpPtr; + if (*wordPtr == value) + gBattlescriptCurrInstr = jumpInstr; break; case CMP_NOT_EQUAL: - if (*memWord != value) - gBattlescriptCurrInstr = jumpPtr; + if (*wordPtr != value) + gBattlescriptCurrInstr = jumpInstr; break; case CMP_GREATER_THAN: - if (*memWord > value) - gBattlescriptCurrInstr = jumpPtr; + if (*wordPtr > value) + gBattlescriptCurrInstr = jumpInstr; break; case CMP_LESS_THAN: - if (*memWord < value) - gBattlescriptCurrInstr = jumpPtr; + if (*wordPtr < value) + gBattlescriptCurrInstr = jumpInstr; break; case CMP_COMMON_BITS: - if (*memWord & value) - gBattlescriptCurrInstr = jumpPtr; + if (*wordPtr & value) + gBattlescriptCurrInstr = jumpInstr; break; case CMP_NO_COMMON_BITS: - if (!(*memWord & value)) - gBattlescriptCurrInstr = jumpPtr; + if (!(*wordPtr & value)) + gBattlescriptCurrInstr = jumpInstr; break; } } static void Cmd_jumpifarrayequal(void) { - const u8 *mem1 = T2_READ_PTR(gBattlescriptCurrInstr + 1); - const u8 *mem2 = T2_READ_PTR(gBattlescriptCurrInstr + 5); - u32 size = gBattlescriptCurrInstr[9]; - const u8 *jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 10); + CMD_ARGS(const u8 *array1, const u8 *array2, u8 size, const u8 *jumpInstr); + + const u8 *array1 = cmd->array1; + const u8 *array2 = cmd->array2; + u32 size = cmd->size; + const u8 *jumpInstr = cmd->jumpInstr; u8 i; for (i = 0; i < size; i++) { - if (*mem1 != *mem2) + if (*array1 != *array2) { - gBattlescriptCurrInstr += 14; + gBattlescriptCurrInstr = cmd->nextInstr; break; } - mem1++, mem2++; + array1++, array2++; } if (i == size) - gBattlescriptCurrInstr = jumpPtr; + gBattlescriptCurrInstr = jumpInstr; } static void Cmd_jumpifarraynotequal(void) { + CMD_ARGS(const u8 *array1, const u8 *array2, u8 size, const u8 *jumpInstr); + u8 equalBytes = 0; - const u8 *mem1 = T2_READ_PTR(gBattlescriptCurrInstr + 1); - const u8 *mem2 = T2_READ_PTR(gBattlescriptCurrInstr + 5); - u32 size = gBattlescriptCurrInstr[9]; - const u8 *jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 10); + const u8 *array1 = cmd->array1; + const u8 *array2 = cmd->array2; + u32 size = cmd->size; + const u8 *jumpInstr = cmd->jumpInstr; u8 i; for (i = 0; i < size; i++) { - if (*mem1 == *mem2) + if (*array1 == *array2) equalBytes++; - mem1++, mem2++; + array1++, array2++; } if (equalBytes != size) - gBattlescriptCurrInstr = jumpPtr; + gBattlescriptCurrInstr = jumpInstr; else - gBattlescriptCurrInstr += 14; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_setbyte(void) { - u8 *memByte = T2_READ_PTR(gBattlescriptCurrInstr + 1); - *memByte = gBattlescriptCurrInstr[5]; + CMD_ARGS(u8 *bytePtr, u8 value); - gBattlescriptCurrInstr += 6; + u8 *bytePtr = cmd->bytePtr; + *bytePtr = cmd->value; + + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_addbyte(void) { - u8 *memByte = T2_READ_PTR(gBattlescriptCurrInstr + 1); - *memByte += gBattlescriptCurrInstr[5]; - gBattlescriptCurrInstr += 6; + CMD_ARGS(u8 *bytePtr, u8 value); + + u8 *bytePtr = cmd->bytePtr; + *bytePtr += cmd->value; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_subbyte(void) { - u8 *memByte = T2_READ_PTR(gBattlescriptCurrInstr + 1); - *memByte -= gBattlescriptCurrInstr[5]; - gBattlescriptCurrInstr += 6; + CMD_ARGS(u8 *bytePtr, u8 value); + + u8 *bytePtr = cmd->bytePtr; + *bytePtr -= cmd->value; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_copyarray(void) { - u8 *dest = T2_READ_PTR(gBattlescriptCurrInstr + 1); - const u8 *src = T2_READ_PTR(gBattlescriptCurrInstr + 5); - s32 size = gBattlescriptCurrInstr[9]; + CMD_ARGS(u8 *dest, const u8 *src, u8 size); + + u8 *dest = cmd->dest; + const u8 *src = cmd->src; + s32 size = cmd->size; s32 i; for (i = 0; i < size; i++) dest[i] = src[i]; - gBattlescriptCurrInstr += 10; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_copyarraywithindex(void) { - u8 *dest = T2_READ_PTR(gBattlescriptCurrInstr + 1); - const u8 *src = T2_READ_PTR(gBattlescriptCurrInstr + 5); - const u8 *index = T2_READ_PTR(gBattlescriptCurrInstr + 9); - s32 size = gBattlescriptCurrInstr[13]; + CMD_ARGS(u8 *dest, const u8 *src, const u8 *indexPtr, u8 size); + + u8 *dest = cmd->dest; + const u8 *src = cmd->src; + const u8 *indexPtr = cmd->indexPtr; + s32 size = cmd->size; s32 i; for (i = 0; i < size; i++) - dest[i] = src[i + *index]; + dest[i] = src[i + *indexPtr]; - gBattlescriptCurrInstr += 14; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_orbyte(void) { - u8 *memByte = T2_READ_PTR(gBattlescriptCurrInstr + 1); - *memByte |= gBattlescriptCurrInstr[5]; - gBattlescriptCurrInstr += 6; + CMD_ARGS(u8 *bytePtr, u8 value); + + u8 *bytePtr = cmd->bytePtr; + *bytePtr |= cmd->value; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_orhalfword(void) { - u16 *memHword = T2_READ_PTR(gBattlescriptCurrInstr + 1); - u16 val = T2_READ_16(gBattlescriptCurrInstr + 5); + CMD_ARGS(u16 *halfwordPtr, u16 value); - *memHword |= val; - gBattlescriptCurrInstr += 7; + u16 *halfwordPtr = cmd->halfwordPtr; + u16 value = cmd->value; + + *halfwordPtr |= value; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_orword(void) { - u32 *memWord = T2_READ_PTR(gBattlescriptCurrInstr + 1); - u32 val = T2_READ_32(gBattlescriptCurrInstr + 5); + CMD_ARGS(u32 *wordPtr, u32 value); - *memWord |= val; - gBattlescriptCurrInstr += 9; + u32 *wordPtr = cmd->wordPtr; + u32 value = cmd->value; + + *wordPtr |= value; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_bicbyte(void) { - u8 *memByte = T2_READ_PTR(gBattlescriptCurrInstr + 1); - *memByte &= ~(gBattlescriptCurrInstr[5]); - gBattlescriptCurrInstr += 6; + CMD_ARGS(u8 *bytePtr, u8 value); + + u8 *bytePtr = cmd->bytePtr; + *bytePtr &= ~cmd->value; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_bichalfword(void) { - u16 *memHword = T2_READ_PTR(gBattlescriptCurrInstr + 1); - u16 val = T2_READ_16(gBattlescriptCurrInstr + 5); + CMD_ARGS(u16 *halfwordPtr, u16 value); - *memHword &= ~val; - gBattlescriptCurrInstr += 7; + u16 *halfwordPtr = cmd->halfwordPtr; + u16 value = cmd->value; + + *halfwordPtr &= ~value; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_bicword(void) { - u32 *memWord = T2_READ_PTR(gBattlescriptCurrInstr + 1); - u32 val = T2_READ_32(gBattlescriptCurrInstr + 5); + CMD_ARGS(u32 *wordPtr, u32 value); - *memWord &= ~val; - gBattlescriptCurrInstr += 9; + u32 *wordPtr = cmd->wordPtr; + u32 value = cmd->value; + + *wordPtr &= ~value; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_pause(void) { + CMD_ARGS(u16 frames); + if (gBattleControllerExecFlags == 0) { - u16 value = T2_READ_16(gBattlescriptCurrInstr + 1); + u16 value = cmd->frames; if (++gPauseCounterBattle >= value) { gPauseCounterBattle = 0; - gBattlescriptCurrInstr += 3; + gBattlescriptCurrInstr = cmd->nextInstr; } } } static void Cmd_waitstate(void) { + CMD_ARGS(); + if (gBattleControllerExecFlags == 0) - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_healthbar_update(void) { - if (gBattlescriptCurrInstr[1] == BS_TARGET) + CMD_ARGS(u8 battler); + + if (cmd->battler == BS_TARGET) gActiveBattler = gBattlerTarget; else gActiveBattler = gBattlerAttacker; BtlController_EmitHealthBarUpdate(BUFFER_A, gBattleMoveDamage); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_return(void) @@ -4777,6 +5001,8 @@ static void Cmd_return(void) static void Cmd_end(void) { + CMD_ARGS(); + if (gBattleTypeFlags & BATTLE_TYPE_ARENA) BattleArena_AddSkillPoints(gBattlerAttacker); @@ -4787,6 +5013,8 @@ static void Cmd_end(void) static void Cmd_end2(void) { + CMD_ARGS(); + gActiveBattler = 0; gCurrentActionFuncId = B_ACTION_TRY_FINISH; } @@ -4794,6 +5022,8 @@ static void Cmd_end2(void) // Pops the main function stack static void Cmd_end3(void) { + CMD_ARGS(); + BattleScriptPop(); if (gBattleResources->battleCallbackStack->size != 0) gBattleResources->battleCallbackStack->size--; @@ -4802,12 +5032,16 @@ static void Cmd_end3(void) static void Cmd_call(void) { - BattleScriptPush(gBattlescriptCurrInstr + 5); - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + CMD_ARGS(const u8 *instr); + + BattleScriptPush(cmd->nextInstr); + gBattlescriptCurrInstr = cmd->instr; } static void Cmd_setroost(void) { + CMD_ARGS(); + gBattleResources->flags->flags[gBattlerAttacker] |= RESOURCE_FLAG_ROOST; // Pure flying type. @@ -4838,35 +5072,48 @@ static void Cmd_setroost(void) gBattleStruct->roostTypes[gBattlerAttacker][1] = gBattleMons[gBattlerAttacker].type2; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_jumpifabilitypresent(void) { - if (IsAbilityOnField(T1_READ_16(gBattlescriptCurrInstr + 1))) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + CMD_ARGS(u16 ability, const u8 *jumpInstr); + + u16 ability = cmd->ability; + u32 abilityBattler = IsAbilityOnField(ability); + if (abilityBattler) + { + gBattlerAbility = abilityBattler - 1; + gBattlescriptCurrInstr = cmd->jumpInstr; + } else - gBattlescriptCurrInstr += 7; + { + gBattlescriptCurrInstr = cmd->nextInstr; + } } static void Cmd_endselectionscript(void) { + CMD_ARGS(); + *(gBattlerAttacker + gBattleStruct->selectionScriptFinished) = TRUE; } static void Cmd_playanimation(void) { - const u16 *argumentPtr; - u8 animId = gBattlescriptCurrInstr[2]; + CMD_ARGS(u8 battler, u8 animId, const u16 *argPtr); - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - argumentPtr = T2_READ_PTR(gBattlescriptCurrInstr + 3); + const u16 *argPtr; + u8 animId = cmd->animId; + + gActiveBattler = GetBattlerForBattleScript(cmd->battler); + argPtr = cmd->argPtr; #if B_TERRAIN_BG_CHANGE == FALSE if (animId == B_ANIM_RESTORE_BG) { // workaround for .if not working - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; } #endif @@ -4879,13 +5126,13 @@ static void Cmd_playanimation(void) || animId == B_ANIM_SUBSTITUTE_FADE || animId == B_ANIM_PRIMAL_REVERSION) { - BtlController_EmitBattleAnimation(BUFFER_A, animId, *argumentPtr); + BtlController_EmitBattleAnimation(BUFFER_A, animId, *argPtr); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } else if (gHitMarker & HITMARKER_NO_ANIMATIONS && animId != B_ANIM_RESTORE_BG) { - BattleScriptPush(gBattlescriptCurrInstr + 7); + BattleScriptPush(cmd->nextInstr); gBattlescriptCurrInstr = BattleScript_Pausex20; } else if (animId == B_ANIM_RAIN_CONTINUES @@ -4893,71 +5140,75 @@ static void Cmd_playanimation(void) || animId == B_ANIM_SANDSTORM_CONTINUES || animId == B_ANIM_HAIL_CONTINUES) { - BtlController_EmitBattleAnimation(BUFFER_A, animId, *argumentPtr); + BtlController_EmitBattleAnimation(BUFFER_A, animId, *argPtr); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } else if (gStatuses3[gActiveBattler] & STATUS3_SEMI_INVULNERABLE) { - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - BtlController_EmitBattleAnimation(BUFFER_A, animId, *argumentPtr); + BtlController_EmitBattleAnimation(BUFFER_A, animId, *argPtr); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } } // Same as playanimation, except it takes a pointer to some animation id, instead of taking the value directly static void Cmd_playanimation_var(void) { - const u16 *argumentPtr; - const u8 *animationIdPtr; + CMD_ARGS(u8 battler, const u8 *animIdPtr, const u16 *argPtr); - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - animationIdPtr = T2_READ_PTR(gBattlescriptCurrInstr + 2); - argumentPtr = T2_READ_PTR(gBattlescriptCurrInstr + 6); + const u16 *argPtr; + const u8 *animIdPtr; - if (*animationIdPtr == B_ANIM_STATS_CHANGE - || *animationIdPtr == B_ANIM_SNATCH_MOVE - || *animationIdPtr == B_ANIM_MEGA_EVOLUTION - || *animationIdPtr == B_ANIM_ILLUSION_OFF - || *animationIdPtr == B_ANIM_FORM_CHANGE - || *animationIdPtr == B_ANIM_SUBSTITUTE_FADE - || *animationIdPtr == B_ANIM_PRIMAL_REVERSION) + gActiveBattler = GetBattlerForBattleScript(cmd->battler); + animIdPtr = cmd->animIdPtr; + argPtr = cmd->argPtr; + + if (*animIdPtr == B_ANIM_STATS_CHANGE + || *animIdPtr == B_ANIM_SNATCH_MOVE + || *animIdPtr == B_ANIM_MEGA_EVOLUTION + || *animIdPtr == B_ANIM_ILLUSION_OFF + || *animIdPtr == B_ANIM_FORM_CHANGE + || *animIdPtr == B_ANIM_SUBSTITUTE_FADE + || *animIdPtr == B_ANIM_PRIMAL_REVERSION) { - BtlController_EmitBattleAnimation(BUFFER_A, *animationIdPtr, *argumentPtr); + BtlController_EmitBattleAnimation(BUFFER_A, *animIdPtr, *argPtr); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 10; + gBattlescriptCurrInstr = cmd->nextInstr; } else if (gHitMarker & HITMARKER_NO_ANIMATIONS) { - gBattlescriptCurrInstr += 10; + gBattlescriptCurrInstr = cmd->nextInstr; } - else if (*animationIdPtr == B_ANIM_RAIN_CONTINUES - || *animationIdPtr == B_ANIM_SUN_CONTINUES - || *animationIdPtr == B_ANIM_SANDSTORM_CONTINUES - || *animationIdPtr == B_ANIM_HAIL_CONTINUES) + else if (*animIdPtr == B_ANIM_RAIN_CONTINUES + || *animIdPtr == B_ANIM_SUN_CONTINUES + || *animIdPtr == B_ANIM_SANDSTORM_CONTINUES + || *animIdPtr == B_ANIM_HAIL_CONTINUES) { - BtlController_EmitBattleAnimation(BUFFER_A, *animationIdPtr, *argumentPtr); + BtlController_EmitBattleAnimation(BUFFER_A, *animIdPtr, *argPtr); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 10; + gBattlescriptCurrInstr = cmd->nextInstr; } else if (gStatuses3[gActiveBattler] & STATUS3_SEMI_INVULNERABLE) { - gBattlescriptCurrInstr += 10; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - BtlController_EmitBattleAnimation(BUFFER_A, *animationIdPtr, *argumentPtr); + BtlController_EmitBattleAnimation(BUFFER_A, *animIdPtr, *argPtr); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 10; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_setgraphicalstatchangevalues(void) { + CMD_ARGS(); + u8 value = GET_STAT_BUFF_VALUE_WITH_SIGN(gBattleScripting.statChanger); switch (value) @@ -4989,22 +5240,24 @@ static void Cmd_setgraphicalstatchangevalues(void) } gBattleScripting.animArg1 = GET_STAT_BUFF_ID(gBattleScripting.statChanger) + value - 1; gBattleScripting.animArg2 = 0; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_playstatchangeanimation(void) { + CMD_ARGS(u8 battler, u8 stats, u8 flags); + u32 ability; u32 currStat = 0; u32 statAnimId = 0; u32 changeableStatsCount = 0; - u32 statsToCheck = 0; + u32 stats = 0; u32 startingStatAnimId = 0; - u32 flags = gBattlescriptCurrInstr[3]; + u32 flags = cmd->flags; - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); ability = GetBattlerAbility(gActiveBattler); - statsToCheck = gBattlescriptCurrInstr[2]; + stats = cmd->stats; // Handle Contrary and Simple if (ability == ABILITY_CONTRARY) @@ -5019,9 +5272,9 @@ static void Cmd_playstatchangeanimation(void) else startingStatAnimId = STAT_ANIM_MINUS1 - 1; - while (statsToCheck != 0) + while (stats != 0) { - if (statsToCheck & 1) + if (stats & 1) { if (flags & STAT_CHANGE_CANT_PREVENT) { @@ -5047,7 +5300,7 @@ static void Cmd_playstatchangeanimation(void) } } } - statsToCheck >>= 1, currStat++; + stats >>= 1, currStat++; } if (changeableStatsCount > 1) // more than one stat, so the color is gray @@ -5065,14 +5318,14 @@ static void Cmd_playstatchangeanimation(void) else startingStatAnimId = STAT_ANIM_PLUS1 - 1; - while (statsToCheck != 0) + while (stats != 0) { - if (statsToCheck & 1 && gBattleMons[gActiveBattler].statStages[currStat] < MAX_STAT_STAGE) + if (stats & 1 && gBattleMons[gActiveBattler].statStages[currStat] < MAX_STAT_STAGE) { statAnimId = startingStatAnimId + currStat; changeableStatsCount++; } - statsToCheck >>= 1, currStat++; + stats >>= 1, currStat++; } if (changeableStatsCount > 1) // more than one stat, so the color is gray @@ -5086,7 +5339,7 @@ static void Cmd_playstatchangeanimation(void) if (flags & STAT_CHANGE_MULTIPLE_STATS && changeableStatsCount < 2) { - gBattlescriptCurrInstr += 4; + gBattlescriptCurrInstr = cmd->nextInstr; } else if (changeableStatsCount != 0 && !gBattleScripting.statAnimPlayed) { @@ -5094,11 +5347,11 @@ static void Cmd_playstatchangeanimation(void) MarkBattlerForControllerExec(gActiveBattler); if (flags & STAT_CHANGE_MULTIPLE_STATS && changeableStatsCount > 1) gBattleScripting.statAnimPlayed = TRUE; - gBattlescriptCurrInstr += 4; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr += 4; + gBattlescriptCurrInstr = cmd->nextInstr; } } @@ -5120,7 +5373,8 @@ static bool32 TryKnockOffBattleScript(u32 battlerDef) gLastUsedItem = gBattleMons[battlerDef].item; gBattleMons[battlerDef].item = 0; - gBattleStruct->choicedMove[battlerDef] = 0; + if (gBattleMons[battlerDef].ability != ABILITY_GORILLA_TACTICS) + gBattleStruct->choicedMove[battlerDef] = 0; gWishFutureKnock.knockedOffMons[side] |= gBitTable[gBattlerPartyIndexes[battlerDef]]; CheckSetUnburden(battlerDef); @@ -5157,6 +5411,8 @@ static u32 GetNextTarget(u32 moveTarget) static void Cmd_moveend(void) { + CMD_ARGS(u8 endMode, u8 endState); + s32 i; bool32 effect = FALSE; u32 moveType = 0; @@ -5170,8 +5426,8 @@ static void Cmd_moveend(void) else originallyUsedMove = gChosenMove; - endMode = gBattlescriptCurrInstr[1]; - endState = gBattlescriptCurrInstr[2]; + endMode = cmd->endMode; + endState = cmd->endState; holdEffectAtk = GetBattlerHoldEffect(gBattlerAttacker, TRUE); choicedMoveAtk = &gBattleStruct->choicedMove[gBattlerAttacker]; @@ -5407,6 +5663,15 @@ static void Cmd_moveend(void) case MOVE_EFFECT_KNOCK_OFF: effect = TryKnockOffBattleScript(gBattlerTarget); break; + case MOVE_EFFECT_STOCKPILE_WORE_OFF: + if (gDisableStructs[gBattlerAttacker].stockpileCounter != 0) + { + gDisableStructs[gBattlerAttacker].stockpileCounter = 0; + effect = TRUE; + BattleScriptPush(gBattlescriptCurrInstr); + gBattlescriptCurrInstr = BattleScript_MoveEffectStockpileWoreOff; + } + break; case MOVE_EFFECT_SMACK_DOWN: if (!IsBattlerGrounded(gBattlerTarget) && IsBattlerAlive(gBattlerTarget)) { @@ -5539,6 +5804,22 @@ static void Cmd_moveend(void) else gBattleStruct->lastMoveFailed &= ~(gBitTable[gBattlerAttacker]); + // Set ShellTrap to activate after the attacker's turn if target was hit by a physical move. + if (gBattleMoves[gChosenMoveByBattler[gBattlerTarget]].effect == EFFECT_SHELL_TRAP + && gBattlerTarget != gBattlerAttacker + && GetBattlerSide(gBattlerTarget) != GetBattlerSide(gBattlerAttacker) + && gProtectStructs[gBattlerTarget].physicalDmg + && gProtectStructs[gBattlerTarget].physicalBattlerId == gBattlerAttacker + && !TestSheerForceFlag(gBattlerAttacker, gCurrentMove)) + { + gProtectStructs[gBattlerTarget].shellTrap = TRUE; + // Change move order in double battles, so the hit mon with shell trap moves immediately after being hit. + if (IsDoubleBattle()) + { + ChangeOrderTargetAfterAttacker(); + } + } + if (gHitMarker & HITMARKER_SWAP_ATTACKER_TARGET) { gActiveBattler = gBattlerAttacker; @@ -5782,7 +6063,7 @@ static void Cmd_moveend(void) gBattleScripting.moveendState++; break; case MOVEEND_RED_CARD: - if (gBattleMoves[gCurrentMove].effect != EFFECT_HIT_SWITCH_TARGET + if ((gBattleMoves[gCurrentMove].effect != EFFECT_HIT_SWITCH_TARGET || gBattleStruct->hitSwitchTargetFailed) && IsBattlerAlive(gBattlerAttacker) && !TestSheerForceFlag(gBattlerAttacker, gCurrentMove) && GetBattlerAbility(gBattlerAttacker) != ABILITY_GUARD_DOG) @@ -6003,6 +6284,7 @@ static void Cmd_moveend(void) gBattleStruct->targetsDone[gBattlerAttacker] = 0; gProtectStructs[gBattlerAttacker].usesBouncedMove = FALSE; gProtectStructs[gBattlerAttacker].targetAffected = FALSE; + gProtectStructs[gBattlerAttacker].shellTrap = FALSE; gBattleStruct->ateBoost[gBattlerAttacker] = 0; gStatuses3[gBattlerAttacker] &= ~STATUS3_ME_FIRST; gSpecialStatuses[gBattlerAttacker].gemBoost = FALSE; @@ -6013,6 +6295,7 @@ static void Cmd_moveend(void) gBattleStruct->zmove.active = FALSE; gBattleStruct->zmove.toBeUsed[gBattlerAttacker] = MOVE_NONE; gBattleStruct->zmove.effect = EFFECT_HIT; + gBattleStruct->hitSwitchTargetFailed = FALSE; gBattleScripting.moveendState++; break; case MOVEEND_COUNT: @@ -6027,51 +6310,59 @@ static void Cmd_moveend(void) } while (gBattleScripting.moveendState != MOVEEND_COUNT && effect == FALSE); if (gBattleScripting.moveendState == MOVEEND_COUNT && effect == FALSE) - gBattlescriptCurrInstr += 3; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_sethealblock(void) { + CMD_ARGS(const u8 *failInstr); + if (gStatuses3[gBattlerTarget] & STATUS3_HEAL_BLOCK) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { gStatuses3[gBattlerTarget] |= STATUS3_HEAL_BLOCK; gDisableStructs[gBattlerTarget].healBlockTimer = 5; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_returnatktoball(void) { + CMD_ARGS(); + gActiveBattler = gBattlerAttacker; if (!(gHitMarker & HITMARKER_FAINTED(gActiveBattler))) { BtlController_EmitReturnMonToBall(BUFFER_A, FALSE); MarkBattlerForControllerExec(gActiveBattler); } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_getswitchedmondata(void) { + CMD_ARGS(u8 battler); + if (gBattleControllerExecFlags) return; - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); gBattlerPartyIndexes[gActiveBattler] = *(gBattleStruct->monToSwitchIntoId + gActiveBattler); BtlController_EmitGetMonData(BUFFER_A, REQUEST_ALL_BATTLE, gBitTable[gBattlerPartyIndexes[gActiveBattler]]); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_switchindataupdate(void) { + CMD_ARGS(u8 battler); + struct BattlePokemon oldData; s32 i; u8 *monData; @@ -6079,7 +6370,7 @@ static void Cmd_switchindataupdate(void) if (gBattleControllerExecFlags) return; - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); oldData = gBattleMons[gActiveBattler]; monData = (u8 *)(&gBattleMons[gActiveBattler]); @@ -6121,15 +6412,17 @@ static void Cmd_switchindataupdate(void) PREPARE_MON_NICK_BUFFER(gBattleTextBuff1, gActiveBattler, gBattlerPartyIndexes[gActiveBattler]); - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_switchinanim(void) { + CMD_ARGS(u8 battler, bool8 dontClearSubstitute); + if (gBattleControllerExecFlags) return; - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); if (GetBattlerSide(gActiveBattler) == B_SIDE_OPPONENT && !(gBattleTypeFlags & (BATTLE_TYPE_LINK @@ -6141,10 +6434,10 @@ static void Cmd_switchinanim(void) gAbsentBattlerFlags &= ~(gBitTable[gActiveBattler]); - BtlController_EmitSwitchInAnim(BUFFER_A, gBattlerPartyIndexes[gActiveBattler], gBattlescriptCurrInstr[2]); + BtlController_EmitSwitchInAnim(BUFFER_A, gBattlerPartyIndexes[gActiveBattler], cmd->dontClearSubstitute); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 3; + gBattlescriptCurrInstr = cmd->nextInstr; if (gBattleTypeFlags & BATTLE_TYPE_ARENA) BattleArena_InitPoints(); @@ -6301,19 +6594,20 @@ bool32 CanBattlerSwitch(u32 battlerId) static void Cmd_jumpifcantswitch(void) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1] & ~SWITCH_IGNORE_ESCAPE_PREVENTION); + CMD_ARGS(u8 battler:7, u8 ignoreEscapePrevention:1, const u8 *jumpInstr); - if (!(gBattlescriptCurrInstr[1] & SWITCH_IGNORE_ESCAPE_PREVENTION) - && !CanBattlerEscape(gActiveBattler)) + gActiveBattler = GetBattlerForBattleScript(cmd->battler); + + if (!cmd->ignoreEscapePrevention && !CanBattlerEscape(gActiveBattler)) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 2); + gBattlescriptCurrInstr = cmd->jumpInstr; } else { if (CanBattlerSwitch(gActiveBattler)) - gBattlescriptCurrInstr += 6; + gBattlescriptCurrInstr = cmd->nextInstr; else - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 2); + gBattlescriptCurrInstr = cmd->jumpInstr; } } @@ -6332,16 +6626,18 @@ static void ChooseMonToSendOut(u8 slotId) static void Cmd_openpartyscreen(void) { + CMD_ARGS(u8 battler:7, u8 partyScreenOptional:1, const u8 *failInstr); + u32 flags; u8 hitmarkerFaintBits; u8 battlerId; - const u8 *jumpPtr; + const u8 *failInstr; battlerId = 0; flags = 0; - jumpPtr = T1_READ_PTR(gBattlescriptCurrInstr + 2); + failInstr = cmd->failInstr; - if (gBattlescriptCurrInstr[1] == BS_FAINTED_LINK_MULTIPLE_1) + if (cmd->battler == BS_FAINTED_LINK_MULTIPLE_1) { if ((gBattleTypeFlags & BATTLE_TYPE_MULTI) || !(gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) { @@ -6494,9 +6790,9 @@ static void Cmd_openpartyscreen(void) } } } - gBattlescriptCurrInstr += 6; + gBattlescriptCurrInstr = cmd->nextInstr; } - else if (gBattlescriptCurrInstr[1] == BS_FAINTED_LINK_MULTIPLE_2) + else if (cmd->battler == BS_FAINTED_LINK_MULTIPLE_2) { if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) { @@ -6535,18 +6831,18 @@ static void Cmd_openpartyscreen(void) gSpecialStatuses[gActiveBattler].faintedHasReplacement = TRUE; } } - gBattlescriptCurrInstr += 6; + gBattlescriptCurrInstr = cmd->nextInstr; } else { // Not multi or double battle - gBattlescriptCurrInstr += 6; + gBattlescriptCurrInstr = cmd->nextInstr; } } else { // Multi battle - gBattlescriptCurrInstr += 6; + gBattlescriptCurrInstr = cmd->nextInstr; } hitmarkerFaintBits = gHitMarker >> 28; @@ -6557,26 +6853,26 @@ static void Cmd_openpartyscreen(void) gBattlerFainted++; if (gBattlerFainted == gBattlersCount) - gBattlescriptCurrInstr = jumpPtr; + gBattlescriptCurrInstr = failInstr; } else { - if (gBattlescriptCurrInstr[1] & PARTY_SCREEN_OPTIONAL) + if (cmd->partyScreenOptional) hitmarkerFaintBits = PARTY_ACTION_CHOOSE_MON; // Used here as the caseId for the EmitChoose function. else hitmarkerFaintBits = PARTY_ACTION_SEND_OUT; - battlerId = GetBattlerForBattleScript(gBattlescriptCurrInstr[1] & ~PARTY_SCREEN_OPTIONAL); + battlerId = GetBattlerForBattleScript(cmd->battler); if (gSpecialStatuses[battlerId].faintedHasReplacement) { - gBattlescriptCurrInstr += 6; + gBattlescriptCurrInstr = cmd->nextInstr; } else if (HasNoMonsToSwitch(battlerId, PARTY_SIZE, PARTY_SIZE)) { gActiveBattler = battlerId; gAbsentBattlerFlags |= gBitTable[gActiveBattler]; gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); - gBattlescriptCurrInstr = jumpPtr; + gBattlescriptCurrInstr = failInstr; } else { @@ -6588,7 +6884,7 @@ static void Cmd_openpartyscreen(void) BtlController_EmitChoosePokemon(BUFFER_A, hitmarkerFaintBits, *(gBattleStruct->monToSwitchIntoId + BATTLE_PARTNER(gActiveBattler)), ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 6; + gBattlescriptCurrInstr = cmd->nextInstr; if (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_LEFT && gBattleResults.playerSwitchesCounter < 255) gBattleResults.playerSwitchesCounter++; @@ -6619,13 +6915,15 @@ static void Cmd_openpartyscreen(void) static void Cmd_switchhandleorder(void) { + CMD_ARGS(u8 battler, u8 state); + s32 i; if (gBattleControllerExecFlags) return; - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); - switch (gBattlescriptCurrInstr[2]) + switch (cmd->state) { case 0: for (i = 0; i < gBattlersCount; i++) @@ -6680,7 +6978,7 @@ static void Cmd_switchhandleorder(void) break; } - gBattlescriptCurrInstr += 3; + gBattlescriptCurrInstr = cmd->nextInstr; } static void SetDmgHazardsBattlescript(u8 battlerId, u8 multistringId) @@ -6699,17 +6997,48 @@ static void SetDmgHazardsBattlescript(u8 battlerId, u8 multistringId) gBattlescriptCurrInstr = BattleScript_DmgHazardsOnFaintedBattler; } +bool32 DoSwitchInAbilitiesItems(u32 battlerId) +{ + return (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) + || AbilityBattleEffects(ABILITYEFFECT_TRACE2, 0, 0, 0, 0)); +} + +bool32 ShouldPostponeSwitchInAbilities(u32 battlerId) +{ + bool32 aliveOpposing1 = IsBattlerAlive(BATTLE_OPPOSITE(battlerId)); + bool32 aliveOpposing2 = IsBattlerAlive(BATTLE_PARTNER(BATTLE_OPPOSITE(battlerId))); + // No pokemon on opposing side - postpone. + if (!aliveOpposing1 && !aliveOpposing2) + return TRUE; + + // Checks for double battle, so abilities like Intimidate wait until all battlers are switched-in before activating. + if (IsDoubleBattle()) + { + if (aliveOpposing1 && !aliveOpposing2 && !HasNoMonsToSwitch(BATTLE_PARTNER(BATTLE_OPPOSITE(battlerId)), PARTY_SIZE, PARTY_SIZE)) + return TRUE; + if (!aliveOpposing1 && aliveOpposing2 && !HasNoMonsToSwitch(BATTLE_OPPOSITE(battlerId), PARTY_SIZE, PARTY_SIZE)) + return TRUE; + } + + return FALSE; +} + static void Cmd_switchineffects(void) { + CMD_ARGS(u8 battler); + s32 i; - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); UpdateSentPokesToOpponentValue(gActiveBattler); gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); gSpecialStatuses[gActiveBattler].faintedHasReplacement = FALSE; - if (!IsBattlerAIControlled(gActiveBattler)) + if (!BattlerHasAi(gActiveBattler)) gBattleStruct->appearedInBattle |= gBitTable[gBattlerPartyIndexes[gActiveBattler]]; // Neutralizing Gas announces itself before hazards @@ -6721,6 +7050,24 @@ static void Cmd_switchineffects(void) BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_SwitchInAbilityMsgRet; } + // Healing Wish activates before hazards. + // Starting from Gen8 - it heals only pokemon which can be healed. In gens 5,6,7 the effect activates anyways. + else if (((gBattleStruct->storedHealingWish & gBitTable[gActiveBattler]) || (gBattleStruct->storedLunarDance & gBitTable[gActiveBattler])) + && (gBattleMons[gActiveBattler].hp != gBattleMons[gActiveBattler].maxHP || gBattleMons[gActiveBattler].status1 != 0 || B_HEALING_WISH_SWITCH < GEN_8)) + { + if (gBattleStruct->storedHealingWish & gBitTable[gActiveBattler]) + { + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_HealingWishActivates; + gBattleStruct->storedHealingWish &= ~(gBitTable[gActiveBattler]); + } + else // Lunar Dance + { + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_LunarDanceActivates; + gBattleStruct->storedLunarDance &= ~(gBitTable[gActiveBattler]); + } + } else if (!(gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_SPIKES_DAMAGED) && (gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_SPIKES) && GetBattlerAbility(gActiveBattler) != ABILITY_MAGIC_GUARD @@ -6733,7 +7080,7 @@ static void Cmd_switchineffects(void) gBattleMoveDamage = 1; gSideStatuses[GetBattlerSide(gActiveBattler)] |= SIDE_STATUS_SPIKES_DAMAGED; - SetDmgHazardsBattlescript(gActiveBattler, 0); + SetDmgHazardsBattlescript(gActiveBattler, B_MSG_PKMNHURTBYSPIKES); } else if (!(gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_STEALTH_ROCK_DAMAGED) && (gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_STEALTH_ROCK) @@ -6744,7 +7091,7 @@ static void Cmd_switchineffects(void) gBattleMoveDamage = GetStealthHazardDamage(gBattleMoves[MOVE_STEALTH_ROCK].type, gActiveBattler); if (gBattleMoveDamage != 0) - SetDmgHazardsBattlescript(gActiveBattler, 1); + SetDmgHazardsBattlescript(gActiveBattler, B_MSG_STEALTHROCKDMG); } else if (!(gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_TOXIC_SPIKES_DAMAGED) && (gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_TOXIC_SPIKES) @@ -6813,12 +7160,17 @@ static void Cmd_switchineffects(void) gDisableStructs[gActiveBattler].truantSwitchInHack = 0; - if (AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gActiveBattler, 0, 0, 0) - || (gBattleWeather & B_WEATHER_ANY && WEATHER_HAS_EFFECT && AbilityBattleEffects(ABILITYEFFECT_ON_WEATHER, gActiveBattler, 0, 0, 0)) - || (gFieldStatuses & STATUS_FIELD_TERRAIN_ANY && AbilityBattleEffects(ABILITYEFFECT_ON_TERRAIN, gActiveBattler, 0, 0, 0)) - || ItemBattleEffects(ITEMEFFECT_ON_SWITCH_IN, gActiveBattler, FALSE) - || AbilityBattleEffects(ABILITYEFFECT_TRACE2, 0, 0, 0, 0)) - return; + // Don't activate switch-in abilities if the opposing field is empty. + // This could happen when a mon uses explosion and causes everyone to faint. + if (ShouldPostponeSwitchInAbilities(gActiveBattler) || gBattleStruct->switchInAbilityPostponed) + { + gBattleStruct->switchInAbilityPostponed |= gBitTable[gActiveBattler]; + } + else + { + if (DoSwitchInAbilitiesItems(gActiveBattler)) + return; + } gSideStatuses[GetBattlerSide(gActiveBattler)] &= ~(SIDE_STATUS_SPIKES_DAMAGED | SIDE_STATUS_TOXIC_SPIKES_DAMAGED | SIDE_STATUS_STEALTH_ROCK_DAMAGED | SIDE_STATUS_STICKY_WEB_DAMAGED); @@ -6830,7 +7182,7 @@ static void Cmd_switchineffects(void) gBattleStruct->hpOnSwitchout[GetBattlerSide(i)] = gBattleMons[i].hp; } - if (gBattlescriptCurrInstr[1] == BS_FAINTED_LINK_MULTIPLE_1) + if (cmd->battler == BS_FAINTED_LINK_MULTIPLE_1) { u32 hitmarkerFaintBits = gHitMarker >> 28; @@ -6844,70 +7196,85 @@ static void Cmd_switchineffects(void) gBattlerFainted++; } } - gBattlescriptCurrInstr += 2; + gBattleStruct->forcedSwitch &= ~(gBitTable[gActiveBattler]); + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_trainerslidein(void) { - gActiveBattler = GetBattlerAtPosition(gBattlescriptCurrInstr[1]); + CMD_ARGS(u8 battler); + + gActiveBattler = GetBattlerAtPosition(cmd->battler); BtlController_EmitTrainerSlide(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_playse(void) { + CMD_ARGS(u16 song); + gActiveBattler = gBattlerAttacker; - BtlController_EmitPlaySE(BUFFER_A, T2_READ_16(gBattlescriptCurrInstr + 1)); + BtlController_EmitPlaySE(BUFFER_A, cmd->song); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 3; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_fanfare(void) { + CMD_ARGS(u16 song); + gActiveBattler = gBattlerAttacker; - BtlController_EmitPlayFanfareOrBGM(BUFFER_A, T2_READ_16(gBattlescriptCurrInstr + 1), FALSE); + BtlController_EmitPlayFanfareOrBGM(BUFFER_A, cmd->song, FALSE); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 3; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_playfaintcry(void) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + CMD_ARGS(u8 battler); + + gActiveBattler = GetBattlerForBattleScript(cmd->battler); BtlController_EmitFaintingCry(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_endlinkbattle(void) { + CMD_ARGS(); + gActiveBattler = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); BtlController_EmitEndLinkBattle(BUFFER_A, gBattleOutcome); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 1; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_returntoball(void) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + CMD_ARGS(u8 battler); + + gActiveBattler = GetBattlerForBattleScript(cmd->battler); BtlController_EmitReturnMonToBall(BUFFER_A, TRUE); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_handlelearnnewmove(void) { - const u8 *learnedMovePtr = T1_READ_PTR(gBattlescriptCurrInstr + 1); - const u8 *nothingToLearnPtr = T1_READ_PTR(gBattlescriptCurrInstr + 5); + CMD_ARGS(const u8 *learnedMovePtr, const u8 *nothingToLearnPtr, bool8 isFirstMove); - u16 learnMove = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterMonId], gBattlescriptCurrInstr[9]); + const u8 *learnedMovePtr = cmd->learnedMovePtr; + const u8 *nothingToLearnPtr = cmd->nothingToLearnPtr; + + u16 learnMove = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterMonId], cmd->isFirstMove); while (learnMove == MON_ALREADY_KNOWS_MOVE) learnMove = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterMonId], FALSE); @@ -6917,7 +7284,7 @@ static void Cmd_handlelearnnewmove(void) } else if (learnMove == MON_HAS_MAX_MOVES) { - gBattlescriptCurrInstr += 10; + gBattlescriptCurrInstr = cmd->nextInstr; } else { @@ -6944,6 +7311,8 @@ static void Cmd_handlelearnnewmove(void) static void Cmd_yesnoboxlearnmove(void) { + CMD_ARGS(const u8 *forgotMovePtr); + gActiveBattler = 0; switch (gBattleScripting.learnMoveState) @@ -7022,7 +7391,7 @@ static void Cmd_yesnoboxlearnmove(void) } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->forgotMovePtr; PREPARE_MOVE_BUFFER(gBattleTextBuff2, moveId) @@ -7047,7 +7416,7 @@ static void Cmd_yesnoboxlearnmove(void) break; case 5: HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR); - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; break; case 6: if (gBattleControllerExecFlags == 0) @@ -7060,6 +7429,8 @@ static void Cmd_yesnoboxlearnmove(void) static void Cmd_yesnoboxstoplearningmove(void) { + CMD_ARGS(const u8 *noInstr); + switch (gBattleScripting.learnMoveState) { case 0: @@ -7089,16 +7460,16 @@ static void Cmd_yesnoboxstoplearningmove(void) PlaySE(SE_SELECT); if (gBattleCommunication[1] != 0) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->noInstr; else - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR); } else if (JOY_NEW(B_BUTTON)) { PlaySE(SE_SELECT); - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->noInstr; HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR); } break; @@ -7107,21 +7478,23 @@ static void Cmd_yesnoboxstoplearningmove(void) static void Cmd_hitanimation(void) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + CMD_ARGS(u8 battler); + + gActiveBattler = GetBattlerForBattleScript(cmd->battler); if (gMoveResultFlags & MOVE_RESULT_NO_EFFECT) { - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } else if (!(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE) || !(DoesSubstituteBlockMove(gBattlerAttacker, gActiveBattler, gCurrentMove)) || gDisableStructs[gActiveBattler].substituteHP == 0) { BtlController_EmitHitAnimation(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } } @@ -7163,6 +7536,12 @@ static u32 GetTrainerMoneyToGive(u16 trainerId) lastMonLevel = party[gTrainers[trainerId].partySize - 1].lvl; } break; + case F_TRAINER_PARTY_EVERYTHING_CUSTOMIZED: + { + const struct TrainerMonCustomized *party = gTrainers[trainerId].party.EverythingCustomized; + lastMonLevel = party[gTrainers[trainerId].partySize - 1].lvl; + } + break; } for (; gTrainerMoneyTable[i].classId != 0xFF; i++) @@ -7184,6 +7563,8 @@ static u32 GetTrainerMoneyToGive(u16 trainerId) static void Cmd_getmoneyreward(void) { + CMD_ARGS(); + u32 money; u8 sPartyLevel = 1; @@ -7199,8 +7580,8 @@ static void Cmd_getmoneyreward(void) s32 i, count; for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) { if (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL) > sPartyLevel) sPartyLevel = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL); @@ -7216,13 +7597,15 @@ static void Cmd_getmoneyreward(void) } PREPARE_WORD_NUMBER_BUFFER(gBattleTextBuff1, 5, money); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } // Command is never used static void Cmd_updatebattlermoves(void) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + CMD_ARGS(u8 battler); + + gActiveBattler = GetBattlerForBattleScript(cmd->battler); switch (gBattleCommunication[0]) { @@ -7241,7 +7624,7 @@ static void Cmd_updatebattlermoves(void) gBattleMons[gActiveBattler].moves[i] = bufferPoke->moves[i]; gBattleMons[gActiveBattler].pp[i] = bufferPoke->pp[i]; } - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } break; } @@ -7249,6 +7632,8 @@ static void Cmd_updatebattlermoves(void) static void Cmd_swapattackerwithtarget(void) { + CMD_ARGS(); + gActiveBattler = gBattlerAttacker; gBattlerAttacker = gBattlerTarget; gBattlerTarget = gActiveBattler; @@ -7258,19 +7643,23 @@ static void Cmd_swapattackerwithtarget(void) else gHitMarker |= HITMARKER_SWAP_ATTACKER_TARGET; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_incrementgamestat(void) { - if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) - IncrementGameStat(gBattlescriptCurrInstr[1]); + CMD_ARGS(u8 stat); - gBattlescriptCurrInstr += 2; + if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) + IncrementGameStat(cmd->stat); + + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_drawpartystatussummary(void) { + CMD_ARGS(u8 battler); + s32 i; struct Pokemon *party; struct HpAndStatus hpStatuses[PARTY_SIZE]; @@ -7278,7 +7667,7 @@ static void Cmd_drawpartystatussummary(void) if (gBattleControllerExecFlags) return; - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) party = gPlayerParty; @@ -7287,8 +7676,8 @@ static void Cmd_drawpartystatussummary(void) for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE - || GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG) + if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE + || GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) { hpStatuses[i].hp = 0xFFFF; hpStatuses[i].status = 0; @@ -7303,21 +7692,25 @@ static void Cmd_drawpartystatussummary(void) BtlController_EmitDrawPartyStatusSummary(BUFFER_A, hpStatuses, 1); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_hidepartystatussummary(void) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + CMD_ARGS(u8 battler); + + gActiveBattler = GetBattlerForBattleScript(cmd->battler); BtlController_EmitHidePartyStatusSummary(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_jumptocalledmove(void) { - if (gBattlescriptCurrInstr[1]) + CMD_ARGS(bool8 notChosenMove); + + if (cmd->notChosenMove) gCurrentMove = gCalledMove; else gChosenMove = gCurrentMove = gCalledMove; @@ -7327,9 +7720,11 @@ static void Cmd_jumptocalledmove(void) static void Cmd_statusanimation(void) { + CMD_ARGS(u8 battler); + if (gBattleControllerExecFlags == 0) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); if (!(gStatuses3[gActiveBattler] & STATUS3_SEMI_INVULNERABLE) && gDisableStructs[gActiveBattler].substituteHP == 0 && !(gHitMarker & HITMARKER_NO_ANIMATIONS)) @@ -7337,18 +7732,20 @@ static void Cmd_statusanimation(void) BtlController_EmitStatusAnimation(BUFFER_A, FALSE, gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); } - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_status2animation(void) { + CMD_ARGS(u8 battler, u32 status2); + u32 wantedToAnimate; if (gBattleControllerExecFlags == 0) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - wantedToAnimate = T1_READ_32(gBattlescriptCurrInstr + 2); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); + wantedToAnimate = cmd->status2; if (!(gStatuses3[gActiveBattler] & STATUS3_SEMI_INVULNERABLE) && gDisableStructs[gActiveBattler].substituteHP == 0 && !(gHitMarker & HITMARKER_NO_ANIMATIONS)) @@ -7356,31 +7753,35 @@ static void Cmd_status2animation(void) BtlController_EmitStatusAnimation(BUFFER_A, TRUE, gBattleMons[gActiveBattler].status2 & wantedToAnimate); MarkBattlerForControllerExec(gActiveBattler); } - gBattlescriptCurrInstr += 6; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_chosenstatusanimation(void) { + CMD_ARGS(u8 battler, bool8 isStatus2, u32 status); + u32 wantedStatus; if (gBattleControllerExecFlags == 0) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - wantedStatus = T1_READ_32(gBattlescriptCurrInstr + 3); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); + wantedStatus = cmd->status; if (!(gStatuses3[gActiveBattler] & STATUS3_SEMI_INVULNERABLE) && gDisableStructs[gActiveBattler].substituteHP == 0 && !(gHitMarker & HITMARKER_NO_ANIMATIONS)) { - BtlController_EmitStatusAnimation(BUFFER_A, gBattlescriptCurrInstr[2], wantedStatus); + BtlController_EmitStatusAnimation(BUFFER_A, cmd->isStatus2, wantedStatus); MarkBattlerForControllerExec(gActiveBattler); } - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_yesnobox(void) { + CMD_ARGS(); + switch (gBattleCommunication[0]) { case 0: @@ -7410,13 +7811,13 @@ static void Cmd_yesnobox(void) gBattleCommunication[CURSOR_POSITION] = 1; PlaySE(SE_SELECT); HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } else if (JOY_NEW(A_BUTTON)) { PlaySE(SE_SELECT); HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } break; } @@ -7424,25 +7825,29 @@ static void Cmd_yesnobox(void) static void Cmd_cancelallactions(void) { + CMD_ARGS(); + s32 i; for (i = 0; i < gBattlersCount; i++) gActionsByTurnOrder[i] = B_ACTION_CANCEL_PARTNER; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_setgravity(void) { + CMD_ARGS(const u8 *failInstr); + if (gFieldStatuses & STATUS_FIELD_GRAVITY) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { gFieldStatuses |= STATUS_FIELD_GRAVITY; gFieldTimers.gravityTimer = 5; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } @@ -7487,7 +7892,7 @@ static void BestowItem(u32 battlerAtk, u32 battlerDef) // Called by Cmd_removeitem. itemId represents the item that was removed, not being given. static bool32 TrySymbiosis(u32 battler, u32 itemId) { - if (!gBattleStruct->itemStolen[gBattlerPartyIndexes[battler]].stolen + if (!gBattleStruct->itemLost[gBattlerPartyIndexes[battler]].stolen && gBattleStruct->changedItems[battler] == ITEM_NONE && GetBattlerHoldEffect(battler, TRUE) != HOLD_EFFECT_EJECT_BUTTON && GetBattlerHoldEffect(battler, TRUE) != HOLD_EFFECT_EJECT_PACK @@ -7511,16 +7916,18 @@ static bool32 TrySymbiosis(u32 battler, u32 itemId) static void Cmd_removeitem(void) { + CMD_ARGS(u8 battler); + u16 itemId = 0; if (gBattleScripting.overrideBerryRequirements) { // bug bite / pluck - don't remove current item - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; return; } - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); itemId = gBattleMons[gActiveBattler].item; // Popped Air Balloon cannot be restored by any means. @@ -7535,18 +7942,22 @@ static void Cmd_removeitem(void) ClearBattlerItemEffectHistory(gActiveBattler); if (!TryCheekPouch(gActiveBattler, itemId) && !TrySymbiosis(gActiveBattler, itemId)) - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_atknameinbuff1(void) { + CMD_ARGS(); + PREPARE_MON_NICK_BUFFER(gBattleTextBuff1, gBattlerAttacker, gBattlerPartyIndexes[gBattlerAttacker]); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_drawlvlupbox(void) { + CMD_ARGS(); + if (gBattleScripting.drawlvlupboxState == 0) { // If the Pokémon getting exp is not in-battle then @@ -7640,7 +8051,7 @@ static void Cmd_drawlvlupbox(void) SetBgAttribute(1, BG_ATTR_PRIORITY, 1); ShowBg(0); ShowBg(1); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } break; } @@ -7828,33 +8239,41 @@ static bool32 IsMonGettingExpSentOut(void) static void Cmd_resetsentmonsvalue(void) { + CMD_ARGS(); + ResetSentPokesToOpponentValue(); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_setatktoplayer0(void) { + CMD_ARGS(); + gBattlerAttacker = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_makevisible(void) { + CMD_ARGS(u8 battler); + if (gBattleControllerExecFlags) return; - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); BtlController_EmitSpriteInvisibility(BUFFER_A, FALSE); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_recordability(void) { - u8 battler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + CMD_ARGS(u8 battler); + + u8 battler = GetBattlerForBattleScript(cmd->battler); RecordAbilityBattle(battler, gBattleMons[battler].ability); - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } void BufferMoveToLearnIntoBattleTextBuff2(void) @@ -7864,26 +8283,32 @@ void BufferMoveToLearnIntoBattleTextBuff2(void) static void Cmd_buffermovetolearn(void) { + CMD_ARGS(); + BufferMoveToLearnIntoBattleTextBuff2(); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_jumpifplayerran(void) { + CMD_ARGS(const u8 *jumpInstr); + if (TryRunFromBattle(gBattlerFainted)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_hpthresholds(void) { + CMD_ARGS(u8 battler); + u8 opposingBattler; s32 result; if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); opposingBattler = BATTLE_OPPOSITE(gActiveBattler); result = gBattleMons[opposingBattler].hp * 100 / gBattleMons[opposingBattler].maxHP; @@ -7900,18 +8325,20 @@ static void Cmd_hpthresholds(void) gBattleStruct->hpScale = 3; } - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_hpthresholds2(void) { + CMD_ARGS(u8 battler); + u8 opposingBattler; s32 result; u8 hpSwitchout; if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); opposingBattler = BATTLE_OPPOSITE(gActiveBattler); hpSwitchout = *(gBattleStruct->hpOnSwitchout + GetBattlerSide(opposingBattler)); result = (hpSwitchout - gBattleMons[opposingBattler].hp) * 100 / hpSwitchout; @@ -7926,14 +8353,16 @@ static void Cmd_hpthresholds2(void) gBattleStruct->hpScale = 3; } - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_useitemonopponent(void) { + CMD_ARGS(); + gBattlerInMenuId = gBattlerAttacker; PokemonUseItemEffects(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker]], gLastUsedItem, gBattlerPartyIndexes[gBattlerAttacker], 0, TRUE); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static bool32 HasAttackerFaintedTarget(void) @@ -8042,6 +8471,30 @@ bool32 CanUseLastResort(u8 battlerId) return (knownMovesCount >= 2 && usedMovesCount >= knownMovesCount - 1); } +static void RemoveAllTerrains(void) +{ + gFieldTimers.terrainTimer = 0; + switch (gFieldStatuses & STATUS_FIELD_TERRAIN_ANY) + { + case STATUS_FIELD_MISTY_TERRAIN: + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_TERRAINENDS_MISTY; + break; + case STATUS_FIELD_GRASSY_TERRAIN: + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_TERRAINENDS_GRASS; + break; + case STATUS_FIELD_ELECTRIC_TERRAIN: + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_TERRAINENDS_ELECTRIC; + break; + case STATUS_FIELD_PSYCHIC_TERRAIN: + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_TERRAINENDS_PSYCHIC; + break; + default: + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_TERRAINENDS_COUNT; // failsafe + break; + } + gFieldStatuses &= ~STATUS_FIELD_TERRAIN_ANY; // remove the terrain +} + #define DEFOG_CLEAR(status, structField, battlescript, move)\ { \ if (*sideStatuses & status) \ @@ -8059,7 +8512,7 @@ bool32 CanUseLastResort(u8 battlerId) } \ } -static bool32 ClearDefogHazards(u8 battlerAtk, bool32 clear) +static bool32 TryDefogClear(u8 battlerAtk, bool32 clear) { s32 i; for (i = 0; i < 2; i++) @@ -8067,7 +8520,7 @@ static bool32 ClearDefogHazards(u8 battlerAtk, bool32 clear) struct SideTimer *sideTimer = &gSideTimers[i]; u32 *sideStatuses = &gSideStatuses[i]; - gBattlerAttacker = i; + gBattlerAttacker = i; // For correct battle string. Ally's / Foe's if (GetBattlerSide(battlerAtk) != i) { DEFOG_CLEAR(SIDE_STATUS_REFLECT, reflectTimer, BattleScript_SideStatusWoreOffReturn, MOVE_REFLECT); @@ -8076,10 +8529,19 @@ static bool32 ClearDefogHazards(u8 battlerAtk, bool32 clear) DEFOG_CLEAR(SIDE_STATUS_AURORA_VEIL, auroraVeilTimer, BattleScript_SideStatusWoreOffReturn, MOVE_AURORA_VEIL); DEFOG_CLEAR(SIDE_STATUS_SAFEGUARD, safeguardTimer, BattleScript_SideStatusWoreOffReturn, MOVE_SAFEGUARD); } - DEFOG_CLEAR(SIDE_STATUS_SPIKES, spikesAmount, BattleScript_SpikesFree, 0); - DEFOG_CLEAR(SIDE_STATUS_STEALTH_ROCK, stealthRockAmount, BattleScript_StealthRockFree, 0); - DEFOG_CLEAR(SIDE_STATUS_TOXIC_SPIKES, toxicSpikesAmount, BattleScript_ToxicSpikesFree, 0); - DEFOG_CLEAR(SIDE_STATUS_STICKY_WEB, stickyWebAmount, BattleScript_StickyWebFree, 0); + DEFOG_CLEAR(SIDE_STATUS_SPIKES, spikesAmount, BattleScript_SpikesDefog, 0); + DEFOG_CLEAR(SIDE_STATUS_STEALTH_ROCK, stealthRockAmount, BattleScript_StealthRockDefog, 0); + DEFOG_CLEAR(SIDE_STATUS_TOXIC_SPIKES, toxicSpikesAmount, BattleScript_ToxicSpikesDefog, 0); + DEFOG_CLEAR(SIDE_STATUS_STICKY_WEB, stickyWebAmount, BattleScript_StickyWebDefog, 0); + #if B_DEFOG_CLEARS_TERRAIN >= GEN_8 + if (gFieldStatuses & STATUS_FIELD_TERRAIN_ANY) + { + RemoveAllTerrains(); + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_TerrainEnds_Ret; + return TRUE; + } + #endif // B_DEFOG_CLEARS_TERRAIN } return FALSE; @@ -8282,6 +8744,74 @@ static bool32 CourtChangeSwapSideStatuses(void) SWAP(sideTimerPlayer->stickyWebBattlerSide, sideTimerOpp->stickyWebBattlerSide, temp); } +static void HandleScriptMegaPrimal(u32 caseId, u32 battlerId, bool32 isMega) +{ + struct Pokemon *mon = GetBattlerPartyData(battlerId); + u32 position = GetBattlerPosition(battlerId); + u32 side = GET_BATTLER_SIDE(battlerId); + + // Change species. + if (caseId == 0) + { + u16 newSpecies; + if (isMega) + { + gBattleStruct->mega.evolvedSpecies[battlerId] = gBattleMons[battlerId].species; + if (position == B_POSITION_PLAYER_LEFT + || (position == B_POSITION_PLAYER_RIGHT && !(gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER)))) + { + gBattleStruct->mega.playerEvolvedSpecies = gBattleStruct->mega.evolvedSpecies[battlerId]; + } + //Checks regular Mega Evolution + newSpecies = GetMegaEvolutionSpecies(gBattleStruct->mega.evolvedSpecies[battlerId], gBattleMons[battlerId].item); + //Checks Wish Mega Evolution + if (newSpecies == SPECIES_NONE) + { + newSpecies = GetWishMegaEvolutionSpecies(gBattleStruct->mega.evolvedSpecies[battlerId], + gBattleMons[battlerId].moves[0], gBattleMons[battlerId].moves[1], gBattleMons[battlerId].moves[2], gBattleMons[battlerId].moves[3]); + } + } + else + { + gBattleStruct->mega.primalRevertedSpecies[battlerId] = gBattleMons[battlerId].species; + if (position == B_POSITION_PLAYER_LEFT + || (position == B_POSITION_PLAYER_RIGHT && !(gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER)))) + { + gBattleStruct->mega.playerPrimalRevertedSpecies = gBattleStruct->mega.primalRevertedSpecies[battlerId]; + } + // Checks Primal Reversion. + newSpecies = GetPrimalReversionSpecies(gBattleStruct->mega.primalRevertedSpecies[battlerId], gBattleMons[battlerId].item); + } + + gBattleMons[battlerId].species = newSpecies; + PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[battlerId].species); + + BtlController_EmitSetMonData(BUFFER_A, REQUEST_SPECIES_BATTLE, gBitTable[gBattlerPartyIndexes[battlerId]], sizeof(gBattleMons[battlerId].species), &gBattleMons[battlerId].species); + MarkBattlerForControllerExec(battlerId); + } + // Change stats. + else if (caseId == 1) + { + RecalcBattlerStats(battlerId, mon); + if (isMega) + { + gBattleStruct->mega.alreadyEvolved[position] = TRUE; + gBattleStruct->mega.evolvedPartyIds[side] |= gBitTable[gBattlerPartyIndexes[battlerId]]; + } + else + { + gBattleStruct->mega.primalRevertedPartyIds[side] |= gBitTable[gBattlerPartyIndexes[battlerId]]; + } + } + // Update healthbox and elevation and play cry. + else + { + UpdateHealthboxAttribute(gHealthboxSpriteIds[battlerId], mon, HEALTHBOX_ALL); + if (side == B_SIDE_OPPONENT) + SetBattlerShadowSpriteCallback(battlerId, gBattleMons[battlerId].species); + } +} + static bool32 CanTeleport(u8 battlerId) { u8 side = GetBattlerSide(battlerId); @@ -8290,7 +8820,7 @@ static bool32 CanTeleport(u8 battlerId) for (i = 0; i < PARTY_SIZE; i++) { - species = GetMonData(&party[i], MON_DATA_SPECIES2); + species = GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE && species != SPECIES_EGG && GetMonData(&party[i], MON_DATA_HP) != 0) count++; } @@ -8310,8 +8840,42 @@ static bool32 CanTeleport(u8 battlerId) return TRUE; } +// Return True if the order was changed, and false if the order was not changed(for example because the target would move after the attacker anyway). +static bool32 ChangeOrderTargetAfterAttacker(void) +{ + u32 i; + u8 data[MAX_BATTLERS_COUNT]; + + if (GetBattlerTurnOrderNum(gBattlerAttacker) > GetBattlerTurnOrderNum(gBattlerTarget) + || GetBattlerTurnOrderNum(gBattlerAttacker) + 1 == GetBattlerTurnOrderNum(gBattlerTarget)) + return FALSE; + + for (i = 0; i < gBattlersCount; i++) + data[i] = gBattlerByTurnOrder[i]; + if (GetBattlerTurnOrderNum(gBattlerAttacker) == 0 && GetBattlerTurnOrderNum(gBattlerTarget) == 2) + { + gBattlerByTurnOrder[1] = gBattlerTarget; + gBattlerByTurnOrder[2] = data[1]; + gBattlerByTurnOrder[3] = data[3]; + } + else if (GetBattlerTurnOrderNum(gBattlerAttacker) == 0 && GetBattlerTurnOrderNum(gBattlerTarget) == 3) + { + gBattlerByTurnOrder[1] = gBattlerTarget; + gBattlerByTurnOrder[2] = data[1]; + gBattlerByTurnOrder[3] = data[2]; + } + else // Attacker == 1, Target == 3 + { + gBattlerByTurnOrder[2] = gBattlerTarget; + gBattlerByTurnOrder[3] = data[2]; + } + return TRUE; +} + static void Cmd_various(void) { + CMD_ARGS(u8 battler, u8 id); + struct Pokemon *mon; s32 i, j; u8 data[10]; @@ -8320,88 +8884,125 @@ static void Cmd_various(void) if (gBattleControllerExecFlags) return; - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); - switch (gBattlescriptCurrInstr[2]) + switch (cmd->id) { // Roar will fail in a double wild battle when used by the player against one of the two alive wild mons. // Also when an opposing wild mon uses it againt its partner. case VARIOUS_JUMP_IF_ROAR_FAILS: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (WILD_DOUBLE_BATTLE && GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER && GetBattlerSide(gBattlerTarget) == B_SIDE_OPPONENT && IS_WHOLE_SIDE_ALIVE(gBattlerTarget)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; else if (WILD_DOUBLE_BATTLE && GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT && GetBattlerSide(gBattlerTarget) == B_SIDE_OPPONENT) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_JUMP_IF_ABSENT: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (!IsBattlerAlive(gActiveBattler)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_JUMP_IF_SHIELDS_DOWN_PROTECTED: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (IsShieldsDownProtected(gActiveBattler)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); - else - gBattlescriptCurrInstr += 7; - return; - case VARIOUS_JUMP_IF_NO_HOLD_EFFECT: - if (GetBattlerHoldEffect(gActiveBattler, TRUE) != gBattlescriptCurrInstr[3]) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 4); + gBattlerAbility = gActiveBattler; + gBattlescriptCurrInstr = cmd->jumpInstr; + } + else + { + gBattlescriptCurrInstr = cmd->nextInstr; + } + return; + } + case VARIOUS_JUMP_IF_NO_HOLD_EFFECT: + { + VARIOUS_ARGS(u8 holdEffect, const u8 *jumpInstr); + if (GetBattlerHoldEffect(gActiveBattler, TRUE) != cmd->holdEffect) + { + gBattlescriptCurrInstr = cmd->jumpInstr; } else { gLastUsedItem = gBattleMons[gActiveBattler].item; // For B_LAST_USED_ITEM - gBattlescriptCurrInstr += 8; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_JUMP_IF_NO_ALLY: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (!IsBattlerAlive(BATTLE_PARTNER(gActiveBattler))) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_INFATUATE_WITH_BATTLER: + { + VARIOUS_ARGS(u8 infatuateWith); gBattleScripting.battler = gActiveBattler; - gBattleMons[gActiveBattler].status2 |= STATUS2_INFATUATED_WITH(GetBattlerForBattleScript(gBattlescriptCurrInstr[3])); - gBattlescriptCurrInstr += 4; + gBattleMons[gActiveBattler].status2 |= STATUS2_INFATUATED_WITH(GetBattlerForBattleScript(cmd->infatuateWith)); + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_SET_LAST_USED_ITEM: + { + VARIOUS_ARGS(); gLastUsedItem = gBattleMons[gActiveBattler].item; break; + } case VARIOUS_TRY_FAIRY_LOCK: + { + VARIOUS_ARGS(const u8 *failInstr); if (gFieldStatuses & STATUS_FIELD_FAIRY_LOCK) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { gFieldStatuses |= STATUS_FIELD_FAIRY_LOCK; gFieldTimers.fairyLockTimer = 2; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_GET_STAT_VALUE: - i = gBattlescriptCurrInstr[3]; + { + VARIOUS_ARGS(u8 stat); + i = cmd->stat; gBattleMoveDamage = *(u16 *)(&gBattleMons[gActiveBattler].attack) + (i - 1); gBattleMoveDamage *= gStatStageRatios[gBattleMons[gActiveBattler].statStages[i]][0]; gBattleMoveDamage /= gStatStageRatios[gBattleMons[gActiveBattler].statStages[i]][1]; - gBattlescriptCurrInstr += 4; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_JUMP_IF_FULL_HP: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (BATTLER_MAX_HP(gActiveBattler)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_TRY_FRISK: + { + VARIOUS_ARGS(); while (gBattleStruct->friskedBattler < gBattlersCount) { gBattlerTarget = gBattleStruct->friskedBattler++; @@ -8428,54 +9029,78 @@ static void Cmd_various(void) gBattleStruct->friskedBattler = 0; gBattleStruct->friskedAbility = FALSE; break; + } case VARIOUS_POISON_TYPE_IMMUNITY: - if (!CanPoisonType(gActiveBattler, GetBattlerForBattleScript(gBattlescriptCurrInstr[3]))) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 4); + { + VARIOUS_ARGS(u8 target, const u8 *failInstr); + if (!CanPoisonType(gActiveBattler, GetBattlerForBattleScript(cmd->target))) + gBattlescriptCurrInstr = cmd->failInstr; else - gBattlescriptCurrInstr += 8; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_PARALYZE_TYPE_IMMUNITY: - if (!CanParalyzeType(gActiveBattler, GetBattlerForBattleScript(gBattlescriptCurrInstr[3]))) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 4); + { + VARIOUS_ARGS(u8 target, const u8 *failInstr); + if (!CanParalyzeType(gActiveBattler, GetBattlerForBattleScript(cmd->target))) + gBattlescriptCurrInstr = cmd->failInstr; else - gBattlescriptCurrInstr += 8; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_TRACE_ABILITY: + { + VARIOUS_ARGS(); gBattleMons[gActiveBattler].ability = gBattleStruct->overwrittenAbilities[gActiveBattler] = gBattleStruct->tracedAbility[gActiveBattler]; break; + } case VARIOUS_TRY_ILLUSION_OFF: + { + VARIOUS_ARGS(); if (GetIllusionMonPtr(gActiveBattler) != NULL) { - gBattlescriptCurrInstr += 3; + gBattlescriptCurrInstr = cmd->nextInstr; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_IllusionOff; return; } break; + } case VARIOUS_SET_SPRITEIGNORE0HP: - gBattleStruct->spriteIgnore0Hp = gBattlescriptCurrInstr[3]; - gBattlescriptCurrInstr += 4; + { + VARIOUS_ARGS(bool8 ignore0HP); + gBattleStruct->spriteIgnore0Hp = cmd->ignore0HP; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_UPDATE_NICK: + { + VARIOUS_ARGS(); if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) mon = &gPlayerParty[gBattlerPartyIndexes[gActiveBattler]]; else mon = &gEnemyParty[gBattlerPartyIndexes[gActiveBattler]]; UpdateHealthboxAttribute(gHealthboxSpriteIds[gActiveBattler], mon, HEALTHBOX_NICK); break; + } case VARIOUS_JUMP_IF_NOT_BERRY: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (ItemId_GetPocket(gBattleMons[gActiveBattler].item) == POCKET_BERRIES) - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; else - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; return; + } case VARIOUS_CHECK_IF_GRASSY_TERRAIN_HEALS: + { + VARIOUS_ARGS(const u8 *failInstr); if ((gStatuses3[gActiveBattler] & (STATUS3_SEMI_INVULNERABLE | STATUS3_HEAL_BLOCK)) || BATTLER_MAX_HP(gActiveBattler) || !gBattleMons[gActiveBattler].hp || !(IsBattlerGrounded(gActiveBattler))) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -8484,17 +9109,23 @@ static void Cmd_various(void) gBattleMoveDamage = 1; gBattleMoveDamage *= -1; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_GRAVITY_ON_AIRBORNE_MONS: + { + VARIOUS_ARGS(); // Cancel all multiturn moves of IN_AIR Pokemon except those being targeted by Sky Drop. if (gStatuses3[gActiveBattler] & STATUS3_ON_AIR && !(gStatuses3[gActiveBattler] & STATUS3_SKY_DROPPED)) CancelMultiTurnMoves(gActiveBattler); gStatuses3[gActiveBattler] &= ~(STATUS3_MAGNET_RISE | STATUS3_TELEKINESIS | STATUS3_ON_AIR | STATUS3_SKY_DROPPED); break; + } case VARIOUS_SPECTRAL_THIEF: + { + VARIOUS_ARGS(); // Raise stats for (i = STAT_ATK; i < NUM_BATTLE_STATS; i++) { @@ -8511,10 +9142,16 @@ static void Cmd_various(void) } } break; + } case VARIOUS_SET_POWDER: + { + VARIOUS_ARGS(); gBattleMons[gActiveBattler].status2 |= STATUS2_POWDER; break; + } case VARIOUS_ACUPRESSURE: + { + VARIOUS_ARGS(const u8 *failInstr); bits = 0; for (i = STAT_ATK; i < NUM_BATTLE_STATS; i++) { @@ -8530,17 +9167,23 @@ static void Cmd_various(void) } while (!(bits & gBitTable[statId])); SET_STATCHANGER(statId, 2, FALSE); - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } return; + } case VARIOUS_CANCEL_MULTI_TURN_MOVES: + { + VARIOUS_ARGS(); CancelMultiTurnMoves(gActiveBattler); break; + } case VARIOUS_SET_MAGIC_COAT_TARGET: + { + VARIOUS_ARGS(); gBattleStruct->attackerBeforeBounce = gActiveBattler; gBattlerAttacker = gBattlerTarget; side = BATTLE_OPPOSITE(GetBattlerSide(gBattlerAttacker)); @@ -8549,23 +9192,38 @@ static void Cmd_various(void) else gBattlerTarget = gActiveBattler; break; + } case VARIOUS_IS_RUNNING_IMPOSSIBLE: + { + VARIOUS_ARGS(); gBattleCommunication[0] = IsRunningFromBattleImpossible(); break; + } case VARIOUS_GET_MOVE_TARGET: + { + VARIOUS_ARGS(); gBattlerTarget = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE); break; + } case VARIOUS_GET_BATTLER_FAINTED: + { + VARIOUS_ARGS(); if (gHitMarker & HITMARKER_FAINTED(gActiveBattler)) gBattleCommunication[0] = TRUE; else gBattleCommunication[0] = FALSE; break; + } case VARIOUS_RESET_SWITCH_IN_ABILITY_BITS: + { + VARIOUS_ARGS(); gSpecialStatuses[gActiveBattler].traced = FALSE; gSpecialStatuses[gActiveBattler].switchInAbilityDone = FALSE; break; + } case VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP: + { + VARIOUS_ARGS(); if (gBattlerPartyIndexes[0] == gBattleStruct->expGetterMonId || gBattlerPartyIndexes[2] == gBattleStruct->expGetterMonId) { if (gBattlerPartyIndexes[0] == gBattleStruct->expGetterMonId) @@ -8582,7 +9240,10 @@ static void Cmd_various(void) gBattleStruct->choicedMove[gActiveBattler] = MOVE_NONE; } break; + } case VARIOUS_RESET_PLAYER_FAINTED: + { + VARIOUS_ARGS(); if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_DOUBLE)) && gBattleTypeFlags & BATTLE_TYPE_TRAINER && gBattleMons[0].hp != 0 @@ -8591,7 +9252,10 @@ static void Cmd_various(void) gHitMarker &= ~HITMARKER_PLAYER_FAINTED; } break; + } case VARIOUS_PALACE_FLAVOR_TEXT: + { + VARIOUS_ARGS(); // Try and print end-of-turn Battle Palace flavor text (e.g. "A glint appears in mon's eyes") gBattleCommunication[0] = FALSE; // whether or not msg should be printed gBattleScripting.battler = gActiveBattler = gBattleCommunication[1]; @@ -8605,7 +9269,11 @@ static void Cmd_various(void) gBattleCommunication[MULTISTRING_CHOOSER] = sBattlePalaceNatureToFlavorTextId[GetNatureFromPersonality(gBattleMons[gActiveBattler].personality)]; } break; + } case VARIOUS_ARENA_JUDGMENT_WINDOW: + { + VARIOUS_ARGS(); + i = BattleArena_ShowJudgmentWindow(&gBattleCommunication[0]); // BattleArena_ShowJudgmentWindow's last state was an intermediate step. @@ -8615,20 +9283,29 @@ static void Cmd_various(void) gBattleCommunication[1] = i; break; + } case VARIOUS_ARENA_OPPONENT_MON_LOST: + { + VARIOUS_ARGS(); gBattleMons[1].hp = 0; gHitMarker |= HITMARKER_FAINTED(1); gBattleStruct->arenaLostOpponentMons |= gBitTable[gBattlerPartyIndexes[1]]; gDisableStructs[1].truantSwitchInHack = 1; break; + } case VARIOUS_ARENA_PLAYER_MON_LOST: + { + VARIOUS_ARGS(); gBattleMons[0].hp = 0; gHitMarker |= HITMARKER_FAINTED(0); gHitMarker |= HITMARKER_PLAYER_FAINTED; gBattleStruct->arenaLostPlayerMons |= gBitTable[gBattlerPartyIndexes[0]]; gDisableStructs[0].truantSwitchInHack = 1; break; + } case VARIOUS_ARENA_BOTH_MONS_LOST: + { + VARIOUS_ARGS(); gBattleMons[0].hp = 0; gBattleMons[1].hp = 0; gHitMarker |= HITMARKER_FAINTED(0); @@ -8639,29 +9316,50 @@ static void Cmd_various(void) gDisableStructs[0].truantSwitchInHack = 1; gDisableStructs[1].truantSwitchInHack = 1; break; + } case VARIOUS_EMIT_YESNOBOX: + { + VARIOUS_ARGS(); BtlController_EmitYesNoBox(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); break; + } case VARIOUS_DRAW_ARENA_REF_TEXT_BOX: + { + VARIOUS_ARGS(); DrawArenaRefereeTextBox(); break; + } case VARIOUS_ERASE_ARENA_REF_TEXT_BOX: + { + VARIOUS_ARGS(); EraseArenaRefereeTextBox(); break; + } case VARIOUS_ARENA_JUDGMENT_STRING: - BattleStringExpandPlaceholdersToDisplayedString(gRefereeStringsTable[gBattlescriptCurrInstr[1]]); + { + CMD_ARGS(u8 id, u8 _); + BattleStringExpandPlaceholdersToDisplayedString(gRefereeStringsTable[cmd->id]); BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGMENT_TEXT); break; + } case VARIOUS_ARENA_WAIT_STRING: + { + VARIOUS_ARGS(); if (IsTextPrinterActive(ARENA_WIN_JUDGMENT_TEXT)) return; break; + } case VARIOUS_WAIT_CRY: + { + VARIOUS_ARGS(); if (!IsCryFinished()) return; break; + } case VARIOUS_RETURN_OPPONENT_MON1: + { + VARIOUS_ARGS(); gActiveBattler = 1; if (gBattleMons[gActiveBattler].hp != 0) { @@ -8669,7 +9367,10 @@ static void Cmd_various(void) MarkBattlerForControllerExec(gActiveBattler); } break; + } case VARIOUS_RETURN_OPPONENT_MON2: + { + VARIOUS_ARGS(); if (gBattlersCount > 3) { gActiveBattler = 3; @@ -8680,20 +9381,35 @@ static void Cmd_various(void) } } break; + } case VARIOUS_VOLUME_DOWN: + { + VARIOUS_ARGS(); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x55); break; + } case VARIOUS_VOLUME_UP: + { + VARIOUS_ARGS(); m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); break; + } case VARIOUS_SET_ALREADY_STATUS_MOVE_ATTEMPT: + { + VARIOUS_ARGS(); gBattleStruct->alreadyStatusedMoveAttempt |= gBitTable[gActiveBattler]; break; + } case VARIOUS_PALACE_TRY_ESCAPE_STATUS: + { + VARIOUS_ARGS(); if (BattlePalace_TryEscapeStatus(gActiveBattler)) return; break; + } case VARIOUS_SET_TELEPORT_OUTCOME: + { + VARIOUS_ARGS(); // Don't end the battle if one of the wild mons teleported from the wild double battle // and its partner is still alive. if (GetBattlerSide(gActiveBattler) == B_SIDE_OPPONENT && IsBattlerAlive(BATTLE_PARTNER(gActiveBattler))) @@ -8714,35 +9430,59 @@ static void Cmd_various(void) gBattleOutcome = B_OUTCOME_MON_TELEPORTED; } break; + } case VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC: + { + VARIOUS_ARGS(); BtlController_EmitPlayFanfareOrBGM(BUFFER_A, MUS_VICTORY_TRAINER, TRUE); MarkBattlerForControllerExec(gActiveBattler); break; + } case VARIOUS_STAT_TEXT_BUFFER: + { + VARIOUS_ARGS(); PREPARE_STAT_BUFFER(gBattleTextBuff1, gBattleCommunication[0]); break; + } case VARIOUS_SWITCHIN_ABILITIES: - gBattlescriptCurrInstr += 3; + { + VARIOUS_ARGS(); + gBattlescriptCurrInstr = cmd->nextInstr; AbilityBattleEffects(ABILITYEFFECT_NEUTRALIZINGGAS, gActiveBattler, 0, 0, 0); AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gActiveBattler, 0, 0, 0); AbilityBattleEffects(ABILITYEFFECT_TRACE2, gActiveBattler, 0, 0, 0); return; + } case VARIOUS_SAVE_TARGET: + { + VARIOUS_ARGS(); gBattleStruct->savedBattlerTarget = gBattlerTarget; break; + } case VARIOUS_RESTORE_TARGET: + { + VARIOUS_ARGS(); gBattlerTarget = gBattleStruct->savedBattlerTarget; break; + } case VARIOUS_INSTANT_HP_DROP: + { + VARIOUS_ARGS(); BtlController_EmitHealthBarUpdate(BUFFER_A, INSTANT_HP_BAR_DROP); MarkBattlerForControllerExec(gActiveBattler); break; + } case VARIOUS_CLEAR_STATUS: + { + VARIOUS_ARGS(); gBattleMons[gActiveBattler].status1 = 0; BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].status1), &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); break; + } case VARIOUS_RESTORE_PP: + { + VARIOUS_ARGS(); for (i = 0; i < 4; i++) { gBattleMons[gActiveBattler].pp[i] = CalculatePPWithBonus(gBattleMons[gActiveBattler].moves[i], gBattleMons[gActiveBattler].ppBonuses, i); @@ -8752,8 +9492,11 @@ static void Cmd_various(void) BtlController_EmitSetMonData(BUFFER_A, REQUEST_PP_DATA_BATTLE, 0, 5, data); MarkBattlerForControllerExec(gActiveBattler); break; + } case VARIOUS_TRY_ACTIVATE_MOXIE: // and chilling neigh + as one ice rider { + VARIOUS_ARGS(); + u16 battlerAbility = GetBattlerAbility(gActiveBattler); if ((battlerAbility == ABILITY_MOXIE @@ -8766,17 +9509,19 @@ static void Cmd_various(void) gBattleMons[gBattlerAttacker].statStages[STAT_ATK]++; SET_STATCHANGER(STAT_ATK, 1, FALSE); PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_ATK); - BattleScriptPush(gBattlescriptCurrInstr + 3); + BattleScriptPush(cmd->nextInstr); gLastUsedAbility = battlerAbility; if (battlerAbility == ABILITY_AS_ONE_ICE_RIDER) gBattleScripting.abilityPopupOverwrite = gLastUsedAbility = ABILITY_CHILLING_NEIGH; gBattlescriptCurrInstr = BattleScript_RaiseStatOnFaintingTarget; return; } - } break; + } case VARIOUS_TRY_ACTIVATE_GRIM_NEIGH: // and as one shadow rider { + VARIOUS_ARGS(); + u16 battlerAbility = GetBattlerAbility(gActiveBattler); if ((battlerAbility == ABILITY_GRIM_NEIGH @@ -8788,16 +9533,18 @@ static void Cmd_various(void) gBattleMons[gBattlerAttacker].statStages[STAT_SPATK]++; SET_STATCHANGER(STAT_SPATK, 1, FALSE); PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPATK); - BattleScriptPush(gBattlescriptCurrInstr + 3); + BattleScriptPush(cmd->nextInstr); gLastUsedAbility = battlerAbility; if (battlerAbility == ABILITY_AS_ONE_SHADOW_RIDER) gBattleScripting.abilityPopupOverwrite = gLastUsedAbility = ABILITY_GRIM_NEIGH; gBattlescriptCurrInstr = BattleScript_RaiseStatOnFaintingTarget; return; } - } break; + } case VARIOUS_TRY_ACTIVATE_RECEIVER: // Partner gets fainted's ally ability + { + VARIOUS_ARGS(); gBattlerAbility = BATTLE_PARTNER(gActiveBattler); i = GetBattlerAbility(gBattlerAbility); if (IsBattlerAlive(gBattlerAbility) @@ -8819,13 +9566,16 @@ static void Cmd_various(void) default: gBattleStruct->tracedAbility[gBattlerAbility] = gBattleMons[gActiveBattler].ability; // re-using the variable for trace gBattleScripting.battler = gActiveBattler; - BattleScriptPush(gBattlescriptCurrInstr + 3); + BattleScriptPush(cmd->nextInstr); gBattlescriptCurrInstr = BattleScript_ReceiverActivates; return; } } break; + } case VARIOUS_TRY_ACTIVATE_BEAST_BOOST: + { + VARIOUS_ARGS(); i = GetHighestStatId(gActiveBattler); if (GetBattlerAbility(gActiveBattler) == ABILITY_BEAST_BOOST && HasAttackerFaintedTarget() @@ -8835,12 +9585,15 @@ static void Cmd_various(void) gBattleMons[gBattlerAttacker].statStages[i]++; SET_STATCHANGER(i, 1, FALSE); PREPARE_STAT_BUFFER(gBattleTextBuff1, i); - BattleScriptPush(gBattlescriptCurrInstr + 3); + BattleScriptPush(cmd->nextInstr); gBattlescriptCurrInstr = BattleScript_AttackerAbilityStatRaise; return; } break; + } case VARIOUS_TRY_ACTIVATE_SOULHEART: + { + VARIOUS_ARGS(); while (gBattleStruct->soulheartBattlerId < gBattlersCount) { gBattleScripting.battler = gBattleStruct->soulheartBattlerId++; @@ -8859,7 +9612,10 @@ static void Cmd_various(void) } gBattleStruct->soulheartBattlerId = 0; break; + } case VARIOUS_TRY_ACTIVATE_FELL_STINGER: + { + VARIOUS_ARGS(); if (gBattleMoves[gCurrentMove].effect == EFFECT_FELL_STINGER && HasAttackerFaintedTarget() && !NoAliveMonsForEitherParty() @@ -8871,50 +9627,62 @@ static void Cmd_various(void) SET_STATCHANGER(STAT_ATK, 2, FALSE); #endif PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_ATK); - BattleScriptPush(gBattlescriptCurrInstr + 3); + BattleScriptPush(cmd->nextInstr); gBattlescriptCurrInstr = BattleScript_FellStingerRaisesStat; return; } break; + } case VARIOUS_PLAY_MOVE_ANIMATION: - BtlController_EmitMoveAnimation(BUFFER_A, T1_READ_16(gBattlescriptCurrInstr + 3), gBattleScripting.animTurn, 0, 0, gBattleMons[gActiveBattler].friendship, &gDisableStructs[gActiveBattler], gMultiHitCounter); + { + VARIOUS_ARGS(u16 move); + BtlController_EmitMoveAnimation(BUFFER_A, cmd->move, gBattleScripting.animTurn, 0, 0, gBattleMons[gActiveBattler].friendship, &gDisableStructs[gActiveBattler], gMultiHitCounter); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_SET_LUCKY_CHANT: + { + VARIOUS_ARGS(const u8 *failInstr); if (!(gSideStatuses[GET_BATTLER_SIDE(gActiveBattler)] & SIDE_STATUS_LUCKY_CHANT)) { gSideStatuses[GET_BATTLER_SIDE(gActiveBattler)] |= SIDE_STATUS_LUCKY_CHANT; gSideTimers[GET_BATTLER_SIDE(gActiveBattler)].luckyChantBattlerId = gActiveBattler; gSideTimers[GET_BATTLER_SIDE(gActiveBattler)].luckyChantTimer = 5; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } return; + } case VARIOUS_SUCKER_PUNCH_CHECK: + { + VARIOUS_ARGS(const u8 *failInstr); if (gProtectStructs[gBattlerTarget].obstructed) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; else if (GetBattlerTurnOrderNum(gBattlerAttacker) > GetBattlerTurnOrderNum(gBattlerTarget)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; else if (IS_MOVE_STATUS(gBattleMons[gBattlerTarget].moves[gBattleStruct->chosenMovePositions[gBattlerTarget]])) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_SET_SIMPLE_BEAM: + { + VARIOUS_ARGS(const u8 *failInstr); if (IsEntrainmentTargetOrSimpleBeamBannedAbility(gBattleMons[gBattlerTarget].ability) || gBattleMons[gBattlerTarget].ability == ABILITY_SIMPLE) { RecordAbilityBattle(gBattlerTarget, gBattleMons[gBattlerTarget].ability); - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else if (GetBattlerHoldEffect(gBattlerTarget, TRUE) == HOLD_EFFECT_ABILITY_SHIELD) { RecordItemEffectBattle(gBattlerTarget, HOLD_EFFECT_ABILITY_SHIELD); - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -8922,41 +9690,50 @@ static void Cmd_various(void) gSpecialStatuses[gBattlerTarget].neutralizingGasRemoved = TRUE; gBattleMons[gBattlerTarget].ability = gBattleStruct->overwrittenAbilities[gBattlerTarget] = ABILITY_SIMPLE; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_TRY_ENTRAINMENT: + { + VARIOUS_ARGS(const u8 *failInstr); if (IsEntrainmentBannedAbilityAttacker(gBattleMons[gBattlerAttacker].ability) || IsEntrainmentTargetOrSimpleBeamBannedAbility(gBattleMons[gBattlerTarget].ability)) { RecordAbilityBattle(gBattlerTarget, gBattleMons[gBattlerTarget].ability); - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else if (GetBattlerHoldEffect(gBattlerTarget, TRUE) == HOLD_EFFECT_ABILITY_SHIELD) { RecordItemEffectBattle(gBattlerTarget, HOLD_EFFECT_ABILITY_SHIELD); - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { if (gBattleMons[gBattlerTarget].ability == gBattleMons[gBattlerAttacker].ability) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { gBattleMons[gBattlerTarget].ability = gBattleStruct->overwrittenAbilities[gBattlerTarget] = gBattleMons[gBattlerAttacker].ability; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } } return; + } case VARIOUS_SET_LAST_USED_ABILITY: + { + VARIOUS_ARGS(); gLastUsedAbility = gBattleMons[gActiveBattler].ability; break; + } case VARIOUS_TRY_HEAL_PULSE: + { + VARIOUS_ARGS(const u8 *failInstr); if (BATTLER_MAX_HP(gActiveBattler)) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -8967,21 +9744,27 @@ static void Cmd_various(void) if (gBattleMoveDamage == 0) gBattleMoveDamage = -1; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_TRY_QUASH: + { + VARIOUS_ARGS(const u8 *failInstr); if (GetBattlerTurnOrderNum(gBattlerAttacker) > GetBattlerTurnOrderNum(gBattlerTarget)) // It's true if foe is faster, has a bigger priority, or switches { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // This replaces the current battlescript with the "fail" script. + gBattlescriptCurrInstr = cmd->failInstr; // This replaces the current battlescript with the "fail" script. } else // If the condition is not true, it means we are faster than the foe, so we can set the quash bit { gProtectStructs[gBattlerTarget].quash = TRUE; - gBattlescriptCurrInstr += 7; // and then we proceed with the rest of our battlescript + gBattlescriptCurrInstr = cmd->nextInstr; // and then we proceed with the rest of our battlescript } return; + } case VARIOUS_INVERT_STAT_STAGES: + { + VARIOUS_ARGS(); for (i = 0; i < NUM_BATTLE_STATS; i++) { if (gBattleMons[gActiveBattler].statStages[i] < DEFAULT_STAT_STAGE) // Negative becomes positive. @@ -8990,14 +9773,20 @@ static void Cmd_various(void) gBattleMons[gActiveBattler].statStages[i] = DEFAULT_STAT_STAGE - (gBattleMons[gActiveBattler].statStages[i] - DEFAULT_STAT_STAGE); } break; + } case VARIOUS_SET_TERRAIN: + { + VARIOUS_ARGS(const u8 *failInstr); HandleTerrainMove(gCurrentMove); return; + } case VARIOUS_TRY_ME_FIRST: + { + VARIOUS_ARGS(const u8 *failInstr); if (GetBattlerTurnOrderNum(gBattlerAttacker) > GetBattlerTurnOrderNum(gBattlerTarget)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; else if (IS_MOVE_STATUS(gBattleMons[gBattlerTarget].moves[gBattleStruct->chosenMovePositions[gBattlerTarget]])) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; else { u16 move = gBattleMons[gBattlerTarget].moves[gBattleStruct->chosenMovePositions[gBattlerTarget]]; @@ -9013,172 +9802,113 @@ static void Cmd_various(void) case MOVE_METAL_BURST: case MOVE_ME_FIRST: case MOVE_BEAK_BLAST: - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; break; default: gCalledMove = move; gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; gBattlerTarget = GetMoveTarget(gCalledMove, NO_TARGET_OVERRIDE); gStatuses3[gBattlerAttacker] |= STATUS3_ME_FIRST; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; break; } } return; + } case VARIOUS_JUMP_IF_BATTLE_END: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (NoAliveMonsForEitherParty()) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_TRY_ELECTRIFY: + { + VARIOUS_ARGS(const u8 *failInstr); if (GetBattlerTurnOrderNum(gBattlerAttacker) > GetBattlerTurnOrderNum(gBattlerTarget)) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { gStatuses4[gBattlerTarget] |= STATUS4_ELECTRIFIED; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_TRY_REFLECT_TYPE: + { + VARIOUS_ARGS(const u8 *failInstr); if (gBattleMons[gBattlerTarget].species == SPECIES_ARCEUS || gBattleMons[gBattlerTarget].species == SPECIES_SILVALLY) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else if (gBattleMons[gBattlerTarget].type1 == TYPE_MYSTERY && gBattleMons[gBattlerTarget].type2 != TYPE_MYSTERY) { gBattleMons[gBattlerAttacker].type1 = gBattleMons[gBattlerTarget].type2; gBattleMons[gBattlerAttacker].type2 = gBattleMons[gBattlerTarget].type2; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } else if (gBattleMons[gBattlerTarget].type1 != TYPE_MYSTERY && gBattleMons[gBattlerTarget].type2 == TYPE_MYSTERY) { gBattleMons[gBattlerAttacker].type1 = gBattleMons[gBattlerTarget].type1; gBattleMons[gBattlerAttacker].type2 = gBattleMons[gBattlerTarget].type1; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } else if (gBattleMons[gBattlerTarget].type1 == TYPE_MYSTERY && gBattleMons[gBattlerTarget].type2 == TYPE_MYSTERY) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { gBattleMons[gBattlerAttacker].type1 = gBattleMons[gBattlerTarget].type1; gBattleMons[gBattlerAttacker].type2 = gBattleMons[gBattlerTarget].type2; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_TRY_SOAK: + { + VARIOUS_ARGS(const u8 *failInstr); if (gBattleMons[gBattlerTarget].type1 == gBattleMoves[gCurrentMove].type && gBattleMons[gBattlerTarget].type2 == gBattleMoves[gCurrentMove].type) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { SET_BATTLER_TYPE(gBattlerTarget, gBattleMoves[gCurrentMove].type); PREPARE_TYPE_BUFFER(gBattleTextBuff1, gBattleMoves[gCurrentMove].type); - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_HANDLE_MEGA_EVO: - if (GetBattlerSide(gActiveBattler) == B_SIDE_OPPONENT) - mon = &gEnemyParty[gBattlerPartyIndexes[gActiveBattler]]; - else - mon = &gPlayerParty[gBattlerPartyIndexes[gActiveBattler]]; - - // Change species. - if (gBattlescriptCurrInstr[3] == 0) - { - u16 megaSpecies; - gBattleStruct->mega.evolvedSpecies[gActiveBattler] = gBattleMons[gActiveBattler].species; - if (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_LEFT - || (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_RIGHT && !(gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER)))) - { - gBattleStruct->mega.playerEvolvedSpecies = gBattleStruct->mega.evolvedSpecies[gActiveBattler]; - } - //Checks regular Mega Evolution - megaSpecies = GetMegaEvolutionSpecies(gBattleStruct->mega.evolvedSpecies[gActiveBattler], gBattleMons[gActiveBattler].item); - //Checks Wish Mega Evolution - if (megaSpecies == SPECIES_NONE) - { - megaSpecies = GetWishMegaEvolutionSpecies(gBattleStruct->mega.evolvedSpecies[gActiveBattler], gBattleMons[gActiveBattler].moves[0], gBattleMons[gActiveBattler].moves[1], gBattleMons[gActiveBattler].moves[2], gBattleMons[gActiveBattler].moves[3]); - } - - gBattleMons[gActiveBattler].species = megaSpecies; - PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[gActiveBattler].species); - - BtlController_EmitSetMonData(BUFFER_A, REQUEST_SPECIES_BATTLE, gBitTable[gBattlerPartyIndexes[gActiveBattler]], sizeof(gBattleMons[gActiveBattler].species), &gBattleMons[gActiveBattler].species); - MarkBattlerForControllerExec(gActiveBattler); - } - // Change stats. - else if (gBattlescriptCurrInstr[3] == 1) - { - RecalcBattlerStats(gActiveBattler, mon); - gBattleStruct->mega.alreadyEvolved[GetBattlerPosition(gActiveBattler)] = TRUE; - gBattleStruct->mega.evolvedPartyIds[GetBattlerSide(gActiveBattler)] |= gBitTable[gBattlerPartyIndexes[gActiveBattler]]; - } - // Update healthbox and elevation. - else - { - UpdateHealthboxAttribute(gHealthboxSpriteIds[gActiveBattler], mon, HEALTHBOX_ALL); - CreateMegaIndicatorSprite(gActiveBattler, 0); - if (GetBattlerSide(gActiveBattler) == B_SIDE_OPPONENT) - SetBattlerShadowSpriteCallback(gActiveBattler, gBattleMons[gActiveBattler].species); - } - gBattlescriptCurrInstr += 4; + { + VARIOUS_ARGS(u8 case_); + HandleScriptMegaPrimal(cmd->case_, gActiveBattler, TRUE); + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_HANDLE_PRIMAL_REVERSION: - if (GetBattlerSide(gActiveBattler) == B_SIDE_OPPONENT) - mon = &gEnemyParty[gBattlerPartyIndexes[gActiveBattler]]; - else - mon = &gPlayerParty[gBattlerPartyIndexes[gActiveBattler]]; - - // Change species. - if (gBattlescriptCurrInstr[3] == 0) - { - u16 primalSpecies; - gBattleStruct->mega.primalRevertedSpecies[gActiveBattler] = gBattleMons[gActiveBattler].species; - if (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_LEFT - || (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_RIGHT && !(gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER)))) - { - gBattleStruct->mega.playerPrimalRevertedSpecies = gBattleStruct->mega.primalRevertedSpecies[gActiveBattler]; - } - // Checks Primal Reversion - primalSpecies = GetPrimalReversionSpecies(gBattleStruct->mega.primalRevertedSpecies[gActiveBattler], gBattleMons[gActiveBattler].item); - - gBattleMons[gActiveBattler].species = primalSpecies; - PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[gActiveBattler].species); - - BtlController_EmitSetMonData(BUFFER_A, REQUEST_SPECIES_BATTLE, gBitTable[gBattlerPartyIndexes[gActiveBattler]], sizeof(gBattleMons[gActiveBattler].species), &gBattleMons[gActiveBattler].species); - MarkBattlerForControllerExec(gActiveBattler); - } - // Change stats. - else if (gBattlescriptCurrInstr[3] == 1) - { - RecalcBattlerStats(gActiveBattler, mon); - gBattleStruct->mega.primalRevertedPartyIds[GetBattlerSide(gActiveBattler)] |= gBitTable[gBattlerPartyIndexes[gActiveBattler]]; - } - // Update healthbox and elevation. - else - { - UpdateHealthboxAttribute(gHealthboxSpriteIds[gActiveBattler], mon, HEALTHBOX_ALL); - CreateMegaIndicatorSprite(gActiveBattler, 0); - if (GetBattlerSide(gActiveBattler) == B_SIDE_OPPONENT) - SetBattlerShadowSpriteCallback(gActiveBattler, gBattleMons[gActiveBattler].species); - } - gBattlescriptCurrInstr += 4; + { + VARIOUS_ARGS(u8 case_); + HandleScriptMegaPrimal(cmd->case_, gActiveBattler, FALSE); + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_HANDLE_FORM_CHANGE: + { + VARIOUS_ARGS(u8 case_); if (GetBattlerSide(gActiveBattler) == B_SIDE_OPPONENT) mon = &gEnemyParty[gBattlerPartyIndexes[gActiveBattler]]; else mon = &gPlayerParty[gBattlerPartyIndexes[gActiveBattler]]; // Change species. - if (gBattlescriptCurrInstr[3] == 0) + if (cmd->case_ == 0) { if (!gBattleTextBuff1) PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[gActiveBattler].species); @@ -9186,7 +9916,7 @@ static void Cmd_various(void) MarkBattlerForControllerExec(gActiveBattler); } // Change stats. - else if (gBattlescriptCurrInstr[3] == 1) + else if (cmd->case_ == 1) { RecalcBattlerStats(gActiveBattler, mon); } @@ -9195,15 +9925,21 @@ static void Cmd_various(void) { UpdateHealthboxAttribute(gHealthboxSpriteIds[gActiveBattler], mon, HEALTHBOX_ALL); } - gBattlescriptCurrInstr += 4; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_TRY_LAST_RESORT: + { + VARIOUS_ARGS(const u8 *failInstr); if (CanUseLastResort(gActiveBattler)) - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; else - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; return; + } case VARIOUS_ARGUMENT_STATUS_EFFECT: + { + VARIOUS_ARGS(); switch (gBattleMoves[gCurrentMove].argument) { case STATUS1_SLEEP: @@ -9230,12 +9966,15 @@ static void Cmd_various(void) } if (gBattleScripting.moveEffect != 0) { - BattleScriptPush(gBattlescriptCurrInstr + 3); + BattleScriptPush(cmd->nextInstr); gBattlescriptCurrInstr = BattleScript_EffectWithChance; return; } break; + } case VARIOUS_TRY_HIT_SWITCH_TARGET: + { + VARIOUS_ARGS(const u8 *failInstr); if (IsBattlerAlive(gBattlerAttacker) && IsBattlerAlive(gBattlerTarget) && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) @@ -9243,42 +9982,51 @@ static void Cmd_various(void) && GetBattlerAbility(gBattlerTarget) != ABILITY_GUARD_DOG) { gBattleScripting.switchCase = B_SWITCH_HIT; - gBattlescriptCurrInstr = BattleScript_ForceRandomSwitch; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } return; + } case VARIOUS_TRY_AUTOTOMIZE: + { + VARIOUS_ARGS(const u8 *failInstr); if (GetBattlerWeight(gActiveBattler) > 1) { gDisableStructs[gActiveBattler].autotomizeCount++; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } return; + } case VARIOUS_TRY_COPYCAT: + { + VARIOUS_ARGS(const u8 *failInstr); if (gLastUsedMove == 0xFFFF || (sForbiddenMoves[gLastUsedMove] & FORBIDDEN_COPYCAT)) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { gCalledMove = gLastUsedMove; gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; gBattlerTarget = GetMoveTarget(gCalledMove, NO_TARGET_OVERRIDE); - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_TRY_INSTRUCT: + { + VARIOUS_ARGS(const u8 *failInstr); if ((sForbiddenMoves[gLastMoves[gBattlerTarget]] & FORBIDDEN_INSTRUCT) || gLastMoves[gBattlerTarget] == 0xFFFF) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -9295,59 +10043,80 @@ static void Cmd_various(void) } } if (i != 4 || gBattleMons[gBattlerAttacker].pp[gCurrMovePos] == 0) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; else { gBattlerTarget = gBattleStruct->lastMoveTarget[gBattlerAttacker]; gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gActiveBattler, gBattlerPartyIndexes[gActiveBattler]); - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } } return; + } case VARIOUS_ABILITY_POPUP: + { + VARIOUS_ARGS(); CreateAbilityPopUp(gActiveBattler, gBattleMons[gActiveBattler].ability, (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) != 0); break; + } case VARIOUS_UPDATE_ABILITY_POPUP: + { + VARIOUS_ARGS(); UpdateAbilityPopup(gActiveBattler); break; + } case VARIOUS_DEFOG: - if (T1_READ_8(gBattlescriptCurrInstr + 3)) // Clear + { + VARIOUS_ARGS(bool8 clear, const u8 *failInstr); + if (cmd->clear) // Clear { - if (ClearDefogHazards(gEffectBattler, TRUE)) + if (TryDefogClear(gEffectBattler, TRUE)) return; else - gBattlescriptCurrInstr += 8; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - if (ClearDefogHazards(gActiveBattler, FALSE)) - gBattlescriptCurrInstr += 8; + if (TryDefogClear(gActiveBattler, FALSE)) + gBattlescriptCurrInstr = cmd->nextInstr; else - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 4); + gBattlescriptCurrInstr = cmd->failInstr; } return; + } case VARIOUS_JUMP_IF_TARGET_ALLY: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (GetBattlerSide(gBattlerAttacker) != GetBattlerSide(gBattlerTarget)) - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; else - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; return; + } case VARIOUS_TRY_SYNCHRONOISE: + { + VARIOUS_ARGS(const u8 *failInstr); if (!DoBattlersShareType(gBattlerAttacker, gBattlerTarget)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_LOSE_TYPE: + { + VARIOUS_ARGS(u8 type); for (i = 0; i < 3; i++) { - if (*(u8 *)(&gBattleMons[gActiveBattler].type1 + i) == gBattlescriptCurrInstr[3]) + if (*(u8 *)(&gBattleMons[gActiveBattler].type1 + i) == cmd->type) *(u8 *)(&gBattleMons[gActiveBattler].type1 + i) = TYPE_MYSTERY; } - gBattlescriptCurrInstr += 4; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_PSYCHO_SHIFT: + { + VARIOUS_ARGS(const u8 *failInstr); // Psycho shift works if ((gBattleMons[gBattlerAttacker].status1 & STATUS1_POISON) && CanBePoisoned(gBattlerAttacker, gBattlerTarget)) gBattleCommunication[MULTISTRING_CHOOSER] = 0; @@ -9361,118 +10130,137 @@ static void Cmd_various(void) gBattleCommunication[MULTISTRING_CHOOSER] = 4; else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; return; } gBattleMons[gBattlerTarget].status1 = gBattleMons[gBattlerAttacker].status1 & STATUS1_ANY; gActiveBattler = gBattlerTarget; BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].status1), &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 7; - return; + gBattlescriptCurrInstr = cmd->nextInstr; + return; + } case VARIOUS_CURE_STATUS: + { + VARIOUS_ARGS(); gBattleMons[gActiveBattler].status1 = 0; BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].status1), &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); break; + } case VARIOUS_POWER_TRICK: + { + VARIOUS_ARGS(); gStatuses3[gActiveBattler] ^= STATUS3_POWER_TRICK; SWAP(gBattleMons[gActiveBattler].attack, gBattleMons[gActiveBattler].defense, i); break; + } case VARIOUS_AFTER_YOU: - if (GetBattlerTurnOrderNum(gBattlerAttacker) > GetBattlerTurnOrderNum(gBattlerTarget) - || GetBattlerTurnOrderNum(gBattlerAttacker) == GetBattlerTurnOrderNum(gBattlerTarget) + 1) + { + VARIOUS_ARGS(const u8 *failInstr); + if (ChangeOrderTargetAfterAttacker()) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gSpecialStatuses[gBattlerTarget].afterYou = 1; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - for (i = 0; i < gBattlersCount; i++) - data[i] = gBattlerByTurnOrder[i]; - if (GetBattlerTurnOrderNum(gBattlerAttacker) == 0 && GetBattlerTurnOrderNum(gBattlerTarget) == 2) - { - gBattlerByTurnOrder[1] = gBattlerTarget; - gBattlerByTurnOrder[2] = data[1]; - gBattlerByTurnOrder[3] = data[3]; - } - else if (GetBattlerTurnOrderNum(gBattlerAttacker) == 0 && GetBattlerTurnOrderNum(gBattlerTarget) == 3) - { - gBattlerByTurnOrder[1] = gBattlerTarget; - gBattlerByTurnOrder[2] = data[1]; - gBattlerByTurnOrder[3] = data[2]; - } - else - { - gBattlerByTurnOrder[2] = gBattlerTarget; - gBattlerByTurnOrder[3] = data[2]; - } - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->failInstr; } return; + } case VARIOUS_BESTOW: + { + VARIOUS_ARGS(const u8 *failInstr); if (gBattleMons[gBattlerAttacker].item == ITEM_NONE || gBattleMons[gBattlerTarget].item != ITEM_NONE || !CanBattlerGetOrLoseItem(gBattlerAttacker, gBattleMons[gBattlerAttacker].item) || !CanBattlerGetOrLoseItem(gBattlerTarget, gBattleMons[gBattlerAttacker].item)) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { BestowItem(gBattlerAttacker, gBattlerTarget); - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_ARGUMENT_TO_MOVE_EFFECT: + { + VARIOUS_ARGS(); gBattleScripting.moveEffect = gBattleMoves[gCurrentMove].argument; break; + } case VARIOUS_JUMP_IF_NOT_GROUNDED: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (!IsBattlerGrounded(gActiveBattler)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_HANDLE_TRAINER_SLIDE_MSG: - if (gBattlescriptCurrInstr[3] == 0) + { + VARIOUS_ARGS(u8 case_); + if (cmd->case_ == 0) { - gBattleScripting.savedDmg = gBattlerSpriteIds[gActiveBattler]; + // Save sprite IDs, because trainer slide in will overwrite gBattlerSpriteIds variable. + gBattleScripting.savedDmg = (gBattlerSpriteIds[gActiveBattler] & 0xFF) | (gBattlerSpriteIds[BATTLE_PARTNER(gActiveBattler)] << 8); HideBattlerShadowSprite(gActiveBattler); } - else if (gBattlescriptCurrInstr[3] == 1) + else if (cmd->case_ == 1) { BtlController_EmitPrintString(BUFFER_A, STRINGID_TRAINERSLIDE); MarkBattlerForControllerExec(gActiveBattler); } else { - gBattlerSpriteIds[gActiveBattler] = gBattleScripting.savedDmg; - if (gBattleMons[gActiveBattler].hp != 0) + gBattlerSpriteIds[BATTLE_PARTNER(gActiveBattler)] = gBattleScripting.savedDmg >> 8; + gBattlerSpriteIds[gActiveBattler] = gBattleScripting.savedDmg & 0xFF; + if (IsBattlerAlive(gActiveBattler)) { SetBattlerShadowSpriteCallback(gActiveBattler, gBattleMons[gActiveBattler].species); BattleLoadOpponentMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler); } + i = BATTLE_PARTNER(gActiveBattler); + if (IsBattlerAlive(i)) + { + SetBattlerShadowSpriteCallback(i, gBattleMons[i].species); + BattleLoadOpponentMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[i]], i); + } } - gBattlescriptCurrInstr += 4; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_TRY_TRAINER_SLIDE_MSG_FIRST_OFF: - if (ShouldDoTrainerSlide(gActiveBattler, gTrainerBattleOpponent_A, TRAINER_SLIDE_FIRST_DOWN)) + { + VARIOUS_ARGS(); + if ((i = ShouldDoTrainerSlide(gActiveBattler, TRAINER_SLIDE_FIRST_DOWN))) { gBattleScripting.battler = gActiveBattler; - BattleScriptPush(gBattlescriptCurrInstr + 3); - gBattlescriptCurrInstr = BattleScript_TrainerSlideMsgRet; + BattleScriptPush(cmd->nextInstr); + gBattlescriptCurrInstr = (i == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet); return; } break; + } case VARIOUS_TRY_TRAINER_SLIDE_MSG_LAST_ON: - if (ShouldDoTrainerSlide(gActiveBattler, gTrainerBattleOpponent_A, TRAINER_SLIDE_LAST_SWITCHIN)) + { + VARIOUS_ARGS(); + if ((i = ShouldDoTrainerSlide(gActiveBattler, TRAINER_SLIDE_LAST_SWITCHIN))) { gBattleScripting.battler = gActiveBattler; - BattleScriptPush(gBattlescriptCurrInstr + 3); - gBattlescriptCurrInstr = BattleScript_TrainerSlideMsgRet; + BattleScriptPush(cmd->nextInstr); + gBattlescriptCurrInstr = (i == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet); return; } break; + } case VARIOUS_SET_AURORA_VEIL: + { + VARIOUS_ARGS(); if (gSideStatuses[GET_BATTLER_SIDE(gActiveBattler)] & SIDE_STATUS_AURORA_VEIL || !(WEATHER_HAS_EFFECT && gBattleWeather & B_WEATHER_HAIL)) { @@ -9494,26 +10282,35 @@ static void Cmd_various(void) gBattleCommunication[MULTISTRING_CHOOSER] = 5; } break; + } case VARIOUS_TRY_THIRD_TYPE: + { + VARIOUS_ARGS(const u8 *failInstr); if (IS_BATTLER_OF_TYPE(gActiveBattler, gBattleMoves[gCurrentMove].argument)) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { gBattleMons[gActiveBattler].type3 = gBattleMoves[gCurrentMove].argument; PREPARE_TYPE_BUFFER(gBattleTextBuff1, gBattleMoves[gCurrentMove].argument); - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_DESTROY_ABILITY_POPUP: + { + VARIOUS_ARGS(); DestroyAbilityPopUp(gActiveBattler); break; + } case VARIOUS_TOTEM_BOOST: + { + VARIOUS_ARGS(const u8 *jumpInstr); gActiveBattler = gBattlerAttacker; if (gTotemBoosts[gActiveBattler].stats == 0) { - gBattlescriptCurrInstr += 7; // stats done, exit + gBattlescriptCurrInstr = cmd->nextInstr; // stats done, exit } else { @@ -9536,22 +10333,31 @@ static void Cmd_various(void) } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // do boost + gBattlescriptCurrInstr = cmd->jumpInstr; // do boost } return; } } - gBattlescriptCurrInstr += 7; // exit if loop failed (failsafe) + gBattlescriptCurrInstr = cmd->nextInstr; // exit if loop failed (failsafe) } return; + } case VARIOUS_SET_Z_EFFECT: + { + VARIOUS_ARGS(); SetZEffect(); //handles battle script jumping internally return; + } case VARIOUS_MOVEEND_ITEM_EFFECTS: + { + VARIOUS_ARGS(); if (ItemBattleEffects(ITEMEFFECT_NORMAL, gActiveBattler, FALSE)) return; break; + } case VARIOUS_ROOM_SERVICE: + { + VARIOUS_ARGS(const u8 *failInstr); if (GetBattlerHoldEffect(gActiveBattler, TRUE) == HOLD_EFFECT_ROOM_SERVICE && TryRoomService(gActiveBattler)) { BattleScriptPushCursor(); @@ -9559,10 +10365,13 @@ static void Cmd_various(void) } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } return; + } case VARIOUS_TERRAIN_SEED: + { + VARIOUS_ARGS(const u8 *failInstr); if (GetBattlerHoldEffect(gActiveBattler, TRUE) == HOLD_EFFECT_SEEDS) { u8 effect = 0; @@ -9586,25 +10395,32 @@ static void Cmd_various(void) if (effect) return; } - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; return; + } case VARIOUS_MAKE_INVISIBLE: + { + VARIOUS_ARGS(); if (gBattleControllerExecFlags) break; BtlController_EmitSpriteInvisibility(BUFFER_A, TRUE); MarkBattlerForControllerExec(gActiveBattler); break; + } case VARIOUS_JUMP_IF_TERRAIN_AFFECTED: { - u32 flags = T1_READ_32(gBattlescriptCurrInstr + 3); + VARIOUS_ARGS(u32 flags, const u8 *jumpInstr); + u32 flags = cmd->flags; if (IsBattlerTerrainAffected(gActiveBattler, flags)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 7); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 11; + gBattlescriptCurrInstr = cmd->nextInstr; + return; } - return; case VARIOUS_EERIE_SPELL_PP_REDUCE: + { + VARIOUS_ARGS(const u8 *failInstr); if (gLastMoves[gActiveBattler] != 0 && gLastMoves[gActiveBattler] != 0xFFFF) { s32 i; @@ -9636,77 +10452,73 @@ static void Cmd_various(void) if (gBattleMons[gActiveBattler].pp[i] == 0 && gBattleStruct->skyDropTargets[gActiveBattler] == 0xFF) CancelMultiTurnMoves(gActiveBattler); - gBattlescriptCurrInstr += 7; // continue + gBattlescriptCurrInstr = cmd->nextInstr; // continue } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // cant reduce pp + gBattlescriptCurrInstr = cmd->failInstr; // cant reduce pp } } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // cant reduce pp + gBattlescriptCurrInstr = cmd->failInstr; // cant reduce pp } return; + } case VARIOUS_JUMP_IF_TEAM_HEALTHY: + { + VARIOUS_ARGS(const u8 *jumpInstr); if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && IsBattlerAlive(BATTLE_PARTNER(gActiveBattler))) { u8 partner = BATTLE_PARTNER(gActiveBattler); if ((gBattleMons[gActiveBattler].hp == gBattleMons[gActiveBattler].maxHP && !(gBattleMons[gActiveBattler].status1 & STATUS1_ANY)) && (gBattleMons[partner].hp == gBattleMons[partner].maxHP && !(gBattleMons[partner].status1 & STATUS1_ANY))) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // fail + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } else // single battle { if (gBattleMons[gActiveBattler].hp == gBattleMons[gActiveBattler].maxHP && !(gBattleMons[gActiveBattler].status1 & STATUS1_ANY)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // fail + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_TRY_HEAL_QUARTER_HP: + { + VARIOUS_ARGS(const u8 *failInstr); gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / 4; if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; gBattleMoveDamage *= -1; if (gBattleMons[gActiveBattler].hp == gBattleMons[gActiveBattler].maxHP) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // fail + gBattlescriptCurrInstr = cmd->failInstr; // fail else - gBattlescriptCurrInstr += 7; // can heal + gBattlescriptCurrInstr = cmd->nextInstr; // can heal return; + } case VARIOUS_REMOVE_TERRAIN: - gFieldTimers.terrainTimer = 0; - switch (gFieldStatuses & STATUS_FIELD_TERRAIN_ANY) - { - case STATUS_FIELD_MISTY_TERRAIN: - gBattleCommunication[MULTISTRING_CHOOSER] = 0; - break; - case STATUS_FIELD_GRASSY_TERRAIN: - gBattleCommunication[MULTISTRING_CHOOSER] = 1; - break; - case STATUS_FIELD_ELECTRIC_TERRAIN: - gBattleCommunication[MULTISTRING_CHOOSER] = 2; - break; - case STATUS_FIELD_PSYCHIC_TERRAIN: - gBattleCommunication[MULTISTRING_CHOOSER] = 3; - break; - default: - gBattleCommunication[MULTISTRING_CHOOSER] = 4; // failsafe - break; - } - gFieldStatuses &= ~STATUS_FIELD_TERRAIN_ANY; // remove the terrain + { + VARIOUS_ARGS(); + RemoveAllTerrains(); break; + } case VARIOUS_JUMP_IF_UNDER_200: + { + VARIOUS_ARGS(const u8 *jumpInstr); // If the Pokemon is less than 200 kg, or weighing less than 441 lbs, then Sky Drop will work. Otherwise, it will fail. if (GetBattlerWeight(gBattlerTarget) < 2000) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_SET_SKY_DROP: + { + VARIOUS_ARGS(); gStatuses3[gBattlerTarget] |= (STATUS3_SKY_DROPPED | STATUS3_ON_AIR); /* skyDropTargets holds the information of who is in a particular instance of Sky Drop. This is needed in the case that multiple Pokemon use Sky Drop in the same turn or if @@ -9726,24 +10538,30 @@ static void Cmd_various(void) gSideTimers[GetBattlerSide(gBattlerTarget)].followmeTimer = 0; break; + } case VARIOUS_CLEAR_SKY_DROP: + { + VARIOUS_ARGS(const u8 *failInstr); // Check to see if the initial target of this Sky Drop fainted before the 2nd turn of Sky Drop. // If so, make the move fail. If not, clear all of the statuses and continue the move. if (gBattleStruct->skyDropTargets[gBattlerAttacker] == 0xFF) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; else { gBattleStruct->skyDropTargets[gBattlerAttacker] = 0xFF; gBattleStruct->skyDropTargets[gBattlerTarget] = 0xFF; gStatuses3[gBattlerTarget] &= ~(STATUS3_SKY_DROPPED | STATUS3_ON_AIR); - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } // Confuse target if they were in the middle of Petal Dance/Outrage/Thrash when targeted. if (gBattleMons[gBattlerTarget].status2 & STATUS2_LOCK_CONFUSE) gBattleScripting.moveEffect = (MOVE_EFFECT_CONFUSION | MOVE_EFFECT_CERTAIN); return; + } case VARIOUS_SKY_DROP_YAWN: // If the mon that's sleeping due to Yawn was holding a Pokemon in Sky Drop, release the target and clear Sky Drop data. + { + VARIOUS_ARGS(); if (gBattleStruct->skyDropTargets[gEffectBattler] != 0xFF && !(gStatuses3[gEffectBattler] & STATUS3_SKY_DROPPED)) { // Set the target of Sky Drop as gEffectBattler @@ -9764,12 +10582,16 @@ static void Cmd_various(void) } } break; + } case VARIOUS_JUMP_IF_PRANKSTER_BLOCKED: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (BlocksPrankster(gCurrentMove, gBattlerAttacker, gActiveBattler, TRUE)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER: { bool8 shouldNotClear = FALSE; @@ -9804,15 +10626,20 @@ static void Cmd_various(void) break; } case VARIOUS_TRY_END_NEUTRALIZING_GAS: + { + VARIOUS_ARGS(); if (gSpecialStatuses[gActiveBattler].neutralizingGasRemoved) { gSpecialStatuses[gActiveBattler].neutralizingGasRemoved = FALSE; - BattleScriptPush(gBattlescriptCurrInstr + 3); + BattleScriptPush(cmd->nextInstr); gBattlescriptCurrInstr = BattleScript_NeutralizingGasExits; return; } break; + } case VARIOUS_GET_ROTOTILLER_TARGETS: + { + VARIOUS_ARGS(const u8 *failInstr); // Gets the battlers to be affected by rototiller. If there are none, print 'But it failed!' { u32 count = 0; @@ -9827,27 +10654,35 @@ static void Cmd_various(void) } if (count == 0) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // Rototiller fails + gBattlescriptCurrInstr = cmd->failInstr; // Rototiller fails else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_JUMP_IF_NOT_ROTOTILLER_AFFECTED: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (gSpecialStatuses[gActiveBattler].rototillerAffected) { gSpecialStatuses[gActiveBattler].rototillerAffected = FALSE; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // Unaffected by rototiller - print STRINGID_NOEFFECTONTARGET + gBattlescriptCurrInstr = cmd->jumpInstr; // Unaffected by rototiller - print STRINGID_NOEFFECTONTARGET } return; + } case VARIOUS_TRY_ACTIVATE_BATTLE_BOND: + { + VARIOUS_ARGS(); if (gBattleMons[gBattlerAttacker].species == SPECIES_GRENINJA_BATTLE_BOND && HasAttackerFaintedTarget() - && CalculateEnemyPartyCount() > 1) + && CalculateEnemyPartyCount() > 1 + && !(gBattleStruct->battleBondTransformed[GET_BATTLER_SIDE2(gBattlerAttacker)] & gBitTable[gBattlerPartyIndexes[gBattlerAttacker]])) { + gBattleStruct->battleBondTransformed[GET_BATTLER_SIDE2(gBattlerAttacker)] |= gBitTable[gBattlerPartyIndexes[gBattlerAttacker]]; PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[gBattlerAttacker].species); gBattleStruct->changedSpecies[gBattlerPartyIndexes[gBattlerAttacker]] = gBattleMons[gBattlerAttacker].species; gBattleMons[gBattlerAttacker].species = SPECIES_GRENINJA_ASH; @@ -9856,23 +10691,28 @@ static void Cmd_various(void) return; } break; + } case VARIOUS_CONSUME_BERRY: + { + VARIOUS_ARGS(bool8 fromBattler); if (gBattleScripting.overrideBerryRequirements == 2) { - gBattlescriptCurrInstr += 4; + gBattlescriptCurrInstr = cmd->nextInstr; return; } - if (gBattlescriptCurrInstr[3]) + if (cmd->fromBattler) gLastUsedItem = gBattleMons[gActiveBattler].item; gBattleScripting.battler = gEffectBattler = gBattlerTarget = gActiveBattler; // Cover all berry effect battlerId cases. e.g. ChangeStatBuffs uses target ID if (ItemBattleEffects(ITEMEFFECT_USE_LAST_ITEM, gActiveBattler, FALSE)) return; - gBattlescriptCurrInstr += 4; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL: { + VARIOUS_ARGS(const u8 *jumpInstr); bool8 canDoPrimalReversion = FALSE; for (i = 0; i < EVOS_PER_MON; i++) @@ -9882,35 +10722,47 @@ static void Cmd_various(void) canDoPrimalReversion = TRUE; } if (!canDoPrimalReversion) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; } case VARIOUS_JUMP_IF_WEATHER_AFFECTED: { - u32 weatherFlags = T1_READ_32(gBattlescriptCurrInstr + 3); - if (IsBattlerWeatherAffected(gActiveBattler, weatherFlags)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 7); + VARIOUS_ARGS(u32 flags, const u8 *jumpInstr); + u32 flags = cmd->flags; + if (IsBattlerWeatherAffected(gActiveBattler, flags)) + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 11; + gBattlescriptCurrInstr = cmd->nextInstr; + return; } - return; case VARIOUS_APPLY_PLASMA_FISTS: + { + VARIOUS_ARGS(); for (i = 0; i < gBattlersCount; i++) gStatuses4[i] |= STATUS4_PLASMA_FISTS; break; + } case VARIOUS_JUMP_IF_SPECIES: - if (gBattleMons[gActiveBattler].species == T1_READ_16(gBattlescriptCurrInstr + 3)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 5); + { + VARIOUS_ARGS(u16 species, const u8 *jumpInstr); + if (gBattleMons[gActiveBattler].species == cmd->species) + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 9; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_PHOTON_GEYSER_CHECK: + { + VARIOUS_ARGS(); gBattleStruct->swapDamageCategory = (GetSplitBasedOnStats(gActiveBattler) == SPLIT_SPECIAL); break; + } case VARIOUS_SHELL_SIDE_ARM_CHECK: // 0% chance GameFreak actually checks this way according to DaWobblefet, but this is the only functional explanation at the moment { + VARIOUS_ARGS(); + u32 attackerAtkStat = gBattleMons[gBattlerAttacker].attack; u32 targetDefStat = gBattleMons[gBattlerTarget].defense; u32 attackerSpAtkStat = gBattleMons[gBattlerAttacker].spAttack; @@ -9946,17 +10798,22 @@ static void Cmd_various(void) break; } case VARIOUS_JUMP_IF_LEAF_GUARD_PROTECTED: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (IsLeafGuardProtected(gActiveBattler)) { gBattlerAbility = gActiveBattler; - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; } else { - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_SET_ATTACKER_STICKY_WEB_USER: + { + VARIOUS_ARGS(); // For Mirror Armor: "If the Pokémon with this Ability is affected by Sticky Web, the effect is reflected back to the Pokémon which set it up. // If Pokémon which set up Sticky Web is not on the field, no Pokémon have their Speed lowered." gBattlerAttacker = gBattlerTarget; // Initialize 'fail' condition @@ -9964,8 +10821,11 @@ static void Cmd_various(void) if (gBattleStruct->stickyWebUser != 0xFF) gBattlerAttacker = gBattleStruct->stickyWebUser; break; + } case VARIOUS_CUT_1_3_HP_RAISE_STATS: { + VARIOUS_ARGS(const u8 *failInstr); + bool8 atLeastOneStatBoosted = FALSE; u16 hpFraction = max(1, gBattleMons[gBattlerAttacker].maxHP / 3); @@ -9980,79 +10840,99 @@ static void Cmd_various(void) if (atLeastOneStatBoosted && gBattleMons[gBattlerAttacker].hp > hpFraction) { gBattleMoveDamage = hpFraction; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } + return; } - return; case VARIOUS_SET_OCTOLOCK: + { + VARIOUS_ARGS(const u8 *failInstr); if (gDisableStructs[gActiveBattler].octolock) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { gDisableStructs[gActiveBattler].octolock = TRUE; gBattleMons[gActiveBattler].status2 |= STATUS2_ESCAPE_PREVENTION; gDisableStructs[gActiveBattler].battlerPreventingEscape = gBattlerAttacker; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_CHECK_POLTERGEIST: + { + VARIOUS_ARGS(const u8 *failInstr); if (gBattleMons[gActiveBattler].item == ITEM_NONE || gFieldStatuses & STATUS_FIELD_MAGIC_ROOM || GetBattlerAbility(gActiveBattler) == ABILITY_KLUTZ) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { PREPARE_ITEM_BUFFER(gBattleTextBuff1, gBattleMons[gActiveBattler].item); gLastUsedItem = gBattleMons[gActiveBattler].item; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_TRY_NO_RETREAT: + { + VARIOUS_ARGS(const u8 *failInstr); if (gDisableStructs[gActiveBattler].noRetreat) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { if (!(gBattleMons[gActiveBattler].status2 & STATUS2_ESCAPE_PREVENTION)) gDisableStructs[gActiveBattler].noRetreat = TRUE; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_TRY_TAR_SHOT: + { + VARIOUS_ARGS(const u8 *failInstr); if (gDisableStructs[gActiveBattler].tarShot) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } else { gDisableStructs[gActiveBattler].tarShot = TRUE; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } return; + } case VARIOUS_CAN_TAR_SHOT_WORK: + { + VARIOUS_ARGS(const u8 *failInstr); // Tar Shot will fail if it's already been used on the target and its speed can't be lowered further if (!gDisableStructs[gActiveBattler].tarShot && CompareStat(gActiveBattler, STAT_SPEED, MAX_STAT_STAGE, CMP_LESS_THAN)) - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; else - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; return; + } case VARIOUS_JUMP_IF_CANT_FLING: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (!CanFling(gActiveBattler)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_CURE_CERTAIN_STATUSES: + { + VARIOUS_ARGS(); // Check infatuation if (gBattleMons[gActiveBattler].status2 & STATUS2_INFATUATION) { @@ -10093,43 +10973,70 @@ static void Cmd_various(void) gDisableStructs[gActiveBattler].disabledMove = 0; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_MENTALHERBCURE_DISABLE; } - gBattlescriptCurrInstr += 3; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_TRY_RESET_NEGATIVE_STAT_STAGES: + { + VARIOUS_ARGS(); gActiveBattler = gBattlerTarget; for (i = 0; i < NUM_BATTLE_STATS; i++) if (gBattleMons[gActiveBattler].statStages[i] < DEFAULT_STAT_STAGE) gBattleMons[gActiveBattler].statStages[i] = DEFAULT_STAT_STAGE; - gBattlescriptCurrInstr += 3; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (ItemId_GetPocket(gLastUsedItem) == POCKET_BERRIES) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_JUMP_IF_LAST_USED_ITEM_HOLD_EFFECT: - if (ItemId_GetHoldEffect(gLastUsedItem) == gBattlescriptCurrInstr[3]) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 4); + { + VARIOUS_ARGS(u8 holdEffect, const u8 *jumpInstr); + if (ItemId_GetHoldEffect(gLastUsedItem) == cmd->holdEffect) + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 8; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_SAVE_BATTLER_ITEM: + { + VARIOUS_ARGS(); gBattleResources->battleHistory->heldItems[gActiveBattler] = gBattleMons[gActiveBattler].item; break; + } case VARIOUS_RESTORE_BATTLER_ITEM: + { + VARIOUS_ARGS(); gBattleMons[gActiveBattler].item = gBattleResources->battleHistory->heldItems[gActiveBattler]; break; + } case VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM: + { + VARIOUS_ARGS(); gBattleMons[gActiveBattler].item = gLastUsedItem; break; + } case VARIOUS_SET_BEAK_BLAST: + { + VARIOUS_ARGS(); gProtectStructs[gActiveBattler].beakBlastCharge = TRUE; break; + } case VARIOUS_SWAP_SIDE_STATUSES: + { + VARIOUS_ARGS(); CourtChangeSwapSideStatuses(); break; + } case VARIOUS_TRY_SYMBIOSIS: //called by Bestow, Fling, and Bug Bite, which don't work with Cmd_removeitem. + { + VARIOUS_ARGS(); if (SYMBIOSIS_CHECK(gActiveBattler, BATTLE_PARTNER(gActiveBattler))) { BestowItem(BATTLE_PARTNER(gActiveBattler), gActiveBattler); @@ -10141,33 +11048,42 @@ static void Cmd_various(void) return; } break; + } case VARIOUS_CAN_TELEPORT: + { + VARIOUS_ARGS(); gBattleCommunication[0] = CanTeleport(gActiveBattler); break; + } case VARIOUS_GET_BATTLER_SIDE: + { + VARIOUS_ARGS(); if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) gBattleCommunication[0] = B_SIDE_PLAYER; else gBattleCommunication[0] = B_SIDE_OPPONENT; break; + } case VARIOUS_CHECK_PARENTAL_BOND_COUNTER: { + VARIOUS_ARGS(u8 counter, const u8 *jumpInstr); // Some effects should only happen on the first or second strike of Parental Bond, // so a way to check this in battle scripts is useful - u8 counter = T1_READ_8(gBattlescriptCurrInstr + 3); + u8 counter = cmd->counter; if (gSpecialStatuses[gBattlerAttacker].parentalBondState == counter && gBattleMons[gBattlerTarget].hp != 0) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 4); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 8; + gBattlescriptCurrInstr = cmd->nextInstr; return; } - break; case VARIOUS_SWAP_STATS: { - u8 statId = T1_READ_8(gBattlescriptCurrInstr + 3); + VARIOUS_ARGS(u8 stat); + + u8 stat = cmd->stat; u16 temp; - switch (statId) + switch (stat) { case STAT_HP: SWAP(gBattleMons[gBattlerAttacker].hp, gBattleMons[gBattlerTarget].hp, temp); @@ -10188,13 +11104,13 @@ static void Cmd_various(void) SWAP(gBattleMons[gBattlerAttacker].spDefense, gBattleMons[gBattlerTarget].spDefense, temp); break; } - PREPARE_STAT_BUFFER(gBattleTextBuff1, statId); - gBattlescriptCurrInstr += 4; + PREPARE_STAT_BUFFER(gBattleTextBuff1, stat); + gBattlescriptCurrInstr = cmd->nextInstr; return; } - break; case VARIOUS_TEATIME_TARGETS: { + VARIOUS_ARGS(const u8 *jumpInstr); u32 count = 0; for (i = 0; i < gBattlersCount; i++) @@ -10203,37 +11119,50 @@ static void Cmd_various(void) count++; } if (count == 0) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // Teatime fails + gBattlescriptCurrInstr = cmd->jumpInstr; // Teatime fails else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; + return; } - return; - case VARIOUS_TEATIME_INVUL: + case VARIOUS_TEATIME_INVUL: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (ItemId_GetPocket(gBattleMons[gActiveBattler].item) == POCKET_BERRIES && !(gStatuses3[gBattlerTarget] & (STATUS3_SEMI_INVULNERABLE))) - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; else - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; return; - case VARIOUS_JUMP_IF_ROD: + } + case VARIOUS_JUMP_IF_ROD: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (IsAbilityRodAffected()) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; - case VARIOUS_JUMP_IF_MOTOR: + } + case VARIOUS_JUMP_IF_MOTOR: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (IsAbilityMotorAffected()) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; - case VARIOUS_JUMP_IF_ABSORB: + } + case VARIOUS_JUMP_IF_ABSORB: + { + VARIOUS_ARGS(const u8 *jumpInstr); if (IsAbilityAbsorbAffected()) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; return; + } case VARIOUS_TRY_WIND_RIDER_POWER: { + VARIOUS_ARGS(const u8 *failInstr); u16 ability = GetBattlerAbility(gActiveBattler); if (GetBattlerSide(gActiveBattler) == GetBattlerSide(gBattlerAttacker) && (ability == ABILITY_WIND_RIDER || ability == ABILITY_WIND_POWER)) @@ -10241,50 +11170,115 @@ static void Cmd_various(void) gLastUsedAbility = ability; RecordAbilityBattle(gActiveBattler, gLastUsedAbility); gBattlerAbility = gBattleScripting.battler = gActiveBattler; - gBattlescriptCurrInstr += 7; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + gBattlescriptCurrInstr = cmd->failInstr; } + return; } - return; case VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES: - gBattlescriptCurrInstr += 3; + { + VARIOUS_ARGS(); + gBattlescriptCurrInstr = cmd->nextInstr; AbilityBattleEffects(ABILITYEFFECT_ON_WEATHER, gActiveBattler, 0, 0, 0); return; + } + case VARIOUS_JUMP_IF_SHELL_TRAP: + { + VARIOUS_ARGS(const u8 *jumpInstr); + if (gProtectStructs[gActiveBattler].shellTrap) + gBattlescriptCurrInstr = cmd->jumpInstr; + else + gBattlescriptCurrInstr = cmd->nextInstr; + return; + } case VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES: - gBattlescriptCurrInstr += 3; + { + VARIOUS_ARGS(); + gBattlescriptCurrInstr = cmd->nextInstr; AbilityBattleEffects(ABILITYEFFECT_ON_TERRAIN, gActiveBattler, 0, 0, 0); return; - case VARIOUS_JUMP_IF_NO_VALID_TARGETS: - { - u32 count = 0; + } + case VARIOUS_JUMP_IF_EMERGENCY_EXITED: + { + VARIOUS_ARGS(const u8 *jumpInstr); + if (gSpecialStatuses[gActiveBattler].emergencyExited) + gBattlescriptCurrInstr = cmd->jumpInstr; + else + gBattlescriptCurrInstr = cmd->nextInstr; + return; + } + case VARIOUS_STORE_HEALING_WISH: + { + VARIOUS_ARGS(); + if (gCurrentMove == MOVE_LUNAR_DANCE) + gBattleStruct->storedLunarDance |= gBitTable[gActiveBattler]; + else + gBattleStruct->storedHealingWish |= gBitTable[gActiveBattler]; + break; + } + case VARIOUS_HIT_SWITCH_TARGET_FAILED: + { + VARIOUS_ARGS(); + gBattleStruct->hitSwitchTargetFailed = TRUE; + gBattlescriptCurrInstr = cmd->nextInstr; + return; + } + case VARIOUS_TRY_REVIVAL_BLESSING: + { + VARIOUS_ARGS(const u8 *failInstr); + u32 side = GetBattlerSide(gBattlerAttacker); + u8 index = GetFirstFaintedPartyIndex(gBattlerAttacker); - for (i = 0; i < gBattlersCount; i++) + // Move fails if there are no battlers to revive. + if (index == PARTY_SIZE) + { + gBattlescriptCurrInstr = cmd->failInstr; + return; + } + + // Battler selected! Revive and go to next instruction. + if (gSelectedMonPartyId != PARTY_SIZE) + { + struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + + u16 hp = GetMonData(&party[gSelectedMonPartyId], MON_DATA_MAX_HP) / 2; + BtlController_EmitSetMonData(BUFFER_A, REQUEST_HP_BATTLE, gBitTable[gSelectedMonPartyId], sizeof(hp), &hp); + MarkBattlerForControllerExec(gBattlerAttacker); + PREPARE_SPECIES_BUFFER(gBattleTextBuff1, GetMonData(&party[gSelectedMonPartyId], MON_DATA_SPECIES)); + + // If an on-field battler is revived, it needs to be sent out again. + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && + gBattlerPartyIndexes[BATTLE_PARTNER(gBattlerAttacker)] == gSelectedMonPartyId) { - if (GetBattlerSide(i) != GetBattlerSide(gBattlerAttacker) && IsBattlerAlive(i)) - count++; + gBattleScripting.battler = BATTLE_PARTNER(gBattlerAttacker); + gBattleCommunication[MULTIUSE_STATE] = TRUE; } - if (count == 0) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); - else - gBattlescriptCurrInstr += 7; + + gSelectedMonPartyId = PARTY_SIZE; + gBattlescriptCurrInstr = cmd->nextInstr; + return; + } + + // Open party menu, wait to go to next instruction. + else + { + BtlController_EmitChoosePokemon(BUFFER_A, PARTY_ACTION_CHOOSE_FAINTED_MON, PARTY_SIZE, ABILITY_NONE, gBattleStruct->battlerPartyOrders[gBattlerAttacker]); + MarkBattlerForControllerExec(gBattlerAttacker); } return; - case VARIOUS_JUMP_IF_EMERGENCY_EXITED: - if (gSpecialStatuses[gActiveBattler].emergencyExited) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); - else - gBattlescriptCurrInstr += 7; - return; - } // End of switch (gBattlescriptCurrInstr[2]) + } + } // End of switch (cmd->id) - gBattlescriptCurrInstr += 3; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_setprotectlike(void) { + CMD_ARGS(); + bool32 fail = TRUE; bool32 notLastTurn = TRUE; @@ -10377,19 +11371,22 @@ static void Cmd_setprotectlike(void) gMoveResultFlags |= MOVE_RESULT_MISSED; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_tryexplosion(void) { + CMD_ARGS(); + + u32 dampBattler; if (gBattleControllerExecFlags) return; - if ((gBattlerTarget = IsAbilityOnField(ABILITY_DAMP))) + if ((dampBattler = IsAbilityOnField(ABILITY_DAMP))) { // Failed, a battler has Damp gLastUsedAbility = ABILITY_DAMP; - RecordAbilityBattle(--gBattlerTarget, ABILITY_DAMP); + gBattlerTarget = --dampBattler; gBattlescriptCurrInstr = BattleScript_DampStopsExplosion; return; } @@ -10398,19 +11395,13 @@ static void Cmd_tryexplosion(void) gBattleMoveDamage = gBattleMons[gActiveBattler].hp; BtlController_EmitHealthBarUpdate(BUFFER_A, INSTANT_HP_BAR_DROP); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr++; - - for (gBattlerTarget = 0; gBattlerTarget < gBattlersCount; gBattlerTarget++) - { - if (gBattlerTarget == gBattlerAttacker) - continue; - if (IsBattlerAlive(gBattlerTarget)) - break; - } + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_setatkhptozero(void) { + CMD_ARGS(); + if (gBattleControllerExecFlags) return; @@ -10419,12 +11410,14 @@ static void Cmd_setatkhptozero(void) BtlController_EmitSetMonData(BUFFER_A, REQUEST_HP_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].hp), &gBattleMons[gActiveBattler].hp); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_jumpifnexttargetvalid(void) { - const u8 *jumpPtr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + CMD_ARGS(const u8 *jumpInstr); + + const u8 *jumpInstr = cmd->jumpInstr; for (gBattlerTarget++; gBattlerTarget < gBattlersCount; gBattlerTarget++) { @@ -10435,16 +11428,18 @@ static void Cmd_jumpifnexttargetvalid(void) } if (gBattlerTarget >= gBattlersCount) - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; else - gBattlescriptCurrInstr = jumpPtr; + gBattlescriptCurrInstr = jumpInstr; } static void Cmd_tryhealhalfhealth(void) { - const u8 *failPtr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + CMD_ARGS(const u8 *failInstr, u8 battler); - if (gBattlescriptCurrInstr[5] == BS_ATTACKER) + const u8 *failInstr = cmd->failInstr; + + if (cmd->battler == BS_ATTACKER) gBattlerTarget = gBattlerAttacker; gBattleMoveDamage = gBattleMons[gBattlerTarget].maxHP / 2; @@ -10453,13 +11448,15 @@ static void Cmd_tryhealhalfhealth(void) gBattleMoveDamage *= -1; if (gBattleMons[gBattlerTarget].hp == gBattleMons[gBattlerTarget].maxHP) - gBattlescriptCurrInstr = failPtr; + gBattlescriptCurrInstr = failInstr; else - gBattlescriptCurrInstr += 6; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_trymirrormove(void) { + CMD_ARGS(); + s32 validMovesCount; s32 i; u16 move; @@ -10499,12 +11496,14 @@ static void Cmd_trymirrormove(void) else // no valid moves found { gSpecialStatuses[gBattlerAttacker].ppNotAffectedByPressure = TRUE; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_setrain(void) { + CMD_ARGS(); + if (!TryChangeBattleWeather(gBattlerAttacker, ENUM_WEATHER_RAIN, FALSE)) { gMoveResultFlags |= MOVE_RESULT_MISSED; @@ -10514,11 +11513,13 @@ static void Cmd_setrain(void) { gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_RAIN; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_setreflect(void) { + CMD_ARGS(); + if (gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] & SIDE_STATUS_REFLECT) { gMoveResultFlags |= MOVE_RESULT_MISSED; @@ -10538,11 +11539,13 @@ static void Cmd_setreflect(void) else gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_REFLECT_SINGLE; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_setseeded(void) { + CMD_ARGS(); + if (gMoveResultFlags & MOVE_RESULT_NO_EFFECT || gStatuses3[gBattlerTarget] & STATUS3_LEECHSEED) { gMoveResultFlags |= MOVE_RESULT_MISSED; @@ -10560,12 +11563,14 @@ static void Cmd_setseeded(void) gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_LEECH_SEED_SET; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_manipulatedamage(void) { - switch (gBattlescriptCurrInstr[1]) + CMD_ARGS(u8 mode); + + switch (cmd->mode) { case DMG_CHANGE_SIGN: gBattleMoveDamage *= -1; @@ -10607,18 +11612,20 @@ static void Cmd_manipulatedamage(void) break; } - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_trysetrest(void) { - const u8 *failJump = T1_READ_PTR(gBattlescriptCurrInstr + 1); + CMD_ARGS(const u8 *failInstr); + + const u8 *failInstr = cmd->failInstr; gActiveBattler = gBattlerTarget = gBattlerAttacker; gBattleMoveDamage = gBattleMons[gBattlerTarget].maxHP * (-1); if (gBattleMons[gBattlerTarget].hp == gBattleMons[gBattlerTarget].maxHP) { - gBattlescriptCurrInstr = failJump; + gBattlescriptCurrInstr = failInstr; } else if (IsBattlerTerrainAffected(gBattlerTarget, STATUS_FIELD_ELECTRIC_TERRAIN)) { @@ -10638,30 +11645,34 @@ static void Cmd_trysetrest(void) gBattleMons[gBattlerTarget].status1 = STATUS1_SLEEP_TURN(3); BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].status1), &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_jumpifnotfirstturn(void) { - const u8 *failJump = T1_READ_PTR(gBattlescriptCurrInstr + 1); + CMD_ARGS(const u8 *jumpInstr); + + const u8 *jumpInstr = cmd->jumpInstr; if (gDisableStructs[gBattlerAttacker].isFirstTurn) - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; else - gBattlescriptCurrInstr = failJump; + gBattlescriptCurrInstr = jumpInstr; } static void Cmd_setmiracleeye(void) { + CMD_ARGS(const u8 *failInstr); + if (!(gStatuses3[gBattlerTarget] & STATUS3_MIRACLE_EYED)) { gStatuses3[gBattlerTarget] |= STATUS3_MIRACLE_EYED; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } @@ -10694,15 +11705,22 @@ bool8 UproarWakeUpCheck(u8 battlerId) static void Cmd_jumpifuproarwakes(void) { + CMD_ARGS(const u8 *jumpInstr); + + const u8 *jumpInstr = cmd->jumpInstr; + u32 ability = GetBattlerAbility(gBattlerTarget); + if (UproarWakeUpCheck(gBattlerTarget)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = jumpInstr; else - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_stockpile(void) { - switch (gBattlescriptCurrInstr[1]) + CMD_ARGS(u8 id); + + switch (cmd->id) { case 0: if (gDisableStructs[gBattlerAttacker].stockpileCounter >= 3) @@ -10728,15 +11746,17 @@ static void Cmd_stockpile(void) break; } - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_stockpiletobasedamage(void) { - const u8 *jumpPtr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + CMD_ARGS(const u8 *failInstr); + + const u8 *failInstr = cmd->failInstr; if (gDisableStructs[gBattlerAttacker].stockpileCounter == 0) { - gBattlescriptCurrInstr = jumpPtr; + gBattlescriptCurrInstr = failInstr; } else { @@ -10745,22 +11765,21 @@ static void Cmd_stockpiletobasedamage(void) if (!(gSpecialStatuses[gBattlerAttacker].parentalBondState == PARENTAL_BOND_1ST_HIT && gBattleMons[gBattlerTarget].hp != 0)) { - gDisableStructs[gBattlerAttacker].stockpileCounter = 0; - // Restore stat changes from stockpile. - gBattleMons[gBattlerAttacker].statStages[STAT_DEF] -= gDisableStructs[gBattlerAttacker].stockpileDef; - gBattleMons[gBattlerAttacker].statStages[STAT_SPDEF] -= gDisableStructs[gBattlerAttacker].stockpileSpDef; + gBattleStruct->moveEffect2 = MOVE_EFFECT_STOCKPILE_WORE_OFF; } - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_stockpiletohpheal(void) { - const u8 *jumpPtr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + CMD_ARGS(const u8 *failInstr); + + const u8 *failInstr = cmd->failInstr; if (gDisableStructs[gBattlerAttacker].stockpileCounter == 0) { - gBattlescriptCurrInstr = jumpPtr; + gBattlescriptCurrInstr = failInstr; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SWALLOW_FAILED; } else @@ -10768,7 +11787,7 @@ static void Cmd_stockpiletohpheal(void) if (gBattleMons[gBattlerAttacker].maxHP == gBattleMons[gBattlerAttacker].hp) { gDisableStructs[gBattlerAttacker].stockpileCounter = 0; - gBattlescriptCurrInstr = jumpPtr; + gBattlescriptCurrInstr = failInstr; gBattlerTarget = gBattlerAttacker; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SWALLOW_FULL_HP; } @@ -10781,20 +11800,18 @@ static void Cmd_stockpiletohpheal(void) gBattleMoveDamage *= -1; gBattleScripting.animTurn = gDisableStructs[gBattlerAttacker].stockpileCounter; - gDisableStructs[gBattlerAttacker].stockpileCounter = 0; - gBattlescriptCurrInstr += 5; + gBattleStruct->moveEffect2 = MOVE_EFFECT_STOCKPILE_WORE_OFF; + gBattlescriptCurrInstr = cmd->nextInstr; gBattlerTarget = gBattlerAttacker; } - - // Restore stat changes from stockpile. - gBattleMons[gBattlerAttacker].statStages[STAT_DEF] -= gDisableStructs[gBattlerAttacker].stockpileDef; - gBattleMons[gBattlerAttacker].statStages[STAT_SPDEF] -= gDisableStructs[gBattlerAttacker].stockpileSpDef; } } // Sign change for drained HP handled in GetDrainedBigRootHp static void Cmd_setdrainedhp(void) { + CMD_ARGS(); + if (gBattleMoves[gCurrentMove].argument != 0) gBattleMoveDamage = (gHpDealt * gBattleMoves[gCurrentMove].argument / 100); else @@ -10803,7 +11820,7 @@ static void Cmd_setdrainedhp(void) if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static u16 ReverseStatChangeMoveEffect(u16 moveEffect) @@ -10877,8 +11894,9 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr bool32 certain = FALSE; bool32 notProtectAffected = FALSE; u32 index; - bool32 affectsUser = (flags & MOVE_EFFECT_AFFECTS_USER); u16 activeBattlerAbility; + bool32 affectsUser = (flags & MOVE_EFFECT_AFFECTS_USER); + bool32 mirrorArmored = (flags & STAT_CHANGE_MIRROR_ARMOR); if (affectsUser) gActiveBattler = gBattlerAttacker; @@ -10889,10 +11907,10 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr gSpecialStatuses[gActiveBattler].changedStatsBattlerId = gBattlerAttacker; - flags &= ~MOVE_EFFECT_AFFECTS_USER; + flags &= ~(MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_MIRROR_ARMOR); if (flags & MOVE_EFFECT_CERTAIN) - certain++; + certain = TRUE; flags &= ~MOVE_EFFECT_CERTAIN; if (flags & STAT_CHANGE_NOT_PROTECT_AFFECTED) @@ -10948,7 +11966,7 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr || activeBattlerAbility == ABILITY_CLEAR_BODY || activeBattlerAbility == ABILITY_FULL_METAL_BODY || activeBattlerAbility == ABILITY_WHITE_SMOKE) - && !affectsUser && !certain && gCurrentMove != MOVE_CURSE) + && (!affectsUser || mirrorArmored) && !certain && gCurrentMove != MOVE_CURSE) { if (GetBattlerHoldEffect(gActiveBattler, TRUE) == HOLD_EFFECT_CLEAR_AMULET) { @@ -11010,7 +12028,7 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr } return STAT_CHANGE_DIDNT_WORK; } - else if (activeBattlerAbility == ABILITY_MIRROR_ARMOR && !affectsUser && gBattlerAttacker != gBattlerTarget && gActiveBattler == gBattlerTarget) + else if (activeBattlerAbility == ABILITY_MIRROR_ARMOR && !affectsUser && !mirrorArmored && gBattlerAttacker != gBattlerTarget && gActiveBattler == gBattlerTarget) { if (flags == STAT_CHANGE_ALLOW_PTR) { @@ -11128,14 +12146,16 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr static void Cmd_statbuffchange(void) { - u16 flags = T1_READ_16(gBattlescriptCurrInstr + 1); - const u8 *ptrBefore = gBattlescriptCurrInstr; - const u8 *jumpPtr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + CMD_ARGS(u16 flags, const u8 *failInstr); - if (ChangeStatBuffs(GET_STAT_BUFF_VALUE_WITH_SIGN(gBattleScripting.statChanger), GET_STAT_BUFF_ID(gBattleScripting.statChanger), flags, jumpPtr) == STAT_CHANGE_WORKED) - gBattlescriptCurrInstr += 7; + u16 flags = cmd->flags; + const u8 *ptrBefore = gBattlescriptCurrInstr; + const u8 *failInstr = cmd->failInstr; + + if (ChangeStatBuffs(GET_STAT_BUFF_VALUE_WITH_SIGN(gBattleScripting.statChanger), GET_STAT_BUFF_ID(gBattleScripting.statChanger), flags, failInstr) == STAT_CHANGE_WORKED) + gBattlescriptCurrInstr = cmd->nextInstr; else if (gBattlescriptCurrInstr == ptrBefore) // Prevent infinite looping. - gBattlescriptCurrInstr = jumpPtr; + gBattlescriptCurrInstr = failInstr; } bool32 TryResetBattlerStatChanges(u8 battler) @@ -11159,37 +12179,45 @@ bool32 TryResetBattlerStatChanges(u8 battler) // Haze static void Cmd_normalisebuffs(void) { + CMD_ARGS(); + s32 i, j; for (i = 0; i < gBattlersCount; i++) TryResetBattlerStatChanges(i); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_setbide(void) { + CMD_ARGS(); + gBattleMons[gBattlerAttacker].status2 |= STATUS2_MULTIPLETURNS; gLockedMoves[gBattlerAttacker] = gCurrentMove; gTakenDmg[gBattlerAttacker] = 0; gBattleMons[gBattlerAttacker].status2 |= STATUS2_BIDE_TURN(2); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_confuseifrepeatingattackends(void) { + CMD_ARGS(); + if (!(gBattleMons[gBattlerAttacker].status2 & STATUS2_LOCK_CONFUSE) && !gSpecialStatuses[gBattlerAttacker].dancerUsedMove) gBattleScripting.moveEffect = (MOVE_EFFECT_THRASH | MOVE_EFFECT_AFFECTS_USER); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_setmultihitcounter(void) { - if (gBattlescriptCurrInstr[1]) + CMD_ARGS(u8 value); + + if (cmd->value) { - gMultiHitCounter = gBattlescriptCurrInstr[1]; + gMultiHitCounter = cmd->value; } else { @@ -11226,18 +12254,22 @@ static void Cmd_setmultihitcounter(void) } } - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_initmultihitstring(void) { + CMD_ARGS(); + PREPARE_BYTE_NUMBER_BUFFER(gBattleScripting.multihitString, 1, 0) - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_forcerandomswitch(void) { + CMD_ARGS(const u8 *failInstr); + s32 i; s32 battler1PartyId = 0; s32 battler2PartyId = 0; @@ -11246,8 +12278,8 @@ static void Cmd_forcerandomswitch(void) s32 lastMonId = 0; // + 1 s32 monsCount; struct Pokemon *party = NULL; - s32 validMons = 0; - s32 minNeeded; + u8 validMons[PARTY_SIZE]; + s32 validMonsCount = 0; bool32 redCardForcedSwitch = FALSE; @@ -11304,7 +12336,6 @@ static void Cmd_forcerandomswitch(void) firstMonId = 0; lastMonId = 6; monsCount = 6; - minNeeded = 2; battler2PartyId = gBattlerPartyIndexes[gBattlerTarget]; battler1PartyId = gBattlerPartyIndexes[BATTLE_PARTNER(gBattlerTarget)]; } @@ -11323,7 +12354,6 @@ static void Cmd_forcerandomswitch(void) lastMonId = PARTY_SIZE / 2; } monsCount = PARTY_SIZE / 2; - minNeeded = 1; battler2PartyId = gBattlerPartyIndexes[gBattlerTarget]; battler1PartyId = gBattlerPartyIndexes[BATTLE_PARTNER(gBattlerTarget)]; } @@ -11341,7 +12371,6 @@ static void Cmd_forcerandomswitch(void) lastMonId = PARTY_SIZE / 2; } monsCount = PARTY_SIZE / 2; - minNeeded = 1; battler2PartyId = gBattlerPartyIndexes[gBattlerTarget]; battler1PartyId = gBattlerPartyIndexes[BATTLE_PARTNER(gBattlerTarget)]; } @@ -11352,7 +12381,6 @@ static void Cmd_forcerandomswitch(void) firstMonId = 0; lastMonId = PARTY_SIZE; monsCount = PARTY_SIZE; - minNeeded = 2; // since there are two opponents, it has to be a double battle } else { @@ -11367,7 +12395,6 @@ static void Cmd_forcerandomswitch(void) lastMonId = PARTY_SIZE / 2; } monsCount = PARTY_SIZE / 2; - minNeeded = 1; } battler2PartyId = gBattlerPartyIndexes[gBattlerTarget]; battler1PartyId = gBattlerPartyIndexes[BATTLE_PARTNER(gBattlerTarget)]; @@ -11377,7 +12404,6 @@ static void Cmd_forcerandomswitch(void) firstMonId = 0; lastMonId = PARTY_SIZE; monsCount = PARTY_SIZE; - minNeeded = 2; battler2PartyId = gBattlerPartyIndexes[gBattlerTarget]; battler1PartyId = gBattlerPartyIndexes[BATTLE_PARTNER(gBattlerTarget)]; } @@ -11386,7 +12412,6 @@ static void Cmd_forcerandomswitch(void) firstMonId = 0; lastMonId = PARTY_SIZE; monsCount = PARTY_SIZE; - minNeeded = 1; battler2PartyId = gBattlerPartyIndexes[gBattlerTarget]; // there is only one pokemon out in single battles battler1PartyId = gBattlerPartyIndexes[gBattlerTarget]; } @@ -11395,33 +12420,24 @@ static void Cmd_forcerandomswitch(void) { if (GetMonData(&party[i], MON_DATA_SPECIES) != SPECIES_NONE && !GetMonData(&party[i], MON_DATA_IS_EGG) - && GetMonData(&party[i], MON_DATA_HP) != 0) + && GetMonData(&party[i], MON_DATA_HP) != 0 + && i != battler1PartyId + && i != battler2PartyId) { - validMons++; + validMons[validMonsCount++] = i; } } - if (!redCardForcedSwitch && validMons <= minNeeded) + if (validMonsCount == 0) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { *(gBattleStruct->battlerPartyIndexes + gBattlerTarget) = gBattlerPartyIndexes[gBattlerTarget]; gBattlescriptCurrInstr = BattleScript_RoarSuccessSwitch; - - do - { - i = Random() % monsCount; - i += firstMonId; - } - while (i == battler2PartyId - || i == battler1PartyId - || GetMonData(&party[i], MON_DATA_SPECIES) == SPECIES_NONE - || GetMonData(&party[i], MON_DATA_IS_EGG) == TRUE - || GetMonData(&party[i], MON_DATA_HP) == 0); - - *(gBattleStruct->monToSwitchIntoId + gBattlerTarget) = i; + gBattleStruct->forcedSwitch |= gBitTable[gBattlerTarget]; + *(gBattleStruct->monToSwitchIntoId + gBattlerTarget) = validMons[RandomUniform(RNG_FORCE_RANDOM_SWITCH, 0, validMonsCount - 1)]; if (!IsMultiBattle()) SwitchPartyOrder(gBattlerTarget); @@ -11445,12 +12461,14 @@ static void Cmd_forcerandomswitch(void) if (gBattleMons[gBattlerAttacker].level >= gBattleMons[gBattlerTarget].level) gBattlescriptCurrInstr = BattleScript_RoarSuccessEndBattle; else - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } static void Cmd_tryconversiontypechange(void) { + CMD_ARGS(const u8 *failInstr); + u8 validMoves = 0; u8 moveChecked; u8 moveType; @@ -11467,13 +12485,13 @@ static void Cmd_tryconversiontypechange(void) } if (IS_BATTLER_OF_TYPE(gBattlerAttacker, moveType)) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { SET_BATTLER_TYPE(gBattlerAttacker, moveType); PREPARE_TYPE_BUFFER(gBattleTextBuff1, moveType); - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } #else // Randomly changes user's type to one of its moves' type @@ -11506,7 +12524,7 @@ static void Cmd_tryconversiontypechange(void) if (moveChecked == validMoves) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -11529,13 +12547,15 @@ static void Cmd_tryconversiontypechange(void) SET_BATTLER_TYPE(gBattlerAttacker, moveType); PREPARE_TYPE_BUFFER(gBattleTextBuff1, moveType); - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } #endif } static void Cmd_givepaydaymoney(void) { + CMD_ARGS(); + if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK)) && gPaydayMoney != 0) { u32 bonusMoney = gPaydayMoney * gBattleStruct->moneyMultiplier; @@ -11543,17 +12563,19 @@ static void Cmd_givepaydaymoney(void) PREPARE_HWORD_NUMBER_BUFFER(gBattleTextBuff1, 5, bonusMoney) - BattleScriptPush(gBattlescriptCurrInstr + 1); + BattleScriptPush(cmd->nextInstr); gBattlescriptCurrInstr = BattleScript_PrintPayDayMoneyString; } else { - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_setlightscreen(void) { + CMD_ARGS(); + if (gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] & SIDE_STATUS_LIGHTSCREEN) { gMoveResultFlags |= MOVE_RESULT_MISSED; @@ -11574,11 +12596,13 @@ static void Cmd_setlightscreen(void) gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_LIGHTSCREEN_SINGLE; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_tryKO(void) { + CMD_ARGS(const u8 *failInstr); + bool32 lands = FALSE; u32 holdEffect = GetBattlerHoldEffect(gBattlerTarget, TRUE); u16 targetAbility = GetBattlerAbility(gBattlerTarget); @@ -11620,7 +12644,7 @@ static void Cmd_tryKO(void) if (gCurrentMove == MOVE_SHEER_COLD && !IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_ICE)) odds -= 10; #endif - if (Random() % 100 + 1 < odds && gBattleMons[gBattlerAttacker].level >= gBattleMons[gBattlerTarget].level) + if (RandomPercentage(RNG_ACCURACY, odds) && gBattleMons[gBattlerAttacker].level >= gBattleMons[gBattlerTarget].level) lands = TRUE; } @@ -11649,7 +12673,7 @@ static void Cmd_tryKO(void) gBattleMoveDamage = gBattleMons[gBattlerTarget].hp; gMoveResultFlags |= MOVE_RESULT_ONE_HIT_KO; } - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { @@ -11658,7 +12682,7 @@ static void Cmd_tryKO(void) gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_KO_MISS; else gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_KO_UNAFFECTED; - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } } @@ -11666,15 +12690,19 @@ static void Cmd_tryKO(void) // Super Fang static void Cmd_damagetohalftargethp(void) { + CMD_ARGS(); + gBattleMoveDamage = gBattleMons[gBattlerTarget].hp / 2; if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_setsandstorm(void) { + CMD_ARGS(); + if (!TryChangeBattleWeather(gBattlerAttacker, ENUM_WEATHER_SANDSTORM, FALSE)) { gMoveResultFlags |= MOVE_RESULT_MISSED; @@ -11684,11 +12712,13 @@ static void Cmd_setsandstorm(void) { gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_SANDSTORM; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_weatherdamage(void) { + CMD_ARGS(); + u32 ability = GetBattlerAbility(gBattlerAttacker); gBattleMoveDamage = 0; @@ -11738,11 +12768,13 @@ static void Cmd_weatherdamage(void) } } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_tryinfatuating(void) { + CMD_ARGS(const u8 *failInstr); + struct Pokemon *monAttacker, *monTarget; u16 speciesAttacker, speciesTarget; u32 personalityAttacker, personalityTarget; @@ -11776,27 +12808,29 @@ static void Cmd_tryinfatuating(void) || GetGenderFromSpeciesAndPersonality(speciesAttacker, personalityAttacker) == MON_GENDERLESS || GetGenderFromSpeciesAndPersonality(speciesTarget, personalityTarget) == MON_GENDERLESS) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { gBattleMons[gBattlerTarget].status2 |= STATUS2_INFATUATED_WITH(gBattlerAttacker); - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } } static void Cmd_updatestatusicon(void) { + CMD_ARGS(u8 battler); + if (gBattleControllerExecFlags) return; - if (gBattlescriptCurrInstr[1] != BS_ATTACKER_WITH_PARTNER) + if (cmd->battler != BS_ATTACKER_WITH_PARTNER) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + gActiveBattler = GetBattlerForBattleScript(cmd->battler); BtlController_EmitStatusIconUpdate(BUFFER_A, gBattleMons[gActiveBattler].status1, gBattleMons[gActiveBattler].status2); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } else { @@ -11815,12 +12849,14 @@ static void Cmd_updatestatusicon(void) MarkBattlerForControllerExec(gActiveBattler); } } - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_setmist(void) { + CMD_ARGS(); + if (gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].mistTimer) { gMoveResultFlags |= MOVE_RESULT_FAILED; @@ -11833,11 +12869,13 @@ static void Cmd_setmist(void) gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] |= SIDE_STATUS_MIST; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_MIST; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_setfocusenergy(void) { + CMD_ARGS(); + if (gBattleMons[gBattlerAttacker].status2 & STATUS2_FOCUS_ENERGY) { gMoveResultFlags |= MOVE_RESULT_FAILED; @@ -11848,13 +12886,15 @@ static void Cmd_setfocusenergy(void) gBattleMons[gBattlerAttacker].status2 |= STATUS2_FOCUS_ENERGY; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_GETTING_PUMPED; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_transformdataexecution(void) { + CMD_ARGS(); + gChosenMove = MOVE_UNAVAILABLE; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; if (gBattleMons[gBattlerTarget].status2 & STATUS2_TRANSFORMED || gBattleStruct->illusion[gBattlerTarget].on || gStatuses3[gBattlerTarget] & STATUS3_SEMI_INVULNERABLE) @@ -11900,6 +12940,8 @@ static void Cmd_transformdataexecution(void) static void Cmd_setsubstitute(void) { + CMD_ARGS(); + u32 hp = gBattleMons[gBattlerAttacker].maxHP / 4; if (gBattleMons[gBattlerAttacker].maxHP / 4 == 0) hp = 1; @@ -11922,16 +12964,18 @@ static void Cmd_setsubstitute(void) gHitMarker |= HITMARKER_IGNORE_SUBSTITUTE; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_mimicattackcopy(void) { + CMD_ARGS(const u8 *failInstr); + if ((sForbiddenMoves[gLastMoves[gBattlerTarget]] & FORBIDDEN_MIMIC) || (gBattleMons[gBattlerAttacker].status2 & STATUS2_TRANSFORMED) || gLastMoves[gBattlerTarget] == MOVE_UNAVAILABLE) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -11955,17 +12999,19 @@ static void Cmd_mimicattackcopy(void) PREPARE_MOVE_BUFFER(gBattleTextBuff1, gLastMoves[gBattlerTarget]) gDisableStructs[gBattlerAttacker].mimickedMoves |= gBitTable[gCurrMovePos]; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } } static void Cmd_metronome(void) { + CMD_ARGS(); + #if B_METRONOME_MOVES >= GEN_9 u16 moveCount = MOVES_COUNT_GEN9; #elif B_METRONOME_MOVES >= GEN_8 @@ -12000,12 +13046,16 @@ static void Cmd_metronome(void) static void Cmd_dmgtolevel(void) { + CMD_ARGS(); + gBattleMoveDamage = gBattleMons[gBattlerAttacker].level; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_psywavedamageeffect(void) { + CMD_ARGS(); + s32 randDamage; #if B_PSYWAVE_DMG >= GEN_6 randDamage = (Random() % 101); @@ -12013,11 +13063,13 @@ static void Cmd_psywavedamageeffect(void) randDamage = (Random() % 11) * 10; #endif gBattleMoveDamage = gBattleMons[gBattlerAttacker].level * (randDamage + 50) / 100; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_counterdamagecalculator(void) { + CMD_ARGS(const u8 *failInstr); + u8 sideAttacker = GetBattlerSide(gBattlerAttacker); u8 sideTarget = GetBattlerSide(gProtectStructs[gBattlerAttacker].physicalBattlerId); @@ -12032,18 +13084,20 @@ static void Cmd_counterdamagecalculator(void) else gBattlerTarget = gProtectStructs[gBattlerAttacker].physicalBattlerId; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { gSpecialStatuses[gBattlerAttacker].ppNotAffectedByPressure = TRUE; - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } // A copy of Cmd with the physical -> special field changes static void Cmd_mirrorcoatdamagecalculator(void) { + CMD_ARGS(const u8 *failInstr); + u8 sideAttacker = GetBattlerSide(gBattlerAttacker); u8 sideTarget = GetBattlerSide(gProtectStructs[gBattlerAttacker].specialBattlerId); @@ -12058,17 +13112,19 @@ static void Cmd_mirrorcoatdamagecalculator(void) else gBattlerTarget = gProtectStructs[gBattlerAttacker].specialBattlerId; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { gSpecialStatuses[gBattlerAttacker].ppNotAffectedByPressure = TRUE; - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } static void Cmd_disablelastusedattack(void) { + CMD_ARGS(const u8 *failInstr); + s32 i; for (i = 0; i < MAX_MON_MOVES; i++) @@ -12089,16 +13145,18 @@ static void Cmd_disablelastusedattack(void) #else gDisableStructs[gBattlerTarget].disableTimer = 4; #endif - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } static void Cmd_trysetencore(void) { + CMD_ARGS(const u8 *failInstr); + s32 i; for (i = 0; i < MAX_MON_MOVES; i++) @@ -12124,16 +13182,18 @@ static void Cmd_trysetencore(void) gDisableStructs[gBattlerTarget].encoredMovePos = i; gDisableStructs[gBattlerTarget].encoreTimer = 3; gDisableStructs[gBattlerTarget].encoreTimer; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } static void Cmd_painsplitdmgcalc(void) { + CMD_ARGS(const u8 *failInstr); + if (!(DoesSubstituteBlockMove(gBattlerAttacker, gBattlerTarget, gCurrentMove))) { s32 hpDiff = (gBattleMons[gBattlerAttacker].hp + gBattleMons[gBattlerTarget].hp) / 2; @@ -12148,26 +13208,28 @@ static void Cmd_painsplitdmgcalc(void) gBattleMoveDamage = gBattleMons[gBattlerAttacker].hp - hpDiff; gSpecialStatuses[gBattlerTarget].dmg = 0xFFFF; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } // Conversion 2 static void Cmd_settypetorandomresistance(void) { + CMD_ARGS(const u8 *failInstr); + if (gLastLandedMoves[gBattlerAttacker] == MOVE_NONE || gLastLandedMoves[gBattlerAttacker] == MOVE_UNAVAILABLE) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else if (IsTwoTurnsMove(gLastLandedMoves[gBattlerAttacker]) && gBattleMons[gLastHitBy[gBattlerAttacker]].status2 & STATUS2_MULTIPLETURNS) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -12198,27 +13260,31 @@ static void Cmd_settypetorandomresistance(void) { SET_BATTLER_TYPE(gBattlerAttacker, i); PREPARE_TYPE_BUFFER(gBattleTextBuff1, i); - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; return; } } } - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } static void Cmd_setalwayshitflag(void) { + CMD_ARGS(); + gStatuses3[gBattlerTarget] &= ~STATUS3_ALWAYS_HITS; gStatuses3[gBattlerTarget] |= STATUS3_ALWAYS_HITS_TURN(2); gDisableStructs[gBattlerTarget].battlerWithSureHit = gBattlerAttacker; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } // Sketch static void Cmd_copymovepermanently(void) { + CMD_ARGS(const u8 *failInstr); + gChosenMove = MOVE_UNAVAILABLE; if (!(gBattleMons[gBattlerAttacker].status2 & STATUS2_TRANSFORMED) @@ -12239,7 +13305,7 @@ static void Cmd_copymovepermanently(void) if (i != MAX_MON_MOVES) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else // sketch worked { @@ -12261,12 +13327,12 @@ static void Cmd_copymovepermanently(void) PREPARE_MOVE_BUFFER(gBattleTextBuff1, gLastPrintedMoves[gBattlerTarget]) - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } @@ -12305,6 +13371,8 @@ static u8 AttacksThisTurn(u8 battlerId, u16 move) // Note: returns 1 if it's a c static void Cmd_trychoosesleeptalkmove(void) { + CMD_ARGS(const u8 *failInstr); + u32 i, unusableMovesBits = 0, movePosition; for (i = 0; i < MAX_MON_MOVES; i++) @@ -12319,7 +13387,7 @@ static void Cmd_trychoosesleeptalkmove(void) unusableMovesBits = CheckMoveLimitations(gBattlerAttacker, unusableMovesBits, ~MOVE_LIMITATION_PP); if (unusableMovesBits == (1 << MAX_MON_MOVES) - 1) // all 4 moves cannot be chosen { - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else // at least one move can be chosen { @@ -12332,14 +13400,16 @@ static void Cmd_trychoosesleeptalkmove(void) gCurrMovePos = movePosition; gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; gBattlerTarget = GetMoveTarget(gCalledMove, NO_TARGET_OVERRIDE); - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } static void Cmd_setdestinybond(void) { + CMD_ARGS(); + gBattleMons[gBattlerAttacker].status2 |= STATUS2_DESTINY_BOND; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void TrySetDestinyBondToHappen(void) @@ -12356,12 +13426,16 @@ static void TrySetDestinyBondToHappen(void) static void Cmd_trysetdestinybondtohappen(void) { + CMD_ARGS(); + TrySetDestinyBondToHappen(); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_settailwind(void) { + CMD_ARGS(const u8 *failInstr); + u8 side = GetBattlerSide(gBattlerAttacker); if (!(gSideStatuses[side] & SIDE_STATUS_TAILWIND)) @@ -12373,16 +13447,18 @@ static void Cmd_settailwind(void) #else gSideTimers[side].tailwindTimer = 3; #endif - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } static void Cmd_tryspiteppreduce(void) { + CMD_ARGS(const u8 *failInstr); + if (gLastMoves[gBattlerTarget] != MOVE_NONE && gLastMoves[gBattlerTarget] != MOVE_UNAVAILABLE) { @@ -12426,7 +13502,7 @@ static void Cmd_tryspiteppreduce(void) MarkBattlerForControllerExec(gActiveBattler); } - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; // Don't cut off Sky Drop if pp is brought to zero. if (gBattleMons[gBattlerTarget].pp[i] == 0 && gBattleStruct->skyDropTargets[gBattlerTarget] == 0xFF) @@ -12434,17 +13510,19 @@ static void Cmd_tryspiteppreduce(void) } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } static void Cmd_healpartystatus(void) { + CMD_ARGS(); + u32 zero = 0; u8 toHeal = 0; @@ -12492,7 +13570,7 @@ static void Cmd_healpartystatus(void) for (i = 0; i < PARTY_SIZE; i++) { - u16 species = GetMonData(&party[i], MON_DATA_SPECIES2); + u16 species = GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG); u8 abilityNum = GetMonData(&party[i], MON_DATA_ABILITY_NUM); if (species != SPECIES_NONE && species != SPECIES_EGG) @@ -12538,14 +13616,16 @@ static void Cmd_healpartystatus(void) MarkBattlerForControllerExec(gActiveBattler); } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_cursetarget(void) { + CMD_ARGS(const u8 *failInstr); + if (gBattleMons[gBattlerTarget].status2 & STATUS2_CURSED) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -12554,35 +13634,41 @@ static void Cmd_cursetarget(void) if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_trysetspikes(void) { + CMD_ARGS(const u8 *failInstr); + u8 targetSide = BATTLE_OPPOSITE(GetBattlerSide(gBattlerAttacker)); if (gSideTimers[targetSide].spikesAmount == 3) { gSpecialStatuses[gBattlerAttacker].ppNotAffectedByPressure = TRUE; - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { gSideStatuses[targetSide] |= SIDE_STATUS_SPIKES; gSideTimers[targetSide].spikesAmount++; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_setforesight(void) { + CMD_ARGS(); + gBattleMons[gBattlerTarget].status2 |= STATUS2_FORESIGHT; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_trysetperishsong(void) { + CMD_ARGS(const u8 *failInstr); + s32 i; s32 notAffectedCount = 0; @@ -12604,13 +13690,15 @@ static void Cmd_trysetperishsong(void) PressurePPLoseOnUsingPerishSong(gBattlerAttacker); if (notAffectedCount == gBattlersCount) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; else - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_handlerollout(void) { + CMD_ARGS(); + if (gMoveResultFlags & MOVE_RESULT_NO_EFFECT) { CancelMultiTurnMoves(gBattlerAttacker); @@ -12630,21 +13718,25 @@ static void Cmd_handlerollout(void) gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_MULTIPLETURNS; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_jumpifconfusedandstatmaxed(void) { + CMD_ARGS(u8 stat, const u8 *jumpInstr); + if (gBattleMons[gBattlerTarget].status2 & STATUS2_CONFUSION - && !CompareStat(gBattlerTarget, gBattlescriptCurrInstr[1], MAX_STAT_STAGE, CMP_LESS_THAN)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 2); // Fails if we're confused AND stat cannot be raised + && !CompareStat(gBattlerTarget, cmd->stat, MAX_STAT_STAGE, CMP_LESS_THAN)) + gBattlescriptCurrInstr = cmd->jumpInstr; // Fails if we're confused AND stat cannot be raised else - gBattlescriptCurrInstr += 6; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_handlefurycutter(void) { + CMD_ARGS(); + if (gMoveResultFlags & MOVE_RESULT_NO_EFFECT) { gDisableStructs[gBattlerAttacker].furyCutterCounter = 0; @@ -12656,26 +13748,30 @@ static void Cmd_handlefurycutter(void) && gSpecialStatuses[gBattlerAttacker].parentalBondState != PARENTAL_BOND_1ST_HIT) // Don't increment counter on first hit gDisableStructs[gBattlerAttacker].furyCutterCounter++; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_setembargo(void) { + CMD_ARGS(const u8 *failInstr); + if (gStatuses3[gBattlerTarget] & STATUS3_EMBARGO) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { gStatuses3[gBattlerTarget] |= STATUS3_EMBARGO; gDisableStructs[gBattlerTarget].embargoTimer = 5; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_presentdamagecalculation(void) { + CMD_ARGS(); + u32 rand = Random() & 0xFF; /* Don't reroll present effect/power for the second hit of Parental Bond. @@ -12725,6 +13821,8 @@ static void Cmd_presentdamagecalculation(void) static void Cmd_setsafeguard(void) { + CMD_ARGS(); + if (gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] & SIDE_STATUS_SAFEGUARD) { gMoveResultFlags |= MOVE_RESULT_MISSED; @@ -12738,11 +13836,13 @@ static void Cmd_setsafeguard(void) gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_SAFEGUARD; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_magnitudedamagecalculation(void) { + CMD_ARGS(); + u32 magnitude = Random() % 100; if (magnitude < 5) @@ -12791,11 +13891,13 @@ static void Cmd_magnitudedamagecalculation(void) break; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_jumpifnopursuitswitchdmg(void) { + CMD_ARGS(const u8 *jumpInstr); + if (gMultiHitCounter == 1) { if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) @@ -12828,18 +13930,20 @@ static void Cmd_jumpifnopursuitswitchdmg(void) gCurrentMove = MOVE_PURSUIT; gCurrMovePos = gChosenMovePos = *(gBattleStruct->chosenMovePositions + gBattlerTarget); - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; gBattleScripting.animTurn = 1; gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->jumpInstr; } } static void Cmd_setsunny(void) { + CMD_ARGS(); + if (!TryChangeBattleWeather(gBattlerAttacker, ENUM_WEATHER_SUN, FALSE)) { gMoveResultFlags |= MOVE_RESULT_MISSED; @@ -12850,12 +13954,14 @@ static void Cmd_setsunny(void) gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_SUNLIGHT; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } // Belly Drum static void Cmd_maxattackhalvehp(void) { + CMD_ARGS(const u8 *failInstr); + u32 halfHp = gBattleMons[gBattlerAttacker].maxHP / 2; if (!(gBattleMons[gBattlerAttacker].maxHP / 2)) @@ -12870,17 +13976,19 @@ static void Cmd_maxattackhalvehp(void) if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } // Psych Up static void Cmd_copyfoestats(void) { + CMD_ARGS(const u8 *unused); + s32 i; for (i = 0; i < NUM_BATTLE_STATS; i++) @@ -12888,11 +13996,13 @@ static void Cmd_copyfoestats(void) gBattleMons[gBattlerAttacker].statStages[i] = gBattleMons[gBattlerTarget].statStages[i]; } - gBattlescriptCurrInstr += 5; // Has an unused jump ptr(possibly for a failed attempt) parameter. + gBattlescriptCurrInstr = cmd->nextInstr; // Has an unused jump ptr(possibly for a failed attempt) parameter. } static void Cmd_rapidspinfree(void) { + CMD_ARGS(); + u8 atkSide = GetBattlerSide(gBattlerAttacker); if (gBattleMons[gBattlerAttacker].status2 & STATUS2_WRAPPED) @@ -12941,18 +14051,22 @@ static void Cmd_rapidspinfree(void) } else { - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_setdefensecurlbit(void) { + CMD_ARGS(); + gBattleMons[gBattlerAttacker].status2 |= STATUS2_DEFENSE_CURL; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_recoverbasedonsunlight(void) { + CMD_ARGS(const u8 *failInstr); + gBattlerTarget = gBattlerAttacker; if (gBattleMons[gBattlerAttacker].hp != gBattleMons[gBattlerAttacker].maxHP) { @@ -12977,21 +14091,23 @@ static void Cmd_recoverbasedonsunlight(void) gBattleMoveDamage = 1; gBattleMoveDamage *= -1; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } static void Cmd_setstickyweb(void) { + CMD_ARGS(const u8 *failInstr); + u8 targetSide = GetBattlerSide(gBattlerTarget); if (gSideStatuses[targetSide] & SIDE_STATUS_STICKY_WEB) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -12999,12 +14115,14 @@ static void Cmd_setstickyweb(void) gSideTimers[targetSide].stickyWebBattlerSide = GetBattlerSide(gBattlerAttacker); // For Court Change/Defiant - set this to the user's side gSideTimers[targetSide].stickyWebAmount = 1; gBattleStruct->stickyWebUser = gBattlerAttacker; // For Mirror Armor - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_selectfirstvalidtarget(void) { + CMD_ARGS(); + for (gBattlerTarget = 0; gBattlerTarget < gBattlersCount; gBattlerTarget++) { if (gBattlerTarget == gBattlerAttacker && !(GetBattlerMoveTargetType(gBattlerAttacker, gCurrentMove) & MOVE_TARGET_USER)) @@ -13012,14 +14130,16 @@ static void Cmd_selectfirstvalidtarget(void) if (IsBattlerAlive(gBattlerTarget)) break; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_trysetfutureattack(void) { + CMD_ARGS(const u8 *failInstr); + if (gWishFutureKnock.futureSightCounter[gBattlerTarget] != 0) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -13033,15 +14153,17 @@ static void Cmd_trysetfutureattack(void) else gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_FUTURE_SIGHT; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_trydobeatup(void) { + CMD_ARGS(const u8 *endInstr, const u8 *failInstr); + #if B_BEAT_UP >= GEN_5 gBattleStruct->beatUpSlot++; - gBattlescriptCurrInstr += 9; + gBattlescriptCurrInstr = cmd->nextInstr; #else struct Pokemon *party; @@ -13052,7 +14174,7 @@ static void Cmd_trydobeatup(void) if (gBattleMons[gBattlerTarget].hp == 0) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->endInstr; } else { @@ -13060,8 +14182,8 @@ static void Cmd_trydobeatup(void) for (;gBattleCommunication[0] < PARTY_SIZE; gBattleCommunication[0]++) { if (GetMonData(&party[gBattleCommunication[0]], MON_DATA_HP) - && GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES2) - && GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && !GetMonData(&party[gBattleCommunication[0]], MON_DATA_STATUS)) break; } @@ -13069,7 +14191,7 @@ static void Cmd_trydobeatup(void) { PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gBattlerAttacker, gBattleCommunication[0]) - gBattlescriptCurrInstr += 9; + gBattlescriptCurrInstr = cmd->nextInstr; gBattleMoveDamage = gSpeciesInfo[GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES)].baseAttack; gBattleMoveDamage *= gBattleMoves[gCurrentMove].power; @@ -13082,15 +14204,17 @@ static void Cmd_trydobeatup(void) gBattleCommunication[0]++; } else if (beforeLoop != 0) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->endInstr; else - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 5); + gBattlescriptCurrInstr = cmd->failInstr; } #endif } static void Cmd_setsemiinvulnerablebit(void) { + CMD_ARGS(); + switch (gCurrentMove) { case MOVE_FLY: @@ -13110,25 +14234,31 @@ static void Cmd_setsemiinvulnerablebit(void) break; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_clearsemiinvulnerablebit(void) { + CMD_ARGS(); + gStatuses3[gBattlerAttacker] &= ~STATUS3_SEMI_INVULNERABLE; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_setminimize(void) { + CMD_ARGS(); + if (gHitMarker & HITMARKER_OBEYS) gStatuses3[gBattlerAttacker] |= STATUS3_MINIMIZED; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_sethail(void) { + CMD_ARGS(); + if (!TryChangeBattleWeather(gBattlerAttacker, ENUM_WEATHER_HAIL, FALSE)) { gMoveResultFlags |= MOVE_RESULT_MISSED; @@ -13139,11 +14269,13 @@ static void Cmd_sethail(void) gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_HAIL; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_trymemento(void) { + CMD_ARGS(const u8 *failInstr); + #if B_MEMENTO_FAIL == GEN_3 if (gBattleMons[gBattlerTarget].statStages[STAT_ATK] == MIN_STAT_STAGE && gBattleMons[gBattlerTarget].statStages[STAT_SPATK] == MIN_STAT_STAGE @@ -13156,7 +14288,7 @@ static void Cmd_trymemento(void) #endif { // Failed, unprotected target already has minimum Attack and Special Attack. - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -13165,35 +14297,42 @@ static void Cmd_trymemento(void) gBattleMoveDamage = gBattleMons[gActiveBattler].hp; BtlController_EmitHealthBarUpdate(BUFFER_A, INSTANT_HP_BAR_DROP); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } // Follow Me static void Cmd_setforcedtarget(void) { + CMD_ARGS(); + gSideTimers[GetBattlerSide(gBattlerTarget)].followmeTimer = 1; gSideTimers[GetBattlerSide(gBattlerTarget)].followmeTarget = gBattlerTarget; gSideTimers[GetBattlerSide(gBattlerTarget)].followmePowder = TestMoveFlags(gCurrentMove, FLAG_POWDER); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_setcharge(void) { - u8 battler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + CMD_ARGS(u8 battler); + + u8 battler = GetBattlerForBattleScript(cmd->battler); gStatuses3[battler] |= STATUS3_CHARGED_UP; gDisableStructs[battler].chargeTimer = 2; - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } // Nature Power static void Cmd_callterrainattack(void) { + CMD_ARGS(); + gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; gCurrentMove = GetNaturePowerMove(); gBattlerTarget = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE); BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } u16 GetNaturePowerMove(void) @@ -13214,43 +14353,51 @@ u16 GetNaturePowerMove(void) // Refresh static void Cmd_cureifburnedparalysedorpoisoned(void) { + CMD_ARGS(const u8 *failInstr); + if (gBattleMons[gBattlerAttacker].status1 & (STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON)) { gBattleMons[gBattlerAttacker].status1 = 0; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; gActiveBattler = gBattlerAttacker; BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].status1), &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } static void Cmd_settorment(void) { + CMD_ARGS(const u8 *failInstr); + if (gBattleMons[gBattlerTarget].status2 & STATUS2_TORMENT) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { gBattleMons[gBattlerTarget].status2 |= STATUS2_TORMENT; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_jumpifnodamage(void) { + CMD_ARGS(const u8 *jumpInstr); + if (gProtectStructs[gBattlerAttacker].physicalDmg || gProtectStructs[gBattlerAttacker].specialDmg) - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; else - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->jumpInstr; } static void Cmd_settaunt(void) { + CMD_ARGS(const u8 *failInstr); + #if B_OBLIVIOUS_TAUNT >= GEN_6 if (GetBattlerAbility(gBattlerTarget) == ABILITY_OBLIVIOUS) { @@ -13273,16 +14420,18 @@ static void Cmd_settaunt(void) #endif gDisableStructs[gBattlerTarget].tauntTimer = turns; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } static void Cmd_trysethelpinghand(void) { + CMD_ARGS(const u8 *failInstr); + gBattlerTarget = GetBattlerAtPosition(BATTLE_PARTNER(GetBattlerPosition(gBattlerAttacker))); if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE @@ -13291,17 +14440,19 @@ static void Cmd_trysethelpinghand(void) && !gProtectStructs[gBattlerTarget].helpingHand) { gProtectStructs[gBattlerTarget].helpingHand = TRUE; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } // Trick static void Cmd_tryswapitems(void) { + CMD_ARGS(const u8 *failInstr); + // opponent can't swap items with player in regular battles if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL || (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT @@ -13315,7 +14466,7 @@ static void Cmd_tryswapitems(void) #endif )))) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -13331,7 +14482,7 @@ static void Cmd_tryswapitems(void) && (gWishFutureKnock.knockedOffMons[sideAttacker] & gBitTable[gBattlerPartyIndexes[gBattlerAttacker]] || gWishFutureKnock.knockedOffMons[sideTarget] & gBitTable[gBattlerPartyIndexes[gBattlerTarget]])) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } // can't swap if two pokemon don't have an item // or if either of them is an enigma berry or a mail @@ -13341,7 +14492,7 @@ static void Cmd_tryswapitems(void) || !CanBattlerGetOrLoseItem(gBattlerTarget, gBattleMons[gBattlerTarget].item) || !CanBattlerGetOrLoseItem(gBattlerTarget, gBattleMons[gBattlerAttacker].item)) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } // check if ability prevents swapping else if (GetBattlerAbility(gBattlerTarget) == ABILITY_STICKY_HOLD) @@ -13376,7 +14527,7 @@ static void Cmd_tryswapitems(void) gBattleStruct->choicedMove[gBattlerTarget] = MOVE_NONE; gBattleStruct->choicedMove[gBattlerAttacker] = MOVE_NONE; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; PREPARE_ITEM_BUFFER(gBattleTextBuff1, *newItemAtk) PREPARE_ITEM_BUFFER(gBattleTextBuff2, oldItemAtk) @@ -13413,6 +14564,8 @@ static void Cmd_tryswapitems(void) // Role Play static void Cmd_trycopyability(void) { + CMD_ARGS(const u8 *failInstr); + u16 defAbility = gBattleMons[gBattlerTarget].ability; if (gBattleMons[gBattlerAttacker].ability == defAbility @@ -13420,31 +14573,33 @@ static void Cmd_trycopyability(void) || IsRolePlayBannedAbilityAtk(gBattleMons[gBattlerAttacker].ability) || IsRolePlayBannedAbility(defAbility)) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { gBattleScripting.abilityPopupOverwrite = gBattleMons[gBattlerAttacker].ability; gBattleMons[gBattlerAttacker].ability = gBattleStruct->overwrittenAbilities[gBattlerAttacker] = defAbility; gLastUsedAbility = defAbility; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_trywish(void) { - switch (gBattlescriptCurrInstr[1]) + CMD_ARGS(u8 turnNumber, const u8 *failInstr); + + switch (cmd->turnNumber) { case 0: // use wish if (gWishFutureKnock.wishCounter[gBattlerAttacker] == 0) { gWishFutureKnock.wishCounter[gBattlerAttacker] = 2; gWishFutureKnock.wishPartyId[gBattlerAttacker] = gBattlerPartyIndexes[gBattlerAttacker]; - gBattlescriptCurrInstr += 6; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 2); + gBattlescriptCurrInstr = cmd->failInstr; } break; case 1: // heal effect @@ -13460,9 +14615,9 @@ static void Cmd_trywish(void) gBattleMoveDamage *= -1; if (gBattleMons[gBattlerTarget].hp == gBattleMons[gBattlerTarget].maxHP) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 2); + gBattlescriptCurrInstr = cmd->failInstr; else - gBattlescriptCurrInstr += 6; + gBattlescriptCurrInstr = cmd->nextInstr; break; } @@ -13470,24 +14625,28 @@ static void Cmd_trywish(void) static void Cmd_settoxicspikes(void) { + CMD_ARGS(const u8 *failInstr); + u8 targetSide = GetBattlerSide(gBattlerTarget); if (gSideTimers[targetSide].toxicSpikesAmount >= 2) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { gSideTimers[targetSide].toxicSpikesAmount++; gSideStatuses[targetSide] |= SIDE_STATUS_TOXIC_SPIKES; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_setgastroacid(void) { + CMD_ARGS(const u8 *failInstr); + if (IsGastroAcidBannedAbility(gBattleMons[gBattlerTarget].ability)) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -13495,16 +14654,18 @@ static void Cmd_setgastroacid(void) gSpecialStatuses[gBattlerTarget].neutralizingGasRemoved = TRUE; gStatuses3[gBattlerTarget] |= STATUS3_GASTRO_ACID; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_setyawn(void) { + CMD_ARGS(const u8 *failInstr); + if (gStatuses3[gBattlerTarget] & STATUS3_YAWN || gBattleMons[gBattlerTarget].status1 & STATUS1_ANY) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else if (IsBattlerTerrainAffected(gBattlerTarget, STATUS_FIELD_ELECTRIC_TERRAIN)) { @@ -13521,20 +14682,22 @@ static void Cmd_setyawn(void) else { gStatuses3[gBattlerTarget] |= STATUS3_YAWN_TURN(2); - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_setdamagetohealthdifference(void) { + CMD_ARGS(const u8 *failInstr); + if (gBattleMons[gBattlerTarget].hp <= gBattleMons[gBattlerAttacker].hp) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { gBattleMoveDamage = gBattleMons[gBattlerTarget].hp - gBattleMons[gBattlerAttacker].hp; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } @@ -13556,6 +14719,8 @@ static void HandleRoomMove(u32 statusFlag, u8 *timer, u8 stringId) static void Cmd_setroom(void) { + CMD_ARGS(); + switch (gBattleMoves[gCurrentMove].effect) { case EFFECT_TRICK_ROOM: @@ -13571,28 +14736,30 @@ static void Cmd_setroom(void) gBattleCommunication[MULTISTRING_CHOOSER] = 6; break; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } // Skill Swap static void Cmd_tryswapabilities(void) { + CMD_ARGS(const u8 *failInstr); + if (IsSkillSwapBannedAbility(gBattleMons[gBattlerAttacker].ability) || IsSkillSwapBannedAbility(gBattleMons[gBattlerTarget].ability)) { RecordAbilityBattle(gBattlerTarget, gBattleMons[gBattlerTarget].ability); - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else if (GetBattlerHoldEffect(gBattlerTarget, TRUE) == HOLD_EFFECT_ABILITY_SHIELD) { RecordItemEffectBattle(gBattlerTarget, HOLD_EFFECT_ABILITY_SHIELD); - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { if (gMoveResultFlags & MOVE_RESULT_NO_EFFECT) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -13600,16 +14767,18 @@ static void Cmd_tryswapabilities(void) gBattleMons[gBattlerAttacker].ability = gBattleStruct->overwrittenAbilities[gBattlerAttacker] = gBattleMons[gBattlerTarget].ability; gBattleMons[gBattlerTarget].ability = gBattleStruct->overwrittenAbilities[gBattlerTarget] = abilityAtk; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } } static void Cmd_tryimprison(void) { + CMD_ARGS(const u8 *failInstr); + if ((gStatuses3[gBattlerAttacker] & STATUS3_IMPRISONED_OTHERS)) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -13637,38 +14806,42 @@ static void Cmd_tryimprison(void) if (attackerMoveId != MAX_MON_MOVES) { gStatuses3[gBattlerAttacker] |= STATUS3_IMPRISONED_OTHERS; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; break; } } } if (battlerId == gBattlersCount) // In Generation 3 games, Imprison fails if the user doesn't share any moves with any of the foes. - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } static void Cmd_setstealthrock(void) { + CMD_ARGS(const u8 *failInstr); + u8 targetSide = GetBattlerSide(gBattlerTarget); if (gSideStatuses[targetSide] & SIDE_STATUS_STEALTH_ROCK) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { gSideStatuses[targetSide] |= SIDE_STATUS_STEALTH_ROCK; gSideTimers[targetSide].stealthRockAmount = 1; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_setuserstatus3(void) { - u32 flags = T1_READ_32(gBattlescriptCurrInstr + 1); + CMD_ARGS(u32 flags, const u8 *failInstr); + + u32 flags = cmd->flags; if (gStatuses3[gBattlerAttacker] & flags) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 5); + gBattlescriptCurrInstr = cmd->failInstr; } else { @@ -13677,83 +14850,93 @@ static void Cmd_setuserstatus3(void) gDisableStructs[gBattlerAttacker].magnetRiseTimer = 5; if (flags & STATUS3_LASER_FOCUS) gDisableStructs[gBattlerAttacker].laserFocusTimer = 2; - gBattlescriptCurrInstr += 9; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_assistattackselect(void) { + CMD_ARGS(const u8 *failInstr); + s32 chooseableMovesNo = 0; struct Pokemon *party; s32 monId, moveId; - u16 *validMoves = gBattleStruct->assistPossibleMoves; + u16 *validMoves = Alloc(sizeof(u16) * PARTY_SIZE * MAX_MON_MOVES); - if (GET_BATTLER_SIDE(gBattlerAttacker) != B_SIDE_PLAYER) - party = gEnemyParty; - else - party = gPlayerParty; - - for (monId = 0; monId < PARTY_SIZE; monId++) + if (validMoves != NULL) { - if (monId == gBattlerPartyIndexes[gBattlerAttacker]) - continue; - if (GetMonData(&party[monId], MON_DATA_SPECIES2) == SPECIES_NONE) - continue; - if (GetMonData(&party[monId], MON_DATA_SPECIES2) == SPECIES_EGG) - continue; + if (GET_BATTLER_SIDE(gBattlerAttacker) != B_SIDE_PLAYER) + party = gEnemyParty; + else + party = gPlayerParty; - for (moveId = 0; moveId < MAX_MON_MOVES; moveId++) + for (monId = 0; monId < PARTY_SIZE; monId++) { - s32 i = 0; - u16 move = GetMonData(&party[monId], MON_DATA_MOVE1 + moveId); - - if (sForbiddenMoves[move] & FORBIDDEN_ASSIST) + if (monId == gBattlerPartyIndexes[gBattlerAttacker]) + continue; + if (GetMonData(&party[monId], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE) + continue; + if (GetMonData(&party[monId], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) continue; - validMoves[chooseableMovesNo] = move; - chooseableMovesNo++; + for (moveId = 0; moveId < MAX_MON_MOVES; moveId++) + { + u16 move = GetMonData(&party[monId], MON_DATA_MOVE1 + moveId); + + if (sForbiddenMoves[move] & FORBIDDEN_ASSIST) + continue; + + validMoves[chooseableMovesNo++] = move; + } } } + if (chooseableMovesNo) { gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; - gCalledMove = validMoves[((Random() & 0xFF) * chooseableMovesNo) >> 8]; + gCalledMove = validMoves[Random() % chooseableMovesNo]; gBattlerTarget = GetMoveTarget(gCalledMove, NO_TARGET_OVERRIDE); - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } + + TRY_FREE_AND_SET_NULL(validMoves); } static void Cmd_trysetmagiccoat(void) { + CMD_ARGS(const u8 *failInstr); + gBattlerTarget = gBattlerAttacker; gSpecialStatuses[gBattlerAttacker].ppNotAffectedByPressure = TRUE; if (gCurrentTurnActionNumber == gBattlersCount - 1) // moves last turn { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { gProtectStructs[gBattlerAttacker].bounceMove = TRUE; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } // Snatch static void Cmd_trysetsnatch(void) { + CMD_ARGS(const u8 *failInstr); + gSpecialStatuses[gBattlerAttacker].ppNotAffectedByPressure = TRUE; if (gCurrentTurnActionNumber == gBattlersCount - 1) // moves last turn { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { gProtectStructs[gBattlerAttacker].stealMove = TRUE; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } @@ -13763,7 +14946,9 @@ static void Cmd_unused2(void) static void Cmd_switchoutabilities(void) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + CMD_ARGS(u8 battler); + + gActiveBattler = GetBattlerForBattleScript(cmd->battler); if (gBattleMons[gActiveBattler].ability == ABILITY_NEUTRALIZING_GAS) { gBattleMons[gActiveBattler].ability = ABILITY_NONE; @@ -13795,24 +14980,28 @@ static void Cmd_switchoutabilities(void) break; } - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_jumpifhasnohp(void) { - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); + CMD_ARGS(u8 battler, const u8 *jumpInstr); + + gActiveBattler = GetBattlerForBattleScript(cmd->battler); if (gBattleMons[gActiveBattler].hp == 0) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 2); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 6; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_getsecretpowereffect(void) { + CMD_ARGS(); + gBattleScripting.moveEffect = GetSecretPowerMoveEffect(); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } u16 GetSecretPowerMoveEffect(void) @@ -13909,55 +15098,20 @@ u16 GetSecretPowerMoveEffect(void) static void Cmd_pickup(void) { - s32 i; - u16 species, heldItem; - u16 ability; + CMD_ARGS(); + + u32 i, j; + u16 species, heldItem, ability; u8 lvlDivBy10; - if (InBattlePike()) - { - - } - else if (InBattlePyramid()) + if (!InBattlePike()) // No items in Battle Pike. { + bool32 isInPyramid = InBattlePyramid_(); for (i = 0; i < PARTY_SIZE; i++) { - species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); - - ability = gSpeciesInfo[species].abilities[GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM)]; - - if (ability == ABILITY_PICKUP - && species != SPECIES_NONE - && species != SPECIES_EGG - && heldItem == ITEM_NONE - && (Random() % 10) == 0) - { - heldItem = GetBattlePyramidPickupItemId(); - SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &heldItem); - } - #if (defined ITEM_HONEY) - else if (ability == ABILITY_HONEY_GATHER - && species != 0 - && species != SPECIES_EGG - && heldItem == ITEM_NONE) - { - if ((lvlDivBy10 + 1 ) * 5 > Random() % 100) - { - heldItem = ITEM_HONEY; - SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &heldItem); - } - } - #endif - } - } - else - { - for (i = 0; i < PARTY_SIZE; i++) - { - species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); - heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); - lvlDivBy10 = (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL)-1) / 10; //Moving this here makes it easier to add in abilities like Honey Gather + lvlDivBy10 = (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL)-1) / 10; //Moving this here makes it easier to add in abilities like Honey Gather. if (lvlDivBy10 > 9) lvlDivBy10 = 9; @@ -13969,24 +15123,30 @@ static void Cmd_pickup(void) && heldItem == ITEM_NONE && (Random() % 10) == 0) { - s32 j; - s32 rand = Random() % 100; - - for (j = 0; j < (int)ARRAY_COUNT(sPickupProbabilities); j++) + if (isInPyramid) { - if (sPickupProbabilities[j] > rand) + heldItem = GetBattlePyramidPickupItemId(); + SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &heldItem); + } + else + { + u32 rand = Random() % 100; + + for (j = 0; j < ARRAY_COUNT(sPickupProbabilities); j++) { - SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &sPickupItems[lvlDivBy10 + j]); - break; - } - else if (rand == 99 || rand == 98) - { - SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &sRarePickupItems[lvlDivBy10 + (99 - rand)]); - break; + if (sPickupProbabilities[j] > rand) + { + SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &sPickupItems[lvlDivBy10 + j]); + break; + } + else if (rand == 99 || rand == 98) + { + SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &sRarePickupItems[lvlDivBy10 + (99 - rand)]); + break; + } } } } - #if (defined ITEM_HONEY) else if (ability == ABILITY_HONEY_GATHER && species != 0 && species != SPECIES_EGG @@ -13998,15 +15158,25 @@ static void Cmd_pickup(void) SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &heldItem); } } + #if P_SHUCKLE_BERRY_JUICE == TRUE + else if (species == SPECIES_SHUCKLE + && heldItem == ITEM_ORAN_BERRY + && (Random() % 16) == 0) + { + heldItem = ITEM_BERRY_JUICE; + SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &heldItem); + } #endif } } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_doweatherformchangeanimation(void) { + CMD_ARGS(); + gActiveBattler = gBattleScripting.battler; if (gBattleMons[gActiveBattler].status2 & STATUS2_SUBSTITUTE) @@ -14015,14 +15185,16 @@ static void Cmd_doweatherformchangeanimation(void) BtlController_EmitBattleAnimation(BUFFER_A, B_ANIM_CASTFORM_CHANGE, gBattleStruct->formToChangeInto); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_tryweatherformdatachange(void) { + CMD_ARGS(); + u8 form; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; form = TryWeatherFormChange(gBattleScripting.battler); if (form) { @@ -14034,6 +15206,8 @@ static void Cmd_tryweatherformdatachange(void) // Water and Mud Sport static void Cmd_settypebasedhalvers(void) { + CMD_ARGS(const u8 *failInstr); + bool8 worked = FALSE; if (gBattleMoves[gCurrentMove].effect == EFFECT_MUD_SPORT) @@ -14076,9 +15250,9 @@ static void Cmd_settypebasedhalvers(void) } if (worked) - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; else - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } bool32 DoesSubstituteBlockMove(u8 battlerAtk, u8 battlerDef, u32 move) @@ -14111,14 +15285,18 @@ bool32 DoesDisguiseBlockMove(u8 battlerAtk, u8 battlerDef, u32 move) static void Cmd_jumpifsubstituteblocks(void) { + CMD_ARGS(const u8 *jumpInstr); + if (DoesSubstituteBlockMove(gBattlerAttacker, gBattlerTarget, gCurrentMove)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_tryrecycleitem(void) { + CMD_ARGS(const u8 *failInstr); + u16 *usedHeldItem; gActiveBattler = gBattlerAttacker; @@ -14132,11 +15310,11 @@ static void Cmd_tryrecycleitem(void) BtlController_EmitSetMonData(BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].item), &gBattleMons[gActiveBattler].item); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } @@ -14149,6 +15327,8 @@ bool32 CanCamouflage(u8 battlerId) static void Cmd_settypetoterrain(void) { + CMD_ARGS(const u8 *failInstr); + u8 terrainType; switch(gFieldStatuses & STATUS_FIELD_TERRAIN_ANY) { @@ -14174,17 +15354,19 @@ static void Cmd_settypetoterrain(void) SET_BATTLER_TYPE(gBattlerAttacker, terrainType); PREPARE_TYPE_BUFFER(gBattleTextBuff1, terrainType); - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } // Unused static void Cmd_pursuitdoubles(void) { + CMD_ARGS(const u8 *failInstr); + gActiveBattler = GetBattlerAtPosition(BATTLE_PARTNER(GetBattlerPosition(gBattlerAttacker))); if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE @@ -14194,19 +15376,21 @@ static void Cmd_pursuitdoubles(void) { gActionsByTurnOrder[gActiveBattler] = B_ACTION_TRY_FINISH; gCurrentMove = MOVE_PURSUIT; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; gBattleScripting.animTurn = 1; gBattleScripting.savedBattler = gBattlerAttacker; gBattlerAttacker = gActiveBattler; } else { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } } static void Cmd_snatchsetbattlers(void) { + CMD_ARGS(); + gEffectBattler = gBattlerAttacker; if (gBattlerAttacker == gBattlerTarget) @@ -14215,12 +15399,14 @@ static void Cmd_snatchsetbattlers(void) gBattlerTarget = gBattleScripting.battler; gBattleScripting.battler = gEffectBattler; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } // Brick Break static void Cmd_removelightscreenreflect(void) { + CMD_ARGS(); + u8 side; bool32 failed; @@ -14257,7 +15443,7 @@ static void Cmd_removelightscreenreflect(void) gBattleScripting.animTargetsHit = 0; } - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } u8 GetCatchingBattler(void) @@ -14270,6 +15456,8 @@ u8 GetCatchingBattler(void) static void Cmd_handleballthrow(void) { + CMD_ARGS(); + u16 ballMultiplier = 100; s8 ballAddition = 0; @@ -14588,6 +15776,8 @@ static void Cmd_handleballthrow(void) static void Cmd_givecaughtmon(void) { + CMD_ARGS(); + if (GiveMonToPlayer(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]]) != MON_GIVEN_TO_PARTY) { if (!ShouldShowBoxWasFullMessage()) @@ -14613,27 +15803,31 @@ static void Cmd_givecaughtmon(void) GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_NICKNAME, gBattleResults.caughtMonNick); gBattleResults.caughtMonBall = GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_POKEBALL, NULL); - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_trysetcaughtmondexflags(void) { + CMD_ARGS(const u8 *failInstr); + u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_SPECIES, NULL); u32 personality = GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_PERSONALITY, NULL); if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_CAUGHT)) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { HandleSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_SET_CAUGHT, personality); - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_displaydexinfo(void) { + CMD_ARGS(); + u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_SPECIES, NULL); switch (gBattleCommunication[0]) @@ -14678,7 +15872,7 @@ static void Cmd_displaydexinfo(void) break; case 5: if (!gPaletteFade.active) - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; break; } } @@ -14751,6 +15945,8 @@ void BattleDestroyYesNoCursorAt(u8 cursorPosition) static void Cmd_trygivecaughtmonnick(void) { + CMD_ARGS(const u8 *successInstr); + switch (gBattleCommunication[MULTIUSE_STATE]) { case 0: @@ -14813,48 +16009,58 @@ static void Cmd_trygivecaughtmonnick(void) if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active) { SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_NICKNAME, gBattleStruct->caughtMonNick); - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->successInstr; } break; case 4: if (CalculatePlayerPartyCount() == PARTY_SIZE) - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; else - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->successInstr; break; } } static void Cmd_subattackerhpbydmg(void) { + CMD_ARGS(); + gBattleMons[gBattlerAttacker].hp -= gBattleMoveDamage; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_removeattackerstatus1(void) { + CMD_ARGS(); + gBattleMons[gBattlerAttacker].status1 = 0; - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_finishaction(void) { + CMD_ARGS(); + gCurrentActionFuncId = B_ACTION_FINISHED; } static void Cmd_finishturn(void) { + CMD_ARGS(); + gCurrentActionFuncId = B_ACTION_FINISHED; gCurrentTurnActionNumber = gBattlersCount; } static void Cmd_trainerslideout(void) { - gActiveBattler = GetBattlerAtPosition(gBattlescriptCurrInstr[1]); + CMD_ARGS(u8 position); + + gActiveBattler = GetBattlerAtPosition(cmd->position); BtlController_EmitTrainerSlideBack(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static const u16 sTelekinesisBanList[] = @@ -14882,54 +16088,62 @@ bool32 IsTelekinesisBannedSpecies(u16 species) static void Cmd_settelekinesis(void) { + CMD_ARGS(const u8 *failInstr); + if (gStatuses3[gBattlerTarget] & (STATUS3_TELEKINESIS | STATUS3_ROOTED | STATUS3_SMACKED_DOWN) || gFieldStatuses & STATUS_FIELD_GRAVITY || IsTelekinesisBannedSpecies(gBattleMons[gBattlerTarget].species)) { - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { gStatuses3[gBattlerTarget] |= STATUS3_TELEKINESIS; gDisableStructs[gBattlerTarget].telekinesisTimer = 3; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_swapstatstages(void) { - u8 statId = T1_READ_8(gBattlescriptCurrInstr + 1); - s8 atkStatStage = gBattleMons[gBattlerAttacker].statStages[statId]; - s8 defStatStage = gBattleMons[gBattlerTarget].statStages[statId]; + CMD_ARGS(u8 stat); - gBattleMons[gBattlerAttacker].statStages[statId] = defStatStage; - gBattleMons[gBattlerTarget].statStages[statId] = atkStatStage; + u8 stat = cmd->stat; + s8 atkStatStage = gBattleMons[gBattlerAttacker].statStages[stat]; + s8 defStatStage = gBattleMons[gBattlerTarget].statStages[stat]; - gBattlescriptCurrInstr += 2; + gBattleMons[gBattlerAttacker].statStages[stat] = defStatStage; + gBattleMons[gBattlerTarget].statStages[stat] = atkStatStage; + + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_averagestats(void) { - u8 statId = T1_READ_8(gBattlescriptCurrInstr + 1); - u16 atkStat = *(u16 *)((&gBattleMons[gBattlerAttacker].attack) + (statId - 1)); - u16 defStat = *(u16 *)((&gBattleMons[gBattlerTarget].attack) + (statId - 1)); + CMD_ARGS(u8 stat); + + u8 stat = cmd->stat; + u16 atkStat = *(u16 *)((&gBattleMons[gBattlerAttacker].attack) + (stat - 1)); + u16 defStat = *(u16 *)((&gBattleMons[gBattlerTarget].attack) + (stat - 1)); u16 average = (atkStat + defStat) / 2; - *(u16 *)((&gBattleMons[gBattlerAttacker].attack) + (statId - 1)) = average; - *(u16 *)((&gBattleMons[gBattlerTarget].attack) + (statId - 1)) = average; + *(u16 *)((&gBattleMons[gBattlerAttacker].attack) + (stat - 1)) = average; + *(u16 *)((&gBattleMons[gBattlerTarget].attack) + (stat - 1)) = average; - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_jumpifoppositegenders(void) { + CMD_ARGS(const u8 *jumpInstr); + u32 atkGender = GetGenderFromSpeciesAndPersonality(gBattleMons[gBattlerAttacker].species, gBattleMons[gBattlerAttacker].personality); u32 defGender = GetGenderFromSpeciesAndPersonality(gBattleMons[gBattlerTarget].species, gBattleMons[gBattlerTarget].personality); if ((atkGender == MON_MALE && defGender == MON_FEMALE) || (atkGender == MON_FEMALE && defGender == MON_MALE)) - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->jumpInstr; else - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } static void Cmd_unused(void) @@ -14938,32 +16152,38 @@ static void Cmd_unused(void) static void Cmd_tryworryseed(void) { + CMD_ARGS(const u8 *failInstr); + if (IsWorrySeedBannedAbility(gBattleMons[gBattlerTarget].ability)) { RecordAbilityBattle(gBattlerTarget, gBattleMons[gBattlerTarget].ability); gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else if (GetBattlerHoldEffect(gBattlerTarget, TRUE) == HOLD_EFFECT_ABILITY_SHIELD) { RecordItemEffectBattle(gBattlerTarget, HOLD_EFFECT_ABILITY_SHIELD); - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = cmd->failInstr; } else { gBattleMons[gBattlerTarget].ability = gBattleStruct->overwrittenAbilities[gBattlerTarget] = ABILITY_INSOMNIA; - gBattlescriptCurrInstr += 5; + gBattlescriptCurrInstr = cmd->nextInstr; } } static void Cmd_callnative(void) { - void (*func)() = (void *)T1_READ_PTR(gBattlescriptCurrInstr + 1); + CMD_ARGS(void (*func)(void)); + void (*func)(void) = cmd->func; func(); } // Callnative Funcs void BS_CalcMetalBurstDmg(void) { + NATIVE_ARGS(const u8 *failInstr); + u8 sideAttacker = GetBattlerSide(gBattlerAttacker); u8 sideTarget = 0; @@ -14978,7 +16198,7 @@ void BS_CalcMetalBurstDmg(void) else gBattlerTarget = gProtectStructs[gBattlerAttacker].physicalBattlerId; - gBattlescriptCurrInstr += 9; + gBattlescriptCurrInstr = cmd->nextInstr; } else if (gProtectStructs[gBattlerAttacker].specialDmg && sideAttacker != (sideTarget = GetBattlerSide(gProtectStructs[gBattlerAttacker].specialBattlerId)) @@ -14991,15 +16211,26 @@ void BS_CalcMetalBurstDmg(void) else gBattlerTarget = gProtectStructs[gBattlerAttacker].specialBattlerId; - gBattlescriptCurrInstr += 9; + gBattlescriptCurrInstr = cmd->nextInstr; } else { gSpecialStatuses[gBattlerAttacker].ppNotAffectedByPressure = TRUE; - gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 5); + gBattlescriptCurrInstr = cmd->failInstr; } } +void BS_JumpIfMoreThanHalfHP(void) +{ + NATIVE_ARGS(u8 battler, const u8 *jumpInstr); + + u8 battler = GetBattlerForBattleScript(cmd->battler); + if (gBattleMons[battler].hp > (gBattleMons[battler].maxHP + 1) / 2) + gBattlescriptCurrInstr = cmd->jumpInstr; + else + gBattlescriptCurrInstr = cmd->nextInstr; +} + void BS_JumpIfHoldEffect(void) { u8 battler = gBattlescriptCurrInstr[5]; @@ -15017,6 +16248,31 @@ void BS_JumpIfHoldEffect(void) } } +void BS_DoStockpileStatChangesWearOff(void) +{ + NATIVE_ARGS(u8 battler, const u8 *statChangeInstr); + + u32 battler = GetBattlerForBattleScript(cmd->battler); + if (gDisableStructs[battler].stockpileDef != 0) + { + SET_STATCHANGER(STAT_DEF, abs(gDisableStructs[battler].stockpileDef), TRUE); + gDisableStructs[battler].stockpileDef = 0; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = cmd->statChangeInstr; + } + else if (gDisableStructs[battler].stockpileSpDef) + { + SET_STATCHANGER(STAT_SPDEF, abs(gDisableStructs[battler].stockpileSpDef), TRUE); + gDisableStructs[battler].stockpileSpDef = 0; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = cmd->statChangeInstr; + } + else + { + gBattlescriptCurrInstr = cmd->nextInstr; + } +} + static bool32 CriticalCapture(u32 odds) { #if B_CRITICAL_CAPTURE == TRUE @@ -15035,10 +16291,8 @@ static bool32 CriticalCapture(u32 odds) else odds = (odds * 250) / 100; - #ifdef ITEM_CATCHING_CHARM if (CheckBagHasItem(ITEM_CATCHING_CHARM, 1)) odds = (odds * (100 + B_CATCHING_CHARM_BOOST)) / 100; - #endif odds /= 6; if ((Random() % 255) < odds) @@ -15090,3 +16344,232 @@ static bool8 IsFinalStrikeEffect(u16 move) } return FALSE; } + +static void TryUpdateRoundTurnOrder(void) +{ + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + { + u32 i; + u32 j = 0; + u32 k = 0; + u32 currRounder; + u8 roundUsers[3] = {0xFF, 0xFF, 0xFF}; + u8 nonRoundUsers[3] = {0xFF, 0xFF, 0xFF}; + for (i = 0; i < gBattlersCount; i++) + { + if (gBattlerByTurnOrder[i] == gBattlerAttacker) + { + currRounder = i + 1; // Current battler going after attacker + break; + } + } + + // Get battlers after us using round + for (i = currRounder; i < gBattlersCount; i++) + { + if (gChosenMoveByBattler[gBattlerByTurnOrder[i]] == MOVE_ROUND) + roundUsers[j++] = gBattlerByTurnOrder[i]; + else + nonRoundUsers[k++] = gBattlerByTurnOrder[i]; + } + + // update turn order for round users + for (i = 0; roundUsers[i] != 0xFF && i < 3; i++) + { + gBattlerByTurnOrder[currRounder] = roundUsers[i]; + gActionsByTurnOrder[currRounder] = gActionsByTurnOrder[roundUsers[i]]; + gProtectStructs[roundUsers[i]].quash = TRUE; // Make it so their turn order can't be changed again + currRounder++; + } + + // Update turn order for non-round users + for (i = 0; nonRoundUsers[i] != 0xFF && i < 3; i++) + { + gBattlerByTurnOrder[currRounder] = nonRoundUsers[i]; + gActionsByTurnOrder[currRounder] = gActionsByTurnOrder[nonRoundUsers[i]]; + currRounder++; + } + } +} + +u8 GetFirstFaintedPartyIndex(u8 battlerId) +{ + u32 i; + u32 start = 0; + u32 end = PARTY_SIZE; + struct Pokemon *party = (GetBattlerSide(battlerId) == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + + // Check whether partner is separate trainer. + if ((GetBattlerSide(battlerId) == B_SIDE_PLAYER && gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) + || (GetBattlerSide(battlerId) == B_SIDE_OPPONENT && gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)) + { + if (GetBattlerPosition(battlerId) == B_POSITION_OPPONENT_LEFT + || GetBattlerPosition(battlerId) == B_POSITION_PLAYER_LEFT) + { + end = PARTY_SIZE / 2; + } + else + { + start = PARTY_SIZE / 2; + } + } + + // Loop through to find fainted battler. + for (i = start; i < end; ++i) + { + u32 species = GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG); + if (species != SPECIES_NONE + && species != SPECIES_EGG + && GetMonData(&party[i], MON_DATA_HP) == 0) + { + return i; + } + } + + // Returns PARTY_SIZE if none found. + return PARTY_SIZE; +} + +void BS_ItemRestoreHP(void) { + NATIVE_ARGS(); + u16 healAmount; + u32 battlerId = MAX_BATTLERS_COUNT; + u32 healParam = GetItemEffect(gLastUsedItem)[6]; + u32 side = GetBattlerSide(gBattlerAttacker); + struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + u16 hp = GetMonData(&party[gBattleStruct->itemPartyIndex[gBattlerAttacker]], MON_DATA_HP); + u16 maxHP = GetMonData(&party[gBattleStruct->itemPartyIndex[gBattlerAttacker]], MON_DATA_MAX_HP); + gBattleCommunication[MULTIUSE_STATE] = 0; + + // Track the number of Revives used in a battle. + if (hp == 0 && side == B_SIDE_PLAYER && gBattleResults.numRevivesUsed < 255) + gBattleResults.numRevivesUsed++; + + // Check if the recipient is an active battler. + if (gBattleStruct->itemPartyIndex[gBattlerAttacker] == gBattlerPartyIndexes[gBattlerAttacker]) + battlerId = gBattlerAttacker; + else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE + && gBattleStruct->itemPartyIndex[gBattlerAttacker] == gBattlerPartyIndexes[BATTLE_PARTNER(gBattlerAttacker)]) + battlerId = BATTLE_PARTNER(gBattlerAttacker); + + // Get amount to heal. + switch (healParam) + { + case ITEM6_HEAL_HP_FULL: + healAmount = maxHP; + break; + case ITEM6_HEAL_HP_HALF: + healAmount = maxHP / 2; + break; + case ITEM6_HEAL_HP_QUARTER: + healAmount = maxHP / 4; + break; + default: + healAmount = healParam; + break; + } + if (hp + healAmount > maxHP) + healAmount = maxHP - hp; + + // Heal is applied as move damage if battler is active. + if (battlerId != MAX_BATTLERS_COUNT && hp != 0) + { + gBattleMoveDamage = -healAmount; + } + else + { + hp += healAmount; + SetMonData(&party[gBattleStruct->itemPartyIndex[gBattlerAttacker]], MON_DATA_HP, &hp); + + // Revived battlers on the field need to be brought back. + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && battlerId != MAX_BATTLERS_COUNT) + { + gAbsentBattlerFlags &= ~gBitTable[battlerId]; + gBattleCommunication[MULTIUSE_STATE] = TRUE; + } + } + PREPARE_SPECIES_BUFFER(gBattleTextBuff1, GetMonData(&party[gBattleStruct->itemPartyIndex[gBattlerAttacker]], MON_DATA_SPECIES)); + gBattlescriptCurrInstr = cmd->nextInstr; +} + +void BS_ItemCureStatus(void) { + NATIVE_ARGS(); + struct Pokemon *party = (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + + // Heal Status1 conditions. + HealStatusConditions(&party[gBattleStruct->itemPartyIndex[gBattlerAttacker]], gBattleStruct->itemPartyIndex[gBattlerAttacker], GetItemStatus1Mask(gLastUsedItem), gBattlerAttacker); + + // Heal Status2 conditions if battler is active. + if (gBattleStruct->itemPartyIndex[gBattlerAttacker] == gBattlerPartyIndexes[gBattlerAttacker]) + { + gBattleMons[gBattlerAttacker].status2 &= ~GetItemStatus2Mask(gLastUsedItem); + } + else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE + && gBattleStruct->itemPartyIndex[gBattlerAttacker] == gBattlerPartyIndexes[BATTLE_PARTNER(gBattlerAttacker)]) + { + gBattleMons[gBattlerAttacker].status2 &= ~GetItemStatus2Mask(gLastUsedItem); + gBattlerTarget = BATTLE_PARTNER(gBattlerAttacker); + } + + if (GetItemStatus1Mask(gLastUsedItem) & STATUS1_SLEEP) + gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_NIGHTMARE; + + PREPARE_SPECIES_BUFFER(gBattleTextBuff1, GetMonData(&party[gBattleStruct->itemPartyIndex[gBattlerAttacker]], MON_DATA_SPECIES)); + gBattlescriptCurrInstr = cmd->nextInstr; +} + +void BS_ItemIncreaseStat(void) { + NATIVE_ARGS(); + u16 statId = GetItemEffect(gLastUsedItem)[1]; + u16 stages = ItemId_GetHoldEffectParam(gLastUsedItem); + SET_STATCHANGER(statId, stages, FALSE); + gBattlescriptCurrInstr = cmd->nextInstr; +} + +void BS_ItemRestorePP(void) { + NATIVE_ARGS(); + const u8 *effect = GetItemEffect(gLastUsedItem); + u32 i, pp, maxPP, moveId; + u32 loopEnd = MAX_MON_MOVES; + u32 battlerId = MAX_BATTLERS_COUNT; + struct Pokemon *mon = (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) ? &gPlayerParty[gBattleStruct->itemPartyIndex[gBattlerAttacker]] : &gEnemyParty[gBattleStruct->itemPartyIndex[gBattlerAttacker]]; + + // Check whether to apply to all moves. + if (effect[4] & ITEM4_HEAL_PP_ONE) + { + i = gChosenMovePos; + loopEnd = gChosenMovePos + 1; + } + + // Check if the recipient is an active battler. + if (gBattleStruct->itemPartyIndex[gBattlerAttacker] == gBattlerPartyIndexes[gBattlerAttacker]) + battlerId = gBattlerAttacker; + else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE + && gBattleStruct->itemPartyIndex[gBattlerAttacker] == gBattlerPartyIndexes[BATTLE_PARTNER(gBattlerAttacker)]) + battlerId = BATTLE_PARTNER(gBattlerAttacker); + + // Heal PP! + for (i = 0; i < loopEnd; i++) + { + pp = GetMonData(mon, MON_DATA_PP1 + i, NULL); + moveId = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); + maxPP = CalculatePPWithBonus(moveId, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), i); + if (pp != maxPP) + { + pp += effect[6]; + if (pp > maxPP) + pp = maxPP; + SetMonData(mon, MON_DATA_PP1 + i, &pp); + + // Update battler PP if needed. + if (battlerId != MAX_BATTLERS_COUNT + && gBattleStruct->itemPartyIndex[gBattlerAttacker] == gBattlerPartyIndexes[battlerId] + && MOVE_IS_PERMANENT(battlerId, i)) + { + gBattleMons[battlerId].pp[i] = pp; + } + } + } + PREPARE_SPECIES_BUFFER(gBattleTextBuff1, GetMonData(mon, MON_DATA_SPECIES)); + gBattlescriptCurrInstr = cmd->nextInstr; +} diff --git a/src/battle_setup.c b/src/battle_setup.c index b0b068ef39..2b8e63e766 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -741,7 +741,7 @@ static u16 GetSumOfPlayerPartyLevel(u8 numMons) for (i = 0; i < PARTY_SIZE; i++) { - u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_EGG && species != SPECIES_NONE && GetMonData(&gPlayerParty[i], MON_DATA_HP) != 0) { @@ -798,6 +798,14 @@ static u8 GetSumOfEnemyPartyLevel(u16 opponentId, u8 numMons) sum += party[i].lvl; } break; + case F_TRAINER_PARTY_EVERYTHING_CUSTOMIZED: + { + const struct TrainerMonCustomized *party; + party = gTrainers[opponentId].party.EverythingCustomized; + for (i = 0; i < count; i++) + sum += party[i].lvl; + } + break; } return sum; diff --git a/src/battle_tower.c b/src/battle_tower.c index f66c8c1f7a..4e16467f04 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -23,6 +23,7 @@ #include "field_message_box.h" #include "tv.h" #include "battle_factory.h" +#include "constants/abilities.h" #include "constants/apprentice.h" #include "constants/battle_dome.h" #include "constants/battle_frontier.h" @@ -3007,6 +3008,7 @@ static void FillPartnerParty(u16 trainerId) u16 monId; u32 otID; u8 trainerName[(PLAYER_NAME_LENGTH * 3) + 1]; + s32 ball = -1; SetFacilityPtrsGetLevel(); if (trainerId == TRAINER_STEVEN_PARTNER) @@ -3098,6 +3100,66 @@ static void FillPartnerParty(u16 trainerId) } break; } + case F_TRAINER_PARTY_EVERYTHING_CUSTOMIZED: + { + const struct TrainerMonCustomized *partyData = gTrainers[trainerId - TRAINER_CUSTOM_PARTNER].party.EverythingCustomized; + u32 otIdType = OT_ID_RANDOM_NO_SHINY; + + if (partyData[i].gender == TRAINER_MON_MALE) + j = (j & 0xFFFFFF00) | GeneratePersonalityForGender(MON_MALE, partyData[i].species); + else if (partyData[i].gender == TRAINER_MON_FEMALE) + j = (j & 0xFFFFFF00) | GeneratePersonalityForGender(MON_FEMALE, partyData[i].species); + if (partyData[i].nature != 0) + ModifyPersonalityForNature(&j, partyData[i].nature - 1); + if (partyData[i].isShiny) + { + otIdType = OT_ID_PRESET; + otID = HIHALF(j) ^ LOHALF(j); + } + + 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); + + // 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) + { + SetMonData(&gPlayerParty[i+3], MON_DATA_HP_EV, &(partyData[i].ev[0])); + SetMonData(&gPlayerParty[i+3], MON_DATA_ATK_EV, &(partyData[i].ev[1])); + SetMonData(&gPlayerParty[i+3], MON_DATA_DEF_EV, &(partyData[i].ev[2])); + SetMonData(&gPlayerParty[i+3], MON_DATA_SPATK_EV, &(partyData[i].ev[3])); + SetMonData(&gPlayerParty[i+3], MON_DATA_SPDEF_EV, &(partyData[i].ev[4])); + SetMonData(&gPlayerParty[i+3], MON_DATA_SPEED_EV, &(partyData[i].ev[5])); + } + if (partyData[i].ability != ABILITY_NONE) + { + const struct SpeciesInfo *speciesInfo = &gSpeciesInfo[partyData[i].species]; + u32 maxAbilities = ARRAY_COUNT(speciesInfo->abilities); + for (j = 0; j < maxAbilities; ++j) + { + if (speciesInfo->abilities[j] == partyData[i].ability) + break; + } + if (j < maxAbilities) + SetMonData(&gPlayerParty[i+3], MON_DATA_ABILITY_NUM, &j); + } + SetMonData(&gPlayerParty[i+3], MON_DATA_FRIENDSHIP, &(partyData[i].friendship)); + if (partyData[i].ball != ITEM_NONE) + { + ball = partyData[i].ball; + SetMonData(&gPlayerParty[i+3], MON_DATA_POKEBALL, &ball); + } + if (partyData[i].nickname != NULL) + { + SetMonData(&gPlayerParty[i+3], MON_DATA_NICKNAME, partyData[i].nickname); + } + CalculateMonStats(&gPlayerParty[i+3]); + } } StringCopy(trainerName, gTrainers[trainerId - TRAINER_CUSTOM_PARTNER].trainerName); @@ -3381,7 +3443,7 @@ s32 GetHighestLevelInPlayerParty(void) for (i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL) - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG) + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_EGG) { s32 level = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL, NULL); if (level > highestLevel) diff --git a/src/battle_util.c b/src/battle_util.c index c515851858..e057b78dc3 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -7,6 +7,7 @@ #include "battle_controllers.h" #include "battle_interface.h" #include "battle_setup.h" +#include "battle_z_move.h" #include "party_menu.h" #include "pokemon.h" #include "international_string_util.h" @@ -20,6 +21,7 @@ #include "sprite.h" #include "string_util.h" #include "task.h" +#include "test_runner.h" #include "trig.h" #include "window.h" #include "battle_message.h" @@ -61,6 +63,7 @@ static u8 GetFlingPowerFromItemId(u16 itemId); static void SetRandomMultiHitCounter(); static u32 GetBattlerItemHoldEffectParam(u8 battlerId, u16 item); static u16 GetInverseTypeMultiplier(u16 multiplier); +static u16 GetSupremeOverlordModifier(u8 battlerId); extern const u8 *const gBattleScriptsForMoveEffects[]; extern const u8 *const gBattlescriptsForRunningByItem[]; @@ -259,7 +262,7 @@ bool32 IsAffectedByFollowMe(u32 battlerAtk, u32 defSide, u32 move) void HandleAction_UseMove(void) { u32 i, side, moveType, var = 4; - u16 moveTarget = GetBattlerMoveTargetType(gBattlerAttacker, gCurrentMove); + u16 moveTarget; gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber]; if (gBattleStruct->absentBattlerFlags & gBitTable[gBattlerAttacker] || !IsBattlerAlive(gBattlerAttacker)) @@ -324,6 +327,8 @@ void HandleAction_UseMove(void) gCurrentMove = gBattleStruct->zmove.toBeUsed[gBattlerAttacker]; } + moveTarget = GetBattlerMoveTargetType(gBattlerAttacker, gCurrentMove); + if (gBattleMons[gBattlerAttacker].hp != 0) { if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) @@ -346,7 +351,7 @@ void HandleAction_UseMove(void) } else if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gSideTimers[side].followmeTimer == 0 - && (gBattleMoves[gCurrentMove].power != 0 || moveTarget != MOVE_TARGET_USER) + && (gBattleMoves[gCurrentMove].power != 0 || (moveTarget != MOVE_TARGET_USER && moveTarget != MOVE_TARGET_ALL_BATTLERS)) && ((GetBattlerAbility(*(gBattleStruct->moveTarget + gBattlerAttacker)) != ABILITY_LIGHTNING_ROD && moveType == TYPE_ELECTRIC) || (GetBattlerAbility(*(gBattleStruct->moveTarget + gBattlerAttacker)) != ABILITY_STORM_DRAIN && moveType == TYPE_WATER))) { @@ -546,93 +551,13 @@ void HandleAction_Switch(void) void HandleAction_UseItem(void) { - gBattlerAttacker = gBattlerTarget = gBattlerByTurnOrder[gCurrentTurnActionNumber]; + gActiveBattler = gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber]; gBattle_BG0_X = 0; gBattle_BG0_Y = 0; ClearFuryCutterDestinyBondGrudge(gBattlerAttacker); gLastUsedItem = gBattleResources->bufferB[gBattlerAttacker][1] | (gBattleResources->bufferB[gBattlerAttacker][2] << 8); - - if (gLastUsedItem <= LAST_BALL) // is ball - { - gBattlescriptCurrInstr = BattleScript_BallThrow; - } - else if (gLastUsedItem == ITEM_POKE_DOLL || gLastUsedItem == ITEM_FLUFFY_TAIL) - { - gBattlescriptCurrInstr = gBattlescriptsForRunningByItem[0]; // BattleScript_RunByUsingItem - } - else if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) - { - gBattlescriptCurrInstr = gBattlescriptsForUsingItem[0]; // BattleScript_PlayerUsesItem - } - else - { - gBattleScripting.battler = gBattlerAttacker; - - switch (*(gBattleStruct->AI_itemType + (gBattlerAttacker >> 1))) - { - case AI_ITEM_FULL_RESTORE: - case AI_ITEM_HEAL_HP: - break; - case AI_ITEM_CURE_CONDITION: - gBattleCommunication[MULTISTRING_CHOOSER] = AI_HEAL_CONFUSION; - if (*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & (1 << AI_HEAL_CONFUSION)) - { - if (*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & 0x3E) - gBattleCommunication[MULTISTRING_CHOOSER] = AI_HEAL_SLEEP; - } - else - { - // Check for other statuses, stopping at first (shouldn't be more than one) - while (!(*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & 1)) - { - *(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) >>= 1; - gBattleCommunication[MULTISTRING_CHOOSER]++; - // MULTISTRING_CHOOSER will be either AI_HEAL_PARALYSIS, AI_HEAL_FREEZE, - // AI_HEAL_BURN, AI_HEAL_POISON, or AI_HEAL_SLEEP - } - } - break; - case AI_ITEM_X_STAT: - gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STAT_ROSE_ITEM; - if (*(gBattleStruct->AI_itemFlags + (gBattlerAttacker >> 1)) & (1 << AI_DIRE_HIT)) - { - gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_USED_DIRE_HIT; - } - else - { - PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_ATK) - PREPARE_STRING_BUFFER(gBattleTextBuff2, CHAR_X) - - while (!((*(gBattleStruct->AI_itemFlags + (gBattlerAttacker >> 1))) & 1)) - { - *(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) >>= 1; - gBattleTextBuff1[2]++; - } - - gBattleScripting.animArg1 = gBattleTextBuff1[2] + 14; - gBattleScripting.animArg2 = 0; - } - break; - case AI_ITEM_GUARD_SPEC: - // It seems probable that at some point there was a special message for - // an AI trainer using Guard Spec in a double battle. - // There isn't now however, and the assignment to 2 below goes out of - // bounds for gMistUsedStringIds and instead prints "{mon} is getting pumped" - // from the next table, gFocusEnergyUsedStringIds. - // In any case this isn't an issue in the retail version, as no trainers - // are ever given any Guard Spec to use. -#ifndef UBFIX - if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) - gBattleCommunication[MULTISTRING_CHOOSER] = 2; - else -#endif - gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_MIST; - break; - } - - gBattlescriptCurrInstr = gBattlescriptsForUsingItem[*(gBattleStruct->AI_itemType + gBattlerAttacker / 2)]; - } + gBattlescriptCurrInstr = gBattlescriptsForUsingItem[ItemId_GetBattleUsage(gLastUsedItem) - 1]; gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; } @@ -907,11 +832,10 @@ void HandleAction_NothingIsFainted(void) void HandleAction_ActionFinished(void) { #if B_RECALC_TURN_AFTER_ACTIONS >= GEN_8 - u8 i, j; - u8 battler1 = 0; - u8 battler2 = 0; + u32 i, j; + bool32 afterYouActive = gSpecialStatuses[gBattlerByTurnOrder[gCurrentTurnActionNumber + 1]].afterYou; #endif - *(gBattleStruct->monToSwitchIntoId + gBattlerByTurnOrder[gCurrentTurnActionNumber]) = PARTY_SIZE; + *(gBattleStruct->monToSwitchIntoId + gBattlerByTurnOrder[gCurrentTurnActionNumber]) = gSelectedMonPartyId = PARTY_SIZE; gCurrentTurnActionNumber++; gCurrentActionFuncId = gActionsByTurnOrder[gCurrentTurnActionNumber]; SpecialStatusesClear(); @@ -936,25 +860,33 @@ void HandleAction_ActionFinished(void) gBattleResources->battleScriptsStack->size = 0; #if B_RECALC_TURN_AFTER_ACTIONS >= GEN_8 - // i starts at `gCurrentTurnActionNumber` because we don't want to recalculate turn order for mon that have already - // taken action. It's been previously increased, which we want in order to not recalculate the turn of the mon that just finished its action - for (i = gCurrentTurnActionNumber; i < gBattlersCount - 1; i++) + if (!afterYouActive) { - for (j = i + 1; j < gBattlersCount; j++) + // i starts at `gCurrentTurnActionNumber` because we don't want to recalculate turn order for mon that have already + // taken action. It's been previously increased, which we want in order to not recalculate the turn of the mon that just finished its action + for (i = gCurrentTurnActionNumber; i < gBattlersCount - 1; i++) { - u8 battler1 = gBattlerByTurnOrder[i]; - u8 battler2 = gBattlerByTurnOrder[j]; - // We recalculate order only for action of the same priority. If any action other than switch/move has been taken, they should - // have been executed before. The only recalculation needed is for moves/switch. Mega evolution is handled in src/battle_main.c/TryChangeOrder - if((gActionsByTurnOrder[i] == B_ACTION_USE_MOVE && gActionsByTurnOrder[j] == B_ACTION_USE_MOVE)) + for (j = i + 1; j < gBattlersCount; j++) { - if (GetWhoStrikesFirst(battler1, battler2, FALSE)) - SwapTurnOrder(i, j); - } - else if ((gActionsByTurnOrder[i] == B_ACTION_SWITCH && gActionsByTurnOrder[j] == B_ACTION_SWITCH)) - { - if (GetWhoStrikesFirst(battler1, battler2, TRUE)) // If the actions chosen are switching, we recalc order but ignoring the moves - SwapTurnOrder(i, j); + u8 battler1 = gBattlerByTurnOrder[i]; + u8 battler2 = gBattlerByTurnOrder[j]; + + if (gProtectStructs[battler1].quash || gProtectStructs[battler2].quash + || gProtectStructs[battler1].shellTrap || gProtectStructs[battler2].shellTrap) + continue; + + // We recalculate order only for action of the same priority. If any action other than switch/move has been taken, they should + // have been executed before. The only recalculation needed is for moves/switch. Mega evolution is handled in src/battle_main.c/TryChangeOrder + if((gActionsByTurnOrder[i] == B_ACTION_USE_MOVE && gActionsByTurnOrder[j] == B_ACTION_USE_MOVE)) + { + if (GetWhoStrikesFirst(battler1, battler2, FALSE)) + SwapTurnOrder(i, j); + } + else if ((gActionsByTurnOrder[i] == B_ACTION_SWITCH && gActionsByTurnOrder[j] == B_ACTION_SWITCH)) + { + if (GetWhoStrikesFirst(battler1, battler2, TRUE)) // If the actions chosen are switching, we recalc order but ignoring the moves + SwapTurnOrder(i, j); + } } } } @@ -1279,6 +1211,9 @@ u8 GetBattlerForBattleScript(u8 caseId) case BS_ATTACKER: ret = gBattlerAttacker; break; + case BS_ATTACKER_PARTNER: + ret = BATTLE_PARTNER(gBattlerAttacker); + break; case BS_EFFECT_BATTLER: ret = gEffectBattler; break; @@ -1731,7 +1666,7 @@ u8 TrySetCantSelectMoveBattleScript(void) u32 holdEffect = GetBattlerHoldEffect(gActiveBattler, TRUE); u16 *choicedMove = &gBattleStruct->choicedMove[gActiveBattler]; - if (gDisableStructs[gActiveBattler].disabledMove == move && move != MOVE_NONE) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gActiveBattler].disabledMove == move && move != MOVE_NONE) { gBattleScripting.battler = gActiveBattler; gCurrentMove = move; @@ -1747,7 +1682,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (move == gLastMoves[gActiveBattler] && move != MOVE_STRUGGLE && (gBattleMons[gActiveBattler].status2 & STATUS2_TORMENT)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && move == gLastMoves[gActiveBattler] && move != MOVE_STRUGGLE && (gBattleMons[gActiveBattler].status2 & STATUS2_TORMENT)) { CancelMultiTurnMoves(gActiveBattler); if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -1762,7 +1697,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (!gBattleStruct->zmove.active && gDisableStructs[gActiveBattler].tauntTimer != 0 && IS_MOVE_STATUS(move)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gActiveBattler].tauntTimer != 0 && IS_MOVE_STATUS(move)) { gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -1777,7 +1712,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (!gBattleStruct->zmove.active && gDisableStructs[gActiveBattler].throatChopTimer != 0 && gBattleMoves[move].flags & FLAG_SOUND) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gActiveBattler].throatChopTimer != 0 && gBattleMoves[move].flags & FLAG_SOUND) { gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -1792,7 +1727,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (!gBattleStruct->zmove.active && GetImprisonedMovesCount(gActiveBattler, move)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && GetImprisonedMovesCount(gActiveBattler, move)) { gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -1807,7 +1742,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (!gBattleStruct->zmove.active && IsGravityPreventingMove(move)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && IsGravityPreventingMove(move)) { gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -1822,7 +1757,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (!gBattleStruct->zmove.active && IsHealBlockPreventingMove(gActiveBattler, move)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && IsHealBlockPreventingMove(gActiveBattler, move)) { gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -1837,7 +1772,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (!gBattleStruct->zmove.active && IsBelchPreventingMove(gActiveBattler, move)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && IsBelchPreventingMove(gActiveBattler, move)) { gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -2113,6 +2048,27 @@ enum ENDTURN_FIELD_COUNT, }; +static bool32 EndTurnTerrain(u32 terrainFlag, u32 stringTableId) +{ + if (gFieldStatuses & terrainFlag) + { + if (!(gFieldStatuses & STATUS_FIELD_TERRAIN_PERMANENT) && --gFieldTimers.terrainTimer == 0) + { + gFieldStatuses &= ~terrainFlag; + TryToRevertMimicry(); + if (!(terrainFlag & STATUS_FIELD_GRASSY_TERRAIN)) + { + gBattleCommunication[MULTISTRING_CHOOSER] = stringTableId; + BattleScriptExecute(BattleScript_TerrainEnds); + } + } + if (terrainFlag & STATUS_FIELD_GRASSY_TERRAIN) + BattleScriptExecute(BattleScript_GrassyTerrainHeals); + return TRUE; + } + return FALSE; +} + u8 DoFieldEndTurnEffects(void) { u8 effect = 0; @@ -2141,7 +2097,9 @@ u8 DoFieldEndTurnEffects(void) s32 j; for (j = i + 1; j < gBattlersCount; j++) { - if (GetWhoStrikesFirst(gBattlerByTurnOrder[i], gBattlerByTurnOrder[j], FALSE)) + if (!gProtectStructs[i].quash + && !gProtectStructs[j].quash + && GetWhoStrikesFirst(gBattlerByTurnOrder[i], gBattlerByTurnOrder[j], FALSE)) SwapTurnOrder(i, j); } } @@ -2462,50 +2420,19 @@ u8 DoFieldEndTurnEffects(void) gBattleStruct->turnCountersTracker++; break; case ENDTURN_ELECTRIC_TERRAIN: - if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN - && (!(gFieldStatuses & STATUS_FIELD_TERRAIN_PERMANENT) && --gFieldTimers.terrainTimer == 0)) - { - gFieldStatuses &= ~(STATUS_FIELD_ELECTRIC_TERRAIN | STATUS_FIELD_TERRAIN_PERMANENT); - TryToRevertMimicry(); - BattleScriptExecute(BattleScript_ElectricTerrainEnds); - effect++; - } + effect = EndTurnTerrain(STATUS_FIELD_ELECTRIC_TERRAIN, B_MSG_TERRAINENDS_ELECTRIC); gBattleStruct->turnCountersTracker++; break; case ENDTURN_MISTY_TERRAIN: - if (gFieldStatuses & STATUS_FIELD_MISTY_TERRAIN - && (!(gFieldStatuses & STATUS_FIELD_TERRAIN_PERMANENT) && --gFieldTimers.terrainTimer == 0)) - { - gFieldStatuses &= ~STATUS_FIELD_MISTY_TERRAIN; - TryToRevertMimicry(); - BattleScriptExecute(BattleScript_MistyTerrainEnds); - effect++; - } + effect = EndTurnTerrain(STATUS_FIELD_MISTY_TERRAIN, B_MSG_TERRAINENDS_MISTY); gBattleStruct->turnCountersTracker++; break; case ENDTURN_GRASSY_TERRAIN: - if (gFieldStatuses & STATUS_FIELD_GRASSY_TERRAIN) - { - if (!(gFieldStatuses & STATUS_FIELD_TERRAIN_PERMANENT) - && (gFieldTimers.terrainTimer == 0 || --gFieldTimers.terrainTimer == 0)) - { - gFieldStatuses &= ~STATUS_FIELD_GRASSY_TERRAIN; - TryToRevertMimicry(); - } - BattleScriptExecute(BattleScript_GrassyTerrainHeals); - effect++; - } + effect = EndTurnTerrain(STATUS_FIELD_GRASSY_TERRAIN, B_MSG_TERRAINENDS_GRASS); gBattleStruct->turnCountersTracker++; break; case ENDTURN_PSYCHIC_TERRAIN: - if (gFieldStatuses & STATUS_FIELD_PSYCHIC_TERRAIN - && (!(gFieldStatuses & STATUS_FIELD_TERRAIN_PERMANENT) && --gFieldTimers.terrainTimer == 0)) - { - gFieldStatuses &= ~STATUS_FIELD_PSYCHIC_TERRAIN; - TryToRevertMimicry(); - BattleScriptExecute(BattleScript_PsychicTerrainEnds); - effect++; - } + effect = EndTurnTerrain(STATUS_FIELD_PSYCHIC_TERRAIN, B_MSG_TERRAINENDS_PSYCHIC); gBattleStruct->turnCountersTracker++; break; case ENDTURN_WATER_SPORT: @@ -3288,7 +3215,7 @@ bool8 HandleWishPerishSongOnTurnEnd(void) return FALSE; } -#define FAINTED_ACTIONS_MAX_CASE 7 +#define FAINTED_ACTIONS_MAX_CASE 8 bool8 HandleFaintedMonActions(void) { @@ -3373,7 +3300,19 @@ bool8 HandleFaintedMonActions(void) else gBattleStruct->faintedActionsState = 4; break; - case 6: + case 6: // All battlers switch-in abilities happen here to prevent them happening against an empty field. + for (i = 0; i < gBattlersCount; i++) + { + if (gBattleStruct->switchInAbilityPostponed & gBitTable[i]) + { + if (DoSwitchInAbilitiesItems(i)) + return TRUE; + gBattleStruct->switchInAbilityPostponed &= ~(gBitTable[i]); + } + } + gBattleStruct->faintedActionsState++; + break; + case 7: if (ItemBattleEffects(ITEMEFFECT_NORMAL, 0, TRUE)) return TRUE; gBattleStruct->faintedActionsState++; @@ -3397,35 +3336,6 @@ void TryClearRageAndFuryCutter(void) } } -enum -{ - CANCELLER_FLAGS, - CANCELLER_SKY_DROP, - CANCELLER_ASLEEP, - CANCELLER_FROZEN, - CANCELLER_TRUANT, - CANCELLER_RECHARGE, - CANCELLER_FLINCH, - CANCELLER_DISABLED, - CANCELLER_GRAVITY, - CANCELLER_HEAL_BLOCKED, - CANCELLER_TAUNTED, - CANCELLER_IMPRISONED, - CANCELLER_CONFUSED, - CANCELLER_PARALYSED, - CANCELLER_IN_LOVE, - CANCELLER_BIDE, - CANCELLER_THAW, - CANCELLER_POWDER_MOVE, - CANCELLER_POWDER_STATUS, - CANCELLER_THROAT_CHOP, - CANCELLER_MULTIHIT_MOVES, - CANCELLER_Z_MOVES, - CANCELLER_END, - CANCELLER_PSYCHIC_TERRAIN, - CANCELLER_END2, -}; - u8 AtkCanceller_UnableToUseMove(void) { u8 effect = 0; @@ -3497,7 +3407,7 @@ u8 AtkCanceller_UnableToUseMove(void) case CANCELLER_FROZEN: // check being frozen if (gBattleMons[gBattlerAttacker].status1 & STATUS1_FREEZE && !(gBattleMoves[gCurrentMove].flags & FLAG_THAW_USER)) { - if (Random() % 5) + if (!RandomPercentage(RNG_FROZEN, 20)) { gBattlescriptCurrInstr = BattleScript_MoveUsedIsFrozen; gHitMarker |= HITMARKER_NO_ATTACKSTRING; @@ -3550,7 +3460,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->atkCancellerTracker++; break; case CANCELLER_DISABLED: // disabled move - if (gDisableStructs[gBattlerAttacker].disabledMove == gCurrentMove && gDisableStructs[gBattlerAttacker].disabledMove != MOVE_NONE) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gBattlerAttacker].disabledMove == gCurrentMove && gDisableStructs[gBattlerAttacker].disabledMove != MOVE_NONE) { gProtectStructs[gBattlerAttacker].usedDisabledMove = TRUE; gBattleScripting.battler = gBattlerAttacker; @@ -3562,7 +3472,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->atkCancellerTracker++; break; case CANCELLER_HEAL_BLOCKED: - if (gStatuses3[gBattlerAttacker] & STATUS3_HEAL_BLOCK && IsHealBlockPreventingMove(gBattlerAttacker, gCurrentMove)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gStatuses3[gBattlerAttacker] & STATUS3_HEAL_BLOCK && IsHealBlockPreventingMove(gBattlerAttacker, gCurrentMove)) { gProtectStructs[gBattlerAttacker].usedHealBlockedMove = TRUE; gBattleScripting.battler = gBattlerAttacker; @@ -3586,7 +3496,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->atkCancellerTracker++; break; case CANCELLER_TAUNTED: // taunt - if (gDisableStructs[gBattlerAttacker].tauntTimer && IS_MOVE_STATUS(gCurrentMove)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gBattlerAttacker].tauntTimer && IS_MOVE_STATUS(gCurrentMove)) { gProtectStructs[gBattlerAttacker].usedTauntedMove = TRUE; CancelMultiTurnMoves(gBattlerAttacker); @@ -3597,7 +3507,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->atkCancellerTracker++; break; case CANCELLER_IMPRISONED: // imprisoned - if (GetImprisonedMovesCount(gBattlerAttacker, gCurrentMove)) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && GetImprisonedMovesCount(gBattlerAttacker, gCurrentMove)) { gProtectStructs[gBattlerAttacker].usedImprisonedMove = TRUE; CancelMultiTurnMoves(gBattlerAttacker); @@ -3615,9 +3525,9 @@ u8 AtkCanceller_UnableToUseMove(void) { // confusion dmg #if B_CONFUSION_SELF_DMG_CHANCE >= GEN_7 - if (Random() % 3 == 0) + if (RandomWeighted(RNG_CONFUSION, 2, 1)) #else - if (Random() % 2 == 0) + if (RandomWeighted(RNG_CONFUSION, 1, 1)) #endif { gBattleCommunication[MULTISTRING_CHOOSER] = TRUE; @@ -3643,7 +3553,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->atkCancellerTracker++; break; case CANCELLER_PARALYSED: // paralysis - if ((gBattleMons[gBattlerAttacker].status1 & STATUS1_PARALYSIS) && (Random() % 4) == 0) + if ((gBattleMons[gBattlerAttacker].status1 & STATUS1_PARALYSIS) && !RandomPercentage(RNG_PARALYSIS, 75)) { gProtectStructs[gBattlerAttacker].prlzImmobility = TRUE; // This is removed in FRLG and Emerald for some reason @@ -3658,7 +3568,7 @@ u8 AtkCanceller_UnableToUseMove(void) if (gBattleMons[gBattlerAttacker].status2 & STATUS2_INFATUATION) { gBattleScripting.battler = CountTrailingZeroBits((gBattleMons[gBattlerAttacker].status2 & STATUS2_INFATUATION) >> 0x10); - if (Random() & 1) + if (!RandomPercentage(RNG_INFATUATION, 50)) { BattleScriptPushCursor(); } @@ -3740,7 +3650,10 @@ u8 AtkCanceller_UnableToUseMove(void) if (effect != 0) gBattlescriptCurrInstr = BattleScript_PowderMoveNoEffect; } - gBattleStruct->atkCancellerTracker++; + if (gProtectStructs[gBattlerAttacker].usesBouncedMove) // Edge case for bouncing a powder move against a grass type pokemon. + gBattleStruct->atkCancellerTracker = CANCELLER_END; + else + gBattleStruct->atkCancellerTracker++; break; case CANCELLER_POWDER_STATUS: if (gBattleMons[gBattlerAttacker].status2 & STATUS2_POWDER) @@ -3758,7 +3671,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->atkCancellerTracker++; break; case CANCELLER_THROAT_CHOP: - if (gDisableStructs[gBattlerAttacker].throatChopTimer && gBattleMoves[gCurrentMove].flags & FLAG_SOUND) + if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] == MOVE_NONE && gDisableStructs[gBattlerAttacker].throatChopTimer && gBattleMoves[gCurrentMove].flags & FLAG_SOUND) { gProtectStructs[gBattlerAttacker].usedThroatChopPreventedMove = TRUE; CancelMultiTurnMoves(gBattlerAttacker); @@ -3928,8 +3841,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) for (i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_HP) != 0 - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && i != partyIdBattlerOn1 && i != partyIdBattlerOn2 && i != *(gBattleStruct->monToSwitchIntoId + flankId) && i != playerId[gBattleStruct->monToSwitchIntoId]) break; @@ -3947,8 +3860,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) for (i = playerId * MULTI_PARTY_SIZE; i < playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_HP) != 0 - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG) + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) break; } return (i == playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE); @@ -3987,8 +3900,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) for (i = playerId * MULTI_PARTY_SIZE; i < playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_HP) != 0 - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG) + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) break; } return (i == playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE); @@ -4005,8 +3918,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) for (i = playerId; i < playerId + MULTI_PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_HP) != 0 - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG) + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) break; } return (i == playerId + 3); @@ -4034,8 +3947,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) for (i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_HP) != 0 - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && i != partyIdBattlerOn1 && i != partyIdBattlerOn2 && i != *(gBattleStruct->monToSwitchIntoId + flankId) && i != playerId[gBattleStruct->monToSwitchIntoId]) break; @@ -4335,6 +4248,28 @@ bool8 ChangeTypeBasedOnTerrain(u8 battlerId) return TRUE; } +// Supreme Overlord adds a damage boost for each fainted ally. +// The first ally adds a x1.2 boost, and subsequent allies add an extra x0.1 boost each. +static u16 GetSupremeOverlordModifier(u8 battlerId) +{ + u32 i; + u8 side = GetBattlerSide(battlerId); + struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + u16 modifier = UQ_4_12(1.0); + bool8 appliedFirstBoost = FALSE; + + for (i = 0; i < PARTY_SIZE; i++) + { + if (GetMonData(&party[i], MON_DATA_SPECIES) != SPECIES_NONE + && !GetMonData(&party[i], MON_DATA_IS_EGG) + && GetMonData(&party[i], MON_DATA_HP) == 0) + modifier += (!appliedFirstBoost) ? UQ_4_12(0.2) : UQ_4_12(0.1); + appliedFirstBoost = TRUE; + } + + return modifier; +} + u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 moveArg) { u8 effect = 0; @@ -4762,6 +4697,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move case ABILITY_INTIMIDATE: if (!gSpecialStatuses[battler].switchInAbilityDone) { + gBattlerAttacker = battler; gSpecialStatuses[battler].switchInAbilityDone = TRUE; SET_STATCHANGER(STAT_ATK, 1, TRUE); BattleScriptPushCursorAndCallback(BattleScript_IntimidateActivates); @@ -4882,6 +4818,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move if (!gSpecialStatuses[battler].switchInAbilityDone && CountUsablePartyMons(battler) < PARTY_SIZE) { gSpecialStatuses[battler].switchInAbilityDone = TRUE; + gBattleStruct->supremeOverlordModifier[battler] = GetSupremeOverlordModifier(battler); BattleScriptPushCursorAndCallback(BattleScript_SupremeOverlordActivates); effect++; } @@ -5636,7 +5573,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move && TARGET_TURN_DAMAGED && CanBePoisoned(gBattlerTarget, gBattlerAttacker) && IsMoveMakingContact(move, gBattlerAttacker) - && (Random() % 3) == 0) + && RandomWeighted(RNG_POISON_POINT, 2, 1)) { gBattleScripting.moveEffect = MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_POISON; PREPARE_ABILITY_BUFFER(gBattleTextBuff1, gLastUsedAbility); @@ -5654,7 +5591,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move && TARGET_TURN_DAMAGED && CanBeParalyzed(gBattlerAttacker) && IsMoveMakingContact(move, gBattlerAttacker) - && (Random() % 3) == 0) + && RandomWeighted(RNG_STATIC, 2, 1)) { gBattleScripting.moveEffect = MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_PARALYSIS; BattleScriptPushCursor(); @@ -5670,7 +5607,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move && (IsMoveMakingContact(move, gBattlerAttacker)) && TARGET_TURN_DAMAGED && CanBeBurned(gBattlerAttacker) - && (Random() % 3) == 0) + && RandomWeighted(RNG_FLAME_BODY, 2, 1)) { gBattleScripting.moveEffect = MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_BURN; BattleScriptPushCursor(); @@ -5686,7 +5623,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move && (IsMoveMakingContact(move, gBattlerAttacker)) && TARGET_TURN_DAMAGED && gBattleMons[gBattlerTarget].hp != 0 - && (Random() % 3) == 0 + && RandomWeighted(RNG_CUTE_CHARM, 2, 1) && GetBattlerAbility(gBattlerAttacker) != ABILITY_OBLIVIOUS && !IsAbilityOnSide(gBattlerAttacker, ABILITY_AROMA_VEIL) && GetGenderFromSpeciesAndPersonality(speciesAtk, pidAtk) != GetGenderFromSpeciesAndPersonality(speciesDef, pidDef) @@ -5906,7 +5843,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && gBattleMons[gBattlerTarget].hp != 0 && !gProtectStructs[gBattlerAttacker].confusionSelfDmg - && (Random() % 10) == 0 + && RandomWeighted(RNG_STENCH, 9, 1) && !IS_MOVE_STATUS(move) && !sMovesNotAffectedByStench[gCurrentMove]) { @@ -6537,8 +6474,8 @@ bool32 CanBeFrozen(u8 battlerId) bool32 CanBeConfused(u8 battlerId) { - if (GetBattlerAbility(gEffectBattler) == ABILITY_OWN_TEMPO - || gBattleMons[gEffectBattler].status2 & STATUS2_CONFUSION + if (GetBattlerAbility(battlerId) == ABILITY_OWN_TEMPO + || gBattleMons[battlerId].status2 & STATUS2_CONFUSION || IsBattlerTerrainAffected(battlerId, STATUS_FIELD_MISTY_TERRAIN)) return FALSE; return TRUE; @@ -7626,7 +7563,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) if (gBattleMoveDamage != 0 // Need to have done damage && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && TARGET_TURN_DAMAGED - && (Random() % 100) < atkHoldEffectParam + && RandomPercentage(RNG_HOLD_EFFECT_FLINCH, atkHoldEffectParam) && gBattleMoves[gCurrentMove].flags & FLAG_KINGS_ROCK_AFFECTED && gBattleMons[gBattlerTarget].hp) { @@ -8027,14 +7964,14 @@ u32 GetMoveTarget(u16 move, u8 setTarget) return targetBattler; } -static bool32 IsMonEventLegal(u8 battlerId) +static bool32 IsBattlerModernFatefulEncounter(u8 battlerId) { if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT) return TRUE; if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_DEOXYS && GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_MEW) return TRUE; - return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_EVENT_LEGAL, NULL); + return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MODERN_FATEFUL_ENCOUNTER, NULL); } u8 IsMonDisobedient(void) @@ -8049,7 +7986,7 @@ u8 IsMonDisobedient(void) if (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT) return 0; - if (IsMonEventLegal(gBattlerAttacker)) // only false if illegal Mew or Deoxys + if (IsBattlerModernFatefulEncounter(gBattlerAttacker)) // only false if illegal Mew or Deoxys { if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && GetBattlerPosition(gBattlerAttacker) == 2) return 0; @@ -8185,16 +8122,15 @@ u32 GetBattlerHoldEffect(u8 battlerId, bool32 checkNegating) return gBattleStruct->debugHoldEffects[battlerId]; else #endif - if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY) + if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER) return gEnigmaBerries[battlerId].holdEffect; else return ItemId_GetHoldEffect(gBattleMons[battlerId].item); } -// static u32 GetBattlerItemHoldEffectParam(u8 battlerId, u16 item) { - if (item == ITEM_ENIGMA_BERRY) + if (item == ITEM_ENIGMA_BERRY_E_READER) return gEnigmaBerries[battlerId].holdEffectParam; else return ItemId_GetHoldEffectParam(item); @@ -8202,7 +8138,7 @@ static u32 GetBattlerItemHoldEffectParam(u8 battlerId, u16 item) u32 GetBattlerHoldEffectParam(u8 battlerId) { - if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY) + if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER) return gEnigmaBerries[battlerId].holdEffectParam; else return ItemId_GetHoldEffectParam(gBattleMons[battlerId].item); @@ -8242,9 +8178,15 @@ bool32 IsBattlerProtected(u8 battlerId, u16 move) return FALSE; } - if (move == MOVE_TEATIME) + if (move == MOVE_TEATIME) { - return FALSE; + return FALSE; + } + + // Z-Moves and Max Moves bypass protection + if (gBattleStruct->zmove.active) + { + return FALSE; } // Protective Pads doesn't stop Unseen Fist from bypassing Protect effects, so IsMoveMakingContact() isn't used here. @@ -8525,7 +8467,7 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) u32 weight, hpFraction, speed; if (gBattleStruct->zmove.active) - return gBattleMoves[gBattleStruct->zmove.baseMoves[battlerAtk]].zMovePower; + return GetZMovePower(gBattleStruct->zmove.baseMoves[battlerAtk]); switch (gBattleMoves[move].effect) { @@ -8587,7 +8529,7 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) basePower *= 2; break; case EFFECT_PURSUIT: - if (gActionsByTurnOrder[GetBattlerTurnOrderNum(gBattlerTarget)] == B_ACTION_SWITCH) + if (gActionsByTurnOrder[GetBattlerTurnOrderNum(battlerDef)] == B_ACTION_SWITCH) basePower *= 2; break; case EFFECT_NATURAL_GIFT: @@ -8689,8 +8631,14 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) basePower *= 2; break; case EFFECT_ROUND: - if (gChosenMoveByBattler[BATTLE_PARTNER(battlerAtk)] == MOVE_ROUND && !(gAbsentBattlerFlags & gBitTable[BATTLE_PARTNER(battlerAtk)])) - basePower *= 2; + for (i = 0; i < gBattlersCount; i++) + { + if (i != battlerAtk && IsBattlerAlive(i) && gLastMoves[i] == MOVE_ROUND) + { + basePower *= 2; + break; + } + } break; case EFFECT_FUSION_COMBO: if (gBattleMoves[gLastUsedMove].effect == EFFECT_FUSION_COMBO && move != gLastUsedMove) @@ -8715,12 +8663,12 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) #if B_HIDDEN_POWER_DMG < GEN_6 u8 powerBits; - powerBits = ((gBattleMons[gBattlerAttacker].hpIV & 2) >> 1) - | ((gBattleMons[gBattlerAttacker].attackIV & 2) << 0) - | ((gBattleMons[gBattlerAttacker].defenseIV & 2) << 1) - | ((gBattleMons[gBattlerAttacker].speedIV & 2) << 2) - | ((gBattleMons[gBattlerAttacker].spAttackIV & 2) << 3) - | ((gBattleMons[gBattlerAttacker].spDefenseIV & 2) << 4); + powerBits = ((gBattleMons[battlerAtk].hpIV & 2) >> 1) + | ((gBattleMons[battlerAtk].attackIV & 2) << 0) + | ((gBattleMons[battlerAtk].defenseIV & 2) << 1) + | ((gBattleMons[battlerAtk].speedIV & 2) << 2) + | ((gBattleMons[battlerAtk].spAttackIV & 2) << 3) + | ((gBattleMons[battlerAtk].spDefenseIV & 2) << 4); basePower = (40 * powerBits) / 63 + 30; #endif @@ -8732,15 +8680,15 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) break; case EFFECT_TERRAIN_PULSE: if ((gFieldStatuses & STATUS_FIELD_TERRAIN_ANY) - && IsBattlerGrounded(gBattlerAttacker)) + && IsBattlerGrounded(battlerAtk)) basePower *= 2; break; case EFFECT_EXPANDING_FORCE: - if (IsBattlerTerrainAffected(gBattlerAttacker, STATUS_FIELD_PSYCHIC_TERRAIN)) + if (IsBattlerTerrainAffected(battlerAtk, STATUS_FIELD_PSYCHIC_TERRAIN)) MulModifier(&basePower, UQ_4_12(1.5)); break; case EFFECT_RISING_VOLTAGE: - if (IsBattlerTerrainAffected(gBattlerTarget, STATUS_FIELD_ELECTRIC_TERRAIN)) + if (IsBattlerTerrainAffected(battlerDef, STATUS_FIELD_ELECTRIC_TERRAIN)) basePower *= 2; break; case EFFECT_BEAT_UP: @@ -8748,6 +8696,10 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) basePower = CalcBeatUpPower(); #endif break; + case EFFECT_PSYBLADE: + if (IsBattlerTerrainAffected(battlerAtk, STATUS_FIELD_ELECTRIC_TERRAIN)) + MulModifier(&basePower, UQ_4_12(1.5)); + break; } // Move-specific base power changes @@ -8764,28 +8716,6 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) return basePower; } -// Supreme Overlord adds a damage boost for each fainted ally. -// The first ally adds a x1.2 boost, and subsequent allies add an extra x0.1 boost each. -static u16 GetSupremeOverlordModifier(u8 battlerId) -{ - u32 i; - u8 side = GetBattlerSide(battlerId); - struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; - u16 modifier = UQ_4_12(1.0); - bool8 appliedFirstBoost = FALSE; - - for (i = 0; i < PARTY_SIZE; i++) - { - if (GetMonData(&party[i], MON_DATA_SPECIES) != SPECIES_NONE - && !GetMonData(&party[i], MON_DATA_IS_EGG) - && GetMonData(&party[i], MON_DATA_HP) == 0) - modifier += (!appliedFirstBoost) ? UQ_4_12(0.2) : UQ_4_12(0.1); - appliedFirstBoost = TRUE; - } - - return modifier; -} - static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, bool32 updateFlags) { u32 i; @@ -8935,7 +8865,7 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe MulModifier(&modifier, UQ_4_12(1.5)); break; case ABILITY_SUPREME_OVERLORD: - MulModifier(&modifier, GetSupremeOverlordModifier(battlerAtk)); + MulModifier(&modifier, gBattleStruct->supremeOverlordModifier[battlerAtk]); break; } @@ -9113,6 +9043,7 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe if (gBattleMons[battlerDef].hp <= (gBattleMons[battlerDef].maxHP / 2)) MulModifier(&modifier, UQ_4_12(2.0)); break; + case EFFECT_BARB_BARRAGE: case EFFECT_VENOSHOCK: if (gBattleMons[battlerDef].status1 & STATUS1_PSN_ANY) MulModifier(&modifier, UQ_4_12(2.0)); @@ -9587,7 +9518,7 @@ static u32 CalcFinalDmg(u32 dmg, u16 move, u8 battlerAtk, u8 battlerDef, u8 move } else if (IsBattlerWeatherAffected(battlerAtk, B_WEATHER_SUN)) { - if (moveType == TYPE_FIRE) + 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); @@ -9608,7 +9539,7 @@ static u32 CalcFinalDmg(u32 dmg, u16 move, u8 battlerAtk, u8 battlerDef, u8 move || (gSideStatuses[defSide] & SIDE_STATUS_AURORA_VEIL)) && abilityAtk != ABILITY_INFILTRATOR && !(isCrit) - && !gProtectStructs[gBattlerAttacker].confusionSelfDmg) + && !gProtectStructs[battlerAtk].confusionSelfDmg) { if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) MulModifier(&finalModifier, UQ_4_12(0.66)); @@ -9617,7 +9548,7 @@ static u32 CalcFinalDmg(u32 dmg, u16 move, u8 battlerAtk, u8 battlerDef, u8 move } // Parental Bond Second Strike - if (gSpecialStatuses[gBattlerAttacker].parentalBondState == PARENTAL_BOND_2ND_HIT) + if (gSpecialStatuses[battlerAtk].parentalBondState == PARENTAL_BOND_2ND_HIT) { if (B_PARENTAL_BOND_DMG < GEN_7) MulModifier(&finalModifier, UQ_4_12(0.5)); @@ -9625,6 +9556,12 @@ static u32 CalcFinalDmg(u32 dmg, u16 move, u8 battlerAtk, u8 battlerDef, u8 move MulModifier(&finalModifier, UQ_4_12(0.25)); } + // Z-Moves and Max Moves bypass Protect and do 25% of their original damage + if (gBattleStruct->zmove.active && IS_BATTLER_PROTECTED(battlerDef)) + { + MulModifier(&finalModifier, UQ_4_12(0.25)); + } + // attacker's abilities switch (abilityAtk) { @@ -9747,7 +9684,7 @@ static s32 DoMoveDamageCalc(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, // Add a random factor. if (randomFactor) { - dmg *= 100 - (Random() % 16); + dmg *= 100 - RandomUniform(RNG_DAMAGE_MODIFIER, 0, 15); dmg /= 100; } @@ -9810,6 +9747,18 @@ static void MulByTypeEffectiveness(u16 *modifier, u16 move, u8 moveType, u8 batt MulModifier(modifier, mod); } +static void TryNoticeIllusionInTypeEffectiveness(u32 move, u32 moveType, u32 battlerAtk, u32 battlerDef, u16 resultingModifier, u32 illusionSpecies) +{ + // Check if the type effectiveness would've been different if the pokemon really had the types as the disguise. + u16 presumedModifier = UQ_4_12(1.0); + MulByTypeEffectiveness(&presumedModifier, move, moveType, battlerDef, gSpeciesInfo[illusionSpecies].types[0], battlerAtk, FALSE); + if (gSpeciesInfo[illusionSpecies].types[1] != gSpeciesInfo[illusionSpecies].types[0]) + MulByTypeEffectiveness(&presumedModifier, move, moveType, battlerDef, gSpeciesInfo[illusionSpecies].types[1], battlerAtk, FALSE); + + if (presumedModifier != resultingModifier) + RecordAbilityBattle(battlerDef, ABILITY_ILLUSION); +} + static void UpdateMoveResultFlags(u16 modifier) { if (modifier == UQ_4_12(0.0)) @@ -9835,6 +9784,7 @@ static void UpdateMoveResultFlags(u16 modifier) static u16 CalcTypeEffectivenessMultiplierInternal(u16 move, u8 moveType, u8 battlerAtk, u8 battlerDef, bool32 recordAbilities, u16 modifier) { + u32 illusionSpecies; u16 defAbility = GetBattlerAbility(battlerDef); MulByTypeEffectiveness(&modifier, move, moveType, battlerDef, gBattleMons[battlerDef].type1, battlerAtk, recordAbilities); @@ -9844,7 +9794,20 @@ static u16 CalcTypeEffectivenessMultiplierInternal(u16 move, u8 moveType, u8 bat && gBattleMons[battlerDef].type3 != gBattleMons[battlerDef].type1) MulByTypeEffectiveness(&modifier, move, moveType, battlerDef, gBattleMons[battlerDef].type3, battlerAtk, recordAbilities); - if (moveType == TYPE_GROUND && !IsBattlerGrounded2(battlerDef, TRUE) && !(gBattleMoves[move].flags & FLAG_DMG_UNGROUNDED_IGNORE_TYPE_IF_FLYING)) + if (recordAbilities && (illusionSpecies = GetIllusionMonSpecies(battlerDef))) + TryNoticeIllusionInTypeEffectiveness(move, moveType, battlerAtk, battlerDef, modifier, illusionSpecies); + + if (gBattleMoves[move].split == SPLIT_STATUS && move != MOVE_THUNDER_WAVE) + { + modifier = UQ_4_12(1.0); + #if B_GLARE_GHOST <= GEN_3 + if (move == MOVE_GLARE && IS_BATTLER_OF_TYPE(battlerDef, TYPE_GHOST)) + { + modifier = UQ_4_12(0.0); + } + #endif + } + else if (moveType == TYPE_GROUND && !IsBattlerGrounded2(battlerDef, TRUE) && !(gBattleMoves[move].flags & FLAG_DMG_UNGROUNDED_IGNORE_TYPE_IF_FLYING)) { modifier = UQ_4_12(0.0); if (recordAbilities && defAbility == ABILITY_LEVITATE) @@ -9862,12 +9825,6 @@ static u16 CalcTypeEffectivenessMultiplierInternal(u16 move, u8 moveType, u8 bat modifier = UQ_4_12(0.0); } #endif -#if B_GLARE_GHOST >= GEN_4 - else if (move == MOVE_GLARE && IS_BATTLER_OF_TYPE(battlerDef, TYPE_GHOST)) - { - modifier = UQ_4_12(1.0); - } -#endif // Thousand Arrows ignores type modifiers for flying mons if (!IsBattlerGrounded(battlerDef) && (gBattleMoves[move].flags & FLAG_DMG_UNGROUNDED_IGNORE_TYPE_IF_FLYING) @@ -10134,7 +10091,7 @@ void UndoMegaEvolution(u32 monId) if (gBattleStruct->mega.evolvedPartyIds[B_SIDE_PLAYER] & gBitTable[monId]) { gBattleStruct->mega.evolvedPartyIds[B_SIDE_PLAYER] &= ~(gBitTable[monId]); - SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &gBattleStruct->mega.playerEvolvedSpecies); + SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &baseSpecies); CalculateMonStats(&gPlayerParty[monId]); } else if (gBattleStruct->mega.primalRevertedPartyIds[B_SIDE_PLAYER] & gBitTable[monId]) @@ -10273,6 +10230,14 @@ void ClearIllusionMon(u32 battlerId) memset(&gBattleStruct->illusion[battlerId], 0, sizeof(gBattleStruct->illusion[battlerId])); } +u32 GetIllusionMonSpecies(u32 battlerId) +{ + struct Pokemon *illusionMon = GetIllusionMonPtr(battlerId); + if (illusionMon != NULL) + return GetMonData(illusionMon, MON_DATA_SPECIES); + return SPECIES_NONE; +} + bool32 SetIllusionMon(struct Pokemon *mon, u32 battlerId) { struct Pokemon *party, *partnerMon; @@ -10571,18 +10536,20 @@ void SortBattlersBySpeed(u8 *battlers, bool8 slowToFast) } } -void TryRestoreStolenItems(void) +void TryRestoreHeldItems(void) { u32 i; - u16 stolenItem = ITEM_NONE; + u16 lostItem = ITEM_NONE; for (i = 0; i < PARTY_SIZE; i++) { - if (gBattleStruct->itemStolen[i].stolen) + #if B_RESTORE_HELD_BATTLE_ITEMS == FALSE + if (gBattleStruct->itemLost[i].stolen) + #endif { - stolenItem = gBattleStruct->itemStolen[i].originalItem; - if (stolenItem != ITEM_NONE && ItemId_GetPocket(stolenItem) != POCKET_BERRIES) - SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &stolenItem); // Restore stolen non-berry items + lostItem = gBattleStruct->itemLost[i].originalItem; + if (lostItem != ITEM_NONE && ItemId_GetPocket(lostItem) != POCKET_BERRIES) + SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &lostItem); // Restore stolen non-berry items } } } @@ -10636,8 +10603,8 @@ void TrySaveExchangedItem(u8 battlerId, u16 stolenItem) if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && !(gBattleTypeFlags & BATTLE_TYPE_FRONTIER) && GetBattlerSide(battlerId) == B_SIDE_PLAYER - && stolenItem == gBattleStruct->itemStolen[gBattlerPartyIndexes[battlerId]].originalItem) - gBattleStruct->itemStolen[gBattlerPartyIndexes[battlerId]].stolen = TRUE; + && stolenItem == gBattleStruct->itemLost[gBattlerPartyIndexes[battlerId]].originalItem) + gBattleStruct->itemLost[gBattlerPartyIndexes[battlerId]].stolen = TRUE; #endif } diff --git a/src/battle_z_move.c b/src/battle_z_move.c index 2eccd82f52..f435253c7b 100644 --- a/src/battle_z_move.c +++ b/src/battle_z_move.c @@ -50,7 +50,7 @@ static u16 GetSignatureZMove(u16 move, u16 species, u16 item); static u16 GetTypeBasedZMove(u16 move, u8 battler); static void ZMoveSelectionDisplayPpNumber(void); static void ZMoveSelectionDisplayPower(u16 move, u16 zMove); -static void ShowZMoveTriggerSprite(void); +static void ShowZMoveTriggerSprite(u8 battleId); static bool32 AreStatsMaxed(u8 battlerId, u8 n); static u8 GetZMoveScore(u8 battlerAtk, u8 battlerDef, u16 baseMove, u16 zMove); static void ZMoveSelectionDisplayMoveType(u16 zMove); @@ -199,16 +199,12 @@ bool32 IsViableZMove(u8 battlerId, u16 move) holdEffect = gBattleStruct->debugHoldEffects[battlerId]; else #endif - if (item == ITEM_ENIGMA_BERRY) + if (item == ITEM_ENIGMA_BERRY_E_READER) return FALSE; // HoldEffect = gEnigmaBerries[battlerId].holdEffect; else holdEffect = ItemId_GetHoldEffect(item); - #ifdef ITEM_ULTRANECROZIUM_Z - if (holdEffect == HOLD_EFFECT_Z_CRYSTAL || item == ITEM_ULTRANECROZIUM_Z) - #else if (holdEffect == HOLD_EFFECT_Z_CRYSTAL) - #endif { u16 zMove = GetSignatureZMove(move, gBattleMons[battlerId].species, item); if (zMove != MOVE_NONE) @@ -219,11 +215,7 @@ bool32 IsViableZMove(u8 battlerId, u16 move) if (move != MOVE_NONE && zMove != MOVE_Z_STATUS && gBattleMoves[move].type == ItemId_GetSecondaryId(item)) { - if (IS_MOVE_STATUS(move)) - gBattleStruct->zmove.chosenZMove = move; - else - gBattleStruct->zmove.chosenZMove = GetTypeBasedZMove(move, battlerId); - + gBattleStruct->zmove.chosenZMove = GetTypeBasedZMove(move, battlerId); return TRUE; } } @@ -258,7 +250,7 @@ bool32 TryChangeZIndicator(u8 battlerId, u8 moveIndex) if (gBattleStruct->zmove.viable && !viableZMove) HideZMoveTriggerSprite(); // Was a viable z move, now is not -> slide out else if (!gBattleStruct->zmove.viable && viableZMove) - ShowZMoveTriggerSprite(); // Was not a viable z move, now is -> slide back in + ShowZMoveTriggerSprite(battlerId); // Was not a viable z move, now is -> slide back in } #define SINGLES_Z_TRIGGER_POS_X_OPTIMAL (29) @@ -368,11 +360,11 @@ void HideZMoveTriggerSprite(void) gBattleStruct->zmove.viable = FALSE; } -static void ShowZMoveTriggerSprite(void) +static void ShowZMoveTriggerSprite(u8 battlerId) { struct Sprite *sprite = &gSprites[gBattleStruct->zmove.triggerSpriteId]; gBattleStruct->zmove.viable = TRUE; - CreateZMoveTriggerSprite(sprite->tBattler, TRUE); + CreateZMoveTriggerSprite(battlerId, TRUE); } void DestroyZMoveTriggerSprite(void) @@ -539,7 +531,7 @@ bool32 MoveSelectionDisplayZMove(u16 zmove) static void ZMoveSelectionDisplayPower(u16 move, u16 zMove) { u8 *txtPtr; - u16 power = gBattleMoves[move].zMovePower; + u16 power = GetZMovePower(move); if (zMove >= MOVE_CATASTROPIKA) power = gBattleMoves[zMove].power; @@ -702,3 +694,45 @@ static bool32 AreStatsMaxed(u8 battlerId, u8 n) return TRUE; } +u16 GetZMovePower(u16 move) +{ + if (gBattleMoves[move].split == SPLIT_STATUS) + return 0; + if (gBattleMoves[move].effect == EFFECT_OHKO) + return 180; + + switch (move) + { + case MOVE_MEGA_DRAIN: return 120; + case MOVE_CORE_ENFORCER: return 140; + case MOVE_WEATHER_BALL: return 160; + case MOVE_HEX: return 160; + case MOVE_FLYING_PRESS: return 170; + case MOVE_GEAR_GRIND: return 180; + case MOVE_V_CREATE: return 220; + default: + { + if (gBattleMoves[move].power >= 140) + return 200; + else if (gBattleMoves[move].power >= 130) + return 195; + else if (gBattleMoves[move].power >= 120) + return 190; + else if (gBattleMoves[move].power >= 110) + return 185; + else if (gBattleMoves[move].power >= 100) + return 180; + else if (gBattleMoves[move].power >= 90) + return 175; + else if (gBattleMoves[move].power >= 80) + return 160; + else if (gBattleMoves[move].power >= 70) + return 140; + else if (gBattleMoves[move].power >= 60) + return 120; + else + return 100; + } + } +} + diff --git a/src/berry_blender.c b/src/berry_blender.c index f4c3c16774..e4ed5d0bfa 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -106,6 +106,13 @@ enum { // Last berry that an NPC can put in #define NUM_NPC_BERRIES ITEM_TO_BERRY(ITEM_ASPEAR_BERRY) +enum { + // Windows 0-3 are used implicitly in several loops over BLENDER_MAX_PLAYERS + // i.e. window 0 is for player 1, window 1 for player 2, etc. + WIN_MSG = BLENDER_MAX_PLAYERS, + WIN_RESULTS, +}; + struct BlenderBerry { u16 itemId; @@ -200,7 +207,7 @@ static void SpriteCB_ScoreSymbolBest(struct Sprite *); static void InitLocalPlayers(u8); static void CB2_LoadBerryBlender(void); static void UpdateBlenderCenter(void); -static bool32 Blender_PrintText(s16 *, const u8 *, s32 ); +static bool32 PrintMessage(s16 *, const u8 *, s32 ); static void StartBlender(void); static void CB2_StartBlenderLink(void); static void CB2_StartBlenderLocal(void); @@ -332,7 +339,7 @@ static const struct BgTemplate sBgTemplates[3] = static const struct WindowTemplate sWindowTemplates[] = { - { + { // Player 1 .bg = 0, .tilemapLeft = 1, .tilemapTop = 6, @@ -341,7 +348,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 14, .baseBlock = 0x28, }, - { + { // Player 2 .bg = 0, .tilemapLeft = 22, .tilemapTop = 6, @@ -350,7 +357,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 14, .baseBlock = 0x36, }, - { + { // Player 3 .bg = 0, .tilemapLeft = 1, .tilemapTop = 12, @@ -359,7 +366,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 14, .baseBlock = 0x44, }, - { + { // Player 4 .bg = 0, .tilemapLeft = 22, .tilemapTop = 12, @@ -368,7 +375,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 14, .baseBlock = 0x52, }, - { + [WIN_MSG] = { .bg = 0, .tilemapLeft = 2, .tilemapTop = 15, @@ -377,7 +384,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 14, .baseBlock = 0x60, }, - { + [WIN_RESULTS] = { .bg = 0, .tilemapLeft = 5, .tilemapTop = 3, @@ -1107,7 +1114,7 @@ static void CB2_LoadBerryBlender(void) sBerryBlender->mainState++; break; case 4: - if (Blender_PrintText(&sBerryBlender->textState, sText_BerryBlenderStart, GetPlayerTextSpeedDelay())) + if (PrintMessage(&sBerryBlender->textState, sText_BerryBlenderStart, GetPlayerTextSpeedDelay())) sBerryBlender->mainState++; break; case 5: @@ -1337,7 +1344,7 @@ static void CB2_StartBlenderLink(void) } break; case 5: - Blender_PrintText(&sBerryBlender->textState, sText_CommunicationStandby, 0); + PrintMessage(&sBerryBlender->textState, sText_CommunicationStandby, 0); sBerryBlender->mainState = 8; sBerryBlender->framesToWait = 0; break; @@ -1363,7 +1370,7 @@ static void CB2_StartBlenderLink(void) if (++sBerryBlender->framesToWait > 20) { // Wait for partners' berries - ClearDialogWindowAndFrameToTransparent(4, TRUE); + ClearDialogWindowAndFrameToTransparent(WIN_MSG, TRUE); if (GetBlockReceivedStatus() == GetLinkPlayerCountAsBitFlags()) { for (i = 0; i < GetLinkPlayerCount(); i++) @@ -2276,9 +2283,9 @@ static u32 CalculatePokeblockColor(struct BlenderBerry* berries, s16 *_flavors, j++; } - // If all flavors are 0, or at least 3 were negative/0 + // If all 5 flavors are 0, or if 4-5 flavors were negative, // or if players used the same berry, color is black - if (j == 5 || negativeFlavors > 3) + if (j == FLAVOR_COUNT || negativeFlavors > 3) return PBLOCK_CLR_BLACK; for (i = 0; i < numPlayers; i++) @@ -2664,7 +2671,7 @@ static void CB2_EndBlenderGame(void) } break; case 7: - if (Blender_PrintText(&sBerryBlender->textState, sText_WouldLikeToBlendAnotherBerry, GetPlayerTextSpeedDelay())) + if (PrintMessage(&sBerryBlender->textState, sText_WouldLikeToBlendAnotherBerry, GetPlayerTextSpeedDelay())) sBerryBlender->gameEndState++; break; case 9: @@ -2748,7 +2755,7 @@ static void CB2_EndBlenderGame(void) sBerryBlender->gameEndState++; break; case 13: - if (Blender_PrintText(&sBerryBlender->textState, sText_CommunicationStandby, GetPlayerTextSpeedDelay())) + if (PrintMessage(&sBerryBlender->textState, sText_CommunicationStandby, GetPlayerTextSpeedDelay())) { SetMainCallback2(CB2_CheckPlayAgainLink); sBerryBlender->gameEndState = 0; @@ -2858,7 +2865,7 @@ static void CB2_CheckPlayAgainLink(void) StringAppend(gStringVar4, sText_HasNoBerriesToPut); break; case 3: - if (Blender_PrintText(&sBerryBlender->textState, gStringVar4, GetPlayerTextSpeedDelay())) + if (PrintMessage(&sBerryBlender->textState, gStringVar4, GetPlayerTextSpeedDelay())) { sBerryBlender->framesToWait = 0; sBerryBlender->gameEndState++; @@ -2869,7 +2876,7 @@ static void CB2_CheckPlayAgainLink(void) sBerryBlender->gameEndState = 5; break; case 5: - Blender_PrintText(&sBerryBlender->textState, gText_SavingDontTurnOff2, 0); + PrintMessage(&sBerryBlender->textState, gText_SavingDontTurnOff2, 0); SetLinkStandbyCallback(); sBerryBlender->gameEndState++; break; @@ -2965,7 +2972,7 @@ static void CB2_CheckPlayAgainLocal(void) StringCopy(gStringVar4, sText_RunOutOfBerriesForBlending); break; case 3: - if (Blender_PrintText(&sBerryBlender->textState, gStringVar4, GetPlayerTextSpeedDelay())) + if (PrintMessage(&sBerryBlender->textState, gStringVar4, GetPlayerTextSpeedDelay())) sBerryBlender->gameEndState = 9; break; case 9: @@ -3495,7 +3502,7 @@ static bool8 PrintBlendingResults(void) u8 *txtPtr; xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_BlendingResults, 0xA8); - Blender_AddTextPrinter(5, sText_BlendingResults, xPos, 1, TEXT_SKIP_DRAW, 0); + Blender_AddTextPrinter(WIN_RESULTS, sText_BlendingResults, xPos, 1, TEXT_SKIP_DRAW, 0); if (sBerryBlender->numPlayers == BLENDER_MAX_PLAYERS) yPos = 17; @@ -3510,15 +3517,15 @@ static bool8 PrintBlendingResults(void) StringAppend(sBerryBlender->stringVar, sText_Dot); StringAppend(sBerryBlender->stringVar, gText_Space); StringAppend(sBerryBlender->stringVar, gLinkPlayers[place].name); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, 8, yPos, TEXT_SKIP_DRAW, 3); + Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, 8, yPos, TEXT_SKIP_DRAW, 3); StringCopy(sBerryBlender->stringVar, sBerryBlender->blendedBerries[place].name); ConvertInternationalString(sBerryBlender->stringVar, gLinkPlayers[place].language); StringAppend(sBerryBlender->stringVar, sText_SpaceBerry); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, 0x54, yPos, TEXT_SKIP_DRAW, 3); + Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, 0x54, yPos, TEXT_SKIP_DRAW, 3); } - Blender_AddTextPrinter(5, sText_MaximumSpeed, 0, 0x51, TEXT_SKIP_DRAW, 3); + Blender_AddTextPrinter(WIN_RESULTS, sText_MaximumSpeed, 0, 0x51, TEXT_SKIP_DRAW, 3); ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->maxRPM / 100, STR_CONV_MODE_RIGHT_ALIGN, 3); StringAppend(sBerryBlender->stringVar, sText_Dot); @@ -3527,8 +3534,8 @@ static bool8 PrintBlendingResults(void) StringAppend(sBerryBlender->stringVar, sText_RPM); xPos = GetStringRightAlignXOffset(FONT_NORMAL, sBerryBlender->stringVar, 0xA8); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x51, TEXT_SKIP_DRAW, 3); - Blender_AddTextPrinter(5, sText_Time, 0, 0x61, TEXT_SKIP_DRAW, 3); + Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, xPos, 0x51, TEXT_SKIP_DRAW, 3); + Blender_AddTextPrinter(WIN_RESULTS, sText_Time, 0, 0x61, TEXT_SKIP_DRAW, 3); seconds = (sBerryBlender->gameFrameTime / 60) % 60; minutes = (sBerryBlender->gameFrameTime / (60 * 60)); @@ -3540,12 +3547,12 @@ static bool8 PrintBlendingResults(void) StringAppend(sBerryBlender->stringVar, sText_Sec); xPos = GetStringRightAlignXOffset(FONT_NORMAL, sBerryBlender->stringVar, 0xA8); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x61, TEXT_SKIP_DRAW, 3); + Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, xPos, 0x61, TEXT_SKIP_DRAW, 3); sBerryBlender->framesToWait = 0; sBerryBlender->mainState++; - CopyWindowToVram(5, COPYWIN_GFX); + CopyWindowToVram(WIN_RESULTS, COPYWIN_GFX); } break; case 4: @@ -3553,7 +3560,7 @@ static bool8 PrintBlendingResults(void) sBerryBlender->mainState++; break; case 5: - ClearStdWindowAndFrameToTransparent(5, TRUE); + ClearStdWindowAndFrameToTransparent(WIN_RESULTS, TRUE); for (i = 0; i < BLENDER_MAX_PLAYERS; i++) { @@ -3581,7 +3588,7 @@ static bool8 PrintBlendingResults(void) sBerryBlender->mainState++; break; case 6: - if (Blender_PrintText(&sBerryBlender->textState, sBerryBlender->stringVar, GetPlayerTextSpeedDelay())) + if (PrintMessage(&sBerryBlender->textState, sBerryBlender->stringVar, GetPlayerTextSpeedDelay())) { TryUpdateBerryBlenderRecord(); return TRUE; @@ -3692,9 +3699,9 @@ static bool8 PrintBlendingRanking(void) } break; case 3: - DrawStdFrameWithCustomTileAndPalette(5, FALSE, 1, 0xD); + DrawStdFrameWithCustomTileAndPalette(WIN_RESULTS, FALSE, 1, 0xD); xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_Ranking, 168); - Blender_AddTextPrinter(5, sText_Ranking, xPos, 1, TEXT_SKIP_DRAW, 0); + Blender_AddTextPrinter(WIN_RESULTS, sText_Ranking, xPos, 1, TEXT_SKIP_DRAW, 0); sBerryBlender->scoreIconIds[SCORE_BEST] = CreateSprite(&sSpriteTemplate_ScoreSymbols, 128, 52, 0); StartSpriteAnim(&gSprites[sBerryBlender->scoreIconIds[SCORE_BEST]], SCOREANIM_BEST_STATIC); @@ -3718,20 +3725,20 @@ static bool8 PrintBlendingRanking(void) StringAppend(sBerryBlender->stringVar, sText_Dot); StringAppend(sBerryBlender->stringVar, gText_Space); StringAppend(sBerryBlender->stringVar, gLinkPlayers[place].name); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, 0, yPos, TEXT_SKIP_DRAW, 3); + Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, 0, yPos, TEXT_SKIP_DRAW, 3); ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->scores[place][SCORE_BEST], STR_CONV_MODE_RIGHT_ALIGN, 3); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78, yPos, TEXT_SKIP_DRAW, 3); + Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, 78, yPos, TEXT_SKIP_DRAW, 3); ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->scores[place][SCORE_GOOD], STR_CONV_MODE_RIGHT_ALIGN, 3); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78 + 32, yPos, TEXT_SKIP_DRAW, 3); + Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, 78 + 32, yPos, TEXT_SKIP_DRAW, 3); ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->scores[place][SCORE_MISS], STR_CONV_MODE_RIGHT_ALIGN, 3); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78 + 64, yPos, TEXT_SKIP_DRAW, 3); + Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, 78 + 64, yPos, TEXT_SKIP_DRAW, 3); } - PutWindowTilemap(5); - CopyWindowToVram(5, COPYWIN_FULL); + PutWindowTilemap(WIN_RESULTS); + CopyWindowToVram(WIN_RESULTS, COPYWIN_FULL); sBerryBlender->framesToWait = 0; sBerryBlender->mainState++; @@ -3875,26 +3882,24 @@ static void Blender_AddTextPrinter(u8 windowId, const u8 *string, u8 x, u8 y, s3 } if (caseId != 3) - { FillWindowPixelBuffer(windowId, PIXEL_FILL(txtColor[0])); - } AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, letterSpacing, 1, txtColor, speed, string); } -static bool32 Blender_PrintText(s16 *textState, const u8 *string, s32 textSpeed) +static bool32 PrintMessage(s16 *textState, const u8 *string, s32 textSpeed) { switch (*textState) { case 0: - DrawDialogFrameWithCustomTileAndPalette(4, FALSE, 0x14, 0xF); - Blender_AddTextPrinter(4, string, 0, 1, textSpeed, 0); - PutWindowTilemap(4); - CopyWindowToVram(4, COPYWIN_FULL); + DrawDialogFrameWithCustomTileAndPalette(WIN_MSG, FALSE, 0x14, 0xF); + Blender_AddTextPrinter(WIN_MSG, string, 0, 1, textSpeed, 0); + PutWindowTilemap(WIN_MSG); + CopyWindowToVram(WIN_MSG, COPYWIN_FULL); (*textState)++; break; case 1: - if (!IsTextPrinterActive(4)) + if (!IsTextPrinterActive(WIN_MSG)) { *textState = 0; return TRUE; diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index e8c4bc7e68..af21bb929a 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -14,6 +14,13 @@ #include "m4a.h" #include "constants/rgb.h" +enum { + WIN_TITLE, // "Berry Program Update" header on the first screen + WIN_MSG_BODY, + WIN_GAME_NAMES, // The labels under the GBA graphics on the link screen + WIN_TURN_OFF_TITLE, // "Ruby/Sapphire" at the top of the "turn off the power" screen +}; + struct { u8 state; u8 curScene; @@ -71,7 +78,7 @@ static const struct BgTemplate sBerryFixBgTemplates[] = { }; static const struct WindowTemplate sBerryFixWindowTemplates[] = { - { + [WIN_TITLE] = { .bg = 0, .tilemapLeft = 2, .tilemapTop = 4, @@ -80,7 +87,7 @@ static const struct WindowTemplate sBerryFixWindowTemplates[] = { .paletteNum = 15, .baseBlock = 1 }, - { + [WIN_MSG_BODY] = { .bg = 0, .tilemapLeft = 1, .tilemapTop = 11, @@ -89,7 +96,7 @@ static const struct WindowTemplate sBerryFixWindowTemplates[] = { .paletteNum = 15, .baseBlock = 53 }, - { + [WIN_GAME_NAMES] = { .bg = 0, .tilemapLeft = 0, .tilemapTop = 8, @@ -98,7 +105,7 @@ static const struct WindowTemplate sBerryFixWindowTemplates[] = { .paletteNum = 15, .baseBlock = 277 }, - { + [WIN_TURN_OFF_TITLE] = { .bg = 0, .tilemapLeft = 8, .tilemapTop = 0, @@ -217,11 +224,11 @@ static void BerryFix_Main(void) sBerryFix->state = MAINSTATE_BEGIN; break; case MAINSTATE_BEGIN: - if (TryScene(SCENE_BEGIN) && (JOY_NEW(A_BUTTON))) + if (TryScene(SCENE_BEGIN) && JOY_NEW(A_BUTTON)) sBerryFix->state = MAINSTATE_CONNECT; break; case MAINSTATE_CONNECT: - if (TryScene(SCENE_ENSURE_CONNECT) && (JOY_NEW(A_BUTTON))) + if (TryScene(SCENE_ENSURE_CONNECT) && JOY_NEW(A_BUTTON)) sBerryFix->state = MAINSTATE_INIT_MULTIBOOT; break; case MAINSTATE_INIT_MULTIBOOT: @@ -299,29 +306,29 @@ static void BerryFix_GpuSet(void) DmaCopy32(3, sBerryFixPalColors, BG_PLTT + 0x1E0, sizeof(sBerryFixPalColors)); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP); - FillWindowPixelBuffer(2, PIXEL_FILL(0)); - FillWindowPixelBuffer(3, PIXEL_FILL(0)); - FillWindowPixelBuffer(0, PIXEL_FILL(10)); + FillWindowPixelBuffer(WIN_GAME_NAMES, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_TURN_OFF_TITLE, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_TITLE, PIXEL_FILL(10)); width = GetStringWidth(FONT_SMALL, sText_Emerald, 0); left = (120 - width) / 2; - AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_Emerald); + AddTextPrinterParameterized3(WIN_GAME_NAMES, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_Emerald); width = GetStringWidth(FONT_SMALL, sText_RubySapphire, 0); left = (120 - width) / 2 + 120; - AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_RubySapphire); + AddTextPrinterParameterized3(WIN_GAME_NAMES, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_RubySapphire); width = GetStringWidth(FONT_SMALL, sText_RubySapphire, 0); left = (112 - width) / 2; - AddTextPrinterParameterized3(3, FONT_SMALL, left, 0, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_RubySapphire); + AddTextPrinterParameterized3(WIN_TURN_OFF_TITLE, FONT_SMALL, left, 0, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_RubySapphire); width = GetStringWidth(FONT_NORMAL, sText_BerryProgramUpdate, 0); left = (208 - width) / 2; - AddTextPrinterParameterized3(0, FONT_NORMAL, left, 2, sBerryProgramTextColors, TEXT_SKIP_DRAW, sText_BerryProgramUpdate); + AddTextPrinterParameterized3(WIN_TITLE, FONT_NORMAL, left, 2, sBerryProgramTextColors, TEXT_SKIP_DRAW, sText_BerryProgramUpdate); - CopyWindowToVram(2, COPYWIN_GFX); - CopyWindowToVram(3, COPYWIN_GFX); - CopyWindowToVram(0, COPYWIN_GFX); + CopyWindowToVram(WIN_GAME_NAMES, COPYWIN_GFX); + CopyWindowToVram(WIN_TURN_OFF_TITLE, COPYWIN_GFX); + CopyWindowToVram(WIN_TITLE, COPYWIN_GFX); } static int BerryFix_TrySetScene(int scene) @@ -345,23 +352,23 @@ static int BerryFix_TrySetScene(int scene) static void BerryFix_SetScene(int scene) { FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32); - FillWindowPixelBuffer(1, PIXEL_FILL(10)); - AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0, sBerryProgramTextColors, TEXT_SKIP_DRAW, sBerryProgramTexts[scene]); - PutWindowTilemap(1); - CopyWindowToVram(1, COPYWIN_GFX); + FillWindowPixelBuffer(WIN_MSG_BODY, PIXEL_FILL(10)); + AddTextPrinterParameterized3(WIN_MSG_BODY, FONT_NORMAL, 0, 0, sBerryProgramTextColors, TEXT_SKIP_DRAW, sBerryProgramTexts[scene]); + PutWindowTilemap(WIN_MSG_BODY); + CopyWindowToVram(WIN_MSG_BODY, COPYWIN_GFX); switch (scene) { case SCENE_ENSURE_CONNECT: case SCENE_TRANSMITTING: case SCENE_FOLLOW_INSTRUCT: case SCENE_TRANSMIT_FAILED: - PutWindowTilemap(2); + PutWindowTilemap(WIN_GAME_NAMES); break; case SCENE_TURN_OFF_POWER: - PutWindowTilemap(3); + PutWindowTilemap(WIN_TURN_OFF_TITLE); break; case SCENE_BEGIN: - PutWindowTilemap(0); + PutWindowTilemap(WIN_TITLE); break; } CopyBgTilemapBufferToVram(0); diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c index 862a466e04..5c8af33785 100644 --- a/src/berry_tag_screen.c +++ b/src/berry_tag_screen.c @@ -102,7 +102,7 @@ static const u8 sTextColors[2][3] = static const struct WindowTemplate sWindowTemplates[] = { - { // WIN_BERRY_NAME + [WIN_BERRY_NAME] = { .bg = 1, .tilemapLeft = 11, .tilemapTop = 4, @@ -111,7 +111,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 15, .baseBlock = 69, }, - { // WIN_SIZE_FIRM + [WIN_SIZE_FIRM] = { .bg = 1, .tilemapLeft = 11, .tilemapTop = 7, @@ -120,7 +120,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 15, .baseBlock = 85, }, - { // WIN_DESC + [WIN_DESC] = { .bg = 1, .tilemapLeft = 4, .tilemapTop = 14, @@ -129,7 +129,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 15, .baseBlock = 157, }, - { // WIN_BERRY_TAG + [WIN_BERRY_TAG] = { .bg = 0, .tilemapLeft = 2, .tilemapTop = 0, @@ -599,7 +599,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) switch (data[0]) { case 0x30: - FillWindowPixelBuffer(0, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_BERRY_NAME, PIXEL_FILL(0)); break; case 0x40: PrintBerryNumberAndName(); @@ -609,7 +609,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) CreateBerrySprite(); break; case 0x60: - FillWindowPixelBuffer(1, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_SIZE_FIRM, PIXEL_FILL(0)); break; case 0x70: PrintBerrySize(); @@ -621,7 +621,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) SetFlavorCirclesVisiblity(); break; case 0xA0: - FillWindowPixelBuffer(2, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_DESC, PIXEL_FILL(0)); break; case 0xB0: PrintBerryDescription1(); @@ -636,7 +636,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) switch (data[0]) { case 0x30: - FillWindowPixelBuffer(2, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_DESC, PIXEL_FILL(0)); break; case 0x40: PrintBerryDescription2(); @@ -648,7 +648,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) SetFlavorCirclesVisiblity(); break; case 0x70: - FillWindowPixelBuffer(1, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_SIZE_FIRM, PIXEL_FILL(0)); break; case 0x80: PrintBerryFirmness(); @@ -661,7 +661,7 @@ static void Task_DisplayAnotherBerry(u8 taskId) CreateBerrySprite(); break; case 0xB0: - FillWindowPixelBuffer(0, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_BERRY_NAME, PIXEL_FILL(0)); break; case 0xC0: PrintBerryNumberAndName(); diff --git a/src/bike.c b/src/bike.c index 8f3faa2da0..10596418fd 100644 --- a/src/bike.c +++ b/src/bike.c @@ -863,23 +863,23 @@ static u8 Bike_DPadToDirection(u16 heldKeys) static u8 GetBikeCollision(u8 direction) { - u8 metatitleBehavior; + u8 metatileBehavior; struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; s16 x = playerObjEvent->currentCoords.x; s16 y = playerObjEvent->currentCoords.y; MoveCoords(direction, &x, &y); - metatitleBehavior = MapGridGetMetatileBehaviorAt(x, y); - return GetBikeCollisionAt(playerObjEvent, x, y, direction, metatitleBehavior); + metatileBehavior = MapGridGetMetatileBehaviorAt(x, y); + return GetBikeCollisionAt(playerObjEvent, x, y, direction, metatileBehavior); } -static u8 GetBikeCollisionAt(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatitleBehavior) +static u8 GetBikeCollisionAt(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatileBehavior) { - u8 collision = CheckForObjectEventCollision(objectEvent, x, y, direction, metatitleBehavior); + u8 collision = CheckForObjectEventCollision(objectEvent, x, y, direction, metatileBehavior); if (collision > COLLISION_OBJECT_EVENT) return collision; - if (collision == COLLISION_NONE && IsRunningDisallowedByMetatile(metatitleBehavior)) + if (collision == COLLISION_NONE && IsRunningDisallowedByMetatile(metatileBehavior)) collision = COLLISION_IMPASSABLE; if (collision) diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c index 6b5d66d315..3487428495 100644 --- a/src/braille_puzzles.c +++ b/src/braille_puzzles.c @@ -93,11 +93,11 @@ bool8 CheckRelicanthWailord(void) { // Emerald change: why did they flip it? // First comes Wailord - if (GetMonData(&gPlayerParty[0], MON_DATA_SPECIES2, 0) == SPECIES_WAILORD) + if (GetMonData(&gPlayerParty[0], MON_DATA_SPECIES_OR_EGG, 0) == SPECIES_WAILORD) { CalculatePlayerPartyCount(); // Last comes Relicanth - if (GetMonData(&gPlayerParty[gPlayerPartyCount - 1], MON_DATA_SPECIES2, 0) == SPECIES_RELICANTH) + if (GetMonData(&gPlayerParty[gPlayerPartyCount - 1], MON_DATA_SPECIES_OR_EGG, 0) == SPECIES_RELICANTH) return TRUE; } return FALSE; diff --git a/src/cable_car.c b/src/cable_car.c index 4eb4c30804..7d18df7b7f 100644 --- a/src/cable_car.c +++ b/src/cable_car.c @@ -27,9 +27,11 @@ #define STATE_END 0xFF -#define TAG_CABLE_CAR 1 -#define TAG_DOOR 2 -#define TAG_CABLE 3 +enum { + TAG_CABLE_CAR = 1, + TAG_DOOR, + TAG_CABLE, +}; struct CableCar { @@ -62,8 +64,8 @@ struct CableCar u16 *groundTilemap; u16 *treesTilemap; u16 *bgMountainsTilemap; - const u16 *pylonHookTilemapEntries; - u8 *pylonStemTilemap; + const u16 *pylonTopTilemap; + u16 *pylonPoleTilemap; }; static EWRAM_DATA struct CableCar *sCableCar = NULL; @@ -129,24 +131,11 @@ static const struct BgTemplate sBgTemplates[4] = { }, }; -static const u8 sGround_Tilemap[] = INCBIN_U8("graphics/cable_car/ground.bin.lz"); -static const u8 sTrees_Tilemap[] = INCBIN_U8("graphics/cable_car/trees.bin.lz"); -static const u8 sBgMountains_Tilemap[] = INCBIN_U8("graphics/cable_car/bg_mountains.bin.lz"); - -static const u16 sPylonHook_TilemapEntries[] = { - 0x3000, - 0x3001, - 0x3002, - 0x3003, - 0x3004, - 0x3005, - 0x3006, - 0x3007, - 0x3008, - 0x3009, -}; - -static const u8 sPylonStems_Tilemap[] = INCBIN_U8("graphics/cable_car/pylons.bin.lz"); +static const u16 sGround_Tilemap[] = INCBIN_U16("graphics/cable_car/ground.bin.lz"); +static const u16 sTrees_Tilemap[] = INCBIN_U16("graphics/cable_car/trees.bin.lz"); +static const u16 sBgMountains_Tilemap[] = INCBIN_U16("graphics/cable_car/bg_mountains.bin.lz"); +static const u16 sPylonTop_Tilemap[] = INCBIN_U16("graphics/cable_car/pylon_top.bin"); +static const u16 sPylonPole_Tilemap[] = INCBIN_U16("graphics/cable_car/pylon_pole.bin.lz"); static const struct CompressedSpriteSheet sSpriteSheets[] = { { gCableCar_Gfx, 0x800, TAG_CABLE_CAR }, @@ -299,8 +288,8 @@ static void CB2_LoadCableCar(void) sCableCar->groundTilemap = malloc_and_decompress(sGround_Tilemap, &sizeOut); sCableCar->treesTilemap = malloc_and_decompress(sTrees_Tilemap, &sizeOut); sCableCar->bgMountainsTilemap = malloc_and_decompress(sBgMountains_Tilemap, &sizeOut); - sCableCar->pylonStemTilemap = malloc_and_decompress(sPylonStems_Tilemap, &sizeOut); - sCableCar->pylonHookTilemapEntries = sPylonHook_TilemapEntries; + sCableCar->pylonPoleTilemap = malloc_and_decompress(sPylonPole_Tilemap, &sizeOut); + sCableCar->pylonTopTilemap = sPylonTop_Tilemap; DecompressAndCopyTileDataToVram(0, gCableCarBg_Gfx, 0, 0, 0); gMain.state++; break; @@ -335,8 +324,8 @@ static void CB2_LoadCableCar(void) case 6: CopyToBgTilemapBufferRect_ChangePalette(1, sCableCar->treesTilemap, 0, 17, 32, 15, 17); CopyToBgTilemapBufferRect_ChangePalette(2, sCableCar->bgMountainsTilemap, 0, 0, 30, 20, 17); - CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonHookTilemapEntries, 0, 0, 5, 2, 17); - CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonStemTilemap, 0, 2, 2, 20, 17); + CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonTopTilemap, 0, 0, 5, 2, 17); + CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonPoleTilemap, 0, 2, 2, 20, 17); gMain.state++; break; case 7: @@ -404,8 +393,8 @@ static void CB2_EndCableCar(void) UnsetBgTilemapBuffer(2); UnsetBgTilemapBuffer(3); ResetBgsAndClearDma3BusyFlags(0); - sCableCar->pylonHookTilemapEntries = NULL; - FREE_AND_SET_NULL(sCableCar->pylonStemTilemap); + sCableCar->pylonTopTilemap = NULL; + FREE_AND_SET_NULL(sCableCar->pylonPoleTilemap); FREE_AND_SET_NULL(sCableCar->bgMountainsTilemap); FREE_AND_SET_NULL(sCableCar->treesTilemap); FREE_AND_SET_NULL(sCableCar->groundTilemap); @@ -514,8 +503,8 @@ static void Task_AnimateBgGoingUp(u8 taskId) FillBgTilemapBufferRect(3, 0, 2, 0, 1, 2, 17); break; case 16: - CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonHookTilemapEntries, 0, 0, 5, 2, 17); - CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonStemTilemap, 0, 2, 2, 30, 17); + CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonTopTilemap, 0, 0, 5, 2, 17); + CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonPoleTilemap, 0, 2, 2, 30, 17); sCableCar->bg3VerticalOffset = 64; break; } @@ -542,7 +531,7 @@ static void Task_AnimateBgGoingDown(u8 taskId) switch (sCableCar->bg3HorizontalOffset) { case 176: - CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonStemTilemap, 0, 2, 2, 30, 17); + CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonPoleTilemap, 0, 2, 2, 30, 17); break; case 16: FillBgTilemapBufferRect(3, 0, 2, 0, 3, 2, 17); @@ -550,14 +539,14 @@ static void Task_AnimateBgGoingDown(u8 taskId) sCableCar->bg3VerticalOffset = 192; break; case 32: - FillBgTilemapBufferRect(3, sCableCar->pylonHookTilemapEntries[2], 2, 0, 1, 1, 17); - FillBgTilemapBufferRect(3, sCableCar->pylonHookTilemapEntries[3], 3, 0, 1, 1, 17); - FillBgTilemapBufferRect(3, sCableCar->pylonHookTilemapEntries[7], 2, 1, 1, 1, 17); - FillBgTilemapBufferRect(3, sCableCar->pylonHookTilemapEntries[8], 3, 1, 1, 1, 17); + FillBgTilemapBufferRect(3, sCableCar->pylonTopTilemap[2], 2, 0, 1, 1, 17); + FillBgTilemapBufferRect(3, sCableCar->pylonTopTilemap[3], 3, 0, 1, 1, 17); + FillBgTilemapBufferRect(3, sCableCar->pylonTopTilemap[7], 2, 1, 1, 1, 17); + FillBgTilemapBufferRect(3, sCableCar->pylonTopTilemap[8], 3, 1, 1, 1, 17); break; case 40: - FillBgTilemapBufferRect(3, sCableCar->pylonHookTilemapEntries[4], 4, 0, 1, 1, 17); - FillBgTilemapBufferRect(3, sCableCar->pylonHookTilemapEntries[9], 4, 1, 1, 1, 17); + FillBgTilemapBufferRect(3, sCableCar->pylonTopTilemap[4], 4, 0, 1, 1, 17); + FillBgTilemapBufferRect(3, sCableCar->pylonTopTilemap[9], 4, 1, 1, 1, 17); break; } } diff --git a/src/contest.c b/src/contest.c index 6771f47d6e..eadf960a2a 100644 --- a/src/contest.c +++ b/src/contest.c @@ -5456,7 +5456,7 @@ static void Contest_StartTextPrinter(const u8 *currChar, bool32 b) u8 speed; printerTemplate.currentChar = currChar; - printerTemplate.windowId = 4; + printerTemplate.windowId = WIN_GENERAL_TEXT; printerTemplate.fontId = FONT_NORMAL; printerTemplate.x = 0; printerTemplate.y = 1; @@ -5482,7 +5482,7 @@ static void Contest_StartTextPrinter(const u8 *currChar, bool32 b) AddTextPrinter(&printerTemplate, speed, 0); } - PutWindowTilemap(4); + PutWindowTilemap(WIN_GENERAL_TEXT); Contest_SetBgCopyFlags(0); } @@ -5500,7 +5500,7 @@ static void ContestBG_FillBoxWithTile(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 wi static bool32 Contest_RunTextPrinters(void) { RunTextPrinters(); - return IsTextPrinterActive(4); + return IsTextPrinterActive(WIN_GENERAL_TEXT); } static void Contest_SetBgCopyFlags(u32 flagIndex) diff --git a/src/contest_util.c b/src/contest_util.c index 07bced4142..53a81dea04 100644 --- a/src/contest_util.c +++ b/src/contest_util.c @@ -319,9 +319,10 @@ static const struct BgTemplate sBgTemplates[] = } }; -static const struct WindowTemplate sWindowTemplates[] = +// Window IDs are implicitly shared with contestant IDs in LoadContestMonName +static const struct WindowTemplate sWindowTemplates[CONTESTANT_COUNT + 1] = { - { + { // Contestant 1 .bg = 1, .tilemapLeft = 7, .tilemapTop = 4, @@ -330,7 +331,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 15, .baseBlock = 770 }, - { + { // Contestant 2 .bg = 1, .tilemapLeft = 7, .tilemapTop = 7, @@ -339,7 +340,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 15, .baseBlock = 794 }, - { + { // Contestant 3 .bg = 1, .tilemapLeft = 7, .tilemapTop = 10, @@ -348,7 +349,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 15, .baseBlock = 818 }, - { + { // Contestant 4 .bg = 1, .tilemapLeft = 7, .tilemapTop = 13, @@ -357,7 +358,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 15, .baseBlock = 842 }, - DUMMY_WIN_TEMPLATE, + DUMMY_WIN_TEMPLATE }; static const struct OamData sOamData_WirelessIndicatorWindow = diff --git a/src/data.c b/src/data.c index 4b216cfd25..1ced9ce81d 100644 --- a/src/data.c +++ b/src/data.c @@ -3,6 +3,7 @@ #include "battle.h" #include "data.h" #include "graphics.h" +#include "constants/abilities.h" #include "constants/items.h" #include "constants/moves.h" #include "constants/trainers.h" @@ -48,68 +49,68 @@ const struct SpriteFrameImage gBattlerPicTable_OpponentRight[] = const struct SpriteFrameImage gTrainerBackPicTable_Brendan[] = { - gTrainerBackPic_Brendan, 0x0800, - gTrainerBackPic_Brendan + 0x0800, 0x0800, - gTrainerBackPic_Brendan + 0x1000, 0x0800, - gTrainerBackPic_Brendan + 0x1800, 0x0800, + gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, + gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, + gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, + gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, }; const struct SpriteFrameImage gTrainerBackPicTable_May[] = { - gTrainerBackPic_May, 0x0800, - gTrainerBackPic_May + 0x0800, 0x0800, - gTrainerBackPic_May + 0x1000, 0x0800, - gTrainerBackPic_May + 0x1800, 0x0800, + gTrainerBackPic_May + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, + gTrainerBackPic_May + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, + gTrainerBackPic_May + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, + gTrainerBackPic_May + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, }; const struct SpriteFrameImage gTrainerBackPicTable_Red[] = { - gTrainerBackPic_Red, 0x0800, - gTrainerBackPic_Red + 0x0800, 0x0800, - gTrainerBackPic_Red + 0x1000, 0x0800, - gTrainerBackPic_Red + 0x1800, 0x0800, - gTrainerBackPic_Red + 0x2000, 0x0800, + gTrainerBackPic_Red + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, + gTrainerBackPic_Red + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, + gTrainerBackPic_Red + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, + gTrainerBackPic_Red + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, + gTrainerBackPic_Red + TRAINER_PIC_SIZE * 4, TRAINER_PIC_SIZE, }; const struct SpriteFrameImage gTrainerBackPicTable_Leaf[] = { - gTrainerBackPic_Leaf, 0x0800, - gTrainerBackPic_Leaf + 0x0800, 0x0800, - gTrainerBackPic_Leaf + 0x1000, 0x0800, - gTrainerBackPic_Leaf + 0x1800, 0x0800, - gTrainerBackPic_Leaf + 0x2000, 0x0800, + gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, + gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, + gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, + gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, + gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 4, TRAINER_PIC_SIZE, }; const struct SpriteFrameImage gTrainerBackPicTable_RubySapphireBrendan[] = { - gTrainerBackPic_RubySapphireBrendan, 0x0800, - gTrainerBackPic_RubySapphireBrendan + 0x0800, 0x0800, - gTrainerBackPic_RubySapphireBrendan + 0x1000, 0x0800, - gTrainerBackPic_RubySapphireBrendan + 0x1800, 0x0800, + gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, + gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, + gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, + gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, }; const struct SpriteFrameImage gTrainerBackPicTable_RubySapphireMay[] = { - gTrainerBackPic_RubySapphireMay, 0x0800, - gTrainerBackPic_RubySapphireMay + 0x0800, 0x0800, - gTrainerBackPic_RubySapphireMay + 0x1000, 0x0800, - gTrainerBackPic_RubySapphireMay + 0x1800, 0x0800, + gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, + gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, + gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, + gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, }; const struct SpriteFrameImage gTrainerBackPicTable_Wally[] = { - gTrainerBackPic_Wally, 0x0800, - gTrainerBackPic_Wally + 0x0800, 0x0800, - gTrainerBackPic_Wally + 0x1000, 0x0800, - gTrainerBackPic_Wally + 0x1800, 0x0800, + gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, + gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, + gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, + gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, }; const struct SpriteFrameImage gTrainerBackPicTable_Steven[] = { - gTrainerBackPic_Steven, 0x0800, - gTrainerBackPic_Steven + 0x0800, 0x0800, - gTrainerBackPic_Steven + 0x1000, 0x0800, - gTrainerBackPic_Steven + 0x1800, 0x0800, + gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE, + gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE, + gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE, + gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE, }; static const union AnimCmd sAnim_GeneralFrame0[] = @@ -290,7 +291,7 @@ static const union AnimCmd sAnim_MonPic_3[] = ANIMCMD_END, }; -const union AnimCmd *const gAnims_MonPic[] = +const union AnimCmd *const gAnims_MonPic[MAX_MON_PIC_FRAMES] = { sAnim_MonPic_0, sAnim_MonPic_1, diff --git a/src/data/battle_anim.h b/src/data/battle_anim.h index b1f158310a..46293e3a0a 100644 --- a/src/data/battle_anim.h +++ b/src/data/battle_anim.h @@ -1079,7 +1079,7 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] = {gBattleAnimSpriteGfx_RedFist, 0x0200, ANIM_TAG_RED_FIST}, {gBattleAnimSpriteGfx_SlamHit, 0x1000, ANIM_TAG_SLAM_HIT}, {gBattleAnimSpriteGfx_Ring, 0x0180, ANIM_TAG_RING}, -#if NEW_ROCKS_PARTICLE +#if B_NEW_ROCKS_PARTICLE == TRUE {gBattleAnimSpriteGfx_NewRocks, 0x0C00, ANIM_TAG_ROCKS}, #else {gBattleAnimSpriteGfx_Rocks, 0x0C00, ANIM_TAG_ROCKS}, @@ -1529,7 +1529,7 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] = {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_RED_FIST}, {gBattleAnimSpritePal_SlamHit, ANIM_TAG_SLAM_HIT}, {gBattleAnimSpritePal_Ring, ANIM_TAG_RING}, -#if NEW_ROCKS_PARTICLE +#if B_NEW_ROCKS_PARTICLE == TRUE {gBattleAnimSpritePal_NewRocks, ANIM_TAG_ROCKS}, #else {gBattleAnimSpritePal_Rocks, ANIM_TAG_ROCKS}, diff --git a/src/data/battle_frontier/battle_pyramid_open_level_wild_mons.h b/src/data/battle_frontier/battle_pyramid_open_level_wild_mons.h index f87c1bfc4d..c82b777c6b 100644 --- a/src/data/battle_frontier/battle_pyramid_open_level_wild_mons.h +++ b/src/data/battle_frontier/battle_pyramid_open_level_wild_mons.h @@ -1038,7 +1038,7 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round20[] = } }; -static const struct PyramidWildMon *const sOpenLevelWildMonPointers[TOTAL_ROUNDS] = +static const struct PyramidWildMon *const sOpenLevelWildMonPointers[TOTAL_PYRAMID_ROUNDS] = { sOpenLevelWildMons_Round1, sOpenLevelWildMons_Round2, diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index c34ad89d0a..4a89222a96 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -26,7 +26,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -42,7 +41,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -58,7 +56,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -74,7 +71,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -90,7 +86,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -106,7 +101,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -122,7 +116,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_IRON_FIST_BOOST | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -138,7 +131,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_IRON_FIST_BOOST | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -154,7 +146,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_IRON_FIST_BOOST | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -170,7 +161,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -186,7 +176,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -202,7 +191,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -222,7 +210,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_BOTH, .priority = 0, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -242,7 +229,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED | FLAG_DANCE, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -258,7 +244,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -274,7 +259,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_DMG_2X_IN_AIR | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -290,7 +274,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -314,7 +297,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = -6, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -322,10 +304,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_4 .power = 90, - .zMovePower = 175, #else .power = 70, - .zMovePower = 140, #endif .effect = EFFECT_SEMI_INVULNERABLE, .type = TYPE_FLYING, @@ -355,7 +335,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -371,7 +350,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -395,7 +373,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -411,7 +388,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_DMG_MINIMIZE, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -427,7 +403,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_TWO_STRIKES, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -443,7 +418,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -452,15 +426,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_5 .power = 100, .pp = 10, - .zMovePower = 180, #elif B_UPDATED_MOVE_DATA == GEN_4 .power = 85, .pp = 25, - .zMovePower = 160, #else .power = 70, .pp = 25, - .zMovePower = 140, #endif .effect = EFFECT_RECOIL_IF_MISS, .type = TYPE_FIGHTING, @@ -489,7 +460,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -505,7 +475,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_EVSN_UP_1, }, @@ -521,7 +490,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -537,7 +505,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -553,7 +520,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -569,7 +535,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -593,7 +558,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -613,7 +577,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -633,7 +596,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -649,7 +611,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_RECKLESS_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -658,11 +619,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_5 .power = 120, .pp = 10, - .zMovePower = 190, #else .power = 90, .pp = 20, - .zMovePower = 175, #endif .effect = EFFECT_RAMPAGE, .type = TYPE_NORMAL, @@ -687,7 +646,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_RECKLESS_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -703,7 +661,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -719,7 +676,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -735,7 +691,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_TWO_STRIKES, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -756,7 +711,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -772,7 +726,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -788,7 +741,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_STRONG_JAW_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -804,7 +756,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -828,7 +779,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = -6, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -844,7 +794,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -860,7 +809,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -876,7 +824,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -900,7 +847,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -920,7 +866,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -936,7 +881,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -956,7 +900,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -972,7 +915,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RECOVER_HP, }, @@ -988,7 +930,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -996,10 +937,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 110, - .zMovePower = 185, #else .power = 120, - .zMovePower = 190, #endif .effect = EFFECT_HIT, .type = TYPE_WATER, @@ -1033,7 +972,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_DMG_UNDERWATER, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1053,7 +991,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1061,10 +998,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 110, - .zMovePower = 185, #else .power = 120, - .zMovePower = 190, #endif .effect = EFFECT_FREEZE_HIT, .type = TYPE_ICE, @@ -1090,7 +1025,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1106,7 +1040,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1122,7 +1055,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1138,7 +1070,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1154,7 +1085,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1170,7 +1100,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1190,7 +1119,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_RECKLESS_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1206,7 +1134,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1228,7 +1155,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_DEPENDS, .priority = -5, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1244,7 +1170,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1260,7 +1185,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1280,7 +1204,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1300,7 +1223,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1316,7 +1238,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -1340,7 +1261,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -1356,7 +1276,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1372,7 +1291,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1388,7 +1306,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_POWDER, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -1404,7 +1321,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_POWDER, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -1420,7 +1336,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_POWDER, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -1429,15 +1344,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_5 .power = 120, .pp = 10, - .zMovePower = 190, #elif B_UPDATED_MOVE_DATA == GEN_4 .power = 90, .pp = 20, - .zMovePower = 175, #else .power = 70, .pp = 20, - .zMovePower = 140, #endif .effect = EFFECT_RAMPAGE, .type = TYPE_GRASS, @@ -1466,7 +1378,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -1482,7 +1393,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1503,7 +1413,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1520,7 +1429,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1540,7 +1448,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1560,7 +1467,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -1568,10 +1474,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 110, - .zMovePower = 185, #else .power = 120, - .zMovePower = 190, #endif .effect = EFFECT_THUNDER, .type = TYPE_ELECTRIC, @@ -1597,7 +1501,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1613,7 +1516,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_DMG_UNDERGROUND, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1629,7 +1531,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_DMG_UNDERGROUND, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1637,10 +1538,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_4 .power = 80, - .zMovePower = 160, #else .power = 60, - .zMovePower = 120, #endif .effect = EFFECT_SEMI_INVULNERABLE, .type = TYPE_GROUND, @@ -1670,7 +1569,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -1686,7 +1584,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1702,7 +1599,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1718,7 +1614,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -1734,7 +1629,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -1750,7 +1644,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -1766,7 +1659,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 1, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1782,7 +1674,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1798,7 +1689,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = -6, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RECOVER_HP, }, @@ -1814,7 +1704,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -1830,7 +1719,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ACC_UP_1, }, @@ -1846,7 +1734,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -1862,7 +1749,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -1884,7 +1770,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -1900,7 +1785,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -1920,7 +1804,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -1936,7 +1819,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_EVSN_UP_1, }, @@ -1952,7 +1834,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -1968,7 +1849,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -1984,7 +1864,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ACC_UP_1, }, @@ -2004,7 +1883,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -2020,7 +1898,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -2036,7 +1913,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RECOVER_HP, }, @@ -2052,7 +1928,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -2068,7 +1943,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ACC_UP_1, }, @@ -2089,7 +1963,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2105,7 +1978,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2121,7 +1993,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_2, }, @@ -2137,7 +2008,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2153,7 +2023,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_BALLISTIC, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2173,7 +2042,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2193,7 +2061,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2209,7 +2076,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2225,7 +2091,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2233,10 +2098,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 110, - .zMovePower = 185, #else .power = 120, - .zMovePower = 190, #endif .effect = EFFECT_BURN_HIT, .type = TYPE_FIRE, @@ -2270,7 +2133,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2291,7 +2153,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2307,7 +2168,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2316,11 +2176,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 130, .pp = 10, - .zMovePower = 195, #else .power = 100, .pp = 15, - .zMovePower = 180, #endif .effect = EFFECT_SKULL_BASH, .type = TYPE_NORMAL, @@ -2345,7 +2203,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2361,7 +2218,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2377,7 +2233,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -2397,7 +2252,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_EVSN_UP_1, }, @@ -2417,7 +2271,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -2426,15 +2279,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_5 .power = 130, .pp = 10, - .zMovePower = 195, #elif B_UPDATED_MOVE_DATA == GEN_4 .power = 100, .pp = 20, - .zMovePower = 180, #else .power = 85, .pp = 20, - .zMovePower = 60, #endif .effect = EFFECT_RECOIL_IF_MISS, .type = TYPE_FIGHTING, @@ -2465,7 +2315,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -2481,7 +2330,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2505,7 +2353,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -2521,7 +2368,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_BALLISTIC, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2530,11 +2376,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_7 .power = 80, .pp = 10, - .zMovePower = 160, #else .power = 20, .pp = 15, - .zMovePower = 100, #endif .effect = EFFECT_ABSORB, .type = TYPE_BUG, @@ -2559,7 +2403,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -2580,7 +2423,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .split = SPLIT_PHYSICAL, .argument = MOVE_EFFECT_FLINCH, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2596,7 +2438,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RECOVER_HP, }, @@ -2616,7 +2457,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2632,7 +2472,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_IRON_FIST_BOOST | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2648,7 +2487,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_POWDER, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -2668,7 +2506,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_EVSN_UP_1, }, @@ -2688,7 +2525,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2704,7 +2540,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_3, }, @@ -2724,7 +2559,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -2733,15 +2567,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 100, .accuracy = 90, - .zMovePower = 180, #elif B_UPDATED_MOVE_DATA == GEN_5 .power = 90, .accuracy = 90, - .zMovePower = 175, #else .power = 90, .accuracy = 85, - .zMovePower = 175, #endif .effect = EFFECT_HIT, .type = TYPE_WATER, @@ -2766,7 +2597,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2782,7 +2612,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2798,7 +2627,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_TWO_STRIKES, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2818,7 +2646,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -2834,7 +2661,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2850,7 +2676,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_STRONG_JAW_BOOST | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2866,7 +2691,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -2886,7 +2710,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ALL_STATS_UP_1, }, @@ -2902,7 +2725,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2918,7 +2740,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2934,7 +2755,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2950,7 +2770,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -2972,7 +2791,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -2988,7 +2806,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ALL_STATS_UP_1, }, @@ -3004,7 +2821,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3013,11 +2829,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 60, .pp = 25, - .zMovePower = 120, #else .power = 40, .pp = 10, - .zMovePower = 100, #endif .effect = EFFECT_THIEF, .type = TYPE_DARK, @@ -3046,7 +2860,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -3066,7 +2879,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -3086,7 +2898,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -3102,7 +2913,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_THAW_USER, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3126,7 +2936,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3146,7 +2955,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_CURSE, }, @@ -3162,7 +2970,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3178,7 +2985,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RECOVER_HP, }, @@ -3194,7 +3000,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, .split = SPLIT_SPECIAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3218,7 +3023,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_POWDER, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -3234,7 +3038,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3254,7 +3057,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RECOVER_HP, }, @@ -3270,7 +3072,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3290,7 +3091,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .flags = FLAG_PROTECTION_MOVE, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -3306,7 +3106,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 1, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3326,7 +3125,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -3346,7 +3144,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3366,7 +3163,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -3382,7 +3178,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RECOVER_HP, }, @@ -3398,7 +3193,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_BALLISTIC, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3414,7 +3208,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3430,7 +3223,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_BALLISTIC | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3450,7 +3242,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_OPPONENTS_FIELD, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -3458,10 +3249,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_4 .power = 120, - .zMovePower = 190, #else .power = 100, - .zMovePower = 180, #endif .effect = EFFECT_PARALYZE_HIT, .type = TYPE_ELECTRIC, @@ -3495,7 +3284,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_BOOST_CRITS, }, @@ -3511,7 +3299,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_FOLLOW_ME, }, @@ -3527,7 +3314,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SOUND, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -3543,7 +3329,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3563,7 +3348,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .flags = FLAG_PROTECTION_MOVE, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_EVSN_UP_1, }, @@ -3583,7 +3367,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3603,7 +3386,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -3612,15 +3394,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_5 .power = 120, .pp = 10, - .zMovePower = 190, #elif B_UPDATED_MOVE_DATA == GEN_4 .power = 120, .pp = 15, - .zMovePower = 190, #else .power = 90, .pp = 15, - .zMovePower = 175, #endif .effect = EFFECT_RAMPAGE, .type = TYPE_DRAGON, @@ -3645,7 +3424,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_WIND_MOVE, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -3654,15 +3432,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_5 .power = 75, .pp = 10, - .zMovePower = 140, #elif B_UPDATED_MOVE_DATA == GEN_4 .power = 60, .pp = 10, - .zMovePower = 120, #else .power = 60, .pp = 5, - .zMovePower = 120, #endif .effect = EFFECT_ABSORB, .type = TYPE_GRASS, @@ -3691,7 +3466,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .flags = FLAG_PROTECTION_MOVE, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -3711,7 +3485,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -3727,7 +3500,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3743,7 +3515,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3763,7 +3534,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -3783,7 +3553,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -3799,7 +3568,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3821,7 +3589,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3837,7 +3604,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3857,7 +3623,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -3873,7 +3638,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -3889,7 +3653,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_BOOST_CRITS, }, @@ -3909,7 +3672,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RECOVER_HP, }, @@ -3925,7 +3687,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3941,7 +3702,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3957,7 +3717,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -3973,7 +3732,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -3989,7 +3747,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -4005,7 +3762,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_THAW_USER, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4021,7 +3777,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_DMG_UNDERGROUND, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4037,7 +3792,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_IRON_FIST_BOOST | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4053,7 +3807,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4069,7 +3822,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4085,7 +3837,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -4105,7 +3856,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -4121,7 +3871,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4141,7 +3890,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4161,7 +3909,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ACC_UP_1, }, @@ -4177,7 +3924,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4193,7 +3939,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4209,7 +3954,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = -1, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4225,7 +3969,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -4241,7 +3984,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -4261,7 +4003,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -4281,7 +4022,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4297,7 +4037,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4317,7 +4056,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_BOTH, .priority = 0, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4333,7 +4071,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -4349,7 +4086,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -4369,7 +4105,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_STRONG_JAW_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4391,7 +4126,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_DEPENDS, .priority = -5, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4411,7 +4145,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RECOVER_HP, }, @@ -4431,7 +4164,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4451,7 +4183,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4467,7 +4198,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_BALLISTIC, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4477,17 +4207,14 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .power = 120, .accuracy = 100, .pp = 10, - .zMovePower = 190, #elif B_UPDATED_MOVE_DATA == GEN_5 .power = 100, .accuracy = 100, .pp = 10, - .zMovePower = 180, #else .power = 80, .accuracy = 90, .pp = 15, - .zMovePower = 160, #endif .effect = EFFECT_FUTURE_SIGHT, .type = TYPE_PSYCHIC, @@ -4515,7 +4242,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4536,7 +4262,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_DMG_UNDERWATER, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4556,7 +4281,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4580,7 +4304,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .secondaryEffectChance = 100, .target = MOVE_TARGET_SELECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4588,10 +4311,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_5 .power = 90, - .zMovePower = 175, #else .power = 50, - .zMovePower = 100, #endif .effect = EFFECT_UPROAR, .type = TYPE_NORMAL, @@ -4621,7 +4342,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RECOVER_HP, }, @@ -4641,7 +4361,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4657,7 +4376,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -4665,10 +4383,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 95, - .zMovePower = 175, #else .power = 100, - .zMovePower = 180, #endif .effect = EFFECT_BURN_HIT, .type = TYPE_FIRE, @@ -4694,7 +4410,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -4714,7 +4429,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -4730,7 +4444,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -4750,7 +4463,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -4766,7 +4478,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESTORE_REPLACEMENT_HP, }, @@ -4782,7 +4493,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4798,7 +4508,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = -3, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_IRON_FIST_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4806,10 +4515,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 70, - .zMovePower = 140, #else .power = 60, - .zMovePower = 120, #endif .effect = EFFECT_SMELLINGSALT, .type = TYPE_NORMAL, @@ -4840,14 +4547,13 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, [MOVE_NATURE_POWER] = { .effect = EFFECT_NATURE_POWER, - .power = 0, + .power = 1, .type = TYPE_NORMAL, .accuracy = 0, .pp = 20, @@ -4856,7 +4562,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4872,7 +4577,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -4894,7 +4598,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -4914,7 +4617,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 5, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -4930,7 +4632,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_2, }, @@ -4946,7 +4647,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -4966,7 +4666,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -4982,7 +4681,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -4998,7 +4696,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -5014,7 +4711,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5030,7 +4726,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 4, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_2, }, @@ -5050,7 +4745,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_2, }, @@ -5066,7 +4760,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = -4, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5082,7 +4775,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5098,7 +4790,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -5106,10 +4797,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 65, - .zMovePower = 120, #else .power = 20, - .zMovePower = 100, #endif .effect = EFFECT_KNOCK_OFF, .type = TYPE_DARK, @@ -5135,7 +4824,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5151,7 +4839,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5167,7 +4854,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -5187,7 +4873,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_2, }, @@ -5203,7 +4888,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RECOVER_HP, }, @@ -5219,7 +4903,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_FOLLOW_ME, }, @@ -5235,7 +4918,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 4, .flags = FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_2, }, @@ -5251,7 +4933,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5259,10 +4940,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_4 .power = 80, - .zMovePower = 160, #else .power = 60, - .zMovePower = 120, #endif .effect = EFFECT_SEMI_INVULNERABLE, .type = TYPE_WATER, @@ -5288,7 +4967,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5304,7 +4982,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_EVSN_UP_1, }, @@ -5324,7 +5001,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -5340,7 +5016,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5356,7 +5031,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_BALLISTIC | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5372,7 +5046,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_DANCE, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -5392,7 +5065,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_FOES_AND_ALLY, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -5408,7 +5080,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_HIGH_CRIT | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5424,7 +5095,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -5440,7 +5110,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_BALLISTIC, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5460,7 +5129,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5480,7 +5148,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -5496,7 +5163,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5516,7 +5182,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_STRONG_JAW_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5532,7 +5197,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5548,7 +5212,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5564,7 +5227,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5573,11 +5235,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 90, .accuracy = 90, - .zMovePower = 175, #else .power = 100, .accuracy = 85, - .zMovePower = 180, #endif .effect = EFFECT_ATTACK_UP_HIT, .type = TYPE_STEEL, @@ -5606,7 +5266,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5622,7 +5281,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_BALLISTIC, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5638,7 +5296,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RECOVER_HP, }, @@ -5654,7 +5311,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -5662,10 +5318,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 60, - .zMovePower = 120, #else .power = 55, - .zMovePower = 100, #endif .effect = EFFECT_HIT, .type = TYPE_FLYING, @@ -5684,15 +5338,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 130, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 195, #elif B_UPDATED_MOVE_DATA == GEN_4 || B_UPDATED_MOVE_DATA == GEN_5 .power = 140, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 200, #else .power = 140, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 200, #endif .effect = EFFECT_OVERHEAT, .type = TYPE_FIRE, @@ -5725,7 +5376,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -5735,12 +5385,10 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .power = 60, .accuracy = 95, .pp = 15, - .zMovePower = 120, #else .power = 50, .accuracy = 80, .pp = 10, - .zMovePower = 100, #endif .effect = EFFECT_SPEED_DOWN_HIT, .type = TYPE_ROCK, @@ -5764,7 +5412,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5780,7 +5427,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -5796,7 +5442,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -5812,7 +5457,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -5828,7 +5472,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -5844,7 +5487,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5860,7 +5502,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5876,7 +5517,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5900,7 +5540,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5916,7 +5555,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST | FLAG_DMG_IN_AIR, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5937,7 +5575,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5953,7 +5590,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5973,7 +5609,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -5993,7 +5628,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_BALLISTIC, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6009,7 +5643,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6029,7 +5662,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6045,7 +5677,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -6065,7 +5696,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -6073,10 +5703,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_8 .flags = FLAG_SNATCH_AFFECTED | FLAG_SOUND, + .effect = EFFECT_ATTACK_UP_USER_ALLY, #else .flags = FLAG_SNATCH_AFFECTED, + .effect = EFFECT_ATTACK_UP, #endif - .effect = EFFECT_ATTACK_UP, .power = 0, .type = TYPE_NORMAL, .accuracy = 0, @@ -6085,7 +5716,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -6101,7 +5731,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6117,7 +5746,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6133,7 +5761,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -6150,7 +5777,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, .argument = MOVE_EFFECT_PARALYSIS, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6166,7 +5792,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6182,7 +5807,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6192,22 +5816,18 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .power = 60, .pp = 25, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, - .zMovePower = 120, #elif B_UPDATED_MOVE_DATA == GEN_5 .power = 60, .pp = 40, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, - .zMovePower = 120, #elif B_UPDATED_MOVE_DATA == GEN_4 .power = 40, .pp = 40, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, - .zMovePower = 100, #else .power = 40, .pp = 40, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, - .zMovePower = 100, #endif .effect = EFFECT_THIEF, .type = TYPE_NORMAL, @@ -6236,7 +5856,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_RECKLESS_BOOST | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6252,7 +5871,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6268,7 +5886,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -6284,7 +5901,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -6292,10 +5908,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_4 .power = 90, - .zMovePower = 175, #else .power = 70, - .zMovePower = 140, #endif .effect = EFFECT_HIT, .type = TYPE_GRASS, @@ -6321,7 +5935,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED | FLAG_DANCE, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -6345,7 +5958,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6361,7 +5973,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6377,7 +5988,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_MEGA_LAUNCHER_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6386,11 +5996,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_5 .power = 140, .accuracy = 100, - .zMovePower = 200, #else .power = 120, .accuracy = 85, - .zMovePower = 190, #endif .effect = EFFECT_FUTURE_SIGHT, .type = TYPE_STEEL, @@ -6415,7 +6023,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6435,7 +6042,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -6451,7 +6057,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -6471,7 +6076,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -6479,10 +6083,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 70, - .zMovePower = 140, #else .power = 60, - .zMovePower = 120, #endif .effect = EFFECT_WAKE_UP_SLAP, .type = TYPE_FIGHTING, @@ -6509,7 +6111,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6525,7 +6126,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_BALLISTIC, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6545,7 +6145,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6561,7 +6160,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6577,7 +6175,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6601,7 +6198,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 2, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6617,7 +6213,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6637,7 +6232,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED | FLAG_WIND_MOVE, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_BOOST_CRITS, }, @@ -6657,7 +6251,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER | MOVE_TARGET_ALLY, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_BOOST_CRITS, }, @@ -6692,7 +6285,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6708,7 +6300,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6724,7 +6315,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6732,10 +6322,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 60, - .zMovePower = 120, #else .power = 50, - .zMovePower = 100, #endif .effect = EFFECT_ASSURANCE, .type = TYPE_DARK, @@ -6765,7 +6353,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -6781,7 +6368,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6801,7 +6387,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_2, }, @@ -6832,17 +6417,16 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .accuracy = 100, .pp = 15, .secondaryEffectChance = 0, - .target = MOVE_TARGET_SELECTED, + .target = MOVE_TARGET_BOTH, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_2, }, [MOVE_WRING_OUT] = { .effect = EFFECT_WRING_OUT, - .power = 0, + .power = 1, .type = TYPE_NORMAL, .accuracy = 100, .pp = 5, @@ -6869,7 +6453,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -6885,7 +6468,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -6905,7 +6487,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_EVSN_UP_1, }, @@ -6921,7 +6502,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_2, }, @@ -6937,7 +6517,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ACC_UP_1, }, @@ -6953,7 +6532,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -6969,7 +6547,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -6985,7 +6562,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -6993,10 +6569,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_5 .power = 140, - .zMovePower = 200, #else .power = 130, - .zMovePower = 195, #endif .effect = EFFECT_LAST_RESORT, .type = TYPE_NORMAL, @@ -7022,7 +6596,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -7030,10 +6603,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_7 .power = 70, - .zMovePower = 140, #else .power = 80, - .zMovePower = 160, #endif .effect = EFFECT_SUCKER_PUNCH, .type = TYPE_DARK, @@ -7063,7 +6634,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_OPPONENTS_FIELD, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -7079,7 +6649,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_BOOST_CRITS, }, @@ -7099,7 +6668,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -7119,7 +6687,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_EVSN_UP_1, }, @@ -7136,7 +6703,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_RECKLESS_BOOST | FLAG_THAW_USER, .split = SPLIT_PHYSICAL, .argument = STATUS1_BURN, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7152,7 +6718,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7160,10 +6725,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 80, - .zMovePower = 160, #else .power = 90, - .zMovePower = 175, #endif .effect = EFFECT_HIT, .type = TYPE_FIGHTING, @@ -7189,7 +6752,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -7205,7 +6767,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7225,7 +6786,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7241,7 +6801,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7257,7 +6816,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7273,7 +6831,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_BALLISTIC, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7297,7 +6854,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_SPECIAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7313,7 +6869,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7329,7 +6884,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SOUND | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7337,10 +6891,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 85, - .zMovePower = 160, #else .power = 90, - .zMovePower = 175, #endif .effect = EFFECT_HIT, .type = TYPE_DRAGON, @@ -7372,7 +6924,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7380,10 +6931,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 80, - .zMovePower = 160, #else .power = 70, - .zMovePower = 140, #endif .effect = EFFECT_HIT, .type = TYPE_ROCK, @@ -7402,11 +6951,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_5 .power = 75, .pp = 10, - .zMovePower = 140, #else .power = 60, .pp = 5, - .zMovePower = 120, #endif .effect = EFFECT_ABSORB, .type = TYPE_FIGHTING, @@ -7431,7 +6978,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 1, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7447,7 +6993,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_BALLISTIC, .split = SPLIT_SPECIAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7455,10 +7000,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 90, - .zMovePower = 175, #else .power = 80, - .zMovePower = 160, #endif .effect = EFFECT_SPECIAL_DEFENSE_DOWN_HIT, .type = TYPE_GRASS, @@ -7484,7 +7027,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_RECKLESS_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7500,7 +7042,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7516,7 +7057,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_2, }, @@ -7532,7 +7072,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7548,7 +7087,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -7564,7 +7102,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 1, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7580,7 +7117,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = -4, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7596,7 +7132,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 1, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7612,7 +7147,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7633,7 +7167,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .split = SPLIT_PHYSICAL, .argument = STATUS1_PARALYSIS, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7654,7 +7187,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .split = SPLIT_PHYSICAL, .argument = STATUS1_FREEZE, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7675,7 +7207,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .split = SPLIT_PHYSICAL, .argument = STATUS1_BURN, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7691,7 +7222,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 1, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7707,7 +7237,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_BALLISTIC, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7723,7 +7252,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7739,7 +7267,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7755,7 +7282,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7771,7 +7297,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7787,7 +7312,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7807,7 +7331,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ACC_UP_1, }, @@ -7823,7 +7346,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = -7, .flags = FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ACC_UP_1, }, @@ -7831,10 +7353,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 130, - .zMovePower = 195, #else .power = 140, - .zMovePower = 200, #endif .effect = EFFECT_OVERHEAT, .type = TYPE_DRAGON, @@ -7860,7 +7380,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7876,7 +7395,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7884,10 +7402,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 130, - .zMovePower = 195, #else .power = 140, - .zMovePower = 200, #endif .effect = EFFECT_OVERHEAT, .type = TYPE_GRASS, @@ -7913,7 +7429,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7929,7 +7444,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_BALLISTIC, .split = SPLIT_PHYSICAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7945,7 +7459,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SHEER_FORCE_BOOST | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7965,7 +7478,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -7985,7 +7497,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8001,7 +7512,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_BALLISTIC, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8017,7 +7527,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8033,7 +7542,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_2, }, @@ -8053,7 +7561,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_OPPONENTS_FIELD, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -8069,7 +7576,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8095,7 +7601,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8112,7 +7617,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, .argument = HOLD_EFFECT_PLATE, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8128,7 +7632,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8144,7 +7647,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8160,7 +7662,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_RECKLESS_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8176,7 +7677,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 1, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8192,7 +7692,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8208,7 +7707,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -8224,7 +7722,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -8240,7 +7737,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_RECKLESS_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8256,7 +7752,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_TWO_STRIKES, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8272,7 +7767,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8288,7 +7782,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, .split = SPLIT_SPECIAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8308,7 +7801,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8324,7 +7816,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8333,15 +7824,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 100, .accuracy = 75, - .zMovePower = 180, #elif B_UPDATED_MOVE_DATA == GEN_5 .power = 120, .accuracy = 75, - .zMovePower = 190, #else .power = 120, .accuracy = 70, - .zMovePower = 190, #endif .effect = EFFECT_TRAP, .type = TYPE_FIRE, @@ -8370,7 +7858,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -8386,7 +7873,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8398,11 +7884,10 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .accuracy = 100, .pp = 5, .secondaryEffectChance = 10, - .target = MOVE_TARGET_BOTH, + .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8422,7 +7907,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, .argument = MOVE_EFFECT_FEINT, }, @@ -8439,7 +7923,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -8456,7 +7939,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = FLAG_PROTECTION_MOVE | FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, .argument = TRUE, // Protects the whole side. - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -8472,7 +7954,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -8488,7 +7969,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -8508,7 +7988,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_ALL_BATTLERS, .flags = FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -8524,7 +8003,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8540,7 +8018,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8556,7 +8033,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -8576,7 +8052,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .flags = FLAG_POWDER, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -8592,7 +8067,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -8612,7 +8086,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_ALL_BATTLERS, .flags = FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -8628,7 +8101,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_DMG_IN_AIR, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8636,10 +8108,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 60, - .zMovePower = 120, #else .power = 40, - .zMovePower = 100, #endif .effect = EFFECT_ALWAYS_CRIT, .type = TYPE_FIGHTING, @@ -8665,7 +8135,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8681,7 +8150,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8697,7 +8165,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED | FLAG_DANCE, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -8717,7 +8184,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8726,11 +8192,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 120, .pp = 10, - .zMovePower = 190, #else .power = 70, .pp = 15, - .zMovePower = 140, #endif .effect = EFFECT_SYNCHRONOISE, .type = TYPE_PSYCHIC, @@ -8755,7 +8219,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_BALLISTIC, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8771,7 +8234,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -8787,7 +8249,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8803,7 +8264,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -8823,7 +8283,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8839,7 +8298,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_BALLISTIC | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8855,7 +8313,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8871,7 +8328,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -8887,7 +8343,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -8903,7 +8358,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -8914,12 +8368,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .type = TYPE_NORMAL, .accuracy = 100, .pp = 15, - .secondaryEffectChance = 0, + .secondaryEffectChance = 100, .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SOUND, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8935,7 +8388,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SOUND, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8951,7 +8403,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_STAT_STAGES_IGNORED, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8967,7 +8418,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -8983,7 +8433,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9000,7 +8449,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = FLAG_PROTECTION_MOVE | FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, .argument = TRUE, // Protects the whole side. - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -9020,7 +8468,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_2, }, @@ -9036,7 +8483,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_THAW_USER, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9052,7 +8498,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -9068,7 +8513,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MEGA_LAUNCHER_BOOST, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -9088,7 +8532,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9104,7 +8547,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9120,7 +8562,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -9136,7 +8577,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = -6, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9144,10 +8584,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 60, - .zMovePower = 120, #else .power = 30, - .zMovePower = 100, #endif .effect = EFFECT_INCINERATE, .type = TYPE_FIRE, @@ -9173,7 +8611,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -9189,7 +8626,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9205,7 +8641,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -9221,7 +8656,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9237,7 +8671,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9257,7 +8690,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_2, }, @@ -9273,7 +8705,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9281,10 +8712,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 80, - .zMovePower = 160, #else .power = 50, - .zMovePower = 100, #endif .effect = EFFECT_PLEDGE, .type = TYPE_WATER, @@ -9302,10 +8731,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 80, - .zMovePower = 160, #else .power = 50, - .zMovePower = 100, #endif .effect = EFFECT_PLEDGE, .type = TYPE_FIRE, @@ -9323,10 +8750,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 80, - .zMovePower = 160, #else .power = 50, - .zMovePower = 100, #endif .effect = EFFECT_PLEDGE, .type = TYPE_GRASS, @@ -9352,7 +8777,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9372,7 +8796,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9388,7 +8811,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9396,10 +8818,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 60, - .zMovePower = 120, #else .power = 40, - .zMovePower = 100, #endif .effect = EFFECT_ALWAYS_CRIT, .type = TYPE_ICE, @@ -9425,7 +8845,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = -6, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9441,7 +8860,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -9457,7 +8875,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9473,7 +8890,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_RECKLESS_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9489,7 +8905,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9505,7 +8920,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_TWO_STRIKES, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9521,7 +8935,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9537,7 +8950,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9557,7 +8969,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_STAT_STAGES_IGNORED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9573,7 +8984,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9593,7 +9003,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9609,7 +9018,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9625,7 +9033,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .split = SPLIT_PHYSICAL, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_DMG_MINIMIZE, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9641,7 +9048,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -9657,7 +9063,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9673,7 +9078,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9689,7 +9093,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9697,10 +9100,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 110, - .zMovePower = 185, #else .power = 120, - .zMovePower = 190, #endif .effect = EFFECT_HURRICANE, .type = TYPE_FLYING, @@ -9726,7 +9127,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_RECKLESS_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9742,7 +9142,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_TWO_STRIKES, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9758,7 +9157,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_BALLISTIC | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9766,10 +9164,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 120, - .zMovePower = 190, #else .power = 85, - .zMovePower = 160, #endif .effect = EFFECT_CHANGE_TYPE_ON_ITEM, .type = TYPE_NORMAL, @@ -9796,7 +9192,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, .argument = STATUS1_SLEEP, }, @@ -9813,7 +9208,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9829,7 +9223,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9845,7 +9238,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 195, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9861,7 +9253,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 195, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9877,7 +9268,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_DANCE | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9894,7 +9284,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, .argument = MOVE_EFFECT_PARALYSIS, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9911,7 +9300,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, .argument = MOVE_EFFECT_BURN, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9927,7 +9315,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_SOUND, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9943,7 +9330,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9959,7 +9345,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 220, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9975,7 +9360,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_THAW_USER, .split = SPLIT_SPECIAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -9991,7 +9375,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10012,7 +9395,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_DMG_MINIMIZE, .split = SPLIT_PHYSICAL, .argument = TYPE_FLYING, - .zMovePower = 170, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10029,7 +9411,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, .argument = TRUE, // Protects the whole side. - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -10045,7 +9426,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10061,7 +9441,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -10077,7 +9456,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAGIC_COAT_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -10097,7 +9475,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10118,7 +9495,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .split = SPLIT_PHYSICAL, .argument = MOVE_EFFECT_FEINT, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10135,7 +9511,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, .argument = TYPE_GHOST, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ALL_STATS_UP_1, }, @@ -10151,7 +9526,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -10167,7 +9541,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 1, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -10175,10 +9548,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_7 .power = 65, - .zMovePower = 120, #else .power = 50, - .zMovePower = 100, #endif .effect = EFFECT_ABSORB, .type = TYPE_ELECTRIC, @@ -10205,7 +9576,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, .argument = TYPE_GRASS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ALL_STATS_UP_1, }, @@ -10221,7 +9591,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_WIND_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10237,7 +9606,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10253,7 +9621,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SOUND, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10269,7 +9636,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESTORE_REPLACEMENT_HP, }, @@ -10289,7 +9655,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -10306,7 +9671,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, .argument = 75, // restores 75% HP instead of 50% HP - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10324,7 +9688,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = 0, .split = SPLIT_STATUS, .argument = TRUE, // Protects the whole side. - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -10340,7 +9703,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -10356,7 +9718,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -10372,7 +9733,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -10388,7 +9748,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -10404,7 +9763,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10420,7 +9778,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10436,7 +9793,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10452,7 +9808,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SOUND, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10468,7 +9823,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -10484,7 +9838,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 4, .flags = FLAG_PROTECTION_MOVE, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -10500,7 +9853,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -10516,7 +9868,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -10536,7 +9887,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10552,7 +9902,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_THAW_USER, .split = SPLIT_SPECIAL, - .zMovePower = 185, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10568,7 +9917,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10588,7 +9936,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 1, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10597,10 +9944,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_7 .power = 75, - .zMovePower = 140, #else .power = 65, - .zMovePower = 120, #endif .effect = EFFECT_SPECIAL_ATTACK_DOWN_HIT, .type = TYPE_FIRE, @@ -10626,7 +9971,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 4, .flags = FLAG_PROTECTION_MOVE, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -10642,7 +9986,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_2, }, @@ -10658,7 +10001,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -10674,7 +10016,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -10690,7 +10031,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 1, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_POWDER, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_2, }, @@ -10706,7 +10046,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ALL_STATS_UP_1, }, @@ -10722,7 +10061,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -10738,7 +10076,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ALL_STATS_UP_1, }, @@ -10754,7 +10091,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -10770,7 +10106,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10786,7 +10121,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ALL_STATS_UP_1, }, @@ -10802,7 +10136,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ALL_STATS_UP_1, }, @@ -10818,7 +10151,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 1, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -10834,7 +10166,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10850,7 +10181,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10866,7 +10196,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10882,7 +10211,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10899,7 +10227,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, .argument = 75, // restores 75% HP instead of 50% HP - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10915,7 +10242,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_DMG_IN_AIR | FLAG_DMG_UNGROUNDED_IGNORE_TYPE_IF_FLYING, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10931,7 +10257,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10947,7 +10272,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10963,7 +10287,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_RECKLESS_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10979,7 +10302,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_MEGA_LAUNCHER_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 185, .zMoveEffect = Z_EFFECT_NONE, }, @@ -10995,7 +10317,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11011,7 +10332,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11045,7 +10365,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -11061,7 +10380,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 2, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11077,7 +10395,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 4, .flags = FLAG_PROTECTION_MOVE, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -11093,7 +10410,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11109,7 +10425,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_STAT_STAGES_IGNORED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11126,7 +10441,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SOUND | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, .argument = STATUS1_BURN, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11142,7 +10456,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11158,7 +10471,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, }, @@ -11174,7 +10486,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11190,7 +10501,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -11206,7 +10516,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11222,7 +10531,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11238,7 +10546,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 3, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPDEF_UP_1, }, @@ -11254,7 +10561,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -11270,7 +10576,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ATK_UP_1, }, @@ -11286,7 +10591,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -11302,7 +10606,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11318,7 +10621,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_BALLISTIC, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11334,7 +10636,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11350,7 +10651,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -11366,7 +10666,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11382,7 +10681,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11398,7 +10696,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11414,7 +10711,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_THAW_USER, .split = SPLIT_SPECIAL, - .zMovePower = 195, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11430,7 +10726,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, @@ -11446,7 +10741,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11462,7 +10756,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_ALL_STATS_UP_1, }, @@ -11478,7 +10771,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_DANCE, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11494,7 +10786,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11510,7 +10801,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11526,7 +10816,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPATK_UP_1, }, @@ -11542,7 +10831,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = -3, .flags = FLAG_PROTECT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_BALLISTIC, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11554,11 +10842,10 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .accuracy = 100, .pp = 5, .secondaryEffectChance = 0, - .target = MOVE_TARGET_SELECTED, + .target = MOVE_TARGET_BOTH, .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SOUND, .split = SPLIT_SPECIAL, - .zMovePower = 185, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11574,7 +10861,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11590,7 +10876,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11606,13 +10891,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, }, [MOVE_SHELL_TRAP] = { - .effect = EFFECT_PLACEHOLDER, // EFFECT_SHELL_TRAP, + .effect = EFFECT_SHELL_TRAP, .power = 150, .type = TYPE_FIRE, .accuracy = 100, @@ -11622,7 +10906,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = -3, .flags = FLAG_PROTECT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11638,7 +10921,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 195, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11654,7 +10936,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_STRONG_JAW_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11670,7 +10951,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11686,7 +10966,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11702,7 +10981,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 1, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11718,7 +10996,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11734,7 +11011,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11750,7 +11026,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11766,7 +11041,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_TARGET_ABILITY_IGNORED, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11782,7 +11056,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_TARGET_ABILITY_IGNORED, .split = SPLIT_SPECIAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11798,7 +11071,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_DEF_UP_1, }, @@ -11814,7 +11086,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11830,7 +11101,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11838,10 +11108,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = { #if B_UPDATED_MOVE_DATA >= GEN_8 .power = 120, - .zMovePower = 190, #else .power = 90, - .zMovePower = 175, #endif .effect = EFFECT_CHANGE_TYPE_ON_ITEM, .type = TYPE_NORMAL, @@ -11868,7 +11136,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11884,7 +11151,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11900,7 +11166,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_TARGET_ABILITY_IGNORED, .split = SPLIT_SPECIAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11911,13 +11176,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .effect = EFFECT_EVASION_UP_HIT, .pp = 10, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, - .zMovePower = 160, #else .effect = EFFECT_ALWAYS_CRIT, .power = 50, .pp = 15, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 100, #endif .type = TYPE_ELECTRIC, .accuracy = 100, @@ -11944,7 +11207,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_BOTH, .priority = 0, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11964,7 +11226,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11984,7 +11245,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -11995,12 +11255,10 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .pp = 20, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .argument = 100, // restores 100% HP instead of 50% HP - .zMovePower = 120, #else .power = 90, .pp = 15, .flags = FLAG_PROTECT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 175, #endif .effect = EFFECT_ABSORB, .type = TYPE_WATER, @@ -12018,12 +11276,10 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .power = 60, .pp = 20, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 120, #else .power = 90, .pp = 15, .flags = FLAG_PROTECT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 175, #endif .effect = EFFECT_PARALYZE_HIT, .type = TYPE_ELECTRIC, @@ -12041,12 +11297,10 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .power = 60, .pp = 20, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_THAW_USER, - .zMovePower = 120, #else .power = 90, .pp = 15, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_THAW_USER, - .zMovePower = 175, #endif .effect = EFFECT_BURN_HIT, .type = TYPE_FIRE, @@ -12064,12 +11318,10 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .power = 80, .accuracy = 95, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 160, #else .power = 90, .accuracy = 100, .flags = FLAG_PROTECT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 175, #endif .effect = EFFECT_GLITZY_GLOW, .type = TYPE_PSYCHIC, @@ -12087,12 +11339,10 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .power = 80, .accuracy = 95, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 160, #else .power = 90, .accuracy = 100, .flags = FLAG_PROTECT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 175, #endif .effect = EFFECT_BADDY_BAD, .type = TYPE_DARK, @@ -12111,13 +11361,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .accuracy = 90, .pp = 10, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 180, #else .power = 90, .accuracy = 100, .pp = 15, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 175, #endif .effect = EFFECT_SAPPY_SEED, .type = TYPE_GRASS, @@ -12135,13 +11383,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .accuracy = 90, .pp = 10, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 180, #else .power = 90, .accuracy = 100, .pp = 15, .flags = FLAG_PROTECT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 175, #endif .effect = EFFECT_FREEZY_FROST, .type = TYPE_ICE, @@ -12159,13 +11405,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .accuracy = 85, .pp = 5, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 190, #else .power = 90, .accuracy = 100, .pp = 15, .flags = FLAG_PROTECT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - .zMovePower = 175, #endif .effect = EFFECT_SPARKLY_SWIRL, .type = TYPE_FAIRY, @@ -12192,7 +11436,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12212,7 +11455,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12228,7 +11470,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12244,7 +11485,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12260,7 +11500,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_STRONG_JAW_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12276,7 +11515,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12292,7 +11530,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12308,7 +11545,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12325,7 +11561,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_POWDER, .split = SPLIT_STATUS, .argument = TYPE_PSYCHIC, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12341,7 +11576,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_TWO_STRIKES, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12357,7 +11591,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12373,7 +11606,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12389,7 +11621,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12405,7 +11636,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_STRONG_JAW_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12421,7 +11651,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12437,7 +11666,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED | FLAG_SOUND, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12453,7 +11681,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12469,7 +11696,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12485,7 +11711,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12501,7 +11726,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12517,7 +11741,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_BALLISTIC | FLAG_SHEER_FORCE_BOOST | FLAG_THAW_USER, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12533,7 +11756,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12549,7 +11771,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12565,7 +11786,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 185, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12581,7 +11801,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12597,7 +11816,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12613,7 +11831,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SOUND, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12629,7 +11846,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12645,7 +11861,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12661,7 +11876,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12677,7 +11891,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12693,7 +11906,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12709,7 +11921,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 4, .flags = FLAG_PROTECTION_MOVE, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12725,7 +11936,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12741,7 +11951,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12757,7 +11966,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12773,7 +11981,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12789,7 +11996,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12805,7 +12011,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 195, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12821,7 +12026,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12837,7 +12041,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12853,7 +12056,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12869,7 +12071,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12889,7 +12090,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12905,7 +12105,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12921,7 +12120,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_MEGA_LAUNCHER_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12937,7 +12135,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12953,7 +12150,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12969,7 +12165,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -12985,7 +12180,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 185, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13001,7 +12195,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13017,7 +12210,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13033,7 +12225,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13049,7 +12240,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13065,7 +12255,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_TWO_STRIKES, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13081,7 +12270,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_THAW_USER, .split = SPLIT_SPECIAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13096,7 +12284,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .priority = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13116,7 +12303,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13132,7 +12318,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13148,7 +12333,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13164,7 +12348,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13180,7 +12363,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13196,7 +12378,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13212,7 +12393,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13232,7 +12412,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 195, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13248,7 +12427,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13264,7 +12442,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_SOUND, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13275,16 +12452,15 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #else .power = 60, #endif - .effect = EFFECT_PLACEHOLDER, // EFFECT_DIRE_CLAW, + .effect = EFFECT_DIRE_CLAW, .type = TYPE_POISON, .accuracy = 100, .pp = 15, - .secondaryEffectChance = 0, + .secondaryEffectChance = 50, .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13293,14 +12469,13 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .effect = EFFECT_DEFENSE_UP_HIT, .power = 70, .type = TYPE_PSYCHIC, - .accuracy = 100, + .accuracy = 90, .pp = 10, .secondaryEffectChance = 100, .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13316,24 +12491,23 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, [MOVE_STONE_AXE] = { - .effect = EFFECT_PLACEHOLDER, // EFFECT_STONE_AXE, + .effect = EFFECT_HIT_SET_ENTRY_HAZARD, .power = 65, .type = TYPE_ROCK, .accuracy = 90, .pp = 15, - .secondaryEffectChance = 0, - .target = MOVE_TARGET_USER, + .secondaryEffectChance = 100, + .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, + .argument = MOVE_EFFECT_STEALTH_ROCK, }, [MOVE_SPRINGTIDE_STORM] = @@ -13352,7 +12526,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13368,7 +12541,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13388,7 +12560,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13408,7 +12579,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13428,7 +12598,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13444,7 +12613,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13460,7 +12628,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED | FLAG_DANCE, .split = SPLIT_STATUS, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13480,23 +12647,25 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, [MOVE_BARB_BARRAGE] = { - .effect = EFFECT_PLACEHOLDER, // EFFECT_BARB_BARRAGE, + .effect = EFFECT_BARB_BARRAGE, .power = 60, .type = TYPE_POISON, .accuracy = 100, - .pp = 15, - .secondaryEffectChance = 0, + #if B_UPDATED_MOVE_DATA >= GEN_9 + .pp = 10, + #else + .pp = 15, + #endif + .secondaryEffectChance = 50, .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13516,7 +12685,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13536,7 +12704,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13552,7 +12719,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13572,7 +12738,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13588,24 +12753,23 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, }, [MOVE_CEASELESS_EDGE] = { - .effect = EFFECT_PLACEHOLDER, // EFFECT_CEASELESS_EDGE, + .effect = EFFECT_HIT_SET_ENTRY_HAZARD, .power = 65, .type = TYPE_DARK, .accuracy = 90, .pp = 15, - .secondaryEffectChance = 0, + .secondaryEffectChance = 100, .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, + .argument = MOVE_EFFECT_SPIKES, }, [MOVE_BLEAKWIND_STORM] = @@ -13625,7 +12789,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13646,7 +12809,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13667,7 +12829,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_WIND_MOVE, .split = SPLIT_SPECIAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13683,7 +12844,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13699,7 +12859,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13715,7 +12874,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13731,7 +12889,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 4, .flags = FLAG_PROTECTION_MOVE, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE }, @@ -13747,7 +12904,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE }, @@ -13763,7 +12919,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE }, @@ -13779,7 +12934,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE }, @@ -13795,7 +12949,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE }, @@ -13811,7 +12964,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 1, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_IRON_FIST_BOOST | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 120, .zMoveEffect = Z_EFFECT_NONE, // The datamine master sheet mentions uncopiable by Metronome but that sounds odd? not yet implemented }, @@ -13828,7 +12980,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, // The datamine master sheet mentions uncopiable by Metronome but that sounds odd? not yet implemented }, @@ -13845,7 +12996,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE }, @@ -13861,7 +13011,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, // | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 40, .zMoveEffect = Z_EFFECT_NONE, //Supposedly uncallable by Metronome? (if so, needs implementation) }, @@ -13878,7 +13027,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, .argument = 1, // Remove the active field terrain if there is one. }, @@ -13895,13 +13043,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE }, [MOVE_REVIVAL_BLESSING] = { - .effect = EFFECT_PLACEHOLDER, // EFFECT_REVIVAL_BLESSING + .effect = EFFECT_REVIVAL_BLESSING, .power = 0, .type = TYPE_NORMAL, .accuracy = 0, @@ -13911,7 +13058,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, // Uncallable by Metronome (to be implemented) }, @@ -13928,7 +13074,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 80, .zMoveEffect = Z_EFFECT_NONE, // Supposedly uncallable by Metronome, but dubious }, @@ -13945,7 +13090,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -13961,7 +13105,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 60, .zMoveEffect = Z_EFFECT_NONE }, @@ -13977,7 +13120,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, // TO VERIFY .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, // Supposedly uncallable by Metronome (unimplemented) }, @@ -13994,7 +13136,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_SNATCH_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RECOVER_HP, // Supposedly uncallable by Metronome (unimplemented) }, @@ -14011,7 +13152,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, // | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -14027,7 +13167,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -14043,7 +13182,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SOUND | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_SPECIAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -14059,7 +13197,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_DANCE | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -14075,7 +13212,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, // TO VERIFY .split = SPLIT_PHYSICAL, - .zMovePower = 175, .zMoveEffect = Z_EFFECT_NONE, // Uncallable by Metronome (to be implemented) }, @@ -14092,7 +13228,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, // Uncallable by Metronome (to be implemented) }, @@ -14109,7 +13244,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, // Uncallable by Metronome (to be implemented) }, @@ -14126,7 +13260,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, // Uncallable by Metronome (to be implemented) }, @@ -14143,7 +13276,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, // Uncallable by Metronome (to be implemented) }, @@ -14160,7 +13292,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_RESET_STATS, // Uncallable by Metronome (to be implemented) }, @@ -14177,7 +13308,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, // Supposedly uncallable by Metronome? (to be implemented) }, @@ -14194,7 +13324,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = 0, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_NONE, // Supposedly uncallable by Metronome? (to be implemented) }, @@ -14211,7 +13340,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED, .split = SPLIT_STATUS, - .zMovePower = 0, .zMoveEffect = Z_EFFECT_SPD_UP_1, // Currently an exact copy of Hail until we figure out what to do with it }, @@ -14228,7 +13356,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -14244,7 +13371,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -14260,7 +13386,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -14276,7 +13401,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 180, .zMoveEffect = Z_EFFECT_NONE, }, @@ -14292,7 +13416,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_TWO_STRIKES, .split = SPLIT_SPECIAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -14308,7 +13431,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_IRON_FIST_BOOST | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 100, .zMoveEffect = Z_EFFECT_NONE, }, @@ -14324,7 +13446,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_SPECIAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE, }, @@ -14340,7 +13461,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, // | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE, }, @@ -14356,7 +13476,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 190, .zMoveEffect = Z_EFFECT_NONE }, @@ -14372,7 +13491,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, .split = SPLIT_PHYSICAL, - .zMovePower = 200, .zMoveEffect = Z_EFFECT_NONE, }, @@ -14403,7 +13521,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_HIGH_CRIT, // | FLAG_SLICING_MOVE, .split = SPLIT_PHYSICAL, - .zMovePower = 140, .zMoveEffect = Z_EFFECT_NONE, }, @@ -14419,7 +13536,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE }, @@ -14435,7 +13551,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE }, @@ -14451,7 +13566,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE }, @@ -14467,7 +13581,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE }, @@ -14483,10 +13596,39 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_SHEER_FORCE_BOOST, .split = SPLIT_PHYSICAL, - .zMovePower = 160, .zMoveEffect = Z_EFFECT_NONE }, + [MOVE_PSYBLADE] = + { + .effect = EFFECT_PSYBLADE, + .power = 80, + .type = TYPE_PSYCHIC, + .accuracy = 100, + .pp = 15, + .secondaryEffectChance = 0, + .target = MOVE_TARGET_SELECTED, + .priority = 0, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, + .split = SPLIT_PHYSICAL, + .zMoveEffect = Z_EFFECT_NONE, + }, + + [MOVE_HYDRO_STEAM] = + { + .effect = EFFECT_HYDRO_STEAM, + .power = 80, + .type = TYPE_WATER, + .accuracy = 100, + .pp = 15, + .secondaryEffectChance = 0, + .target = MOVE_TARGET_SELECTED, + .priority = 0, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .split = SPLIT_SPECIAL, + .zMoveEffect = Z_EFFECT_NONE, + }, + // Z-Moves [MOVE_BREAKNECK_BLITZ] = { @@ -14499,7 +13641,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, //determined from move type .zMoveEffect = 0 }, @@ -14514,7 +13655,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14529,7 +13669,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14544,7 +13683,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14559,7 +13697,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14574,7 +13711,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14589,7 +13725,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14604,7 +13739,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14619,7 +13753,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14634,7 +13767,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14649,7 +13781,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14664,7 +13795,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14679,7 +13809,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14694,7 +13823,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14709,7 +13837,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14724,7 +13851,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14739,7 +13865,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14754,7 +13879,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14769,7 +13893,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14784,7 +13907,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = FLAG_HIGH_CRIT, - .zMovePower = 0, .split = SPLIT_SPECIAL, .zMoveEffect = 0 }, @@ -14799,7 +13921,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_SPECIAL, .zMoveEffect = 0 }, @@ -14814,7 +13935,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_USER, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_STATUS, .zMoveEffect = 0 }, @@ -14829,7 +13949,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14844,7 +13963,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_SPECIAL, .argument = 0, // Set Psychic Terrain. If there's a different field terrain active, overwrite it. .zMoveEffect = 0 @@ -14860,7 +13978,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14875,7 +13992,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14890,7 +14006,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_SPECIAL, .zMoveEffect = 0 }, @@ -14905,7 +14020,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .argument = 1, // Remove the active field terrain if there is one. .zMoveEffect = 0 @@ -14921,7 +14035,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14936,7 +14049,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_BOTH, .priority = 0, .flags = FLAG_SOUND, - .zMovePower = 0, .split = SPLIT_SPECIAL, .zMoveEffect = 0 }, @@ -14951,7 +14063,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_SPECIAL, .zMoveEffect = 0 }, @@ -14966,7 +14077,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, @@ -14981,7 +14091,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_SPECIAL, .zMoveEffect = 0 }, @@ -14996,7 +14105,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_SPECIAL, .zMoveEffect = 0 }, @@ -15011,7 +14119,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = 0, - .zMovePower = 0, .split = SPLIT_PHYSICAL, .zMoveEffect = 0 }, diff --git a/src/data/contest_moves.h b/src/data/contest_moves.h index 2de44b3486..3d633a2562 100644 --- a/src/data/contest_moves.h +++ b/src/data/contest_moves.h @@ -6062,6 +6062,10 @@ const struct ContestMove gContestMoves[MOVES_COUNT] = [MOVE_COMBAT_TORQUE] = {0}, // TODO [MOVE_MAGICAL_TORQUE] = {0}, // TODO + + [MOVE_PSYBLADE] = {0}, // TODO + + [MOVE_HYDRO_STEAM] = {0}, // TODO }; const struct ContestEffect gContestEffects[] = diff --git a/src/data/contest_opponents.h b/src/data/contest_opponents.h index fb2ff5986e..10fff61349 100644 --- a/src/data/contest_opponents.h +++ b/src/data/contest_opponents.h @@ -2,102 +2,104 @@ #include "global.h" #include "contest.h" -#define CONTEST_OPPONENT_JIMMY 0 -#define CONTEST_OPPONENT_EDITH 1 -#define CONTEST_OPPONENT_EVAN 2 -#define CONTEST_OPPONENT_KELSEY 3 -#define CONTEST_OPPONENT_MADISON 4 -#define CONTEST_OPPONENT_RAYMOND 5 -#define CONTEST_OPPONENT_GRANT 6 -#define CONTEST_OPPONENT_PAIGE 7 -#define CONTEST_OPPONENT_ALEC 8 -#define CONTEST_OPPONENT_SYDNEY 9 -#define CONTEST_OPPONENT_MORRIS 10 -#define CONTEST_OPPONENT_MARIAH 11 -#define CONTEST_OPPONENT_RUSSELL 12 -#define CONTEST_OPPONENT_MELANIE 13 -#define CONTEST_OPPONENT_CHANCE 14 -#define CONTEST_OPPONENT_AGATHA 15 -#define CONTEST_OPPONENT_BEAU 16 -#define CONTEST_OPPONENT_KAY 17 -#define CONTEST_OPPONENT_CALE 18 -#define CONTEST_OPPONENT_CAITLIN 19 -#define CONTEST_OPPONENT_COLBY 20 -#define CONTEST_OPPONENT_KYLIE 21 -#define CONTEST_OPPONENT_LIAM 22 -#define CONTEST_OPPONENT_MILO 23 -#define CONTEST_OPPONENT_KARINA 24 -#define CONTEST_OPPONENT_BOBBY 25 -#define CONTEST_OPPONENT_CLAIRE 26 -#define CONTEST_OPPONENT_WILLIE 27 -#define CONTEST_OPPONENT_CASSIDY 28 -#define CONTEST_OPPONENT_MORGAN 29 -#define CONTEST_OPPONENT_SUMMER 30 -#define CONTEST_OPPONENT_MILES 31 -#define CONTEST_OPPONENT_AUDREY 32 -#define CONTEST_OPPONENT_AVERY 33 -#define CONTEST_OPPONENT_ARIANA 34 -#define CONTEST_OPPONENT_ASHTON 35 -#define CONTEST_OPPONENT_SANDRA 36 -#define CONTEST_OPPONENT_CARSON 37 -#define CONTEST_OPPONENT_KATRINA 38 -#define CONTEST_OPPONENT_LUKE 39 -#define CONTEST_OPPONENT_RAUL 40 -#define CONTEST_OPPONENT_JADA 41 -#define CONTEST_OPPONENT_ZEEK 42 -#define CONTEST_OPPONENT_DIEGO 43 -#define CONTEST_OPPONENT_ALIYAH 44 -#define CONTEST_OPPONENT_NATALIA 45 -#define CONTEST_OPPONENT_DEVIN 46 -#define CONTEST_OPPONENT_TYLOR 47 -#define CONTEST_OPPONENT_RONNIE 48 -#define CONTEST_OPPONENT_CLAUDIA 49 -#define CONTEST_OPPONENT_ELIAS 50 -#define CONTEST_OPPONENT_JADE 51 -#define CONTEST_OPPONENT_FRANCIS 52 -#define CONTEST_OPPONENT_ALISHA 53 -#define CONTEST_OPPONENT_SAUL 54 -#define CONTEST_OPPONENT_FELICIA 55 -#define CONTEST_OPPONENT_EMILIO 56 -#define CONTEST_OPPONENT_KARLA 57 -#define CONTEST_OPPONENT_DARRYL 58 -#define CONTEST_OPPONENT_SELENA 59 -#define CONTEST_OPPONENT_NOEL 60 -#define CONTEST_OPPONENT_LACEY 61 -#define CONTEST_OPPONENT_CORBIN 62 -#define CONTEST_OPPONENT_GRACIE 63 -#define CONTEST_OPPONENT_COLTIN 64 -#define CONTEST_OPPONENT_ELLIE 65 -#define CONTEST_OPPONENT_MARCUS 66 -#define CONTEST_OPPONENT_KIARA 67 -#define CONTEST_OPPONENT_BRYCE 68 -#define CONTEST_OPPONENT_JAMIE 69 -#define CONTEST_OPPONENT_JORGE 70 -#define CONTEST_OPPONENT_DEVON 71 -#define CONTEST_OPPONENT_JUSTINA 72 -#define CONTEST_OPPONENT_RALPH 73 -#define CONTEST_OPPONENT_ROSA 74 -#define CONTEST_OPPONENT_KEATON 75 -#define CONTEST_OPPONENT_MAYRA 76 -#define CONTEST_OPPONENT_LAMAR 77 -#define CONTEST_OPPONENT_AUBREY 78 -#define CONTEST_OPPONENT_NIGEL 79 -#define CONTEST_OPPONENT_CAMILLE 80 -#define CONTEST_OPPONENT_DEON 81 -#define CONTEST_OPPONENT_JANELLE 82 -#define CONTEST_OPPONENT_HEATH 83 -#define CONTEST_OPPONENT_SASHA 84 -#define CONTEST_OPPONENT_FRANKIE 85 -#define CONTEST_OPPONENT_HELEN 86 -#define CONTEST_OPPONENT_CAMILE 87 -#define CONTEST_OPPONENT_MARTIN 88 -#define CONTEST_OPPONENT_SERGIO 89 -#define CONTEST_OPPONENT_KAILEY 90 -#define CONTEST_OPPONENT_PERLA 91 -#define CONTEST_OPPONENT_CLARA 92 -#define CONTEST_OPPONENT_JAKOB 93 -#define CONTEST_OPPONENT_TREY 94 -#define CONTEST_OPPONENT_LANE 95 +enum { + CONTEST_OPPONENT_JIMMY, + CONTEST_OPPONENT_EDITH, + CONTEST_OPPONENT_EVAN, + CONTEST_OPPONENT_KELSEY, + CONTEST_OPPONENT_MADISON, + CONTEST_OPPONENT_RAYMOND, + CONTEST_OPPONENT_GRANT, + CONTEST_OPPONENT_PAIGE, + CONTEST_OPPONENT_ALEC, + CONTEST_OPPONENT_SYDNEY, + CONTEST_OPPONENT_MORRIS, + CONTEST_OPPONENT_MARIAH, + CONTEST_OPPONENT_RUSSELL, + CONTEST_OPPONENT_MELANIE, + CONTEST_OPPONENT_CHANCE, + CONTEST_OPPONENT_AGATHA, + CONTEST_OPPONENT_BEAU, + CONTEST_OPPONENT_KAY, + CONTEST_OPPONENT_CALE, + CONTEST_OPPONENT_CAITLIN, + CONTEST_OPPONENT_COLBY, + CONTEST_OPPONENT_KYLIE, + CONTEST_OPPONENT_LIAM, + CONTEST_OPPONENT_MILO, + CONTEST_OPPONENT_KARINA, + CONTEST_OPPONENT_BOBBY, + CONTEST_OPPONENT_CLAIRE, + CONTEST_OPPONENT_WILLIE, + CONTEST_OPPONENT_CASSIDY, + CONTEST_OPPONENT_MORGAN, + CONTEST_OPPONENT_SUMMER, + CONTEST_OPPONENT_MILES, + CONTEST_OPPONENT_AUDREY, + CONTEST_OPPONENT_AVERY, + CONTEST_OPPONENT_ARIANA, + CONTEST_OPPONENT_ASHTON, + CONTEST_OPPONENT_SANDRA, + CONTEST_OPPONENT_CARSON, + CONTEST_OPPONENT_KATRINA, + CONTEST_OPPONENT_LUKE, + CONTEST_OPPONENT_RAUL, + CONTEST_OPPONENT_JADA, + CONTEST_OPPONENT_ZEEK, + CONTEST_OPPONENT_DIEGO, + CONTEST_OPPONENT_ALIYAH, + CONTEST_OPPONENT_NATALIA, + CONTEST_OPPONENT_DEVIN, + CONTEST_OPPONENT_TYLOR, + CONTEST_OPPONENT_RONNIE, + CONTEST_OPPONENT_CLAUDIA, + CONTEST_OPPONENT_ELIAS, + CONTEST_OPPONENT_JADE, + CONTEST_OPPONENT_FRANCIS, + CONTEST_OPPONENT_ALISHA, + CONTEST_OPPONENT_SAUL, + CONTEST_OPPONENT_FELICIA, + CONTEST_OPPONENT_EMILIO, + CONTEST_OPPONENT_KARLA, + CONTEST_OPPONENT_DARRYL, + CONTEST_OPPONENT_SELENA, + CONTEST_OPPONENT_NOEL, + CONTEST_OPPONENT_LACEY, + CONTEST_OPPONENT_CORBIN, + CONTEST_OPPONENT_GRACIE, + CONTEST_OPPONENT_COLTIN, + CONTEST_OPPONENT_ELLIE, + CONTEST_OPPONENT_MARCUS, + CONTEST_OPPONENT_KIARA, + CONTEST_OPPONENT_BRYCE, + CONTEST_OPPONENT_JAMIE, + CONTEST_OPPONENT_JORGE, + CONTEST_OPPONENT_DEVON, + CONTEST_OPPONENT_JUSTINA, + CONTEST_OPPONENT_RALPH, + CONTEST_OPPONENT_ROSA, + CONTEST_OPPONENT_KEATON, + CONTEST_OPPONENT_MAYRA, + CONTEST_OPPONENT_LAMAR, + CONTEST_OPPONENT_AUBREY, + CONTEST_OPPONENT_NIGEL, + CONTEST_OPPONENT_CAMILLE, + CONTEST_OPPONENT_DEON, + CONTEST_OPPONENT_JANELLE, + CONTEST_OPPONENT_HEATH, + CONTEST_OPPONENT_SASHA, + CONTEST_OPPONENT_FRANKIE, + CONTEST_OPPONENT_HELEN, + CONTEST_OPPONENT_CAMILE, + CONTEST_OPPONENT_MARTIN, + CONTEST_OPPONENT_SERGIO, + CONTEST_OPPONENT_KAILEY, + CONTEST_OPPONENT_PERLA, + CONTEST_OPPONENT_CLARA, + CONTEST_OPPONENT_JAKOB, + CONTEST_OPPONENT_TREY, + CONTEST_OPPONENT_LANE +}; // All contest opponents have a common set of AI flags (which contains all of the actually // useful AI scripts, as well as some dummys) and a random combination of 2-3 dummy flags. diff --git a/src/data/graphics/items.h b/src/data/graphics/items.h index 35ce13db25..1e60357b3e 100644 --- a/src/data/graphics/items.h +++ b/src/data/graphics/items.h @@ -645,6 +645,15 @@ const u32 gItemIconPalette_RibbonSweet[] = INCBIN_U32("graphics/items/icon_palet const u32 gItemIcon_Everstone[] = INCBIN_U32("graphics/items/icons/everstone.4bpp.lz"); const u32 gItemIconPalette_Everstone[] = INCBIN_U32("graphics/items/icon_palettes/everstone.gbapal.lz"); +const u32 gItemIcon_BlackAugurite[] = INCBIN_U32("graphics/items/icons/black_augurite.4bpp.lz"); +const u32 gItemIconPalette_BlackAugurite[] = INCBIN_U32("graphics/items/icon_palettes/black_augurite.gbapal.lz"); + +const u32 gItemIcon_LinkingCord[] = INCBIN_U32("graphics/items/icons/linking_cord.4bpp.lz"); +const u32 gItemIconPalette_LinkingCord[] = INCBIN_U32("graphics/items/icon_palettes/linking_cord.gbapal.lz"); + +const u32 gItemIcon_PeatBlock[] = INCBIN_U32("graphics/items/icons/peat_block.4bpp.lz"); +const u32 gItemIconPalette_PeatBlock[] = INCBIN_U32("graphics/items/icon_palettes/peat_block.gbapal.lz"); + // Nectars const u32 gItemIcon_RedNectar[] = INCBIN_U32("graphics/items/icons/red_nectar.4bpp.lz"); @@ -1931,17 +1940,61 @@ const u32 gItemIconPalette_Ruby[] = INCBIN_U32("graphics/items/icon_palettes/rub const u32 gItemIconPalette_Sapphire[] = INCBIN_U32("graphics/items/icon_palettes/sapphire.gbapal.lz"); -//const u32 gItemIcon_AbilityShield[] = INCBIN_U32("graphics/items/icons/ability_shield.4bpp.lz"); -//const u32 gItemIconPalette_AbilityShield[] = INCBIN_U32("graphics/items/icon_palettes/ability_shield.gbapal.lz"); +const u32 gItemIcon_AbilityShield[] = INCBIN_U32("graphics/items/icons/ability_shield.4bpp.lz"); +const u32 gItemIconPalette_AbilityShield[] = INCBIN_U32("graphics/items/icon_palettes/ability_shield.gbapal.lz"); //const u32 gItemIcon_ClearAmulet[] = INCBIN_U32("graphics/items/icons/clear_amulet.4bpp.lz"); //const u32 gItemIconPalette_ClearAmulet[] = INCBIN_U32("graphics/items/icon_palettes/clear_amulet.gbapal.lz"); -//const u32 gItemIcon_PunchingGlove[] = INCBIN_U32("graphics/items/icons/punching_glove.4bpp.lz"); -//const u32 gItemIconPalette_PunchingGlove[] = INCBIN_U32("graphics/items/icon_palettes/punching_glove.gbapal.lz"); +const u32 gItemIcon_PunchingGlove[] = INCBIN_U32("graphics/items/icons/punching_glove.4bpp.lz"); +const u32 gItemIconPalette_PunchingGlove[] = INCBIN_U32("graphics/items/icon_palettes/punching_glove.gbapal.lz"); -//const u32 gItemIcon_CovertCloak[] = INCBIN_U32("graphics/items/icons/covert_cloak.4bpp.lz"); -//const u32 gItemIconPalette_CovertCloak[] = INCBIN_U32("graphics/items/icon_palettes/covert_cloak.gbapal.lz"); +const u32 gItemIcon_CovertCloak[] = INCBIN_U32("graphics/items/icons/covert_cloak.4bpp.lz"); +const u32 gItemIconPalette_CovertCloak[] = INCBIN_U32("graphics/items/icon_palettes/covert_cloak.gbapal.lz"); -//const u32 gItemIcon_LoadedDice[] = INCBIN_U32("graphics/items/icons/loaded_dice.4bpp.lz"); -//const u32 gItemIconPalette_LoadedDice[] = INCBIN_U32("graphics/items/icon_palettes/loaded_dice.gbapal.lz"); +const u32 gItemIcon_LoadedDice[] = INCBIN_U32("graphics/items/icons/loaded_dice.4bpp.lz"); +const u32 gItemIconPalette_LoadedDice[] = INCBIN_U32("graphics/items/icon_palettes/loaded_dice.gbapal.lz"); + +const u32 gItemIcon_AuspiciousArmor[] = INCBIN_U32("graphics/items/icons/auspicious_armor.4bpp.lz"); +const u32 gItemIconPalette_AuspiciousArmor[] = INCBIN_U32("graphics/items/icon_palettes/auspicious_armor.gbapal.lz"); + +const u32 gItemIcon_BigBambooShoot[] = INCBIN_U32("graphics/items/icons/big_bamboo_shoot.4bpp.lz"); +const u32 gItemIconPalette_BigBambooShoot[] = INCBIN_U32("graphics/items/icon_palettes/big_bamboo_shoot.gbapal.lz"); + +const u32 gItemIcon_BoosterEnergy[] = INCBIN_U32("graphics/items/icons/booster_energy.4bpp.lz"); +const u32 gItemIconPalette_BoosterEnergy[] = INCBIN_U32("graphics/items/icon_palettes/booster_energy.gbapal.lz"); + +const u32 gItemIcon_GimmighoulCoin[] = INCBIN_U32("graphics/items/icons/gimmighoul_coin.4bpp.lz"); +const u32 gItemIconPalette_GimmighoulCoin[] = INCBIN_U32("graphics/items/icon_palettes/gimmighoul_coin.gbapal.lz"); + +const u32 gItemIcon_LeadersCrest[] = INCBIN_U32("graphics/items/icons/leaders_crest.4bpp.lz"); +const u32 gItemIconPalette_LeadersCrest[] = INCBIN_U32("graphics/items/icon_palettes/leaders_crest.gbapal.lz"); + +const u32 gItemIcon_MaliciousArmor[] = INCBIN_U32("graphics/items/icons/malicious_armor.4bpp.lz"); +const u32 gItemIconPalette_MaliciousArmor[] = INCBIN_U32("graphics/items/icon_palettes/malicious_armor.gbapal.lz"); + +const u32 gItemIcon_MirrorHerb[] = INCBIN_U32("graphics/items/icons/mirror_herb.4bpp.lz"); +const u32 gItemIconPalette_MirrorHerb[] = INCBIN_U32("graphics/items/icon_palettes/mirror_herb.gbapal.lz"); + +const u32 gItemIcon_ScrollOfDarkness[] = INCBIN_U32("graphics/items/icons/scroll_of_darkness.4bpp.lz"); +const u32 gItemIconPalette_ScrollOfDarkness[] = INCBIN_U32("graphics/items/icon_palettes/scroll_of_darkness.gbapal.lz"); + +const u32 gItemIcon_ScrollOfWaters[] = INCBIN_U32("graphics/items/icons/scroll_of_waters.4bpp.lz"); +const u32 gItemIconPalette_ScrollOfWaters[] = INCBIN_U32("graphics/items/icon_palettes/scroll_of_waters.gbapal.lz"); + +const u32 gItemIcon_TeraOrb[] = INCBIN_U32("graphics/items/icons/tera_orb.4bpp.lz"); +const u32 gItemIconPalette_TeraOrb[] = INCBIN_U32("graphics/items/icon_palettes/tera_orb.gbapal.lz"); + +const u32 gItemIcon_TinyBambooShoot[] = INCBIN_U32("graphics/items/icons/tiny_bamboo_shoot.4bpp.lz"); +const u32 gItemIconPalette_TinyBambooShoot[] = INCBIN_U32("graphics/items/icon_palettes/tiny_bamboo_shoot.gbapal.lz"); + +// Tera Shards here + +const u32 gItemIcon_AdamantCrystal[] = INCBIN_U32("graphics/items/icons/adamant_crystal.4bpp.lz"); +const u32 gItemIconPalette_AdamantCrystal[] = INCBIN_U32("graphics/items/icon_palettes/adamant_crystal.gbapal.lz"); + +const u32 gItemIcon_GriseousCore[] = INCBIN_U32("graphics/items/icons/griseous_core.4bpp.lz"); +const u32 gItemIconPalette_GriseousCore[] = INCBIN_U32("graphics/items/icon_palettes/griseous_core.gbapal.lz"); + +const u32 gItemIcon_LustrousGlobe[] = INCBIN_U32("graphics/items/icons/lustrous_globe.4bpp.lz"); +const u32 gItemIconPalette_LustrousGlobe[] = INCBIN_U32("graphics/items/icon_palettes/lustrous_globe.gbapal.lz"); diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index 385460228b..673fbb4eea 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -800,9 +800,9 @@ const u32 gMonFrontPic_Mimikyu[] = INCBIN_U32("graphics/pokemon/mimikyu/front.4b const u32 gMonFrontPic_Bruxish[] = INCBIN_U32("graphics/pokemon/bruxish/front.4bpp.lz"); const u32 gMonFrontPic_Drampa[] = INCBIN_U32("graphics/pokemon/drampa/front.4bpp.lz"); const u32 gMonFrontPic_Dhelmise[] = INCBIN_U32("graphics/pokemon/dhelmise/front.4bpp.lz"); -const u32 gMonFrontPic_Jangmoo[] = INCBIN_U32("graphics/pokemon/jangmo_o/front.4bpp.lz"); -const u32 gMonFrontPic_Hakamoo[] = INCBIN_U32("graphics/pokemon/hakamo_o/front.4bpp.lz"); -const u32 gMonFrontPic_Kommoo[] = INCBIN_U32("graphics/pokemon/kommo_o/front.4bpp.lz"); +const u32 gMonFrontPic_JangmoO[] = INCBIN_U32("graphics/pokemon/jangmo_o/front.4bpp.lz"); +const u32 gMonFrontPic_HakamoO[] = INCBIN_U32("graphics/pokemon/hakamo_o/front.4bpp.lz"); +const u32 gMonFrontPic_KommoO[] = INCBIN_U32("graphics/pokemon/kommo_o/front.4bpp.lz"); const u32 gMonFrontPic_TapuKoko[] = INCBIN_U32("graphics/pokemon/tapu_koko/anim_front.4bpp.lz"); const u32 gMonFrontPic_TapuLele[] = INCBIN_U32("graphics/pokemon/tapu_lele/anim_front.4bpp.lz"); const u32 gMonFrontPic_TapuBulu[] = INCBIN_U32("graphics/pokemon/tapu_bulu/anim_front.4bpp.lz"); @@ -919,14 +919,13 @@ const u32 gMonFrontPic_Regidrago[] = INCBIN_U32("graphics/pokemon/regidrago/fron const u32 gMonFrontPic_Glastrier[] = INCBIN_U32("graphics/pokemon/glastrier/front.4bpp.lz"); const u32 gMonFrontPic_Spectrier[] = INCBIN_U32("graphics/pokemon/spectrier/front.4bpp.lz"); const u32 gMonFrontPic_Calyrex[] = INCBIN_U32("graphics/pokemon/calyrex/front.4bpp.lz"); -//const u32 gMonFrontPic_Wyrdeer[] = INCBIN_U32("graphics/pokemon/wyrdeer/front.4bpp.lz"); +const u32 gMonFrontPic_Wyrdeer[] = INCBIN_U32("graphics/pokemon/wyrdeer/front.4bpp.lz"); const u32 gMonFrontPic_Kleavor[] = INCBIN_U32("graphics/pokemon/kleavor/front.4bpp.lz"); const u32 gMonFrontPic_Ursaluna[] = INCBIN_U32("graphics/pokemon/ursaluna/front.4bpp.lz"); -//const u32 gMonFrontPic_Basculegion[] = INCBIN_U32("graphics/pokemon/basculegion/front.4bpp.lz"); -//const u32 gMonFrontPic_BasculegionF[] = INCBIN_U32("graphics/pokemon/basculegion/frontf.4bpp.lz"); -//const u32 gMonFrontPic_Sneasler[] = INCBIN_U32("graphics/pokemon/sneasler/front.4bpp.lz"); +const u32 gMonFrontPic_Basculegion[] = INCBIN_U32("graphics/pokemon/basculegion/front.4bpp.lz"); +const u32 gMonFrontPic_Sneasler[] = INCBIN_U32("graphics/pokemon/sneasler/front.4bpp.lz"); const u32 gMonFrontPic_Overqwil[] = INCBIN_U32("graphics/pokemon/overqwil/front.4bpp.lz"); -//const u32 gMonFrontPic_Enamorus[] = INCBIN_U32("graphics/pokemon/enamorus/front.4bpp.lz"); +const u32 gMonFrontPic_Enamorus[] = INCBIN_U32("graphics/pokemon/enamorus/front.4bpp.lz"); #endif const u32 gMonFrontPic_VenusaurMega[] = INCBIN_U32("graphics/pokemon/venusaur/mega/front.4bpp.lz"); const u32 gMonFrontPic_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/charizard/mega_x/front.4bpp.lz"); @@ -1031,7 +1030,7 @@ const u32 gMonFrontPic_TyphlosionHisuian[] = INCBIN_U32("graphics/pokemon/typhlo const u32 gMonFrontPic_QwilfishHisuian[] = INCBIN_U32("graphics/pokemon/qwilfish/hisuian/front.4bpp.lz"); const u32 gMonFrontPic_SneaselHisuian[] = INCBIN_U32("graphics/pokemon/sneasel/hisuian/front.4bpp.lz"); #if P_GEN_5_POKEMON == TRUE -//const u32 gMonFrontPic_SamurottHisuian[] = INCBIN_U32("graphics/pokemon/samurott/hisuian/front.4bpp.lz"); +const u32 gMonFrontPic_SamurottHisuian[] = INCBIN_U32("graphics/pokemon/samurott/hisuian/front.4bpp.lz"); const u32 gMonFrontPic_LilligantHisuian[] = INCBIN_U32("graphics/pokemon/lilligant/hisuian/front.4bpp.lz"); const u32 gMonFrontPic_ZoruaHisuian[] = INCBIN_U32("graphics/pokemon/zorua/hisuian/front.4bpp.lz"); const u32 gMonFrontPic_ZoroarkHisuian[] = INCBIN_U32("graphics/pokemon/zoroark/hisuian/front.4bpp.lz"); @@ -1043,7 +1042,7 @@ const u32 gMonFrontPic_GoodraHisuian[] = INCBIN_U32("graphics/pokemon/goodra/his const u32 gMonFrontPic_AvaluggHisuian[] = INCBIN_U32("graphics/pokemon/avalugg/hisuian/front.4bpp.lz"); #endif #if P_GEN_7_POKEMON == TRUE -//const u32 gMonFrontPic_DecidueyeHisuian[] = INCBIN_U32("graphics/pokemon/decidueye/hisuian/front.4bpp.lz"); +const u32 gMonFrontPic_DecidueyeHisuian[] = INCBIN_U32("graphics/pokemon/decidueye/hisuian/front.4bpp.lz"); #endif const u32 gMonFrontPic_PikachuCosplay[] = INCBIN_U32("graphics/pokemon/pikachu/cosplay/front.4bpp.lz"); const u32 gMonFrontPic_PikachuRockStar[] = INCBIN_U32("graphics/pokemon/pikachu/rock_star/front.4bpp.lz"); @@ -1207,7 +1206,8 @@ const u32 gMonFrontPic_UrshifuRapidStrikeStyle[] = INCBIN_U32("graphics/pokemon/ const u32 gMonFrontPic_ZarudeDada[] = INCBIN_U32("graphics/pokemon/zarude/dada/front.4bpp.lz"); const u32 gMonFrontPic_CalyrexIceRider[] = INCBIN_U32("graphics/pokemon/calyrex/ice_rider/front.4bpp.lz"); const u32 gMonFrontPic_CalyrexShadowRider[] = INCBIN_U32("graphics/pokemon/calyrex/shadow_rider/front.4bpp.lz"); -//const u32 gMonFrontPic_EnamorusTherian[] = INCBIN_U32("graphics/pokemon/enamorus/therian/front.4bpp.lz"); +const u32 gMonFrontPic_EnamorusTherian[] = INCBIN_U32("graphics/pokemon/enamorus/therian/front.4bpp.lz"); +const u32 gMonFrontPic_BasculegionFemale[] = INCBIN_U32("graphics/pokemon/basculegion/female/front.4bpp.lz"); #endif const u32 gMonFrontPic_Egg[] = INCBIN_U32("graphics/pokemon/egg/anim_front.4bpp.lz"); @@ -2012,9 +2012,9 @@ const u32 gMonBackPic_Mimikyu[] = INCBIN_U32("graphics/pokemon/mimikyu/back.4bpp const u32 gMonBackPic_Bruxish[] = INCBIN_U32("graphics/pokemon/bruxish/back.4bpp.lz"); const u32 gMonBackPic_Drampa[] = INCBIN_U32("graphics/pokemon/drampa/back.4bpp.lz"); const u32 gMonBackPic_Dhelmise[] = INCBIN_U32("graphics/pokemon/dhelmise/back.4bpp.lz"); -const u32 gMonBackPic_Jangmoo[] = INCBIN_U32("graphics/pokemon/jangmo_o/back.4bpp.lz"); -const u32 gMonBackPic_Hakamoo[] = INCBIN_U32("graphics/pokemon/hakamo_o/back.4bpp.lz"); -const u32 gMonBackPic_Kommoo[] = INCBIN_U32("graphics/pokemon/kommo_o/back.4bpp.lz"); +const u32 gMonBackPic_JangmoO[] = INCBIN_U32("graphics/pokemon/jangmo_o/back.4bpp.lz"); +const u32 gMonBackPic_HakamoO[] = INCBIN_U32("graphics/pokemon/hakamo_o/back.4bpp.lz"); +const u32 gMonBackPic_KommoO[] = INCBIN_U32("graphics/pokemon/kommo_o/back.4bpp.lz"); const u32 gMonBackPic_TapuKoko[] = INCBIN_U32("graphics/pokemon/tapu_koko/back.4bpp.lz"); const u32 gMonBackPic_TapuLele[] = INCBIN_U32("graphics/pokemon/tapu_lele/back.4bpp.lz"); const u32 gMonBackPic_TapuBulu[] = INCBIN_U32("graphics/pokemon/tapu_bulu/back.4bpp.lz"); @@ -2131,14 +2131,13 @@ const u32 gMonBackPic_Regidrago[] = INCBIN_U32("graphics/pokemon/regidrago/back. const u32 gMonBackPic_Glastrier[] = INCBIN_U32("graphics/pokemon/glastrier/back.4bpp.lz"); const u32 gMonBackPic_Spectrier[] = INCBIN_U32("graphics/pokemon/spectrier/back.4bpp.lz"); const u32 gMonBackPic_Calyrex[] = INCBIN_U32("graphics/pokemon/calyrex/back.4bpp.lz"); -//const u32 gMonBackPic_Wyrdeer[] = INCBIN_U32("graphics/pokemon/wyrdeer/back.4bpp.lz"); +const u32 gMonBackPic_Wyrdeer[] = INCBIN_U32("graphics/pokemon/wyrdeer/back.4bpp.lz"); const u32 gMonBackPic_Kleavor[] = INCBIN_U32("graphics/pokemon/kleavor/back.4bpp.lz"); const u32 gMonBackPic_Ursaluna[] = INCBIN_U32("graphics/pokemon/ursaluna/back.4bpp.lz"); -//const u32 gMonBackPic_Basculegion[] = INCBIN_U32("graphics/pokemon/basculegion/back.4bpp.lz"); -//const u32 gMonBackPic_BasculegionF[] = INCBIN_U32("graphics/pokemon/basculegion/backf.4bpp.lz"); -//const u32 gMonBackPic_Sneasler[] = INCBIN_U32("graphics/pokemon/sneasler/back.4bpp.lz"); +const u32 gMonBackPic_Basculegion[] = INCBIN_U32("graphics/pokemon/basculegion/back.4bpp.lz"); +const u32 gMonBackPic_Sneasler[] = INCBIN_U32("graphics/pokemon/sneasler/back.4bpp.lz"); const u32 gMonBackPic_Overqwil[] = INCBIN_U32("graphics/pokemon/overqwil/back.4bpp.lz"); -//const u32 gMonBackPic_Enamorus[] = INCBIN_U32("graphics/pokemon/enamorus/back.4bpp.lz"); +const u32 gMonBackPic_Enamorus[] = INCBIN_U32("graphics/pokemon/enamorus/back.4bpp.lz"); #endif const u32 gMonBackPic_VenusaurMega[] = INCBIN_U32("graphics/pokemon/venusaur/mega/back.4bpp.lz"); const u32 gMonBackPic_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/charizard/mega_x/back.4bpp.lz"); @@ -2243,7 +2242,7 @@ const u32 gMonBackPic_TyphlosionHisuian[] = INCBIN_U32("graphics/pokemon/typhlos const u32 gMonBackPic_QwilfishHisuian[] = INCBIN_U32("graphics/pokemon/qwilfish/hisuian/back.4bpp.lz"); const u32 gMonBackPic_SneaselHisuian[] = INCBIN_U32("graphics/pokemon/sneasel/hisuian/back.4bpp.lz"); #if P_GEN_5_POKEMON == TRUE -//const u32 gMonBackPic_SamurottHisuian[] = INCBIN_U32("graphics/pokemon/samurott/hisuian/back.4bpp.lz"); +const u32 gMonBackPic_SamurottHisuian[] = INCBIN_U32("graphics/pokemon/samurott/hisuian/back.4bpp.lz"); const u32 gMonBackPic_LilligantHisuian[] = INCBIN_U32("graphics/pokemon/lilligant/hisuian/back.4bpp.lz"); const u32 gMonBackPic_ZoruaHisuian[] = INCBIN_U32("graphics/pokemon/zorua/hisuian/back.4bpp.lz"); const u32 gMonBackPic_ZoroarkHisuian[] = INCBIN_U32("graphics/pokemon/zoroark/hisuian/back.4bpp.lz"); @@ -2255,7 +2254,7 @@ const u32 gMonBackPic_GoodraHisuian[] = INCBIN_U32("graphics/pokemon/goodra/hisu const u32 gMonBackPic_AvaluggHisuian[] = INCBIN_U32("graphics/pokemon/avalugg/hisuian/back.4bpp.lz"); #endif #if P_GEN_7_POKEMON == TRUE -//const u32 gMonBackPic_DecidueyeHisuian[] = INCBIN_U32("graphics/pokemon/decidueye/hisuian/back.4bpp.lz"); +const u32 gMonBackPic_DecidueyeHisuian[] = INCBIN_U32("graphics/pokemon/decidueye/hisuian/back.4bpp.lz"); #endif const u32 gMonBackPic_PikachuCosplay[] = INCBIN_U32("graphics/pokemon/pikachu/cosplay/back.4bpp.lz"); const u32 gMonBackPic_PikachuRockStar[] = INCBIN_U32("graphics/pokemon/pikachu/rock_star/back.4bpp.lz"); @@ -2419,7 +2418,8 @@ const u32 gMonBackPic_UrshifuRapidStrikeStyle[] = INCBIN_U32("graphics/pokemon/u const u32 gMonBackPic_ZarudeDada[] = INCBIN_U32("graphics/pokemon/zarude/dada/back.4bpp.lz"); const u32 gMonBackPic_CalyrexIceRider[] = INCBIN_U32("graphics/pokemon/calyrex/ice_rider/back.4bpp.lz"); const u32 gMonBackPic_CalyrexShadowRider[] = INCBIN_U32("graphics/pokemon/calyrex/shadow_rider/back.4bpp.lz"); -//const u32 gMonBackPic_EnamorusTherian[] = INCBIN_U32("graphics/pokemon/enamorus/therian/back.4bpp.lz"); +const u32 gMonBackPic_EnamorusTherian[] = INCBIN_U32("graphics/pokemon/enamorus/therian/back.4bpp.lz"); +const u32 gMonBackPic_BasculegionFemale[] = INCBIN_U32("graphics/pokemon/basculegion/female/back.4bpp.lz"); #endif const u32 gMonPalette_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/question_mark/circled/normal.gbapal.lz"); @@ -3218,9 +3218,9 @@ const u32 gMonPalette_Mimikyu[] = INCBIN_U32("graphics/pokemon/mimikyu/normal.gb const u32 gMonPalette_Bruxish[] = INCBIN_U32("graphics/pokemon/bruxish/normal.gbapal.lz"); const u32 gMonPalette_Drampa[] = INCBIN_U32("graphics/pokemon/drampa/normal.gbapal.lz"); const u32 gMonPalette_Dhelmise[] = INCBIN_U32("graphics/pokemon/dhelmise/normal.gbapal.lz"); -const u32 gMonPalette_Jangmoo[] = INCBIN_U32("graphics/pokemon/jangmo_o/normal.gbapal.lz"); -const u32 gMonPalette_Hakamoo[] = INCBIN_U32("graphics/pokemon/hakamo_o/normal.gbapal.lz"); -const u32 gMonPalette_Kommoo[] = INCBIN_U32("graphics/pokemon/kommo_o/normal.gbapal.lz"); +const u32 gMonPalette_JangmoO[] = INCBIN_U32("graphics/pokemon/jangmo_o/normal.gbapal.lz"); +const u32 gMonPalette_HakamoO[] = INCBIN_U32("graphics/pokemon/hakamo_o/normal.gbapal.lz"); +const u32 gMonPalette_KommoO[] = INCBIN_U32("graphics/pokemon/kommo_o/normal.gbapal.lz"); const u32 gMonPalette_TapuKoko[] = INCBIN_U32("graphics/pokemon/tapu_koko/normal.gbapal.lz"); const u32 gMonPalette_TapuLele[] = INCBIN_U32("graphics/pokemon/tapu_lele/normal.gbapal.lz"); const u32 gMonPalette_TapuBulu[] = INCBIN_U32("graphics/pokemon/tapu_bulu/normal.gbapal.lz"); @@ -3337,14 +3337,13 @@ const u32 gMonPalette_Regidrago[] = INCBIN_U32("graphics/pokemon/regidrago/norma const u32 gMonPalette_Glastrier[] = INCBIN_U32("graphics/pokemon/glastrier/normal.gbapal.lz"); const u32 gMonPalette_Spectrier[] = INCBIN_U32("graphics/pokemon/spectrier/normal.gbapal.lz"); const u32 gMonPalette_Calyrex[] = INCBIN_U32("graphics/pokemon/calyrex/normal.gbapal.lz"); -//const u32 gMonPalette_Wyrdeer[] = INCBIN_U32("graphics/pokemon/wyrdeer/normal.gbapal.lz"); +const u32 gMonPalette_Wyrdeer[] = INCBIN_U32("graphics/pokemon/wyrdeer/normal.gbapal.lz"); const u32 gMonPalette_Kleavor[] = INCBIN_U32("graphics/pokemon/kleavor/normal.gbapal.lz"); const u32 gMonPalette_Ursaluna[] = INCBIN_U32("graphics/pokemon/ursaluna/normal.gbapal.lz"); -//const u32 gMonPalette_Basculegion[] = INCBIN_U32("graphics/pokemon/basculegion/normal.gbapal.lz"); -//const u32 gMonPalette_BasculegionF[] = INCBIN_U32("graphics/pokemon/basculegion/normalf.gbapal.lz"); -//const u32 gMonPalette_Sneasler[] = INCBIN_U32("graphics/pokemon/sneasler/normal.gbapal.lz"); +const u32 gMonPalette_Basculegion[] = INCBIN_U32("graphics/pokemon/basculegion/normal.gbapal.lz"); +const u32 gMonPalette_Sneasler[] = INCBIN_U32("graphics/pokemon/sneasler/normal.gbapal.lz"); const u32 gMonPalette_Overqwil[] = INCBIN_U32("graphics/pokemon/overqwil/normal.gbapal.lz"); -//const u32 gMonPalette_Enamorus[] = INCBIN_U32("graphics/pokemon/enamorus/normal.gbapal.lz"); +const u32 gMonPalette_Enamorus[] = INCBIN_U32("graphics/pokemon/enamorus/normal.gbapal.lz"); #endif const u32 gMonPalette_VenusaurMega[] = INCBIN_U32("graphics/pokemon/venusaur/mega/normal.gbapal.lz"); const u32 gMonPalette_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/charizard/mega_x/normal.gbapal.lz"); @@ -3449,7 +3448,7 @@ const u32 gMonPalette_TyphlosionHisuian[] = INCBIN_U32("graphics/pokemon/typhlos const u32 gMonPalette_QwilfishHisuian[] = INCBIN_U32("graphics/pokemon/qwilfish/hisuian/normal.gbapal.lz"); const u32 gMonPalette_SneaselHisuian[] = INCBIN_U32("graphics/pokemon/sneasel/hisuian/normal.gbapal.lz"); #if P_GEN_5_POKEMON == TRUE -//const u32 gMonPalette_SamurottHisuian[] = INCBIN_U32("graphics/pokemon/samurott/hisuian/normal.gbapal.lz"); +const u32 gMonPalette_SamurottHisuian[] = INCBIN_U32("graphics/pokemon/samurott/hisuian/normal.gbapal.lz"); const u32 gMonPalette_LilligantHisuian[] = INCBIN_U32("graphics/pokemon/lilligant/hisuian/normal.gbapal.lz"); const u32 gMonPalette_ZoruaHisuian[] = INCBIN_U32("graphics/pokemon/zorua/hisuian/normal.gbapal.lz"); const u32 gMonPalette_ZoroarkHisuian[] = INCBIN_U32("graphics/pokemon/zoroark/hisuian/normal.gbapal.lz"); @@ -3461,7 +3460,7 @@ const u32 gMonPalette_GoodraHisuian[] = INCBIN_U32("graphics/pokemon/goodra/hisu const u32 gMonPalette_AvaluggHisuian[] = INCBIN_U32("graphics/pokemon/avalugg/hisuian/normal.gbapal.lz"); #endif #if P_GEN_7_POKEMON == TRUE -//const u32 gMonPalette_DecidueyeHisuian[] = INCBIN_U32("graphics/pokemon/decidueye/hisuian/normal.gbapal.lz"); +const u32 gMonPalette_DecidueyeHisuian[] = INCBIN_U32("graphics/pokemon/decidueye/hisuian/normal.gbapal.lz"); #endif const u32 gMonPalette_PikachuCosplay[] = INCBIN_U32("graphics/pokemon/pikachu/cosplay/normal.gbapal.lz"); const u32 gMonPalette_PikachuRockStar[] = INCBIN_U32("graphics/pokemon/pikachu/rock_star/normal.gbapal.lz"); @@ -3651,7 +3650,8 @@ const u32 gMonPalette_UrshifuRapidStrikeStyle[] = INCBIN_U32("graphics/pokemon/u const u32 gMonPalette_ZarudeDada[] = INCBIN_U32("graphics/pokemon/zarude/dada/normal.gbapal.lz"); const u32 gMonPalette_CalyrexIceRider[] = INCBIN_U32("graphics/pokemon/calyrex/ice_rider/normal.gbapal.lz"); const u32 gMonPalette_CalyrexShadowRider[] = INCBIN_U32("graphics/pokemon/calyrex/shadow_rider/normal.gbapal.lz"); -//const u32 gMonPalette_EnamorusTherian[] = INCBIN_U32("graphics/pokemon/enamorus/therian/normal.gbapal.lz"); +const u32 gMonPalette_EnamorusTherian[] = INCBIN_U32("graphics/pokemon/enamorus/therian/normal.gbapal.lz"); +const u32 gMonPalette_BasculegionFemale[] = INCBIN_U32("graphics/pokemon/basculegion/female/normal.gbapal.lz"); #endif const u32 gMonPalette_Egg[] = INCBIN_U32("graphics/pokemon/egg/normal.gbapal.lz"); @@ -4451,9 +4451,9 @@ const u32 gMonShinyPalette_Mimikyu[] = INCBIN_U32("graphics/pokemon/mimikyu/shin const u32 gMonShinyPalette_Bruxish[] = INCBIN_U32("graphics/pokemon/bruxish/shiny.gbapal.lz"); const u32 gMonShinyPalette_Drampa[] = INCBIN_U32("graphics/pokemon/drampa/shiny.gbapal.lz"); const u32 gMonShinyPalette_Dhelmise[] = INCBIN_U32("graphics/pokemon/dhelmise/shiny.gbapal.lz"); -const u32 gMonShinyPalette_Jangmoo[] = INCBIN_U32("graphics/pokemon/jangmo_o/shiny.gbapal.lz"); -const u32 gMonShinyPalette_Hakamoo[] = INCBIN_U32("graphics/pokemon/hakamo_o/shiny.gbapal.lz"); -const u32 gMonShinyPalette_Kommoo[] = INCBIN_U32("graphics/pokemon/kommo_o/shiny.gbapal.lz"); +const u32 gMonShinyPalette_JangmoO[] = INCBIN_U32("graphics/pokemon/jangmo_o/shiny.gbapal.lz"); +const u32 gMonShinyPalette_HakamoO[] = INCBIN_U32("graphics/pokemon/hakamo_o/shiny.gbapal.lz"); +const u32 gMonShinyPalette_KommoO[] = INCBIN_U32("graphics/pokemon/kommo_o/shiny.gbapal.lz"); const u32 gMonShinyPalette_TapuKoko[] = INCBIN_U32("graphics/pokemon/tapu_koko/shiny.gbapal.lz"); const u32 gMonShinyPalette_TapuLele[] = INCBIN_U32("graphics/pokemon/tapu_lele/shiny.gbapal.lz"); const u32 gMonShinyPalette_TapuBulu[] = INCBIN_U32("graphics/pokemon/tapu_bulu/shiny.gbapal.lz"); @@ -4570,14 +4570,13 @@ const u32 gMonShinyPalette_Regidrago[] = INCBIN_U32("graphics/pokemon/regidrago/ const u32 gMonShinyPalette_Glastrier[] = INCBIN_U32("graphics/pokemon/glastrier/shiny.gbapal.lz"); const u32 gMonShinyPalette_Spectrier[] = INCBIN_U32("graphics/pokemon/spectrier/shiny.gbapal.lz"); const u32 gMonShinyPalette_Calyrex[] = INCBIN_U32("graphics/pokemon/calyrex/shiny.gbapal.lz"); -//const u32 gMonShinyPalette_Wyrdeer[] = INCBIN_U32("graphics/pokemon/wyrdeer/shiny.gbapal.lz"); +const u32 gMonShinyPalette_Wyrdeer[] = INCBIN_U32("graphics/pokemon/wyrdeer/shiny.gbapal.lz"); const u32 gMonShinyPalette_Kleavor[] = INCBIN_U32("graphics/pokemon/kleavor/shiny.gbapal.lz"); const u32 gMonShinyPalette_Ursaluna[] = INCBIN_U32("graphics/pokemon/ursaluna/shiny.gbapal.lz"); -//const u32 gMonShinyPalette_Basculegion[] = INCBIN_U32("graphics/pokemon/basculegion/shiny.gbapal.lz"); -//const u32 gMonShinyPalette_BasculegionF[] = INCBIN_U32("graphics/pokemon/basculegion/shinyf.gbapal.lz"); -//const u32 gMonShinyPalette_Sneasler[] = INCBIN_U32("graphics/pokemon/sneasler/shiny.gbapal.lz"); +const u32 gMonShinyPalette_Basculegion[] = INCBIN_U32("graphics/pokemon/basculegion/shiny.gbapal.lz"); +const u32 gMonShinyPalette_Sneasler[] = INCBIN_U32("graphics/pokemon/sneasler/shiny.gbapal.lz"); const u32 gMonShinyPalette_Overqwil[] = INCBIN_U32("graphics/pokemon/overqwil/shiny.gbapal.lz"); -//const u32 gMonShinyPalette_Enamorus[] = INCBIN_U32("graphics/pokemon/enamorus/shiny.gbapal.lz"); +const u32 gMonShinyPalette_Enamorus[] = INCBIN_U32("graphics/pokemon/enamorus/shiny.gbapal.lz"); #endif const u32 gMonShinyPalette_VenusaurMega[] = INCBIN_U32("graphics/pokemon/venusaur/mega/shiny.gbapal.lz"); const u32 gMonShinyPalette_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/charizard/mega_x/shiny.gbapal.lz"); @@ -4682,7 +4681,7 @@ const u32 gMonShinyPalette_TyphlosionHisuian[] = INCBIN_U32("graphics/pokemon/ty const u32 gMonShinyPalette_QwilfishHisuian[] = INCBIN_U32("graphics/pokemon/qwilfish/hisuian/shiny.gbapal.lz"); const u32 gMonShinyPalette_SneaselHisuian[] = INCBIN_U32("graphics/pokemon/sneasel/hisuian/shiny.gbapal.lz"); #if P_GEN_5_POKEMON == TRUE -//const u32 gMonShinyPalette_SamurottHisuian[] = INCBIN_U32("graphics/pokemon/samurott/hisuian/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SamurottHisuian[] = INCBIN_U32("graphics/pokemon/samurott/hisuian/shiny.gbapal.lz"); const u32 gMonShinyPalette_LilligantHisuian[] = INCBIN_U32("graphics/pokemon/lilligant/hisuian/shiny.gbapal.lz"); const u32 gMonShinyPalette_ZoruaHisuian[] = INCBIN_U32("graphics/pokemon/zorua/hisuian/shiny.gbapal.lz"); const u32 gMonShinyPalette_ZoroarkHisuian[] = INCBIN_U32("graphics/pokemon/zoroark/hisuian/shiny.gbapal.lz"); @@ -4694,7 +4693,7 @@ const u32 gMonShinyPalette_GoodraHisuian[] = INCBIN_U32("graphics/pokemon/goodra const u32 gMonShinyPalette_AvaluggHisuian[] = INCBIN_U32("graphics/pokemon/avalugg/hisuian/shiny.gbapal.lz"); #endif #if P_GEN_7_POKEMON == TRUE -//const u32 gMonShinyPalette_DecidueyeHisuian[] = INCBIN_U32("graphics/pokemon/decidueye/hisuian/shiny.gbapal.lz"); +const u32 gMonShinyPalette_DecidueyeHisuian[] = INCBIN_U32("graphics/pokemon/decidueye/hisuian/shiny.gbapal.lz"); #endif const u32 gMonShinyPalette_PikachuCosplay[] = INCBIN_U32("graphics/pokemon/pikachu/cosplay/shiny.gbapal.lz"); const u32 gMonShinyPalette_PikachuRockStar[] = INCBIN_U32("graphics/pokemon/pikachu/rock_star/shiny.gbapal.lz"); @@ -4878,7 +4877,8 @@ const u32 gMonShinyPalette_UrshifuRapidStrikeStyle[] = INCBIN_U32("graphics/poke const u32 gMonShinyPalette_ZarudeDada[] = INCBIN_U32("graphics/pokemon/zarude/dada/shiny.gbapal.lz"); const u32 gMonShinyPalette_CalyrexIceRider[] = INCBIN_U32("graphics/pokemon/calyrex/ice_rider/shiny.gbapal.lz"); const u32 gMonShinyPalette_CalyrexShadowRider[] = INCBIN_U32("graphics/pokemon/calyrex/shadow_rider/shiny.gbapal.lz"); -//const u32 gMonShinyPalette_EnamorusTherian[] = INCBIN_U32("graphics/pokemon/enamorus/therian/shiny.gbapal.lz"); +const u32 gMonShinyPalette_EnamorusTherian[] = INCBIN_U32("graphics/pokemon/enamorus/therian/shiny.gbapal.lz"); +const u32 gMonShinyPalette_BasculegionFemale[] = INCBIN_U32("graphics/pokemon/basculegion/female/shiny.gbapal.lz"); #endif const u8 gMonIcon_QuestionMark[] = INCBIN_U8("graphics/pokemon/question_mark/icon.4bpp"); @@ -5678,9 +5678,9 @@ const u8 gMonIcon_Mimikyu[] = INCBIN_U8("graphics/pokemon/mimikyu/icon.4bpp"); const u8 gMonIcon_Bruxish[] = INCBIN_U8("graphics/pokemon/bruxish/icon.4bpp"); const u8 gMonIcon_Drampa[] = INCBIN_U8("graphics/pokemon/drampa/icon.4bpp"); const u8 gMonIcon_Dhelmise[] = INCBIN_U8("graphics/pokemon/dhelmise/icon.4bpp"); -const u8 gMonIcon_Jangmoo[] = INCBIN_U8("graphics/pokemon/jangmo_o/icon.4bpp"); -const u8 gMonIcon_Hakamoo[] = INCBIN_U8("graphics/pokemon/hakamo_o/icon.4bpp"); -const u8 gMonIcon_Kommoo[] = INCBIN_U8("graphics/pokemon/kommo_o/icon.4bpp"); +const u8 gMonIcon_JangmoO[] = INCBIN_U8("graphics/pokemon/jangmo_o/icon.4bpp"); +const u8 gMonIcon_HakamoO[] = INCBIN_U8("graphics/pokemon/hakamo_o/icon.4bpp"); +const u8 gMonIcon_KommoO[] = INCBIN_U8("graphics/pokemon/kommo_o/icon.4bpp"); const u8 gMonIcon_TapuKoko[] = INCBIN_U8("graphics/pokemon/tapu_koko/icon.4bpp"); const u8 gMonIcon_TapuLele[] = INCBIN_U8("graphics/pokemon/tapu_lele/icon.4bpp"); const u8 gMonIcon_TapuBulu[] = INCBIN_U8("graphics/pokemon/tapu_bulu/icon.4bpp"); @@ -5801,7 +5801,6 @@ const u8 gMonIcon_Wyrdeer[] = INCBIN_U8("graphics/pokemon/wyrdeer/icon.4bpp"); const u8 gMonIcon_Kleavor[] = INCBIN_U8("graphics/pokemon/kleavor/icon.4bpp"); const u8 gMonIcon_Ursaluna[] = INCBIN_U8("graphics/pokemon/ursaluna/icon.4bpp"); const u8 gMonIcon_Basculegion[] = INCBIN_U8("graphics/pokemon/basculegion/icon.4bpp"); -const u8 gMonIcon_BasculegionF[] = INCBIN_U8("graphics/pokemon/basculegion/iconf.4bpp"); const u8 gMonIcon_Sneasler[] = INCBIN_U8("graphics/pokemon/sneasler/icon.4bpp"); const u8 gMonIcon_Overqwil[] = INCBIN_U8("graphics/pokemon/overqwil/icon.4bpp"); const u8 gMonIcon_Enamorus[] = INCBIN_U8("graphics/pokemon/enamorus/icon.4bpp"); @@ -6099,6 +6098,7 @@ const u8 gMonIcon_ZarudeDada[] = INCBIN_U8("graphics/pokemon/zarude/dada/icon.4b const u8 gMonIcon_CalyrexIceRider[] = INCBIN_U8("graphics/pokemon/calyrex/ice_rider/icon.4bpp"); const u8 gMonIcon_CalyrexShadowRider[] = INCBIN_U8("graphics/pokemon/calyrex/shadow_rider/icon.4bpp"); const u8 gMonIcon_EnamorusTherian[] = INCBIN_U8("graphics/pokemon/enamorus/therian/icon.4bpp"); +const u8 gMonIcon_BasculegionFemale[] = INCBIN_U8("graphics/pokemon/basculegion/female/icon.4bpp"); #endif const u8 gMonIcon_Egg[] = INCBIN_U8("graphics/pokemon/egg/icon.4bpp"); @@ -6891,9 +6891,9 @@ const u8 gMonFootprint_Mimikyu[] = INCBIN_U8("graphics/pokemon/mimikyu/footprint const u8 gMonFootprint_Bruxish[] = INCBIN_U8("graphics/pokemon/bruxish/footprint.1bpp"); const u8 gMonFootprint_Drampa[] = INCBIN_U8("graphics/pokemon/drampa/footprint.1bpp"); const u8 gMonFootprint_Dhelmise[] = INCBIN_U8("graphics/pokemon/dhelmise/footprint.1bpp"); -const u8 gMonFootprint_Jangmo_o[] = INCBIN_U8("graphics/pokemon/jangmo_o/footprint.1bpp"); -const u8 gMonFootprint_Hakamo_o[] = INCBIN_U8("graphics/pokemon/hakamo_o/footprint.1bpp"); -const u8 gMonFootprint_Kommo_o[] = INCBIN_U8("graphics/pokemon/kommo_o/footprint.1bpp"); +const u8 gMonFootprint_JangmoO[] = INCBIN_U8("graphics/pokemon/jangmo_o/footprint.1bpp"); +const u8 gMonFootprint_HakamoO[] = INCBIN_U8("graphics/pokemon/hakamo_o/footprint.1bpp"); +const u8 gMonFootprint_KommoO[] = INCBIN_U8("graphics/pokemon/kommo_o/footprint.1bpp"); const u8 gMonFootprint_Tapu_Koko[] = INCBIN_U8("graphics/pokemon/tapu_koko/footprint.1bpp"); const u8 gMonFootprint_Tapu_Lele[] = INCBIN_U8("graphics/pokemon/tapu_lele/footprint.1bpp"); const u8 gMonFootprint_Tapu_Bulu[] = INCBIN_U8("graphics/pokemon/tapu_bulu/footprint.1bpp"); diff --git a/src/data/item_icon_table.h b/src/data/item_icon_table.h index 0107b71ab7..f220bd819c 100644 --- a/src/data/item_icon_table.h +++ b/src/data/item_icon_table.h @@ -803,11 +803,46 @@ const u32 *const gItemIconTable[ITEMS_COUNT + 1][2] = [ITEM_TEA] = {gItemIcon_Tea, gItemIconPalette_Tea}, [ITEM_RUBY] = {gItemIcon_Gem, gItemIconPalette_Ruby}, [ITEM_SAPPHIRE] = {gItemIcon_Gem, gItemIconPalette_Sapphire}, - [ITEM_ABILITY_SHIELD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_AbilityShield, gItemIconPalette_AbilityShield}, + [ITEM_ABILITY_SHIELD] = {gItemIcon_AbilityShield, gItemIconPalette_AbilityShield}, [ITEM_CLEAR_AMULET] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_ClearAmulet, gItemIconPalette_ClearAmulet}, - [ITEM_PUNCHING_GLOVE] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_PunchingGlove, gItemIconPalette_PunchingGlove}, - [ITEM_COVERT_CLOAK] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_CovertCloak, gItemIconPalette_CovertCloak}, - [ITEM_LOADED_DICE] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_LoadedDice, gItemIconPalette_LoadedDice}, + [ITEM_PUNCHING_GLOVE] = {gItemIcon_PunchingGlove, gItemIconPalette_PunchingGlove}, + [ITEM_COVERT_CLOAK] = {gItemIcon_CovertCloak, gItemIconPalette_CovertCloak}, + [ITEM_LOADED_DICE] = {gItemIcon_LoadedDice, gItemIconPalette_LoadedDice}, + [ITEM_AUSPICIOUS_ARMOR] = {gItemIcon_AuspiciousArmor, gItemIconPalette_AuspiciousArmor}, + [ITEM_BOOSTER_ENERGY] = {gItemIcon_BoosterEnergy, gItemIconPalette_BoosterEnergy}, + [ITEM_BIG_BAMBOO_SHOOT] = {gItemIcon_BigBambooShoot, gItemIconPalette_BigBambooShoot}, + [ITEM_GIMMIGHOUL_COIN] = {gItemIcon_GimmighoulCoin, gItemIconPalette_GimmighoulCoin}, + [ITEM_LEADERS_CREST] = {gItemIcon_LeadersCrest, gItemIconPalette_LeadersCrest}, + [ITEM_MALICIOUS_ARMOR] = {gItemIcon_MaliciousArmor, gItemIconPalette_MaliciousArmor}, + [ITEM_MIRROR_HERB] = {gItemIcon_MirrorHerb, gItemIconPalette_MirrorHerb}, + [ITEM_SCROLL_OF_DARKNESS] = {gItemIcon_ScrollOfDarkness, gItemIconPalette_ScrollOfDarkness}, + [ITEM_SCROLL_OF_WATERS] = {gItemIcon_ScrollOfWaters, gItemIconPalette_ScrollOfWaters}, + [ITEM_TERA_ORB] = {gItemIcon_TeraOrb, gItemIconPalette_TeraOrb}, + [ITEM_TINY_BAMBOO_SHOOT] = {gItemIcon_TinyBambooShoot, gItemIconPalette_TinyBambooShoot}, + [ITEM_BUG_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_BugTeraShard, gItemIconPalette_BugTeraShard}, + [ITEM_DARK_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_DarkTeraShard, gItemIconPalette_DarkTeraShard}, + [ITEM_DRAGON_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_DragonTeraShard, gItemIconPalette_DragonTeraShard}, + [ITEM_ELECTRIC_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_ElectricTeraShard, gItemIconPalette_ElectricTeraShard}, + [ITEM_FAIRY_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_FairyTeraShard, gItemIconPalette_FairyTeraShard}, + [ITEM_FIGHTING_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_FightingTeraShard, gItemIconPalette_FightingTeraShard}, + [ITEM_FIRE_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_FireTeraShard, gItemIconPalette_FireTeraShard}, + [ITEM_FLYING_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_FlyingTeraShard, gItemIconPalette_FlyingTeraShard}, + [ITEM_GHOST_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_GhostTeraShard, gItemIconPalette_GhostTeraShard}, + [ITEM_GRASS_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_GrassTeraShard, gItemIconPalette_GrassTeraShard}, + [ITEM_GROUND_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_GroundTeraShard, gItemIconPalette_GroundTeraShard}, + [ITEM_ICE_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_IceTeraShard, gItemIconPalette_IceTeraShard}, + [ITEM_NORMAL_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_NormalTeraShard, gItemIconPalette_NormalTeraShard}, + [ITEM_POISON_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_PoisonTeraShard, gItemIconPalette_PoisonTeraShard}, + [ITEM_PSYCHIC_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_PsychicTeraShard, gItemIconPalette_PsychicTeraShard}, + [ITEM_ROCK_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_RockTeraShard, gItemIconPalette_RockTeraShard}, + [ITEM_STEEL_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_SteelTeraShard, gItemIconPalette_SteelTeraShard}, + [ITEM_WATER_TERA_SHARD] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // {gItemIcon_WaterTeraShard, gItemIconPalette_WaterTeraShard}, + [ITEM_ADAMANT_CRYSTAL] = {gItemIcon_AdamantCrystal, gItemIconPalette_AdamantCrystal}, + [ITEM_GRISEOUS_CORE] = {gItemIcon_GriseousCore, gItemIconPalette_GriseousCore}, + [ITEM_LUSTROUS_GLOBE] = {gItemIcon_LustrousGlobe, gItemIconPalette_LustrousGlobe}, + [ITEM_BLACK_AUGURITE] = {gItemIcon_BlackAugurite, gItemIconPalette_BlackAugurite}, + [ITEM_LINKING_CORD] = {gItemIcon_LinkingCord, gItemIconPalette_LinkingCord}, + [ITEM_PEAT_BLOCK] = {gItemIcon_PeatBlock, gItemIconPalette_PeatBlock}, // Return to field arrow [ITEMS_COUNT] = {gItemIcon_ReturnToFieldArrow, gItemIconPalette_ReturnToFieldArrow}, }; diff --git a/src/data/items.h b/src/data/items.h index 63446913ec..84436be55b 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -20,9 +20,8 @@ const struct Item gItems[] = .price = 200, .description = sPokeBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_POKE_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_POKE_BALL - FIRST_BALL, }, @@ -33,9 +32,8 @@ const struct Item gItems[] = .price = 600, .description = sGreatBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_GREAT_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_GREAT_BALL - FIRST_BALL, }, @@ -46,9 +44,8 @@ const struct Item gItems[] = .price = 800, .description = sUltraBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_ULTRA_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_ULTRA_BALL - FIRST_BALL, }, @@ -59,9 +56,8 @@ const struct Item gItems[] = .price = 0, .description = sMasterBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_MASTER_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_MASTER_BALL - FIRST_BALL, }, @@ -72,9 +68,8 @@ const struct Item gItems[] = .price = 20, .description = sPremierBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_PREMIER_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_PREMIER_BALL - FIRST_BALL, }, @@ -85,9 +80,8 @@ const struct Item gItems[] = .price = 300, .description = sHealBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_HEAL_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_HEAL_BALL - FIRST_BALL, }, @@ -98,9 +92,8 @@ const struct Item gItems[] = .price = 1000, .description = sNetBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_NET_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_NET_BALL - FIRST_BALL, }, @@ -111,9 +104,8 @@ const struct Item gItems[] = .price = 1000, .description = sNestBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_NEST_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_NEST_BALL - FIRST_BALL, }, @@ -124,9 +116,8 @@ const struct Item gItems[] = .price = 1000, .description = sDiveBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_DIVE_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_DIVE_BALL - FIRST_BALL, }, @@ -137,9 +128,8 @@ const struct Item gItems[] = .price = 1000, .description = sDuskBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_DUSK_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_DUSK_BALL - FIRST_BALL, }, @@ -150,9 +140,8 @@ const struct Item gItems[] = .price = 1000, .description = sTimerBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_TIMER_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_TIMER_BALL - FIRST_BALL, }, @@ -163,9 +152,8 @@ const struct Item gItems[] = .price = 1000, .description = sQuickBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_QUICK_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_QUICK_BALL - FIRST_BALL, }, @@ -176,9 +164,8 @@ const struct Item gItems[] = .price = 1000, .description = sRepeatBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_REPEAT_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_REPEAT_BALL - FIRST_BALL, }, @@ -189,9 +176,8 @@ const struct Item gItems[] = .price = 1000, .description = sLuxuryBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_LUXURY_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_LUXURY_BALL - FIRST_BALL, }, @@ -202,9 +188,8 @@ const struct Item gItems[] = .price = 0, .description = sLevelBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_LEVEL_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_LEVEL_BALL - FIRST_BALL, }, @@ -215,9 +200,8 @@ const struct Item gItems[] = .price = 0, .description = sLureBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_LURE_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_LURE_BALL - FIRST_BALL, }, @@ -228,9 +212,8 @@ const struct Item gItems[] = .price = 0, .description = sMoonBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_MOON_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_MOON_BALL - FIRST_BALL, }, @@ -241,9 +224,8 @@ const struct Item gItems[] = .price = 0, .description = sFriendBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_FRIEND_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_FRIEND_BALL - FIRST_BALL, }, @@ -254,9 +236,8 @@ const struct Item gItems[] = .price = 0, .description = sLoveBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_LOVE_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_LOVE_BALL - FIRST_BALL, }, @@ -267,9 +248,8 @@ const struct Item gItems[] = .price = 0, .description = sFastBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_FAST_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_FAST_BALL - FIRST_BALL, }, @@ -280,9 +260,8 @@ const struct Item gItems[] = .price = 0, .description = sHeavyBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_HEAVY_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_HEAVY_BALL - FIRST_BALL, }, @@ -293,9 +272,8 @@ const struct Item gItems[] = .price = 0, .description = sDreamBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_DREAM_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_DREAM_BALL - FIRST_BALL, }, @@ -306,9 +284,8 @@ const struct Item gItems[] = .price = 0, .description = sSafariBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_SAFARI_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_SAFARI_BALL - FIRST_BALL, }, @@ -319,9 +296,8 @@ const struct Item gItems[] = .price = 0, .description = sSportBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_SPORT_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_SPORT_BALL - FIRST_BALL, }, @@ -332,9 +308,8 @@ const struct Item gItems[] = .price = 0, .description = sParkBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_PARK_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_PARK_BALL - FIRST_BALL, }, @@ -345,9 +320,8 @@ const struct Item gItems[] = .price = 0, .description = sBeastBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_BEAST_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_BEAST_BALL - FIRST_BALL, }, @@ -358,9 +332,8 @@ const struct Item gItems[] = .price = 0, .description = sCherishBallDesc, .pocket = POCKET_POKE_BALLS, - .type = ITEM_CHERISH_BALL - FIRST_BALL, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_PokeBall, + .type = ITEM_USE_BAG_MENU, + .battleUsage = EFFECT_ITEM_THROW_BALL, .secondaryId = ITEM_CHERISH_BALL - FIRST_BALL, }, @@ -376,8 +349,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_RESTORE_HP, .flingPower = 30, }, @@ -391,8 +363,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_RESTORE_HP, .flingPower = 30, }, @@ -406,8 +377,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_RESTORE_HP, .flingPower = 30, }, @@ -421,8 +391,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_RESTORE_HP, .flingPower = 30, }, @@ -436,8 +405,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_HEAL_AND_CURE_STATUS, .flingPower = 30, }, @@ -450,8 +418,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_REVIVE, .flingPower = 30, }, @@ -464,8 +431,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_REVIVE, .flingPower = 30, }, @@ -479,8 +445,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_RESTORE_HP, .flingPower = 30, }, @@ -494,8 +459,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_RESTORE_HP, .flingPower = 30, }, @@ -509,8 +473,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_RESTORE_HP, .flingPower = 30, }, @@ -524,8 +487,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_RESTORE_HP, .flingPower = 30, }, @@ -538,8 +500,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_RESTORE_HP, .flingPower = 30, }, @@ -552,8 +513,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_RESTORE_HP, .flingPower = 30, }, @@ -566,8 +526,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_RESTORE_HP, .flingPower = 30, }, @@ -580,8 +539,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_REVIVE, .flingPower = 30, }, @@ -594,8 +552,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -608,8 +565,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -622,8 +578,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -636,8 +591,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -650,8 +604,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -664,8 +617,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -677,10 +629,9 @@ const struct Item gItems[] = .holdEffectParam = 10, .description = sEtherDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_PARTY_MENU, + .type = ITEM_USE_PARTY_MENU_MOVES, .fieldUseFunc = ItemUseOutOfBattle_PPRecovery, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_PPRecovery, + .battleUsage = EFFECT_ITEM_RESTORE_PP, .flingPower = 30, }, @@ -692,10 +643,9 @@ const struct Item gItems[] = .holdEffectParam = 255, .description = sMaxEtherDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_PARTY_MENU, + .type = ITEM_USE_PARTY_MENU_MOVES, .fieldUseFunc = ItemUseOutOfBattle_PPRecovery, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_PPRecovery, + .battleUsage = EFFECT_ITEM_RESTORE_PP, .flingPower = 30, }, @@ -709,8 +659,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_PPRecovery, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_PPRecovery, + .battleUsage = EFFECT_ITEM_RESTORE_PP, .flingPower = 30, }, @@ -724,8 +673,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_PPRecovery, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_PPRecovery, + .battleUsage = EFFECT_ITEM_RESTORE_PP, .flingPower = 30, }, @@ -740,8 +688,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_RESTORE_HP, .flingPower = 30, }, @@ -767,8 +714,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_RESTORE_HP, .flingPower = 30, }, @@ -781,8 +727,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_REVIVE, .flingPower = 30, }, @@ -797,8 +742,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -811,8 +755,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -825,8 +768,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -839,8 +781,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -853,8 +794,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -867,8 +807,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -881,8 +820,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -895,8 +833,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -1454,8 +1391,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -1468,8 +1404,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -1482,8 +1417,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 30, }, @@ -1618,17 +1552,19 @@ const struct Item gItems[] = // X Items +#define X_ITEM_STAGES (B_X_ITEMS_BUFF >= GEN_7) ? 2 : 1 + [ITEM_X_ATTACK] = { .name = _("X Attack"), .itemId = ITEM_X_ATTACK, .price = 1000, + .holdEffectParam = X_ITEM_STAGES, .description = sXAttackDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_StatIncrease, + .battleUsage = EFFECT_ITEM_INCREASE_STAT, .flingPower = 30, }, @@ -1637,12 +1573,12 @@ const struct Item gItems[] = .name = _("X Defense"), .itemId = ITEM_X_DEFENSE, .price = 2000, + .holdEffectParam = X_ITEM_STAGES, .description = sXDefenseDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_StatIncrease, + .battleUsage = EFFECT_ITEM_INCREASE_STAT, .flingPower = 30, }, @@ -1651,12 +1587,12 @@ const struct Item gItems[] = .name = _("X Sp. Atk"), .itemId = ITEM_X_SP_ATK, .price = 1000, + .holdEffectParam = X_ITEM_STAGES, .description = sXSpAtkDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_StatIncrease, + .battleUsage = EFFECT_ITEM_INCREASE_STAT, .flingPower = 30, }, @@ -1665,12 +1601,12 @@ const struct Item gItems[] = .name = _("X Sp. Def"), .itemId = ITEM_X_SP_DEF, .price = 2000, + .holdEffectParam = X_ITEM_STAGES, .description = sXSpDefDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_StatIncrease, + .battleUsage = EFFECT_ITEM_INCREASE_STAT, .flingPower = 30, }, @@ -1679,12 +1615,12 @@ const struct Item gItems[] = .name = _("X Speed"), .itemId = ITEM_X_SPEED, .price = 1000, + .holdEffectParam = X_ITEM_STAGES, .description = sXSpeedDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_StatIncrease, + .battleUsage = EFFECT_ITEM_INCREASE_STAT, .flingPower = 30, }, @@ -1693,12 +1629,12 @@ const struct Item gItems[] = .name = _("X Accuracy"), .itemId = ITEM_X_ACCURACY, .price = 1000, + .holdEffectParam = X_ITEM_STAGES, .description = sXAccuracyDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_StatIncrease, + .battleUsage = EFFECT_ITEM_INCREASE_STAT, .flingPower = 30, }, @@ -1711,8 +1647,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_StatIncrease, + .battleUsage = EFFECT_ITEM_SET_FOCUS_ENERGY, .flingPower = 30, }, @@ -1725,8 +1660,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_StatIncrease, + .battleUsage = EFFECT_ITEM_SET_MIST, .flingPower = 30, }, @@ -1739,8 +1673,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_Escape, + .battleUsage = EFFECT_ITEM_ESCAPE, .flingPower = 30, }, @@ -1753,8 +1686,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_Escape, + .battleUsage = EFFECT_ITEM_ESCAPE, .flingPower = 30, }, @@ -1767,8 +1699,7 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_Escape, + .battleUsage = EFFECT_ITEM_ESCAPE, .flingPower = 30, }, @@ -1781,11 +1712,12 @@ const struct Item gItems[] = .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = ITEM_B_USE_OTHER, - .battleUseFunc = ItemUseInBattle_StatIncrease, // Todo + .battleUsage = EFFECT_ITEM_INCREASE_ALL_STATS, .flingPower = 30, }, +#undef X_ITEM_STAGES + // Treasures [ITEM_BOTTLE_CAP] = @@ -6874,8 +6806,7 @@ const struct Item gItems[] = .pocket = POCKET_BERRIES, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 10, }, @@ -6889,8 +6820,7 @@ const struct Item gItems[] = .pocket = POCKET_BERRIES, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 10, }, @@ -6904,8 +6834,7 @@ const struct Item gItems[] = .pocket = POCKET_BERRIES, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 10, }, @@ -6919,8 +6848,7 @@ const struct Item gItems[] = .pocket = POCKET_BERRIES, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 10, }, @@ -6934,8 +6862,7 @@ const struct Item gItems[] = .pocket = POCKET_BERRIES, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 10, }, @@ -6948,10 +6875,9 @@ const struct Item gItems[] = .holdEffectParam = 10, .description = sLeppaBerryDesc, .pocket = POCKET_BERRIES, - .type = ITEM_USE_PARTY_MENU, + .type = ITEM_USE_PARTY_MENU_MOVES, .fieldUseFunc = ItemUseOutOfBattle_PPRecovery, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_PPRecovery, + .battleUsage = EFFECT_ITEM_RESTORE_PP, .flingPower = 10, }, @@ -6966,8 +6892,7 @@ const struct Item gItems[] = .pocket = POCKET_BERRIES, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_RESTORE_HP, .flingPower = 10, }, @@ -6981,8 +6906,7 @@ const struct Item gItems[] = .pocket = POCKET_BERRIES, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 10, }, @@ -6996,8 +6920,7 @@ const struct Item gItems[] = .pocket = POCKET_BERRIES, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_CURE_STATUS, .flingPower = 10, }, @@ -7017,8 +6940,7 @@ const struct Item gItems[] = .pocket = POCKET_BERRIES, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_Medicine, + .battleUsage = EFFECT_ITEM_RESTORE_HP, .flingPower = 10, }, @@ -7794,8 +7716,7 @@ const struct Item gItems[] = .pocket = POCKET_BERRIES, .type = ITEM_USE_BAG_MENU, // Type handled by ItemUseOutOfBattle_EnigmaBerry .fieldUseFunc = ItemUseOutOfBattle_EnigmaBerry, - .battleUsage = ITEM_B_USE_MEDICINE, - .battleUseFunc = ItemUseInBattle_EnigmaBerry, + .battleUsage = EFFECT_ITEM_ENIGMA_BERRY_EREADER, .flingPower = 10, }, @@ -7807,6 +7728,7 @@ const struct Item gItems[] = .itemId = ITEM_TM01_FOCUS_PUNCH, .price = 3000, .description = sTM01Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7818,6 +7740,7 @@ const struct Item gItems[] = .itemId = ITEM_TM02_DRAGON_CLAW, .price = 3000, .description = sTM02Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7829,6 +7752,7 @@ const struct Item gItems[] = .itemId = ITEM_TM03_WATER_PULSE, .price = 3000, .description = sTM03Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7840,6 +7764,7 @@ const struct Item gItems[] = .itemId = ITEM_TM04_CALM_MIND, .price = 3000, .description = sTM04Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7851,6 +7776,7 @@ const struct Item gItems[] = .itemId = ITEM_TM05_ROAR, .price = 1000, .description = sTM05Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7862,6 +7788,7 @@ const struct Item gItems[] = .itemId = ITEM_TM06_TOXIC, .price = 3000, .description = sTM06Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7873,6 +7800,7 @@ const struct Item gItems[] = .itemId = ITEM_TM07_HAIL, .price = 3000, .description = sTM07Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7884,6 +7812,7 @@ const struct Item gItems[] = .itemId = ITEM_TM08_BULK_UP, .price = 3000, .description = sTM08Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7895,6 +7824,7 @@ const struct Item gItems[] = .itemId = ITEM_TM09_BULLET_SEED, .price = 3000, .description = sTM09Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7906,6 +7836,7 @@ const struct Item gItems[] = .itemId = ITEM_TM10_HIDDEN_POWER, .price = 3000, .description = sTM10Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7917,6 +7848,7 @@ const struct Item gItems[] = .itemId = ITEM_TM11_SUNNY_DAY, .price = 2000, .description = sTM11Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7928,6 +7860,7 @@ const struct Item gItems[] = .itemId = ITEM_TM12_TAUNT, .price = 3000, .description = sTM12Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7939,6 +7872,7 @@ const struct Item gItems[] = .itemId = ITEM_TM13_ICE_BEAM, .price = 3000, .description = sTM13Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7950,6 +7884,7 @@ const struct Item gItems[] = .itemId = ITEM_TM14_BLIZZARD, .price = 5500, .description = sTM14Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7961,6 +7896,7 @@ const struct Item gItems[] = .itemId = ITEM_TM15_HYPER_BEAM, .price = 7500, .description = sTM15Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7972,6 +7908,7 @@ const struct Item gItems[] = .itemId = ITEM_TM16_LIGHT_SCREEN, .price = 3000, .description = sTM16Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7983,6 +7920,7 @@ const struct Item gItems[] = .itemId = ITEM_TM17_PROTECT, .price = 3000, .description = sTM17Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -7994,6 +7932,7 @@ const struct Item gItems[] = .itemId = ITEM_TM18_RAIN_DANCE, .price = 2000, .description = sTM18Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8005,6 +7944,7 @@ const struct Item gItems[] = .itemId = ITEM_TM19_GIGA_DRAIN, .price = 3000, .description = sTM19Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8016,6 +7956,7 @@ const struct Item gItems[] = .itemId = ITEM_TM20_SAFEGUARD, .price = 3000, .description = sTM20Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8027,6 +7968,7 @@ const struct Item gItems[] = .itemId = ITEM_TM21_FRUSTRATION, .price = 1000, .description = sTM21Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8038,6 +7980,7 @@ const struct Item gItems[] = .itemId = ITEM_TM22_SOLAR_BEAM, .price = 3000, .description = sTM22Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8049,6 +7992,7 @@ const struct Item gItems[] = .itemId = ITEM_TM23_IRON_TAIL, .price = 3000, .description = sTM23Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8060,6 +8004,7 @@ const struct Item gItems[] = .itemId = ITEM_TM24_THUNDERBOLT, .price = 3000, .description = sTM24Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8071,6 +8016,7 @@ const struct Item gItems[] = .itemId = ITEM_TM25_THUNDER, .price = 5500, .description = sTM25Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8082,6 +8028,7 @@ const struct Item gItems[] = .itemId = ITEM_TM26_EARTHQUAKE, .price = 3000, .description = sTM26Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8093,6 +8040,7 @@ const struct Item gItems[] = .itemId = ITEM_TM27_RETURN, .price = 1000, .description = sTM27Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8104,6 +8052,7 @@ const struct Item gItems[] = .itemId = ITEM_TM28_DIG, .price = 2000, .description = sTM28Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8115,6 +8064,7 @@ const struct Item gItems[] = .itemId = ITEM_TM29_PSYCHIC, .price = 2000, .description = sTM29Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8126,6 +8076,7 @@ const struct Item gItems[] = .itemId = ITEM_TM30_SHADOW_BALL, .price = 3000, .description = sTM30Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8137,6 +8088,7 @@ const struct Item gItems[] = .itemId = ITEM_TM31_BRICK_BREAK, .price = 3000, .description = sTM31Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8148,6 +8100,7 @@ const struct Item gItems[] = .itemId = ITEM_TM32_DOUBLE_TEAM, .price = 2000, .description = sTM32Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8159,6 +8112,7 @@ const struct Item gItems[] = .itemId = ITEM_TM33_REFLECT, .price = 3000, .description = sTM33Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8170,6 +8124,7 @@ const struct Item gItems[] = .itemId = ITEM_TM34_SHOCK_WAVE, .price = 3000, .description = sTM34Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8181,6 +8136,7 @@ const struct Item gItems[] = .itemId = ITEM_TM35_FLAMETHROWER, .price = 3000, .description = sTM35Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8192,6 +8148,7 @@ const struct Item gItems[] = .itemId = ITEM_TM36_SLUDGE_BOMB, .price = 1000, .description = sTM36Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8203,6 +8160,7 @@ const struct Item gItems[] = .itemId = ITEM_TM37_SANDSTORM, .price = 2000, .description = sTM37Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8214,6 +8172,7 @@ const struct Item gItems[] = .itemId = ITEM_TM38_FIRE_BLAST, .price = 5500, .description = sTM38Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8225,6 +8184,7 @@ const struct Item gItems[] = .itemId = ITEM_TM39_ROCK_TOMB, .price = 3000, .description = sTM39Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8236,6 +8196,7 @@ const struct Item gItems[] = .itemId = ITEM_TM40_AERIAL_ACE, .price = 3000, .description = sTM40Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8247,6 +8208,7 @@ const struct Item gItems[] = .itemId = ITEM_TM41_TORMENT, .price = 3000, .description = sTM41Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8258,6 +8220,7 @@ const struct Item gItems[] = .itemId = ITEM_TM42_FACADE, .price = 3000, .description = sTM42Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8269,6 +8232,7 @@ const struct Item gItems[] = .itemId = ITEM_TM43_SECRET_POWER, .price = 3000, .description = sTM43Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8280,6 +8244,7 @@ const struct Item gItems[] = .itemId = ITEM_TM44_REST, .price = 3000, .description = sTM44Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8291,6 +8256,7 @@ const struct Item gItems[] = .itemId = ITEM_TM45_ATTRACT, .price = 3000, .description = sTM45Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8302,6 +8268,7 @@ const struct Item gItems[] = .itemId = ITEM_TM46_THIEF, .price = 3000, .description = sTM46Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8313,6 +8280,7 @@ const struct Item gItems[] = .itemId = ITEM_TM47_STEEL_WING, .price = 3000, .description = sTM47Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8324,6 +8292,7 @@ const struct Item gItems[] = .itemId = ITEM_TM48_SKILL_SWAP, .price = 3000, .description = sTM48Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8335,6 +8304,7 @@ const struct Item gItems[] = .itemId = ITEM_TM49_SNATCH, .price = 3000, .description = sTM49Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8346,6 +8316,7 @@ const struct Item gItems[] = .itemId = ITEM_TM50_OVERHEAT, .price = 3000, .description = sTM50Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8357,6 +8328,7 @@ const struct Item gItems[] = .itemId = ITEM_TM51, .price = 3000, .description = sTM51Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8368,6 +8340,7 @@ const struct Item gItems[] = .itemId = ITEM_TM52, .price = 3000, .description = sTM52Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8379,6 +8352,7 @@ const struct Item gItems[] = .itemId = ITEM_TM53, .price = 3000, .description = sTM53Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8390,6 +8364,7 @@ const struct Item gItems[] = .itemId = ITEM_TM54, .price = 3000, .description = sTM54Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8401,6 +8376,7 @@ const struct Item gItems[] = .itemId = ITEM_TM55, .price = 3000, .description = sTM55Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8412,6 +8388,7 @@ const struct Item gItems[] = .itemId = ITEM_TM56, .price = 3000, .description = sTM56Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8423,6 +8400,7 @@ const struct Item gItems[] = .itemId = ITEM_TM57, .price = 3000, .description = sTM57Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8434,6 +8412,7 @@ const struct Item gItems[] = .itemId = ITEM_TM58, .price = 3000, .description = sTM58Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8445,6 +8424,7 @@ const struct Item gItems[] = .itemId = ITEM_TM59, .price = 3000, .description = sTM59Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8456,6 +8436,7 @@ const struct Item gItems[] = .itemId = ITEM_TM60, .price = 3000, .description = sTM60Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8467,6 +8448,7 @@ const struct Item gItems[] = .itemId = ITEM_TM61, .price = 3000, .description = sTM61Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8478,6 +8460,7 @@ const struct Item gItems[] = .itemId = ITEM_TM62, .price = 3000, .description = sTM62Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8489,6 +8472,7 @@ const struct Item gItems[] = .itemId = ITEM_TM63, .price = 3000, .description = sTM63Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8500,6 +8484,7 @@ const struct Item gItems[] = .itemId = ITEM_TM64, .price = 3000, .description = sTM64Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8511,6 +8496,7 @@ const struct Item gItems[] = .itemId = ITEM_TM65, .price = 3000, .description = sTM65Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8522,6 +8508,7 @@ const struct Item gItems[] = .itemId = ITEM_TM66, .price = 3000, .description = sTM66Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8533,6 +8520,7 @@ const struct Item gItems[] = .itemId = ITEM_TM67, .price = 3000, .description = sTM67Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8544,6 +8532,7 @@ const struct Item gItems[] = .itemId = ITEM_TM68, .price = 3000, .description = sTM68Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8555,6 +8544,7 @@ const struct Item gItems[] = .itemId = ITEM_TM69, .price = 3000, .description = sTM69Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8566,6 +8556,7 @@ const struct Item gItems[] = .itemId = ITEM_TM70, .price = 3000, .description = sTM70Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8577,6 +8568,7 @@ const struct Item gItems[] = .itemId = ITEM_TM71, .price = 3000, .description = sTM71Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8588,6 +8580,7 @@ const struct Item gItems[] = .itemId = ITEM_TM72, .price = 3000, .description = sTM72Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8599,6 +8592,7 @@ const struct Item gItems[] = .itemId = ITEM_TM73, .price = 3000, .description = sTM73Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8610,6 +8604,7 @@ const struct Item gItems[] = .itemId = ITEM_TM74, .price = 3000, .description = sTM74Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8621,6 +8616,7 @@ const struct Item gItems[] = .itemId = ITEM_TM75, .price = 3000, .description = sTM75Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8632,6 +8628,7 @@ const struct Item gItems[] = .itemId = ITEM_TM76, .price = 3000, .description = sTM76Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8643,6 +8640,7 @@ const struct Item gItems[] = .itemId = ITEM_TM77, .price = 3000, .description = sTM77Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8654,6 +8652,7 @@ const struct Item gItems[] = .itemId = ITEM_TM78, .price = 3000, .description = sTM78Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8665,6 +8664,7 @@ const struct Item gItems[] = .itemId = ITEM_TM79, .price = 3000, .description = sTM79Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8676,6 +8676,7 @@ const struct Item gItems[] = .itemId = ITEM_TM80, .price = 3000, .description = sTM80Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8687,6 +8688,7 @@ const struct Item gItems[] = .itemId = ITEM_TM81, .price = 3000, .description = sTM81Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8698,6 +8700,7 @@ const struct Item gItems[] = .itemId = ITEM_TM82, .price = 3000, .description = sTM82Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8709,6 +8712,7 @@ const struct Item gItems[] = .itemId = ITEM_TM83, .price = 3000, .description = sTM83Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8720,6 +8724,7 @@ const struct Item gItems[] = .itemId = ITEM_TM84, .price = 3000, .description = sTM84Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8731,6 +8736,7 @@ const struct Item gItems[] = .itemId = ITEM_TM85, .price = 3000, .description = sTM85Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8742,6 +8748,7 @@ const struct Item gItems[] = .itemId = ITEM_TM86, .price = 3000, .description = sTM86Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8753,6 +8760,7 @@ const struct Item gItems[] = .itemId = ITEM_TM87, .price = 3000, .description = sTM87Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8764,6 +8772,7 @@ const struct Item gItems[] = .itemId = ITEM_TM88, .price = 3000, .description = sTM88Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8775,6 +8784,7 @@ const struct Item gItems[] = .itemId = ITEM_TM89, .price = 3000, .description = sTM89Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8786,6 +8796,7 @@ const struct Item gItems[] = .itemId = ITEM_TM90, .price = 3000, .description = sTM90Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8797,6 +8808,7 @@ const struct Item gItems[] = .itemId = ITEM_TM91, .price = 3000, .description = sTM91Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8808,6 +8820,7 @@ const struct Item gItems[] = .itemId = ITEM_TM92, .price = 3000, .description = sTM92Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8819,6 +8832,7 @@ const struct Item gItems[] = .itemId = ITEM_TM93, .price = 3000, .description = sTM93Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8830,6 +8844,7 @@ const struct Item gItems[] = .itemId = ITEM_TM94, .price = 3000, .description = sTM94Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8841,6 +8856,7 @@ const struct Item gItems[] = .itemId = ITEM_TM95, .price = 3000, .description = sTM95Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8852,6 +8868,7 @@ const struct Item gItems[] = .itemId = ITEM_TM96, .price = 3000, .description = sTM96Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8863,6 +8880,7 @@ const struct Item gItems[] = .itemId = ITEM_TM97, .price = 3000, .description = sTM97Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8874,6 +8892,7 @@ const struct Item gItems[] = .itemId = ITEM_TM98, .price = 3000, .description = sTM98Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8885,6 +8904,7 @@ const struct Item gItems[] = .itemId = ITEM_TM99, .price = 3000, .description = sTM99Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -8896,6 +8916,7 @@ const struct Item gItems[] = .itemId = ITEM_TM100, .price = 3000, .description = sTM100Desc, + .importance = I_REUSABLE_TMS, .pocket = POCKET_TM_HM, .type = ITEM_USE_PARTY_MENU, .fieldUseFunc = ItemUseOutOfBattle_TMHM, @@ -9907,7 +9928,6 @@ const struct Item gItems[] = [ITEM_LOADED_DICE] = { - //YellwApricorn .name = _("Loaded Dice"), .itemId = ITEM_LOADED_DICE, .price = 20000, @@ -9918,4 +9938,406 @@ const struct Item gItems[] = .fieldUseFunc = ItemUseOutOfBattle_CannotUse, .flingPower = 30, }, + + [ITEM_AUSPICIOUS_ARMOR] = + { + .name = _("AuspciousArmr"), + .itemId = ITEM_AUSPICIOUS_ARMOR, + .price = 3000, + .description = sAuspiciousArmorDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone, + .flingPower = 30, + }, + + [ITEM_BOOSTER_ENERGY] = + { + .name = _("BoosterEnergy"), + .itemId = ITEM_BOOSTER_ENERGY, + .price = 0, + .holdEffect = HOLD_EFFECT_BOOSTER_ENERGY, + .description = sBoosterEnergyDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .flingPower = 30, + }, + + [ITEM_BIG_BAMBOO_SHOOT] = + { + .name = _("BigBmbooShoot"), + .itemId = ITEM_BIG_BAMBOO_SHOOT, + .price = 3000, + .description = sBigBambooShootDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .flingPower = 30, + }, + + [ITEM_GIMMIGHOUL_COIN] = + { + .name = _("GimighoulCoin"), + .itemId = ITEM_GIMMIGHOUL_COIN, + .price = 400, + .description = sGimmighoulCoinDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_LEADERS_CREST] = + { + .name = _("Leader'sCrest"), + .itemId = ITEM_LEADERS_CREST, + .price = 3000, + .description = sLeadersCrestDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_MALICIOUS_ARMOR] = + { + .name = _("MaliciousArmr"), + .itemId = ITEM_MALICIOUS_ARMOR, + .price = 3000, + .description = sMaliciousArmorDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone, + .flingPower = 30, + }, + + [ITEM_MIRROR_HERB] = + { + .name = _("Mirror Herb"), + .itemId = ITEM_MIRROR_HERB, + .price = 30000, + .holdEffect = HOLD_EFFECT_MIRROR_HERB, + .description = sMirrorHerbDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .flingPower = 30, + }, + + [ITEM_SCROLL_OF_DARKNESS] = + { + .name = _("ScrllOfDrknss"), + .itemId = ITEM_SCROLL_OF_DARKNESS, + .price = 0, + .description = sScrollOfDarknessDesc, + .importance = 1, + .pocket = POCKET_KEY_ITEMS, + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone, + }, + + [ITEM_SCROLL_OF_WATERS] = + { + .name = _("ScrollOfWatrs"), + .itemId = ITEM_SCROLL_OF_WATERS, + .price = 0, + .description = sScrollOfWatersDesc, + .importance = 1, + .pocket = POCKET_KEY_ITEMS, + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone, + }, + + [ITEM_TERA_ORB] = + { + .name = _("Tera Orb"), + .itemId = ITEM_TERA_ORB, + .price = 0, + .description = sTeraOrbDesc, + .importance = 1, + .pocket = POCKET_KEY_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_TINY_BAMBOO_SHOOT] = + { + .name = _("TinyBmbooShot"), + .itemId = ITEM_TINY_BAMBOO_SHOOT, + .price = 750, + .description = sTinyBambooShootDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .flingPower = 30, + }, + + [ITEM_BUG_TERA_SHARD] = + { + .name = _("Bug TeraShard"), + .itemId = ITEM_BUG_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_DARK_TERA_SHARD] = + { + .name = _("DarkTeraShard"), + .itemId = ITEM_DARK_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_DRAGON_TERA_SHARD] = + { + .name = _("DragnTeraShrd"), + .itemId = ITEM_DRAGON_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_ELECTRIC_TERA_SHARD] = + { + .name = _("EltrcTeraShrd"), + .itemId = ITEM_ELECTRIC_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_FAIRY_TERA_SHARD] = + { + .name = _("FairyTeraShrd"), + .itemId = ITEM_FAIRY_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_FIGHTING_TERA_SHARD] = + { + .name = _("FghtngTerShrd"), + .itemId = ITEM_FIGHTING_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_FIRE_TERA_SHARD] = + { + .name = _("FireTeraShard"), + .itemId = ITEM_FIRE_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_FLYING_TERA_SHARD] = + { + .name = _("FlyngTeraShrd"), + .itemId = ITEM_FLYING_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_GHOST_TERA_SHARD] = + { + .name = _("GhostTeraShrd"), + .itemId = ITEM_GHOST_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_GRASS_TERA_SHARD] = + { + .name = _("GrassTeraShrd"), + .itemId = ITEM_GRASS_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_GROUND_TERA_SHARD] = + { + .name = _("GrondTeraShrd"), + .itemId = ITEM_GROUND_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_ICE_TERA_SHARD] = + { + .name = _("Ice TeraShard"), + .itemId = ITEM_ICE_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_NORMAL_TERA_SHARD] = + { + .name = _("NormlTeraShrd"), + .itemId = ITEM_NORMAL_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_POISON_TERA_SHARD] = + { + .name = _("PoisnTeraShrd"), + .itemId = ITEM_POISON_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_PSYCHIC_TERA_SHARD] = + { + .name = _("PschcTeraShrd"), + .itemId = ITEM_PSYCHIC_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_ROCK_TERA_SHARD] = + { + .name = _("RockTeraShard"), + .itemId = ITEM_ROCK_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_STEEL_TERA_SHARD] = + { + .name = _("SteelTeraShrd"), + .itemId = ITEM_STEEL_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_WATER_TERA_SHARD] = + { + .name = _("WaterTeraShrd"), + .itemId = ITEM_WATER_TERA_SHARD, + .price = 0, + .description = sTeraShardDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + }, + + [ITEM_ADAMANT_CRYSTAL] = + { + .name = _("AdamantCrystl"), + .itemId = ITEM_ADAMANT_CRYSTAL, + .price = 0, + .description = sAdamantCrystalDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .flingPower = 60, + }, + + [ITEM_GRISEOUS_CORE] = + { + .name = _("Griseous Core"), + .itemId = ITEM_GRISEOUS_CORE, + .price = 0, + .description = sGriseousCoreDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .flingPower = 60, + }, + + [ITEM_LUSTROUS_GLOBE] = + { + .name = _("LustrousGlobe"), + .itemId = ITEM_LUSTROUS_GLOBE, + .price = 0, + .description = sLustrousGlobeDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_BAG_MENU, + .fieldUseFunc = ItemUseOutOfBattle_CannotUse, + .flingPower = 60, + }, + + [ITEM_BLACK_AUGURITE] = + { + .name = _("BlackAugurite"), + .itemId = ITEM_BLACK_AUGURITE, + .price = 8000, + .description = sBlackAuguriteDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone, + .flingPower = 30, + }, + + [ITEM_LINKING_CORD] = + { + .name = _("Linking Cord"), + .itemId = ITEM_LINKING_CORD, + .price = 8000, + .description = sLinkingCordDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone, + .flingPower = 30, + }, + + [ITEM_PEAT_BLOCK] = + { + .name = _("Peat Block"), + .itemId = ITEM_PEAT_BLOCK, + .price = 10000, + .description = sPeatBlockDesc, + .pocket = POCKET_ITEMS, + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone, + .flingPower = 30, + }, }; diff --git a/src/data/party_menu.h b/src/data/party_menu.h index 663e6f2c04..4a06fa135e 100644 --- a/src/data/party_menu.h +++ b/src/data/party_menu.h @@ -122,7 +122,7 @@ static const u8 sFontColorTable[][3] = static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] = { - { + { // Party mon 1 .bg = 0, .tilemapLeft = 1, .tilemapTop = 3, @@ -131,7 +131,7 @@ static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] = .paletteNum = 3, .baseBlock = 0x63, }, - { + { // Party mon 2 .bg = 0, .tilemapLeft = 12, .tilemapTop = 1, @@ -140,7 +140,7 @@ static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] = .paletteNum = 4, .baseBlock = 0xA9, }, - { + { // Party mon 3 .bg = 0, .tilemapLeft = 12, .tilemapTop = 4, @@ -149,7 +149,7 @@ static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] = .paletteNum = 5, .baseBlock = 0xDF, }, - { + { // Party mon 4 .bg = 0, .tilemapLeft = 12, .tilemapTop = 7, @@ -158,7 +158,7 @@ static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] = .paletteNum = 6, .baseBlock = 0x115, }, - { + { // Party mon 5 .bg = 0, .tilemapLeft = 12, .tilemapTop = 10, @@ -167,7 +167,7 @@ static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] = .paletteNum = 7, .baseBlock = 0x14B, }, - { + { // Party mon 6 .bg = 0, .tilemapLeft = 12, .tilemapTop = 13, @@ -176,7 +176,7 @@ static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] = .paletteNum = 8, .baseBlock = 0x181, }, - { + [WIN_MSG] = { .bg = 2, .tilemapLeft = 1, .tilemapTop = 15, @@ -190,7 +190,7 @@ static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] = static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] = { - { + { // Party mon 1 .bg = 0, .tilemapLeft = 1, .tilemapTop = 1, @@ -199,7 +199,7 @@ static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] = .paletteNum = 3, .baseBlock = 0x63, }, - { + { // Party mon 2 .bg = 0, .tilemapLeft = 1, .tilemapTop = 8, @@ -208,7 +208,7 @@ static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] = .paletteNum = 4, .baseBlock = 0xA9, }, - { + { // Party mon 3 .bg = 0, .tilemapLeft = 12, .tilemapTop = 1, @@ -217,7 +217,7 @@ static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] = .paletteNum = 5, .baseBlock = 0xEF, }, - { + { // Party mon 4 .bg = 0, .tilemapLeft = 12, .tilemapTop = 5, @@ -226,7 +226,7 @@ static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] = .paletteNum = 6, .baseBlock = 0x125, }, - { + { // Party mon 5 .bg = 0, .tilemapLeft = 12, .tilemapTop = 9, @@ -235,7 +235,7 @@ static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] = .paletteNum = 7, .baseBlock = 0x15B, }, - { + { // Party mon 6 .bg = 0, .tilemapLeft = 12, .tilemapTop = 13, @@ -244,7 +244,7 @@ static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] = .paletteNum = 8, .baseBlock = 0x191, }, - { + [WIN_MSG] = { .bg = 2, .tilemapLeft = 1, .tilemapTop = 15, @@ -258,7 +258,7 @@ static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] = static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] = { - { + { // Party mon 1 .bg = 0, .tilemapLeft = 1, .tilemapTop = 1, @@ -267,7 +267,7 @@ static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] = .paletteNum = 3, .baseBlock = 0x63, }, - { + { // Party mon 2 .bg = 0, .tilemapLeft = 1, .tilemapTop = 8, @@ -276,7 +276,7 @@ static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] = .paletteNum = 4, .baseBlock = 0xA9, }, - { + { // Party mon 3 .bg = 0, .tilemapLeft = 12, .tilemapTop = 2, @@ -285,7 +285,7 @@ static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] = .paletteNum = 5, .baseBlock = 0xEF, }, - { + { // Party mon 4 .bg = 0, .tilemapLeft = 12, .tilemapTop = 5, @@ -294,7 +294,7 @@ static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] = .paletteNum = 6, .baseBlock = 0x125, }, - { + { // Party mon 5 .bg = 0, .tilemapLeft = 12, .tilemapTop = 9, @@ -303,7 +303,7 @@ static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] = .paletteNum = 7, .baseBlock = 0x15B, }, - { + { // Party mon 6 .bg = 0, .tilemapLeft = 12, .tilemapTop = 12, @@ -312,7 +312,7 @@ static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] = .paletteNum = 8, .baseBlock = 0x191, }, - { + [WIN_MSG] = { .bg = 2, .tilemapLeft = 1, .tilemapTop = 15, @@ -326,7 +326,7 @@ static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] = static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] = { - { + { // Party mon 1 .bg = 0, .tilemapLeft = 1, .tilemapTop = 2, @@ -335,7 +335,7 @@ static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] = .paletteNum = 3, .baseBlock = 0x63, }, - { + { // Party mon 2 .bg = 0, .tilemapLeft = 12, .tilemapTop = 3, @@ -344,7 +344,7 @@ static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] = .paletteNum = 5, .baseBlock = 0xA9, }, - { + { // Party mon 3 .bg = 0, .tilemapLeft = 12, .tilemapTop = 6, @@ -353,7 +353,7 @@ static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] = .paletteNum = 6, .baseBlock = 0xDF, }, - { + { // Party mon 4 .bg = 2, .tilemapLeft = 1, .tilemapTop = 11, @@ -362,7 +362,7 @@ static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] = .paletteNum = 4, .baseBlock = 0x115, }, - { + { // Party mon 5 .bg = 2, .tilemapLeft = 12, .tilemapTop = 12, @@ -371,7 +371,7 @@ static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] = .paletteNum = 7, .baseBlock = 0x16B, }, - { + { // Party mon 6 .bg = 2, .tilemapLeft = 12, .tilemapTop = 15, diff --git a/src/data/pokemon/evolution.h b/src/data/pokemon/evolution.h index 4f09867a6c..f222148178 100644 --- a/src/data/pokemon/evolution.h +++ b/src/data/pokemon/evolution.h @@ -47,15 +47,18 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_POLIWHIRL] = {{EVO_ITEM, ITEM_WATER_STONE, SPECIES_POLIWRATH}, {EVO_TRADE_ITEM, ITEM_KINGS_ROCK, SPECIES_POLITOED}}, [SPECIES_ABRA] = {{EVO_LEVEL, 16, SPECIES_KADABRA}}, - [SPECIES_KADABRA] = {{EVO_TRADE, 0, SPECIES_ALAKAZAM}}, + [SPECIES_KADABRA] = {{EVO_TRADE, 0, SPECIES_ALAKAZAM}, + {EVO_ITEM, ITEM_LINKING_CORD, SPECIES_ALAKAZAM}}, [SPECIES_ALAKAZAM] = {{EVO_MEGA_EVOLUTION, ITEM_ALAKAZITE, SPECIES_ALAKAZAM_MEGA}}, [SPECIES_MACHOP] = {{EVO_LEVEL, 28, SPECIES_MACHOKE}}, - [SPECIES_MACHOKE] = {{EVO_TRADE, 0, SPECIES_MACHAMP}}, + [SPECIES_MACHOKE] = {{EVO_TRADE, 0, SPECIES_MACHAMP}, + {EVO_ITEM, ITEM_LINKING_CORD, SPECIES_MACHAMP}}, [SPECIES_BELLSPROUT] = {{EVO_LEVEL, 21, SPECIES_WEEPINBELL}}, [SPECIES_WEEPINBELL] = {{EVO_ITEM, ITEM_LEAF_STONE, SPECIES_VICTREEBEL}}, [SPECIES_TENTACOOL] = {{EVO_LEVEL, 30, SPECIES_TENTACRUEL}}, [SPECIES_GEODUDE] = {{EVO_LEVEL, 25, SPECIES_GRAVELER}}, - [SPECIES_GRAVELER] = {{EVO_TRADE, 0, SPECIES_GOLEM}}, + [SPECIES_GRAVELER] = {{EVO_TRADE, 0, SPECIES_GOLEM}, + {EVO_ITEM, ITEM_LINKING_CORD, SPECIES_GOLEM}}, [SPECIES_PONYTA] = {{EVO_LEVEL, 40, SPECIES_RAPIDASH}}, [SPECIES_SLOWPOKE] = {{EVO_LEVEL, 37, SPECIES_SLOWBRO}, {EVO_TRADE_ITEM, ITEM_KINGS_ROCK, SPECIES_SLOWKING}}, @@ -70,7 +73,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_GRIMER] = {{EVO_LEVEL, 38, SPECIES_MUK}}, [SPECIES_SHELLDER] = {{EVO_ITEM, ITEM_WATER_STONE, SPECIES_CLOYSTER}}, [SPECIES_GASTLY] = {{EVO_LEVEL, 25, SPECIES_HAUNTER}}, - [SPECIES_HAUNTER] = {{EVO_TRADE, 0, SPECIES_GENGAR}}, + [SPECIES_HAUNTER] = {{EVO_TRADE, 0, SPECIES_GENGAR}, + {EVO_ITEM, ITEM_LINKING_CORD, SPECIES_GENGAR}}, [SPECIES_GENGAR] = {{EVO_MEGA_EVOLUTION, ITEM_GENGARITE, SPECIES_GENGAR_MEGA}}, [SPECIES_ONIX] = {{EVO_TRADE_ITEM, ITEM_METAL_COAT, SPECIES_STEELIX}}, [SPECIES_DROWZEE] = {{EVO_LEVEL, 26, SPECIES_HYPNO}}, @@ -97,7 +101,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_SEADRA] = {{EVO_TRADE_ITEM, ITEM_DRAGON_SCALE, SPECIES_KINGDRA}}, [SPECIES_GOLDEEN] = {{EVO_LEVEL, 33, SPECIES_SEAKING}}, [SPECIES_STARYU] = {{EVO_ITEM, ITEM_WATER_STONE, SPECIES_STARMIE}}, - [SPECIES_SCYTHER] = {{EVO_TRADE_ITEM, ITEM_METAL_COAT, SPECIES_SCIZOR}}, + [SPECIES_SCYTHER] = {{EVO_TRADE_ITEM, ITEM_METAL_COAT, SPECIES_SCIZOR}, + {EVO_ITEM, ITEM_BLACK_AUGURITE, SPECIES_KLEAVOR}}, #if P_GEN_4_POKEMON == TRUE [SPECIES_ELECTABUZZ] = {{EVO_TRADE_ITEM, ITEM_ELECTIRIZER, SPECIES_ELECTIVIRE}}, [SPECIES_MAGMAR] = {{EVO_TRADE_ITEM, ITEM_MAGMARIZER, SPECIES_MAGMORTAR}}, @@ -311,7 +316,7 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_KRICKETOT] = {{EVO_LEVEL, 10, SPECIES_KRICKETUNE}}, [SPECIES_SHINX] = {{EVO_LEVEL, 15, SPECIES_LUXIO}}, [SPECIES_LUXIO] = {{EVO_LEVEL, 30, SPECIES_LUXRAY}}, - [SPECIES_BUDEW] = {{EVO_FRIENDSHIP, 0, SPECIES_ROSELIA}}, + [SPECIES_BUDEW] = {{EVO_FRIENDSHIP_DAY, 0, SPECIES_ROSELIA}}, [SPECIES_CRANIDOS] = {{EVO_LEVEL, 30, SPECIES_RAMPARDOS}}, [SPECIES_SHIELDON] = {{EVO_LEVEL, 30, SPECIES_BASTIODON}}, [SPECIES_BURMY] = {{EVO_LEVEL_FEMALE, 20, SPECIES_WORMADAM}, @@ -364,12 +369,14 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_TRANQUILL] = {{EVO_LEVEL, 32, SPECIES_UNFEZANT}}, [SPECIES_BLITZLE] = {{EVO_LEVEL, 27, SPECIES_ZEBSTRIKA}}, [SPECIES_ROGGENROLA] = {{EVO_LEVEL, 25, SPECIES_BOLDORE}}, - [SPECIES_BOLDORE] = {{EVO_TRADE, 0, SPECIES_GIGALITH}}, + [SPECIES_BOLDORE] = {{EVO_TRADE, 0, SPECIES_GIGALITH}, + {EVO_ITEM, ITEM_LINKING_CORD, SPECIES_GIGALITH}}, [SPECIES_WOOBAT] = {{EVO_FRIENDSHIP, 0, SPECIES_SWOOBAT}}, [SPECIES_DRILBUR] = {{EVO_LEVEL, 31, SPECIES_EXCADRILL}}, [SPECIES_AUDINO] = {{EVO_MEGA_EVOLUTION, ITEM_AUDINITE, SPECIES_AUDINO_MEGA}}, [SPECIES_TIMBURR] = {{EVO_LEVEL, 25, SPECIES_GURDURR}}, - [SPECIES_GURDURR] = {{EVO_TRADE, 0, SPECIES_CONKELDURR}}, + [SPECIES_GURDURR] = {{EVO_TRADE, 0, SPECIES_CONKELDURR}, + {EVO_ITEM, ITEM_LINKING_CORD, SPECIES_CONKELDURR}}, [SPECIES_TYMPOLE] = {{EVO_LEVEL, 25, SPECIES_PALPITOAD}}, [SPECIES_PALPITOAD] = {{EVO_LEVEL, 36, SPECIES_SEISMITOAD}}, [SPECIES_SEWADDLE] = {{EVO_LEVEL, 20, SPECIES_SWADLOON}}, @@ -454,8 +461,10 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_AMAURA] = {{EVO_LEVEL_NIGHT, 39, SPECIES_AURORUS}}, [SPECIES_GOOMY] = {{EVO_LEVEL, 40, SPECIES_SLIGGOO}}, [SPECIES_SLIGGOO] = {{EVO_LEVEL_RAIN, 50, SPECIES_GOODRA}}, - [SPECIES_PHANTUMP] = {{EVO_TRADE, 0, SPECIES_TREVENANT}}, - [SPECIES_PUMPKABOO] = {{EVO_TRADE, 0, SPECIES_GOURGEIST}}, + [SPECIES_PHANTUMP] = {{EVO_TRADE, 0, SPECIES_TREVENANT}, + {EVO_ITEM, ITEM_LINKING_CORD, SPECIES_TREVENANT}}, + [SPECIES_PUMPKABOO] = {{EVO_TRADE, 0, SPECIES_GOURGEIST}, + {EVO_ITEM, ITEM_LINKING_CORD, SPECIES_GOURGEIST}}, [SPECIES_BERGMITE] = {{EVO_LEVEL, 37, SPECIES_AVALUGG}}, [SPECIES_NOIBAT] = {{EVO_LEVEL, 48, SPECIES_NOIVERN}}, [SPECIES_DIANCIE] = {{EVO_MEGA_EVOLUTION, ITEM_DIANCITE, SPECIES_DIANCIE_MEGA}}, @@ -542,7 +551,9 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_DREEPY] = {{EVO_LEVEL, 50, SPECIES_DRAKLOAK}}, [SPECIES_DRAKLOAK] = {{EVO_LEVEL, 60, SPECIES_DRAGAPULT}}, [SPECIES_KUBFU] = {{EVO_DARK_SCROLL, 0, SPECIES_URSHIFU}, - {EVO_WATER_SCROLL, 0, SPECIES_URSHIFU_RAPID_STRIKE_STYLE}}, + {EVO_ITEM, ITEM_SCROLL_OF_DARKNESS, SPECIES_URSHIFU}, + {EVO_WATER_SCROLL, 0, SPECIES_URSHIFU_RAPID_STRIKE_STYLE}, + {EVO_ITEM, ITEM_SCROLL_OF_WATERS, SPECIES_URSHIFU_RAPID_STRIKE_STYLE}}, #endif [SPECIES_RATTATA_ALOLAN] = {{EVO_LEVEL_NIGHT, 20, SPECIES_RATICATE_ALOLAN}}, [SPECIES_SANDSHREW_ALOLAN] = {{EVO_ITEM, ITEM_ICE_STONE, SPECIES_SANDSLASH_ALOLAN}}, @@ -550,7 +561,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_DIGLETT_ALOLAN] = {{EVO_LEVEL, 26, SPECIES_DUGTRIO_ALOLAN}}, [SPECIES_MEOWTH_ALOLAN] = {{EVO_FRIENDSHIP, 28, SPECIES_PERSIAN_ALOLAN}}, [SPECIES_GEODUDE_ALOLAN] = {{EVO_LEVEL, 25, SPECIES_GRAVELER_ALOLAN}}, - [SPECIES_GRAVELER_ALOLAN] = {{EVO_TRADE, 0, SPECIES_GOLEM_ALOLAN}}, + [SPECIES_GRAVELER_ALOLAN] = {{EVO_TRADE, 0, SPECIES_GOLEM_ALOLAN}, + {EVO_ITEM, ITEM_LINKING_CORD, SPECIES_GOLEM_ALOLAN}}, [SPECIES_GRIMER_ALOLAN] = {{EVO_LEVEL, 38, SPECIES_MUK_ALOLAN}}, #if P_GEN_8_POKEMON == TRUE [SPECIES_MEOWTH_GALARIAN] = {{EVO_LEVEL, 28, SPECIES_PERRSERKER}}, @@ -591,14 +603,18 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_FLOETTE_ORANGE_FLOWER] = {{EVO_ITEM, ITEM_SHINY_STONE, SPECIES_FLORGES_ORANGE_FLOWER}}, [SPECIES_FLOETTE_BLUE_FLOWER] = {{EVO_ITEM, ITEM_SHINY_STONE, SPECIES_FLORGES_BLUE_FLOWER}}, [SPECIES_FLOETTE_WHITE_FLOWER] = {{EVO_ITEM, ITEM_SHINY_STONE, SPECIES_FLORGES_WHITE_FLOWER}}, - [SPECIES_PUMPKABOO_SMALL] = {{EVO_TRADE, 0, SPECIES_GOURGEIST_SMALL}}, - [SPECIES_PUMPKABOO_LARGE] = {{EVO_TRADE, 0, SPECIES_GOURGEIST_LARGE}}, - [SPECIES_PUMPKABOO_SUPER] = {{EVO_TRADE, 0, SPECIES_GOURGEIST_SUPER}}, + [SPECIES_PUMPKABOO_SMALL] = {{EVO_TRADE, 0, SPECIES_GOURGEIST_SMALL}, + {EVO_ITEM, ITEM_LINKING_CORD, SPECIES_GOURGEIST_SMALL}}, + [SPECIES_PUMPKABOO_LARGE] = {{EVO_TRADE, 0, SPECIES_GOURGEIST_LARGE}, + {EVO_ITEM, ITEM_LINKING_CORD, SPECIES_GOURGEIST_LARGE}}, + [SPECIES_PUMPKABOO_SUPER] = {{EVO_TRADE, 0, SPECIES_GOURGEIST_SUPER}, + {EVO_ITEM, ITEM_LINKING_CORD, SPECIES_GOURGEIST_SUPER}}, #endif #if P_GEN_7_POKEMON == TRUE [SPECIES_ROCKRUFF_OWN_TEMPO] = {{EVO_LEVEL_DUSK, 25, SPECIES_LYCANROC_DUSK}}, #endif #if P_GEN_8_POKEMON == TRUE [SPECIES_SINISTEA_ANTIQUE] = {{EVO_ITEM, ITEM_CHIPPED_POT, SPECIES_POLTEAGEIST_ANTIQUE}}, + [SPECIES_URSARING] = {{EVO_ITEM_NIGHT, ITEM_PEAT_BLOCK, SPECIES_URSALUNA}}, #endif }; diff --git a/src/data/pokemon/form_change_table_pointers.h b/src/data/pokemon/form_change_table_pointers.h index 90be7112b6..62afeb2e05 100644 --- a/src/data/pokemon/form_change_table_pointers.h +++ b/src/data/pokemon/form_change_table_pointers.h @@ -1,6 +1,10 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = { #if P_GEN_4_POKEMON == TRUE + [SPECIES_DIALGA] = sDialgaFormChangeTable, + [SPECIES_DIALGA_ORIGIN] = sDialgaFormChangeTable, + [SPECIES_PALKIA] = sPalkiaFormChangeTable, + [SPECIES_PALKIA_ORIGIN] = sPalkiaFormChangeTable, [SPECIES_GIRATINA] = sGiratinaFormChangeTable, [SPECIES_GIRATINA_ORIGIN] = sGiratinaFormChangeTable, [SPECIES_SHAYMIN] = sShayminFormChangeTable, diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index 94da0add36..723bda4b2d 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -44,9 +44,21 @@ FORM_BATTLE_END: #define NIGHT 2 #if P_GEN_4_POKEMON == TRUE +static const struct FormChange sDialgaFormChangeTable[] = { + {FORM_ITEM_HOLD, SPECIES_DIALGA, ITEM_NONE}, + {FORM_ITEM_HOLD, SPECIES_DIALGA_ORIGIN, ITEM_ADAMANT_CRYSTAL}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sPalkiaFormChangeTable[] = { + {FORM_ITEM_HOLD, SPECIES_PALKIA, ITEM_NONE}, + {FORM_ITEM_HOLD, SPECIES_PALKIA_ORIGIN, ITEM_LUSTROUS_GLOBE}, + {FORM_CHANGE_END}, +}; + static const struct FormChange sGiratinaFormChangeTable[] = { {FORM_ITEM_HOLD, SPECIES_GIRATINA, ITEM_NONE}, - {FORM_ITEM_HOLD, SPECIES_GIRATINA_ORIGIN, ITEM_GRISEOUS_ORB}, + {FORM_ITEM_HOLD, SPECIES_GIRATINA_ORIGIN, ITEM_GRISEOUS_CORE}, {FORM_CHANGE_END}, }; diff --git a/src/data/pokemon/form_species_table_pointers.h b/src/data/pokemon/form_species_table_pointers.h index 73b1b07d7a..cc66c12ed8 100644 --- a/src/data/pokemon/form_species_table_pointers.h +++ b/src/data/pokemon/form_species_table_pointers.h @@ -171,6 +171,7 @@ const u16 *const gFormSpeciesIdTables[NUM_SPECIES] = [SPECIES_ZARUDE] = sZarudeFormSpeciesIdTable, [SPECIES_CALYREX] = sCalyrexFormSpeciesIdTable, [SPECIES_ENAMORUS] = sEnamorusFormSpeciesIdTable, + [SPECIES_BASCULEGION] = sBasculegionFormSpeciesIdTable, #endif // Megas [SPECIES_VENUSAUR_MEGA] = sVenusaurFormSpeciesIdTable, @@ -590,5 +591,7 @@ const u16 *const gFormSpeciesIdTables[NUM_SPECIES] = [SPECIES_CALYREX_SHADOW_RIDER] = sCalyrexFormSpeciesIdTable, // Enamorus [SPECIES_ENAMORUS_THERIAN] = sEnamorusFormSpeciesIdTable, + // Basculegion + [SPECIES_BASCULEGION_FEMALE] = sBasculegionFormSpeciesIdTable, #endif }; diff --git a/src/data/pokemon/form_species_tables.h b/src/data/pokemon/form_species_tables.h index 545201c5af..2f4e9088e0 100644 --- a/src/data/pokemon/form_species_tables.h +++ b/src/data/pokemon/form_species_tables.h @@ -1145,4 +1145,10 @@ static const u16 sEnamorusFormSpeciesIdTable[] = { FORM_SPECIES_END, }; +static const u16 sBasculegionFormSpeciesIdTable[] = { + SPECIES_BASCULEGION, + SPECIES_BASCULEGION_FEMALE, + FORM_SPECIES_END, +}; + #endif diff --git a/src/data/pokemon/item_effects.h b/src/data/pokemon/item_effects.h index 2651b4daf7..087c6db0c2 100644 --- a/src/data/pokemon/item_effects.h +++ b/src/data/pokemon/item_effects.h @@ -447,128 +447,133 @@ const u8 gItemEffect_TamatoBerry[10] = { EV_BERRY_FRIENDSHIP_CHANGE, }; -const u8 *const gItemEffectTable[] = +const u8 *const gItemEffectTable[ITEMS_COUNT] = { // Medicine - [ITEM_POTION - ITEM_POTION] = gItemEffect_Potion, - [ITEM_SUPER_POTION - ITEM_POTION] = gItemEffect_SuperPotion, - [ITEM_HYPER_POTION - ITEM_POTION] = gItemEffect_HyperPotion, - [ITEM_MAX_POTION - ITEM_POTION] = gItemEffect_MaxPotion, - [ITEM_FULL_RESTORE - ITEM_POTION] = gItemEffect_FullRestore, - [ITEM_REVIVE - ITEM_POTION] = gItemEffect_Revive, - [ITEM_MAX_REVIVE - ITEM_POTION] = gItemEffect_MaxRevive, - [ITEM_FRESH_WATER - ITEM_POTION] = gItemEffect_FreshWater, - [ITEM_SODA_POP - ITEM_POTION] = gItemEffect_SodaPop, - [ITEM_LEMONADE - ITEM_POTION] = gItemEffect_Lemonade, - [ITEM_MOOMOO_MILK - ITEM_POTION] = gItemEffect_MoomooMilk, - [ITEM_ENERGY_POWDER - ITEM_POTION] = gItemEffect_EnergyPowder, - [ITEM_ENERGY_ROOT - ITEM_POTION] = gItemEffect_EnergyRoot, - [ITEM_HEAL_POWDER - ITEM_POTION] = gItemEffect_HealPowder, - [ITEM_REVIVAL_HERB - ITEM_POTION] = gItemEffect_RevivalHerb, - [ITEM_ANTIDOTE - ITEM_POTION] = gItemEffect_Antidote, - [ITEM_PARALYZE_HEAL - ITEM_POTION] = gItemEffect_ParalyzeHeal, - [ITEM_BURN_HEAL - ITEM_POTION] = gItemEffect_BurnHeal, - [ITEM_ICE_HEAL - ITEM_POTION] = gItemEffect_IceHeal, - [ITEM_AWAKENING - ITEM_POTION] = gItemEffect_Awakening, - [ITEM_FULL_HEAL - ITEM_POTION] = gItemEffect_FullHeal, - [ITEM_ETHER - ITEM_POTION] = gItemEffect_Ether, - [ITEM_MAX_ETHER - ITEM_POTION] = gItemEffect_MaxEther, - [ITEM_ELIXIR - ITEM_POTION] = gItemEffect_Elixir, - [ITEM_MAX_ELIXIR - ITEM_POTION] = gItemEffect_MaxElixir, - [ITEM_BERRY_JUICE - ITEM_POTION] = gItemEffect_BerryJuice, - [ITEM_SACRED_ASH - ITEM_POTION] = gItemEffect_SacredAsh, - [ITEM_SWEET_HEART - ITEM_POTION] = gItemEffect_Potion, - [ITEM_MAX_HONEY - ITEM_POTION] = gItemEffect_MaxRevive, + [ITEM_POTION] = gItemEffect_Potion, + [ITEM_SUPER_POTION] = gItemEffect_SuperPotion, + [ITEM_HYPER_POTION] = gItemEffect_HyperPotion, + [ITEM_MAX_POTION] = gItemEffect_MaxPotion, + [ITEM_FULL_RESTORE] = gItemEffect_FullRestore, + [ITEM_REVIVE] = gItemEffect_Revive, + [ITEM_MAX_REVIVE] = gItemEffect_MaxRevive, + [ITEM_FRESH_WATER] = gItemEffect_FreshWater, + [ITEM_SODA_POP] = gItemEffect_SodaPop, + [ITEM_LEMONADE] = gItemEffect_Lemonade, + [ITEM_MOOMOO_MILK] = gItemEffect_MoomooMilk, + [ITEM_ENERGY_POWDER] = gItemEffect_EnergyPowder, + [ITEM_ENERGY_ROOT] = gItemEffect_EnergyRoot, + [ITEM_HEAL_POWDER] = gItemEffect_HealPowder, + [ITEM_REVIVAL_HERB] = gItemEffect_RevivalHerb, + [ITEM_ANTIDOTE] = gItemEffect_Antidote, + [ITEM_PARALYZE_HEAL] = gItemEffect_ParalyzeHeal, + [ITEM_BURN_HEAL] = gItemEffect_BurnHeal, + [ITEM_ICE_HEAL] = gItemEffect_IceHeal, + [ITEM_AWAKENING] = gItemEffect_Awakening, + [ITEM_FULL_HEAL] = gItemEffect_FullHeal, + [ITEM_ETHER] = gItemEffect_Ether, + [ITEM_MAX_ETHER] = gItemEffect_MaxEther, + [ITEM_ELIXIR] = gItemEffect_Elixir, + [ITEM_MAX_ELIXIR] = gItemEffect_MaxElixir, + [ITEM_BERRY_JUICE] = gItemEffect_BerryJuice, + [ITEM_SACRED_ASH] = gItemEffect_SacredAsh, + [ITEM_SWEET_HEART] = gItemEffect_Potion, + [ITEM_MAX_HONEY] = gItemEffect_MaxRevive, // Regional Specialties - [ITEM_PEWTER_CRUNCHIES - ITEM_POTION] = gItemEffect_FullHeal, - [ITEM_RAGE_CANDY_BAR - ITEM_POTION] = gItemEffect_FullHeal, - [ITEM_LAVA_COOKIE - ITEM_POTION] = gItemEffect_FullHeal, - [ITEM_OLD_GATEAU - ITEM_POTION] = gItemEffect_FullHeal, - [ITEM_CASTELIACONE - ITEM_POTION] = gItemEffect_FullHeal, - [ITEM_LUMIOSE_GALETTE - ITEM_POTION] = gItemEffect_FullHeal, - [ITEM_SHALOUR_SABLE - ITEM_POTION] = gItemEffect_FullHeal, - [ITEM_BIG_MALASADA - ITEM_POTION] = gItemEffect_FullHeal, + [ITEM_PEWTER_CRUNCHIES] = gItemEffect_FullHeal, + [ITEM_RAGE_CANDY_BAR] = gItemEffect_FullHeal, + [ITEM_LAVA_COOKIE] = gItemEffect_FullHeal, + [ITEM_OLD_GATEAU] = gItemEffect_FullHeal, + [ITEM_CASTELIACONE] = gItemEffect_FullHeal, + [ITEM_LUMIOSE_GALETTE] = gItemEffect_FullHeal, + [ITEM_SHALOUR_SABLE] = gItemEffect_FullHeal, + [ITEM_BIG_MALASADA] = gItemEffect_FullHeal, // Vitamins - [ITEM_HP_UP - ITEM_POTION] = gItemEffect_HPUp, - [ITEM_PROTEIN - ITEM_POTION] = gItemEffect_Protein, - [ITEM_IRON - ITEM_POTION] = gItemEffect_Iron, - [ITEM_CALCIUM - ITEM_POTION] = gItemEffect_Calcium, - [ITEM_ZINC - ITEM_POTION] = gItemEffect_Zinc, - [ITEM_CARBOS - ITEM_POTION] = gItemEffect_Carbos, - [ITEM_PP_UP - ITEM_POTION] = gItemEffect_PPUp, - [ITEM_PP_MAX - ITEM_POTION] = gItemEffect_PPMax, + [ITEM_HP_UP] = gItemEffect_HPUp, + [ITEM_PROTEIN] = gItemEffect_Protein, + [ITEM_IRON] = gItemEffect_Iron, + [ITEM_CALCIUM] = gItemEffect_Calcium, + [ITEM_ZINC] = gItemEffect_Zinc, + [ITEM_CARBOS] = gItemEffect_Carbos, + [ITEM_PP_UP] = gItemEffect_PPUp, + [ITEM_PP_MAX] = gItemEffect_PPMax, // EV Feathers - [ITEM_HEALTH_FEATHER - ITEM_POTION] = gItemEffect_HpFeather, - [ITEM_MUSCLE_FEATHER - ITEM_POTION] = gItemEffect_AtkFeather, - [ITEM_RESIST_FEATHER - ITEM_POTION] = gItemEffect_DefFeather, - [ITEM_GENIUS_FEATHER - ITEM_POTION] = gItemEffect_SpatkFeather, - [ITEM_CLEVER_FEATHER - ITEM_POTION] = gItemEffect_SpdefFeather, - [ITEM_SWIFT_FEATHER - ITEM_POTION] = gItemEffect_SpeedFeather, + [ITEM_HEALTH_FEATHER] = gItemEffect_HpFeather, + [ITEM_MUSCLE_FEATHER] = gItemEffect_AtkFeather, + [ITEM_RESIST_FEATHER] = gItemEffect_DefFeather, + [ITEM_GENIUS_FEATHER] = gItemEffect_SpatkFeather, + [ITEM_CLEVER_FEATHER] = gItemEffect_SpdefFeather, + [ITEM_SWIFT_FEATHER] = gItemEffect_SpeedFeather, // Candy - [ITEM_RARE_CANDY - ITEM_POTION] = gItemEffect_RareCandy, - [ITEM_EXP_CANDY_XS - ITEM_POTION] = gItemEffect_RareCandy, - [ITEM_EXP_CANDY_S - ITEM_POTION] = gItemEffect_RareCandy, - [ITEM_EXP_CANDY_M - ITEM_POTION] = gItemEffect_RareCandy, - [ITEM_EXP_CANDY_L - ITEM_POTION] = gItemEffect_RareCandy, - [ITEM_EXP_CANDY_XL - ITEM_POTION] = gItemEffect_RareCandy, - //[ITEM_DYNAMAX_CANDY - ITEM_POTION] = gItemEffect_DynamaxCandy, // Todo + [ITEM_RARE_CANDY] = gItemEffect_RareCandy, + [ITEM_EXP_CANDY_XS] = gItemEffect_RareCandy, + [ITEM_EXP_CANDY_S] = gItemEffect_RareCandy, + [ITEM_EXP_CANDY_M] = gItemEffect_RareCandy, + [ITEM_EXP_CANDY_L] = gItemEffect_RareCandy, + [ITEM_EXP_CANDY_XL] = gItemEffect_RareCandy, + //[ITEM_DYNAMAX_CANDY] = gItemEffect_DynamaxCandy, // Todo // Medicinal Flutes - [ITEM_BLUE_FLUTE - ITEM_POTION] = gItemEffect_BlueFlute, - [ITEM_YELLOW_FLUTE - ITEM_POTION] = gItemEffect_YellowFlute, - [ITEM_RED_FLUTE - ITEM_POTION] = gItemEffect_RedFlute, + [ITEM_BLUE_FLUTE] = gItemEffect_BlueFlute, + [ITEM_YELLOW_FLUTE] = gItemEffect_YellowFlute, + [ITEM_RED_FLUTE] = gItemEffect_RedFlute, // X Items - [ITEM_X_ATTACK - ITEM_POTION] = gItemEffect_XAttack, - [ITEM_X_DEFENSE - ITEM_POTION] = gItemEffect_XDefense, - [ITEM_X_SPEED - ITEM_POTION] = gItemEffect_XSpeed, - [ITEM_X_ACCURACY - ITEM_POTION] = gItemEffect_XAccuracy, - [ITEM_X_SP_ATK - ITEM_POTION] = gItemEffect_XSpecialAttack, - [ITEM_X_SP_DEF - ITEM_POTION] = gItemEffect_XSpecialDefense, + [ITEM_X_ATTACK] = gItemEffect_XAttack, + [ITEM_X_DEFENSE] = gItemEffect_XDefense, + [ITEM_X_SPEED] = gItemEffect_XSpeed, + [ITEM_X_ACCURACY] = gItemEffect_XAccuracy, + [ITEM_X_SP_ATK] = gItemEffect_XSpecialAttack, + [ITEM_X_SP_DEF] = gItemEffect_XSpecialDefense, - [ITEM_DIRE_HIT - ITEM_POTION] = gItemEffect_DireHit, - [ITEM_GUARD_SPEC - ITEM_POTION] = gItemEffect_GuardSpec, - - //[ITEM_MAX_MUSHROOMS - ITEM_POTION] = gItemEffect_MaxMushrooms, // Todo + [ITEM_DIRE_HIT] = gItemEffect_DireHit, + [ITEM_GUARD_SPEC] = gItemEffect_GuardSpec, // Evolution Items - [ITEM_FIRE_STONE - ITEM_POTION] = gItemEffect_EvoItem, - [ITEM_WATER_STONE - ITEM_POTION] = gItemEffect_EvoItem, - [ITEM_THUNDER_STONE - ITEM_POTION] = gItemEffect_EvoItem, - [ITEM_LEAF_STONE - ITEM_POTION] = gItemEffect_EvoItem, - [ITEM_ICE_STONE - ITEM_POTION] = gItemEffect_EvoItem, - [ITEM_SUN_STONE - ITEM_POTION] = gItemEffect_EvoItem, - [ITEM_MOON_STONE - ITEM_POTION] = gItemEffect_EvoItem, - [ITEM_SHINY_STONE - ITEM_POTION] = gItemEffect_EvoItem, - [ITEM_DUSK_STONE - ITEM_POTION] = gItemEffect_EvoItem, - [ITEM_DAWN_STONE - ITEM_POTION] = gItemEffect_EvoItem, - [ITEM_SWEET_APPLE - ITEM_POTION] = gItemEffect_EvoItem, - [ITEM_TART_APPLE - ITEM_POTION] = gItemEffect_EvoItem, - [ITEM_CRACKED_POT - ITEM_POTION] = gItemEffect_EvoItem, - [ITEM_CHIPPED_POT - ITEM_POTION] = gItemEffect_EvoItem, - [ITEM_GALARICA_CUFF - ITEM_POTION] = gItemEffect_EvoItem, - [ITEM_GALARICA_WREATH - ITEM_POTION] = gItemEffect_EvoItem, + [ITEM_FIRE_STONE] = gItemEffect_EvoItem, + [ITEM_WATER_STONE] = gItemEffect_EvoItem, + [ITEM_THUNDER_STONE] = gItemEffect_EvoItem, + [ITEM_LEAF_STONE] = gItemEffect_EvoItem, + [ITEM_ICE_STONE] = gItemEffect_EvoItem, + [ITEM_SUN_STONE] = gItemEffect_EvoItem, + [ITEM_MOON_STONE] = gItemEffect_EvoItem, + [ITEM_SHINY_STONE] = gItemEffect_EvoItem, + [ITEM_DUSK_STONE] = gItemEffect_EvoItem, + [ITEM_DAWN_STONE] = gItemEffect_EvoItem, + [ITEM_SWEET_APPLE] = gItemEffect_EvoItem, + [ITEM_TART_APPLE] = gItemEffect_EvoItem, + [ITEM_CRACKED_POT] = gItemEffect_EvoItem, + [ITEM_CHIPPED_POT] = gItemEffect_EvoItem, + [ITEM_GALARICA_CUFF] = gItemEffect_EvoItem, + [ITEM_GALARICA_WREATH] = gItemEffect_EvoItem, + [ITEM_AUSPICIOUS_ARMOR] = gItemEffect_EvoItem, + [ITEM_MALICIOUS_ARMOR] = gItemEffect_EvoItem, + [ITEM_SCROLL_OF_DARKNESS] = gItemEffect_EvoItem, + [ITEM_SCROLL_OF_WATERS] = gItemEffect_EvoItem, + [ITEM_BLACK_AUGURITE] = gItemEffect_EvoItem, + [ITEM_LINKING_CORD] = gItemEffect_EvoItem, + [ITEM_PEAT_BLOCK] = gItemEffect_EvoItem, // Berries - [ITEM_CHERI_BERRY - ITEM_POTION] = gItemEffect_CheriBerry, - [ITEM_CHESTO_BERRY - ITEM_POTION] = gItemEffect_ChestoBerry, - [ITEM_PECHA_BERRY - ITEM_POTION] = gItemEffect_PechaBerry, - [ITEM_RAWST_BERRY - ITEM_POTION] = gItemEffect_RawstBerry, - [ITEM_ASPEAR_BERRY - ITEM_POTION] = gItemEffect_AspearBerry, - [ITEM_LEPPA_BERRY - ITEM_POTION] = gItemEffect_LeppaBerry, - [ITEM_ORAN_BERRY - ITEM_POTION] = gItemEffect_OranBerry, - [ITEM_PERSIM_BERRY - ITEM_POTION] = gItemEffect_PersimBerry, - [ITEM_LUM_BERRY - ITEM_POTION] = gItemEffect_FullHeal, - [ITEM_SITRUS_BERRY - ITEM_POTION] = gItemEffect_SitrusBerry, - [ITEM_POMEG_BERRY - ITEM_POTION] = gItemEffect_PomegBerry, - [ITEM_KELPSY_BERRY - ITEM_POTION] = gItemEffect_KelpsyBerry, - [ITEM_QUALOT_BERRY - ITEM_POTION] = gItemEffect_QualotBerry, - [ITEM_HONDEW_BERRY - ITEM_POTION] = gItemEffect_HondewBerry, - [ITEM_GREPA_BERRY - ITEM_POTION] = gItemEffect_GrepaBerry, - [ITEM_TAMATO_BERRY - ITEM_POTION] = gItemEffect_TamatoBerry, - [LAST_BERRY_INDEX - ITEM_POTION] = NULL, + [ITEM_CHERI_BERRY] = gItemEffect_CheriBerry, + [ITEM_CHESTO_BERRY] = gItemEffect_ChestoBerry, + [ITEM_PECHA_BERRY] = gItemEffect_PechaBerry, + [ITEM_RAWST_BERRY] = gItemEffect_RawstBerry, + [ITEM_ASPEAR_BERRY] = gItemEffect_AspearBerry, + [ITEM_LEPPA_BERRY] = gItemEffect_LeppaBerry, + [ITEM_ORAN_BERRY] = gItemEffect_OranBerry, + [ITEM_PERSIM_BERRY] = gItemEffect_PersimBerry, + [ITEM_LUM_BERRY] = gItemEffect_FullHeal, + [ITEM_SITRUS_BERRY] = gItemEffect_SitrusBerry, + [ITEM_POMEG_BERRY] = gItemEffect_PomegBerry, + [ITEM_KELPSY_BERRY] = gItemEffect_KelpsyBerry, + [ITEM_QUALOT_BERRY] = gItemEffect_QualotBerry, + [ITEM_HONDEW_BERRY] = gItemEffect_HondewBerry, + [ITEM_GREPA_BERRY] = gItemEffect_GrepaBerry, + [ITEM_TAMATO_BERRY] = gItemEffect_TamatoBerry, + [LAST_BERRY_INDEX] = NULL, }; diff --git a/src/data/pokemon/level_up_learnset_pointers.h b/src/data/pokemon/level_up_learnset_pointers.h index 0ecfa59ccf..19b4e42e44 100644 --- a/src/data/pokemon/level_up_learnset_pointers.h +++ b/src/data/pokemon/level_up_learnset_pointers.h @@ -789,9 +789,9 @@ const struct LevelUpMove *const gLevelUpLearnsets[NUM_SPECIES] = [SPECIES_BRUXISH] = sBruxishLevelUpLearnset, [SPECIES_DRAMPA] = sDrampaLevelUpLearnset, [SPECIES_DHELMISE] = sDhelmiseLevelUpLearnset, - [SPECIES_JANGMO_O] = sJangmooLevelUpLearnset, - [SPECIES_HAKAMO_O] = sHakamooLevelUpLearnset, - [SPECIES_KOMMO_O] = sKommooLevelUpLearnset, + [SPECIES_JANGMO_O] = sJangmoOLevelUpLearnset, + [SPECIES_HAKAMO_O] = sHakamoOLevelUpLearnset, + [SPECIES_KOMMO_O] = sKommoOLevelUpLearnset, [SPECIES_TAPU_KOKO] = sTapuKokoLevelUpLearnset, [SPECIES_TAPU_LELE] = sTapuLeleLevelUpLearnset, [SPECIES_TAPU_BULU] = sTapuBuluLevelUpLearnset, @@ -1334,5 +1334,6 @@ const struct LevelUpMove *const gLevelUpLearnsets[NUM_SPECIES] = [SPECIES_CALYREX_SHADOW_RIDER] = sCalyrexShadowRiderLevelUpLearnset, // Enamorus [SPECIES_ENAMORUS_THERIAN] = sEnamorusLevelUpLearnset, + [SPECIES_BASCULEGION_FEMALE] = sBasculegionLevelUpLearnset, #endif }; diff --git a/src/data/pokemon/level_up_learnsets.h b/src/data/pokemon/level_up_learnsets.h index f4ad3b5669..17af6b8888 100644 --- a/src/data/pokemon/level_up_learnsets.h +++ b/src/data/pokemon/level_up_learnsets.h @@ -15960,7 +15960,7 @@ static const struct LevelUpMove sDhelmiseLevelUpLearnset[] = { LEVEL_UP_END }; -static const struct LevelUpMove sJangmooLevelUpLearnset[] = { +static const struct LevelUpMove sJangmoOLevelUpLearnset[] = { LEVEL_UP_MOVE( 1, MOVE_TACKLE), LEVEL_UP_MOVE( 5, MOVE_LEER), LEVEL_UP_MOVE( 9, MOVE_BIDE), @@ -15978,7 +15978,7 @@ static const struct LevelUpMove sJangmooLevelUpLearnset[] = { LEVEL_UP_END }; -static const struct LevelUpMove sHakamooLevelUpLearnset[] = { +static const struct LevelUpMove sHakamoOLevelUpLearnset[] = { LEVEL_UP_MOVE( 0, MOVE_SKY_UPPERCUT), LEVEL_UP_MOVE( 1, MOVE_SKY_UPPERCUT), LEVEL_UP_MOVE( 1, MOVE_AUTOTOMIZE), @@ -16003,7 +16003,7 @@ static const struct LevelUpMove sHakamooLevelUpLearnset[] = { LEVEL_UP_END }; -static const struct LevelUpMove sKommooLevelUpLearnset[] = { +static const struct LevelUpMove sKommoOLevelUpLearnset[] = { LEVEL_UP_MOVE( 0, MOVE_CLANGING_SCALES), LEVEL_UP_MOVE( 1, MOVE_CLANGING_SCALES), LEVEL_UP_MOVE( 1, MOVE_SKY_UPPERCUT), diff --git a/src/data/pokemon/pokedex_entries.h b/src/data/pokemon/pokedex_entries.h index 4925382600..56af95f1b7 100644 --- a/src/data/pokemon/pokedex_entries.h +++ b/src/data/pokemon/pokedex_entries.h @@ -4651,8 +4651,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 102, .description = gTurtwigPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 20, .trainerScale = 256, .trainerOffset = 0, }, @@ -4663,8 +4663,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 970, .description = gGrotlePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 9, .trainerScale = 256, .trainerOffset = 0, }, @@ -4675,10 +4675,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 22, .weight = 3100, .description = gTorterraPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 348, + .trainerOffset = 6, }, [NATIONAL_DEX_CHIMCHAR] = @@ -4687,8 +4687,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 62, .description = gChimcharPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -4699,8 +4699,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 220, .description = gMonfernoPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 9, .trainerScale = 256, .trainerOffset = 0, }, @@ -4711,8 +4711,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 550, .description = gInfernapePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -4723,7 +4723,7 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 52, .description = gPiplupPokedexText, - .pokemonScale = 356, + .pokemonScale = 491, .pokemonOffset = 17, .trainerScale = 256, .trainerOffset = 0, @@ -4735,9 +4735,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 230, .description = gPrinplupPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 10, + .trainerScale = 257, .trainerOffset = 0, }, @@ -4747,10 +4747,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 17, .weight = 845, .description = gEmpoleonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 0, + .trainerScale = 290, + .trainerOffset = 1, }, [NATIONAL_DEX_STARLY] = @@ -4759,8 +4759,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 20, .description = gStarlyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -4771,8 +4771,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 155, .description = gStaraviaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -4783,8 +4783,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 249, .description = gStaraptorPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -4795,8 +4795,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 200, .description = gBidoofPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 16, .trainerScale = 256, .trainerOffset = 0, }, @@ -4807,9 +4807,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 315, .description = gBibarelPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 8, + .trainerScale = 257, .trainerOffset = 0, }, @@ -4819,7 +4819,7 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 22, .description = gKricketotPokedexText, - .pokemonScale = 356, + .pokemonScale = 530, .pokemonOffset = 17, .trainerScale = 256, .trainerOffset = 0, @@ -4831,9 +4831,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 255, .description = gKricketunePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 8, + .trainerScale = 257, .trainerOffset = 0, }, @@ -4843,7 +4843,7 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 95, .description = gShinxPokedexText, - .pokemonScale = 356, + .pokemonScale = 432, .pokemonOffset = 17, .trainerScale = 256, .trainerOffset = 0, @@ -4855,8 +4855,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 305, .description = gLuxioPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 10, .trainerScale = 256, .trainerOffset = 0, }, @@ -4867,9 +4867,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 420, .description = gLuxrayPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 2, + .trainerScale = 262, .trainerOffset = 0, }, @@ -4879,8 +4879,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 12, .description = gBudewPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -4891,8 +4891,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 145, .description = gRoseradePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 10, .trainerScale = 256, .trainerOffset = 0, }, @@ -4903,8 +4903,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 315, .description = gCranidosPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 10, .trainerScale = 256, .trainerOffset = 0, }, @@ -4915,10 +4915,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 1025, .description = gRampardosPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_SHIELDON] = @@ -4927,8 +4927,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 570, .description = gShieldonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 16, .trainerScale = 256, .trainerOffset = 0, }, @@ -4939,8 +4939,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 1495, .description = gBastiodonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -4951,8 +4951,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 34, .description = gBurmyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -4963,8 +4963,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 65, .description = gWormadamPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -4975,8 +4975,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 233, .description = gMothimPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 8, .trainerScale = 256, .trainerOffset = 0, }, @@ -4987,8 +4987,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 55, .description = gCombeePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -4999,8 +4999,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 385, .description = gVespiquenPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -5011,8 +5011,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 39, .description = gPachirisuPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 16, .trainerScale = 256, .trainerOffset = 0, }, @@ -5023,8 +5023,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 295, .description = gBuizelPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -5035,8 +5035,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 335, .description = gFloatzelPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -5047,8 +5047,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 33, .description = gCherubiPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -5059,8 +5059,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 93, .description = gCherrimPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -5071,8 +5071,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 63, .description = gShellosPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -5083,8 +5083,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 299, .description = gGastrodonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 8, .trainerScale = 256, .trainerOffset = 0, }, @@ -5095,8 +5095,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 203, .description = gAmbipomPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -5107,8 +5107,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 12, .description = gDrifloonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -5119,8 +5119,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 150, .description = gDrifblimPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -5131,8 +5131,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 55, .description = gBunearyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 16, .trainerScale = 256, .trainerOffset = 0, }, @@ -5143,8 +5143,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 333, .description = gLopunnyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -5155,8 +5155,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 44, .description = gMismagiusPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 8, .trainerScale = 256, .trainerOffset = 0, }, @@ -5167,8 +5167,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 273, .description = gHonchkrowPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 8, .trainerScale = 256, .trainerOffset = 0, }, @@ -5179,8 +5179,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 39, .description = gGlameowPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -5191,9 +5191,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 438, .description = gPuruglyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -5203,8 +5203,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 6, .description = gChinglingPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -5215,7 +5215,7 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 192, .description = gStunkyPokedexText, - .pokemonScale = 356, + .pokemonScale = 491, .pokemonOffset = 17, .trainerScale = 256, .trainerOffset = 0, @@ -5227,9 +5227,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 380, .description = gSkuntankPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 9, + .trainerScale = 257, .trainerOffset = 0, }, @@ -5239,8 +5239,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 605, .description = gBronzorPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -5251,8 +5251,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 1870, .description = gBronzongPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -5263,8 +5263,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 150, .description = gBonslyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -5275,8 +5275,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 130, .description = gMimeJrPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 14, .trainerScale = 256, .trainerOffset = 0, }, @@ -5287,8 +5287,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 244, .description = gHappinyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -5299,8 +5299,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 19, .description = gChatotPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -5311,9 +5311,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 1080, .description = gSpiritombPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -5323,8 +5323,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 205, .description = gGiblePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -5335,9 +5335,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 560, .description = gGabitePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 2, + .trainerScale = 262, .trainerOffset = 0, }, @@ -5347,10 +5347,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 19, .weight = 950, .description = gGarchompPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 1, + .trainerScale = 326, + .trainerOffset = 4, }, [NATIONAL_DEX_MUNCHLAX] = @@ -5359,8 +5359,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 1050, .description = gMunchlaxPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 14, .trainerScale = 256, .trainerOffset = 0, }, @@ -5371,8 +5371,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 202, .description = gRioluPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -5383,8 +5383,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 540, .description = gLucarioPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -5395,9 +5395,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 495, .description = gHippopotasPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 11, + .trainerScale = 257, .trainerOffset = 0, }, @@ -5407,10 +5407,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 20, .weight = 3000, .description = gHippowdonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 261, + .pokemonOffset = 2, + .trainerScale = 334, + .trainerOffset = 4, }, [NATIONAL_DEX_SKORUPI] = @@ -5419,9 +5419,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 120, .description = gSkorupiPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 12, + .trainerScale = 257, .trainerOffset = 0, }, @@ -5431,8 +5431,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 615, .description = gDrapionPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 5, .trainerScale = 256, .trainerOffset = 0, }, @@ -5443,8 +5443,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 230, .description = gCroagunkPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -5455,8 +5455,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 444, .description = gToxicroakPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -5467,9 +5467,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 270, .description = gCarnivinePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 2, + .trainerScale = 262, .trainerOffset = 0, }, @@ -5479,8 +5479,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 70, .description = gFinneonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -5491,8 +5491,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 240, .description = gLumineonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -5503,9 +5503,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 650, .description = gMantykePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -5515,9 +5515,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 505, .description = gSnoverPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -5527,10 +5527,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 22, .weight = 1355, .description = gAbomasnowPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 348, + .trainerOffset = 6, }, [NATIONAL_DEX_WEAVILE] = @@ -5539,8 +5539,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 340, .description = gWeavilePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -5551,8 +5551,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 1800, .description = gMagnezonePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -5563,10 +5563,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 17, .weight = 1400, .description = gLickilickyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 0, + .trainerScale = 290, + .trainerOffset = 1, }, [NATIONAL_DEX_RHYPERIOR] = @@ -5575,10 +5575,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 24, .weight = 2828, .description = gRhyperiorPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 3, + .trainerScale = 369, + .trainerOffset = 7, }, [NATIONAL_DEX_TANGROWTH] = @@ -5587,10 +5587,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 20, .weight = 1286, .description = gTangrowthPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 261, + .pokemonOffset = 1, + .trainerScale = 334, + .trainerOffset = 4, }, [NATIONAL_DEX_ELECTIVIRE] = @@ -5599,10 +5599,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 18, .weight = 1386, .description = gElectivirePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 267, + .pokemonOffset = 2, + .trainerScale = 286, + .trainerOffset = 1, }, [NATIONAL_DEX_MAGMORTAR] = @@ -5611,10 +5611,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 680, .description = gMagmortarPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_TOGEKISS] = @@ -5623,9 +5623,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 380, .description = gTogekissPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -5635,10 +5635,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 19, .weight = 515, .description = gYanmegaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 1, + .trainerScale = 326, + .trainerOffset = 4, }, [NATIONAL_DEX_LEAFEON] = @@ -5647,9 +5647,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 255, .description = gLeafeonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 8, + .trainerScale = 257, .trainerOffset = 0, }, @@ -5659,9 +5659,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 259, .description = gGlaceonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 10, + .trainerScale = 257, .trainerOffset = 0, }, @@ -5671,10 +5671,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 20, .weight = 425, .description = gGliscorPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 261, + .pokemonOffset = 1, + .trainerScale = 334, + .trainerOffset = 4, }, [NATIONAL_DEX_MAMOSWINE] = @@ -5683,10 +5683,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 25, .weight = 2910, .description = gMamoswinePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 257, + .pokemonOffset = 6, + .trainerScale = 423, + .trainerOffset = 8, }, [NATIONAL_DEX_PORYGON_Z] = @@ -5695,8 +5695,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 340, .description = gPorygonZPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 8, .trainerScale = 256, .trainerOffset = 0, }, @@ -5707,10 +5707,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 520, .description = gGalladePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_PROBOPASS] = @@ -5719,9 +5719,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 3400, .description = gProbopassPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 2, + .trainerScale = 262, .trainerOffset = 0, }, @@ -5731,10 +5731,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 22, .weight = 1066, .description = gDusknoirPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 348, + .trainerOffset = 6, }, [NATIONAL_DEX_FROSLASS] = @@ -5743,8 +5743,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 266, .description = gFroslassPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -5755,8 +5755,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 3, .description = gRotomPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -5767,8 +5767,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 3, .description = gUxiePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -5779,8 +5779,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 3, .description = gMespritPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -5791,8 +5791,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 3, .description = gAzelfPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -5803,10 +5803,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 54, .weight = 6830, .description = gDialgaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 721, + .trainerOffset = 19, }, [NATIONAL_DEX_PALKIA] = @@ -5815,10 +5815,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 42, .weight = 3360, .description = gPalkiaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 650, + .trainerOffset = 16, }, [NATIONAL_DEX_HEATRAN] = @@ -5827,10 +5827,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 17, .weight = 4300, .description = gHeatranPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 290, + .trainerOffset = 1, }, [NATIONAL_DEX_REGIGIGAS] = @@ -5839,10 +5839,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 37, .weight = 4200, .description = gRegigigasPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 2, + .trainerScale = 610, + .trainerOffset = 17, }, [NATIONAL_DEX_GIRATINA] = @@ -5851,10 +5851,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 45, .weight = 7500, .description = gGiratinaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 614, + .trainerOffset = 13, }, [NATIONAL_DEX_CRESSELIA] = @@ -5863,9 +5863,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 856, .description = gCresseliaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -5875,8 +5875,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 31, .description = gPhionePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -5887,8 +5887,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 14, .description = gManaphyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -5899,9 +5899,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 505, .description = gDarkraiPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -5911,8 +5911,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 21, .description = gShayminPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -5923,10 +5923,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 32, .weight = 3200, .description = gArceusPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 495, + .trainerOffset = 10, }, #endif @@ -5937,8 +5937,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 40, .description = gVictiniPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 16, .trainerScale = 256, .trainerOffset = 0, }, @@ -5949,8 +5949,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 81, .description = gSnivyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -5961,9 +5961,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 160, .description = gServinePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 9, + .trainerScale = 257, .trainerOffset = 0, }, @@ -5973,10 +5973,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 33, .weight = 630, .description = gSerperiorPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 405, + .trainerOffset = 8, }, [NATIONAL_DEX_TEPIG] = @@ -5985,8 +5985,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 99, .description = gTepigPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -5997,9 +5997,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 555, .description = gPignitePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 8, + .trainerScale = 257, .trainerOffset = 0, }, @@ -6009,10 +6009,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 1500, .description = gEmboarPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_OSHAWOTT] = @@ -6021,8 +6021,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 59, .description = gOshawottPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -6033,9 +6033,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 245, .description = gDewottPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 9, + .trainerScale = 257, .trainerOffset = 0, }, @@ -6045,9 +6045,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 946, .description = gSamurottPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -6057,8 +6057,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 116, .description = gPatratPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 14, .trainerScale = 256, .trainerOffset = 0, }, @@ -6069,8 +6069,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 270, .description = gWatchogPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -6081,8 +6081,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 41, .description = gLillipupPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -6093,8 +6093,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 147, .description = gHerdierPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 9, .trainerScale = 256, .trainerOffset = 0, }, @@ -6105,8 +6105,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 610, .description = gStoutlandPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -6117,8 +6117,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 101, .description = gPurrloinPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -6129,8 +6129,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 375, .description = gLiepardPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -6141,8 +6141,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 105, .description = gPansagePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -6153,8 +6153,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 305, .description = gSimisagePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -6165,8 +6165,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 110, .description = gPansearPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -6177,9 +6177,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 280, .description = gSimisearPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -6189,8 +6189,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 135, .description = gPanpourPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -6201,9 +6201,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 290, .description = gSimipourPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -6213,8 +6213,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 233, .description = gMunnaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -6225,8 +6225,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 605, .description = gMusharnaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -6237,8 +6237,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 21, .description = gPidovePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -6249,8 +6249,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 150, .description = gTranquillPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -6261,8 +6261,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 290, .description = gUnfezantPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -6273,9 +6273,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 298, .description = gBlitzlePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 8, + .trainerScale = 257, .trainerOffset = 0, }, @@ -6285,10 +6285,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 795, .description = gZebstrikaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_ROGGENROLA] = @@ -6297,8 +6297,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 180, .description = gRoggenrolaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 16, .trainerScale = 256, .trainerOffset = 0, }, @@ -6309,8 +6309,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 1020, .description = gBoldorePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 8, .trainerScale = 256, .trainerOffset = 0, }, @@ -6321,10 +6321,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 17, .weight = 2600, .description = gGigalithPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 0, + .trainerScale = 290, + .trainerOffset = 1, }, [NATIONAL_DEX_WOOBAT] = @@ -6333,8 +6333,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 21, .description = gWoobatPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -6345,8 +6345,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 105, .description = gSwoobatPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 8, .trainerScale = 256, .trainerOffset = 0, }, @@ -6357,8 +6357,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 85, .description = gDrilburPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -6369,8 +6369,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 404, .description = gExcadrillPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -6381,8 +6381,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 310, .description = gAudinoPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -6393,8 +6393,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 125, .description = gTimburrPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 14, .trainerScale = 256, .trainerOffset = 0, }, @@ -6405,8 +6405,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 400, .description = gGurdurrPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -6417,9 +6417,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 870, .description = gConkeldurrPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 3, + .trainerScale = 262, .trainerOffset = 0, }, @@ -6429,8 +6429,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 45, .description = gTympolePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -6441,9 +6441,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 170, .description = gPalpitoadPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 10, + .trainerScale = 257, .trainerOffset = 0, }, @@ -6453,9 +6453,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 620, .description = gSeismitoadPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -6465,8 +6465,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 555, .description = gThrohPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -6477,9 +6477,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 510, .description = gSawkPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 4, + .trainerScale = 262, .trainerOffset = 0, }, @@ -6489,8 +6489,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 25, .description = gSewaddlePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -6501,8 +6501,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 73, .description = gSwadloonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -6513,8 +6513,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 205, .description = gLeavannyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -6525,8 +6525,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 53, .description = gVenipedePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 16, .trainerScale = 256, .trainerOffset = 0, }, @@ -6537,8 +6537,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 585, .description = gWhirlipedePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -6549,10 +6549,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 25, .weight = 2005, .description = gScolipedePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 257, + .pokemonOffset = 2, + .trainerScale = 423, + .trainerOffset = 8, }, [NATIONAL_DEX_COTTONEE] = @@ -6561,8 +6561,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 6, .description = gCottoneePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -6573,8 +6573,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 66, .description = gWhimsicottPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -6585,8 +6585,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 66, .description = gPetililPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -6597,8 +6597,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 163, .description = gLilligantPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -6609,9 +6609,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 180, .description = gBasculinPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 316, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -6621,8 +6621,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 152, .description = gSandilePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 14, .trainerScale = 256, .trainerOffset = 0, }, @@ -6633,9 +6633,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 334, .description = gKrokorokPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -6645,9 +6645,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 963, .description = gKrookodilePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -6657,8 +6657,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 375, .description = gDarumakaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 14, .trainerScale = 256, .trainerOffset = 0, }, @@ -6669,8 +6669,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 929, .description = gDarmanitanPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -6681,9 +6681,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 280, .description = gMaractusPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 6, + .trainerScale = 257, .trainerOffset = 0, }, @@ -6693,8 +6693,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 145, .description = gDwebblePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -6705,9 +6705,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 2000, .description = gCrustlePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 2, + .trainerScale = 262, .trainerOffset = 0, }, @@ -6717,8 +6717,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 118, .description = gScraggyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 14, .trainerScale = 256, .trainerOffset = 0, }, @@ -6729,8 +6729,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 300, .description = gScraftyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -6741,9 +6741,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 140, .description = gSigilyphPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 2, + .trainerScale = 262, .trainerOffset = 0, }, @@ -6753,8 +6753,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 15, .description = gYamaskPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -6765,10 +6765,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 17, .weight = 765, .description = gCofagrigusPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 0, + .trainerScale = 290, + .trainerOffset = 1, }, [NATIONAL_DEX_TIRTOUGA] = @@ -6777,8 +6777,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 165, .description = gTirtougaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -6789,8 +6789,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 810, .description = gCarracostaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -6801,8 +6801,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 95, .description = gArchenPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -6813,9 +6813,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 320, .description = gArcheopsPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 2, + .trainerScale = 262, .trainerOffset = 0, }, @@ -6825,8 +6825,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 310, .description = gTrubbishPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 14, .trainerScale = 256, .trainerOffset = 0, }, @@ -6837,10 +6837,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 19, .weight = 1073, .description = gGarbodorPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 1, + .trainerScale = 326, + .trainerOffset = 4, }, [NATIONAL_DEX_ZORUA] = @@ -6849,8 +6849,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 125, .description = gZoruaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -6861,10 +6861,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 811, .description = gZoroarkPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_MINCCINO] = @@ -6873,8 +6873,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 58, .description = gMinccinoPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -6885,8 +6885,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 75, .description = gCinccinoPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -6897,8 +6897,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 58, .description = gGothitaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 14, .trainerScale = 256, .trainerOffset = 0, }, @@ -6909,8 +6909,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 180, .description = gGothoritaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -6921,9 +6921,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 440, .description = gGothitellePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -6933,8 +6933,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 10, .description = gSolosisPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -6945,8 +6945,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 80, .description = gDuosionPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -6957,9 +6957,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 201, .description = gReuniclusPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -6969,8 +6969,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 55, .description = gDucklettPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 14, .trainerScale = 256, .trainerOffset = 0, }, @@ -6981,8 +6981,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 242, .description = gSwannaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -6993,8 +6993,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 57, .description = gVanillitePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -7005,8 +7005,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 410, .description = gVanillishPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -7017,8 +7017,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 575, .description = gVanilluxePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -7029,8 +7029,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 195, .description = gDeerlingPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 14, .trainerScale = 256, .trainerOffset = 0, }, @@ -7041,10 +7041,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 19, .weight = 925, .description = gSawsbuckPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 1, + .trainerScale = 326, + .trainerOffset = 4, }, [NATIONAL_DEX_EMOLGA] = @@ -7053,8 +7053,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 50, .description = gEmolgaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -7065,8 +7065,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 59, .description = gKarrablastPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -7077,9 +7077,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 330, .description = gEscavalierPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -7089,8 +7089,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 10, .description = gFoongusPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -7101,8 +7101,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 105, .description = gAmoongussPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -7113,8 +7113,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 330, .description = gFrillishPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -7125,10 +7125,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 22, .weight = 1350, .description = gJellicentPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 348, + .trainerOffset = 6, }, [NATIONAL_DEX_ALOMOMOLA] = @@ -7137,8 +7137,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 316, .description = gAlomomolaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -7149,8 +7149,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 1, .weight = 6, .description = gJoltikPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -7161,9 +7161,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 143, .description = gGalvantulaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 10, + .trainerScale = 257, .trainerOffset = 0, }, @@ -7173,8 +7173,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 188, .description = gFerroseedPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 14, .trainerScale = 256, .trainerOffset = 0, }, @@ -7185,9 +7185,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 1100, .description = gFerrothornPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -7197,8 +7197,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 210, .description = gKlinkPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -7209,8 +7209,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 510, .description = gKlangPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -7221,8 +7221,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 810, .description = gKlinklangPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -7233,8 +7233,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 3, .description = gTynamoPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -7245,8 +7245,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 220, .description = gEelektrikPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -7257,10 +7257,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 21, .weight = 805, .description = gEelektrossPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 1, + .trainerScale = 365, + .trainerOffset = 7, }, [NATIONAL_DEX_ELGYEM] = @@ -7269,8 +7269,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 90, .description = gElgyemPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -7281,9 +7281,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 345, .description = gBeheeyemPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -7293,8 +7293,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 31, .description = gLitwickPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -7305,8 +7305,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 130, .description = gLampentPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -7317,9 +7317,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 343, .description = gChandelurePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -7329,8 +7329,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 180, .description = gAxewPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -7341,9 +7341,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 360, .description = gFraxurePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -7353,10 +7353,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 18, .weight = 1055, .description = gHaxorusPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 267, + .pokemonOffset = 2, + .trainerScale = 286, + .trainerOffset = 1, }, [NATIONAL_DEX_CUBCHOO] = @@ -7365,8 +7365,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 85, .description = gCubchooPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -7377,10 +7377,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 26, .weight = 2600, .description = gBearticPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 266, + .pokemonOffset = 3, + .trainerScale = 399, + .trainerOffset = 4, }, [NATIONAL_DEX_CRYOGONAL] = @@ -7389,8 +7389,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 1480, .description = gCryogonalPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -7401,8 +7401,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 77, .description = gShelmetPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -7413,9 +7413,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 253, .description = gAccelgorPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 9, + .trainerScale = 257, .trainerOffset = 0, }, @@ -7425,8 +7425,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 110, .description = gStunfiskPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 14, .trainerScale = 256, .trainerOffset = 0, }, @@ -7437,8 +7437,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 200, .description = gMienfooPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 10, .trainerScale = 256, .trainerOffset = 0, }, @@ -7449,9 +7449,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 355, .description = gMienshaoPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 2, + .trainerScale = 262, .trainerOffset = 0, }, @@ -7461,10 +7461,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 1390, .description = gDruddigonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_GOLETT] = @@ -7473,9 +7473,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 920, .description = gGolettPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -7485,9 +7485,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 28, .weight = 3300, .description = gGolurkPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 275, + .pokemonOffset = 3, + .trainerScale = 300, .trainerOffset = 0, }, @@ -7497,8 +7497,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 102, .description = gPawniardPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 15, .trainerScale = 256, .trainerOffset = 0, }, @@ -7509,10 +7509,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 700, .description = gBisharpPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_BOUFFALANT] = @@ -7521,10 +7521,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 946, .description = gBouffalantPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_RUFFLET] = @@ -7533,8 +7533,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 105, .description = gRuffletPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -7545,9 +7545,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 410, .description = gBraviaryPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -7557,8 +7557,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 90, .description = gVullabyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -7569,8 +7569,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 395, .description = gMandibuzzPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -7581,9 +7581,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 580, .description = gHeatmorPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 2, + .trainerScale = 262, .trainerOffset = 0, }, @@ -7593,8 +7593,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 330, .description = gDurantPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 19, .trainerScale = 256, .trainerOffset = 0, }, @@ -7605,9 +7605,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 173, .description = gDeinoPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 12, + .trainerScale = 257, .trainerOffset = 0, }, @@ -7617,9 +7617,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 500, .description = gZweilousPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 3, + .trainerScale = 262, .trainerOffset = 0, }, @@ -7629,10 +7629,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 18, .weight = 1600, .description = gHydreigonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 267, + .pokemonOffset = 2, + .trainerScale = 286, + .trainerOffset = 1, }, [NATIONAL_DEX_LARVESTA] = @@ -7641,8 +7641,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 288, .description = gLarvestaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 10, .trainerScale = 256, .trainerOffset = 0, }, @@ -7653,10 +7653,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 460, .description = gVolcaronaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_COBALION] = @@ -7665,10 +7665,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 21, .weight = 2500, .description = gCobalionPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 365, + .trainerOffset = 7, }, [NATIONAL_DEX_TERRAKION] = @@ -7677,10 +7677,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 19, .weight = 2600, .description = gTerrakionPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 1, + .trainerScale = 336, + .trainerOffset = 4, }, [NATIONAL_DEX_VIRIZION] = @@ -7689,10 +7689,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 20, .weight = 2000, .description = gVirizionPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 261, + .pokemonOffset = 1, + .trainerScale = 344, + .trainerOffset = 4, }, [NATIONAL_DEX_TORNADUS] = @@ -7701,9 +7701,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 630, .description = gTornadusPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -7713,9 +7713,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 610, .description = gThundurusPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -7725,10 +7725,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 32, .weight = 3300, .description = gReshiramPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 445, + .trainerOffset = 8, }, [NATIONAL_DEX_ZEKROM] = @@ -7737,10 +7737,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 29, .weight = 3450, .description = gZekromPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 275, + .pokemonOffset = 2, + .trainerScale = 412, + .trainerOffset = 10, }, [NATIONAL_DEX_LANDORUS] = @@ -7749,9 +7749,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 680, .description = gLandorusPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -7761,9 +7761,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 30, .weight = 3250, .description = gKyuremPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 275, + .pokemonOffset = 7, + .trainerScale = 356, .trainerOffset = 0, }, @@ -7773,9 +7773,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 485, .description = gKeldeoPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 2, + .trainerScale = 262, .trainerOffset = 0, }, @@ -7785,8 +7785,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 65, .description = gMeloettaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -7797,9 +7797,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 825, .description = gGenesectPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, #endif @@ -7811,8 +7811,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 90, .description = gChespinPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -7823,8 +7823,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 290, .description = gQuilladinPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -7835,10 +7835,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 900, .description = gChesnaughtPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_FENNEKIN] = @@ -7847,8 +7847,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 94, .description = gFennekinPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -7859,9 +7859,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 145, .description = gBraixenPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -7871,9 +7871,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 390, .description = gDelphoxPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -7883,8 +7883,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 70, .description = gFroakiePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -7895,8 +7895,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 109, .description = gFrogadierPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -7907,9 +7907,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 400, .description = gGreninjaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -7919,8 +7919,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 50, .description = gBunnelbyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -7931,9 +7931,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 424, .description = gDiggersbyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -7943,8 +7943,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 17, .description = gFletchlingPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -7955,8 +7955,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 160, .description = gFletchinderPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -7967,8 +7967,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 245, .description = gTalonflamePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -7979,8 +7979,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 25, .description = gScatterbugPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -7991,8 +7991,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 84, .description = gSpewpaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -8003,8 +8003,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 170, .description = gVivillonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -8015,8 +8015,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 135, .description = gLitleoPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8027,9 +8027,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 815, .description = gPyroarPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -8039,8 +8039,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 1, .weight = 1, .description = gFlabebePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -8051,8 +8051,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 9, .description = gFloettePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -8063,8 +8063,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 100, .description = gFlorgesPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -8075,8 +8075,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 310, .description = gSkiddoPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 8, .trainerScale = 256, .trainerOffset = 0, }, @@ -8087,10 +8087,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 17, .weight = 910, .description = gGogoatPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 0, + .trainerScale = 290, + .trainerOffset = 1, }, [NATIONAL_DEX_PANCHAM] = @@ -8099,8 +8099,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 80, .description = gPanchamPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8111,10 +8111,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 21, .weight = 1360, .description = gPangoroPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 365, + .trainerOffset = 7, }, [NATIONAL_DEX_FURFROU] = @@ -8123,8 +8123,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 280, .description = gFurfrouPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -8135,8 +8135,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 35, .description = gEspurrPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -8147,8 +8147,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 85, .description = gMeowsticPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8159,9 +8159,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 20, .description = gHonedgePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -8171,9 +8171,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 45, .description = gDoubladePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -8183,10 +8183,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 17, .weight = 530, .description = gAegislashPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 0, + .trainerScale = 290, + .trainerOffset = 1, }, [NATIONAL_DEX_SPRITZEE] = @@ -8195,8 +8195,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 5, .description = gSpritzeePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -8207,9 +8207,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 155, .description = gAromatissePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -8219,8 +8219,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 35, .description = gSwirlixPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8231,9 +8231,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 50, .description = gSlurpuffPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -8243,8 +8243,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 35, .description = gInkayPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8255,9 +8255,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 470, .description = gMalamarPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -8267,8 +8267,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 310, .description = gBinaclePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -8279,8 +8279,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 960, .description = gBarbaraclePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -8291,8 +8291,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 73, .description = gSkrelpPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -8303,10 +8303,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 18, .weight = 815, .description = gDragalgePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 267, + .pokemonOffset = 2, + .trainerScale = 286, + .trainerOffset = 1, }, [NATIONAL_DEX_CLAUNCHER] = @@ -8315,8 +8315,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 83, .description = gClauncherPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -8327,8 +8327,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 353, .description = gClawitzerPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -8339,8 +8339,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 60, .description = gHelioptilePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -8351,9 +8351,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 210, .description = gHelioliskPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -8363,9 +8363,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 260, .description = gTyruntPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -8375,10 +8375,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 25, .weight = 2700, .description = gTyrantrumPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 257, + .pokemonOffset = 10, + .trainerScale = 423, + .trainerOffset = 8, }, [NATIONAL_DEX_AMAURA] = @@ -8387,8 +8387,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 252, .description = gAmauraPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -8399,8 +8399,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 27, .weight = 2250, .description = gAurorusPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 275, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -8411,9 +8411,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 235, .description = gSylveonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -8423,9 +8423,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 215, .description = gHawluchaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -8435,8 +8435,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 22, .description = gDedennePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -8447,8 +8447,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 57, .description = gCarbinkPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -8459,8 +8459,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 28, .description = gGoomyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -8471,9 +8471,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 175, .description = gSliggooPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -8483,10 +8483,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 20, .weight = 1505, .description = gGoodraPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 261, + .pokemonOffset = 1, + .trainerScale = 334, + .trainerOffset = 4, }, [NATIONAL_DEX_KLEFKI] = @@ -8495,8 +8495,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 30, .description = gKlefkiPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -8507,8 +8507,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 70, .description = gPhantumpPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8519,9 +8519,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 710, .description = gTrevenantPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -8531,8 +8531,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 50, .description = gPumpkabooPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8543,8 +8543,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 125, .description = gGourgeistPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 8, .trainerScale = 256, .trainerOffset = 0, }, @@ -8555,9 +8555,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 995, .description = gBergmitePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -8567,10 +8567,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 20, .weight = 5050, .description = gAvaluggPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 261, + .pokemonOffset = 1, + .trainerScale = 334, + .trainerOffset = 4, }, [NATIONAL_DEX_NOIBAT] = @@ -8579,8 +8579,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 80, .description = gNoibatPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -8591,9 +8591,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 850, .description = gNoivernPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -8603,8 +8603,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 30, .weight = 2150, .description = gXerneasPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 275, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -8615,10 +8615,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 58, .weight = 2030, .description = gYveltalPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 360, + .trainerOffset = 7, }, [NATIONAL_DEX_ZYGARDE] = @@ -8627,10 +8627,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 50, .weight = 3050, .description = gZygardePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 721, + .trainerOffset = 19, }, [NATIONAL_DEX_DIANCIE] = @@ -8639,8 +8639,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 88, .description = gDianciePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8651,8 +8651,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 90, .description = gHoopaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -8663,10 +8663,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 17, .weight = 1950, .description = gVolcanionPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 0, + .trainerScale = 290, + .trainerOffset = 1, }, #endif @@ -8677,8 +8677,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 15, .description = gRowletPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -8689,8 +8689,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 160, .description = gDartrixPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8701,10 +8701,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 366, .description = gDecidueyePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_LITTEN] = @@ -8713,8 +8713,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 43, .description = gLittenPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8725,8 +8725,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 250, .description = gTorracatPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8737,10 +8737,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 18, .weight = 830, .description = gIncineroarPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 267, + .pokemonOffset = 2, + .trainerScale = 286, + .trainerOffset = 1, }, [NATIONAL_DEX_POPPLIO] = @@ -8749,8 +8749,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 75, .description = gPopplioPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8761,8 +8761,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 175, .description = gBrionnePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8773,10 +8773,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 18, .weight = 440, .description = gPrimarinaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 267, + .pokemonOffset = 2, + .trainerScale = 286, + .trainerOffset = 1, }, [NATIONAL_DEX_PIKIPEK] = @@ -8785,8 +8785,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 12, .description = gPikipekPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -8797,8 +8797,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 148, .description = gTrumbeakPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8809,8 +8809,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 260, .description = gToucannonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -8821,8 +8821,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 60, .description = gYungoosPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8833,8 +8833,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 142, .description = gGumshoosPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8845,8 +8845,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 44, .description = gGrubbinPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8857,8 +8857,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 105, .description = gCharjabugPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -8869,9 +8869,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 450, .description = gVikavoltPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -8881,8 +8881,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 70, .description = gCrabrawlerPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8893,10 +8893,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 17, .weight = 1800, .description = gCrabominablePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 0, + .trainerScale = 290, + .trainerOffset = 1, }, [NATIONAL_DEX_ORICORIO] = @@ -8905,8 +8905,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 34, .description = gOricorioPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8917,8 +8917,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 1, .weight = 2, .description = gCutieflyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -8929,8 +8929,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 5, .description = gRibombeePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -8941,8 +8941,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 92, .description = gRockruffPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -8953,9 +8953,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 250, .description = gLycanrocPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -8965,8 +8965,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 3, .description = gWishiwashiPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -8977,8 +8977,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 80, .description = gMareaniePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -8989,8 +8989,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 145, .description = gToxapexPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9001,9 +9001,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 1100, .description = gMudbrayPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -9013,10 +9013,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 25, .weight = 9200, .description = gMudsdalePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 257, + .pokemonOffset = 10, + .trainerScale = 423, + .trainerOffset = 8, }, [NATIONAL_DEX_DEWPIDER] = @@ -9025,8 +9025,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 40, .description = gDewpiderPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -9037,10 +9037,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 18, .weight = 820, .description = gAraquanidPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 267, + .pokemonOffset = 2, + .trainerScale = 286, + .trainerOffset = 1, }, [NATIONAL_DEX_FOMANTIS] = @@ -9049,8 +9049,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 15, .description = gFomantisPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -9061,8 +9061,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 185, .description = gLurantisPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 8, .trainerScale = 256, .trainerOffset = 0, }, @@ -9073,8 +9073,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 15, .description = gMorelullPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -9085,9 +9085,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 115, .description = gShiinoticPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -9097,8 +9097,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 48, .description = gSalanditPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9109,8 +9109,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 222, .description = gSalazzlePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -9121,8 +9121,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 68, .description = gStuffulPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -9133,10 +9133,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 21, .weight = 1350, .description = gBewearPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 365, + .trainerOffset = 7, }, [NATIONAL_DEX_BOUNSWEET] = @@ -9145,8 +9145,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 32, .description = gBounsweetPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -9157,8 +9157,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 82, .description = gSteeneePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9169,8 +9169,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 214, .description = gTsareenaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -9181,8 +9181,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 1, .weight = 3, .description = gComfeyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -9193,9 +9193,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 760, .description = gOranguruPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -9205,10 +9205,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 20, .weight = 828, .description = gPassimianPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 261, + .pokemonOffset = 1, + .trainerScale = 334, + .trainerOffset = 4, }, [NATIONAL_DEX_WIMPOD] = @@ -9217,8 +9217,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 120, .description = gWimpodPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -9229,10 +9229,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 20, .weight = 1080, .description = gGolisopodPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 261, + .pokemonOffset = 1, + .trainerScale = 334, + .trainerOffset = 4, }, [NATIONAL_DEX_SANDYGAST] = @@ -9241,8 +9241,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 700, .description = gSandygastPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -9253,8 +9253,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 2500, .description = gPalossandPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -9265,8 +9265,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 12, .description = gPyukumukuPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -9277,10 +9277,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 19, .weight = 1205, .description = gTypeNullPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 1, + .trainerScale = 326, + .trainerOffset = 4, }, [NATIONAL_DEX_SILVALLY] = @@ -9289,10 +9289,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 23, .weight = 1005, .description = gSilvallyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 342, + .trainerOffset = 7, }, [NATIONAL_DEX_MINIOR] = @@ -9301,8 +9301,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 400, .description = gMiniorPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -9313,8 +9313,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 199, .description = gKomalaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9325,10 +9325,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 20, .weight = 2120, .description = gTurtonatorPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 261, + .pokemonOffset = 1, + .trainerScale = 334, + .trainerOffset = 4, }, [NATIONAL_DEX_TOGEDEMARU] = @@ -9337,8 +9337,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 33, .description = gTogedemaruPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -9349,8 +9349,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 7, .description = gMimikyuPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -9361,8 +9361,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 190, .description = gBruxishPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 8, .trainerScale = 256, .trainerOffset = 0, }, @@ -9373,8 +9373,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 30, .weight = 1850, .description = gDrampaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 275, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -9385,10 +9385,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 39, .weight = 2100, .description = gDhelmisePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 510, + .trainerOffset = 11, }, [NATIONAL_DEX_JANGMO_O] = @@ -9396,9 +9396,9 @@ const struct PokedexEntry gPokedexEntries[] = .categoryName = _("Scaly"), .height = 6, .weight = 297, - .description = gJangmooPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .description = gJangmoOPokedexText, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9408,9 +9408,9 @@ const struct PokedexEntry gPokedexEntries[] = .categoryName = _("Scaly"), .height = 12, .weight = 470, - .description = gHakamooPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .description = gHakamoOPokedexText, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -9420,11 +9420,11 @@ const struct PokedexEntry gPokedexEntries[] = .categoryName = _("Scaly"), .height = 16, .weight = 782, - .description = gKommooPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .description = gKommoOPokedexText, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_TAPU_KOKO] = @@ -9433,10 +9433,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 18, .weight = 205, .description = gTapuKokoPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 267, + .pokemonOffset = 2, + .trainerScale = 286, + .trainerOffset = 1, }, [NATIONAL_DEX_TAPU_LELE] = @@ -9445,8 +9445,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 186, .description = gTapuLelePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -9457,10 +9457,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 19, .weight = 455, .description = gTapuBuluPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 1, + .trainerScale = 326, + .trainerOffset = 4, }, [NATIONAL_DEX_TAPU_FINI] = @@ -9469,8 +9469,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 212, .description = gTapuFiniPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -9481,8 +9481,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 1, .description = gCosmogPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -9493,8 +9493,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 1, .weight = 9999, .description = gCosmoemPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -9505,10 +9505,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 34, .weight = 2300, .description = gSolgaleoPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 405, + .trainerOffset = 8, }, [NATIONAL_DEX_LUNALA] = @@ -9517,10 +9517,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 40, .weight = 1200, .description = gLunalaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 411, + .trainerOffset = 5, }, [NATIONAL_DEX_NIHILEGO] = @@ -9529,8 +9529,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 555, .description = gNihilegoPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -9541,10 +9541,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 24, .weight = 3336, .description = gBuzzwolePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 3, + .trainerScale = 369, + .trainerOffset = 7, }, [NATIONAL_DEX_PHEROMOSA] = @@ -9553,10 +9553,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 18, .weight = 250, .description = gPheromosaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 267, + .pokemonOffset = 2, + .trainerScale = 286, + .trainerOffset = 1, }, [NATIONAL_DEX_XURKITREE] = @@ -9565,10 +9565,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 38, .weight = 1000, .description = gXurkitreePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 610, + .trainerOffset = 17, }, [NATIONAL_DEX_CELESTEELA] = @@ -9577,10 +9577,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 92, .weight = 9999, .description = gCelesteelaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 516, + .trainerOffset = 13, }, [NATIONAL_DEX_KARTANA] = @@ -9589,8 +9589,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 1, .description = gKartanaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -9601,10 +9601,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 55, .weight = 8880, .description = gGuzzlordPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 721, + .trainerOffset = 19, }, [NATIONAL_DEX_NECROZMA] = @@ -9613,10 +9613,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 24, .weight = 2300, .description = gNecrozmaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 3, + .trainerScale = 369, + .trainerOffset = 7, }, [NATIONAL_DEX_MAGEARNA] = @@ -9625,9 +9625,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 805, .description = gMagearnaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -9637,8 +9637,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 222, .description = gMarshadowPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9649,8 +9649,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 18, .description = gPoipolePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9661,10 +9661,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 36, .weight = 1500, .description = gNaganadelPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 405, + .trainerOffset = 8, }, [NATIONAL_DEX_STAKATAKA] = @@ -9673,10 +9673,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 55, .weight = 8200, .description = gStakatakaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 721, + .trainerOffset = 19, }, [NATIONAL_DEX_BLACEPHALON] = @@ -9685,10 +9685,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 18, .weight = 130, .description = gBlacephalonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 267, + .pokemonOffset = 2, + .trainerScale = 286, + .trainerOffset = 1, }, [NATIONAL_DEX_ZERAORA] = @@ -9697,9 +9697,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 445, .description = gZeraoraPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -9709,8 +9709,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 80, .description = gMeltanPokedexText, - .pokemonScale = 640, - .pokemonOffset = 23, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -9721,10 +9721,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 25, .weight = 800, .description = gMelmetalPokedexText, - .pokemonScale = 255, - .pokemonOffset = 1, - .trainerScale = 387, - .trainerOffset = 2, + .pokemonScale = 257, + .pokemonOffset = 10, + .trainerScale = 423, + .trainerOffset = 8, }, #endif @@ -9735,8 +9735,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 50, .description = gGrookeyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -9747,8 +9747,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 140, .description = gThwackeyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9759,10 +9759,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 21, .weight = 900, .description = gRillaboomPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 365, + .trainerOffset = 7, }, [NATIONAL_DEX_SCORBUNNY] = @@ -9771,8 +9771,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 45, .description = gScorbunnyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -9783,8 +9783,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 90, .description = gRabootPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9795,9 +9795,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 330, .description = gCinderacePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 2, + .trainerScale = 262, .trainerOffset = 0, }, @@ -9807,8 +9807,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 40, .description = gSobblePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -9819,8 +9819,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 115, .description = gDrizzilePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9831,10 +9831,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 19, .weight = 452, .description = gInteleonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 1, + .trainerScale = 326, + .trainerOffset = 4, }, [NATIONAL_DEX_SKWOVET] = @@ -9843,8 +9843,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 25, .description = gSkwovetPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -9855,8 +9855,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 60, .description = gGreedentPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9867,8 +9867,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 18, .description = gRookideePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -9879,9 +9879,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 160, .description = gCorvisquirePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -9891,10 +9891,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 22, .weight = 750, .description = gCorviknightPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 348, + .trainerOffset = 6, }, [NATIONAL_DEX_BLIPBUG] = @@ -9903,8 +9903,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 80, .description = gBlipbugPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9915,8 +9915,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 195, .description = gDottlerPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9927,8 +9927,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 408, .description = gOrbeetlePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9939,8 +9939,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 89, .description = gNickitPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9951,8 +9951,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 199, .description = gThievulPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -9963,8 +9963,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 22, .description = gGossifleurPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9975,8 +9975,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 25, .description = gEldegossPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -9987,8 +9987,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 60, .description = gWoolooPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -9999,8 +9999,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 430, .description = gDubwoolPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -10011,8 +10011,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 85, .description = gChewtlePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -10023,9 +10023,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 1155, .description = gDrednawPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -10035,8 +10035,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 135, .description = gYamperPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -10047,9 +10047,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 340, .description = gBoltundPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -10059,8 +10059,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 120, .description = gRolycolyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -10071,8 +10071,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 780, .description = gCarkolPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -10083,8 +10083,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 28, .weight = 3105, .description = gCoalossalPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 275, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -10095,8 +10095,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 5, .description = gApplinPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -10107,8 +10107,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 10, .description = gFlapplePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -10119,8 +10119,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 130, .description = gAppletunPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -10131,10 +10131,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 22, .weight = 76, .description = gSilicobraPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 348, + .trainerOffset = 6, }, [NATIONAL_DEX_SANDACONDA] = @@ -10143,10 +10143,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 38, .weight = 655, .description = gSandacondaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 610, + .trainerOffset = 17, }, [NATIONAL_DEX_CRAMORANT] = @@ -10155,9 +10155,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 180, .description = gCramorantPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -10167,8 +10167,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 10, .description = gArrokudaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -10179,8 +10179,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 300, .description = gBarraskewdaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -10191,8 +10191,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 110, .description = gToxelPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -10203,10 +10203,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 400, .description = gToxtricityPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_SIZZLIPEDE] = @@ -10215,8 +10215,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 7, .weight = 10, .description = gSizzlipedePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 365, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -10227,8 +10227,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 30, .weight = 1200, .description = gCentiskorchPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 275, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -10239,8 +10239,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 40, .description = gClobbopusPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -10251,10 +10251,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 390, .description = gGrapploctPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_SINISTEA] = @@ -10263,8 +10263,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 1, .weight = 2, .description = gSinisteaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -10275,8 +10275,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 4, .description = gPolteageistPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -10287,8 +10287,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 34, .description = gHatennaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -10299,8 +10299,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 48, .description = gHattremPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -10311,10 +10311,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 21, .weight = 51, .description = gHatterenePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 365, + .trainerOffset = 7, }, [NATIONAL_DEX_IMPIDIMP] = @@ -10323,8 +10323,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 4, .weight = 55, .description = gImpidimpPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 491, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -10335,9 +10335,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 125, .description = gMorgremPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -10347,9 +10347,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 610, .description = gGrimmsnarlPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -10359,10 +10359,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 460, .description = gObstagoonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_PERRSERKER] = @@ -10371,9 +10371,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 280, .description = gPerrserkerPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -10383,9 +10383,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 10, .weight = 4, .description = gCursolaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 305, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -10395,9 +10395,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 8, .weight = 1170, .description = gSirfetchdPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 366, + .pokemonOffset = 7, + .trainerScale = 257, .trainerOffset = 0, }, @@ -10407,9 +10407,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 15, .weight = 582, .description = gMrRimePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 268, + .pokemonOffset = 2, + .trainerScale = 271, .trainerOffset = 0, }, @@ -10419,10 +10419,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 666, .description = gRunerigusPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, [NATIONAL_DEX_MILCERY] = @@ -10431,8 +10431,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 2, .weight = 3, .description = gMilceryPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 682, + .pokemonOffset = 24, .trainerScale = 256, .trainerOffset = 0, }, @@ -10443,8 +10443,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 5, .description = gAlcremiePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -10455,8 +10455,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 30, .weight = 620, .description = gFalinksPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 275, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -10467,8 +10467,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 10, .description = gPincurchinPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -10479,8 +10479,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 38, .description = gSnomPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -10491,8 +10491,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 420, .description = gFrosmothPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -10503,10 +10503,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 25, .weight = 5200, .description = gStonjournerPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 257, + .pokemonOffset = 10, + .trainerScale = 423, + .trainerOffset = 8, }, [NATIONAL_DEX_EISCUE] = @@ -10515,9 +10515,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 890, .description = gEiscuePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 2, + .trainerScale = 262, .trainerOffset = 0, }, @@ -10527,8 +10527,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 9, .weight = 280, .description = gIndeedeePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 338, + .pokemonOffset = 8, .trainerScale = 256, .trainerOffset = 0, }, @@ -10539,8 +10539,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 3, .weight = 30, .description = gMorpekoPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 530, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -10551,8 +10551,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 1000, .description = gCufantPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -10563,8 +10563,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 30, .weight = 6500, .description = gCopperajahPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 275, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -10575,10 +10575,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 18, .weight = 1900, .description = gDracozoltPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 267, + .pokemonOffset = 2, + .trainerScale = 286, + .trainerOffset = 1, }, [NATIONAL_DEX_ARCTOZOLT] = @@ -10587,10 +10587,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 23, .weight = 1500, .description = gArctozoltPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 342, + .trainerOffset = 7, }, [NATIONAL_DEX_DRACOVISH] = @@ -10599,10 +10599,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 23, .weight = 2150, .description = gDracovishPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 342, + .trainerOffset = 7, }, [NATIONAL_DEX_ARCTOVISH] = @@ -10611,10 +10611,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 20, .weight = 1750, .description = gArctovishPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 261, + .pokemonOffset = 1, + .trainerScale = 334, + .trainerOffset = 4, }, [NATIONAL_DEX_DURALUDON] = @@ -10623,10 +10623,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 18, .weight = 400, .description = gDuraludonPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 267, + .pokemonOffset = 2, + .trainerScale = 286, + .trainerOffset = 1, }, [NATIONAL_DEX_DREEPY] = @@ -10635,8 +10635,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 5, .weight = 20, .description = gDreepyPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 432, + .pokemonOffset = 13, .trainerScale = 256, .trainerOffset = 0, }, @@ -10647,9 +10647,9 @@ const struct PokedexEntry gPokedexEntries[] = .height = 14, .weight = 110, .description = gDrakloakPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, + .pokemonScale = 265, + .pokemonOffset = 2, + .trainerScale = 262, .trainerOffset = 0, }, @@ -10659,8 +10659,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 30, .weight = 500, .description = gDragapultPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 275, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -10671,8 +10671,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 28, .weight = 1100, .description = gZacianPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 275, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -10683,8 +10683,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 29, .weight = 2100, .description = gZamazentaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 275, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -10695,10 +10695,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 200, .weight = 9500, .description = gEternatusPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 230, + .pokemonOffset = 0, + .trainerScale = 4852, + .trainerOffset = 20, }, [NATIONAL_DEX_KUBFU] = @@ -10707,8 +10707,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 6, .weight = 120, .description = gKubfuPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 422, + .pokemonOffset = 12, .trainerScale = 256, .trainerOffset = 0, }, @@ -10719,10 +10719,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 19, .weight = 1050, .description = gUrshifuPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 1, + .trainerScale = 326, + .trainerOffset = 4, }, [NATIONAL_DEX_ZARUDE] = @@ -10731,10 +10731,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 18, .weight = 700, .description = gZarudePokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 267, + .pokemonOffset = 2, + .trainerScale = 286, + .trainerOffset = 1, }, [NATIONAL_DEX_REGIELEKI] = @@ -10743,8 +10743,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 12, .weight = 1450, .description = gRegielekiPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 282, + .pokemonOffset = 4, .trainerScale = 256, .trainerOffset = 0, }, @@ -10755,10 +10755,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 21, .weight = 2000, .description = gRegidragoPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 365, + .trainerOffset = 7, }, [NATIONAL_DEX_GLASTRIER] = @@ -10767,10 +10767,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 22, .weight = 8000, .description = gGlastrierPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 0, + .trainerScale = 348, + .trainerOffset = 6, }, [NATIONAL_DEX_SPECTRIER] = @@ -10779,10 +10779,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 20, .weight = 445, .description = gSpectrierPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 261, + .pokemonOffset = 1, + .trainerScale = 334, + .trainerOffset = 4, }, [NATIONAL_DEX_CALYREX] = @@ -10791,8 +10791,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 11, .weight = 77, .description = gCalyrexPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 320, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -10803,10 +10803,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 18, .weight = 951, .description = gWyrdeerPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 267, + .pokemonOffset = 2, + .trainerScale = 286, + .trainerOffset = 1, }, [NATIONAL_DEX_KLEAVOR] = @@ -10815,10 +10815,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 18, .weight = 890, .description = gKleavorPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 267, + .pokemonOffset = 2, + .trainerScale = 286, + .trainerOffset = 1, }, [NATIONAL_DEX_URSALUNA] = @@ -10827,10 +10827,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 24, .weight = 2900, .description = gUrsalunaPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 256, + .pokemonOffset = 3, + .trainerScale = 369, + .trainerOffset = 7, }, [NATIONAL_DEX_BASCULEGION] = @@ -10839,8 +10839,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 30, .weight = 1100, .description = gBasculegionPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 275, + .pokemonOffset = 7, .trainerScale = 256, .trainerOffset = 0, }, @@ -10851,8 +10851,8 @@ const struct PokedexEntry gPokedexEntries[] = .height = 13, .weight = 430, .description = gSneaslerPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, + .pokemonScale = 272, + .pokemonOffset = 3, .trainerScale = 256, .trainerOffset = 0, }, @@ -10863,10 +10863,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 25, .weight = 605, .description = gOverqwilPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 257, + .pokemonOffset = 10, + .trainerScale = 423, + .trainerOffset = 8, }, [NATIONAL_DEX_ENAMORUS] = @@ -10875,10 +10875,10 @@ const struct PokedexEntry gPokedexEntries[] = .height = 16, .weight = 480, .description = gEnamorusPokedexText, - .pokemonScale = 356, - .pokemonOffset = 17, - .trainerScale = 256, - .trainerOffset = 0, + .pokemonScale = 259, + .pokemonOffset = 1, + .trainerScale = 296, + .trainerOffset = 1, }, #endif }; diff --git a/src/data/pokemon/pokedex_text.h b/src/data/pokemon/pokedex_text.h index 6048d21215..5e28a204be 100644 --- a/src/data/pokemon/pokedex_text.h +++ b/src/data/pokemon/pokedex_text.h @@ -4697,19 +4697,19 @@ const u8 gDhelmisePokedexText[] = _( "It maintains itself with new infusions of\n" "seabed detritus and seaweed."); -const u8 gJangmooPokedexText[] = _( +const u8 gJangmoOPokedexText[] = _( "It expresses its feelings by smacking its\n" "scales. Metallic sounds echo through the\n" "tall mountains where Jangmo-o live. They\n" "grow little by little battling one another."); -const u8 gHakamooPokedexText[] = _( +const u8 gHakamoOPokedexText[] = _( "It sheds and regrows its scales on a\n" "continuous basis. The scales become\n" "harder each time they're regrown. Its\n" "scaly punches tear its foes to shreds."); -const u8 gKommooPokedexText[] = _( +const u8 gKommoOPokedexText[] = _( "Its rigid scales function as offense and\n" "defense. In the past, its scales were\n" "processed and used to make weapons\n" diff --git a/src/data/pokemon/species_info.h b/src/data/pokemon/species_info.h index ee2230b94a..7b60f1b1a6 100644 --- a/src/data/pokemon/species_info.h +++ b/src/data/pokemon/species_info.h @@ -30,9 +30,9 @@ .itemRare = ITEM_LIGHT_BALL, \ .genderRatio = gender, \ .eggCycles = 10, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ - .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, \ + .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, \ .abilities = {ABILITY_STATIC, ABILITY_NONE, ABILITY_LIGHTNING_ROD},\ .bodyColor = BODY_COLOR_YELLOW, \ .noFlip = flip, \ @@ -55,9 +55,9 @@ .evYield_Speed = 1, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 10, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ - .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, \ + .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, \ .abilities = {ABILITY_STATIC, ABILITY_NONE, ABILITY_LIGHTNING_ROD},\ .bodyColor = BODY_COLOR_YELLOW, \ .noFlip = flip, \ @@ -78,7 +78,7 @@ .evYield_SpAttack = 1, \ .genderRatio = MON_GENDERLESS, \ .eggCycles = 40, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, \ .abilities = {ABILITY_LEVITATE, ABILITY_NONE},\ @@ -102,7 +102,7 @@ .itemRare = ITEM_MYSTIC_WATER, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 25, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_AMORPHOUS}, \ .abilities = {ABILITY_FORECAST, ABILITY_NONE},\ @@ -124,7 +124,7 @@ .evYield_SpDefense = 1, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 15, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, \ .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE, ABILITY_OVERCOAT},\ @@ -147,7 +147,7 @@ .itemRare = ITEM_MIRACLE_SEED, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, \ .abilities = {ABILITY_FLOWER_GIFT, ABILITY_NONE},\ @@ -169,7 +169,7 @@ .evYield_HP = 1, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_AMORPHOUS}, \ .abilities = {ABILITY_STICKY_HOLD, ABILITY_STORM_DRAIN, ABILITY_SAND_FORCE},\ @@ -191,7 +191,7 @@ .evYield_HP = 2, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_AMORPHOUS}, \ .abilities = {ABILITY_STICKY_HOLD, ABILITY_STORM_DRAIN, ABILITY_SAND_FORCE},\ @@ -214,7 +214,7 @@ .evYield_SpAttack = 1, \ .genderRatio = MON_GENDERLESS, \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, \ .abilities = {ABILITY_LEVITATE, ABILITY_NONE},\ @@ -259,7 +259,7 @@ .evYield_Speed = 1, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, \ .abilities = {ABILITY_CHLOROPHYLL, ABILITY_SAP_SIPPER, ABILITY_SERENE_GRACE},\ @@ -281,7 +281,7 @@ .evYield_Attack = 2, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, \ .abilities = {ABILITY_CHLOROPHYLL, ABILITY_SAP_SIPPER, ABILITY_SERENE_GRACE},\ @@ -330,7 +330,7 @@ .evYield_SpAttack = 1, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 15, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, \ .abilities = {ABILITY_SHIELD_DUST, ABILITY_COMPOUND_EYES, ABILITY_FRIEND_GUARD},\ @@ -352,7 +352,7 @@ .evYield_SpDefense = 1, \ .genderRatio = MON_FEMALE, \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, \ .abilities = {ABILITY_FLOWER_VEIL, ABILITY_NONE, ABILITY_SYMBIOSIS},\ @@ -374,7 +374,7 @@ .evYield_SpDefense = 2, \ .genderRatio = MON_FEMALE, \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, \ .abilities = {ABILITY_FLOWER_VEIL, ABILITY_NONE, ABILITY_SYMBIOSIS},\ @@ -396,7 +396,7 @@ .evYield_SpDefense = 3, \ .genderRatio = MON_FEMALE, \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, \ .abilities = {ABILITY_FLOWER_VEIL, ABILITY_NONE, ABILITY_SYMBIOSIS},\ @@ -418,7 +418,7 @@ .evYield_Speed = 1, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, \ .abilities = {ABILITY_FUR_COAT, ABILITY_NONE},\ @@ -433,7 +433,7 @@ .evYield_Defense = 1, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, \ .abilities = {ABILITY_PICKUP, ABILITY_FRISK, ABILITY_INSOMNIA},\ @@ -447,7 +447,7 @@ .evYield_Defense = 2, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, \ .abilities = {ABILITY_PICKUP, ABILITY_FRISK, ABILITY_INSOMNIA},\ @@ -538,7 +538,7 @@ .itemRare = ITEM_HONEY, \ .genderRatio = PERCENT_FEMALE(75), \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, \ .abilities = {ABILITY_DANCER, ABILITY_NONE},\ @@ -560,7 +560,7 @@ .evYield_Attack = 1, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 15, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, \ .abilities = {ability1, ability2, hiddenAbility}, \ @@ -616,7 +616,7 @@ .itemRare = ITEM_STAR_PIECE, \ .genderRatio = MON_GENDERLESS, \ .eggCycles = 25, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_SLOW, \ .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, \ .abilities = {ABILITY_SHIELDS_DOWN, ABILITY_NONE}, \ @@ -651,7 +651,7 @@ .itemRare = ITEM_CHESTO_BERRY, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, \ .abilities = {ABILITY_DISGUISE, ABILITY_NONE},\ @@ -696,7 +696,7 @@ .evYield_SpDefense = 2, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FLYING}, \ .abilities = {ABILITY_GULP_MISSILE, ABILITY_NONE},\ @@ -718,7 +718,7 @@ .evYield_SpAttack = 2, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 25, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_SLOW, \ .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, \ .abilities = {ABILITY_PUNK_ROCK, ability2, ABILITY_TECHNICIAN},\ @@ -740,7 +740,7 @@ .evYield_SpAttack = 1, \ .genderRatio = MON_GENDERLESS, \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_AMORPHOUS}, \ .abilities = {ABILITY_WEAK_ARMOR, ABILITY_NONE, ABILITY_CURSED_BODY},\ @@ -762,7 +762,7 @@ .evYield_SpAttack = 2, \ .genderRatio = MON_GENDERLESS, \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_AMORPHOUS}, \ .abilities = {ABILITY_WEAK_ARMOR, ABILITY_NONE, ABILITY_CURSED_BODY},\ @@ -784,7 +784,7 @@ .evYield_SpDefense = 2, \ .genderRatio = MON_FEMALE, \ .eggCycles = 20, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_AMORPHOUS}, \ .abilities = {ABILITY_SWEET_VEIL, ABILITY_NONE, ABILITY_AROMA_VEIL},\ @@ -806,7 +806,7 @@ .evYield_Speed = 2, \ .genderRatio = PERCENT_FEMALE(50), \ .eggCycles = 10, \ - .friendship = 70, \ + .friendship = STANDARD_FRIENDSHIP, \ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, \ .abilities = {ABILITY_HUNGER_SWITCH, ABILITY_NONE},\ @@ -855,7 +855,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_CHLOROPHYLL}, @@ -878,7 +878,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_CHLOROPHYLL}, @@ -901,7 +901,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_CHLOROPHYLL}, @@ -923,7 +923,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_SOLAR_POWER}, @@ -946,7 +946,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_SOLAR_POWER}, @@ -968,7 +968,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_SOLAR_POWER}, @@ -990,7 +990,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_RAIN_DISH}, @@ -1013,7 +1013,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_RAIN_DISH}, @@ -1035,7 +1035,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_RAIN_DISH}, @@ -1057,7 +1057,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE, ABILITY_RUN_AWAY}, @@ -1079,7 +1079,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG }, .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, @@ -1107,7 +1107,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SILVER_POWDER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_COMPOUND_EYES, ABILITY_NONE, ABILITY_TINTED_LENS}, @@ -1129,7 +1129,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE, ABILITY_RUN_AWAY}, @@ -1151,7 +1151,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG }, .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, @@ -1179,7 +1179,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_NONE, ABILITY_SNIPER}, @@ -1201,7 +1201,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_TANGLED_FEET, ABILITY_BIG_PECKS}, @@ -1223,7 +1223,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_TANGLED_FEET, ABILITY_BIG_PECKS}, @@ -1249,7 +1249,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_TANGLED_FEET, ABILITY_BIG_PECKS}, @@ -1271,7 +1271,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RUN_AWAY, ABILITY_GUTS, ABILITY_HUSTLE}, @@ -1293,7 +1293,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RUN_AWAY, ABILITY_GUTS, ABILITY_HUSTLE}, @@ -1316,7 +1316,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SHARP_BEAK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE, ABILITY_SNIPER}, @@ -1339,7 +1339,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SHARP_BEAK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE, ABILITY_SNIPER}, @@ -1361,7 +1361,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_DRAGON}, .abilities = {ABILITY_INTIMIDATE, ABILITY_SHED_SKIN, ABILITY_UNNERVE}, @@ -1387,7 +1387,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_DRAGON}, .abilities = {ABILITY_INTIMIDATE, ABILITY_SHED_SKIN, ABILITY_UNNERVE}, @@ -1415,7 +1415,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, .abilities = {ABILITY_STATIC, ABILITY_NONE, ABILITY_LIGHTNING_ROD}, @@ -1438,7 +1438,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_GRIP_CLAW, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE, ABILITY_SAND_RUSH}, @@ -1461,7 +1461,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_GRIP_CLAW, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE, ABILITY_SAND_RUSH}, @@ -1483,7 +1483,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, .abilities = {ABILITY_POISON_POINT, ABILITY_RIVALRY, ABILITY_HUSTLE}, @@ -1505,7 +1505,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_POISON_POINT, ABILITY_RIVALRY, ABILITY_HUSTLE}, @@ -1531,7 +1531,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 3, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_POISON_POINT, ABILITY_RIVALRY, ABILITY_SHEER_FORCE}, @@ -1553,7 +1553,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = MON_MALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, .abilities = {ABILITY_POISON_POINT, ABILITY_RIVALRY, ABILITY_HUSTLE}, @@ -1575,7 +1575,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = MON_MALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, .abilities = {ABILITY_POISON_POINT, ABILITY_RIVALRY, ABILITY_HUSTLE}, @@ -1601,7 +1601,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = MON_MALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, .abilities = {ABILITY_POISON_POINT, ABILITY_RIVALRY, ABILITY_SHEER_FORCE}, @@ -1682,7 +1682,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_CHARCOAL, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_FLASH_FIRE, ABILITY_NONE, ABILITY_DROUGHT}, @@ -1706,7 +1706,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_CHARCOAL, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_FLASH_FIRE, ABILITY_NONE, ABILITY_DROUGHT}, @@ -1733,7 +1733,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MOON_STONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, .abilities = {ABILITY_CUTE_CHARM, ABILITY_COMPETITIVE, ABILITY_FRIEND_GUARD}, @@ -1764,7 +1764,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MOON_STONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, .abilities = {ABILITY_CUTE_CHARM, ABILITY_COMPETITIVE, ABILITY_FRISK}, @@ -1786,7 +1786,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE, ABILITY_INFILTRATOR}, @@ -1808,7 +1808,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE, ABILITY_INFILTRATOR}, @@ -1831,7 +1831,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ABSORB_BULB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE, ABILITY_RUN_AWAY}, @@ -1854,7 +1854,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ABSORB_BULB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE, ABILITY_STENCH}, @@ -1881,7 +1881,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ABSORB_BULB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE, ABILITY_EFFECT_SPORE}, @@ -1905,7 +1905,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BIG_MUSHROOM, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_GRASS}, .abilities = {ABILITY_EFFECT_SPORE, ABILITY_DRY_SKIN, ABILITY_DAMP}, @@ -1930,7 +1930,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BIG_MUSHROOM, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_GRASS}, .abilities = {ABILITY_EFFECT_SPORE, ABILITY_DRY_SKIN, ABILITY_DAMP}, @@ -1952,7 +1952,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_COMPOUND_EYES, ABILITY_TINTED_LENS, ABILITY_RUN_AWAY}, @@ -1976,7 +1976,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SHED_SHELL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SHIELD_DUST, ABILITY_TINTED_LENS, ABILITY_WONDER_SKIN}, @@ -1999,7 +1999,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SOFT_SAND, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SAND_VEIL, ABILITY_ARENA_TRAP, ABILITY_SAND_FORCE}, @@ -2026,7 +2026,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SOFT_SAND, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SAND_VEIL, ABILITY_ARENA_TRAP, ABILITY_SAND_FORCE}, @@ -2049,7 +2049,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_QUICK_CLAW, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_PICKUP, ABILITY_TECHNICIAN, ABILITY_UNNERVE}, @@ -2072,7 +2072,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_QUICK_CLAW, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_LIMBER, ABILITY_TECHNICIAN, ABILITY_UNNERVE}, @@ -2094,7 +2094,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_DAMP, ABILITY_CLOUD_NINE, ABILITY_SWIFT_SWIM}, @@ -2116,7 +2116,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_DAMP, ABILITY_CLOUD_NINE, ABILITY_SWIFT_SWIM}, @@ -2138,7 +2138,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_ANGER_POINT, ABILITY_DEFIANT}, @@ -2160,7 +2160,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_ANGER_POINT, ABILITY_DEFIANT}, @@ -2182,7 +2182,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INTIMIDATE, ABILITY_FLASH_FIRE, ABILITY_JUSTIFIED}, @@ -2204,7 +2204,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INTIMIDATE, ABILITY_FLASH_FIRE, ABILITY_JUSTIFIED}, @@ -2226,7 +2226,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP, ABILITY_SWIFT_SWIM}, @@ -2249,7 +2249,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_KINGS_ROCK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP, ABILITY_SWIFT_SWIM}, @@ -2276,7 +2276,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_KINGS_ROCK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP, ABILITY_SWIFT_SWIM}, @@ -2299,7 +2299,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_TWISTED_SPOON, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS, ABILITY_MAGIC_GUARD}, @@ -2322,7 +2322,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_TWISTED_SPOON, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS, ABILITY_MAGIC_GUARD}, @@ -2349,7 +2349,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_TWISTED_SPOON, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS, ABILITY_MAGIC_GUARD}, @@ -2372,7 +2372,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_FOCUS_BAND, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_GUTS, ABILITY_NO_GUARD, ABILITY_STEADFAST}, @@ -2395,7 +2395,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_FOCUS_BAND, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_GUTS, ABILITY_NO_GUARD, ABILITY_STEADFAST}, @@ -2418,7 +2418,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_FOCUS_BAND, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_GUTS, ABILITY_NO_GUARD, ABILITY_STEADFAST}, @@ -2440,7 +2440,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE, ABILITY_GLUTTONY}, @@ -2462,7 +2462,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE, ABILITY_GLUTTONY}, @@ -2488,7 +2488,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE, ABILITY_GLUTTONY}, @@ -2511,7 +2511,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_CLEAR_BODY, ABILITY_LIQUID_OOZE, ABILITY_RAIN_DISH}, @@ -2534,7 +2534,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_CLEAR_BODY, ABILITY_LIQUID_OOZE, ABILITY_RAIN_DISH}, @@ -2557,7 +2557,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_EVERSTONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY, ABILITY_SAND_VEIL}, @@ -2580,7 +2580,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_EVERSTONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY, ABILITY_SAND_VEIL}, @@ -2607,7 +2607,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_EVERSTONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY, ABILITY_SAND_VEIL}, @@ -2629,7 +2629,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RUN_AWAY, ABILITY_FLASH_FIRE, ABILITY_FLAME_BODY}, @@ -2651,7 +2651,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RUN_AWAY, ABILITY_FLASH_FIRE, ABILITY_FLAME_BODY}, @@ -2674,7 +2674,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LAGGING_TAIL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO, ABILITY_REGENERATOR}, @@ -2697,7 +2697,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_KINGS_ROCK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO, ABILITY_REGENERATOR}, @@ -2720,7 +2720,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_METAL_COAT, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_MAGNET_PULL, ABILITY_STURDY, ABILITY_ANALYTIC}, @@ -2743,7 +2743,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_METAL_COAT, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_MAGNET_PULL, ABILITY_STURDY, ABILITY_ANALYTIC}, @@ -2770,7 +2770,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LEEK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FIELD}, .abilities = {ABILITY_KEEN_EYE, ABILITY_INNER_FOCUS, ABILITY_DEFIANT}, @@ -2793,7 +2793,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SHARP_BEAK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_RUN_AWAY, ABILITY_EARLY_BIRD, ABILITY_TANGLED_FEET}, @@ -2820,7 +2820,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SHARP_BEAK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_RUN_AWAY, ABILITY_EARLY_BIRD, ABILITY_TANGLED_FEET}, @@ -2842,7 +2842,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_THICK_FAT, ABILITY_HYDRATION, ABILITY_ICE_BODY}, @@ -2864,7 +2864,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_THICK_FAT, ABILITY_HYDRATION, ABILITY_ICE_BODY}, @@ -2887,7 +2887,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BLACK_SLUDGE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_STENCH, ABILITY_STICKY_HOLD, ABILITY_POISON_TOUCH}, @@ -2911,7 +2911,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemCommon = ITEM_BLACK_SLUDGE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_STENCH, ABILITY_STICKY_HOLD, ABILITY_POISON_TOUCH}, @@ -2935,7 +2935,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BIG_PEARL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_SHELL_ARMOR, ABILITY_SKILL_LINK, ABILITY_OVERCOAT}, @@ -2959,7 +2959,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BIG_PEARL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_SHELL_ARMOR, ABILITY_SKILL_LINK, ABILITY_OVERCOAT}, @@ -2981,7 +2981,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS }, .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, @@ -3003,7 +3003,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS }, .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, @@ -3025,7 +3025,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, #if P_UPDATED_ABILITIES >= GEN_7 @@ -3051,7 +3051,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY, ABILITY_WEAK_ARMOR}, @@ -3073,7 +3073,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_INSOMNIA, ABILITY_FOREWARN, ABILITY_INNER_FOCUS}, @@ -3095,7 +3095,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_INSOMNIA, ABILITY_FOREWARN, ABILITY_INNER_FOCUS}, @@ -3117,7 +3117,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR, ABILITY_SHEER_FORCE}, @@ -3139,7 +3139,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR, ABILITY_SHEER_FORCE}, @@ -3161,7 +3161,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_SOUNDPROOF, ABILITY_STATIC, ABILITY_AFTERMATH}, @@ -3187,7 +3187,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_SOUNDPROOF, ABILITY_STATIC, ABILITY_AFTERMATH}, @@ -3210,7 +3210,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_PSYCHIC_SEED, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE, ABILITY_HARVEST}, @@ -3236,7 +3236,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE, ABILITY_HARVEST}, @@ -3259,7 +3259,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_THICK_CLUB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, .abilities = {ABILITY_ROCK_HEAD, ABILITY_LIGHTNING_ROD, ABILITY_BATTLE_ARMOR}, @@ -3282,7 +3282,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_THICK_CLUB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, .abilities = {ABILITY_ROCK_HEAD, ABILITY_LIGHTNING_ROD, ABILITY_BATTLE_ARMOR}, @@ -3304,7 +3304,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = MON_MALE, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_LIMBER, ABILITY_RECKLESS, ABILITY_UNBURDEN}, @@ -3326,7 +3326,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = MON_MALE, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_KEEN_EYE, ABILITY_IRON_FIST, ABILITY_INNER_FOCUS}, @@ -3349,7 +3349,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LAGGING_TAIL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, .abilities = {ABILITY_OWN_TEMPO, ABILITY_OBLIVIOUS, ABILITY_CLOUD_NINE}, @@ -3372,7 +3372,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SMOKE_BALL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_LEVITATE, ABILITY_NEUTRALIZING_GAS, ABILITY_STENCH}, @@ -3395,7 +3395,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SMOKE_BALL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_LEVITATE, ABILITY_NEUTRALIZING_GAS, ABILITY_STENCH}, @@ -3417,7 +3417,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_ROCK_HEAD, ABILITY_RECKLESS}, @@ -3439,7 +3439,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_ROCK_HEAD, ABILITY_RECKLESS}, @@ -3484,7 +3484,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_LEAF_GUARD, ABILITY_REGENERATOR}, @@ -3506,7 +3506,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, .abilities = {ABILITY_EARLY_BIRD, ABILITY_SCRAPPY, ABILITY_INNER_FOCUS}, @@ -3529,7 +3529,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_DRAGON_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_SNIPER, ABILITY_DAMP}, @@ -3553,7 +3553,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_DRAGON_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, .abilities = {ABILITY_POISON_POINT, ABILITY_SNIPER, ABILITY_DAMP}, @@ -3576,7 +3576,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MYSTIC_WATER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_WATER_VEIL, ABILITY_LIGHTNING_ROD}, @@ -3599,7 +3599,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MYSTIC_WATER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_WATER_VEIL, ABILITY_LIGHTNING_ROD}, @@ -3623,7 +3623,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_STAR_PIECE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_ILLUMINATE, ABILITY_NATURAL_CURE, ABILITY_ANALYTIC}, @@ -3647,7 +3647,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_STAR_PIECE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_ILLUMINATE, ABILITY_NATURAL_CURE, ABILITY_ANALYTIC}, @@ -3673,7 +3673,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_SOUNDPROOF, ABILITY_FILTER, ABILITY_TECHNICIAN}, @@ -3695,7 +3695,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_TECHNICIAN, ABILITY_STEADFAST}, @@ -3717,7 +3717,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = MON_FEMALE, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_OBLIVIOUS, ABILITY_FOREWARN, ABILITY_DRY_SKIN}, @@ -3740,7 +3740,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ELECTIRIZER, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_STATIC, ABILITY_NONE, ABILITY_VITAL_SPIRIT}, @@ -3763,7 +3763,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MAGMARIZER, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_FLAME_BODY, ABILITY_NONE, ABILITY_VITAL_SPIRIT}, @@ -3785,7 +3785,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_HYPER_CUTTER, ABILITY_MOLD_BREAKER, ABILITY_MOXIE}, @@ -3808,7 +3808,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = MON_MALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INTIMIDATE, ABILITY_ANGER_POINT, ABILITY_SHEER_FORCE}, @@ -3830,7 +3830,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 5, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_DRAGON}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE, ABILITY_RATTLED}, @@ -3852,7 +3852,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 5, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_DRAGON}, .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE, ABILITY_MOXIE}, @@ -3876,7 +3876,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MYSTIC_WATER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_WATER_ABSORB, ABILITY_SHELL_ARMOR, ABILITY_HYDRATION}, @@ -3900,7 +3900,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_METAL_POWDER, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_DITTO, EGG_GROUP_DITTO}, .abilities = {ABILITY_LIMBER, ABILITY_NONE, ABILITY_IMPOSTER}, @@ -3922,7 +3922,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RUN_AWAY, ABILITY_ADAPTABILITY, ABILITY_ANTICIPATION}, @@ -3945,7 +3945,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_WATER_ABSORB, ABILITY_WATER_ABSORB, ABILITY_HYDRATION}, @@ -3967,7 +3967,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_VOLT_ABSORB, ABILITY_VOLT_ABSORB, ABILITY_QUICK_FEET}, @@ -3989,7 +3989,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_FLASH_FIRE, ABILITY_FLASH_FIRE, ABILITY_GUTS}, @@ -4011,7 +4011,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_TRACE, ABILITY_DOWNLOAD, ABILITY_ANALYTIC}, @@ -4033,7 +4033,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_SHELL_ARMOR, ABILITY_WEAK_ARMOR}, @@ -4055,7 +4055,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_SHELL_ARMOR, ABILITY_WEAK_ARMOR}, @@ -4077,7 +4077,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_BATTLE_ARMOR, ABILITY_WEAK_ARMOR}, @@ -4099,7 +4099,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_BATTLE_ARMOR, ABILITY_WEAK_ARMOR}, @@ -4121,7 +4121,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_ROCK_HEAD, ABILITY_PRESSURE, ABILITY_UNNERVE}, @@ -4145,7 +4145,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LEFTOVERS, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, .abilities = {ABILITY_IMMUNITY, ABILITY_THICK_FAT, ABILITY_GLUTTONY}, @@ -4357,7 +4357,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_LEAF_GUARD}, @@ -4380,7 +4380,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_LEAF_GUARD}, @@ -4403,7 +4403,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_LEAF_GUARD}, @@ -4425,7 +4425,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_FLASH_FIRE}, @@ -4448,7 +4448,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_FLASH_FIRE}, @@ -4470,7 +4470,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_FLASH_FIRE}, @@ -4492,7 +4492,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_SHEER_FORCE}, @@ -4515,7 +4515,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_SHEER_FORCE}, @@ -4538,7 +4538,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_SHEER_FORCE}, @@ -4560,7 +4560,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RUN_AWAY, ABILITY_KEEN_EYE, ABILITY_FRISK}, @@ -4582,7 +4582,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RUN_AWAY, ABILITY_KEEN_EYE, ABILITY_FRISK}, @@ -4604,7 +4604,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_INSOMNIA, ABILITY_KEEN_EYE, ABILITY_TINTED_LENS}, @@ -4630,7 +4630,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_INSOMNIA, ABILITY_KEEN_EYE, ABILITY_TINTED_LENS}, @@ -4652,7 +4652,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_EARLY_BIRD, ABILITY_RATTLED}, @@ -4674,7 +4674,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_EARLY_BIRD, ABILITY_IRON_FIST}, @@ -4696,7 +4696,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_INSOMNIA, ABILITY_SNIPER}, @@ -4722,7 +4722,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_INSOMNIA, ABILITY_SNIPER}, @@ -4744,7 +4744,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE, ABILITY_INFILTRATOR}, @@ -4767,7 +4767,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_DEEP_SEA_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_VOLT_ABSORB, ABILITY_ILLUMINATE, ABILITY_WATER_ABSORB}, @@ -4790,7 +4790,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_DEEP_SEA_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_VOLT_ABSORB, ABILITY_ILLUMINATE, ABILITY_WATER_ABSORB}, @@ -4845,7 +4845,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_CUTE_CHARM, ABILITY_COMPETITIVE, ABILITY_FRIEND_GUARD}, @@ -4871,7 +4871,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 10, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_HUSTLE, ABILITY_SERENE_GRACE, ABILITY_SUPER_LUCK}, @@ -4897,7 +4897,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 10, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FAIRY}, .abilities = {ABILITY_HUSTLE, ABILITY_SERENE_GRACE, ABILITY_SUPER_LUCK}, @@ -4919,7 +4919,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_SYNCHRONIZE, ABILITY_EARLY_BIRD, ABILITY_MAGIC_BOUNCE}, @@ -4942,7 +4942,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_SYNCHRONIZE, ABILITY_EARLY_BIRD, ABILITY_MAGIC_BOUNCE}, @@ -4964,7 +4964,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, .abilities = {ABILITY_STATIC, ABILITY_NONE, ABILITY_PLUS}, @@ -4986,7 +4986,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, .abilities = {ABILITY_STATIC, ABILITY_NONE, ABILITY_PLUS}, @@ -5012,7 +5012,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, .abilities = {ABILITY_STATIC, ABILITY_NONE, ABILITY_PLUS}, @@ -5039,7 +5039,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ABSORB_BULB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE, ABILITY_HEALER}, @@ -5065,7 +5065,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FAIRY}, .abilities = {ABILITY_THICK_FAT, ABILITY_HUGE_POWER, ABILITY_SAP_SIPPER}, @@ -5095,7 +5095,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FAIRY}, .abilities = {ABILITY_THICK_FAT, ABILITY_HUGE_POWER, ABILITY_SAP_SIPPER}, @@ -5117,7 +5117,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STURDY, ABILITY_ROCK_HEAD, ABILITY_RATTLED}, @@ -5140,7 +5140,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_KINGS_ROCK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP, ABILITY_DRIZZLE}, @@ -5162,7 +5162,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_LEAF_GUARD, ABILITY_INFILTRATOR}, @@ -5184,7 +5184,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_LEAF_GUARD, ABILITY_INFILTRATOR}, @@ -5210,7 +5210,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_LEAF_GUARD, ABILITY_INFILTRATOR}, @@ -5232,7 +5232,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RUN_AWAY, ABILITY_PICKUP, ABILITY_SKILL_LINK}, @@ -5254,7 +5254,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_SOLAR_POWER, ABILITY_EARLY_BIRD}, @@ -5276,7 +5276,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_SOLAR_POWER, ABILITY_EARLY_BIRD}, @@ -5299,7 +5299,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_WIDE_LENS, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SPEED_BOOST, ABILITY_COMPOUND_EYES, ABILITY_FRISK}, @@ -5321,7 +5321,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_DAMP, ABILITY_WATER_ABSORB, ABILITY_UNAWARE}, @@ -5343,7 +5343,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_DAMP, ABILITY_WATER_ABSORB, ABILITY_UNAWARE}, @@ -5365,7 +5365,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SYNCHRONIZE, ABILITY_SYNCHRONIZE, ABILITY_MAGIC_BOUNCE}, @@ -5432,7 +5432,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_KINGS_ROCK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO, ABILITY_REGENERATOR}, @@ -5478,7 +5478,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_SHADOW_TAG, ABILITY_NONE, ABILITY_TELEPATHY}, @@ -5500,7 +5500,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INNER_FOCUS, ABILITY_EARLY_BIRD, ABILITY_SAP_SIPPER}, @@ -5522,7 +5522,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_STURDY, ABILITY_NONE, ABILITY_OVERCOAT}, @@ -5544,7 +5544,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_STURDY, ABILITY_NONE, ABILITY_OVERCOAT}, @@ -5566,7 +5566,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SERENE_GRACE, ABILITY_RUN_AWAY, ABILITY_RATTLED}, @@ -5588,7 +5588,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SAND_VEIL, ABILITY_IMMUNITY}, @@ -5611,7 +5611,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_METAL_COAT, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY, ABILITY_SHEER_FORCE}, @@ -5637,7 +5637,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, .abilities = {ABILITY_INTIMIDATE, ABILITY_RUN_AWAY, ABILITY_RATTLED}, @@ -5663,7 +5663,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, .abilities = {ABILITY_INTIMIDATE, ABILITY_QUICK_FEET, ABILITY_RATTLED}, @@ -5690,7 +5690,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_POISON_POINT, ABILITY_SWIFT_SWIM, ABILITY_INTIMIDATE}, @@ -5712,7 +5712,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_TECHNICIAN, ABILITY_LIGHT_METAL}, @@ -5737,7 +5737,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BERRY_JUICE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_STURDY, ABILITY_GLUTTONY, ABILITY_CONTRARY}, @@ -5759,7 +5759,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_GUTS, ABILITY_MOXIE}, @@ -5804,7 +5804,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_PICKUP, ABILITY_QUICK_FEET, ABILITY_HONEY_GATHER}, @@ -5826,7 +5826,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_GUTS, ABILITY_QUICK_FEET, ABILITY_UNNERVE}, @@ -5848,7 +5848,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_MAGMA_ARMOR, ABILITY_FLAME_BODY, ABILITY_WEAK_ARMOR}, @@ -5875,7 +5875,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_MAGMA_ARMOR, ABILITY_FLAME_BODY, ABILITY_WEAK_ARMOR}, @@ -5897,7 +5897,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_OBLIVIOUS, ABILITY_SNOW_CLOAK, ABILITY_THICK_FAT}, @@ -5920,7 +5920,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_OBLIVIOUS, ABILITY_SNOW_CLOAK, ABILITY_THICK_FAT}, @@ -5950,7 +5950,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LUMINOUS_MOSS, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, .abilities = {ABILITY_HUSTLE, ABILITY_NATURAL_CURE, ABILITY_REGENERATOR}, @@ -5972,7 +5972,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_2}, .abilities = {ABILITY_HUSTLE, ABILITY_SNIPER, ABILITY_MOODY}, @@ -5995,7 +5995,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_2}, .abilities = {ABILITY_SUCTION_CUPS, ABILITY_SNIPER, ABILITY_MOODY}, @@ -6017,7 +6017,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_HUSTLE, ABILITY_INSOMNIA}, @@ -6043,7 +6043,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_WATER_ABSORB, ABILITY_WATER_VEIL}, @@ -6066,7 +6066,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_METAL_COAT, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_STURDY, ABILITY_WEAK_ARMOR}, @@ -6135,7 +6135,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_DRAGON_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_SNIPER, ABILITY_DAMP}, @@ -6157,7 +6157,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_PICKUP, ABILITY_NONE, ABILITY_SAND_VEIL}, @@ -6180,7 +6180,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_STURDY, ABILITY_NONE, ABILITY_SAND_VEIL}, @@ -6202,7 +6202,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_TRACE, ABILITY_DOWNLOAD, ABILITY_ANALYTIC}, @@ -6224,7 +6224,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INTIMIDATE, ABILITY_FRISK, ABILITY_SAP_SIPPER}, @@ -6246,7 +6246,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_OWN_TEMPO, ABILITY_TECHNICIAN, ABILITY_MOODY}, @@ -6268,7 +6268,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = MON_MALE, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_GUTS, ABILITY_STEADFAST, ABILITY_VITAL_SPIRIT}, @@ -6290,7 +6290,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = MON_MALE, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_INTIMIDATE, ABILITY_TECHNICIAN, ABILITY_STEADFAST}, @@ -6312,7 +6312,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = MON_FEMALE, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_OBLIVIOUS, ABILITY_FOREWARN, ABILITY_HYDRATION}, @@ -6335,7 +6335,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ELECTIRIZER, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_STATIC, ABILITY_NONE, ABILITY_VITAL_SPIRIT}, @@ -6358,7 +6358,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MAGMARIZER, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_FLAME_BODY, ABILITY_NONE, ABILITY_VITAL_SPIRIT}, @@ -6382,7 +6382,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MOOMOO_MILK, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_THICK_FAT, ABILITY_SCRAPPY, ABILITY_SAP_SIPPER}, @@ -6650,7 +6650,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_UNBURDEN}, @@ -6672,7 +6672,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_UNBURDEN}, @@ -6694,7 +6694,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_UNBURDEN}, @@ -6716,7 +6716,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_SPEED_BOOST}, @@ -6739,7 +6739,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_SPEED_BOOST}, @@ -6761,7 +6761,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_SPEED_BOOST}, @@ -6783,7 +6783,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_DAMP}, @@ -6805,7 +6805,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_DAMP}, @@ -6827,7 +6827,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_DAMP}, @@ -6849,7 +6849,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RUN_AWAY, ABILITY_QUICK_FEET, ABILITY_RATTLED}, @@ -6871,7 +6871,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INTIMIDATE, ABILITY_QUICK_FEET, ABILITY_MOXIE}, @@ -6895,7 +6895,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_REVIVE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_PICKUP, ABILITY_GLUTTONY, ABILITY_QUICK_FEET}, @@ -6919,7 +6919,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MAX_REVIVE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_PICKUP, ABILITY_GLUTTONY, ABILITY_QUICK_FEET}, @@ -6943,7 +6943,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BRIGHT_POWDER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE, ABILITY_RUN_AWAY}, @@ -6965,7 +6965,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG }, .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, @@ -6992,7 +6992,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SHED_SHELL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_NONE, ABILITY_RIVALRY}, @@ -7014,7 +7014,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG }, .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, @@ -7037,7 +7037,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SHED_SHELL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE, ABILITY_COMPOUND_EYES}, @@ -7060,7 +7060,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MENTAL_HERB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_GRASS}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH, ABILITY_OWN_TEMPO}, @@ -7083,7 +7083,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MENTAL_HERB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_GRASS}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH, ABILITY_OWN_TEMPO}, @@ -7106,7 +7106,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MENTAL_HERB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_GRASS}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH, ABILITY_OWN_TEMPO}, @@ -7129,7 +7129,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POWER_HERB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD, ABILITY_PICKPOCKET}, @@ -7152,7 +7152,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POWER_HERB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD, ABILITY_PICKPOCKET}, @@ -7175,7 +7175,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POWER_HERB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD, ABILITY_PICKPOCKET}, @@ -7197,7 +7197,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_GUTS, ABILITY_NONE, ABILITY_SCRAPPY}, @@ -7223,7 +7223,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_GUTS, ABILITY_NONE, ABILITY_SCRAPPY}, @@ -7246,7 +7246,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemCommon = ITEM_PRETTY_FEATHER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_HYDRATION, ABILITY_RAIN_DISH}, @@ -7273,7 +7273,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemCommon = ITEM_PRETTY_FEATHER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_DRIZZLE, ABILITY_RAIN_DISH}, @@ -7386,7 +7386,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemCommon = ITEM_HONEY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_BUG}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE, ABILITY_RAIN_DISH}, @@ -7415,7 +7415,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SILVER_POWDER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_BUG}, .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE, ABILITY_UNNERVE}, @@ -7439,7 +7439,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BIG_MUSHROOM, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FLUCTUATING, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, .abilities = {ABILITY_EFFECT_SPORE, ABILITY_POISON_HEAL, ABILITY_QUICK_FEET}, @@ -7463,7 +7463,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BIG_MUSHROOM, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FLUCTUATING, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, .abilities = {ABILITY_EFFECT_SPORE, ABILITY_POISON_HEAL, ABILITY_TECHNICIAN}, @@ -7485,7 +7485,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD }, .abilities = {ABILITY_TRUANT, ABILITY_NONE}, @@ -7507,7 +7507,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD }, .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_NONE}, @@ -7529,7 +7529,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD }, .abilities = {ABILITY_TRUANT, ABILITY_NONE}, @@ -7552,7 +7552,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SOFT_SAND, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_COMPOUND_EYES, ABILITY_NONE, ABILITY_RUN_AWAY}, @@ -7574,7 +7574,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SPEED_BOOST, ABILITY_NONE, ABILITY_INFILTRATOR}, @@ -7596,7 +7596,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = MON_GENDERLESS, .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_WONDER_GUARD, ABILITY_NONE}, @@ -7618,7 +7618,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, .abilities = {ABILITY_SOUNDPROOF, ABILITY_NONE, ABILITY_RATTLED}, @@ -7640,7 +7640,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, .abilities = {ABILITY_SOUNDPROOF, ABILITY_NONE, ABILITY_SCRAPPY}, @@ -7666,7 +7666,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, .abilities = {ABILITY_SOUNDPROOF, ABILITY_NONE, ABILITY_SCRAPPY}, @@ -7689,7 +7689,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BLACK_BELT, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FLUCTUATING, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_THICK_FAT, ABILITY_GUTS, ABILITY_SHEER_FORCE}, @@ -7712,7 +7712,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_KINGS_ROCK, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FLUCTUATING, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_THICK_FAT, ABILITY_GUTS, ABILITY_SHEER_FORCE}, @@ -7738,7 +7738,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_THICK_FAT, ABILITY_HUGE_POWER, ABILITY_SAP_SIPPER}, @@ -7761,7 +7761,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MAGNET, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STURDY, ABILITY_MAGNET_PULL, ABILITY_SAND_FORCE}, @@ -7783,7 +7783,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, .abilities = {ABILITY_CUTE_CHARM, ABILITY_NORMALIZE, ABILITY_WONDER_SKIN}, @@ -7810,7 +7810,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, .abilities = {ABILITY_CUTE_CHARM, ABILITY_NORMALIZE, ABILITY_WONDER_SKIN}, @@ -7862,7 +7862,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_IRON_BALL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, .abilities = {ABILITY_HYPER_CUTTER, ABILITY_INTIMIDATE, ABILITY_SHEER_FORCE}, @@ -7953,7 +7953,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_PURE_POWER, ABILITY_NONE, ABILITY_TELEPATHY}, @@ -7975,7 +7975,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_PURE_POWER, ABILITY_NONE, ABILITY_TELEPATHY}, @@ -7997,7 +7997,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_STATIC, ABILITY_LIGHTNING_ROD, ABILITY_MINUS}, @@ -8019,7 +8019,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_STATIC, ABILITY_LIGHTNING_ROD, ABILITY_MINUS}, @@ -8042,7 +8042,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_CELL_BATTERY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, .abilities = {ABILITY_PLUS, ABILITY_NONE, ABILITY_LIGHTNING_ROD}, @@ -8065,7 +8065,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_CELL_BATTERY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, .abilities = {ABILITY_MINUS, ABILITY_NONE, ABILITY_VOLT_ABSORB}, @@ -8093,7 +8093,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BRIGHT_POWDER, .genderRatio = MON_MALE, .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_ILLUMINATE, ABILITY_SWARM, ABILITY_PRANKSTER}, @@ -8121,7 +8121,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BRIGHT_POWDER, .genderRatio = MON_FEMALE, .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FLUCTUATING, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_OBLIVIOUS, ABILITY_TINTED_LENS, ABILITY_PRANKSTER}, @@ -8144,7 +8144,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, .abilities = {ABILITY_NATURAL_CURE, ABILITY_POISON_POINT, ABILITY_LEAF_GUARD}, @@ -8168,7 +8168,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FLUCTUATING, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_LIQUID_OOZE, ABILITY_STICKY_HOLD, ABILITY_GLUTTONY}, @@ -8192,7 +8192,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FLUCTUATING, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_LIQUID_OOZE, ABILITY_STICKY_HOLD, ABILITY_GLUTTONY}, @@ -8260,7 +8260,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FLUCTUATING, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_WATER_2}, .abilities = {ABILITY_WATER_VEIL, ABILITY_OBLIVIOUS, ABILITY_PRESSURE}, @@ -8282,7 +8282,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FLUCTUATING, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_WATER_2}, .abilities = {ABILITY_WATER_VEIL, ABILITY_OBLIVIOUS, ABILITY_PRESSURE}, @@ -8304,7 +8304,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_OBLIVIOUS, ABILITY_SIMPLE, ABILITY_OWN_TEMPO}, @@ -8327,7 +8327,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_MAGMA_ARMOR, ABILITY_SOLID_ROCK, ABILITY_ANGER_POINT}, @@ -8350,7 +8350,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_CHARCOAL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_WHITE_SMOKE, ABILITY_DROUGHT, ABILITY_SHELL_ARMOR}, @@ -8372,7 +8372,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_THICK_FAT, ABILITY_OWN_TEMPO, ABILITY_GLUTTONY}, @@ -8394,7 +8394,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_THICK_FAT, ABILITY_OWN_TEMPO, ABILITY_GLUTTONY}, @@ -8416,7 +8416,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_OWN_TEMPO, ABILITY_TANGLED_FEET, ABILITY_CONTRARY}, @@ -8439,7 +8439,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SOFT_SAND, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, #if P_UPDATED_EGG_GROUPS >= GEN_8 .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_DRAGON}, @@ -8466,7 +8466,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, #if P_UPDATED_EGG_GROUPS >= GEN_8 .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_DRAGON}, @@ -8493,7 +8493,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, #if P_UPDATED_EGG_GROUPS >= GEN_8 .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_DRAGON}, @@ -8566,7 +8566,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_DRAGON}, .abilities = {ABILITY_NATURAL_CURE, ABILITY_NONE, ABILITY_CLOUD_NINE}, @@ -8588,7 +8588,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_DRAGON}, .abilities = {ABILITY_NATURAL_CURE, ABILITY_NONE, ABILITY_CLOUD_NINE}, @@ -8611,7 +8611,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_QUICK_CLAW, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_IMMUNITY, ABILITY_NONE, ABILITY_TOXIC_BOOST}, @@ -8635,7 +8635,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SHED_SHELL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FLUCTUATING, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_DRAGON}, .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE, ABILITY_INFILTRATOR}, @@ -8663,7 +8663,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MOON_STONE, .genderRatio = MON_GENDERLESS, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, @@ -8691,7 +8691,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SUN_STONE, .genderRatio = MON_GENDERLESS, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, @@ -8713,7 +8713,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_OBLIVIOUS, ABILITY_ANTICIPATION, ABILITY_HYDRATION}, @@ -8735,7 +8735,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_OBLIVIOUS, ABILITY_ANTICIPATION, ABILITY_HYDRATION}, @@ -8757,7 +8757,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FLUCTUATING, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR, ABILITY_ADAPTABILITY}, @@ -8779,7 +8779,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FLUCTUATING, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR, ABILITY_ADAPTABILITY}, @@ -8802,7 +8802,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LIGHT_CLAY, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, @@ -8825,7 +8825,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LIGHT_CLAY, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, @@ -8848,7 +8848,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BIG_ROOT, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_SUCTION_CUPS, ABILITY_NONE, ABILITY_STORM_DRAIN}, @@ -8871,7 +8871,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BIG_ROOT, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_SUCTION_CUPS, ABILITY_NONE, ABILITY_STORM_DRAIN}, @@ -8893,7 +8893,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_BATTLE_ARMOR, ABILITY_NONE, ABILITY_SWIFT_SWIM}, @@ -8915,7 +8915,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_BATTLE_ARMOR, ABILITY_NONE, ABILITY_SWIFT_SWIM}, @@ -8937,7 +8937,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_OBLIVIOUS, ABILITY_ADAPTABILITY}, @@ -8959,7 +8959,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, .abilities = {ABILITY_MARVEL_SCALE, ABILITY_COMPETITIVE, ABILITY_CUTE_CHARM}, @@ -8983,7 +8983,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_COLOR_CHANGE, ABILITY_NONE, ABILITY_PROTEAN}, @@ -9098,7 +9098,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_SOLAR_POWER, ABILITY_HARVEST}, @@ -9128,7 +9128,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_CLEANSE_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, @@ -9172,7 +9172,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_SHADOW_TAG, ABILITY_NONE, ABILITY_TELEPATHY}, @@ -9195,7 +9195,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SNOWBALL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_MINERAL}, .abilities = {ABILITY_INNER_FOCUS, ABILITY_ICE_BODY, ABILITY_MOODY}, @@ -9217,7 +9217,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_MINERAL}, .abilities = {ABILITY_INNER_FOCUS, ABILITY_ICE_BODY, ABILITY_MOODY}, @@ -9239,7 +9239,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_THICK_FAT, ABILITY_ICE_BODY, ABILITY_OBLIVIOUS}, @@ -9261,7 +9261,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_THICK_FAT, ABILITY_ICE_BODY, ABILITY_OBLIVIOUS}, @@ -9283,7 +9283,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_THICK_FAT, ABILITY_ICE_BODY, ABILITY_OBLIVIOUS}, @@ -9307,7 +9307,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BIG_PEARL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_SHELL_ARMOR, ABILITY_NONE, ABILITY_RATTLED}, @@ -9331,7 +9331,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_DEEP_SEA_TOOTH, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE, ABILITY_WATER_VEIL}, @@ -9354,7 +9354,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_DEEP_SEA_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE, ABILITY_HYDRATION}, @@ -9378,7 +9378,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_DEEP_SEA_SCALE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_2}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_ROCK_HEAD, ABILITY_STURDY}, @@ -9401,7 +9401,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemCommon = ITEM_HEART_SCALE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE, ABILITY_HYDRATION}, @@ -9798,7 +9798,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_SHELL_ARMOR}, @@ -9821,7 +9821,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_SHELL_ARMOR}, @@ -9844,7 +9844,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_SHELL_ARMOR}, @@ -9866,7 +9866,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_IRON_FIST}, @@ -9889,7 +9889,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_IRON_FIST}, @@ -9913,7 +9913,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_IRON_FIST}, @@ -9935,7 +9935,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_DEFIANT}, @@ -9957,7 +9957,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_DEFIANT}, @@ -9979,7 +9979,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_DEFIANT}, @@ -10001,7 +10001,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE, ABILITY_RECKLESS}, @@ -10024,7 +10024,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE, ABILITY_RECKLESS}, @@ -10051,7 +10051,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE, ABILITY_RECKLESS}, @@ -10073,7 +10073,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_SIMPLE, ABILITY_UNAWARE, ABILITY_MOODY}, @@ -10096,7 +10096,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_SIMPLE, ABILITY_UNAWARE, ABILITY_MOODY}, @@ -10119,7 +10119,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_METRONOME, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE, ABILITY_RUN_AWAY}, @@ -10143,7 +10143,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_METRONOME, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_NONE, ABILITY_TECHNICIAN}, @@ -10166,7 +10166,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RIVALRY, ABILITY_INTIMIDATE, ABILITY_GUTS}, @@ -10211,7 +10211,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RIVALRY, ABILITY_INTIMIDATE, ABILITY_GUTS}, @@ -10234,7 +10234,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_NATURAL_CURE, ABILITY_POISON_POINT, ABILITY_LEAF_GUARD}, @@ -10261,7 +10261,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, .abilities = {ABILITY_NATURAL_CURE, ABILITY_POISON_POINT, ABILITY_TECHNICIAN}, @@ -10283,7 +10283,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, .abilities = {ABILITY_MOLD_BREAKER, ABILITY_NONE, ABILITY_SHEER_FORCE}, @@ -10305,7 +10305,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, .abilities = {ABILITY_MOLD_BREAKER, ABILITY_NONE, ABILITY_SHEER_FORCE}, @@ -10327,7 +10327,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, .abilities = {ABILITY_STURDY, ABILITY_NONE, ABILITY_SOUNDPROOF}, @@ -10349,7 +10349,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, .abilities = {ABILITY_STURDY, ABILITY_NONE, ABILITY_SOUNDPROOF}, @@ -10374,7 +10374,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SILVER_POWDER, .genderRatio = MON_FEMALE, .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_ANTICIPATION, ABILITY_NONE, ABILITY_OVERCOAT}, @@ -10398,7 +10398,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SILVER_POWDER, .genderRatio = MON_MALE, .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_NONE, ABILITY_TINTED_LENS}, @@ -10421,7 +10421,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_HONEY, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_HONEY_GATHER, ABILITY_NONE, ABILITY_HUSTLE}, @@ -10446,7 +10446,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = MON_FEMALE, .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_PRESSURE, ABILITY_NONE, ABILITY_UNNERVE}, @@ -10490,7 +10490,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE, ABILITY_WATER_VEIL}, @@ -10512,7 +10512,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE, ABILITY_WATER_VEIL}, @@ -10535,7 +10535,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MIRACLE_SEED, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, @@ -10585,7 +10585,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FLUCTUATING, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_AFTERMATH, ABILITY_UNBURDEN, ABILITY_FLARE_BOOST}, @@ -10607,7 +10607,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FLUCTUATING, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_AFTERMATH, ABILITY_UNBURDEN, ABILITY_FLARE_BOOST}, @@ -10718,7 +10718,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_LIMBER, ABILITY_OWN_TEMPO, ABILITY_KEEN_EYE}, @@ -10740,7 +10740,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_THICK_FAT, ABILITY_OWN_TEMPO, ABILITY_DEFIANT}, @@ -10763,7 +10763,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_CLEANSE_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, @@ -10785,7 +10785,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_STENCH, ABILITY_AFTERMATH, ABILITY_KEEN_EYE}, @@ -10807,7 +10807,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_STENCH, ABILITY_AFTERMATH, ABILITY_KEEN_EYE}, @@ -10830,7 +10830,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_METAL_COAT, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_LEVITATE, ABILITY_HEATPROOF, ABILITY_HEAVY_METAL}, @@ -10854,7 +10854,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_METAL_COAT, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_LEVITATE, ABILITY_HEATPROOF, ABILITY_HEAVY_METAL}, @@ -10876,7 +10876,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_STURDY, ABILITY_ROCK_HEAD, ABILITY_RATTLED}, @@ -10902,7 +10902,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_SOUNDPROOF, ABILITY_FILTER, ABILITY_TECHNICIAN}, @@ -10971,7 +10971,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_PRESSURE, ABILITY_NONE, ABILITY_INFILTRATOR}, @@ -10993,7 +10993,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE, ABILITY_ROUGH_SKIN}, @@ -11015,7 +11015,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE, ABILITY_ROUGH_SKIN}, @@ -11037,7 +11037,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE, ABILITY_ROUGH_SKIN}, @@ -11061,7 +11061,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LEFTOVERS, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_PICKUP, ABILITY_THICK_FAT, ABILITY_GLUTTONY}, @@ -11083,7 +11083,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_STEADFAST, ABILITY_INNER_FOCUS, ABILITY_PRANKSTER}, @@ -11106,7 +11106,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_STEADFAST, ABILITY_INNER_FOCUS, ABILITY_JUSTIFIED}, @@ -11128,7 +11128,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SAND_STREAM, ABILITY_NONE, ABILITY_SAND_FORCE}, @@ -11151,7 +11151,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SAND_STREAM, ABILITY_NONE, ABILITY_SAND_FORCE}, @@ -11175,7 +11175,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_WATER_3}, .abilities = {ABILITY_BATTLE_ARMOR, ABILITY_SNIPER, ABILITY_KEEN_EYE}, @@ -11198,7 +11198,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_WATER_3}, .abilities = {ABILITY_BATTLE_ARMOR, ABILITY_SNIPER, ABILITY_KEEN_EYE}, @@ -11244,7 +11244,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BLACK_SLUDGE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_ANTICIPATION, ABILITY_DRY_SKIN, ABILITY_POISON_TOUCH}, @@ -11266,7 +11266,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, @@ -11288,7 +11288,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_STORM_DRAIN, ABILITY_WATER_VEIL}, @@ -11310,7 +11310,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_STORM_DRAIN, ABILITY_WATER_VEIL}, @@ -11332,7 +11332,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_WATER_ABSORB, ABILITY_WATER_VEIL}, @@ -11355,7 +11355,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_NEVER_MELT_ICE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, .abilities = {ABILITY_SNOW_WARNING, ABILITY_NONE, ABILITY_SOUNDPROOF}, @@ -11379,7 +11379,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_NEVER_MELT_ICE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, .abilities = {ABILITY_SNOW_WARNING, ABILITY_NONE, ABILITY_SOUNDPROOF}, @@ -11426,7 +11426,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_METAL_COAT, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_MAGNET_PULL, ABILITY_STURDY, ABILITY_ANALYTIC}, @@ -11449,7 +11449,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LAGGING_TAIL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, .abilities = {ABILITY_OWN_TEMPO, ABILITY_OBLIVIOUS, ABILITY_CLOUD_NINE}, @@ -11471,7 +11471,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_SOLID_ROCK, ABILITY_RECKLESS}, @@ -11493,7 +11493,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_LEAF_GUARD, ABILITY_REGENERATOR}, @@ -11516,7 +11516,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ELECTIRIZER, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_MOTOR_DRIVE, ABILITY_NONE, ABILITY_VITAL_SPIRIT}, @@ -11539,7 +11539,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MAGMARIZER, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_FLAME_BODY, ABILITY_NONE, ABILITY_VITAL_SPIRIT}, @@ -11566,7 +11566,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 10, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FAIRY}, .abilities = {ABILITY_HUSTLE, ABILITY_SERENE_GRACE, ABILITY_SUPER_LUCK}, @@ -11589,7 +11589,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_WIDE_LENS, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SPEED_BOOST, ABILITY_TINTED_LENS, ABILITY_FRISK}, @@ -11655,7 +11655,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SAND_VEIL, ABILITY_POISON_HEAL}, @@ -11677,7 +11677,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_OBLIVIOUS, ABILITY_SNOW_CLOAK, ABILITY_THICK_FAT}, @@ -11699,7 +11699,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_ADAPTABILITY, ABILITY_DOWNLOAD, ABILITY_ANALYTIC}, @@ -11749,7 +11749,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MAGNET, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STURDY, ABILITY_MAGNET_PULL, ABILITY_SAND_FORCE}, @@ -11795,7 +11795,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_MINERAL}, .abilities = {ABILITY_SNOW_CLOAK, ABILITY_NONE, ABILITY_CURSED_BODY}, @@ -11818,7 +11818,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, @@ -12051,7 +12051,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = MON_GENDERLESS, .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FAIRY}, .abilities = {ABILITY_HYDRATION, ABILITY_NONE}, @@ -12074,7 +12074,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 3, .genderRatio = MON_GENDERLESS, .eggCycles = 10, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FAIRY}, .abilities = {ABILITY_HYDRATION, ABILITY_NONE}, @@ -12194,7 +12194,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_GRASS}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_CONTRARY}, @@ -12216,7 +12216,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_GRASS}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_CONTRARY}, @@ -12238,7 +12238,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_GRASS}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_CONTRARY}, @@ -12260,7 +12260,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_THICK_FAT}, @@ -12282,7 +12282,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_THICK_FAT}, @@ -12304,7 +12304,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_RECKLESS}, @@ -12326,7 +12326,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_SHELL_ARMOR}, @@ -12348,7 +12348,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_SHELL_ARMOR}, @@ -12370,7 +12370,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_SHELL_ARMOR}, @@ -12392,7 +12392,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RUN_AWAY, ABILITY_KEEN_EYE, ABILITY_ANALYTIC}, @@ -12414,7 +12414,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_ILLUMINATE, ABILITY_KEEN_EYE, ABILITY_ANALYTIC}, @@ -12436,7 +12436,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_PICKUP, ABILITY_RUN_AWAY}, @@ -12458,7 +12458,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INTIMIDATE, ABILITY_SAND_RUSH, ABILITY_SCRAPPY}, @@ -12484,7 +12484,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INTIMIDATE, ABILITY_SAND_RUSH, ABILITY_SCRAPPY}, @@ -12506,7 +12506,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_LIMBER, ABILITY_UNBURDEN, ABILITY_PRANKSTER}, @@ -12528,7 +12528,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_LIMBER, ABILITY_UNBURDEN, ABILITY_PRANKSTER}, @@ -12550,7 +12550,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_GLUTTONY, ABILITY_NONE, ABILITY_OVERGROW}, @@ -12572,7 +12572,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_GLUTTONY, ABILITY_NONE, ABILITY_OVERGROW}, @@ -12594,7 +12594,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_GLUTTONY, ABILITY_NONE, ABILITY_BLAZE}, @@ -12616,7 +12616,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_GLUTTONY, ABILITY_NONE, ABILITY_BLAZE}, @@ -12638,7 +12638,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_GLUTTONY, ABILITY_NONE, ABILITY_TORRENT}, @@ -12660,7 +12660,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_GLUTTONY, ABILITY_NONE, ABILITY_TORRENT}, @@ -12682,7 +12682,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_FOREWARN, ABILITY_SYNCHRONIZE, ABILITY_TELEPATHY}, @@ -12704,7 +12704,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_FOREWARN, ABILITY_SYNCHRONIZE, ABILITY_TELEPATHY}, @@ -12726,7 +12726,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_BIG_PECKS, ABILITY_SUPER_LUCK, ABILITY_RIVALRY}, @@ -12748,7 +12748,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_BIG_PECKS, ABILITY_SUPER_LUCK, ABILITY_RIVALRY}, @@ -12774,7 +12774,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_BIG_PECKS, ABILITY_SUPER_LUCK, ABILITY_RIVALRY}, @@ -12797,7 +12797,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_MOTOR_DRIVE, ABILITY_SAP_SIPPER}, @@ -12819,7 +12819,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_MOTOR_DRIVE, ABILITY_SAP_SIPPER}, @@ -12843,7 +12843,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STURDY, ABILITY_WEAK_ARMOR, ABILITY_SAND_FORCE}, @@ -12868,7 +12868,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STURDY, ABILITY_WEAK_ARMOR, ABILITY_SAND_FORCE}, @@ -12896,7 +12896,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STURDY, ABILITY_SAND_STREAM, ABILITY_SAND_FORCE}, @@ -12922,7 +12922,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FLYING}, .abilities = {ABILITY_UNAWARE, ABILITY_KLUTZ, ABILITY_SIMPLE}, @@ -12944,7 +12944,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FLYING}, .abilities = {ABILITY_UNAWARE, ABILITY_KLUTZ, ABILITY_SIMPLE}, @@ -12966,7 +12966,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SAND_RUSH, ABILITY_SAND_FORCE, ABILITY_MOLD_BREAKER}, @@ -12988,7 +12988,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SAND_RUSH, ABILITY_SAND_FORCE, ABILITY_MOLD_BREAKER}, @@ -13012,7 +13012,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, .abilities = {ABILITY_HEALER, ABILITY_REGENERATOR, ABILITY_KLUTZ}, @@ -13056,7 +13056,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_GUTS, ABILITY_SHEER_FORCE, ABILITY_IRON_FIST}, @@ -13078,7 +13078,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_GUTS, ABILITY_SHEER_FORCE, ABILITY_IRON_FIST}, @@ -13100,7 +13100,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_HYDRATION, ABILITY_WATER_ABSORB}, @@ -13122,7 +13122,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_HYDRATION, ABILITY_WATER_ABSORB}, @@ -13148,7 +13148,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_POISON_TOUCH, ABILITY_WATER_ABSORB}, @@ -13171,7 +13171,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BLACK_BELT, .genderRatio = MON_MALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_GUTS, ABILITY_INNER_FOCUS, ABILITY_MOLD_BREAKER}, @@ -13194,7 +13194,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BLACK_BELT, .genderRatio = MON_MALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_STURDY, ABILITY_INNER_FOCUS, ABILITY_MOLD_BREAKER}, @@ -13217,7 +13217,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MENTAL_HERB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_CHLOROPHYLL, ABILITY_OVERCOAT}, @@ -13240,7 +13240,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MENTAL_HERB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_LEAF_GUARD, ABILITY_CHLOROPHYLL, ABILITY_OVERCOAT}, @@ -13267,7 +13267,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MENTAL_HERB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_CHLOROPHYLL, ABILITY_OVERCOAT}, @@ -13290,7 +13290,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, #if P_UPDATED_ABILITIES >= GEN_6 @@ -13317,7 +13317,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, #if P_UPDATED_ABILITIES >= GEN_6 @@ -13348,7 +13348,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, #if P_UPDATED_ABILITIES >= GEN_6 @@ -13379,7 +13379,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ABSORB_BULB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_FAIRY}, .abilities = {ABILITY_PRANKSTER, ABILITY_INFILTRATOR, ABILITY_CHLOROPHYLL}, @@ -13406,7 +13406,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ABSORB_BULB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_FAIRY}, .abilities = {ABILITY_PRANKSTER, ABILITY_INFILTRATOR, ABILITY_CHLOROPHYLL}, @@ -13429,7 +13429,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ABSORB_BULB, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_OWN_TEMPO, ABILITY_LEAF_GUARD}, @@ -13452,7 +13452,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ABSORB_BULB, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_OWN_TEMPO, ABILITY_LEAF_GUARD}, @@ -13475,7 +13475,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_DEEP_SEA_TOOTH, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_RECKLESS, ABILITY_ADAPTABILITY, ABILITY_MOLD_BREAKER}, @@ -13498,7 +13498,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BLACK_GLASSES, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INTIMIDATE, ABILITY_MOXIE, ABILITY_ANGER_POINT}, @@ -13521,7 +13521,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BLACK_GLASSES, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INTIMIDATE, ABILITY_MOXIE, ABILITY_ANGER_POINT}, @@ -13548,7 +13548,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemCommon = ITEM_BLACK_GLASSES, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INTIMIDATE, ABILITY_MOXIE, ABILITY_ANGER_POINT}, @@ -13570,7 +13570,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_HUSTLE, ABILITY_NONE, ABILITY_INNER_FOCUS}, @@ -13592,7 +13592,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SHEER_FORCE, ABILITY_NONE, ABILITY_ZEN_MODE}, @@ -13615,7 +13615,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MIRACLE_SEED, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_WATER_ABSORB, ABILITY_CHLOROPHYLL, ABILITY_STORM_DRAIN}, @@ -13638,7 +13638,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STURDY, ABILITY_SHELL_ARMOR, ABILITY_WEAK_ARMOR}, @@ -13665,7 +13665,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STURDY, ABILITY_SHELL_ARMOR, ABILITY_WEAK_ARMOR}, @@ -13712,7 +13712,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SHED_SHELL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_DRAGON}, .abilities = {ABILITY_SHED_SKIN, ABILITY_MOXIE, ABILITY_INTIMIDATE}, @@ -13734,7 +13734,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_WONDER_SKIN, ABILITY_MAGIC_GUARD, ABILITY_TINTED_LENS}, @@ -13757,7 +13757,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_MUMMY, ABILITY_NONE}, @@ -13780,7 +13780,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_MUMMY, ABILITY_NONE}, @@ -13802,7 +13802,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, .abilities = {ABILITY_SOLID_ROCK, ABILITY_STURDY, ABILITY_SWIFT_SWIM}, @@ -13824,7 +13824,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, .abilities = {ABILITY_SOLID_ROCK, ABILITY_STURDY, ABILITY_SWIFT_SWIM}, @@ -13846,7 +13846,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_WATER_3}, .abilities = {ABILITY_DEFEATIST, ABILITY_NONE}, @@ -13868,7 +13868,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_WATER_3}, .abilities = {ABILITY_DEFEATIST, ABILITY_NONE}, @@ -13891,7 +13891,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SILK_SCARF, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STENCH, ABILITY_STICKY_HOLD, ABILITY_AFTERMATH}, @@ -13915,7 +13915,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BLACK_SLUDGE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STENCH, ABILITY_WEAK_ARMOR, ABILITY_AFTERMATH}, @@ -13937,7 +13937,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_ILLUSION, ABILITY_NONE}, @@ -13959,7 +13959,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_ILLUSION, ABILITY_NONE}, @@ -13981,7 +13981,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_CUTE_CHARM, ABILITY_TECHNICIAN, ABILITY_SKILL_LINK}, @@ -14003,7 +14003,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_CUTE_CHARM, ABILITY_TECHNICIAN, ABILITY_SKILL_LINK}, @@ -14025,7 +14025,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_FRISK, ABILITY_COMPETITIVE, ABILITY_SHADOW_TAG}, @@ -14047,7 +14047,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_FRISK, ABILITY_COMPETITIVE, ABILITY_SHADOW_TAG}, @@ -14069,7 +14069,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 3, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_FRISK, ABILITY_COMPETITIVE, ABILITY_SHADOW_TAG}, @@ -14091,7 +14091,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_OVERCOAT, ABILITY_MAGIC_GUARD, ABILITY_REGENERATOR}, @@ -14113,7 +14113,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_OVERCOAT, ABILITY_MAGIC_GUARD, ABILITY_REGENERATOR}, @@ -14135,7 +14135,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_OVERCOAT, ABILITY_MAGIC_GUARD, ABILITY_REGENERATOR}, @@ -14157,7 +14157,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_BIG_PECKS, ABILITY_HYDRATION}, @@ -14179,7 +14179,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_BIG_PECKS, ABILITY_HYDRATION}, @@ -14202,7 +14202,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_NEVER_MELT_ICE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_ICE_BODY, ABILITY_SNOW_CLOAK, ABILITY_WEAK_ARMOR}, @@ -14225,7 +14225,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_NEVER_MELT_ICE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_ICE_BODY, ABILITY_SNOW_CLOAK, ABILITY_WEAK_ARMOR}, @@ -14248,7 +14248,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemCommon = ITEM_NEVER_MELT_ICE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_ICE_BODY, ABILITY_SNOW_WARNING, ABILITY_WEAK_ARMOR}, @@ -14274,7 +14274,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_STATIC, ABILITY_NONE, ABILITY_MOTOR_DRIVE}, @@ -14296,7 +14296,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_SHED_SKIN, ABILITY_NO_GUARD}, @@ -14318,7 +14318,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_SHELL_ARMOR, ABILITY_OVERCOAT}, @@ -14342,7 +14342,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BIG_MUSHROOM, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_EFFECT_SPORE, ABILITY_NONE, ABILITY_REGENERATOR}, @@ -14366,7 +14366,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BIG_MUSHROOM, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_EFFECT_SPORE, ABILITY_NONE, ABILITY_REGENERATOR}, @@ -14388,7 +14388,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_WATER_ABSORB, ABILITY_CURSED_BODY, ABILITY_DAMP}, @@ -14411,7 +14411,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_WATER_ABSORB, ABILITY_CURSED_BODY, ABILITY_DAMP}, @@ -14434,7 +14434,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_2}, .abilities = {ABILITY_HEALER, ABILITY_HYDRATION, ABILITY_REGENERATOR}, @@ -14456,7 +14456,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_COMPOUND_EYES, ABILITY_UNNERVE, ABILITY_SWARM}, @@ -14478,7 +14478,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_COMPOUND_EYES, ABILITY_UNNERVE, ABILITY_SWARM}, @@ -14501,7 +14501,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_STICKY_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_MINERAL}, .abilities = {ABILITY_IRON_BARBS, ABILITY_NONE}, @@ -14524,7 +14524,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_STICKY_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_MINERAL}, .abilities = {ABILITY_IRON_BARBS, ABILITY_NONE, ABILITY_ANTICIPATION}, @@ -14546,7 +14546,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_PLUS, ABILITY_MINUS, ABILITY_CLEAR_BODY}, @@ -14568,7 +14568,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_PLUS, ABILITY_MINUS, ABILITY_CLEAR_BODY}, @@ -14590,7 +14590,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 3, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_PLUS, ABILITY_MINUS, ABILITY_CLEAR_BODY}, @@ -14612,7 +14612,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, @@ -14634,7 +14634,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, @@ -14656,7 +14656,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, @@ -14678,7 +14678,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_TELEPATHY, ABILITY_SYNCHRONIZE, ABILITY_ANALYTIC}, @@ -14700,7 +14700,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_TELEPATHY, ABILITY_SYNCHRONIZE, ABILITY_ANALYTIC}, @@ -14722,7 +14722,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, #if P_UPDATED_ABILITIES >= GEN_6 @@ -14748,7 +14748,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, #if P_UPDATED_ABILITIES >= GEN_6 @@ -14774,7 +14774,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, #if P_UPDATED_ABILITIES >= GEN_6 @@ -14866,7 +14866,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SNOW_CLOAK, ABILITY_SLUSH_RUSH, ABILITY_RATTLED}, @@ -14892,7 +14892,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SNOW_CLOAK, ABILITY_SLUSH_RUSH, ABILITY_SWIFT_SWIM}, @@ -14920,7 +14920,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_NEVER_MELT_ICE, .genderRatio = MON_GENDERLESS, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, @@ -14942,7 +14942,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_HYDRATION, ABILITY_SHELL_ARMOR, ABILITY_OVERCOAT}, @@ -14964,7 +14964,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_HYDRATION, ABILITY_STICKY_HOLD, ABILITY_UNBURDEN}, @@ -15009,7 +15009,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_INNER_FOCUS, ABILITY_REGENERATOR, ABILITY_RECKLESS}, @@ -15031,7 +15031,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_INNER_FOCUS, ABILITY_REGENERATOR, ABILITY_RECKLESS}, @@ -15054,7 +15054,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_DRAGON_FANG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_DRAGON, EGG_GROUP_MONSTER}, .abilities = {ABILITY_ROUGH_SKIN, ABILITY_SHEER_FORCE, ABILITY_MOLD_BREAKER}, @@ -15077,7 +15077,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LIGHT_CLAY, .genderRatio = MON_GENDERLESS, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_IRON_FIST, ABILITY_KLUTZ, ABILITY_NO_GUARD}, @@ -15100,7 +15100,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LIGHT_CLAY, .genderRatio = MON_GENDERLESS, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_IRON_FIST, ABILITY_KLUTZ, ABILITY_NO_GUARD}, @@ -15166,7 +15166,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RECKLESS, ABILITY_SAP_SIPPER, ABILITY_SOUNDPROOF}, @@ -15188,7 +15188,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = MON_MALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_SHEER_FORCE, ABILITY_HUSTLE}, @@ -15210,7 +15210,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = MON_MALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_SHEER_FORCE, ABILITY_DEFIANT}, @@ -15276,7 +15276,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_GLUTTONY, ABILITY_FLASH_FIRE, ABILITY_WHITE_SMOKE}, @@ -15298,7 +15298,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_HUSTLE, ABILITY_TRUANT}, @@ -15386,7 +15386,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_FLAME_BODY, ABILITY_NONE, ABILITY_SWARM}, @@ -15410,7 +15410,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SILVER_POWDER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_FLAME_BODY, ABILITY_NONE, ABILITY_SWARM}, @@ -15695,7 +15695,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_BULLETPROOF}, @@ -15717,7 +15717,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_BULLETPROOF}, @@ -15739,7 +15739,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_BULLETPROOF}, @@ -15761,7 +15761,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_MAGICIAN}, @@ -15783,7 +15783,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_MAGICIAN}, @@ -15805,7 +15805,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_MAGICIAN}, @@ -15827,7 +15827,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_PROTEAN}, @@ -15849,7 +15849,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_PROTEAN}, @@ -15871,7 +15871,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_PROTEAN}, @@ -15893,7 +15893,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_PICKUP, ABILITY_CHEEK_POUCH, ABILITY_HUGE_POWER}, @@ -15915,7 +15915,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_PICKUP, ABILITY_CHEEK_POUCH, ABILITY_HUGE_POWER}, @@ -15937,7 +15937,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_BIG_PECKS, ABILITY_NONE, ABILITY_GALE_WINGS}, @@ -15959,7 +15959,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_FLAME_BODY, ABILITY_NONE, ABILITY_GALE_WINGS}, @@ -15981,7 +15981,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_FLAME_BODY, ABILITY_NONE, ABILITY_GALE_WINGS}, @@ -16003,7 +16003,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SHIELD_DUST, ABILITY_COMPOUND_EYES, ABILITY_FRIEND_GUARD}, @@ -16025,7 +16025,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE, ABILITY_FRIEND_GUARD}, @@ -16049,7 +16049,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(87.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RIVALRY, ABILITY_UNNERVE, ABILITY_MOXIE}, @@ -16071,7 +16071,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(87.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RIVALRY, ABILITY_UNNERVE, ABILITY_MOXIE}, @@ -16100,7 +16100,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SAP_SIPPER, ABILITY_NONE, ABILITY_GRASS_PELT}, @@ -16122,7 +16122,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SAP_SIPPER, ABILITY_NONE, ABILITY_GRASS_PELT}, @@ -16145,7 +16145,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MENTAL_HERB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_IRON_FIST, ABILITY_MOLD_BREAKER, ABILITY_SCRAPPY}, @@ -16168,7 +16168,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MENTAL_HERB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_IRON_FIST, ABILITY_MOLD_BREAKER, ABILITY_SCRAPPY}, @@ -16192,7 +16192,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_KEEN_EYE, ABILITY_INFILTRATOR, ABILITY_OWN_TEMPO}, @@ -16214,7 +16214,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = MON_MALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_KEEN_EYE, ABILITY_INFILTRATOR, ABILITY_PRANKSTER}, @@ -16236,7 +16236,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_NO_GUARD, ABILITY_NONE}, @@ -16258,7 +16258,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_NO_GUARD, ABILITY_NONE}, @@ -16286,7 +16286,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STANCE_CHANGE, ABILITY_NONE}, @@ -16308,7 +16308,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, .abilities = {ABILITY_HEALER, ABILITY_NONE, ABILITY_AROMA_VEIL}, @@ -16330,7 +16330,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, .abilities = {ABILITY_HEALER, ABILITY_NONE, ABILITY_AROMA_VEIL}, @@ -16352,7 +16352,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, .abilities = {ABILITY_SWEET_VEIL, ABILITY_NONE, ABILITY_UNBURDEN}, @@ -16374,7 +16374,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, .abilities = {ABILITY_SWEET_VEIL, ABILITY_NONE, ABILITY_UNBURDEN}, @@ -16396,7 +16396,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_2}, .abilities = {ABILITY_CONTRARY, ABILITY_SUCTION_CUPS, ABILITY_INFILTRATOR}, @@ -16418,7 +16418,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_2}, .abilities = {ABILITY_CONTRARY, ABILITY_SUCTION_CUPS, ABILITY_INFILTRATOR}, @@ -16440,7 +16440,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_TOUGH_CLAWS, ABILITY_SNIPER, ABILITY_PICKPOCKET}, @@ -16462,7 +16462,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_TOUGH_CLAWS, ABILITY_SNIPER, ABILITY_PICKPOCKET}, @@ -16484,7 +16484,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, .abilities = {ABILITY_POISON_POINT, ABILITY_POISON_TOUCH, ABILITY_ADAPTABILITY}, @@ -16506,7 +16506,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, .abilities = {ABILITY_POISON_POINT, ABILITY_POISON_TOUCH, ABILITY_ADAPTABILITY}, @@ -16528,7 +16528,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, .abilities = {ABILITY_MEGA_LAUNCHER, ABILITY_NONE}, @@ -16550,7 +16550,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, .abilities = {ABILITY_MEGA_LAUNCHER, ABILITY_NONE}, @@ -16572,7 +16572,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_DRY_SKIN, ABILITY_SAND_VEIL, ABILITY_SOLAR_POWER}, @@ -16595,7 +16595,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_DRY_SKIN, ABILITY_SAND_VEIL, ABILITY_SOLAR_POWER}, @@ -16617,7 +16617,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_STRONG_JAW, ABILITY_NONE, ABILITY_STURDY}, @@ -16639,7 +16639,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_STRONG_JAW, ABILITY_NONE, ABILITY_ROCK_HEAD}, @@ -16661,7 +16661,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, .abilities = {ABILITY_REFRIGERATE, ABILITY_NONE, ABILITY_SNOW_WARNING}, @@ -16683,7 +16683,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, .abilities = {ABILITY_REFRIGERATE, ABILITY_NONE, ABILITY_SNOW_WARNING}, @@ -16705,7 +16705,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_CUTE_CHARM, ABILITY_CUTE_CHARM, ABILITY_PIXILATE}, @@ -16728,7 +16728,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_KINGS_ROCK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, #if P_UPDATED_EGG_GROUPS >= GEN_8 .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_HUMAN_LIKE}, @@ -16754,7 +16754,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, .abilities = {ABILITY_CHEEK_POUCH, ABILITY_PICKUP, ABILITY_PLUS}, @@ -16777,7 +16777,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = MON_GENDERLESS, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_MINERAL}, .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE, ABILITY_STURDY}, @@ -16867,7 +16867,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_PRANKSTER, ABILITY_NONE, ABILITY_MAGICIAN}, @@ -16889,7 +16889,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_NATURAL_CURE, ABILITY_FRISK, ABILITY_HARVEST}, @@ -16911,7 +16911,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_NATURAL_CURE, ABILITY_FRISK, ABILITY_HARVEST}, @@ -16955,7 +16955,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, #if P_UPDATED_EGG_GROUPS >= GEN_8 .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, @@ -16981,7 +16981,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, #if P_UPDATED_EGG_GROUPS >= GEN_8 .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, @@ -17007,7 +17007,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, #if P_UPDATED_EGG_GROUPS >= GEN_8 .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_DRAGON}, @@ -17033,7 +17033,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, #if P_UPDATED_EGG_GROUPS >= GEN_8 .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_DRAGON}, @@ -17087,7 +17087,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = MON_GENDERLESS, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, @@ -17158,7 +17158,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_LONG_REACH}, @@ -17180,7 +17180,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_LONG_REACH}, @@ -17202,7 +17202,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_LONG_REACH}, @@ -17224,7 +17224,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_INTIMIDATE}, @@ -17246,7 +17246,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_INTIMIDATE}, @@ -17268,7 +17268,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_INTIMIDATE}, @@ -17290,7 +17290,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_LIQUID_VOICE}, @@ -17312,7 +17312,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_LIQUID_VOICE}, @@ -17334,7 +17334,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_LIQUID_VOICE}, @@ -17357,7 +17357,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ORAN_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_SKILL_LINK, ABILITY_PICKUP}, @@ -17380,7 +17380,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_SKILL_LINK, ABILITY_PICKUP}, @@ -17403,7 +17403,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_RAWST_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_SKILL_LINK, ABILITY_SHEER_FORCE}, @@ -17426,7 +17426,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_PECHA_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_STAKEOUT, ABILITY_STRONG_JAW, ABILITY_ADAPTABILITY}, @@ -17449,7 +17449,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_PECHA_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_STAKEOUT, ABILITY_STRONG_JAW, ABILITY_ADAPTABILITY}, @@ -17471,7 +17471,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_NONE}, @@ -17494,7 +17494,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_CELL_BATTERY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_BATTERY, ABILITY_NONE}, @@ -17516,7 +17516,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, @@ -17539,7 +17539,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ASPEAR_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_HYPER_CUTTER, ABILITY_IRON_FIST, ABILITY_ANGER_POINT}, @@ -17562,7 +17562,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_CHERI_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, .abilities = {ABILITY_HYPER_CUTTER, ABILITY_IRON_FIST, ABILITY_ANGER_POINT}, @@ -17587,7 +17587,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_HONEY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_FAIRY}, .abilities = {ABILITY_HONEY_GATHER, ABILITY_SHIELD_DUST, ABILITY_SWEET_VEIL}, @@ -17610,7 +17610,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_HONEY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_FAIRY}, .abilities = {ABILITY_HONEY_GATHER, ABILITY_SHIELD_DUST, ABILITY_SWEET_VEIL}, @@ -17634,7 +17634,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_KEEN_EYE, ABILITY_SAND_RUSH, ABILITY_STEADFAST}, @@ -17656,7 +17656,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_SCHOOLING, ABILITY_NONE}, @@ -17679,7 +17679,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_MERCILESS, ABILITY_LIMBER, ABILITY_REGENERATOR}, @@ -17702,7 +17702,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_MERCILESS, ABILITY_LIMBER, ABILITY_REGENERATOR}, @@ -17725,7 +17725,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LIGHT_CLAY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_OWN_TEMPO, ABILITY_STAMINA, ABILITY_INNER_FOCUS}, @@ -17748,7 +17748,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LIGHT_CLAY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_OWN_TEMPO, ABILITY_STAMINA, ABILITY_INNER_FOCUS}, @@ -17771,7 +17771,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MYSTIC_WATER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_BUG}, .abilities = {ABILITY_WATER_BUBBLE, ABILITY_NONE, ABILITY_WATER_ABSORB}, @@ -17794,7 +17794,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MYSTIC_WATER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_BUG}, .abilities = {ABILITY_WATER_BUBBLE, ABILITY_NONE, ABILITY_WATER_ABSORB}, @@ -17817,7 +17817,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MIRACLE_SEED, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_LEAF_GUARD, ABILITY_NONE, ABILITY_CONTRARY}, @@ -17840,7 +17840,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MIRACLE_SEED, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_LEAF_GUARD, ABILITY_NONE, ABILITY_CONTRARY}, @@ -17864,7 +17864,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BIG_MUSHROOM, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_ILLUMINATE, ABILITY_EFFECT_SPORE, ABILITY_RAIN_DISH}, @@ -17888,7 +17888,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BIG_MUSHROOM, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_ILLUMINATE, ABILITY_EFFECT_SPORE, ABILITY_RAIN_DISH}, @@ -17911,7 +17911,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SMOKE_BALL, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_CORROSION, ABILITY_NONE, ABILITY_OBLIVIOUS}, @@ -17934,7 +17934,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SMOKE_BALL, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_CORROSION, ABILITY_NONE, ABILITY_OBLIVIOUS}, @@ -17956,7 +17956,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_FLUFFY, ABILITY_KLUTZ, ABILITY_CUTE_CHARM}, @@ -17978,7 +17978,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_FLUFFY, ABILITY_KLUTZ, ABILITY_UNNERVE}, @@ -18001,7 +18001,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_GRASSY_SEED, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_LEAF_GUARD, ABILITY_OBLIVIOUS, ABILITY_SWEET_VEIL}, @@ -18024,7 +18024,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_GRASSY_SEED, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_LEAF_GUARD, ABILITY_OBLIVIOUS, ABILITY_SWEET_VEIL}, @@ -18047,7 +18047,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemCommon = ITEM_GRASSY_SEED, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_LEAF_GUARD, ABILITY_QUEENLY_MAJESTY, ABILITY_SWEET_VEIL}, @@ -18070,7 +18070,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MISTY_SEED, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_FLOWER_VEIL, ABILITY_TRIAGE, ABILITY_NATURAL_CURE}, @@ -18092,7 +18092,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INNER_FOCUS, ABILITY_TELEPATHY, ABILITY_SYMBIOSIS}, @@ -18114,7 +18114,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RECEIVER, ABILITY_NONE, ABILITY_DEFIANT}, @@ -18136,7 +18136,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_WATER_3}, .abilities = {ABILITY_WIMP_OUT, ABILITY_NONE}, @@ -18158,7 +18158,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_WATER_3}, .abilities = {ABILITY_EMERGENCY_EXIT, ABILITY_NONE}, @@ -18181,7 +18181,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_WATER_COMPACTION, ABILITY_NONE, ABILITY_SAND_VEIL}, @@ -18204,7 +18204,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_WATER_COMPACTION, ABILITY_NONE, ABILITY_SAND_VEIL}, @@ -18226,7 +18226,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, .abilities = {ABILITY_INNARDS_OUT, ABILITY_NONE, ABILITY_UNAWARE}, @@ -18275,7 +18275,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_COMATOSE, ABILITY_NONE}, @@ -18298,7 +18298,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_CHARCOAL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_SHELL_ARMOR, ABILITY_NONE}, @@ -18321,7 +18321,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ELECTRIC_SEED, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, .abilities = {ABILITY_IRON_BARBS, ABILITY_LIGHTNING_ROD, ABILITY_STURDY}, @@ -18346,7 +18346,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_RAZOR_FANG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_DAZZLING, ABILITY_STRONG_JAW, ABILITY_WONDER_SKIN}, @@ -18369,7 +18369,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_PERSIM_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_BERSERK, ABILITY_SAP_SIPPER, ABILITY_CLOUD_NINE}, @@ -18391,7 +18391,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = MON_GENDERLESS, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STEELWORKER, ABILITY_NONE}, @@ -18414,7 +18414,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_RAZOR_CLAW, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_DRAGON, EGG_GROUP_DRAGON}, .abilities = {ABILITY_BULLETPROOF, ABILITY_SOUNDPROOF, ABILITY_OVERCOAT}, @@ -18437,7 +18437,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_RAZOR_CLAW, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_DRAGON, EGG_GROUP_DRAGON}, .abilities = {ABILITY_BULLETPROOF, ABILITY_SOUNDPROOF, ABILITY_OVERCOAT}, @@ -18460,7 +18460,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemCommon = ITEM_RAZOR_CLAW, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_DRAGON, EGG_GROUP_DRAGON}, .abilities = {ABILITY_BULLETPROOF, ABILITY_SOUNDPROOF, ABILITY_OVERCOAT}, @@ -18482,7 +18482,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = MON_GENDERLESS, .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_ELECTRIC_SURGE, ABILITY_NONE, ABILITY_TELEPATHY}, @@ -18505,7 +18505,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = MON_GENDERLESS, .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_PSYCHIC_SURGE, ABILITY_NONE, ABILITY_TELEPATHY}, @@ -18528,7 +18528,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = MON_GENDERLESS, .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_GRASSY_SURGE, ABILITY_NONE, ABILITY_TELEPATHY}, @@ -18551,7 +18551,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 3, .genderRatio = MON_GENDERLESS, .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_MISTY_SURGE, ABILITY_NONE, ABILITY_TELEPATHY}, @@ -19044,7 +19044,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_GRASS}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_GRASSY_SURGE}, @@ -19066,7 +19066,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_GRASS}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_GRASSY_SURGE}, @@ -19088,7 +19088,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_GRASS}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_GRASSY_SURGE}, @@ -19110,7 +19110,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_LIBERO}, @@ -19132,7 +19132,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_LIBERO}, @@ -19154,7 +19154,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_LIBERO}, @@ -19177,7 +19177,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_SNIPER}, @@ -19199,7 +19199,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_SNIPER}, @@ -19221,7 +19221,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_SNIPER}, @@ -19244,7 +19244,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ORAN_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_CHEEK_POUCH, ABILITY_NONE, ABILITY_GLUTTONY}, @@ -19267,7 +19267,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_CHEEK_POUCH, ABILITY_NONE, ABILITY_GLUTTONY}, @@ -19289,7 +19289,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_UNNERVE, ABILITY_BIG_PECKS}, @@ -19311,7 +19311,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_UNNERVE, ABILITY_BIG_PECKS}, @@ -19333,7 +19333,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_PRESSURE, ABILITY_UNNERVE, ABILITY_MIRROR_ARMOR}, @@ -19355,7 +19355,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_COMPOUND_EYES, ABILITY_TELEPATHY}, @@ -19378,7 +19378,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_PSYCHIC_SEED, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_COMPOUND_EYES, ABILITY_TELEPATHY}, @@ -19401,7 +19401,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_PSYCHIC_SEED, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_FRISK, ABILITY_TELEPATHY}, @@ -19423,7 +19423,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RUN_AWAY, ABILITY_UNBURDEN, ABILITY_STAKEOUT}, @@ -19445,7 +19445,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RUN_AWAY, ABILITY_UNBURDEN, ABILITY_STAKEOUT}, @@ -19467,7 +19467,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_COTTON_DOWN, ABILITY_REGENERATOR, ABILITY_EFFECT_SPORE}, @@ -19489,7 +19489,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_COTTON_DOWN, ABILITY_REGENERATOR, ABILITY_EFFECT_SPORE}, @@ -19511,7 +19511,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_FLUFFY, ABILITY_RUN_AWAY, ABILITY_BULLETPROOF}, @@ -19533,7 +19533,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_FLUFFY, ABILITY_STEADFAST, ABILITY_BULLETPROOF}, @@ -19555,7 +19555,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_STRONG_JAW, ABILITY_SHELL_ARMOR, ABILITY_SWIFT_SWIM}, @@ -19577,7 +19577,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_STRONG_JAW, ABILITY_SHELL_ARMOR, ABILITY_SWIFT_SWIM}, @@ -19599,7 +19599,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BALL_FETCH, ABILITY_NONE, ABILITY_RATTLED}, @@ -19621,7 +19621,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_STRONG_JAW, ABILITY_NONE, ABILITY_COMPETITIVE}, @@ -19643,7 +19643,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STEAM_ENGINE, ABILITY_HEATPROOF, ABILITY_FLASH_FIRE}, @@ -19665,7 +19665,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STEAM_ENGINE, ABILITY_FLAME_BODY, ABILITY_FLASH_FIRE}, @@ -19687,7 +19687,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STEAM_ENGINE, ABILITY_FLAME_BODY, ABILITY_FLASH_FIRE}, @@ -19709,7 +19709,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_DRAGON}, .abilities = {ABILITY_RIPEN, ABILITY_GLUTTONY, ABILITY_BULLETPROOF}, @@ -19731,7 +19731,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_DRAGON}, .abilities = {ABILITY_RIPEN, ABILITY_GLUTTONY, ABILITY_HUSTLE}, @@ -19753,7 +19753,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_DRAGON}, .abilities = {ABILITY_RIPEN, ABILITY_GLUTTONY, ABILITY_THICK_FAT}, @@ -19775,7 +19775,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_DRAGON}, .abilities = {ABILITY_SAND_SPIT, ABILITY_SHED_SKIN, ABILITY_SAND_VEIL}, @@ -19797,7 +19797,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_DRAGON}, .abilities = {ABILITY_SAND_SPIT, ABILITY_SHED_SKIN, ABILITY_SAND_VEIL}, @@ -19821,7 +19821,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE, ABILITY_PROPELLER_TAIL}, @@ -19843,7 +19843,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE, ABILITY_PROPELLER_TAIL}, @@ -19865,7 +19865,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_RATTLED, ABILITY_STATIC, ABILITY_KLUTZ}, @@ -19889,7 +19889,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_FLASH_FIRE, ABILITY_WHITE_SMOKE, ABILITY_FLAME_BODY}, @@ -19911,7 +19911,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_FLASH_FIRE, ABILITY_WHITE_SMOKE, ABILITY_FLAME_BODY}, @@ -19933,7 +19933,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_LIMBER, ABILITY_NONE, ABILITY_TECHNICIAN}, @@ -19955,7 +19955,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_LIMBER, ABILITY_NONE, ABILITY_TECHNICIAN}, @@ -19981,7 +19981,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, .abilities = {ABILITY_HEALER, ABILITY_ANTICIPATION, ABILITY_MAGIC_BOUNCE}, @@ -20003,7 +20003,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, .abilities = {ABILITY_HEALER, ABILITY_ANTICIPATION, ABILITY_MAGIC_BOUNCE}, @@ -20025,7 +20025,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, .abilities = {ABILITY_HEALER, ABILITY_ANTICIPATION, ABILITY_MAGIC_BOUNCE}, @@ -20047,7 +20047,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = MON_MALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_PRANKSTER, ABILITY_FRISK, ABILITY_PICKPOCKET}, @@ -20069,7 +20069,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = MON_MALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_PRANKSTER, ABILITY_FRISK, ABILITY_PICKPOCKET}, @@ -20091,7 +20091,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = MON_MALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_PRANKSTER, ABILITY_FRISK, ABILITY_PICKPOCKET}, @@ -20113,7 +20113,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RECKLESS, ABILITY_GUTS, ABILITY_DEFIANT}, @@ -20135,7 +20135,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BATTLE_ARMOR, ABILITY_TOUGH_CLAWS, ABILITY_STEELY_SPIRIT}, @@ -20157,7 +20157,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, .abilities = {ABILITY_WEAK_ARMOR, ABILITY_NONE, ABILITY_PERISH_BODY}, @@ -20180,7 +20180,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LEEK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FIELD}, .abilities = {ABILITY_STEADFAST, ABILITY_NONE, ABILITY_SCRAPPY}, @@ -20202,7 +20202,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_TANGLED_FEET, ABILITY_SCREEN_CLEANER, ABILITY_ICE_BODY}, @@ -20224,7 +20224,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_WANDERING_SPIRIT, ABILITY_NONE}, @@ -20246,7 +20246,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_SWEET_VEIL, ABILITY_NONE, ABILITY_AROMA_VEIL}, @@ -20271,7 +20271,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = MON_GENDERLESS, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_MINERAL}, .abilities = {ABILITY_BATTLE_ARMOR, ABILITY_NONE, ABILITY_DEFIANT}, @@ -20293,7 +20293,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_NONE, ABILITY_ELECTRIC_SURGE}, @@ -20316,7 +20316,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SNOWBALL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE, ABILITY_ICE_SCALES}, @@ -20338,7 +20338,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE, ABILITY_ICE_SCALES}, @@ -20360,7 +20360,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_POWER_SPOT, ABILITY_NONE}, @@ -20382,7 +20382,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_ICE_FACE, ABILITY_NONE}, @@ -20429,7 +20429,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LAGGING_TAIL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_MINERAL}, .abilities = {ABILITY_SHEER_FORCE, ABILITY_NONE, ABILITY_HEAVY_METAL}, @@ -20452,7 +20452,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_LAGGING_TAIL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_MINERAL}, .abilities = {ABILITY_SHEER_FORCE, ABILITY_NONE, ABILITY_HEAVY_METAL}, @@ -20474,7 +20474,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = MON_GENDERLESS, .eggCycles = 35, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_VOLT_ABSORB, ABILITY_HUSTLE, ABILITY_SAND_RUSH}, @@ -20496,7 +20496,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = MON_GENDERLESS, .eggCycles = 35, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_VOLT_ABSORB, ABILITY_STATIC, ABILITY_SLUSH_RUSH}, @@ -20518,7 +20518,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = MON_GENDERLESS, .eggCycles = 35, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_WATER_ABSORB, ABILITY_STRONG_JAW, ABILITY_SAND_RUSH}, @@ -20540,7 +20540,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = MON_GENDERLESS, .eggCycles = 35, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_WATER_ABSORB, ABILITY_ICE_BODY, ABILITY_SLUSH_RUSH}, @@ -20562,7 +20562,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 30, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_DRAGON}, .abilities = {ABILITY_LIGHT_METAL, ABILITY_HEAVY_METAL, ABILITY_STALWART}, @@ -20584,7 +20584,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_DRAGON}, .abilities = {ABILITY_CLEAR_BODY, ABILITY_INFILTRATOR, ABILITY_CURSED_BODY}, @@ -20606,7 +20606,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_DRAGON}, .abilities = {ABILITY_CLEAR_BODY, ABILITY_INFILTRATOR, ABILITY_CURSED_BODY}, @@ -20628,7 +20628,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_DRAGON}, .abilities = {ABILITY_CLEAR_BODY, ABILITY_INFILTRATOR, ABILITY_CURSED_BODY}, @@ -20719,7 +20719,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 120, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, @@ -20742,7 +20742,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 120, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_UNSEEN_FIST, ABILITY_NONE}, @@ -20882,7 +20882,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INTIMIDATE, ABILITY_FRISK, ABILITY_SAP_SIPPER}, @@ -20904,7 +20904,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SWARM, ABILITY_SHEER_FORCE, ABILITY_STEADFAST}, @@ -20926,7 +20926,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_GUTS, ABILITY_BULLETPROOF, ABILITY_UNNERVE}, @@ -20946,15 +20946,36 @@ const struct SpeciesInfo gSpeciesInfo[] = .catchRate = 25, .expYield = 186, .evYield_HP = 2, - .genderRatio = PERCENT_FEMALE(50), + .genderRatio = MON_MALE, .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, + .growthRate = GROWTH_MEDIUM_FAST, + .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_RATTLED, ABILITY_ADAPTABILITY, ABILITY_MOLD_BREAKER}, + .bodyColor = BODY_COLOR_GREEN, + .noFlip = FALSE, + }, + + [SPECIES_BASCULEGION_FEMALE] = + { + .baseHP = 120, + .baseAttack = 92, + .baseDefense = 65, + .baseSpeed = 78, + .baseSpAttack = 100, + .baseSpDefense = 75, + .types = { TYPE_WATER, TYPE_GHOST}, + .catchRate = 25, + .expYield = 186, + .evYield_HP = 2, + .genderRatio = MON_FEMALE, + .eggCycles = 40, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_RATTLED, ABILITY_ADAPTABILITY, ABILITY_MOLD_BREAKER}, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, - .flags = SPECIES_FLAG_GENDER_DIFFERENCE, }, [SPECIES_SNEASLER] = @@ -20994,7 +21015,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_POISON_POINT, ABILITY_SWIFT_SWIM, ABILITY_INTIMIDATE}, @@ -21041,7 +21062,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, .abilities = {ABILITY_THICK_FAT, ABILITY_THICK_FAT}, @@ -21064,7 +21085,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_TOUGH_CLAWS, ABILITY_TOUGH_CLAWS}, @@ -21087,7 +21108,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_DROUGHT, ABILITY_DROUGHT}, @@ -21110,7 +21131,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_MEGA_LAUNCHER, ABILITY_MEGA_LAUNCHER}, @@ -21135,7 +21156,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_ADAPTABILITY, ABILITY_ADAPTABILITY}, @@ -21158,7 +21179,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_NO_GUARD, ABILITY_NO_GUARD}, @@ -21186,7 +21207,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_TWISTED_SPOON, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_TRACE, ABILITY_TRACE}, @@ -21210,7 +21231,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_KINGS_ROCK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_SHELL_ARMOR, ABILITY_SHELL_ARMOR}, @@ -21233,7 +21254,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_SHADOW_TAG, ABILITY_SHADOW_TAG}, @@ -21256,7 +21277,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, .abilities = {ABILITY_PARENTAL_BOND, ABILITY_PARENTAL_BOND}, @@ -21279,7 +21300,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_AERILATE, ABILITY_AERILATE}, @@ -21302,7 +21323,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 5, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_DRAGON}, .abilities = {ABILITY_MOLD_BREAKER, ABILITY_MOLD_BREAKER}, @@ -21325,7 +21346,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_TOUGH_CLAWS, ABILITY_TOUGH_CLAWS}, @@ -21394,7 +21415,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, .abilities = {ABILITY_MOLD_BREAKER, ABILITY_MOLD_BREAKER}, @@ -21418,7 +21439,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_METAL_COAT, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_SAND_FORCE, ABILITY_SAND_FORCE}, @@ -21441,7 +21462,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_TECHNICIAN, ABILITY_TECHNICIAN}, @@ -21464,7 +21485,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_SKILL_LINK, ABILITY_SKILL_LINK}, @@ -21533,7 +21554,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_LIGHTNING_ROD}, @@ -21556,7 +21577,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SPEED_BOOST, ABILITY_SPEED_BOOST}, @@ -21579,7 +21600,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_SWIFT_SWIM, ABILITY_SWIFT_SWIM}, @@ -21650,7 +21671,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, .abilities = {ABILITY_HUGE_POWER, ABILITY_HUGE_POWER}, @@ -21697,7 +21718,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_PURE_POWER, ABILITY_PURE_POWER}, @@ -21720,7 +21741,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INTIMIDATE, ABILITY_INTIMIDATE}, @@ -21768,7 +21789,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SHEER_FORCE, ABILITY_SHEER_FORCE}, @@ -21791,7 +21812,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_ERRATIC, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_DRAGON}, .abilities = {ABILITY_PIXILATE, ABILITY_PIXILATE}, @@ -21861,7 +21882,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_MINERAL}, .abilities = {ABILITY_REFRIGERATE, ABILITY_REFRIGERATE}, @@ -22002,7 +22023,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, .abilities = {ABILITY_SAND_FORCE, ABILITY_SAND_FORCE}, @@ -22026,7 +22047,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_ADAPTABILITY, ABILITY_ADAPTABILITY}, @@ -22051,7 +22072,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_NEVER_MELT_ICE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, .abilities = {ABILITY_SNOW_WARNING, ABILITY_SNOW_WARNING}, @@ -22101,7 +22122,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, .abilities = {ABILITY_HEALER, ABILITY_HEALER}, @@ -22127,7 +22148,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = MON_GENDERLESS, .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_MAGIC_BOUNCE, ABILITY_MAGIC_BOUNCE}, @@ -22222,7 +22243,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_PECHA_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_GLUTTONY, ABILITY_HUSTLE, ABILITY_THICK_FAT}, @@ -22246,7 +22267,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_PECHA_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_GLUTTONY, ABILITY_HUSTLE, ABILITY_THICK_FAT}, @@ -22269,7 +22290,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, .abilities = {ABILITY_SURGE_SURFER, ABILITY_NONE}, @@ -22293,7 +22314,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_GRIP_CLAW, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SNOW_CLOAK, ABILITY_NONE, ABILITY_SLUSH_RUSH}, @@ -22316,7 +22337,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SNOW_CLOAK, ABILITY_NONE, ABILITY_SLUSH_RUSH}, @@ -22340,7 +22361,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SNOWBALL, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SNOW_CLOAK, ABILITY_NONE, ABILITY_SNOW_WARNING}, @@ -22364,7 +22385,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SNOW_CLOAK, ABILITY_NONE, ABILITY_SNOW_WARNING}, @@ -22388,7 +22409,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SOFT_SAND, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SAND_VEIL, ABILITY_TANGLING_HAIR, ABILITY_SAND_FORCE}, @@ -22412,7 +22433,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SOFT_SAND, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SAND_VEIL, ABILITY_TANGLING_HAIR, ABILITY_SAND_FORCE}, @@ -22436,7 +22457,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_QUICK_CLAW, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_PICKUP, ABILITY_TECHNICIAN, ABILITY_RATTLED}, @@ -22460,7 +22481,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_QUICK_CLAW, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_FUR_COAT, ABILITY_TECHNICIAN, ABILITY_RATTLED}, @@ -22484,7 +22505,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_CELL_BATTERY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_MAGNET_PULL, ABILITY_STURDY, ABILITY_GALVANIZE}, @@ -22508,7 +22529,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_CELL_BATTERY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_MAGNET_PULL, ABILITY_STURDY, ABILITY_GALVANIZE}, @@ -22531,7 +22552,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 3, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_MAGNET_PULL, ABILITY_STURDY, ABILITY_GALVANIZE}, @@ -22555,7 +22576,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_BLACK_SLUDGE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_POISON_TOUCH, ABILITY_GLUTTONY, ABILITY_POWER_OF_ALCHEMY}, @@ -22579,7 +22600,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_POISON_TOUCH, ABILITY_GLUTTONY, ABILITY_POWER_OF_ALCHEMY}, @@ -22602,7 +22623,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_FRISK, ABILITY_NONE, ABILITY_HARVEST}, @@ -22625,7 +22646,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, .abilities = {ABILITY_CURSED_BODY, ABILITY_LIGHTNING_ROD, ABILITY_ROCK_HEAD}, @@ -22648,7 +22669,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_PICKUP, ABILITY_TOUGH_CLAWS, ABILITY_UNNERVE}, @@ -22671,7 +22692,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RUN_AWAY, ABILITY_PASTEL_VEIL, ABILITY_ANTICIPATION}, @@ -22694,7 +22715,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_RUN_AWAY, ABILITY_PASTEL_VEIL, ABILITY_ANTICIPATION}, @@ -22717,7 +22738,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_GLUTTONY, ABILITY_OWN_TEMPO, ABILITY_REGENERATOR}, @@ -22740,7 +22761,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_QUICK_DRAW, ABILITY_OWN_TEMPO, ABILITY_REGENERATOR}, @@ -22764,7 +22785,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemCommon = ITEM_LEEK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FIELD}, .abilities = {ABILITY_STEADFAST, ABILITY_NONE, ABILITY_SCRAPPY}, @@ -22788,7 +22809,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_MISTY_SEED, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_LEVITATE, ABILITY_NEUTRALIZING_GAS, ABILITY_MISTY_SURGE}, @@ -22811,7 +22832,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_SCREEN_CLEANER, ABILITY_ICE_BODY}, @@ -22903,7 +22924,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, .abilities = {ABILITY_CURIOUS_MEDICINE, ABILITY_OWN_TEMPO, ABILITY_REGENERATOR}, @@ -22926,7 +22947,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, .abilities = {ABILITY_WEAK_ARMOR, ABILITY_NONE, ABILITY_CURSED_BODY}, @@ -22949,7 +22970,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_PICKUP, ABILITY_GLUTTONY, ABILITY_QUICK_FEET}, @@ -22972,7 +22993,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_PICKUP, ABILITY_GLUTTONY, ABILITY_QUICK_FEET}, @@ -22996,7 +23017,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_HUSTLE, ABILITY_NONE, ABILITY_INNER_FOCUS}, @@ -23019,7 +23040,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_GORILLA_TACTICS, ABILITY_NONE, ABILITY_ZEN_MODE}, @@ -23042,7 +23063,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_WANDERING_SPIRIT, ABILITY_NONE}, @@ -23065,7 +23086,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_AMORPHOUS}, .abilities = {ABILITY_MIMICRY, ABILITY_NONE}, @@ -23089,7 +23110,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 1, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INTIMIDATE, ABILITY_FLASH_FIRE, ABILITY_JUSTIFIED}, @@ -23112,7 +23133,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_INTIMIDATE, ABILITY_FLASH_FIRE, ABILITY_JUSTIFIED}, @@ -23135,7 +23156,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 1, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_SOUNDPROOF, ABILITY_STATIC, ABILITY_AFTERMATH}, @@ -23158,7 +23179,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = MON_GENDERLESS, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_SOUNDPROOF, ABILITY_STATIC, ABILITY_AFTERMATH}, @@ -23181,7 +23202,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_BLAZE, ABILITY_NONE, ABILITY_FLASH_FIRE}, @@ -23205,7 +23226,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_POISON_POINT, ABILITY_SWIFT_SWIM, ABILITY_INTIMIDATE}, @@ -23253,7 +23274,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_TORRENT, ABILITY_NONE, ABILITY_SHELL_ARMOR}, @@ -23277,7 +23298,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_ABSORB_BULB, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_GRASS, EGG_GROUP_GRASS}, .abilities = {ABILITY_CHLOROPHYLL, ABILITY_HUSTLE, ABILITY_LEAF_GUARD}, @@ -23300,7 +23321,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 1, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_ILLUSION, ABILITY_NONE}, @@ -23323,7 +23344,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_ILLUSION, ABILITY_NONE}, @@ -23346,7 +23367,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = MON_MALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_KEEN_EYE, ABILITY_SHEER_FORCE, ABILITY_DEFIANT}, @@ -23418,7 +23439,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STRONG_JAW, ABILITY_ICE_BODY, ABILITY_STURDY}, @@ -23443,7 +23464,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FLYING, EGG_GROUP_FLYING}, .abilities = {ABILITY_OVERGROW, ABILITY_NONE, ABILITY_LONG_REACH}, @@ -23590,7 +23611,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SILVER_POWDER, .genderRatio = MON_FEMALE, .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_ANTICIPATION, ABILITY_NONE, ABILITY_OVERCOAT}, @@ -23614,7 +23635,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_SILVER_POWDER, .genderRatio = MON_FEMALE, .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_BUG, EGG_GROUP_BUG}, .abilities = {ABILITY_ANTICIPATION, ABILITY_NONE, ABILITY_OVERCOAT}, @@ -23761,7 +23782,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_DEEP_SEA_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_ROCK_HEAD, ABILITY_ADAPTABILITY, ABILITY_MOLD_BREAKER}, @@ -23784,7 +23805,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .itemRare = ITEM_DEEP_SEA_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_RATTLED, ABILITY_ADAPTABILITY, ABILITY_MOLD_BREAKER}, @@ -23806,7 +23827,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_SHEER_FORCE, ABILITY_NONE, ABILITY_ZEN_MODE}, @@ -23828,7 +23849,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpAttack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_GORILLA_TACTICS, ABILITY_NONE, ABILITY_ZEN_MODE}, @@ -24031,7 +24052,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = MON_MALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_BATTLE_BOND, ABILITY_NONE}, @@ -24053,7 +24074,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 3, .genderRatio = MON_MALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_BATTLE_BOND, ABILITY_NONE}, @@ -24105,7 +24126,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 2, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_FLOWER_VEIL, ABILITY_NONE, ABILITY_SYMBIOSIS}, @@ -24142,7 +24163,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Speed = 2, .genderRatio = MON_FEMALE, .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_KEEN_EYE, ABILITY_INFILTRATOR, ABILITY_COMPETITIVE}, @@ -24170,7 +24191,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_SpDefense = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, .abilities = {ABILITY_STANCE_CHANGE, ABILITY_NONE}, @@ -24322,7 +24343,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_KEEN_EYE, ABILITY_VITAL_SPIRIT, ABILITY_NO_GUARD}, @@ -24344,7 +24365,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_MEDIUM_FAST, .eggGroups = { EGG_GROUP_FIELD, EGG_GROUP_FIELD}, .abilities = {ABILITY_TOUGH_CLAWS, ABILITY_NONE}, @@ -24366,7 +24387,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_HP = 1, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_FAST, .eggGroups = { EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, .abilities = {ABILITY_SCHOOLING, ABILITY_NONE}, @@ -24516,7 +24537,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Defense = 2, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, .abilities = {ABILITY_ICE_FACE, ABILITY_NONE}, @@ -24631,7 +24652,7 @@ const struct SpeciesInfo gSpeciesInfo[] = .evYield_Attack = 3, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 120, - .friendship = 70, + .friendship = STANDARD_FRIENDSHIP, .growthRate = GROWTH_SLOW, .eggGroups = { EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, .abilities = {ABILITY_UNSEEN_FIST, ABILITY_NONE}, diff --git a/src/data/pokemon/teachable_learnset_pointers.h b/src/data/pokemon/teachable_learnset_pointers.h index 28998aae1a..f8faf62d8f 100644 --- a/src/data/pokemon/teachable_learnset_pointers.h +++ b/src/data/pokemon/teachable_learnset_pointers.h @@ -789,9 +789,9 @@ const u16 *const gTeachableLearnsets[NUM_SPECIES] = [SPECIES_BRUXISH] = sBruxishTeachableLearnset, [SPECIES_DRAMPA] = sDrampaTeachableLearnset, [SPECIES_DHELMISE] = sDhelmiseTeachableLearnset, - [SPECIES_JANGMO_O] = sJangmooTeachableLearnset, - [SPECIES_HAKAMO_O] = sHakamooTeachableLearnset, - [SPECIES_KOMMO_O] = sKommooTeachableLearnset, + [SPECIES_JANGMO_O] = sJangmoOTeachableLearnset, + [SPECIES_HAKAMO_O] = sHakamoOTeachableLearnset, + [SPECIES_KOMMO_O] = sKommoOTeachableLearnset, [SPECIES_TAPU_KOKO] = sTapuKokoTeachableLearnset, [SPECIES_TAPU_LELE] = sTapuLeleTeachableLearnset, [SPECIES_TAPU_BULU] = sTapuBuluTeachableLearnset, @@ -1334,5 +1334,6 @@ const u16 *const gTeachableLearnsets[NUM_SPECIES] = [SPECIES_CALYREX_SHADOW_RIDER] = sCalyrexShadowRiderTeachableLearnset, // Enamorus [SPECIES_ENAMORUS_THERIAN] = sEnamorusTeachableLearnset, + [SPECIES_BASCULEGION_FEMALE] = sBasculegionTeachableLearnset, #endif }; diff --git a/src/data/pokemon/teachable_learnsets.h b/src/data/pokemon/teachable_learnsets.h index 19b22d9b3d..b0f162c6d9 100644 --- a/src/data/pokemon/teachable_learnsets.h +++ b/src/data/pokemon/teachable_learnsets.h @@ -29414,7 +29414,7 @@ static const u16 sDhelmiseTeachableLearnset[] = { MOVE_UNAVAILABLE, }; -static const u16 sJangmooTeachableLearnset[] = { +static const u16 sJangmoOTeachableLearnset[] = { MOVE_AERIAL_ACE, MOVE_ATTRACT, MOVE_BRICK_BREAK, @@ -29445,7 +29445,7 @@ static const u16 sJangmooTeachableLearnset[] = { MOVE_UNAVAILABLE, }; -static const u16 sHakamooTeachableLearnset[] = { +static const u16 sHakamoOTeachableLearnset[] = { MOVE_AERIAL_ACE, MOVE_ATTRACT, MOVE_BRICK_BREAK, @@ -29475,7 +29475,7 @@ static const u16 sHakamooTeachableLearnset[] = { MOVE_UNAVAILABLE, }; -static const u16 sKommooTeachableLearnset[] = { +static const u16 sKommoOTeachableLearnset[] = { MOVE_AERIAL_ACE, MOVE_ATTRACT, MOVE_BRICK_BREAK, @@ -30118,11 +30118,67 @@ static const u16 sZeraoraTeachableLearnset[] = { }; static const u16 sMeltanTeachableLearnset[] = { + MOVE_HEADBUTT, + MOVE_REST, + MOVE_PROTECT, + MOVE_SUBSTITUTE, + MOVE_THUNDER_WAVE, + MOVE_TOXIC, + MOVE_THUNDERBOLT, + MOVE_FLASH_CANNON, + MOVE_SNORE, + MOVE_FACADE, + MOVE_ROUND, + MOVE_ENDURE, + MOVE_SLEEP_TALK, + MOVE_IRON_DEFENSE, + MOVE_GYRO_BALL, + MOVE_STEEL_BEAM, MOVE_HIDDEN_POWER, MOVE_UNAVAILABLE, }; static const u16 sMelmetalTeachableLearnset[] = { + MOVE_HEADBUTT, + MOVE_REST, + MOVE_PROTECT, + MOVE_SUBSTITUTE, + MOVE_FACADE, + MOVE_BRICK_BREAK, + MOVE_THUNDER_WAVE, + MOVE_ROCK_SLIDE, + MOVE_THUNDER_PUNCH, + MOVE_TOXIC, + MOVE_ICE_PUNCH, + MOVE_THUNDERBOLT, + MOVE_THUNDER, + MOVE_EARTHQUAKE, + MOVE_SELF_DESTRUCT, + MOVE_SOLAR_BEAM, + MOVE_HYPER_BEAM, + MOVE_SUPERPOWER, + MOVE_FLASH_CANNON, + MOVE_ICE_BEAM, + MOVE_MEGA_PUNCH, + MOVE_MEGA_KICK, + MOVE_GIGA_IMPACT, + MOVE_SNORE, + MOVE_ROCK_TOMB, + MOVE_ROUND, + MOVE_ELECTRIC_TERRAIN, + MOVE_BRUTAL_SWING, + MOVE_BODY_SLAM, + MOVE_ENDURE, + MOVE_SLEEP_TALK, + MOVE_IRON_DEFENSE, + MOVE_GYRO_BALL, + MOVE_IRON_HEAD, + MOVE_HEAVY_SLAM, + MOVE_DARKEST_LARIAT, + MOVE_HIGH_HORSEPOWER, + MOVE_BODY_PRESS, + MOVE_STEEL_BEAM, + MOVE_STEEL_ROLLER, MOVE_HIDDEN_POWER, MOVE_UNAVAILABLE, }; diff --git a/src/data/pokemon_graphics/back_pic_coordinates.h b/src/data/pokemon_graphics/back_pic_coordinates.h index 8dbc2d2a98..06bf461c9a 100644 --- a/src/data/pokemon_graphics/back_pic_coordinates.h +++ b/src/data/pokemon_graphics/back_pic_coordinates.h @@ -518,7 +518,7 @@ const struct MonCoords gMonBackPicCoords[] = [SPECIES_DARKRAI] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_SHAYMIN] = { .size = MON_COORDS_SIZE(56, 40), .y_offset = 15 }, [SPECIES_ARCEUS] = ARCEUS_BACK_PIC_COORDS, -#endif +#endif #if P_GEN_5_POKEMON == TRUE [SPECIES_VICTINI] = { .size = MON_COORDS_SIZE(40, 64), .y_offset = 7 }, [SPECIES_SNIVY] = { .size = MON_COORDS_SIZE(56, 48), .y_offset = 11 }, @@ -1042,20 +1042,20 @@ const struct MonCoords gMonBackPicCoords[] = [SPECIES_ARCANINE_HISUIAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 3 }, [SPECIES_VOLTORB_HISUIAN] = { .size = MON_COORDS_SIZE(48, 32), .y_offset = 10 }, [SPECIES_ELECTRODE_HISUIAN] = { .size = MON_COORDS_SIZE(64, 40), .y_offset = 7 }, - [SPECIES_TYPHLOSION_HISUIAN] = { .size = MON_COORDS_SIZE(64, 56), .y_offset = 3 }, + [SPECIES_TYPHLOSION_HISUIAN] = { .size = MON_COORDS_SIZE(64, 56), .y_offset = 2 }, [SPECIES_QWILFISH_HISUIAN] = { .size = MON_COORDS_SIZE(56, 56), .y_offset = 6 }, [SPECIES_SNEASEL_HISUIAN] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 3 }, #if P_GEN_5_POKEMON == TRUE - [SPECIES_SAMUROTT_HISUIAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, + [SPECIES_SAMUROTT_HISUIAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 8 }, [SPECIES_LILLIGANT_HISUIAN] = { .size = MON_COORDS_SIZE(56, 56), .y_offset = 5 }, [SPECIES_ZORUA_HISUIAN] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 1 }, [SPECIES_ZOROARK_HISUIAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - [SPECIES_BRAVIARY_HISUIAN] = { .size = MON_COORDS_SIZE(64, 56), .y_offset = 0 }, + [SPECIES_BRAVIARY_HISUIAN] = { .size = MON_COORDS_SIZE(64, 56), .y_offset = 7 }, #endif #if P_GEN_6_POKEMON == TRUE [SPECIES_SLIGGOO_HISUIAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_GOODRA_HISUIAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - [SPECIES_AVALUGG_HISUIAN] = { .size = MON_COORDS_SIZE(64, 32), .y_offset = 17 }, + [SPECIES_AVALUGG_HISUIAN] = { .size = MON_COORDS_SIZE(64, 32), .y_offset = 16 }, #endif #if P_GEN_7_POKEMON == TRUE [SPECIES_DECIDUEYE_HISUIAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, @@ -1355,7 +1355,9 @@ const struct MonCoords gMonBackPicCoords[] = [SPECIES_CALYREX_ICE_RIDER] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 7 }, [SPECIES_CALYREX_SHADOW_RIDER] = { .size = MON_COORDS_SIZE(64, 56), .y_offset = 7 }, // Enamorus - [SPECIES_ENAMORUS_THERIAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, + [SPECIES_ENAMORUS_THERIAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 2 }, + // Basculegion + [SPECIES_BASCULEGION_FEMALE] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, #endif [SPECIES_EGG] = { .size = MON_COORDS_SIZE(24, 24), .y_offset = 20 }, }; diff --git a/src/data/pokemon_graphics/back_pic_table.h b/src/data/pokemon_graphics/back_pic_table.h index ebe0c316f8..32864907bb 100644 --- a/src/data/pokemon_graphics/back_pic_table.h +++ b/src/data/pokemon_graphics/back_pic_table.h @@ -789,9 +789,9 @@ const struct CompressedSpriteSheet gMonBackPicTable[] = SPECIES_SPRITE(BRUXISH, gMonBackPic_Bruxish), SPECIES_SPRITE(DRAMPA, gMonBackPic_Drampa), SPECIES_SPRITE(DHELMISE, gMonBackPic_Dhelmise), - SPECIES_SPRITE(JANGMO_O, gMonBackPic_Jangmoo), - SPECIES_SPRITE(HAKAMO_O, gMonBackPic_Hakamoo), - SPECIES_SPRITE(KOMMO_O, gMonBackPic_Kommoo), + SPECIES_SPRITE(JANGMO_O, gMonBackPic_JangmoO), + SPECIES_SPRITE(HAKAMO_O, gMonBackPic_HakamoO), + SPECIES_SPRITE(KOMMO_O, gMonBackPic_KommoO), SPECIES_SPRITE(TAPU_KOKO, gMonBackPic_TapuKoko), SPECIES_SPRITE(TAPU_LELE, gMonBackPic_TapuLele), SPECIES_SPRITE(TAPU_BULU, gMonBackPic_TapuBulu), @@ -908,13 +908,13 @@ const struct CompressedSpriteSheet gMonBackPicTable[] = SPECIES_SPRITE(GLASTRIER, gMonBackPic_Glastrier), SPECIES_SPRITE(SPECTRIER, gMonBackPic_Spectrier), SPECIES_SPRITE(CALYREX, gMonBackPic_Calyrex), - SPECIES_SPRITE(WYRDEER, gMonBackPic_CircledQuestionMark), //gMonBackPic_Wyrdeer), + SPECIES_SPRITE(WYRDEER, gMonBackPic_Wyrdeer), SPECIES_SPRITE(KLEAVOR, gMonBackPic_Kleavor), SPECIES_SPRITE(URSALUNA, gMonBackPic_Ursaluna), - SPECIES_SPRITE(BASCULEGION, gMonBackPic_CircledQuestionMark), //gMonBackPic_Basculegion), - SPECIES_SPRITE(SNEASLER, gMonBackPic_CircledQuestionMark), //gMonBackPic_Sneasler), + SPECIES_SPRITE(BASCULEGION, gMonBackPic_Basculegion), + SPECIES_SPRITE(SNEASLER, gMonBackPic_Sneasler), SPECIES_SPRITE(OVERQWIL, gMonBackPic_Overqwil), - SPECIES_SPRITE(ENAMORUS, gMonBackPic_CircledQuestionMark), //gMonBackPic_Enamorus), + SPECIES_SPRITE(ENAMORUS, gMonBackPic_Enamorus), #endif SPECIES_SPRITE(VENUSAUR_MEGA, gMonBackPic_VenusaurMega), @@ -1024,7 +1024,7 @@ const struct CompressedSpriteSheet gMonBackPicTable[] = SPECIES_SPRITE(QWILFISH_HISUIAN, gMonBackPic_QwilfishHisuian), SPECIES_SPRITE(SNEASEL_HISUIAN, gMonBackPic_SneaselHisuian), #if P_GEN_5_POKEMON == TRUE - SPECIES_SPRITE(SAMUROTT_HISUIAN, gMonBackPic_CircledQuestionMark), //gMonBackPic_SamurottHisuian), + SPECIES_SPRITE(SAMUROTT_HISUIAN, gMonBackPic_SamurottHisuian), SPECIES_SPRITE(LILLIGANT_HISUIAN, gMonBackPic_LilligantHisuian), SPECIES_SPRITE(ZORUA_HISUIAN, gMonBackPic_ZoruaHisuian), SPECIES_SPRITE(ZOROARK_HISUIAN, gMonBackPic_ZoroarkHisuian), @@ -1036,7 +1036,7 @@ const struct CompressedSpriteSheet gMonBackPicTable[] = SPECIES_SPRITE(AVALUGG_HISUIAN, gMonBackPic_AvaluggHisuian), #endif #if P_GEN_8_POKEMON == TRUE - SPECIES_SPRITE(DECIDUEYE_HISUIAN, gMonBackPic_CircledQuestionMark), //gMonBackPic_DecidueyeHisuian), + SPECIES_SPRITE(DECIDUEYE_HISUIAN, gMonBackPic_DecidueyeHisuian), #endif SPECIES_SPRITE(PIKACHU_COSPLAY, gMonBackPic_PikachuCosplay), @@ -1331,7 +1331,9 @@ const struct CompressedSpriteSheet gMonBackPicTable[] = SPECIES_SPRITE(CALYREX_ICE_RIDER, gMonBackPic_CalyrexIceRider), SPECIES_SPRITE(CALYREX_SHADOW_RIDER, gMonBackPic_CalyrexShadowRider), - SPECIES_SPRITE(ENAMORUS_THERIAN, gMonBackPic_CircledQuestionMark), //gMonBackPic_EnamorusTherian), + SPECIES_SPRITE(ENAMORUS_THERIAN, gMonBackPic_EnamorusTherian), + + SPECIES_SPRITE(BASCULEGION_FEMALE, gMonBackPic_BasculegionFemale), #endif SPECIES_SPRITE(EGG, gMonFrontPic_Egg), }; @@ -1359,7 +1361,4 @@ const struct CompressedSpriteSheet gMonBackPicTableFemale[] = #if P_GEN_6_POKEMON == TRUE SPECIES_SPRITE(PYROAR, gMonBackPic_PyroarF), #endif -#if P_GEN_8_POKEMON == TRUE - SPECIES_SPRITE(BASCULEGION, gMonBackPic_CircledQuestionMark), //gMonBackPic_BasculegionF), -#endif }; diff --git a/src/data/pokemon_graphics/footprint_table.h b/src/data/pokemon_graphics/footprint_table.h index 2b0dd0a4f6..8e21b0604e 100644 --- a/src/data/pokemon_graphics/footprint_table.h +++ b/src/data/pokemon_graphics/footprint_table.h @@ -789,9 +789,9 @@ const u8 *const gMonFootprintTable[] = [SPECIES_BRUXISH] = gMonFootprint_Bruxish, [SPECIES_DRAMPA] = gMonFootprint_Drampa, [SPECIES_DHELMISE] = gMonFootprint_Dhelmise, - [SPECIES_JANGMO_O] = gMonFootprint_Jangmo_o, - [SPECIES_HAKAMO_O] = gMonFootprint_Hakamo_o, - [SPECIES_KOMMO_O] = gMonFootprint_Kommo_o, + [SPECIES_JANGMO_O] = gMonFootprint_JangmoO, + [SPECIES_HAKAMO_O] = gMonFootprint_HakamoO, + [SPECIES_KOMMO_O] = gMonFootprint_KommoO, [SPECIES_TAPU_KOKO] = gMonFootprint_Tapu_Koko, [SPECIES_TAPU_LELE] = gMonFootprint_Tapu_Lele, [SPECIES_TAPU_BULU] = gMonFootprint_Tapu_Bulu, diff --git a/src/data/pokemon_graphics/front_pic_anims.h b/src/data/pokemon_graphics/front_pic_anims.h index b493b43573..326af6d1ee 100644 --- a/src/data/pokemon_graphics/front_pic_anims.h +++ b/src/data/pokemon_graphics/front_pic_anims.h @@ -12906,6 +12906,7 @@ const union AnimCmd *const *const gMonFrontAnimsPtrTable[] = [SPECIES_CALYREX_ICE_RIDER] = sAnims_Calyrex, [SPECIES_CALYREX_SHADOW_RIDER] = sAnims_Calyrex, [SPECIES_ENAMORUS_THERIAN] = sAnims_EnamorusTherian, + [SPECIES_BASCULEGION_FEMALE] = sAnims_Basculegion, #endif [SPECIES_EGG] = sAnims_Egg, }; diff --git a/src/data/pokemon_graphics/front_pic_coordinates.h b/src/data/pokemon_graphics/front_pic_coordinates.h index a484b85966..ea158229c5 100644 --- a/src/data/pokemon_graphics/front_pic_coordinates.h +++ b/src/data/pokemon_graphics/front_pic_coordinates.h @@ -920,7 +920,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_OVERQWIL] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_ENAMORUS] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, #endif - // Megas + // Megas [SPECIES_VENUSAUR_MEGA] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 3 }, [SPECIES_CHARIZARD_MEGA_X] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_CHARIZARD_MEGA_Y] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, @@ -974,11 +974,11 @@ const struct MonCoords gMonFrontPicCoords[] = #if P_GEN_6_POKEMON == TRUE [SPECIES_DIANCIE_MEGA] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, #endif - // Special Mega + Primals + // Special Mega + Primals [SPECIES_RAYQUAZA_MEGA] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_KYOGRE_PRIMAL] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_GROUDON_PRIMAL] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - // Alolan Forms + // Alolan Forms [SPECIES_RATTATA_ALOLAN] = { .size = MON_COORDS_SIZE(40, 48), .y_offset = 11 }, [SPECIES_RATICATE_ALOLAN] = { .size = MON_COORDS_SIZE(56, 48), .y_offset = 8 }, [SPECIES_RAICHU_ALOLAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, @@ -997,7 +997,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_MUK_ALOLAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 3 }, [SPECIES_EXEGGUTOR_ALOLAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_MAROWAK_ALOLAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 2 }, - // Galarian Forms + // Galarian Forms [SPECIES_MEOWTH_GALARIAN] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 9 }, [SPECIES_PONYTA_GALARIAN] = { .size = MON_COORDS_SIZE(64, 56), .y_offset = 8 }, [SPECIES_RAPIDASH_GALARIAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, @@ -1042,15 +1042,15 @@ const struct MonCoords gMonFrontPicCoords[] = #if P_GEN_7_POKEMON == TRUE [SPECIES_DECIDUEYE_HISUIAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, #endif - // Misc Forms - // Cosplay Pikachu + // Misc Forms + // Cosplay Pikachu [SPECIES_PIKACHU_COSPLAY] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 9 }, [SPECIES_PIKACHU_ROCK_STAR] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 9 }, [SPECIES_PIKACHU_BELLE] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 9 }, [SPECIES_PIKACHU_POP_STAR] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 9 }, [SPECIES_PIKACHU_PH_D] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 9 }, [SPECIES_PIKACHU_LIBRE] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 9 }, - // Cap Pikachu + // Cap Pikachu [SPECIES_PIKACHU_ORIGINAL_CAP] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 9 }, [SPECIES_PIKACHU_HOENN_CAP] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 9 }, [SPECIES_PIKACHU_SINNOH_CAP] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 9 }, @@ -1059,9 +1059,9 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_PIKACHU_ALOLA_CAP] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 9 }, [SPECIES_PIKACHU_PARTNER_CAP] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 9 }, [SPECIES_PIKACHU_WORLD_CAP] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 9 }, - // Pichu + // Pichu [SPECIES_PICHU_SPIKY_EARED] = { .size = MON_COORDS_SIZE(32, 40), .y_offset = 14 }, - // Unown + // Unown [SPECIES_UNOWN_B] = { .size = MON_COORDS_SIZE(24, 32), .y_offset = 16 }, [SPECIES_UNOWN_C] = { .size = MON_COORDS_SIZE(32, 32), .y_offset = 16 }, [SPECIES_UNOWN_D] = { .size = MON_COORDS_SIZE(32, 32), .y_offset = 16 }, @@ -1089,40 +1089,40 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_UNOWN_Z] = { .size = MON_COORDS_SIZE(24, 32), .y_offset = 16 }, [SPECIES_UNOWN_EMARK] = { .size = MON_COORDS_SIZE(24, 40), .y_offset = 15 }, [SPECIES_UNOWN_QMARK] = { .size = MON_COORDS_SIZE(24, 40), .y_offset = 13 }, - // Castform + // Castform [SPECIES_CASTFORM_SUNNY] = { .size = MON_COORDS_SIZE(40, 48), .y_offset = 9 }, [SPECIES_CASTFORM_RAINY] = { .size = MON_COORDS_SIZE(32, 48), .y_offset = 9 }, [SPECIES_CASTFORM_SNOWY] = { .size = MON_COORDS_SIZE(40, 56), .y_offset = 8 }, - // Deoxys + // Deoxys [SPECIES_DEOXYS_ATTACK] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_DEOXYS_DEFENSE] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 0 }, [SPECIES_DEOXYS_SPEED] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 1 }, #if P_GEN_4_POKEMON == TRUE - // Burmy + // Burmy [SPECIES_BURMY_SANDY_CLOAK] = { .size = MON_COORDS_SIZE(32, 56), .y_offset = 12 }, [SPECIES_BURMY_TRASH_CLOAK] = { .size = MON_COORDS_SIZE(32, 56), .y_offset = 8 }, - // Wormadam + // Wormadam [SPECIES_WORMADAM_SANDY_CLOAK] = { .size = MON_COORDS_SIZE(40, 56), .y_offset = 10 }, [SPECIES_WORMADAM_TRASH_CLOAK] = { .size = MON_COORDS_SIZE(48, 56), .y_offset = 10 }, - // Cherrim + // Cherrim [SPECIES_CHERRIM_SUNSHINE] = { .size = MON_COORDS_SIZE(48, 40), .y_offset = 12 }, - // Shellos + // Shellos [SPECIES_SHELLOS_EAST_SEA] = { .size = MON_COORDS_SIZE(40, 40), .y_offset = 14 }, - // Gastrodon + // Gastrodon [SPECIES_GASTRODON_EAST_SEA] = { .size = MON_COORDS_SIZE(56, 48), .y_offset = 8 }, - // Rotom + // Rotom [SPECIES_ROTOM_HEAT] = { .size = MON_COORDS_SIZE(56, 48), .y_offset = 10 }, [SPECIES_ROTOM_WASH] = { .size = MON_COORDS_SIZE(64, 56), .y_offset = 7 }, [SPECIES_ROTOM_FROST] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 4 }, [SPECIES_ROTOM_FAN] = { .size = MON_COORDS_SIZE(64, 56), .y_offset = 8 }, [SPECIES_ROTOM_MOW] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 12 }, - // Origin Forme + // Origin Forme [SPECIES_DIALGA_ORIGIN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_PALKIA_ORIGIN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_GIRATINA_ORIGIN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - // Shaymin + // Shaymin [SPECIES_SHAYMIN_SKY] = { .size = MON_COORDS_SIZE(56, 56), .y_offset = 7 }, - // Arceus + // Arceus [SPECIES_ARCEUS_FIGHTING] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_ARCEUS_FLYING] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_ARCEUS_POISON] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, @@ -1142,42 +1142,42 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_ARCEUS_FAIRY] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, #endif #if P_GEN_5_POKEMON == TRUE - // Basculin + // Basculin [SPECIES_BASCULIN_BLUE_STRIPED] = { .size = MON_COORDS_SIZE(56, 40), .y_offset = 16 }, [SPECIES_BASCULIN_WHITE_STRIPED] = { .size = MON_COORDS_SIZE(48, 40), .y_offset = 10 }, - // Darmanitan + // Darmanitan [SPECIES_DARMANITAN_ZEN_MODE] = { .size = MON_COORDS_SIZE(40, 40), .y_offset = 14 }, [SPECIES_DARMANITAN_ZEN_MODE_GALARIAN] = { .size = MON_COORDS_SIZE(48, 64), .y_offset = 2 }, - // Deerling + // Deerling [SPECIES_DEERLING_SUMMER] = { .size = MON_COORDS_SIZE(32, 48), .y_offset = 11 }, [SPECIES_DEERLING_AUTUMN] = { .size = MON_COORDS_SIZE(32, 48), .y_offset = 11 }, [SPECIES_DEERLING_WINTER] = { .size = MON_COORDS_SIZE(32, 48), .y_offset = 11 }, - // Sawsbuck + // Sawsbuck [SPECIES_SAWSBUCK_SUMMER] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_SAWSBUCK_AUTUMN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_SAWSBUCK_WINTER] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 0 }, - // Therian Forms + // Therian Forms [SPECIES_TORNADUS_THERIAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_THUNDURUS_THERIAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 2 }, [SPECIES_LANDORUS_THERIAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - // Kyurem + // Kyurem [SPECIES_KYUREM_WHITE] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_KYUREM_BLACK] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - // Keldeo + // Keldeo [SPECIES_KELDEO_RESOLUTE] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 2 }, - // Meloetta + // Meloetta [SPECIES_MELOETTA_PIROUETTE] = { .size = MON_COORDS_SIZE(40, 64), .y_offset = 2 }, - // Genesect + // Genesect [SPECIES_GENESECT_DOUSE_DRIVE] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 0 }, [SPECIES_GENESECT_SHOCK_DRIVE] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 0 }, [SPECIES_GENESECT_BURN_DRIVE] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 0 }, [SPECIES_GENESECT_CHILL_DRIVE] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 0 }, #endif #if P_GEN_6_POKEMON == TRUE - // Greninja + // Greninja [SPECIES_GRENINJA_BATTLE_BOND] = { .size = MON_COORDS_SIZE(64, 56), .y_offset = 7 }, [SPECIES_GRENINJA_ASH] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - // Vivillon + // Vivillon [SPECIES_VIVILLON_POLAR] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_VIVILLON_TUNDRA] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_VIVILLON_CONTINENTAL] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, @@ -1197,23 +1197,23 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_VIVILLON_JUNGLE] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_VIVILLON_FANCY] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_VIVILLON_POKE_BALL] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - // Flabébé + // Flabébé [SPECIES_FLABEBE_YELLOW_FLOWER] = { .size = MON_COORDS_SIZE(48, 56), .y_offset = 6 }, [SPECIES_FLABEBE_ORANGE_FLOWER] = { .size = MON_COORDS_SIZE(48, 56), .y_offset = 6 }, [SPECIES_FLABEBE_BLUE_FLOWER] = { .size = MON_COORDS_SIZE(48, 56), .y_offset = 6 }, [SPECIES_FLABEBE_WHITE_FLOWER] = { .size = MON_COORDS_SIZE(48, 56), .y_offset = 6 }, - // Floette + // Floette [SPECIES_FLOETTE_YELLOW_FLOWER] = { .size = MON_COORDS_SIZE(48, 64), .y_offset = 3 }, [SPECIES_FLOETTE_ORANGE_FLOWER] = { .size = MON_COORDS_SIZE(48, 64), .y_offset = 3 }, [SPECIES_FLOETTE_BLUE_FLOWER] = { .size = MON_COORDS_SIZE(48, 64), .y_offset = 3 }, [SPECIES_FLOETTE_WHITE_FLOWER] = { .size = MON_COORDS_SIZE(48, 64), .y_offset = 3 }, [SPECIES_FLOETTE_ETERNAL_FLOWER] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 3 }, - // Florges + // Florges [SPECIES_FLORGES_YELLOW_FLOWER] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_FLORGES_ORANGE_FLOWER] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_FLORGES_BLUE_FLOWER] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_FLORGES_WHITE_FLOWER] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - // Furfrou + // Furfrou [SPECIES_FURFROU_HEART_TRIM] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 2 }, [SPECIES_FURFROU_STAR_TRIM] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 2 }, [SPECIES_FURFROU_DIAMOND_TRIM] = { .size = MON_COORDS_SIZE(48, 64), .y_offset = 2 }, @@ -1223,41 +1223,41 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_FURFROU_LA_REINE_TRIM] = { .size = MON_COORDS_SIZE(48, 64), .y_offset = 2 }, [SPECIES_FURFROU_KABUKI_TRIM] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 2 }, [SPECIES_FURFROU_PHARAOH_TRIM] = { .size = MON_COORDS_SIZE(48, 64), .y_offset = 2 }, - // Meowstic + // Meowstic [SPECIES_MEOWSTIC_FEMALE] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 2 }, - // Aegislash + // Aegislash [SPECIES_AEGISLASH_BLADE] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - // Pumpkaboo + // Pumpkaboo [SPECIES_PUMPKABOO_SMALL] = { .size = MON_COORDS_SIZE(40, 40), .y_offset = 15 }, [SPECIES_PUMPKABOO_LARGE] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 12 }, [SPECIES_PUMPKABOO_SUPER] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 10 }, - // Gourgeist + // Gourgeist [SPECIES_GOURGEIST_SMALL] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 5 }, [SPECIES_GOURGEIST_LARGE] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 2 }, [SPECIES_GOURGEIST_SUPER] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - // Xerneas + // Xerneas [SPECIES_XERNEAS_ACTIVE] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - // Zygarde + // Zygarde [SPECIES_ZYGARDE_10] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 2 }, [SPECIES_ZYGARDE_10_POWER_CONSTRUCT] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 2 }, [SPECIES_ZYGARDE_50_POWER_CONSTRUCT] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_ZYGARDE_COMPLETE] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - // Hoopa + // Hoopa [SPECIES_HOOPA_UNBOUND] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, #endif #if P_GEN_7_POKEMON == TRUE - // Oricorio + // Oricorio [SPECIES_ORICORIO_POM_POM] = { .size = MON_COORDS_SIZE(56, 56), .y_offset = 5 }, [SPECIES_ORICORIO_PAU] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 3 }, [SPECIES_ORICORIO_SENSU] = { .size = MON_COORDS_SIZE(64, 56), .y_offset = 4 }, - // Rockruff + // Rockruff [SPECIES_ROCKRUFF_OWN_TEMPO] = { .size = MON_COORDS_SIZE(40, 48), .y_offset = 11 }, - // Lycanroc + // Lycanroc [SPECIES_LYCANROC_MIDNIGHT] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 1 }, [SPECIES_LYCANROC_DUSK] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 3 }, - // Wishiwashi + // Wishiwashi [SPECIES_WISHIWASHI_SCHOOL] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 4 }, - // Silvally + // Silvally [SPECIES_SILVALLY_FIGHTING] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_SILVALLY_FLYING] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_SILVALLY_POISON] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, @@ -1275,7 +1275,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_SILVALLY_DRAGON] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_SILVALLY_DARK] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_SILVALLY_FAIRY] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - // Minior + // Minior [SPECIES_MINIOR_METEOR_ORANGE] = { .size = MON_COORDS_SIZE(48, 40), .y_offset = 14 }, [SPECIES_MINIOR_METEOR_YELLOW] = { .size = MON_COORDS_SIZE(48, 40), .y_offset = 14 }, [SPECIES_MINIOR_METEOR_GREEN] = { .size = MON_COORDS_SIZE(48, 40), .y_offset = 14 }, @@ -1289,26 +1289,26 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_MINIOR_CORE_BLUE] = { .size = MON_COORDS_SIZE(48, 40), .y_offset = 14 }, [SPECIES_MINIOR_CORE_INDIGO] = { .size = MON_COORDS_SIZE(48, 40), .y_offset = 14 }, [SPECIES_MINIOR_CORE_VIOLET] = { .size = MON_COORDS_SIZE(48, 40), .y_offset = 14 }, - // Mimikyu + // Mimikyu [SPECIES_MIMIKYU_BUSTED] = { .size = MON_COORDS_SIZE(48, 40), .y_offset = 12 }, - // Necrozma + // Necrozma [SPECIES_NECROZMA_DUSK_MANE] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_NECROZMA_DAWN_WINGS] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_NECROZMA_ULTRA] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - // Magearna + // Magearna [SPECIES_MAGEARNA_ORIGINAL_COLOR] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 0 }, #endif #if P_GEN_8_POKEMON == TRUE - // Cramorant + // Cramorant [SPECIES_CRAMORANT_GULPING] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_CRAMORANT_GORGING] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - // Toxtricity + // Toxtricity [SPECIES_TOXTRICITY_LOW_KEY] = { .size = MON_COORDS_SIZE(48, 64), .y_offset = 2 }, - // Sinistea + // Sinistea [SPECIES_SINISTEA_ANTIQUE] = { .size = MON_COORDS_SIZE(40, 32), .y_offset = 17 }, - // Polteageist + // Polteageist [SPECIES_POLTEAGEIST_ANTIQUE] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 11 }, - // Alcremie + // Alcremie [SPECIES_ALCREMIE_RUBY_CREAM] = { .size = MON_COORDS_SIZE(40, 56), .y_offset = 7 }, [SPECIES_ALCREMIE_MATCHA_CREAM] = { .size = MON_COORDS_SIZE(40, 56), .y_offset = 7 }, [SPECIES_ALCREMIE_MINT_CREAM] = { .size = MON_COORDS_SIZE(40, 56), .y_offset = 7 }, @@ -1317,28 +1317,30 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_ALCREMIE_RUBY_SWIRL] = { .size = MON_COORDS_SIZE(40, 56), .y_offset = 7 }, [SPECIES_ALCREMIE_CARAMEL_SWIRL] = { .size = MON_COORDS_SIZE(40, 56), .y_offset = 7 }, [SPECIES_ALCREMIE_RAINBOW_SWIRL] = { .size = MON_COORDS_SIZE(40, 56), .y_offset = 7 }, - // Eiscue + // Eiscue [SPECIES_EISCUE_NOICE_FACE] = { .size = MON_COORDS_SIZE(40, 64), .y_offset = 0 }, - // Indeedee + // Indeedee [SPECIES_INDEEDEE_FEMALE] = { .size = MON_COORDS_SIZE(40, 48), .y_offset = 9 }, - // Morpeko + // Morpeko [SPECIES_MORPEKO_HANGRY] = { .size = MON_COORDS_SIZE(32, 40), .y_offset = 14 }, - // Zacian + // Zacian [SPECIES_ZACIAN_CROWNED_SWORD] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, - // Zamazenta + // Zamazenta [SPECIES_ZAMAZENTA_CROWNED_SHIELD] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 0 }, - // Eternatus + // Eternatus [SPECIES_ETERNATUS_ETERNAMAX] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 3 }, - // Urshifu + // Urshifu [SPECIES_URSHIFU_RAPID_STRIKE_STYLE] = { .size = MON_COORDS_SIZE(56, 64), .y_offset = 0 }, - // Zarude + // Zarude [SPECIES_ZARUDE_DADA] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 2 }, - // Calyrex + // Calyrex [SPECIES_CALYREX_ICE_RIDER] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_CALYREX_SHADOW_RIDER] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, [SPECIES_ENAMORUS_THERIAN] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, + // Basculegion + [SPECIES_BASCULEGION_FEMALE] = { .size = MON_COORDS_SIZE(64, 64), .y_offset = 0 }, #endif - // Egg + // Egg [SPECIES_EGG] = { .size = MON_COORDS_SIZE(24, 24), .y_offset = 20 }, }; diff --git a/src/data/pokemon_graphics/front_pic_table.h b/src/data/pokemon_graphics/front_pic_table.h index 24ebc78f38..fa56b8492e 100644 --- a/src/data/pokemon_graphics/front_pic_table.h +++ b/src/data/pokemon_graphics/front_pic_table.h @@ -789,9 +789,9 @@ const struct CompressedSpriteSheet gMonFrontPicTable[] = SPECIES_SPRITE(BRUXISH, gMonFrontPic_Bruxish), SPECIES_SPRITE(DRAMPA, gMonFrontPic_Drampa), SPECIES_SPRITE(DHELMISE, gMonFrontPic_Dhelmise), - SPECIES_SPRITE(JANGMO_O, gMonFrontPic_Jangmoo), - SPECIES_SPRITE(HAKAMO_O, gMonFrontPic_Hakamoo), - SPECIES_SPRITE(KOMMO_O, gMonFrontPic_Kommoo), + SPECIES_SPRITE(JANGMO_O, gMonFrontPic_JangmoO), + SPECIES_SPRITE(HAKAMO_O, gMonFrontPic_HakamoO), + SPECIES_SPRITE(KOMMO_O, gMonFrontPic_KommoO), SPECIES_SPRITE(TAPU_KOKO, gMonFrontPic_TapuKoko), SPECIES_SPRITE(TAPU_LELE, gMonFrontPic_TapuLele), SPECIES_SPRITE(TAPU_BULU, gMonFrontPic_TapuBulu), @@ -908,13 +908,13 @@ const struct CompressedSpriteSheet gMonFrontPicTable[] = SPECIES_SPRITE(GLASTRIER, gMonFrontPic_Glastrier), SPECIES_SPRITE(SPECTRIER, gMonFrontPic_Spectrier), SPECIES_SPRITE(CALYREX, gMonFrontPic_Calyrex), - SPECIES_SPRITE(WYRDEER, gMonFrontPic_CircledQuestionMark), //gMonFrontPic_Wyrdeer), + SPECIES_SPRITE(WYRDEER, gMonFrontPic_Wyrdeer), SPECIES_SPRITE(KLEAVOR, gMonFrontPic_Kleavor), SPECIES_SPRITE(URSALUNA, gMonFrontPic_Ursaluna), - SPECIES_SPRITE(BASCULEGION, gMonFrontPic_CircledQuestionMark), //gMonFrontPic_Basculegion), - SPECIES_SPRITE(SNEASLER, gMonFrontPic_CircledQuestionMark), //gMonFrontPic_Sneasler), + SPECIES_SPRITE(BASCULEGION, gMonFrontPic_Basculegion), + SPECIES_SPRITE(SNEASLER, gMonFrontPic_Sneasler), SPECIES_SPRITE(OVERQWIL, gMonFrontPic_Overqwil), - SPECIES_SPRITE(ENAMORUS, gMonFrontPic_CircledQuestionMark), //gMonFrontPic_Enamorus), + SPECIES_SPRITE(ENAMORUS, gMonFrontPic_Enamorus), #endif SPECIES_SPRITE(VENUSAUR_MEGA, gMonFrontPic_VenusaurMega), SPECIES_SPRITE(CHARIZARD_MEGA_X, gMonFrontPic_CharizardMegaX), @@ -1023,7 +1023,7 @@ const struct CompressedSpriteSheet gMonFrontPicTable[] = SPECIES_SPRITE(QWILFISH_HISUIAN, gMonFrontPic_QwilfishHisuian), SPECIES_SPRITE(SNEASEL_HISUIAN, gMonFrontPic_SneaselHisuian), #if P_GEN_5_POKEMON == TRUE - SPECIES_SPRITE(SAMUROTT_HISUIAN, gMonFrontPic_CircledQuestionMark), //gMonFrontPic_SamurottHisuian), + SPECIES_SPRITE(SAMUROTT_HISUIAN, gMonFrontPic_SamurottHisuian), SPECIES_SPRITE(LILLIGANT_HISUIAN, gMonFrontPic_LilligantHisuian), SPECIES_SPRITE(ZORUA_HISUIAN, gMonFrontPic_ZoruaHisuian), SPECIES_SPRITE(ZOROARK_HISUIAN, gMonFrontPic_ZoroarkHisuian), @@ -1035,7 +1035,7 @@ const struct CompressedSpriteSheet gMonFrontPicTable[] = SPECIES_SPRITE(AVALUGG_HISUIAN, gMonFrontPic_AvaluggHisuian), #endif #if P_GEN_7_POKEMON == TRUE - SPECIES_SPRITE(DECIDUEYE_HISUIAN, gMonFrontPic_CircledQuestionMark), //gMonFrontPic_DecidueyeHisuian), + SPECIES_SPRITE(DECIDUEYE_HISUIAN, gMonFrontPic_DecidueyeHisuian), #endif SPECIES_SPRITE(PIKACHU_COSPLAY, gMonFrontPic_PikachuCosplay), @@ -1330,7 +1330,9 @@ const struct CompressedSpriteSheet gMonFrontPicTable[] = SPECIES_SPRITE(CALYREX_ICE_RIDER, gMonFrontPic_CalyrexIceRider), SPECIES_SPRITE(CALYREX_SHADOW_RIDER, gMonFrontPic_CalyrexShadowRider), - SPECIES_SPRITE(ENAMORUS_THERIAN, gMonFrontPic_CircledQuestionMark), //gMonFrontPic_EnamorusTherian), + SPECIES_SPRITE(ENAMORUS_THERIAN, gMonFrontPic_EnamorusTherian), + + SPECIES_SPRITE(BASCULEGION_FEMALE, gMonFrontPic_BasculegionFemale), #endif SPECIES_SPRITE(EGG, gMonFrontPic_Egg), }; @@ -1358,7 +1360,4 @@ const struct CompressedSpriteSheet gMonFrontPicTableFemale[] = #if P_GEN_6_POKEMON == TRUE SPECIES_SPRITE(PYROAR, gMonFrontPic_PyroarF), #endif -#if P_GEN_7_POKEMON == TRUE - SPECIES_SPRITE(BASCULEGION, gMonFrontPic_CircledQuestionMark), //gMonFrontPic_BasculegionF), -#endif }; diff --git a/src/data/pokemon_graphics/palette_table.h b/src/data/pokemon_graphics/palette_table.h index a8c986d795..0e6c996422 100644 --- a/src/data/pokemon_graphics/palette_table.h +++ b/src/data/pokemon_graphics/palette_table.h @@ -789,9 +789,9 @@ const struct CompressedSpritePalette gMonPaletteTable[] = SPECIES_PAL(BRUXISH, gMonPalette_Bruxish), SPECIES_PAL(DRAMPA, gMonPalette_Drampa), SPECIES_PAL(DHELMISE, gMonPalette_Dhelmise), - SPECIES_PAL(JANGMO_O, gMonPalette_Jangmoo), - SPECIES_PAL(HAKAMO_O, gMonPalette_Hakamoo), - SPECIES_PAL(KOMMO_O, gMonPalette_Kommoo), + SPECIES_PAL(JANGMO_O, gMonPalette_JangmoO), + SPECIES_PAL(HAKAMO_O, gMonPalette_HakamoO), + SPECIES_PAL(KOMMO_O, gMonPalette_KommoO), SPECIES_PAL(TAPU_KOKO, gMonPalette_TapuKoko), SPECIES_PAL(TAPU_LELE, gMonPalette_TapuLele), SPECIES_PAL(TAPU_BULU, gMonPalette_TapuBulu), @@ -908,13 +908,13 @@ const struct CompressedSpritePalette gMonPaletteTable[] = SPECIES_PAL(GLASTRIER, gMonPalette_Glastrier), SPECIES_PAL(SPECTRIER, gMonPalette_Spectrier), SPECIES_PAL(CALYREX, gMonPalette_Calyrex), - SPECIES_PAL(WYRDEER, gMonPalette_CircledQuestionMark), // gMonPalette_Wyrdeer), + SPECIES_PAL(WYRDEER, gMonPalette_Wyrdeer), SPECIES_PAL(KLEAVOR, gMonPalette_Kleavor), SPECIES_PAL(URSALUNA, gMonPalette_Ursaluna), - SPECIES_PAL(BASCULEGION, gMonPalette_CircledQuestionMark), // gMonPalette_Basculegion), - SPECIES_PAL(SNEASLER, gMonPalette_CircledQuestionMark), // gMonPalette_Sneasler), + SPECIES_PAL(BASCULEGION, gMonPalette_Basculegion), + SPECIES_PAL(SNEASLER, gMonPalette_Sneasler), SPECIES_PAL(OVERQWIL, gMonPalette_Overqwil), - SPECIES_PAL(ENAMORUS, gMonPalette_CircledQuestionMark), // gMonPalette_Enamorus), + SPECIES_PAL(ENAMORUS, gMonPalette_Enamorus), #endif SPECIES_PAL(VENUSAUR_MEGA, gMonPalette_VenusaurMega), SPECIES_PAL(CHARIZARD_MEGA_X, gMonPalette_CharizardMegaX), @@ -1023,7 +1023,7 @@ const struct CompressedSpritePalette gMonPaletteTable[] = SPECIES_PAL(QWILFISH_HISUIAN, gMonPalette_QwilfishHisuian), #if P_GEN_5_POKEMON == TRUE SPECIES_PAL(SNEASEL_HISUIAN, gMonPalette_SneaselHisuian), - SPECIES_PAL(SAMUROTT_HISUIAN, gMonPalette_CircledQuestionMark), //gMonPalette_SamurottHisuian), + SPECIES_PAL(SAMUROTT_HISUIAN, gMonPalette_SamurottHisuian), SPECIES_PAL(LILLIGANT_HISUIAN, gMonPalette_LilligantHisuian), SPECIES_PAL(ZORUA_HISUIAN, gMonPalette_ZoruaHisuian), SPECIES_PAL(ZOROARK_HISUIAN, gMonPalette_ZoroarkHisuian), @@ -1035,7 +1035,7 @@ const struct CompressedSpritePalette gMonPaletteTable[] = SPECIES_PAL(AVALUGG_HISUIAN, gMonPalette_AvaluggHisuian), #endif #if P_GEN_7_POKEMON == TRUE - SPECIES_PAL(DECIDUEYE_HISUIAN, gMonPalette_CircledQuestionMark), //gMonPalette_DecidueyeHisuian), + SPECIES_PAL(DECIDUEYE_HISUIAN, gMonPalette_DecidueyeHisuian), #endif SPECIES_PAL(PIKACHU_COSPLAY, gMonPalette_PikachuCosplay), @@ -1330,7 +1330,8 @@ const struct CompressedSpritePalette gMonPaletteTable[] = SPECIES_PAL(CALYREX_ICE_RIDER, gMonPalette_CalyrexIceRider), SPECIES_PAL(CALYREX_SHADOW_RIDER, gMonPalette_CalyrexShadowRider), - SPECIES_PAL(ENAMORUS_THERIAN, gMonPalette_CircledQuestionMark), // gMonPalette_EnamorusTherian), + SPECIES_PAL(ENAMORUS_THERIAN, gMonPalette_EnamorusTherian), + SPECIES_PAL(BASCULEGION_FEMALE, gMonPalette_BasculegionFemale), #endif SPECIES_PAL(EGG, gMonPalette_Egg), }; @@ -1358,7 +1359,4 @@ const struct CompressedSpritePalette gMonPaletteTableFemale[] = #if P_GEN_6_POKEMON == TRUE SPECIES_PAL(PYROAR, gMonPalette_Pyroar), #endif -#if P_GEN_8_POKEMON == TRUE - SPECIES_PAL(BASCULEGION, gMonPalette_CircledQuestionMark), // gMonPalette_BasculegionF), -#endif }; diff --git a/src/data/pokemon_graphics/shiny_palette_table.h b/src/data/pokemon_graphics/shiny_palette_table.h index 012a95cf1f..0123b0e1fc 100644 --- a/src/data/pokemon_graphics/shiny_palette_table.h +++ b/src/data/pokemon_graphics/shiny_palette_table.h @@ -789,9 +789,9 @@ const struct CompressedSpritePalette gMonShinyPaletteTable[] = SPECIES_SHINY_PAL(BRUXISH, gMonShinyPalette_Bruxish), SPECIES_SHINY_PAL(DRAMPA, gMonShinyPalette_Drampa), SPECIES_SHINY_PAL(DHELMISE, gMonShinyPalette_Dhelmise), - SPECIES_SHINY_PAL(JANGMO_O, gMonShinyPalette_Jangmoo), - SPECIES_SHINY_PAL(HAKAMO_O, gMonShinyPalette_Hakamoo), - SPECIES_SHINY_PAL(KOMMO_O, gMonShinyPalette_Kommoo), + SPECIES_SHINY_PAL(JANGMO_O, gMonShinyPalette_JangmoO), + SPECIES_SHINY_PAL(HAKAMO_O, gMonShinyPalette_HakamoO), + SPECIES_SHINY_PAL(KOMMO_O, gMonShinyPalette_KommoO), SPECIES_SHINY_PAL(TAPU_KOKO, gMonShinyPalette_TapuKoko), SPECIES_SHINY_PAL(TAPU_LELE, gMonShinyPalette_TapuLele), SPECIES_SHINY_PAL(TAPU_BULU, gMonShinyPalette_TapuBulu), @@ -908,13 +908,13 @@ const struct CompressedSpritePalette gMonShinyPaletteTable[] = SPECIES_SHINY_PAL(GLASTRIER, gMonShinyPalette_Glastrier), SPECIES_SHINY_PAL(SPECTRIER, gMonShinyPalette_Spectrier), SPECIES_SHINY_PAL(CALYREX, gMonShinyPalette_Calyrex), - SPECIES_SHINY_PAL(WYRDEER, gMonShinyPalette_CircledQuestionMark), // gMonShinyPalette_Wyrdeer), + SPECIES_SHINY_PAL(WYRDEER, gMonShinyPalette_Wyrdeer), SPECIES_SHINY_PAL(KLEAVOR, gMonShinyPalette_Kleavor), SPECIES_SHINY_PAL(URSALUNA, gMonShinyPalette_Ursaluna), - SPECIES_SHINY_PAL(BASCULEGION, gMonShinyPalette_CircledQuestionMark), // gMonShinyPalette_Basculegion), - SPECIES_SHINY_PAL(SNEASLER, gMonShinyPalette_CircledQuestionMark), // gMonShinyPalette_Sneasler), + SPECIES_SHINY_PAL(BASCULEGION, gMonShinyPalette_Basculegion), + SPECIES_SHINY_PAL(SNEASLER, gMonShinyPalette_Sneasler), SPECIES_SHINY_PAL(OVERQWIL, gMonShinyPalette_Overqwil), - SPECIES_SHINY_PAL(ENAMORUS, gMonShinyPalette_CircledQuestionMark), // gMonShinyPalette_Enamorus), + SPECIES_SHINY_PAL(ENAMORUS, gMonShinyPalette_Enamorus), #endif SPECIES_SHINY_PAL(VENUSAUR_MEGA, gMonShinyPalette_VenusaurMega), @@ -1024,7 +1024,7 @@ const struct CompressedSpritePalette gMonShinyPaletteTable[] = SPECIES_SHINY_PAL(QWILFISH_HISUIAN, gMonShinyPalette_QwilfishHisuian), SPECIES_SHINY_PAL(SNEASEL_HISUIAN, gMonShinyPalette_SneaselHisuian), #if P_GEN_5_POKEMON == TRUE - SPECIES_SHINY_PAL(SAMUROTT_HISUIAN, gMonShinyPalette_CircledQuestionMark), //gMonShinyPalette_SamurottHisuian), + SPECIES_SHINY_PAL(SAMUROTT_HISUIAN, gMonShinyPalette_SamurottHisuian), SPECIES_SHINY_PAL(LILLIGANT_HISUIAN, gMonShinyPalette_LilligantHisuian), SPECIES_SHINY_PAL(ZORUA_HISUIAN, gMonShinyPalette_ZoruaHisuian), SPECIES_SHINY_PAL(ZOROARK_HISUIAN, gMonShinyPalette_ZoroarkHisuian), @@ -1036,7 +1036,7 @@ const struct CompressedSpritePalette gMonShinyPaletteTable[] = SPECIES_SHINY_PAL(AVALUGG_HISUIAN, gMonShinyPalette_AvaluggHisuian), #endif #if P_GEN_7_POKEMON == TRUE - SPECIES_SHINY_PAL(DECIDUEYE_HISUIAN, gMonShinyPalette_CircledQuestionMark), //gMonShinyPalette_DecidueyeHisuian), + SPECIES_SHINY_PAL(DECIDUEYE_HISUIAN, gMonShinyPalette_DecidueyeHisuian), #endif SPECIES_SHINY_PAL(PIKACHU_COSPLAY, gMonShinyPalette_PikachuCosplay), @@ -1328,8 +1328,9 @@ const struct CompressedSpritePalette gMonShinyPaletteTable[] = SPECIES_SHINY_PAL(CALYREX_ICE_RIDER, gMonShinyPalette_CalyrexIceRider), SPECIES_SHINY_PAL(CALYREX_SHADOW_RIDER, gMonShinyPalette_CalyrexShadowRider), - - SPECIES_SHINY_PAL(ENAMORUS_THERIAN, gMonShinyPalette_CircledQuestionMark), //gMonShinyPalette_EnamorusTherian), + + SPECIES_SHINY_PAL(BASCULEGION_FEMALE, gMonShinyPalette_BasculegionFemale), + SPECIES_SHINY_PAL(ENAMORUS_THERIAN, gMonShinyPalette_EnamorusTherian), #endif SPECIES_SHINY_PAL(EGG, gMonPalette_Egg), }; @@ -1357,7 +1358,4 @@ const struct CompressedSpritePalette gMonShinyPaletteTableFemale[] = #if P_GEN_6_POKEMON == TRUE SPECIES_SHINY_PAL(PYROAR, gMonShinyPalette_Pyroar), #endif -#if P_GEN_8_POKEMON == TRUE - SPECIES_SHINY_PAL(BASCULEGION, gMonShinyPalette_CircledQuestionMark), // gMonShinyPalette_BasculegionF), -#endif }; diff --git a/src/data/text/item_descriptions.h b/src/data/text/item_descriptions.h index e815d8ae1f..5dc870038a 100644 --- a/src/data/text/item_descriptions.h +++ b/src/data/text/item_descriptions.h @@ -1300,6 +1300,21 @@ static const u8 sEverstoneDesc[] = _( "item that prevents\n" "evolution."); +static const u8 sBlackAuguriteDesc[] = _( + "A black stone that\n" + "makes some Pokémon\n" + "evolve.");; + +static const u8 sLinkingCordDesc[] = _( + "A mysterious string\n" + "that makes some\n" + "Pokémon evolve."); + +static const u8 sPeatBlockDesc[] = _( + "A block of material\n" + "that makes some\n" + "Pokémon evolve."); + // Nectars static const u8 sRedNectarDesc[] = _( "Flower nectar that\n" @@ -3817,3 +3832,78 @@ static const u8 sLoadedDiceDesc[] = _( "Rolls high numbers.\n" "Multihit strikes\n" "hit more times."); + +static const u8 sAuspiciousArmorDesc[] = _( + "Armor inhabited by\n" + "auspicious wishes.\n" + "Causes evolution."); + +static const u8 sBoosterEnergyDesc[] = _( + "Encapsuled energy\n" + "ups Pokémon with\n" + "certain Abilities."); + +static const u8 sBigBambooShootDesc[] = _( + "A large and rare\n" + "bamboo shoot. Best\n" + "sold to gourmands."); + +static const u8 sGimmighoulCoinDesc[] = _( + "Gimmighoul hoard\n" + "and treasure these\n" + "curious coins."); + +static const u8 sLeadersCrestDesc[] = _( + "A shard of an old\n" + "blade of some sort.\n" + "Held by Bisharp."); + +static const u8 sMaliciousArmorDesc[] = _( + "Armor inhabited by\n" + "malicious will.\n" + "Causes evolution."); + +static const u8 sMirrorHerbDesc[] = _( + "Mirrors an enemy's\n" + "stat increases\n" + "but only once."); + +static const u8 sScrollOfDarknessDesc[] = _( + "A peculiar scroll\n" + "with secrets of\n" + "the dark path."); + +static const u8 sScrollOfWatersDesc[] = _( + "A peculiar scroll\n" + "with secrets of\n" + "the water path."); + +static const u8 sTeraOrbDesc[] = _( + "Energy charges can\n" + "be used to cause\n" + "Terastallization."); + +static const u8 sTinyBambooShootDesc[] = _( + "A small and rare\n" + "bamboo shoot. Best\n" + "sold to gourmands."); + +static const u8 sTeraShardDesc[] = _( + "These shards may\n" + "form when a Tera\n" + "Pokémon faints."); + +static const u8 sAdamantCrystalDesc[] = _( + "A large, glowing gem\n" + "that lets Dialga\n" + "change form."); + +static const u8 sGriseousCoreDesc[] = _( + "A large, glowing gem\n" + "that lets Giratina\n" + "change form."); + +static const u8 sLustrousGlobeDesc[] = _( + "A large, glowing gem\n" + "that lets Palkia\n" + "change form."); diff --git a/src/data/text/move_descriptions.h b/src/data/text/move_descriptions.h index 7000759f75..c2b7e0b234 100644 --- a/src/data/text/move_descriptions.h +++ b/src/data/text/move_descriptions.h @@ -3236,6 +3236,14 @@ static const u8 sCombatTorqueDescription[] = _( static const u8 sMagicalTorqueDescription[] = _( "---"); +static const u8 sPsybladeDescription[] = _( + "This move's power increases\n" + "when on Electric Terrain."); + +static const u8 sHydroSteamDescription[] = _( + "This move's power increases\n" + "under harsh sunlight."); + const u8 gNotDoneYetDescription[] = _( "This move can't be used. Its\n" "effect is in development."); @@ -4073,4 +4081,6 @@ const u8 *const gMoveDescriptionPointers[MOVES_COUNT - 1] = [MOVE_NOXIOUS_TORQUE - 1] = sNoxiousTorqueDescription, [MOVE_COMBAT_TORQUE - 1] = sCombatTorqueDescription, [MOVE_MAGICAL_TORQUE - 1] = sMagicalTorqueDescription, + [MOVE_PSYBLADE - 1] = sPsybladeDescription, + [MOVE_HYDRO_STEAM - 1] = sHydroSteamDescription, }; diff --git a/src/data/text/move_names.h b/src/data/text/move_names.h index 221d3db73d..85d406dcab 100644 --- a/src/data/text/move_names.h +++ b/src/data/text/move_names.h @@ -829,6 +829,8 @@ const u8 gMoveNames[MOVES_COUNT][MOVE_NAME_LENGTH + 1] = [MOVE_NOXIOUS_TORQUE] = _("Noxious Torque"), [MOVE_COMBAT_TORQUE] = _("Combat Torque"), [MOVE_MAGICAL_TORQUE] = _("Magical Torque"), + [MOVE_PSYBLADE] = _("Psyblade"), + [MOVE_HYDRO_STEAM] = _("Hydro Steam"), }; #else // 12 letters @@ -1661,6 +1663,8 @@ const u8 gMoveNames[MOVES_COUNT][MOVE_NAME_LENGTH + 1] = [MOVE_NOXIOUS_TORQUE] = _("NoxiusTorque"), [MOVE_COMBAT_TORQUE] = _("CombatTorque"), [MOVE_MAGICAL_TORQUE] = _("MagiclTorque"), + [MOVE_PSYBLADE] = _("Psyblade"), + [MOVE_HYDRO_STEAM] = _("Hydro Steam"), }; #endif diff --git a/src/data/text/species_names.h b/src/data/text/species_names.h index ec452b31ba..9e60b94cf5 100644 --- a/src/data/text/species_names.h +++ b/src/data/text/species_names.h @@ -1336,5 +1336,6 @@ const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1] = { // Calyrex [SPECIES_CALYREX_ICE_RIDER] = _("Calyrex"), [SPECIES_CALYREX_SHADOW_RIDER] = _("Calyrex"), + [SPECIES_BASCULEGION_FEMALE] = _("Bsculegion"), #endif }; diff --git a/src/data/trade.h b/src/data/trade.h index 80d17a49ba..ef7e9231de 100644 --- a/src/data/trade.h +++ b/src/data/trade.h @@ -55,7 +55,7 @@ static const u8 sText_OnlyPkmnForBattle[] = _("That's your only\nPOKéMON for ba static const u8 sText_WaitingForYourFriend[] = _("{COLOR DARK_GRAY}{HIGHLIGHT WHITE}{SHADOW LIGHT_GRAY}Waiting for your friend\nto finish…"); static const u8 sText_YourFriendWantsToTrade[] = _("Your friend wants\nto trade POKéMON."); -static const struct OamData sTradeOamData_32x16 = +static const struct OamData sOamData_MenuText = { .shape = SPRITE_SHAPE(32x16), .size = SPRITE_SIZE(32x16), @@ -167,17 +167,17 @@ static const struct SpriteTemplate sSpriteTemplate_MenuText = { .tileTag = GFXTAG_MENU_TEXT, .paletteTag = PALTAG_MENU_TEXT, - .oam = &sTradeOamData_32x16, + .oam = &sOamData_MenuText, .anims = sAnims_MenuText, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy, }; -static const u16 sTradeScreenTextPalette[] = INCBIN_U16("graphics/trade/text.gbapal"); -static const struct SpritePalette sSpritePalette_TradeScreenText = +static const u16 sMenuText_Pal[] = INCBIN_U16("graphics/trade/text.gbapal"); +static const struct SpritePalette sSpritePalette_MenuText = { - .data = sTradeScreenTextPalette, + .data = sMenuText_Pal, .tag = PALTAG_MENU_TEXT }; @@ -193,7 +193,7 @@ static const struct SpritePalette sSpritePalette_TradeScreenText = // 1st array is the current positions // 2nd array is directions of input // 3rd array is the next positions to go to (unoccupied spaces are skipped over) -static const u8 sTradeNextSelectedMonTable[(PARTY_SIZE * 2) + 1][4][PARTY_SIZE] = +static const u8 sCursorMoveDestinations[(PARTY_SIZE * 2) + 1][4][PARTY_SIZE] = { { {4, 2, 12, 12, 0, 0}, // UP @@ -275,86 +275,67 @@ static const u8 sTradeNextSelectedMonTable[(PARTY_SIZE * 2) + 1][4][PARTY_SIZE] } }; +#define COL0_X 1 +#define COL1_X 8 +#define COL2_X 16 +#define COL3_X 23 +#define ROW0_Y 5 +#define ROW1_Y 10 +#define ROW2_Y 15 +#define ROW3_Y 18 + static const u8 sTradeMonSpriteCoords[(PARTY_SIZE * 2) + 1][2] = { - // Your party - {1, 5 }, - {8, 5 }, - {1, 10}, - {8, 10}, - {1, 15}, - {8, 15}, - - // Friend's party - {16, 5 }, - {23, 5 }, - {16, 10}, - {23, 10}, - {16, 15}, - {23, 15}, - - {23, 18} // CANCEL + // Player's party + {COL0_X, ROW0_Y}, + {COL1_X, ROW0_Y}, + {COL0_X, ROW1_Y}, + {COL1_X, ROW1_Y}, + {COL0_X, ROW2_Y}, + {COL1_X, ROW2_Y}, + // Partners's party + {COL2_X, ROW0_Y}, + {COL3_X, ROW0_Y}, + {COL2_X, ROW1_Y}, + {COL3_X, ROW1_Y}, + {COL2_X, ROW2_Y}, + {COL3_X, ROW2_Y}, + // Cancel + {COL3_X, ROW3_Y} }; -static const u8 sTradeMonLevelCoords[][2][2] = -{ - // Your party - { - {5, 4}, - {12, 4}, - }, - { - {5, 9}, - {12, 9}, - }, - { - {5, 14}, +static const u8 sTradeMonLevelCoords[PARTY_SIZE * 2][2] = { + [TRADE_PLAYER] = + { 5, 4}, + {12, 4}, + { 5, 9}, + {12, 9}, + { 5, 14}, {12, 14}, - }, - // Friend's party - { - - {20, 4}, - {27, 4}, - }, - { - {20, 9}, - {27, 9}, - }, - { + [TRADE_PARTNER * PARTY_SIZE] = + {20, 4}, + {27, 4}, + {20, 9}, + {27, 9}, {20, 14}, {27, 14}, - }, }; -static const u8 sTradeMonBoxCoords[][2][2] = -{ - // Your party - { - {1, 3}, - {8, 3}, - }, - { - {1, 8}, - {8, 8}, - }, - { - {1, 13}, - {8, 13}, - }, - // Friend's party - { - {16, 3}, - {23, 3}, - }, - { - {16, 8}, - {23, 8}, - }, - { +static const u8 sTradeMonBoxCoords[PARTY_SIZE * 2][2] = { + [TRADE_PLAYER] = + { 1, 3}, + { 8, 3}, + { 1, 8}, + { 8, 8}, + { 1, 13}, + { 8, 13}, + [TRADE_PARTNER * PARTY_SIZE] = + {16, 3}, + {23, 3}, + {16, 8}, + {23, 8}, {16, 13}, {23, 13}, - }, }; static const u8 sUnusedCoords[][2] = @@ -379,14 +360,14 @@ static const u8 sUnusedCoords[][2] = {23, 12} }; -static const u8 *const sTradeActionTexts[] = +static const u8 *const sActionTexts[] = { - [TRADE_TEXT_CANCEL] = sText_Cancel, - [TRADE_TEXT_CHOOSE_MON] = sText_ChooseAPkmn, - [TRADE_TEXT_SUMMARY] = sText_Summary, - [TRADE_TEXT_TRADE] = sText_Trade, - [TRADE_TEXT_CANCEL_TRADE] = sText_CancelTrade, - [TRADE_TEXT_JP_QUIT] = sJPText_PressBButtonToQuit + [TEXT_CANCEL] = sText_Cancel, + [TEXT_CHOOSE_MON] = sText_ChooseAPkmn, + [TEXT_SUMMARY] = sText_Summary, + [TEXT_TRADE] = sText_Trade, + [TEXT_CANCEL_TRADE] = sText_CancelTrade, + [TEXT_JP_QUIT] = sJPText_PressBButtonToQuit }; static const struct MenuAction sSelectTradeMonActions[] = @@ -395,17 +376,17 @@ static const struct MenuAction sSelectTradeMonActions[] = {sText_Trade2, Task_DrawSelectionTrade} }; -static const u8 *const sTradeMessages[] = +static const u8 *const sMessages[] = { - [TRADE_MSG_STANDBY] = sText_CommunicationStandby, - [TRADE_MSG_CANCELED] = sText_TheTradeHasBeenCanceled, - [TRADE_MSG_ONLY_MON1] = sText_OnlyPkmnForBattle, - [TRADE_MSG_ONLY_MON2] = gText_OnlyPkmnForBattle, //identical text to above - [TRADE_MSG_WAITING_FOR_FRIEND] = sText_WaitingForYourFriend, - [TRADE_MSG_FRIEND_WANTS_TO_TRADE] = sText_YourFriendWantsToTrade, - [TRADE_MSG_MON_CANT_BE_TRADED] = gText_PkmnCantBeTradedNow, - [TRADE_MSG_EGG_CANT_BE_TRADED] = gText_EggCantBeTradedNow, - [TRADE_MSG_FRIENDS_MON_CANT_BE_TRADED] = gText_OtherTrainersPkmnCantBeTraded + [MSG_STANDBY] = sText_CommunicationStandby, + [MSG_CANCELED] = sText_TheTradeHasBeenCanceled, + [MSG_ONLY_MON1] = sText_OnlyPkmnForBattle, + [MSG_ONLY_MON2] = gText_OnlyPkmnForBattle, //identical text to above + [MSG_WAITING_FOR_FRIEND] = sText_WaitingForYourFriend, + [MSG_FRIEND_WANTS_TO_TRADE] = sText_YourFriendWantsToTrade, + [MSG_MON_CANT_BE_TRADED] = gText_PkmnCantBeTradedNow, + [MSG_EGG_CANT_BE_TRADED] = gText_EggCantBeTradedNow, + [MSG_FRIENDS_MON_CANT_BE_TRADED] = gText_OtherTrainersPkmnCantBeTraded }; static const u8 sTradeTextColors[] = @@ -415,7 +396,7 @@ static const u8 sTradeTextColors[] = TEXT_COLOR_DARK_GRAY //shadow color }; -static const struct BgTemplate sTradeMenuBgTemplates[] = +static const struct BgTemplate sBgTemplates[] = { { .bg = 0, @@ -455,7 +436,7 @@ static const struct BgTemplate sTradeMenuBgTemplates[] = }, }; -static const struct WindowTemplate sTradeMenuWindowTemplates[] = +static const struct WindowTemplate sWindowTemplates[] = { { .bg = 0, @@ -633,8 +614,8 @@ static const struct WindowTemplate sTradeYesNoWindowTemplate = .baseBlock = 582 }; -static const u8 sJPText_Shedinja[] = _("ヌケニン"); -static const u8 sTradeMenuPartyMonBoxDimensions[3][2] = +static const u8 sText_ShedinjaJP[] = _("ヌケニン"); +static const u8 sSelectedMonLevelGenderCoords[3][2] = { [TRADE_PLAYER] = {4, 3}, [TRADE_PARTNER] = {19, 3} @@ -643,8 +624,8 @@ static const u8 sTradeMenuPartyMonBoxDimensions[3][2] = static const u16 sPokeball_Pal[] = INCBIN_U16("graphics/trade/pokeball.gbapal"); static const u8 sPokeball_Gfx[] = INCBIN_U8("graphics/trade/pokeball.4bpp"); static const u8 sPokeballSymbol_Gfx[] = INCBIN_U8("graphics/trade/pokeball_symbol.8bpp"); // unused -static const u16 sCrossingHighlightCable_Tilemap[] = INCBIN_U16("graphics/trade/crossing_highlight_cable.bin"); -static const u16 sTradeTilemap_PokeBallSymbol[] = INCBIN_U16("graphics/trade/pokeball_symbol_map.bin"); // unused? +static const u16 sCableCloseup_Map[] = INCBIN_U16("graphics/trade/crossing_highlight_cable.bin"); +static const u16 sPokeballSymbol_Map[] = INCBIN_U16("graphics/trade/pokeball_symbol_map.bin"); // unused? static const u16 sUnusedPal1[] = INCBIN_U16("graphics/trade/unused1.gbapal"); static const u16 sGba_Pal[] = INCBIN_U16("graphics/trade/gba.gbapal"); static const u16 sUnusedPal2[] = INCBIN_U16("graphics/trade/unused2.gbapal"); @@ -657,11 +638,11 @@ static const u8 sGbaScreen_Gfx[] = INCBIN_U8("graphics/trade/gba_screen.4bpp"); const u16 gTradePlatform_Tilemap[] = INCBIN_U16("graphics/trade/platform.bin"); static const u8 sGbaAffine_Gfx[] = INCBIN_U8("graphics/trade/gba_affine.8bpp"); // Only the gfx for when the GBA is zooming in/out static const u8 sEmptyGfx[64] = {}; -static const u8 sGbaCable_AffineTilemap[] = INCBIN_U8("graphics/trade/gba_affine_map_cable.bin"); -static const u8 sGbaWireless_AffineTilemap[] = INCBIN_U8("graphics/trade/gba_affine_map_wireless.bin"); -static const u16 sGbaWireless_Tilemap[] = INCBIN_U16("graphics/trade/gba_map_wireless.bin"); -static const u16 sGbaCable_Tilemap[] = INCBIN_U16("graphics/trade/gba_map_cable.bin"); -static const u32 sCrossingHighlightWireless_Tilemap[] = INCBIN_U32("graphics/trade/crossing_highlight_wireless.bin.lz"); +static const u8 sGbaAffineMapCable[] = INCBIN_U8("graphics/trade/gba_affine_map_cable.bin"); +static const u8 sGbaAffineMapWireless[] = INCBIN_U8("graphics/trade/gba_affine_map_wireless.bin"); +static const u16 sGbaMapWireless[] = INCBIN_U16("graphics/trade/gba_map_wireless.bin"); +static const u16 sGbaMapCable[] = INCBIN_U16("graphics/trade/gba_map_cable.bin"); +static const u32 sWirelessCloseup_Map[] = INCBIN_U32("graphics/trade/crossing_highlight_wireless.bin.lz"); static const u16 sWirelessSignalSend_Pal[] = INCBIN_U16("graphics/trade/wireless_signal_send.gbapal"); static const u16 sWirelessSignalRecv_Pal[] = INCBIN_U16("graphics/trade/wireless_signal_receive.gbapal"); static const u16 sWirelessSignalNone_Pal[] = INCBIN_U16("graphics/trade/wireless_signal_none.gbapal"); @@ -749,7 +730,7 @@ static const union AffineAnimCmd *const sAffineAnims_Pokeball[] = static const struct SpriteSheet sPokeBallSpriteSheet = { .data = sPokeball_Gfx, - .size = 0x600, + .size = sizeof(sPokeball_Gfx), .tag = GFXTAG_POKEBALL }; @@ -805,7 +786,7 @@ static const union AffineAnimCmd *const sAffineAnims_LinkMonGlow[] = static const struct SpriteSheet sSpriteSheet_LinkMonGlow = { .data = sLinkMonGlow_Gfx, - .size = 0x200, + .size = sizeof(sLinkMonGlow_Gfx), .tag = GFXTAG_LINK_MON_GLOW }; @@ -962,7 +943,7 @@ static const union AnimCmd *const sAnims_GbaScreen_Short[] = static const struct SpriteSheet sSpriteSheet_GbaScreen = { .data = sGbaScreen_Gfx, - .size = 0x1000, + .size = sizeof(sGbaScreen_Gfx), .tag = GFXTAG_GBA_SCREEN }; @@ -1185,7 +1166,7 @@ static const s8 sTradeBallVerticalVelocityTable[] = 0, 0, 0, 1, 0, 1, 1, 2, 3 }; -static const u8 sWirelessSignalTiming[][2] = +static const u8 sWirelessSignalAnimParams[][2] = { { 0, 1}, { 1, 1}, diff --git a/src/data/trainer_graphics/back_pic_tables.h b/src/data/trainer_graphics/back_pic_tables.h index 1dbffba428..524d48d480 100644 --- a/src/data/trainer_graphics/back_pic_tables.h +++ b/src/data/trainer_graphics/back_pic_tables.h @@ -13,18 +13,48 @@ const struct MonCoords gTrainerBackPicCoords[] = // this table goes functionally unused, since none of these pics are compressed // and the place they would get extracted to gets overwritten later anyway // the casts are so they'll play nice with the strict struct definition -#define TRAINER_BACK_SPRITE(trainerPic, sprite, size) [TRAINER_BACK_PIC_##trainerPic] = {(const u32 *)sprite, size, TRAINER_BACK_PIC_##trainerPic} - const struct CompressedSpriteSheet gTrainerBackPicTable[] = { - TRAINER_BACK_SPRITE(BRENDAN, gTrainerBackPic_Brendan, 0x2000), - TRAINER_BACK_SPRITE(MAY, gTrainerBackPic_May, 0x2000), - TRAINER_BACK_SPRITE(RED, gTrainerBackPic_Red, 0x2800), - TRAINER_BACK_SPRITE(LEAF, gTrainerBackPic_Leaf, 0x2800), - TRAINER_BACK_SPRITE(RUBY_SAPPHIRE_BRENDAN, gTrainerBackPic_RubySapphireBrendan, 0x2000), - TRAINER_BACK_SPRITE(RUBY_SAPPHIRE_MAY, gTrainerBackPic_RubySapphireMay, 0x2000), - TRAINER_BACK_SPRITE(WALLY, gTrainerBackPic_Wally, 0x2000), - TRAINER_BACK_SPRITE(STEVEN, gTrainerBackPic_Steven, 0x2000), + [TRAINER_BACK_PIC_BRENDAN] = { + .data = (const u32 *)gTrainerBackPic_Brendan, + .size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_Brendan), + .tag = TRAINER_BACK_PIC_BRENDAN, + }, + [TRAINER_BACK_PIC_MAY] = { + .data = (const u32 *)gTrainerBackPic_May, + .size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_May), + .tag = TRAINER_BACK_PIC_MAY, + }, + [TRAINER_BACK_PIC_RED] = { + .data = (const u32 *)gTrainerBackPic_Red, + .size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_Red), + .tag = TRAINER_BACK_PIC_RED, + }, + [TRAINER_BACK_PIC_LEAF] = { + .data = (const u32 *)gTrainerBackPic_Leaf, + .size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_Leaf), + .tag = TRAINER_BACK_PIC_LEAF, + }, + [TRAINER_BACK_PIC_RUBY_SAPPHIRE_BRENDAN] = { + .data = (const u32 *)gTrainerBackPic_RubySapphireBrendan, + .size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_RubySapphireBrendan), + .tag = TRAINER_BACK_PIC_RUBY_SAPPHIRE_BRENDAN, + }, + [TRAINER_BACK_PIC_RUBY_SAPPHIRE_MAY] = { + .data = (const u32 *)gTrainerBackPic_RubySapphireMay, + .size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_RubySapphireMay), + .tag = TRAINER_BACK_PIC_RUBY_SAPPHIRE_MAY, + }, + [TRAINER_BACK_PIC_WALLY] = { + .data = (const u32 *)gTrainerBackPic_Wally, + .size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_Wally), + .tag = TRAINER_BACK_PIC_WALLY, + }, + [TRAINER_BACK_PIC_STEVEN] = { + .data = (const u32 *)gTrainerBackPic_Steven, + .size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_Steven), + .tag = TRAINER_BACK_PIC_STEVEN, + }, }; #define TRAINER_BACK_PAL(trainerPic, pal) [TRAINER_BACK_PIC_##trainerPic] = {pal, TRAINER_BACK_PIC_##trainerPic} diff --git a/src/data/trainer_graphics/front_pic_tables.h b/src/data/trainer_graphics/front_pic_tables.h index e751f3c1d2..dd4aa26de0 100644 --- a/src/data/trainer_graphics/front_pic_tables.h +++ b/src/data/trainer_graphics/front_pic_tables.h @@ -99,99 +99,99 @@ const struct MonCoords gTrainerFrontPicCoords[] = const struct CompressedSpriteSheet gTrainerFrontPicTable[] = { - TRAINER_SPRITE(HIKER, gTrainerFrontPic_Hiker, 0x800), - TRAINER_SPRITE(AQUA_GRUNT_M, gTrainerFrontPic_AquaGruntM, 0x800), - TRAINER_SPRITE(POKEMON_BREEDER_F, gTrainerFrontPic_PokemonBreederF, 0x800), - TRAINER_SPRITE(COOLTRAINER_M, gTrainerFrontPic_CoolTrainerM, 0x800), - TRAINER_SPRITE(BIRD_KEEPER, gTrainerFrontPic_BirdKeeper, 0x800), - TRAINER_SPRITE(COLLECTOR, gTrainerFrontPic_Collector, 0x800), - TRAINER_SPRITE(AQUA_GRUNT_F, gTrainerFrontPic_AquaGruntF, 0x800), - TRAINER_SPRITE(SWIMMER_M, gTrainerFrontPic_SwimmerM, 0x800), - TRAINER_SPRITE(MAGMA_GRUNT_M, gTrainerFrontPic_MagmaGruntM, 0x800), - TRAINER_SPRITE(EXPERT_M, gTrainerFrontPic_ExpertM, 0x800), - TRAINER_SPRITE(AQUA_ADMIN_M, gTrainerFrontPic_AquaAdminM, 0x800), - TRAINER_SPRITE(BLACK_BELT, gTrainerFrontPic_BlackBelt, 0x800), - TRAINER_SPRITE(AQUA_ADMIN_F, gTrainerFrontPic_AquaAdminF, 0x800), - TRAINER_SPRITE(AQUA_LEADER_ARCHIE, gTrainerFrontPic_AquaLeaderArchie, 0x800), - TRAINER_SPRITE(HEX_MANIAC, gTrainerFrontPic_HexManiac, 0x800), - TRAINER_SPRITE(AROMA_LADY, gTrainerFrontPic_AromaLady, 0x800), - TRAINER_SPRITE(RUIN_MANIAC, gTrainerFrontPic_RuinManiac, 0x800), - TRAINER_SPRITE(INTERVIEWER, gTrainerFrontPic_Interviewer, 0x800), - TRAINER_SPRITE(TUBER_F, gTrainerFrontPic_TuberF, 0x800), - TRAINER_SPRITE(TUBER_M, gTrainerFrontPic_TuberM, 0x800), - TRAINER_SPRITE(COOLTRAINER_F, gTrainerFrontPic_CoolTrainerF, 0x800), - TRAINER_SPRITE(LADY, gTrainerFrontPic_Lady, 0x800), - TRAINER_SPRITE(BEAUTY, gTrainerFrontPic_Beauty, 0x800), - TRAINER_SPRITE(RICH_BOY, gTrainerFrontPic_RichBoy, 0x800), - TRAINER_SPRITE(EXPERT_F, gTrainerFrontPic_ExpertF, 0x800), - TRAINER_SPRITE(POKEMANIAC, gTrainerFrontPic_Pokemaniac, 0x800), - TRAINER_SPRITE(MAGMA_GRUNT_F, gTrainerFrontPic_MagmaGruntF, 0x800), - TRAINER_SPRITE(GUITARIST, gTrainerFrontPic_Guitarist, 0x800), - TRAINER_SPRITE(KINDLER, gTrainerFrontPic_Kindler, 0x800), - TRAINER_SPRITE(CAMPER, gTrainerFrontPic_Camper, 0x800), - TRAINER_SPRITE(PICNICKER, gTrainerFrontPic_Picnicker, 0x800), - TRAINER_SPRITE(BUG_MANIAC, gTrainerFrontPic_BugManiac, 0x800), - TRAINER_SPRITE(POKEMON_BREEDER_M, gTrainerFrontPic_PokemonBreederM, 0x800), - TRAINER_SPRITE(PSYCHIC_M, gTrainerFrontPic_PsychicM, 0x800), - TRAINER_SPRITE(PSYCHIC_F, gTrainerFrontPic_PsychicF, 0x800), - TRAINER_SPRITE(GENTLEMAN, gTrainerFrontPic_Gentleman, 0x800), - TRAINER_SPRITE(ELITE_FOUR_SIDNEY, gTrainerFrontPic_EliteFourSidney, 0x800), - TRAINER_SPRITE(ELITE_FOUR_PHOEBE, gTrainerFrontPic_EliteFourPhoebe, 0x800), - TRAINER_SPRITE(ELITE_FOUR_GLACIA, gTrainerFrontPic_EliteFourGlacia, 0x800), - TRAINER_SPRITE(ELITE_FOUR_DRAKE, gTrainerFrontPic_EliteFourDrake, 0x800), - TRAINER_SPRITE(LEADER_ROXANNE, gTrainerFrontPic_LeaderRoxanne, 0x800), - TRAINER_SPRITE(LEADER_BRAWLY, gTrainerFrontPic_LeaderBrawly, 0x800), - TRAINER_SPRITE(LEADER_WATTSON, gTrainerFrontPic_LeaderWattson, 0x800), - TRAINER_SPRITE(LEADER_FLANNERY, gTrainerFrontPic_LeaderFlannery, 0x800), - TRAINER_SPRITE(LEADER_NORMAN, gTrainerFrontPic_LeaderNorman, 0x800), - TRAINER_SPRITE(LEADER_WINONA, gTrainerFrontPic_LeaderWinona, 0x800), - TRAINER_SPRITE(LEADER_TATE_AND_LIZA, gTrainerFrontPic_LeaderTateAndLiza, 0x800), - TRAINER_SPRITE(LEADER_JUAN, gTrainerFrontPic_LeaderJuan, 0x800), - TRAINER_SPRITE(SCHOOL_KID_M, gTrainerFrontPic_SchoolKidM, 0x800), - TRAINER_SPRITE(SCHOOL_KID_F, gTrainerFrontPic_SchoolKidF, 0x800), - TRAINER_SPRITE(SR_AND_JR, gTrainerFrontPic_SrAndJr, 0x1000), - TRAINER_SPRITE(POKEFAN_M, gTrainerFrontPic_PokefanM, 0x1000), - TRAINER_SPRITE(POKEFAN_F, gTrainerFrontPic_PokefanF, 0x800), - TRAINER_SPRITE(YOUNGSTER, gTrainerFrontPic_Youngster, 0x800), - TRAINER_SPRITE(CHAMPION_WALLACE, gTrainerFrontPic_ChampionWallace, 0x1000), - TRAINER_SPRITE(FISHERMAN, gTrainerFrontPic_Fisherman, 0x800), - TRAINER_SPRITE(CYCLING_TRIATHLETE_M, gTrainerFrontPic_CyclingTriathleteM, 0x1000), - TRAINER_SPRITE(CYCLING_TRIATHLETE_F, gTrainerFrontPic_CyclingTriathleteF, 0x800), - TRAINER_SPRITE(RUNNING_TRIATHLETE_M, gTrainerFrontPic_RunningTriathleteM, 0x800), - TRAINER_SPRITE(RUNNING_TRIATHLETE_F, gTrainerFrontPic_RunningTriathleteF, 0x800), - TRAINER_SPRITE(SWIMMING_TRIATHLETE_M, gTrainerFrontPic_SwimmingTriathleteM, 0x800), - TRAINER_SPRITE(SWIMMING_TRIATHLETE_F, gTrainerFrontPic_SwimmingTriathleteF, 0x800), - TRAINER_SPRITE(DRAGON_TAMER, gTrainerFrontPic_DragonTamer, 0x800), - TRAINER_SPRITE(NINJA_BOY, gTrainerFrontPic_NinjaBoy, 0x800), - TRAINER_SPRITE(BATTLE_GIRL, gTrainerFrontPic_BattleGirl, 0x1000), - TRAINER_SPRITE(PARASOL_LADY, gTrainerFrontPic_ParasolLady, 0x800), - TRAINER_SPRITE(SWIMMER_F, gTrainerFrontPic_SwimmerF, 0x800), - TRAINER_SPRITE(TWINS, gTrainerFrontPic_Twins, 0x800), - TRAINER_SPRITE(SAILOR, gTrainerFrontPic_Sailor, 0x800), - TRAINER_SPRITE(MAGMA_ADMIN, gTrainerFrontPic_MagmaAdmin, 0x800), - TRAINER_SPRITE(WALLY, gTrainerFrontPic_Wally, 0x800), - TRAINER_SPRITE(BRENDAN, gTrainerFrontPic_Brendan, 0x800), - TRAINER_SPRITE(MAY, gTrainerFrontPic_May, 0x800), - TRAINER_SPRITE(BUG_CATCHER, gTrainerFrontPic_BugCatcher, 0x800), - TRAINER_SPRITE(POKEMON_RANGER_M, gTrainerFrontPic_PokemonRangerM, 0x800), - TRAINER_SPRITE(POKEMON_RANGER_F, gTrainerFrontPic_PokemonRangerF, 0x800), - TRAINER_SPRITE(MAGMA_LEADER_MAXIE, gTrainerFrontPic_MagmaLeaderMaxie, 0x800), - TRAINER_SPRITE(LASS, gTrainerFrontPic_Lass, 0x800), - TRAINER_SPRITE(YOUNG_COUPLE, gTrainerFrontPic_YoungCouple, 0x800), - TRAINER_SPRITE(OLD_COUPLE, gTrainerFrontPic_OldCouple, 0x800), - TRAINER_SPRITE(SIS_AND_BRO, gTrainerFrontPic_SisAndBro, 0x800), - TRAINER_SPRITE(STEVEN, gTrainerFrontPic_Steven, 0x800), - TRAINER_SPRITE(SALON_MAIDEN_ANABEL, gTrainerFrontPic_SalonMaidenAnabel, 0x800), - TRAINER_SPRITE(DOME_ACE_TUCKER, gTrainerFrontPic_DomeAceTucker, 0x800), - TRAINER_SPRITE(PALACE_MAVEN_SPENSER, gTrainerFrontPic_PalaceMavenSpenser, 0x800), - TRAINER_SPRITE(ARENA_TYCOON_GRETA, gTrainerFrontPic_ArenaTycoonGreta, 0x1000), - TRAINER_SPRITE(FACTORY_HEAD_NOLAND, gTrainerFrontPic_FactoryHeadNoland, 0x800), - TRAINER_SPRITE(PIKE_QUEEN_LUCY, gTrainerFrontPic_PikeQueenLucy, 0x800), - TRAINER_SPRITE(PYRAMID_KING_BRANDON, gTrainerFrontPic_PyramidKingBrandon, 0x800), - TRAINER_SPRITE(RED, gTrainerFrontPic_Red, 0x800), - TRAINER_SPRITE(LEAF, gTrainerFrontPic_Leaf, 0x800), - TRAINER_SPRITE(RS_BRENDAN, gTrainerFrontPic_RubySapphireBrendan, 0x800), - TRAINER_SPRITE(RS_MAY, gTrainerFrontPic_RubySapphireMay, 0x800), + TRAINER_SPRITE(HIKER, gTrainerFrontPic_Hiker, TRAINER_PIC_SIZE), + TRAINER_SPRITE(AQUA_GRUNT_M, gTrainerFrontPic_AquaGruntM, TRAINER_PIC_SIZE), + TRAINER_SPRITE(POKEMON_BREEDER_F, gTrainerFrontPic_PokemonBreederF, TRAINER_PIC_SIZE), + TRAINER_SPRITE(COOLTRAINER_M, gTrainerFrontPic_CoolTrainerM, TRAINER_PIC_SIZE), + TRAINER_SPRITE(BIRD_KEEPER, gTrainerFrontPic_BirdKeeper, TRAINER_PIC_SIZE), + TRAINER_SPRITE(COLLECTOR, gTrainerFrontPic_Collector, TRAINER_PIC_SIZE), + TRAINER_SPRITE(AQUA_GRUNT_F, gTrainerFrontPic_AquaGruntF, TRAINER_PIC_SIZE), + TRAINER_SPRITE(SWIMMER_M, gTrainerFrontPic_SwimmerM, TRAINER_PIC_SIZE), + TRAINER_SPRITE(MAGMA_GRUNT_M, gTrainerFrontPic_MagmaGruntM, TRAINER_PIC_SIZE), + TRAINER_SPRITE(EXPERT_M, gTrainerFrontPic_ExpertM, TRAINER_PIC_SIZE), + TRAINER_SPRITE(AQUA_ADMIN_M, gTrainerFrontPic_AquaAdminM, TRAINER_PIC_SIZE), + TRAINER_SPRITE(BLACK_BELT, gTrainerFrontPic_BlackBelt, TRAINER_PIC_SIZE), + TRAINER_SPRITE(AQUA_ADMIN_F, gTrainerFrontPic_AquaAdminF, TRAINER_PIC_SIZE), + TRAINER_SPRITE(AQUA_LEADER_ARCHIE, gTrainerFrontPic_AquaLeaderArchie, TRAINER_PIC_SIZE), + TRAINER_SPRITE(HEX_MANIAC, gTrainerFrontPic_HexManiac, TRAINER_PIC_SIZE), + TRAINER_SPRITE(AROMA_LADY, gTrainerFrontPic_AromaLady, TRAINER_PIC_SIZE), + TRAINER_SPRITE(RUIN_MANIAC, gTrainerFrontPic_RuinManiac, TRAINER_PIC_SIZE), + TRAINER_SPRITE(INTERVIEWER, gTrainerFrontPic_Interviewer, TRAINER_PIC_SIZE), + TRAINER_SPRITE(TUBER_F, gTrainerFrontPic_TuberF, TRAINER_PIC_SIZE), + TRAINER_SPRITE(TUBER_M, gTrainerFrontPic_TuberM, TRAINER_PIC_SIZE), + TRAINER_SPRITE(COOLTRAINER_F, gTrainerFrontPic_CoolTrainerF, TRAINER_PIC_SIZE), + TRAINER_SPRITE(LADY, gTrainerFrontPic_Lady, TRAINER_PIC_SIZE), + TRAINER_SPRITE(BEAUTY, gTrainerFrontPic_Beauty, TRAINER_PIC_SIZE), + TRAINER_SPRITE(RICH_BOY, gTrainerFrontPic_RichBoy, TRAINER_PIC_SIZE), + TRAINER_SPRITE(EXPERT_F, gTrainerFrontPic_ExpertF, TRAINER_PIC_SIZE), + TRAINER_SPRITE(POKEMANIAC, gTrainerFrontPic_Pokemaniac, TRAINER_PIC_SIZE), + TRAINER_SPRITE(MAGMA_GRUNT_F, gTrainerFrontPic_MagmaGruntF, TRAINER_PIC_SIZE), + TRAINER_SPRITE(GUITARIST, gTrainerFrontPic_Guitarist, TRAINER_PIC_SIZE), + TRAINER_SPRITE(KINDLER, gTrainerFrontPic_Kindler, TRAINER_PIC_SIZE), + TRAINER_SPRITE(CAMPER, gTrainerFrontPic_Camper, TRAINER_PIC_SIZE), + TRAINER_SPRITE(PICNICKER, gTrainerFrontPic_Picnicker, TRAINER_PIC_SIZE), + TRAINER_SPRITE(BUG_MANIAC, gTrainerFrontPic_BugManiac, TRAINER_PIC_SIZE), + TRAINER_SPRITE(POKEMON_BREEDER_M, gTrainerFrontPic_PokemonBreederM, TRAINER_PIC_SIZE), + TRAINER_SPRITE(PSYCHIC_M, gTrainerFrontPic_PsychicM, TRAINER_PIC_SIZE), + TRAINER_SPRITE(PSYCHIC_F, gTrainerFrontPic_PsychicF, TRAINER_PIC_SIZE), + TRAINER_SPRITE(GENTLEMAN, gTrainerFrontPic_Gentleman, TRAINER_PIC_SIZE), + TRAINER_SPRITE(ELITE_FOUR_SIDNEY, gTrainerFrontPic_EliteFourSidney, TRAINER_PIC_SIZE), + TRAINER_SPRITE(ELITE_FOUR_PHOEBE, gTrainerFrontPic_EliteFourPhoebe, TRAINER_PIC_SIZE), + TRAINER_SPRITE(ELITE_FOUR_GLACIA, gTrainerFrontPic_EliteFourGlacia, TRAINER_PIC_SIZE), + TRAINER_SPRITE(ELITE_FOUR_DRAKE, gTrainerFrontPic_EliteFourDrake, TRAINER_PIC_SIZE), + TRAINER_SPRITE(LEADER_ROXANNE, gTrainerFrontPic_LeaderRoxanne, TRAINER_PIC_SIZE), + TRAINER_SPRITE(LEADER_BRAWLY, gTrainerFrontPic_LeaderBrawly, TRAINER_PIC_SIZE), + TRAINER_SPRITE(LEADER_WATTSON, gTrainerFrontPic_LeaderWattson, TRAINER_PIC_SIZE), + TRAINER_SPRITE(LEADER_FLANNERY, gTrainerFrontPic_LeaderFlannery, TRAINER_PIC_SIZE), + TRAINER_SPRITE(LEADER_NORMAN, gTrainerFrontPic_LeaderNorman, TRAINER_PIC_SIZE), + TRAINER_SPRITE(LEADER_WINONA, gTrainerFrontPic_LeaderWinona, TRAINER_PIC_SIZE), + TRAINER_SPRITE(LEADER_TATE_AND_LIZA, gTrainerFrontPic_LeaderTateAndLiza, TRAINER_PIC_SIZE), + TRAINER_SPRITE(LEADER_JUAN, gTrainerFrontPic_LeaderJuan, TRAINER_PIC_SIZE), + TRAINER_SPRITE(SCHOOL_KID_M, gTrainerFrontPic_SchoolKidM, TRAINER_PIC_SIZE), + TRAINER_SPRITE(SCHOOL_KID_F, gTrainerFrontPic_SchoolKidF, TRAINER_PIC_SIZE), + TRAINER_SPRITE(SR_AND_JR, gTrainerFrontPic_SrAndJr, TRAINER_PIC_SIZE * 2), + TRAINER_SPRITE(POKEFAN_M, gTrainerFrontPic_PokefanM, TRAINER_PIC_SIZE * 2), + TRAINER_SPRITE(POKEFAN_F, gTrainerFrontPic_PokefanF, TRAINER_PIC_SIZE), + TRAINER_SPRITE(YOUNGSTER, gTrainerFrontPic_Youngster, TRAINER_PIC_SIZE), + TRAINER_SPRITE(CHAMPION_WALLACE, gTrainerFrontPic_ChampionWallace, TRAINER_PIC_SIZE * 2), + TRAINER_SPRITE(FISHERMAN, gTrainerFrontPic_Fisherman, TRAINER_PIC_SIZE), + TRAINER_SPRITE(CYCLING_TRIATHLETE_M, gTrainerFrontPic_CyclingTriathleteM, TRAINER_PIC_SIZE * 2), + TRAINER_SPRITE(CYCLING_TRIATHLETE_F, gTrainerFrontPic_CyclingTriathleteF, TRAINER_PIC_SIZE), + TRAINER_SPRITE(RUNNING_TRIATHLETE_M, gTrainerFrontPic_RunningTriathleteM, TRAINER_PIC_SIZE), + TRAINER_SPRITE(RUNNING_TRIATHLETE_F, gTrainerFrontPic_RunningTriathleteF, TRAINER_PIC_SIZE), + TRAINER_SPRITE(SWIMMING_TRIATHLETE_M, gTrainerFrontPic_SwimmingTriathleteM, TRAINER_PIC_SIZE), + TRAINER_SPRITE(SWIMMING_TRIATHLETE_F, gTrainerFrontPic_SwimmingTriathleteF, TRAINER_PIC_SIZE), + TRAINER_SPRITE(DRAGON_TAMER, gTrainerFrontPic_DragonTamer, TRAINER_PIC_SIZE), + TRAINER_SPRITE(NINJA_BOY, gTrainerFrontPic_NinjaBoy, TRAINER_PIC_SIZE), + TRAINER_SPRITE(BATTLE_GIRL, gTrainerFrontPic_BattleGirl, TRAINER_PIC_SIZE * 2), + TRAINER_SPRITE(PARASOL_LADY, gTrainerFrontPic_ParasolLady, TRAINER_PIC_SIZE), + TRAINER_SPRITE(SWIMMER_F, gTrainerFrontPic_SwimmerF, TRAINER_PIC_SIZE), + TRAINER_SPRITE(TWINS, gTrainerFrontPic_Twins, TRAINER_PIC_SIZE), + TRAINER_SPRITE(SAILOR, gTrainerFrontPic_Sailor, TRAINER_PIC_SIZE), + TRAINER_SPRITE(MAGMA_ADMIN, gTrainerFrontPic_MagmaAdmin, TRAINER_PIC_SIZE), + TRAINER_SPRITE(WALLY, gTrainerFrontPic_Wally, TRAINER_PIC_SIZE), + TRAINER_SPRITE(BRENDAN, gTrainerFrontPic_Brendan, TRAINER_PIC_SIZE), + TRAINER_SPRITE(MAY, gTrainerFrontPic_May, TRAINER_PIC_SIZE), + TRAINER_SPRITE(BUG_CATCHER, gTrainerFrontPic_BugCatcher, TRAINER_PIC_SIZE), + TRAINER_SPRITE(POKEMON_RANGER_M, gTrainerFrontPic_PokemonRangerM, TRAINER_PIC_SIZE), + TRAINER_SPRITE(POKEMON_RANGER_F, gTrainerFrontPic_PokemonRangerF, TRAINER_PIC_SIZE), + TRAINER_SPRITE(MAGMA_LEADER_MAXIE, gTrainerFrontPic_MagmaLeaderMaxie, TRAINER_PIC_SIZE), + TRAINER_SPRITE(LASS, gTrainerFrontPic_Lass, TRAINER_PIC_SIZE), + TRAINER_SPRITE(YOUNG_COUPLE, gTrainerFrontPic_YoungCouple, TRAINER_PIC_SIZE), + TRAINER_SPRITE(OLD_COUPLE, gTrainerFrontPic_OldCouple, TRAINER_PIC_SIZE), + TRAINER_SPRITE(SIS_AND_BRO, gTrainerFrontPic_SisAndBro, TRAINER_PIC_SIZE), + TRAINER_SPRITE(STEVEN, gTrainerFrontPic_Steven, TRAINER_PIC_SIZE), + TRAINER_SPRITE(SALON_MAIDEN_ANABEL, gTrainerFrontPic_SalonMaidenAnabel, TRAINER_PIC_SIZE), + TRAINER_SPRITE(DOME_ACE_TUCKER, gTrainerFrontPic_DomeAceTucker, TRAINER_PIC_SIZE), + TRAINER_SPRITE(PALACE_MAVEN_SPENSER, gTrainerFrontPic_PalaceMavenSpenser, TRAINER_PIC_SIZE), + TRAINER_SPRITE(ARENA_TYCOON_GRETA, gTrainerFrontPic_ArenaTycoonGreta, TRAINER_PIC_SIZE * 2), + TRAINER_SPRITE(FACTORY_HEAD_NOLAND, gTrainerFrontPic_FactoryHeadNoland, TRAINER_PIC_SIZE), + TRAINER_SPRITE(PIKE_QUEEN_LUCY, gTrainerFrontPic_PikeQueenLucy, TRAINER_PIC_SIZE), + TRAINER_SPRITE(PYRAMID_KING_BRANDON, gTrainerFrontPic_PyramidKingBrandon, TRAINER_PIC_SIZE), + TRAINER_SPRITE(RED, gTrainerFrontPic_Red, TRAINER_PIC_SIZE), + TRAINER_SPRITE(LEAF, gTrainerFrontPic_Leaf, TRAINER_PIC_SIZE), + TRAINER_SPRITE(RS_BRENDAN, gTrainerFrontPic_RubySapphireBrendan, TRAINER_PIC_SIZE), + TRAINER_SPRITE(RS_MAY, gTrainerFrontPic_RubySapphireMay, TRAINER_PIC_SIZE), }; #define TRAINER_PAL(trainerPic, pal) [TRAINER_PIC_##trainerPic] = {pal, TRAINER_PIC_##trainerPic} diff --git a/src/daycare.c b/src/daycare.c index cabecc8ea5..803c0cacf9 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -729,7 +729,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru for (j = 0; j < NUM_TECHNICAL_MACHINES + NUM_HIDDEN_MACHINES; j++) { u16 moveId = ItemIdToBattleMoveId(ITEM_TM01 + j); - if (sHatchedEggFatherMoves[i] == moveId && CanLearnTeachableMove(GetMonData(egg, MON_DATA_SPECIES2), moveId)) + if (sHatchedEggFatherMoves[i] == moveId && CanLearnTeachableMove(GetMonData(egg, MON_DATA_SPECIES_OR_EGG), moveId)) { if (GiveMoveToMon(egg, sHatchedEggFatherMoves[i]) == MON_HAS_MAX_MOVES) DeleteFirstMoveAndGiveMoveToMon(egg, sHatchedEggFatherMoves[i]); diff --git a/src/debug.c b/src/debug.c index 90081eb617..3fb79d2e86 100644 --- a/src/debug.c +++ b/src/debug.c @@ -85,6 +85,7 @@ enum { // Util DEBUG_UTIL_MENU_ITEM_TRAINER_NAME, DEBUG_UTIL_MENU_ITEM_TRAINER_GENDER, DEBUG_UTIL_MENU_ITEM_TRAINER_ID, + DEBUG_UTIL_MENU_ITEM_CLEAR_BOXES, }; enum { // Scripts DEBUG_UTIL_MENU_ITEM_SCRIPT_1, @@ -147,7 +148,7 @@ enum { //Sound #define DEBUG_NUMBER_DIGITS_VARIABLES 5 #define DEBUG_NUMBER_DIGITS_VARIABLE_VALUE 5 #define DEBUG_NUMBER_DIGITS_ITEMS 4 -#define DEBUG_NUMBER_DIGITS_ITEM_QUANTITY 2 +#define DEBUG_NUMBER_DIGITS_ITEM_QUANTITY 3 #define DEBUG_NUMBER_ICON_X 210 #define DEBUG_NUMBER_ICON_Y 50 @@ -224,6 +225,7 @@ static void DebugAction_Util_WatchCredits(u8 taskId); static void DebugAction_Util_Trainer_Name(u8 taskId); 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_Flags_Flags(u8 taskId); static void DebugAction_Flags_FlagsSelect(u8 taskId); @@ -275,7 +277,8 @@ static void DebugAction_Sound_MUS_SelectId(u8 taskId); static void DebugTask_HandleMenuInput(u8 taskId, void (*HandleInput)(u8)); static void DebugAction_OpenSubMenu(u8 taskId, struct ListMenuTemplate LMtemplate); -extern u8 Debug_FlagsNotSetMessage[]; +extern u8 Debug_FlagsNotSetOverworldConfigMessage[]; +extern u8 Debug_FlagsNotSetBattleConfigMessage[]; extern u8 Debug_Script_1[]; extern u8 Debug_Script_2[]; extern u8 Debug_Script_3[]; @@ -329,6 +332,7 @@ static const u8 sDebugText_Util_WatchCredits[] = _("Watch Credits"); static const u8 sDebugText_Util_Trainer_Name[] = _("Trainer name"); 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"); // Flags Menu static const u8 sDebugText_Flags_Flags[] = _("Set Flag XXXX"); static const u8 sDebugText_Flags_SetPokedexFlags[] = _("All Pokédex Flags"); @@ -450,6 +454,7 @@ static const struct ListMenuItem sDebugMenu_Items_Utilities[] = [DEBUG_UTIL_MENU_ITEM_TRAINER_NAME] = {sDebugText_Util_Trainer_Name, DEBUG_UTIL_MENU_ITEM_TRAINER_NAME}, [DEBUG_UTIL_MENU_ITEM_TRAINER_GENDER] = {sDebugText_Util_Trainer_Gender, DEBUG_UTIL_MENU_ITEM_TRAINER_GENDER}, [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}, }; static const struct ListMenuItem sDebugMenu_Items_Scripts[] = { @@ -529,6 +534,7 @@ static void (*const sDebugMenu_Actions_Utilities[])(u8) = [DEBUG_UTIL_MENU_ITEM_TRAINER_NAME] = DebugAction_Util_Trainer_Name, [DEBUG_UTIL_MENU_ITEM_TRAINER_GENDER] = DebugAction_Util_Trainer_Gender, [DEBUG_UTIL_MENU_ITEM_TRAINER_ID] = DebugAction_Util_Trainer_Id, + [DEBUG_UTIL_MENU_ITEM_CLEAR_BOXES] = DebugAction_Util_Clear_Boxes, }; static void (*const sDebugMenu_Actions_Scripts[])(u8) = { @@ -1015,8 +1021,8 @@ static void DebugAction_Util_Warp_SelectMapGroup(u8 taskId) gTasks[taskId].data[3] = 0; gTasks[taskId].data[4] = 0; - ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, 2); - ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1, STR_CONV_MODE_LEADING_ZEROS, 2); + ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, (MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1 >= 100) ? 3 : 2); + ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1, STR_CONV_MODE_LEADING_ZEROS, (MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1 >= 100) ? 3 : 2); StringExpandPlaceholders(gStringVar1, sDebugText_Util_WarpToMap_SelMax); GetMapName(gStringVar2, Overworld_GetMapHeaderByGroupAndId(gTasks[taskId].data[5], gTasks[taskId].data[3])->regionMapSectionId, 0); StringCopy(gStringVar3, gText_DigitIndicator[gTasks[taskId].data[4]]); @@ -1061,8 +1067,8 @@ static void DebugAction_Util_Warp_SelectMap(u8 taskId) gTasks[taskId].data[4] += 1; } - ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, 2); - ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1, STR_CONV_MODE_LEADING_ZEROS, 2); + ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, (max_value >= 100) ? 3 : 2); + ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1, STR_CONV_MODE_LEADING_ZEROS, (max_value >= 100) ? 3 : 2); StringExpandPlaceholders(gStringVar1, sDebugText_Util_WarpToMap_SelMax); GetMapName(gStringVar2, Overworld_GetMapHeaderByGroupAndId(gTasks[taskId].data[5], gTasks[taskId].data[3])->regionMapSectionId, 0); StringCopy(gStringVar3, gText_DigitIndicator[gTasks[taskId].data[4]]); @@ -1149,8 +1155,8 @@ static void DebugAction_Util_PoisonMons(u8 taskId) for (i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, 0) - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG) + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) { u32 curStatus = STATUS1_POISON; SetMonData(&gPlayerParty[i], MON_DATA_STATUS, &curStatus); @@ -1255,7 +1261,7 @@ static void DebugAction_Util_Weather_SelectId(u8 taskId) if (gTasks[taskId].data[3] <= 15 || gTasks[taskId].data[3] >= 20) StringCopyPadded(gStringVar1, sWeatherNames[gTasks[taskId].data[3]], CHAR_SPACE, 30); else - StringCopyPadded(gStringVar1, sText_WeatherNotDefined, CHAR_SPACE, 30); + StringCopyPadded(gStringVar1, sText_WeatherNotDefined, CHAR_SPACE, 30); StringExpandPlaceholders(gStringVar4, sDebugText_Util_Weather_ID); AddTextPrinterParameterized(gTasks[taskId].data[2], 1, gStringVar4, 1, 1, 0, NULL); @@ -1315,6 +1321,12 @@ static void DebugAction_Util_Trainer_Id(u8 taskId) Debug_DestroyMenu_Full(taskId); ScriptContext_Enable(); } +static void DebugAction_Util_Clear_Boxes(u8 taskId) +{ + ResetPokemonStorageSystem(); + Debug_DestroyMenu_Full(taskId); + ScriptContext_Enable(); +} // ******************************* // Actions Scripts @@ -1556,16 +1568,16 @@ static void DebugAction_Flags_ToggleFrontierPass(u8 taskId) } static void DebugAction_Flags_CollisionOnOff(u8 taskId) { -#if DEBUG_FLAG_NO_COLLISION == 0 +#if OW_FLAG_NO_COLLISION == 0 Debug_DestroyMenu_Full(taskId); LockPlayerFieldControls(); - ScriptContext_SetupScript(Debug_FlagsNotSetMessage); + ScriptContext_SetupScript(Debug_FlagsNotSetOverworldConfigMessage); #else - if (FlagGet(DEBUG_FLAG_NO_COLLISION)) + if (FlagGet(OW_FLAG_NO_COLLISION)) PlaySE(SE_PC_OFF); else PlaySE(SE_PC_LOGIN); - FlagToggle(DEBUG_FLAG_NO_COLLISION); + FlagToggle(OW_FLAG_NO_COLLISION); #endif } static void DebugAction_Flags_EncounterOnOff(u8 taskId) @@ -1573,7 +1585,7 @@ static void DebugAction_Flags_EncounterOnOff(u8 taskId) #if OW_FLAG_NO_ENCOUNTER == 0 Debug_DestroyMenu_Full(taskId); LockPlayerFieldControls(); - ScriptContext_SetupScript(Debug_FlagsNotSetMessage); + ScriptContext_SetupScript(Debug_FlagsNotSetOverworldConfigMessage); #else if (FlagGet(OW_FLAG_NO_ENCOUNTER)) PlaySE(SE_PC_OFF); @@ -1587,7 +1599,7 @@ static void DebugAction_Flags_TrainerSeeOnOff(u8 taskId) #if OW_FLAG_NO_TRAINER_SEE == 0 Debug_DestroyMenu_Full(taskId); LockPlayerFieldControls(); - ScriptContext_SetupScript(Debug_FlagsNotSetMessage); + ScriptContext_SetupScript(Debug_FlagsNotSetOverworldConfigMessage); #else if (FlagGet(OW_FLAG_NO_TRAINER_SEE)) PlaySE(SE_PC_OFF); @@ -1601,7 +1613,7 @@ static void DebugAction_Flags_BagUseOnOff(u8 taskId) #if B_FLAG_NO_BAG_USE == 0 Debug_DestroyMenu_Full(taskId); LockPlayerFieldControls(); - ScriptContext_SetupScript(Debug_FlagsNotSetMessage); + ScriptContext_SetupScript(Debug_FlagsNotSetBattleConfigMessage); #else if (FlagGet(B_FLAG_NO_BAG_USE)) PlaySE(SE_PC_OFF); @@ -1612,10 +1624,10 @@ static void DebugAction_Flags_BagUseOnOff(u8 taskId) } static void DebugAction_Flags_CatchingOnOff(u8 taskId) { -#if B_FLAG_NO_CATCHING_USE == 0 +#if B_FLAG_NO_CATCHING == 0 Debug_DestroyMenu_Full(taskId); LockPlayerFieldControls(); - ScriptContext_SetupScript(Debug_FlagsNotSetMessage); + ScriptContext_SetupScript(Debug_FlagsNotSetBattleConfigMessage); #else if (FlagGet(B_FLAG_NO_CATCHING)) PlaySE(SE_PC_OFF); @@ -1905,15 +1917,18 @@ static void DebugAction_Give_Item_SelectId(u8 taskId) } static void DebugAction_Give_Item_SelectQuantity(u8 taskId) { + u32 itemId = gTasks[taskId].data[5]; + if (JOY_NEW(DPAD_ANY)) { PlaySE(SE_SELECT); if (JOY_NEW(DPAD_UP)) { + u32 maxCapacity = (ItemId_GetPocket(itemId) - 1 == BERRIES_POCKET) ? MAX_BERRY_CAPACITY : MAX_BAG_ITEM_CAPACITY; gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if (gTasks[taskId].data[3] >= 100) - gTasks[taskId].data[3] = 99; + if (gTasks[taskId].data[3] > maxCapacity) + gTasks[taskId].data[3] = maxCapacity; } if (JOY_NEW(DPAD_DOWN)) { @@ -1947,7 +1962,7 @@ static void DebugAction_Give_Item_SelectQuantity(u8 taskId) DestroySprite(&gSprites[gTasks[taskId].data[6]]); //Destroy item icon PlaySE(MUS_OBTAIN_ITEM); - AddBagItem(gTasks[taskId].data[5], gTasks[taskId].data[3]); + AddBagItem(itemId, gTasks[taskId].data[3]); DebugAction_DestroyExtraWindow(taskId); } else if (JOY_NEW(B_BUTTON)) @@ -2178,7 +2193,7 @@ static void DebugAction_Give_Pokemon_SelectLevel(u8 taskId) { PlaySE(MUS_LEVEL_UP); ScriptGiveMon(sDebugMonData->mon_speciesId, gTasks[taskId].data[3], ITEM_NONE, 0,0,0); - //Set flag for user convenience + // Set flag for user convenience FlagSet(FLAG_SYS_POKEMON_GET); Free(sDebugMonData); //Frees EWRAM of MonData Struct DebugAction_DestroyExtraWindow(taskId); @@ -2734,7 +2749,7 @@ static void DebugAction_Give_Pokemon_ComplexCreateMon(u8 taskId) //https://githu break; } - //Set flag for user convenience + // Set flag for user convenience FlagSet(FLAG_SYS_POKEMON_GET); Free(sDebugMonData); //Frees EWRAM of MonData Struct @@ -2766,11 +2781,12 @@ static void DebugAction_Give_FillPC(u8 taskId) //Credit: Sierraffinity int boxId, boxPosition; u32 personality; struct BoxPokemon boxMon; + u16 species = SPECIES_BULBASAUR; personality = Random32(); CreateBoxMon(&boxMon, - SPECIES_DEOXYS, + species, 100, 32, personality, @@ -2785,9 +2801,16 @@ static void DebugAction_Give_FillPC(u8 taskId) //Credit: Sierraffinity if (!GetBoxMonData(&gPokemonStoragePtr->boxes[boxId][boxPosition], MON_DATA_SANITY_HAS_SPECIES)) { gPokemonStoragePtr->boxes[boxId][boxPosition] = boxMon; + SetBoxMonData(&gPokemonStoragePtr->boxes[boxId][boxPosition], MON_DATA_SPECIES, &species); + GetSetPokedexFlag(species, FLAG_SET_SEEN); + GetSetPokedexFlag(species, FLAG_SET_CAUGHT); + species++; } } } + + // Set flag for user convenience + FlagSet(FLAG_SYS_POKEMON_GET); } static void DebugAction_Give_CHEAT(u8 taskId) diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index e23c04c1ad..8d47595c8b 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -2906,7 +2906,7 @@ void IsDodrioInParty(void) for (i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_HAS_SPECIES) - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_DODRIO) + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_DODRIO) { gSpecialVar_Result = TRUE; return; diff --git a/src/easy_chat.c b/src/easy_chat.c index 723800828e..12a3a08086 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -226,18 +226,23 @@ static void DoQuizQuestionEasyChatScreen(void); static void DoQuizSetAnswerEasyChatScreen(void); static void DoQuizSetQuestionEasyChatScreen(void); -#define PALTAG_TRIANGLE_CURSOR 0 -#define PALTAG_RECTANGLE_CURSOR 1 -#define PALTAG_MISC_UI 2 -#define PALTAG_RS_INTERVIEW_FRAME 3 +enum { + PALTAG_TRIANGLE_CURSOR, + PALTAG_RECTANGLE_CURSOR, + PALTAG_MISC_UI, + PALTAG_RS_INTERVIEW_FRAME, +}; + +enum { + GFXTAG_TRIANGLE_CURSOR, + GFXTAG_RECTANGLE_CURSOR, + GFXTAG_SCROLL_INDICATOR, + GFXTAG_START_SELECT_BUTTONS, + GFXTAG_MODE_WINDOW, + GFXTAG_RS_INTERVIEW_FRAME, + GFXTAG_BUTTON_WINDOW, +}; -#define GFXTAG_TRIANGLE_CURSOR 0 -#define GFXTAG_RECTANGLE_CURSOR 1 -#define GFXTAG_SCROLL_INDICATOR 2 -#define GFXTAG_START_SELECT_BUTTONS 3 -#define GFXTAG_MODE_WINDOW 4 -#define GFXTAG_RS_INTERVIEW_FRAME 5 -#define GFXTAG_BUTTON_WINDOW 6 // State values for sEasyChatScreen->inputState // Control which input handler to use in HandleEasyChatInput @@ -376,6 +381,13 @@ enum { WINANIM_KEYBOARD_SWITCH_IN, }; +// Window IDs +enum { + WIN_TITLE, + WIN_MSG, + WIN_INPUT_SELECT, // Word groups, word list, and keyboard +}; + // Values for text frame tilemap #define FRAME_OFFSET_ORANGE 0x1000 // Orange frame, for phrase text #define FRAME_OFFSET_GREEN 0x4000 // Green frame, for keyboard/word select @@ -814,7 +826,7 @@ static const struct BgTemplate sEasyChatBgTemplates[] = { }; static const struct WindowTemplate sEasyChatWindowTemplates[] = { - { + [WIN_TITLE] = { .bg = 1, .tilemapLeft = 6, .tilemapTop = 0, @@ -823,7 +835,7 @@ static const struct WindowTemplate sEasyChatWindowTemplates[] = { .paletteNum = 10, .baseBlock = 0x10, }, - { + [WIN_MSG] = { .bg = 0, .tilemapLeft = 3, .tilemapTop = 15, @@ -832,7 +844,7 @@ static const struct WindowTemplate sEasyChatWindowTemplates[] = { .paletteNum = 15, .baseBlock = 0xA, }, - { + [WIN_INPUT_SELECT] = { .bg = 2, .tilemapLeft = 1, .tilemapTop = 0, @@ -3934,10 +3946,10 @@ static void PrintTitle(void) return; xOffset = GetStringCenterAlignXOffset(FONT_NORMAL, titleText, 144); - FillWindowPixelBuffer(0, PIXEL_FILL(0)); - PrintEasyChatTextWithColors(0, FONT_NORMAL, titleText, xOffset, 1, TEXT_SKIP_DRAW, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY); - PutWindowTilemap(0); - CopyWindowToVram(0, COPYWIN_FULL); + FillWindowPixelBuffer(WIN_TITLE, PIXEL_FILL(0)); + PrintEasyChatTextWithColors(WIN_TITLE, FONT_NORMAL, titleText, xOffset, 1, TEXT_SKIP_DRAW, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY); + PutWindowTilemap(WIN_TITLE); + CopyWindowToVram(WIN_TITLE, COPYWIN_FULL); } static void PrintEasyChatText(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)) @@ -3957,10 +3969,10 @@ static void PrintEasyChatTextWithColors(u8 windowId, u8 fontId, const u8 *str, u static void PrintInitialInstructions(void) { FillBgTilemapBufferRect(0, 0, 0, 0, 32, 20, 17); - LoadUserWindowBorderGfx(1, 1, BG_PLTT_ID(14)); - DrawTextBorderOuter(1, 1, 14); + LoadUserWindowBorderGfx(WIN_MSG, 1, BG_PLTT_ID(14)); + DrawTextBorderOuter(WIN_MSG, 1, 14); PrintEasyChatStdMessage(MSG_INSTRUCTIONS); - PutWindowTilemap(1); + PutWindowTilemap(WIN_MSG); CopyBgTilemapBufferToVram(0); } @@ -4004,14 +4016,14 @@ static void PrintEasyChatStdMessage(u8 msgId) break; } - FillWindowPixelBuffer(1, PIXEL_FILL(1)); + FillWindowPixelBuffer(WIN_MSG, PIXEL_FILL(1)); if (text1) - PrintEasyChatText(1, FONT_NORMAL, text1, 0, 1, TEXT_SKIP_DRAW, 0); + PrintEasyChatText(WIN_MSG, FONT_NORMAL, text1, 0, 1, TEXT_SKIP_DRAW, 0); if (text2) - PrintEasyChatText(1, FONT_NORMAL, text2, 0, 17, TEXT_SKIP_DRAW, 0); + PrintEasyChatText(WIN_MSG, FONT_NORMAL, text2, 0, 17, TEXT_SKIP_DRAW, 0); - CopyWindowToVram(1, COPYWIN_FULL); + CopyWindowToVram(WIN_MSG, COPYWIN_FULL); } static void CreateEasyChatYesNoMenu(u8 initialCursorPos) @@ -4198,14 +4210,14 @@ static void AdjustBgTilemapForFooter(void) static void DrawLowerWindow(void) { - PutWindowTilemap(2); - CopyBgTilemapBufferToVram(2); + PutWindowTilemap(WIN_INPUT_SELECT); + CopyBgTilemapBufferToVram(WIN_INPUT_SELECT); } static void InitLowerWindowText(u32 whichText) { ResetLowerWindowScroll(); - FillWindowPixelBuffer(2, PIXEL_FILL(1)); + FillWindowPixelBuffer(WIN_INPUT_SELECT, PIXEL_FILL(1)); switch (whichText) { case TEXT_GROUPS: @@ -4219,7 +4231,7 @@ static void InitLowerWindowText(u32 whichText) break; } - CopyWindowToVram(2, COPYWIN_GFX); + CopyWindowToVram(WIN_INPUT_SELECT, COPYWIN_GFX); } static void PrintKeyboardText(void) @@ -4248,7 +4260,7 @@ static void PrintKeyboardGroupNames(void) return; } - PrintEasyChatText(2, FONT_NORMAL, GetEasyChatWordGroupName(groupId), x * 84 + 10, y, TEXT_SKIP_DRAW, NULL); + PrintEasyChatText(WIN_INPUT_SELECT, FONT_NORMAL, GetEasyChatWordGroupName(groupId), x * 84 + 10, y, TEXT_SKIP_DRAW, NULL); } y += 16; @@ -4260,7 +4272,7 @@ static void PrintKeyboardAlphabet(void) u32 i; for (i = 0; i < ARRAY_COUNT(sEasyChatKeyboardAlphabet); i++) - PrintEasyChatText(2, FONT_NORMAL, sEasyChatKeyboardAlphabet[i], 10, 97 + i * 16, TEXT_SKIP_DRAW, NULL); + PrintEasyChatText(WIN_INPUT_SELECT, FONT_NORMAL, sEasyChatKeyboardAlphabet[i], 10, 97 + i * 16, TEXT_SKIP_DRAW, NULL); } static void PrintInitialWordSelectText(void) @@ -4331,16 +4343,16 @@ static void PrintWordSelectText(u8 scrollOffset, u8 numRows) { CopyEasyChatWordPadded(sScreenControl->wordSelectPrintBuffer, easyChatWord, 0); if (!DummyWordCheck(easyChatWord)) - PrintEasyChatText(2, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SKIP_DRAW, NULL); + PrintEasyChatText(WIN_INPUT_SELECT, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SKIP_DRAW, NULL); else // Never reached - PrintEasyChatTextWithColors(2, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SKIP_DRAW, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_RED, TEXT_COLOR_LIGHT_GRAY); + PrintEasyChatTextWithColors(WIN_INPUT_SELECT, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SKIP_DRAW, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_RED, TEXT_COLOR_LIGHT_GRAY); } } y += 16; } - CopyWindowToVram(2, COPYWIN_GFX); + CopyWindowToVram(WIN_INPUT_SELECT, COPYWIN_GFX); } static void EraseWordSelectRows(u8 scrollOffset, u8 numRows) @@ -4364,15 +4376,15 @@ static void EraseWordSelectRows(u8 scrollOffset, u8 numRows) var1 = 0; } - FillWindowPixelRect(2, PIXEL_FILL(1), 0, y, 224, var2); + FillWindowPixelRect(WIN_INPUT_SELECT, PIXEL_FILL(1), 0, y, 224, var2); if (var1) - FillWindowPixelRect(2, PIXEL_FILL(1), 0, 0, 224, var1); + FillWindowPixelRect(WIN_INPUT_SELECT, PIXEL_FILL(1), 0, 0, 224, var1); } static void ClearWordSelectWindow(void) { - FillWindowPixelBuffer(2, PIXEL_FILL(1)); - CopyWindowToVram(2, COPYWIN_GFX); + FillWindowPixelBuffer(WIN_INPUT_SELECT, PIXEL_FILL(1)); + CopyWindowToVram(WIN_INPUT_SELECT, COPYWIN_GFX); } static void InitLowerWindowAnim(int winAnimType) @@ -5097,7 +5109,7 @@ static bool8 IsEasyChatGroupUnlocked(u8 groupId) switch (groupId) { case EC_GROUP_TRENDY_SAYING: - return FlagGet(FLAG_SYS_HIPSTER_MEET); + return FlagGet(FLAG_UNLOCKED_TRENDY_SAYINGS); case EC_GROUP_EVENTS: case EC_GROUP_MOVE_1: case EC_GROUP_MOVE_2: @@ -5413,80 +5425,99 @@ void BufferDeepLinkPhrase(void) CopyEasyChatWord(gStringVar2, easyChatWord); } -static bool8 IsAdditionalPhraseUnlocked(u8 additionalPhraseId) +/* + ### Trendy Sayings + + Not to be confused with Dewford Town's "trendy phrase". + + This is a group of easy chat words (EC_GROUP_TRENDY_SAYING) that are normally inaccessible. + They can be unlocked either through Mystery Event (where they're referred to as "rare" words) + or from the "Hipster" variety of the Mauville Old Man. The Hipster can unlock one word each + time he is received via record mixing (and once if he is the player's default Old Man). + + Which words have been unlocked is saved in the unlockedTrendySayings bitfield in SaveBlock1 + + Unlocked trendy saying words are only accessible if the flag FLAG_UNLOCKED_TRENDY_SAYINGS is set. + It's set any time the player talks to the Hipster, but is not apparently set by Mystery Event, + meaning trendy saying words unlocked via Mystery Event may not be available until the player has + talked to the Hipster. +*/ +static bool8 IsTrendySayingUnlocked(u8 wordIndex) { - int byteOffset = additionalPhraseId / 8; - int shift = additionalPhraseId % 8; - return (gSaveBlock1Ptr->additionalPhrases[byteOffset] >> shift) & 1; + int byteOffset = wordIndex / 8; + int shift = wordIndex % 8; + return (gSaveBlock1Ptr->unlockedTrendySayings[byteOffset] >> shift) & 1; } -void UnlockAdditionalPhrase(u8 additionalPhraseId) +void UnlockTrendySaying(u8 wordIndex) { - if (additionalPhraseId < NUM_ADDITIONAL_PHRASES) + if (wordIndex < NUM_TRENDY_SAYINGS) { - int byteOffset = additionalPhraseId / 8; - int shift = additionalPhraseId % 8; - gSaveBlock1Ptr->additionalPhrases[byteOffset] |= 1 << shift; + int byteOffset = wordIndex / 8; + int shift = wordIndex % 8; + gSaveBlock1Ptr->unlockedTrendySayings[byteOffset] |= 1 << shift; } } -static u8 GetNumAdditionalPhrasesUnlocked(void) +static u8 GetNumTrendySayingsUnlocked(void) { u8 i; - u8 numAdditionalPhrasesUnlocked; + u8 numUnlocked; - for (i = 0, numAdditionalPhrasesUnlocked = 0; i < NUM_ADDITIONAL_PHRASES; i++) + for (i = 0, numUnlocked = 0; i < NUM_TRENDY_SAYINGS; i++) { - if (IsAdditionalPhraseUnlocked(i)) - numAdditionalPhrasesUnlocked++; + if (IsTrendySayingUnlocked(i)) + numUnlocked++; } - return numAdditionalPhrasesUnlocked; + return numUnlocked; } -u16 GetNewHipsterPhraseToTeach(void) +u16 UnlockRandomTrendySaying(void) { u16 i; - u16 additionalPhraseId; - u8 numAdditionalPhrasesUnlocked = GetNumAdditionalPhrasesUnlocked(); - if (numAdditionalPhrasesUnlocked == NUM_ADDITIONAL_PHRASES) + u16 numToSkip; + u8 numUnlocked = GetNumTrendySayingsUnlocked(); + if (numUnlocked == NUM_TRENDY_SAYINGS) return EC_EMPTY_WORD; - additionalPhraseId = Random() % (NUM_ADDITIONAL_PHRASES - numAdditionalPhrasesUnlocked); - for (i = 0; i < NUM_ADDITIONAL_PHRASES; i++) + numToSkip = Random() % (NUM_TRENDY_SAYINGS - numUnlocked); + for (i = 0; i < NUM_TRENDY_SAYINGS; i++) { - if (!IsAdditionalPhraseUnlocked(i)) + if (!IsTrendySayingUnlocked(i)) { - if (additionalPhraseId) + if (numToSkip) { - additionalPhraseId--; + // Skip the first n locked words, as determined by the Random call above. + numToSkip--; } else { - UnlockAdditionalPhrase(i); + UnlockTrendySaying(i); return EC_WORD(EC_GROUP_TRENDY_SAYING, i); } } } + // Would only be reached if there are no new words to teach, which is handled at the start. return EC_EMPTY_WORD; } // Unused -u16 GetRandomTaughtHipsterPhrase(void) +static u16 GetRandomUnlockedTrendySaying(void) { u16 i; - u16 additionalPhraseId = GetNumAdditionalPhrasesUnlocked(); - if (additionalPhraseId == 0) + u16 n = GetNumTrendySayingsUnlocked(); + if (n == 0) return EC_EMPTY_WORD; - additionalPhraseId = Random() % additionalPhraseId; - for (i = 0; i < NUM_ADDITIONAL_PHRASES; i++) + n = Random() % n; + for (i = 0; i < NUM_TRENDY_SAYINGS; i++) { - if (IsAdditionalPhraseUnlocked(i)) + if (IsTrendySayingUnlocked(i)) { - if (additionalPhraseId) - additionalPhraseId--; + if (n) + n--; else return EC_WORD(EC_GROUP_TRENDY_SAYING, i); } @@ -5557,10 +5588,10 @@ void InitEasyChatPhrases(void) // Mauville old man data is corrupted, which is initialized directly after // this function is called when starting a new game. for (i = 0; i < 64; i++) - gSaveBlock1Ptr->additionalPhrases[i] = 0; + gSaveBlock1Ptr->unlockedTrendySayings[i] = 0; #else - for (i = 0; i < ARRAY_COUNT(gSaveBlock1Ptr->additionalPhrases); i++) - gSaveBlock1Ptr->additionalPhrases[i] = 0; + for (i = 0; i < ARRAY_COUNT(gSaveBlock1Ptr->unlockedTrendySayings); i++) + gSaveBlock1Ptr->unlockedTrendySayings[i] = 0; #endif } @@ -5599,7 +5630,7 @@ static void SetUnlockedEasyChatGroups(void) sWordData->unlockedGroupIds[sWordData->numUnlockedGroups++] = EC_GROUP_MOVE_2; } - if (FlagGet(FLAG_SYS_HIPSTER_MEET)) + if (FlagGet(FLAG_UNLOCKED_TRENDY_SAYINGS)) sWordData->unlockedGroupIds[sWordData->numUnlockedGroups++] = EC_GROUP_TRENDY_SAYING; if (IsNationalPokedexEnabled()) @@ -5788,7 +5819,7 @@ static bool8 IsEasyChatIndexAndGroupUnlocked(u16 wordIndex, u8 groupId) case EC_GROUP_MOVE_2: return TRUE; case EC_GROUP_TRENDY_SAYING: - return IsAdditionalPhraseUnlocked(wordIndex); + return IsTrendySayingUnlocked(wordIndex); default: return gEasyChatGroups[groupId].wordData.words[wordIndex].enabled; } diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 3a5937ba4d..fe50c80f41 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -313,7 +313,7 @@ static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp) { u16 species; u32 personality, pokerus; - u8 i, friendship, language, gameMet, markings, isEventLegal; + u8 i, friendship, language, gameMet, markings, isModernFatefulEncounter; u16 moves[MAX_MON_MOVES]; u32 ivs[NUM_STATS]; @@ -332,7 +332,7 @@ static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp) gameMet = GetMonData(egg, MON_DATA_MET_GAME); markings = GetMonData(egg, MON_DATA_MARKINGS); pokerus = GetMonData(egg, MON_DATA_POKERUS); - isEventLegal = GetMonData(egg, MON_DATA_EVENT_LEGAL); + isModernFatefulEncounter = GetMonData(egg, MON_DATA_MODERN_FATEFUL_ENCOUNTER); CreateMon(temp, species, EGG_HATCH_LEVEL, USE_RANDOM_IVS, TRUE, personality, OT_ID_PLAYER_ID, 0); @@ -350,7 +350,7 @@ static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp) friendship = 120; SetMonData(temp, MON_DATA_FRIENDSHIP, &friendship); SetMonData(temp, MON_DATA_POKERUS, &pokerus); - SetMonData(temp, MON_DATA_EVENT_LEGAL, &isEventLegal); + SetMonData(temp, MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter); *egg = *temp; } diff --git a/src/ereader_screen.c b/src/ereader_screen.c index ea5cface42..c625c78a9e 100755 --- a/src/ereader_screen.c +++ b/src/ereader_screen.c @@ -343,7 +343,7 @@ static void Task_EReader(u8 taskId) case ER_STATE_MSG_SELECT_CONNECT: if (PrintMysteryGiftMenuMessage(&data->textState, gJPText_SelectConnectFromEReaderMenu)) { - AddTextPrinterToWindow1(gJPText_SelectConnectWithGBA); + MG_AddMessageTextPrinter(gJPText_SelectConnectWithGBA); ResetTimer(&data->timer); data->state = ER_STATE_MSG_SELECT_CONNECT_WAIT; } @@ -397,7 +397,7 @@ static void Task_EReader(u8 taskId) data->state = ER_STATE_MSG_SELECT_CONNECT; break; case ER_STATE_CONNECTING: - AddTextPrinterToWindow1(gJPText_Connecting); + MG_AddMessageTextPrinter(gJPText_Connecting); // XXX: This (u32 *) cast is discarding the const qualifier from gMultiBootProgram_EReader_Start EReader_Load(&gEReaderData, gMultiBootProgram_EReader_End - gMultiBootProgram_EReader_Start, (u32 *)gMultiBootProgram_EReader_Start); data->state = ER_STATE_TRANSFER; @@ -416,7 +416,7 @@ static void Task_EReader(u8 taskId) else if (data->status == TRANSFER_SUCCESS) { ResetTimer(&data->timer); - AddTextPrinterToWindow1(gJPText_PleaseWaitAMoment); + MG_AddMessageTextPrinter(gJPText_PleaseWaitAMoment); data->state = ER_STATE_TRANSFER_SUCCESS; } else // TRANSFER_CANCELED @@ -430,7 +430,7 @@ static void Task_EReader(u8 taskId) break; case ER_STATE_LOAD_CARD_START: OpenEReaderLink(); - AddTextPrinterToWindow1(gJPText_AllowEReaderToLoadCard); + MG_AddMessageTextPrinter(gJPText_AllowEReaderToLoadCard); data->state = ER_STATE_LOAD_CARD; break; case ER_STATE_LOAD_CARD: @@ -439,7 +439,7 @@ static void Task_EReader(u8 taskId) case RECV_ACTIVE: break; case RECV_SUCCESS: - AddTextPrinterToWindow1(gJPText_Connecting); + MG_AddMessageTextPrinter(gJPText_Connecting); data->state = ER_STATE_WAIT_RECV_CARD; break; case RECV_CANCELED: @@ -487,7 +487,7 @@ static void Task_EReader(u8 taskId) case ER_STATE_SAVE: if (TryWriteTrainerHill((struct EReaderTrainerHillSet *)&gDecompressionBuffer)) { - AddTextPrinterToWindow1(gJPText_ConnectionComplete); + MG_AddMessageTextPrinter(gJPText_ConnectionComplete); ResetTimer(&data->timer); data->state = ER_STATE_SUCCESS_MSG; } @@ -499,7 +499,7 @@ static void Task_EReader(u8 taskId) case ER_STATE_SUCCESS_MSG: if (UpdateTimer(&data->timer, 120)) { - AddTextPrinterToWindow1(gJPText_NewTrainerHasComeToHoenn); + MG_AddMessageTextPrinter(gJPText_NewTrainerHasComeToHoenn); PlayFanfare(MUS_OBTAIN_ITEM); data->state = ER_STATE_SUCCESS_END; } diff --git a/src/event_object_movement.c b/src/event_object_movement.c index ae48223c3a..329482e318 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -132,9 +132,9 @@ static void SetObjectEventDynamicGraphicsId(struct ObjectEvent *); static void RemoveObjectEventInternal(struct ObjectEvent *); static u16 GetObjectEventFlagIdByObjectEventId(u8); static void UpdateObjectEventVisibility(struct ObjectEvent *, struct Sprite *); -static void MakeSpriteTemplateFromObjectEventTemplate(struct ObjectEventTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); +static void MakeSpriteTemplateFromObjectEventTemplate(const struct ObjectEventTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); static void GetObjectEventMovingCameraOffset(s16 *, s16 *); -static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8, u8, u8); +static const struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8, u8, u8); static void LoadObjectEventPalette(u16); static void RemoveObjectEventIfOutsideView(struct ObjectEvent *); static void SpawnObjectEventOnReturnToField(u8, s16, s16); @@ -148,7 +148,7 @@ static void SpriteCB_CameraObject(struct Sprite *); static void CameraObject_0(struct Sprite *); static void CameraObject_1(struct Sprite *); static void CameraObject_2(struct Sprite *); -static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8, struct ObjectEventTemplate *, u8); +static const struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8, const struct ObjectEventTemplate *, u8); static void ClearObjectEventMovement(struct ObjectEvent *, struct Sprite *); static void ObjectEventSetSingleMovement(struct ObjectEvent *, struct Sprite *, u8); static void SetSpriteDataForNormalStep(struct Sprite *, u8, u8); @@ -499,7 +499,7 @@ static const struct SpritePalette sObjectEventSpritePalettes[] = { {gObjectEventPal_RubySapphireBrendan, OBJ_EVENT_PAL_TAG_RS_BRENDAN}, {gObjectEventPal_RubySapphireMay, OBJ_EVENT_PAL_TAG_RS_MAY}, #ifdef BUGFIX - {NULL, OBJ_EVENT_PAL_TAG_NONE}, + {NULL, OBJ_EVENT_PAL_TAG_NONE}, #else {}, // BUG: FindObjectEventPaletteIndexByTag looks for OBJ_EVENT_PAL_TAG_NONE and not 0x0. // If it's looking for a tag that isn't in this table, the game locks in an infinite loop. @@ -1268,7 +1268,7 @@ static u8 GetObjectEventIdByLocalId(u8 localId) return OBJECT_EVENTS_COUNT; } -static u8 InitObjectEventStateFromTemplate(struct ObjectEventTemplate *template, u8 mapNum, u8 mapGroup) +static u8 InitObjectEventStateFromTemplate(const struct ObjectEventTemplate *template, u8 mapNum, u8 mapGroup) { struct ObjectEvent *objectEvent; u8 objectEventId; @@ -1399,7 +1399,7 @@ void RemoveAllObjectEventsExceptPlayer(void) } } -static u8 TrySetupObjectEventSprite(struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) +static u8 TrySetupObjectEventSprite(const struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) { u8 spriteId; u8 paletteSlot; @@ -1459,7 +1459,7 @@ static u8 TrySetupObjectEventSprite(struct ObjectEventTemplate *objectEventTempl return objectEventId; } -static u8 TrySpawnObjectEventTemplate(struct ObjectEventTemplate *objectEventTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) +static u8 TrySpawnObjectEventTemplate(const struct ObjectEventTemplate *objectEventTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) { u8 objectEventId; struct SpriteTemplate spriteTemplate; @@ -1499,7 +1499,7 @@ u8 SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 l y -= MAP_OFFSET; objectEventTemplate.localId = localId; objectEventTemplate.graphicsId = graphicsId; - objectEventTemplate.inConnection = 0; + objectEventTemplate.kind = OBJ_KIND_NORMAL; objectEventTemplate.x = x; objectEventTemplate.y = y; objectEventTemplate.elevation = elevation; @@ -1513,7 +1513,7 @@ u8 SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 l u8 TrySpawnObjectEvent(u8 localId, u8 mapNum, u8 mapGroup) { - struct ObjectEventTemplate *objectEventTemplate; + const struct ObjectEventTemplate *objectEventTemplate; s16 cameraX, cameraY; objectEventTemplate = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup); @@ -1543,7 +1543,7 @@ static void CopyObjectGraphicsInfoToSpriteTemplate_WithMovementType(u16 graphics CopyObjectGraphicsInfoToSpriteTemplate(graphicsId, sMovementTypeCallbacks[movementType], spriteTemplate, subspriteTables); } -static void MakeSpriteTemplateFromObjectEventTemplate(struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables) +static void MakeSpriteTemplateFromObjectEventTemplate(const struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables) { CopyObjectGraphicsInfoToSpriteTemplate_WithMovementType(objectEventTemplate->graphicsId, objectEventTemplate->movementType, spriteTemplate, subspriteTables); } @@ -2375,7 +2375,7 @@ const u8 *GetObjectEventScriptPointerByObjectEventId(u8 objectEventId) static u16 GetObjectEventFlagIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) { - struct ObjectEventTemplate *obj = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup); + const struct ObjectEventTemplate *obj = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup); #ifdef UBFIX // BUG: The function may return NULL, and attempting to read from NULL may freeze the game using modern compilers. if (obj == NULL) @@ -2422,9 +2422,9 @@ u8 GetObjectEventBerryTreeId(u8 objectEventId) return gObjectEvents[objectEventId].trainerRange_berryTreeId; } -static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) +static const struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) { - struct ObjectEventTemplate *templates; + const struct ObjectEventTemplate *templates; const struct MapHeader *mapHeader; u8 count; @@ -2442,7 +2442,7 @@ static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 loca return FindObjectEventTemplateByLocalId(localId, templates, count); } -static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, struct ObjectEventTemplate *templates, u8 count) +static const struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, const struct ObjectEventTemplate *templates, u8 count) { u8 i; @@ -4654,8 +4654,8 @@ u8 GetCollisionAtCoords(struct ObjectEvent *objectEvent, s16 x, s16 y, u32 dir) { u8 direction = dir; -#if DEBUG_FLAG_NO_COLLISION != 0 - if (FlagGet(DEBUG_FLAG_NO_COLLISION)) +#if OW_FLAG_NO_COLLISION != 0 + if (FlagGet(OW_FLAG_NO_COLLISION)) return COLLISION_NONE; #endif diff --git a/src/expansion_intro.c b/src/expansion_intro.c index 63bcce4e94..e37ea4b2e6 100644 --- a/src/expansion_intro.c +++ b/src/expansion_intro.c @@ -1,6 +1,5 @@ #include "global.h" #include "bg.h" -#include "clear_save_data_menu.h" #include "decompress.h" #include "palette.h" #include "sound.h" @@ -10,6 +9,7 @@ #include "trig.h" #include "main.h" #include "intro.h" +#include "m4a.h" #include "expansion_intro.h" #include "constants/rgb.h" #include "constants/songs.h" @@ -33,10 +33,10 @@ #define DIZZY_ANIM_SPEED 4 #define DIZZY_STARS_SPEED 12 -enum +enum { EXPANSION_INTRO_BG2, - EXPANSION_INTRO_BG3 + EXPANSION_INTRO_BG3 }; enum @@ -253,16 +253,34 @@ void Task_HandleExpansionIntro(u8 taskId) tState++; break; case 2: - if (tFrameCounter == 208 || gMain.newKeys != 0) + if (tFrameCounter == 208) + { tState++; + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); + } + else if (gMain.newKeys != 0) + { + CpuFill16(0, gPlttBufferFaded, sizeof(gPlttBufferFaded)); + if (IsCryPlaying()) + StopCry(); + m4aSongNumStop(SE_BIKE_HOP); + m4aSongNumStop(SE_M_DOUBLE_SLAP); + tState++; + } else + { tFrameCounter++; + } break; case 3: - ResetSpriteData(); - DestroyTask(taskId); - CreateTask(Task_Scene1_Load, 0); - SetMainCallback2(MainCB2_Intro); + if (!gPaletteFade.active) + { + ResetSpriteData(); + FreeAllSpritePalettes(); + DestroyTask(taskId); + CreateTask(Task_Scene1_Load, 0); + SetMainCallback2(MainCB2_Intro); + } break; } } diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 96e9173c9b..a1575ba00e 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -61,8 +61,8 @@ static s8 GetWarpEventAtMapPosition(struct MapHeader *, struct MapPosition *); static void SetupWarp(struct MapHeader *, s8, struct MapPosition *); static bool8 TryDoorWarp(struct MapPosition *, u16, u8); static s8 GetWarpEventAtPosition(struct MapHeader *, u16, u16, u8); -static u8 *GetCoordEventScriptAtPosition(struct MapHeader *, u16, u16, u8); -static struct BgEvent *GetBackgroundEventAtPosition(struct MapHeader *, u16, u16, u8); +static const u8 *GetCoordEventScriptAtPosition(struct MapHeader *, u16, u16, u8); +static const struct BgEvent *GetBackgroundEventAtPosition(struct MapHeader *, u16, u16, u8); static bool8 TryStartCoordEventScript(struct MapPosition *); static bool8 TryStartWarpEventScript(struct MapPosition *, u16); static bool8 TryStartMiscWalkingScripts(u16); @@ -334,7 +334,7 @@ static const u8 *GetInteractedObjectEventScript(struct MapPosition *position, u8 static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *position, u8 metatileBehavior, u8 direction) { - struct BgEvent *bgEvent = GetBackgroundEventAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation); + const struct BgEvent *bgEvent = GetBackgroundEventAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation); if (bgEvent == NULL) return NULL; @@ -516,7 +516,7 @@ static bool8 TryStartStepBasedScript(struct MapPosition *position, u16 metatileB static bool8 TryStartCoordEventScript(struct MapPosition *position) { - u8 *script = GetCoordEventScriptAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation); + const u8 *script = GetCoordEventScriptAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation); if (script == NULL) return FALSE; @@ -565,11 +565,13 @@ static bool8 TryStartStepCountScript(u16 metatileBehavior) if (!(gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_FORCED_MOVE) && !MetatileBehavior_IsForcedMovementTile(metatileBehavior)) { + #if OW_POISON_DAMAGE < GEN_5 if (UpdatePoisonStepCounter() == TRUE) { ScriptContext_SetupScript(EventScript_FieldPoison); return TRUE; } + #endif if (ShouldEggHatch()) { IncrementGameStat(GAME_STAT_HATCHED_EGGS); @@ -883,7 +885,7 @@ static bool8 TryDoorWarp(struct MapPosition *position, u16 metatileBehavior, u8 static s8 GetWarpEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation) { s32 i; - struct WarpEvent *warpEvent = mapHeader->events->warps; + const struct WarpEvent *warpEvent = mapHeader->events->warps; u8 warpCount = mapHeader->events->warpCount; for (i = 0; i < warpCount; i++, warpEvent++) @@ -897,7 +899,7 @@ static s8 GetWarpEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 e return WARP_ID_NONE; } -static u8 *TryRunCoordEventScript(struct CoordEvent *coordEvent) +static const u8 *TryRunCoordEventScript(const struct CoordEvent *coordEvent) { if (coordEvent != NULL) { @@ -917,10 +919,10 @@ static u8 *TryRunCoordEventScript(struct CoordEvent *coordEvent) return NULL; } -static u8 *GetCoordEventScriptAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation) +static const u8 *GetCoordEventScriptAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation) { s32 i; - struct CoordEvent *coordEvents = mapHeader->events->coordEvents; + const struct CoordEvent *coordEvents = mapHeader->events->coordEvents; u8 coordEventCount = mapHeader->events->coordEventCount; for (i = 0; i < coordEventCount; i++) @@ -929,7 +931,7 @@ static u8 *GetCoordEventScriptAtPosition(struct MapHeader *mapHeader, u16 x, u16 { if (coordEvents[i].elevation == elevation || coordEvents[i].elevation == 0) { - u8 *script = TryRunCoordEventScript(&coordEvents[i]); + const u8 *script = TryRunCoordEventScript(&coordEvents[i]); if (script != NULL) return script; } @@ -938,15 +940,15 @@ static u8 *GetCoordEventScriptAtPosition(struct MapHeader *mapHeader, u16 x, u16 return NULL; } -u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position) +const u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position) { return GetCoordEventScriptAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation); } -static struct BgEvent *GetBackgroundEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation) +static const struct BgEvent *GetBackgroundEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation) { u8 i; - struct BgEvent *bgEvents = mapHeader->events->bgEvents; + const struct BgEvent *bgEvents = mapHeader->events->bgEvents; u8 bgEventCount = mapHeader->events->bgEventCount; for (i = 0; i < bgEventCount; i++) diff --git a/src/field_effect.c b/src/field_effect.c index d62b2f5955..b5880b3fcb 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -3831,26 +3831,38 @@ static void SpriteCB_DeoxysRockFragment(struct Sprite *sprite) DestroySprite(sprite); } +// Task data for Task_MoveDeoxysRock +#define tState data[0] +#define tSpriteId data[1] +#define tTargetX data[2] +#define tTargetY data[3] +#define tCurX data[4] +#define tCurY data[5] +#define tVelocityX data[6] +#define tVelocityY data[7] +#define tMoveSteps data[8] +#define tObjEventId data[9] + bool8 FldEff_MoveDeoxysRock(struct Sprite *sprite) { - u8 objectEventIdBuffer; - if (!TryGetObjectEventIdByLocalIdAndMap(gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2], &objectEventIdBuffer)) + u8 objectEventId; + if (!TryGetObjectEventIdByLocalIdAndMap(gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2], &objectEventId)) { struct ObjectEvent *object; int xPos, yPos; u8 taskId; - object = &gObjectEvents[objectEventIdBuffer]; + object = &gObjectEvents[objectEventId]; xPos = object->currentCoords.x - MAP_OFFSET; yPos = object->currentCoords.y - MAP_OFFSET; xPos = (gFieldEffectArguments[3] - xPos) * 16; yPos = (gFieldEffectArguments[4] - yPos) * 16; ShiftObjectEventCoords(object, gFieldEffectArguments[3] + MAP_OFFSET, gFieldEffectArguments[4] + MAP_OFFSET); taskId = CreateTask(Task_MoveDeoxysRock, 80); - gTasks[taskId].data[1] = object->spriteId; - gTasks[taskId].data[2] = gSprites[object->spriteId].x + xPos; - gTasks[taskId].data[3] = gSprites[object->spriteId].y + yPos; - gTasks[taskId].data[8] = gFieldEffectArguments[5]; - gTasks[taskId].data[9] = objectEventIdBuffer; + gTasks[taskId].tSpriteId = object->spriteId; + gTasks[taskId].tTargetX = gSprites[object->spriteId].x + xPos; + gTasks[taskId].tTargetY = gSprites[object->spriteId].y + yPos; + gTasks[taskId].tMoveSteps = gFieldEffectArguments[5]; + gTasks[taskId].tObjEventId = objectEventId; } return FALSE; } @@ -3858,29 +3870,30 @@ bool8 FldEff_MoveDeoxysRock(struct Sprite *sprite) static void Task_MoveDeoxysRock(u8 taskId) { s16 *data = gTasks[taskId].data; - struct Sprite *sprite = &gSprites[data[1]]; - switch (data[0]) + struct Sprite *sprite = &gSprites[tSpriteId]; + switch (tState) { case 0: - data[4] = sprite->x << 4; - data[5] = sprite->y << 4; - data[6] = SAFE_DIV(data[2] * 16 - data[4], data[8]); - data[7] = SAFE_DIV(data[3] * 16 - data[5], data[8]); - data[0]++; + tCurX = sprite->x << 4; + tCurY = sprite->y << 4; + tVelocityX = SAFE_DIV(tTargetX * 16 - tCurX, tMoveSteps); + tVelocityY = SAFE_DIV(tTargetY * 16 - tCurY, tMoveSteps); + tState++; + // fallthrough case 1: - if (data[8] != 0) + if (tMoveSteps != 0) { - data[8]--; - data[4] += data[6]; - data[5] += data[7]; - sprite->x = data[4] >> 4; - sprite->y = data[5] >> 4; + tMoveSteps--; + tCurX += tVelocityX; + tCurY += tVelocityY; + sprite->x = tCurX >> 4; + sprite->y = tCurY >> 4; } else { - struct ObjectEvent *object = &gObjectEvents[data[9]]; - sprite->x = data[2]; - sprite->y = data[3]; + struct ObjectEvent *object = &gObjectEvents[tObjEventId]; + sprite->x = tTargetX; + sprite->y = tTargetY; ShiftStillObjectEventCoords(object); object->triggerGroundEffectsOnStop = TRUE; FieldEffectActiveListRemove(FLDEFF_MOVE_DEOXYS_ROCK); @@ -3890,3 +3903,13 @@ static void Task_MoveDeoxysRock(u8 taskId) } } +#undef tState +#undef tSpriteId +#undef tTargetX +#undef tTargetY +#undef tCurX +#undef tCurY +#undef tVelocityX +#undef tVelocityY +#undef tMoveSteps +#undef tObjEventId diff --git a/src/field_poison.c b/src/field_poison.c index fcb47acdb8..da162e4134 100644 --- a/src/field_poison.c +++ b/src/field_poison.c @@ -19,7 +19,7 @@ static bool32 IsMonValidSpecies(struct Pokemon *pokemon) { - u16 species = GetMonData(pokemon, MON_DATA_SPECIES2); + u16 species = GetMonData(pokemon, MON_DATA_SPECIES_OR_EGG); if (species == SPECIES_NONE || species == SPECIES_EGG) return FALSE; @@ -44,7 +44,9 @@ static void FaintFromFieldPoison(u8 partyIdx) struct Pokemon *pokemon = &gPlayerParty[partyIdx]; u32 status = STATUS1_NONE; +#if OW_POISON_DAMAGE < GEN_4 AdjustFriendship(pokemon, FRIENDSHIP_EVENT_FAINT_FIELD_PSN); +#endif SetMonData(pokemon, MON_DATA_STATUS, &status); GetMonData(pokemon, MON_DATA_NICKNAME, gStringVar1); StringGet_Nickname(gStringVar1); @@ -53,7 +55,11 @@ static void FaintFromFieldPoison(u8 partyIdx) static bool32 MonFaintedFromPoison(u8 partyIdx) { struct Pokemon *pokemon = &gPlayerParty[partyIdx]; +#if OW_POISON_DAMAGE < GEN_4 if (IsMonValidSpecies(pokemon) && GetMonData(pokemon, MON_DATA_HP) == 0 && GetAilmentFromStatus(GetMonData(pokemon, MON_DATA_STATUS)) == AILMENT_PSN) +#else + if (IsMonValidSpecies(pokemon) && GetMonData(pokemon, MON_DATA_HP) == 1 && GetAilmentFromStatus(GetMonData(pokemon, MON_DATA_STATUS)) == AILMENT_PSN) +#endif return TRUE; return FALSE; @@ -127,7 +133,11 @@ s32 DoPoisonFieldEffect(void) { // Apply poison damage hp = GetMonData(pokemon, MON_DATA_HP); + #if OW_POISON_DAMAGE < GEN_4 if (hp == 0 || --hp == 0) + #else + if (hp == 1 || --hp == 1) + #endif numFainted++; SetMonData(pokemon, MON_DATA_HP, &hp); diff --git a/src/field_region_map.c b/src/field_region_map.c index 4c94172d57..73fc14582b 100644 --- a/src/field_region_map.c +++ b/src/field_region_map.c @@ -23,9 +23,15 @@ * For the fly map, and utility functions all of the maps use, see region_map.c */ -// Static type declarations +enum { + WIN_MAPSEC_NAME, + WIN_TITLE, +}; -// Static RAM declarations +enum { + TAG_PLAYER_ICON, + TAG_CURSOR, +}; static EWRAM_DATA struct { MainCallback callback; @@ -34,16 +40,12 @@ static EWRAM_DATA struct { u16 state; } *sFieldRegionMapHandler = NULL; -// Static ROM declarations - static void MCB2_InitRegionMapRegisters(void); static void VBCB_FieldUpdateRegionMap(void); static void MCB2_FieldUpdateRegionMap(void); static void FieldUpdateRegionMap(void); static void PrintRegionMapSecName(void); -// .rodata - static const struct BgTemplate sFieldRegionMapBgTemplates[] = { { .bg = 0, @@ -66,7 +68,7 @@ static const struct BgTemplate sFieldRegionMapBgTemplates[] = { static const struct WindowTemplate sFieldRegionMapWindowTemplates[] = { - { + [WIN_MAPSEC_NAME] = { .bg = 0, .tilemapLeft = 17, .tilemapTop = 17, @@ -75,7 +77,7 @@ static const struct WindowTemplate sFieldRegionMapWindowTemplates[] = .paletteNum = 15, .baseBlock = 1 }, - { + [WIN_TITLE] = { .bg = 0, .tilemapLeft = 22, .tilemapTop = 1, @@ -87,8 +89,6 @@ static const struct WindowTemplate sFieldRegionMapWindowTemplates[] = DUMMY_WIN_TEMPLATE }; -// .text - void FieldInitRegionMap(MainCallback callback) { SetVBlankCallback(NULL); @@ -145,16 +145,16 @@ static void FieldUpdateRegionMap(void) { case 0: InitRegionMap(&sFieldRegionMapHandler->regionMap, FALSE); - CreateRegionMapPlayerIcon(0, 0); - CreateRegionMapCursor(1, 1); + CreateRegionMapPlayerIcon(TAG_PLAYER_ICON, TAG_PLAYER_ICON); + CreateRegionMapCursor(TAG_CURSOR, TAG_CURSOR); sFieldRegionMapHandler->state++; break; case 1: - DrawStdFrameWithCustomTileAndPalette(1, FALSE, 0x27, 0xd); + DrawStdFrameWithCustomTileAndPalette(WIN_TITLE, FALSE, 0x27, 0xd); offset = GetStringCenterAlignXOffset(FONT_NORMAL, gText_Hoenn, 0x38); - AddTextPrinterParameterized(1, FONT_NORMAL, gText_Hoenn, offset, 1, 0, NULL); + AddTextPrinterParameterized(WIN_TITLE, FONT_NORMAL, gText_Hoenn, offset, 1, 0, NULL); ScheduleBgCopyTilemapToVram(0); - DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x27, 0xd); + DrawStdFrameWithCustomTileAndPalette(WIN_MAPSEC_NAME, FALSE, 0x27, 0xd); PrintRegionMapSecName(); BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); sFieldRegionMapHandler->state++; @@ -203,13 +203,13 @@ static void PrintRegionMapSecName(void) { if (sFieldRegionMapHandler->regionMap.mapSecType != MAPSECTYPE_NONE) { - FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized(0, FONT_NORMAL, sFieldRegionMapHandler->regionMap.mapSecName, 0, 1, 0, NULL); - ScheduleBgCopyTilemapToVram(0); + FillWindowPixelBuffer(WIN_MAPSEC_NAME, PIXEL_FILL(1)); + AddTextPrinterParameterized(WIN_MAPSEC_NAME, FONT_NORMAL, sFieldRegionMapHandler->regionMap.mapSecName, 0, 1, 0, NULL); + ScheduleBgCopyTilemapToVram(WIN_MAPSEC_NAME); } else { - FillWindowPixelBuffer(0, PIXEL_FILL(1)); - CopyWindowToVram(0, COPYWIN_FULL); + FillWindowPixelBuffer(WIN_MAPSEC_NAME, PIXEL_FILL(1)); + CopyWindowToVram(WIN_MAPSEC_NAME, COPYWIN_FULL); } } diff --git a/src/field_specials.c b/src/field_specials.c index eb622f1f69..6fdec2a5f0 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -46,6 +46,7 @@ #include "wallclock.h" #include "window.h" #include "constants/battle_frontier.h" +#include "constants/battle_pyramid.h" #include "constants/battle_tower.h" #include "constants/decorations.h" #include "constants/event_objects.h" @@ -67,6 +68,15 @@ #include "palette.h" #include "battle_util.h" +#define TAG_ITEM_ICON 5500 + +#define GFXTAG_MULTICHOICE_SCROLL_ARROWS 2000 +#define PALTAG_MULTICHOICE_SCROLL_ARROWS 100 + +#define ELEVATOR_WINDOW_WIDTH 3 +#define ELEVATOR_WINDOW_HEIGHT 3 +#define ELEVATOR_LIGHT_STAGES 3 + EWRAM_DATA bool8 gBikeCyclingChallenge = FALSE; EWRAM_DATA u8 gBikeCollisions = 0; static EWRAM_DATA u32 sBikeCyclingTimer = 0; @@ -95,8 +105,8 @@ static void LoadLinkPartnerObjectEventSpritePalette(u8, u8, u8); static void Task_PetalburgGymSlideOpenRoomDoors(u8); static void PetalburgGymSetDoorMetatiles(u8, u16); static void Task_PCTurnOnEffect(u8); -static void PCTurnOnEffect_0(struct Task *); -static void PCTurnOnEffect_1(s16, s8, s8); +static void PCTurnOnEffect(struct Task *); +static void PCTurnOnEffect_SetMetatile(s16, s8, s8); static void PCTurnOffEffect(void); static void Task_LotteryCornerComputerEffect(u8); static void LotteryCornerComputerEffect(struct Task *); @@ -969,34 +979,44 @@ static bool8 IsPlayerInFrontOfPC(void) || tileInFront == METATILE_Building_PC_Off); } +// Task data for Task_PCTurnOnEffect and Task_LotteryCornerComputerEffect +#define tPaused data[0] // Never set +#define tTaskId data[1] +#define tFlickerCount data[2] +#define tTimer data[3] +#define tIsScreenOn data[4] + +// For this special, gSpecialVar_0x8004 is expected to be some PC_LOCATION_* value. void DoPCTurnOnEffect(void) { if (FuncIsActiveTask(Task_PCTurnOnEffect) != TRUE && IsPlayerInFrontOfPC() == TRUE) { u8 taskId = CreateTask(Task_PCTurnOnEffect, 8); - gTasks[taskId].data[0] = 0; - gTasks[taskId].data[1] = taskId; - gTasks[taskId].data[2] = 0; - gTasks[taskId].data[3] = 0; - gTasks[taskId].data[4] = 0; + gTasks[taskId].tPaused = FALSE; + gTasks[taskId].tTaskId = taskId; + gTasks[taskId].tFlickerCount = 0; + gTasks[taskId].tTimer = 0; + gTasks[taskId].tIsScreenOn = FALSE; } } static void Task_PCTurnOnEffect(u8 taskId) { struct Task *task = &gTasks[taskId]; - if (task->data[0] == 0) - PCTurnOnEffect_0(task); + if (!task->tPaused) + PCTurnOnEffect(task); } -static void PCTurnOnEffect_0(struct Task *task) +static void PCTurnOnEffect(struct Task *task) { u8 playerDirection; s8 dx = 0; s8 dy = 0; - if (task->data[3] == 6) + if (task->tTimer == 6) { - task->data[3] = 0; + task->tTimer = 0; + + // Get where the PC should be, depending on where the player is looking. playerDirection = GetPlayerFacingDirection(); switch (playerDirection) { @@ -1013,39 +1033,47 @@ static void PCTurnOnEffect_0(struct Task *task) dy = -1; break; } - PCTurnOnEffect_1(task->data[4], dx, dy); + + // Update map + PCTurnOnEffect_SetMetatile(task->tIsScreenOn, dx, dy); DrawWholeMapView(); - task->data[4] ^= 1; - if ((++task->data[2]) == 5) - DestroyTask(task->data[1]); + + // Screen flickers 5 times. Odd number and starting with the + // screen off means the animation ends with the screen on. + task->tIsScreenOn ^= 1; + if (++task->tFlickerCount == 5) + DestroyTask(task->tTaskId); } - task->data[3]++; + task->tTimer++; } -static void PCTurnOnEffect_1(s16 isPcTurnedOn, s8 dx, s8 dy) +static void PCTurnOnEffect_SetMetatile(s16 isScreenOn, s8 dx, s8 dy) { - u16 tileId = 0; - if (isPcTurnedOn) + u16 metatileId = 0; + if (isScreenOn) { + // Screen is on, set it off if (gSpecialVar_0x8004 == PC_LOCATION_OTHER) - tileId = METATILE_Building_PC_Off; + metatileId = METATILE_Building_PC_Off; else if (gSpecialVar_0x8004 == PC_LOCATION_BRENDANS_HOUSE) - tileId = METATILE_BrendansMaysHouse_BrendanPC_Off; + metatileId = METATILE_BrendansMaysHouse_BrendanPC_Off; else if (gSpecialVar_0x8004 == PC_LOCATION_MAYS_HOUSE) - tileId = METATILE_BrendansMaysHouse_MayPC_Off; + metatileId = METATILE_BrendansMaysHouse_MayPC_Off; } else { + // Screen is off, set it on if (gSpecialVar_0x8004 == PC_LOCATION_OTHER) - tileId = METATILE_Building_PC_On; + metatileId = METATILE_Building_PC_On; else if (gSpecialVar_0x8004 == PC_LOCATION_BRENDANS_HOUSE) - tileId = METATILE_BrendansMaysHouse_BrendanPC_On; + metatileId = METATILE_BrendansMaysHouse_BrendanPC_On; else if (gSpecialVar_0x8004 == PC_LOCATION_MAYS_HOUSE) - tileId = METATILE_BrendansMaysHouse_MayPC_On; + metatileId = METATILE_BrendansMaysHouse_MayPC_On; } - MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, tileId | MAPGRID_COLLISION_MASK); + MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, metatileId | MAPGRID_COLLISION_MASK); } +// For this special, gSpecialVar_0x8004 is expected to be some PC_LOCATION_* value. void DoPCTurnOffEffect(void) { PCTurnOffEffect(); @@ -1055,7 +1083,9 @@ static void PCTurnOffEffect(void) { s8 dx = 0; s8 dy = 0; - u16 tileId = 0; + u16 metatileId = 0; + + // Get where the PC should be, depending on where the player is looking. u8 playerDirection = GetPlayerFacingDirection(); if (IsPlayerInFrontOfPC() == FALSE) @@ -1075,13 +1105,15 @@ static void PCTurnOffEffect(void) dy = -1; break; } + if (gSpecialVar_0x8004 == PC_LOCATION_OTHER) - tileId = METATILE_Building_PC_Off; + metatileId = METATILE_Building_PC_Off; else if (gSpecialVar_0x8004 == PC_LOCATION_BRENDANS_HOUSE) - tileId = METATILE_BrendansMaysHouse_BrendanPC_Off; + metatileId = METATILE_BrendansMaysHouse_BrendanPC_Off; else if (gSpecialVar_0x8004 == PC_LOCATION_MAYS_HOUSE) - tileId = METATILE_BrendansMaysHouse_MayPC_Off; - MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, tileId | MAPGRID_COLLISION_MASK); + metatileId = METATILE_BrendansMaysHouse_MayPC_Off; + + MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, metatileId | MAPGRID_COLLISION_MASK); DrawWholeMapView(); } @@ -1090,42 +1122,47 @@ void DoLotteryCornerComputerEffect(void) if (FuncIsActiveTask(Task_LotteryCornerComputerEffect) != TRUE) { u8 taskId = CreateTask(Task_LotteryCornerComputerEffect, 8); - gTasks[taskId].data[0] = 0; - gTasks[taskId].data[1] = taskId; - gTasks[taskId].data[2] = 0; - gTasks[taskId].data[3] = 0; - gTasks[taskId].data[4] = 0; + gTasks[taskId].tPaused = FALSE; + gTasks[taskId].tTaskId = taskId; + gTasks[taskId].tFlickerCount = 0; + gTasks[taskId].tTimer = 0; + gTasks[taskId].tIsScreenOn = FALSE; } } static void Task_LotteryCornerComputerEffect(u8 taskId) { struct Task *task = &gTasks[taskId]; - if (task->data[0] == 0) + if (!task->tPaused) LotteryCornerComputerEffect(task); } static void LotteryCornerComputerEffect(struct Task *task) { - if (task->data[3] == 6) + if (task->tTimer == 6) { - task->data[3] = 0; - if (task->data[4] != 0) + task->tTimer = 0; + if (task->tIsScreenOn) { + // Screen is on, set it off MapGridSetMetatileIdAt(11 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Shop_Laptop1_Normal | MAPGRID_COLLISION_MASK); MapGridSetMetatileIdAt(11 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Shop_Laptop2_Normal | MAPGRID_COLLISION_MASK); } else { + // Screen is off, set it on MapGridSetMetatileIdAt(11 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Shop_Laptop1_Flash | MAPGRID_COLLISION_MASK); MapGridSetMetatileIdAt(11 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Shop_Laptop2_Flash | MAPGRID_COLLISION_MASK); } DrawWholeMapView(); - task->data[4] ^= 1; - if ((++task->data[2]) == 5) - DestroyTask(task->data[1]); + + // Screen flickers 5 times. Odd number and starting with the + // screen off means the animation ends with the screen on. + task->tIsScreenOn ^= 1; + if (++task->tFlickerCount == 5) + DestroyTask(task->tTaskId); } - task->data[3]++; + task->tTimer++; } void EndLotteryCornerComputerEffect(void) @@ -1135,6 +1172,12 @@ void EndLotteryCornerComputerEffect(void) DrawWholeMapView(); } +#undef tPaused +#undef tTaskId +#undef tFlickerCount +#undef tTimer +#undef tIsScreenOn + void SetTrickHouseNuggetFlag(void) { u16 *specVar = &gSpecialVar_0x8004; @@ -1219,7 +1262,7 @@ void SpawnCameraObject(void) OBJ_EVENT_ID_CAMERA, gSaveBlock1Ptr->pos.x + MAP_OFFSET, gSaveBlock1Ptr->pos.y + MAP_OFFSET, - 3); + 3); // elevation gObjectEvents[obj].invisible = TRUE; CameraObjectSetFollowedSpriteId(gObjectEvents[obj].spriteId); } @@ -1384,7 +1427,7 @@ void SetShoalItemFlag(u16 unused) FlagSet(FLAG_SYS_SHOAL_ITEM); } -void PutZigzagoonInPlayerParty(void) +void LoadWallyZigzagoon(void) { u16 monData; CreateMon(&gPlayerParty[0], SPECIES_ZIGZAGOON, 7, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0); @@ -1405,7 +1448,7 @@ bool8 IsStarterInParty(void) u8 partyCount = CalculatePlayerPartyCount(); for (i = 0; i < partyCount; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == starter) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) == starter) return TRUE; } return FALSE; @@ -1424,20 +1467,21 @@ bool8 IsPokerusInParty(void) return TRUE; } -#define horizontalPan data[0] -#define delayCounter data[1] -#define numShakes data[2] -#define delay data[3] -#define verticalPan data[4] +// Task data for Task_ShakeCamera +#define tHorizontalPan data[0] +#define tDelayCounter data[1] +#define tNumShakes data[2] +#define tDelay data[3] +#define tVerticalPan data[4] void ShakeCamera(void) { u8 taskId = CreateTask(Task_ShakeCamera, 9); - gTasks[taskId].horizontalPan = gSpecialVar_0x8005; - gTasks[taskId].delayCounter = 0; - gTasks[taskId].numShakes = gSpecialVar_0x8006; - gTasks[taskId].delay = gSpecialVar_0x8007; - gTasks[taskId].verticalPan = gSpecialVar_0x8004; + gTasks[taskId].tHorizontalPan = gSpecialVar_0x8005; + gTasks[taskId].tDelayCounter = 0; + gTasks[taskId].tNumShakes = gSpecialVar_0x8006; + gTasks[taskId].tDelay = gSpecialVar_0x8007; + gTasks[taskId].tVerticalPan = gSpecialVar_0x8004; SetCameraPanningCallback(NULL); PlaySE(SE_M_STRENGTH); } @@ -1446,15 +1490,15 @@ static void Task_ShakeCamera(u8 taskId) { s16 *data = gTasks[taskId].data; - delayCounter++; - if (delayCounter % delay == 0) + tDelayCounter++; + if (tDelayCounter % tDelay == 0) { - delayCounter = 0; - numShakes--; - horizontalPan = -horizontalPan; - verticalPan = -verticalPan; - SetCameraPanning(horizontalPan, verticalPan); - if (numShakes == 0) + tDelayCounter = 0; + tNumShakes--; + tHorizontalPan = -tHorizontalPan; + tVerticalPan = -tVerticalPan; + SetCameraPanning(tHorizontalPan, tVerticalPan); + if (tNumShakes == 0) { StopCameraShake(taskId); InstallCameraPanAheadCallback(); @@ -1468,11 +1512,11 @@ static void StopCameraShake(u8 taskId) ScriptContext_Enable(); } -#undef horizontalPan -#undef delayCounter -#undef numShakes -#undef delay -#undef verticalPan +#undef tHorizontalPan +#undef tDelayCounter +#undef tNumShakes +#undef tDelay +#undef tVerticalPan bool8 FoundBlackGlasses(void) { @@ -1497,7 +1541,8 @@ u8 GetLeadMonIndex(void) u8 partyCount = CalculatePlayerPartyCount(); for (i = 0; i < partyCount; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != 0) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_EGG + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_NONE) return i; } return 0; @@ -1505,7 +1550,7 @@ u8 GetLeadMonIndex(void) u16 ScriptGetPartyMonSpecies(void) { - return GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES2, NULL); + return GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES_OR_EGG, NULL); } // Removed for Emerald @@ -1637,7 +1682,7 @@ void OffsetCameraForBattle(void) SetCameraPanning(8, 0); } -const struct WindowTemplate gElevatorFloor_WindowTemplate = +static const struct WindowTemplate sWindowTemplate_ElevatorFloor = { .bg = 0, .tilemapLeft = 21, @@ -1648,7 +1693,7 @@ const struct WindowTemplate gElevatorFloor_WindowTemplate = .baseBlock = 8, }; -const u8 *const gDeptStoreFloorNames[] = +static const u8 *const sDeptStoreFloorNames[] = { [DEPT_STORE_FLOORNUM_B4F] = gText_B4F, [DEPT_STORE_FLOORNUM_B3F] = gText_B3F, @@ -1668,7 +1713,7 @@ const u8 *const gDeptStoreFloorNames[] = [DEPT_STORE_FLOORNUM_ROOFTOP] = gText_Rooftop }; -static const u16 sElevatorWindowTiles_Ascending[][3] = +static const u16 sElevatorWindowTiles_Ascending[ELEVATOR_WINDOW_HEIGHT][ELEVATOR_LIGHT_STAGES] = { { METATILE_BattleFrontier_Elevator_Top0, @@ -1687,7 +1732,7 @@ static const u16 sElevatorWindowTiles_Ascending[][3] = }, }; -static const u16 sElevatorWindowTiles_Descending[][3] = +static const u16 sElevatorWindowTiles_Descending[ELEVATOR_WINDOW_HEIGHT][ELEVATOR_LIGHT_STAGES] = { { METATILE_BattleFrontier_Elevator_Top0, @@ -1771,53 +1816,66 @@ u16 GetDeptStoreDefaultFloorChoice(void) return sLilycoveDeptStore_DefaultFloorChoice; } +// Task data for Task_MoveElevator +#define tTimer data[1] +#define tMoveCounter data[2] +#define tVerticalPan data[4] +#define tTotalMoves data[5] +#define tDescending data[6] + +// The maximum considered difference between floors. +// Elevator trips with a larger difference are treated the same +// (i.e. traveling 9 floors and 200 floors would take the same amount of time). +#define MAX_ELEVATOR_TRIP 9 + +// gSpecialVar_0x8005 here is expected to be the current floor number, and +// gSpecialVar_0x8006 is expected to be the destination floor number. void MoveElevator(void) { - static const u8 sElevatorTripLength[] = { 8, 16, 24, 32, 38, 46, 52, 56, 57 }; + static const u8 sElevatorTripLength[MAX_ELEVATOR_TRIP] = { 8, 16, 24, 32, 38, 46, 52, 56, 57 }; s16 *data = gTasks[CreateTask(Task_MoveElevator, 9)].data; u16 floorDelta; - data[1] = 0; - data[2] = 0; - data[4] = 1; + tTimer = 0; + tMoveCounter = 0; + tVerticalPan = 1; - // descending if (gSpecialVar_0x8005 > gSpecialVar_0x8006) { floorDelta = gSpecialVar_0x8005 - gSpecialVar_0x8006; - data[6] = TRUE; + tDescending = TRUE; } else { floorDelta = gSpecialVar_0x8006 - gSpecialVar_0x8005; - data[6] = FALSE; + tDescending = FALSE; } - if (floorDelta > 8) - floorDelta = 8; + if (floorDelta > MAX_ELEVATOR_TRIP - 1) + floorDelta = MAX_ELEVATOR_TRIP - 1; - data[5] = sElevatorTripLength[floorDelta]; + tTotalMoves = sElevatorTripLength[floorDelta]; SetCameraPanningCallback(NULL); - MoveElevatorWindowLights(floorDelta, data[6]); + MoveElevatorWindowLights(floorDelta, tDescending); PlaySE(SE_ELEVATOR); } static void Task_MoveElevator(u8 taskId) { s16 *data = gTasks[taskId].data; - data[1]++; - if (data[1] % 3 == 0) + tTimer++; + if (tTimer % 3 == 0) { - data[1] = 0; - data[2]++; - data[4] = -data[4]; - SetCameraPanning(0, data[4]); + tTimer = 0; + tMoveCounter++; + tVerticalPan = -tVerticalPan; + SetCameraPanning(0, tVerticalPan); - // arrived at floor - if (data[2] == data[5]) + if (tMoveCounter == tTotalMoves) { + // Arrived at floor PlaySE(SE_DING_DONG); DestroyTask(taskId); ScriptContext_Enable(); @@ -1826,18 +1884,24 @@ static void Task_MoveElevator(u8 taskId) } } +#undef tTimer +#undef tMoveCounter +#undef tVerticalPan +#undef tTotalMoves +#undef tDescending + void ShowDeptStoreElevatorFloorSelect(void) { int xPos; - sTutorMoveAndElevatorWindowId = AddWindow(&gElevatorFloor_WindowTemplate); + sTutorMoveAndElevatorWindowId = AddWindow(&sWindowTemplate_ElevatorFloor); SetStandardWindowBorderStyle(sTutorMoveAndElevatorWindowId, FALSE); xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gText_ElevatorNowOn, 64); AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gText_ElevatorNowOn, xPos, 1, TEXT_SKIP_DRAW, NULL); - xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gDeptStoreFloorNames[gSpecialVar_0x8005], 64); - AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gDeptStoreFloorNames[gSpecialVar_0x8005], xPos, 17, TEXT_SKIP_DRAW, NULL); + xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sDeptStoreFloorNames[gSpecialVar_0x8005], 64); + AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, sDeptStoreFloorNames[gSpecialVar_0x8005], xPos, 17, TEXT_SKIP_DRAW, NULL); PutWindowTilemap(sTutorMoveAndElevatorWindowId); CopyWindowToVram(sTutorMoveAndElevatorWindowId, COPYWIN_FULL); @@ -1849,17 +1913,23 @@ void CloseDeptStoreElevatorWindow(void) RemoveWindow(sTutorMoveAndElevatorWindowId); } +// Task data for Task_MoveElevatorWindowLights +#define tMoveCounter data[0] +#define tTimer data[1] +#define tDescending data[2] +#define tTotalMoves data[3] + static void MoveElevatorWindowLights(u16 floorDelta, bool8 descending) { - static const u8 sElevatorLightCycles[] = { 3, 6, 9, 12, 15, 18, 21, 24, 27 }; + static const u8 sElevatorLightCycles[MAX_ELEVATOR_TRIP] = { 3, 6, 9, 12, 15, 18, 21, 24, 27 }; if (FuncIsActiveTask(Task_MoveElevatorWindowLights) != TRUE) { u8 taskId = CreateTask(Task_MoveElevatorWindowLights, 8); - gTasks[taskId].data[0] = 0; - gTasks[taskId].data[1] = 0; - gTasks[taskId].data[2] = descending; - gTasks[taskId].data[3] = sElevatorLightCycles[floorDelta]; + gTasks[taskId].tMoveCounter = 0; + gTasks[taskId].tTimer = 0; + gTasks[taskId].tDescending = descending; + gTasks[taskId].tTotalMoves = sElevatorLightCycles[floorDelta]; } } @@ -1868,36 +1938,41 @@ static void Task_MoveElevatorWindowLights(u8 taskId) u8 x, y; s16 *data = gTasks[taskId].data; - if (data[1] == 6) + if (tTimer == 6) { - data[0]++; + tMoveCounter++; - // ascending - if (data[2] == FALSE) + if (!tDescending) { - for (y = 0; y < 3; y++) + // Ascending + for (y = 0; y < ELEVATOR_WINDOW_HEIGHT; y++) { - for (x = 0; x < 3; x++) - MapGridSetMetatileIdAt(x + MAP_OFFSET + 1, y + MAP_OFFSET, sElevatorWindowTiles_Ascending[y][data[0] % 3] | MAPGRID_COLLISION_MASK); + for (x = 0; x < ELEVATOR_WINDOW_WIDTH; x++) + MapGridSetMetatileIdAt(x + MAP_OFFSET + 1, y + MAP_OFFSET, sElevatorWindowTiles_Ascending[y][tMoveCounter % ELEVATOR_LIGHT_STAGES] | MAPGRID_COLLISION_MASK); } } - // descending else { - for (y = 0; y < 3; y++) + // Descending + for (y = 0; y < ELEVATOR_WINDOW_HEIGHT; y++) { - for (x = 0; x < 3; x++) - MapGridSetMetatileIdAt(x + MAP_OFFSET + 1, y + MAP_OFFSET, sElevatorWindowTiles_Descending[y][data[0] % 3] | MAPGRID_COLLISION_MASK); + for (x = 0; x < ELEVATOR_WINDOW_WIDTH; x++) + MapGridSetMetatileIdAt(x + MAP_OFFSET + 1, y + MAP_OFFSET, sElevatorWindowTiles_Descending[y][tMoveCounter % ELEVATOR_LIGHT_STAGES] | MAPGRID_COLLISION_MASK); } } DrawWholeMapView(); - data[1] = 0; - if (data[0] == data[3]) + tTimer = 0; + if (tMoveCounter == tTotalMoves) DestroyTask(taskId); } - data[1]++; + tTimer++; } +#undef tMoveCounter +#undef tTimer +#undef tDescending +#undef tTotalMoves + void BufferVarsForIVRater(void) { u8 i; @@ -1959,13 +2034,13 @@ bool8 UsedPokemonCenterWarp(void) MAP_EVER_GRANDE_CITY_POKEMON_LEAGUE_1F, MAP_BATTLE_FRONTIER_POKEMON_CENTER_1F, MAP_UNION_ROOM, - 0xFFFF + MAP_UNDEFINED }; int i; u16 map = (gLastUsedWarp.mapGroup << 8) + gLastUsedWarp.mapNum; - for (i = 0; sPokemonCenters[i] != 0xFFFF; i++) + for (i = 0; sPokemonCenters[i] != MAP_UNDEFINED; i++) { if (sPokemonCenters[i] == map) return TRUE; @@ -2663,21 +2738,21 @@ static void ScrollableMultichoice_UpdateScrollArrows(u8 taskId) .secondY = 0, .fullyUpThreshold = 0, .fullyDownThreshold = 0, - .tileTag = 2000, - .palTag = 100, + .tileTag = GFXTAG_MULTICHOICE_SCROLL_ARROWS, + .palTag = PALTAG_MULTICHOICE_SCROLL_ARROWS, .palNum = 0 }; struct Task *task = &gTasks[taskId]; struct ScrollArrowsTemplate template = sScrollableMultichoice_ScrollArrowsTemplate; - if (task->tMaxItemsOnScreen != task->data[1]) + if (task->tMaxItemsOnScreen != task->tNumItems) { template.firstX = (task->tWidth / 2) * 8 + 12 + (task->tLeft - 1) * 8; template.firstY = 8; template.secondX = (task->tWidth / 2) * 8 + 12 + (task->tLeft - 1) * 8; template.secondY = task->tHeight * 8 + 10; template.fullyUpThreshold = 0; - template.fullyDownThreshold = task->data[1] - task->tMaxItemsOnScreen; + template.fullyDownThreshold = task->tNumItems - task->tMaxItemsOnScreen; task->tScrollArrowId = AddScrollIndicatorArrowPair(&template, &sScrollableMultichoice_ScrollOffset); } } @@ -2685,10 +2760,8 @@ static void ScrollableMultichoice_UpdateScrollArrows(u8 taskId) static void ScrollableMultichoice_RemoveScrollArrows(u8 taskId) { struct Task *task = &gTasks[taskId]; - if (task->tMaxItemsOnScreen != task->data[1]) - { + if (task->tMaxItemsOnScreen != task->tNumItems) RemoveScrollIndicatorArrowPair(task->tScrollArrowId); - } } // Removed for Emerald (replaced by ShowScrollableMultichoice) @@ -2912,8 +2985,6 @@ void CloseFrontierExchangeCornerItemIconWindow(void) RemoveWindow(sFrontierExchangeCorner_ItemIconWindowId); } -#define TAG_ITEM_ICON 5500 - static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection) { #include "data/battle_frontier/battle_frontier_exchange_corner.h" @@ -3125,12 +3196,14 @@ void ScrollableMultichoice_ClosePersistentMenu(void) #undef tListTaskId #undef tTaskId +#define DEOXYS_ROCK_LEVELS 11 + void DoDeoxysRockInteraction(void) { CreateTask(Task_DeoxysRockInteraction, 8); } -static const u16 sDeoxysRockPalettes[][16] = { +static const u16 sDeoxysRockPalettes[DEOXYS_ROCK_LEVELS][16] = { INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_1.gbapal"), INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_2.gbapal"), INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_3.gbapal"), @@ -3144,7 +3217,7 @@ static const u16 sDeoxysRockPalettes[][16] = { INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_11.gbapal"), }; -static const u8 sDeoxysRockCoords[][2] = { +static const u8 sDeoxysRockCoords[DEOXYS_ROCK_LEVELS][2] = { { 15, 12 }, { 11, 14 }, { 15, 8 }, @@ -3160,11 +3233,11 @@ static const u8 sDeoxysRockCoords[][2] = { static void Task_DeoxysRockInteraction(u8 taskId) { - static const u8 sStoneMaxStepCounts[] = { 4, 8, 8, 8, 4, 4, 4, 6, 3, 3 }; + static const u8 sStoneMaxStepCounts[DEOXYS_ROCK_LEVELS - 1] = { 4, 8, 8, 8, 4, 4, 4, 6, 3, 3 }; if (FlagGet(FLAG_DEOXYS_ROCK_COMPLETE) == TRUE) { - gSpecialVar_Result = 3; + gSpecialVar_Result = DEOXYS_ROCK_COMPLETE; ScriptContext_Enable(); DestroyTask(taskId); } @@ -3179,13 +3252,13 @@ static void Task_DeoxysRockInteraction(u8 taskId) // Player failed to take the shortest path to the stone, so it resets. ChangeDeoxysRockLevel(0); VarSet(VAR_DEOXYS_ROCK_LEVEL, 0); - gSpecialVar_Result = 0; + gSpecialVar_Result = DEOXYS_ROCK_FAILED; DestroyTask(taskId); } - else if (rockLevel == 10) + else if (rockLevel == DEOXYS_ROCK_LEVELS - 1) { FlagSet(FLAG_DEOXYS_ROCK_COMPLETE); - gSpecialVar_Result = 2; + gSpecialVar_Result = DEOXYS_ROCK_SOLVED; ScriptContext_Enable(); DestroyTask(taskId); } @@ -3194,7 +3267,7 @@ static void Task_DeoxysRockInteraction(u8 taskId) rockLevel++; ChangeDeoxysRockLevel(rockLevel); VarSet(VAR_DEOXYS_ROCK_LEVEL, rockLevel); - gSpecialVar_Result = 1; + gSpecialVar_Result = DEOXYS_ROCK_PROGRESSED; DestroyTask(taskId); } } @@ -3207,9 +3280,9 @@ static void ChangeDeoxysRockLevel(u8 rockLevel) TryGetObjectEventIdByLocalIdAndMap(LOCALID_BIRTH_ISLAND_EXTERIOR_ROCK, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objectEventId); if (rockLevel == 0) - PlaySE(SE_M_CONFUSE_RAY); + PlaySE(SE_M_CONFUSE_RAY); // Failure sound else - PlaySE(SE_RG_DEOXYS_MOVE); + PlaySE(SE_RG_DEOXYS_MOVE); // Success sound CreateTask(WaitForDeoxysRockMovement, 8); gFieldEffectArguments[0] = LOCALID_BIRTH_ISLAND_EXTERIOR_ROCK; @@ -3218,6 +3291,8 @@ static void ChangeDeoxysRockLevel(u8 rockLevel) gFieldEffectArguments[3] = sDeoxysRockCoords[rockLevel][0]; gFieldEffectArguments[4] = sDeoxysRockCoords[rockLevel][1]; + // Set number of movement steps. + // Resetting for failure is slow, successful movement is fast. if (rockLevel == 0) gFieldEffectArguments[5] = 60; else @@ -3735,8 +3810,9 @@ static void Task_CloseBattlePikeCurtain(u8 taskId) void GetBattlePyramidHint(void) { - gSpecialVar_Result = gSpecialVar_0x8004 / 7; - gSpecialVar_Result -= (gSpecialVar_Result / 20) * 20; + // gSpecialVar_0x8004 here is expected to be the current Battle Pyramid win streak. + gSpecialVar_Result = gSpecialVar_0x8004 / FRONTIER_STAGES_PER_CHALLENGE; + gSpecialVar_Result -= (gSpecialVar_Result / TOTAL_PYRAMID_ROUNDS) * TOTAL_PYRAMID_ROUNDS; } // Used to avoid a potential softlock if the player respawns on Dewford with no way off @@ -3771,13 +3847,13 @@ bool8 InPokemonCenter(void) MAP_TRADE_CENTER, MAP_RECORD_CORNER, MAP_BATTLE_COLOSSEUM_4P, - 0xFFFF + MAP_UNDEFINED }; int i; u16 map = (gSaveBlock1Ptr->location.mapGroup << 8) + gSaveBlock1Ptr->location.mapNum; - for (i = 0; sPokemonCenters[i] != 0xFFFF; i++) + for (i = 0; sPokemonCenters[i] != MAP_UNDEFINED; i++) { if (sPokemonCenters[i] == map) return TRUE; diff --git a/src/fieldmap.c b/src/fieldmap.c index 89d6b602c2..df4db47b53 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -36,7 +36,7 @@ struct BackupMapLayout gBackupMapLayout; static const struct ConnectionFlags sDummyConnectionFlags = {0}; static void InitMapLayoutData(struct MapHeader *mapHeader); -static void InitBackupMapLayoutData(u16 *map, u16 width, u16 height); +static void InitBackupMapLayoutData(const u16 *map, u16 width, u16 height); static void FillSouthConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset); static void FillNorthConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset); static void FillWestConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset); @@ -44,14 +44,14 @@ static void FillEastConnection(struct MapHeader const *mapHeader, struct MapHead static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader); static void LoadSavedMapView(void); static bool8 SkipCopyingMetatileFromSavedMap(u16 *mapBlock, u16 mapWidth, u8 yMode); -static struct MapConnection *GetIncomingConnection(u8 direction, int x, int y); -static bool8 IsPosInIncomingConnectingMap(u8 direction, int x, int y, struct MapConnection *connection); +static const struct MapConnection *GetIncomingConnection(u8 direction, int x, int y); +static bool8 IsPosInIncomingConnectingMap(u8 direction, int x, int y, const struct MapConnection *connection); static bool8 IsCoordInIncomingConnectingMap(int coord, int srcMax, int destMax, int offset); #define GetBorderBlockAt(x, y)({ \ u16 block; \ int i; \ - u16 *border = gMapHeader.mapLayout->border; \ + const u16 *border = gMapHeader.mapLayout->border; /* Unused, they read it again below */ \ \ i = (x + 1) & 1; \ i += ((y + 1) & 1) * 2; \ @@ -63,7 +63,7 @@ static bool8 IsCoordInIncomingConnectingMap(int coord, int srcMax, int destMax, #define GetMapGridBlockAt(x, y) (AreCoordsWithinMapGridBounds(x, y) ? gBackupMapLayout.map[x + gBackupMapLayout.width * y] : GetBorderBlockAt(x, y)) -struct MapHeader const *const GetMapHeaderFromConnection(struct MapConnection *connection) +const struct MapHeader *const GetMapHeaderFromConnection(const struct MapConnection *connection) { return Overworld_GetMapHeaderByGroupAndId(connection->mapGroup, connection->mapNum); } @@ -116,7 +116,7 @@ static void InitMapLayoutData(struct MapHeader *mapHeader) } } -static void InitBackupMapLayoutData(u16 *map, u16 width, u16 height) +static void InitBackupMapLayoutData(const u16 *map, u16 width, u16 height) { u16 *dest; int y; @@ -133,7 +133,7 @@ static void InitBackupMapLayoutData(u16 *map, u16 width, u16 height) static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader) { int count; - struct MapConnection *connection; + const struct MapConnection *connection; int i; if (mapHeader->connections) @@ -171,7 +171,7 @@ static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader) static void FillConnection(int x, int y, struct MapHeader const *connectedMapHeader, int x2, int y2, int width, int height) { int i; - u16 *src; + const u16 *src; u16 *dest; int mapWidth; @@ -619,7 +619,7 @@ bool32 CanCameraMoveInDirection(int direction) return TRUE; } -static void SetPositionFromConnection(struct MapConnection *connection, int direction, int x, int y) +static void SetPositionFromConnection(const struct MapConnection *connection, int direction, int x, int y) { struct MapHeader const *mapHeader; mapHeader = GetMapHeaderFromConnection(connection); @@ -647,7 +647,7 @@ static void SetPositionFromConnection(struct MapConnection *connection, int dire bool8 CameraMove(int x, int y) { int direction; - struct MapConnection *connection; + const struct MapConnection *connection; int old_x, old_y; gCamera.active = FALSE; direction = GetPostCameraMoveMapBorderId(x, y); @@ -675,11 +675,11 @@ bool8 CameraMove(int x, int y) return gCamera.active; } -static struct MapConnection *GetIncomingConnection(u8 direction, int x, int y) +static const struct MapConnection *GetIncomingConnection(u8 direction, int x, int y) { int count; int i; - struct MapConnection *connection; + const struct MapConnection *connection; const struct MapConnections *connections = gMapHeader.connections; #ifdef UBFIX // UB: Multiple possible null dereferences @@ -696,7 +696,7 @@ static struct MapConnection *GetIncomingConnection(u8 direction, int x, int y) return NULL; } -static bool8 IsPosInIncomingConnectingMap(u8 direction, int x, int y, struct MapConnection *connection) +static bool8 IsPosInIncomingConnectingMap(u8 direction, int x, int y, const struct MapConnection *connection) { struct MapHeader const *mapHeader; mapHeader = GetMapHeaderFromConnection(connection); @@ -737,7 +737,7 @@ static int IsCoordInConnectingMap(int coord, int max) return FALSE; } -static int IsPosInConnectingMap(struct MapConnection *connection, int x, int y) +static int IsPosInConnectingMap(const struct MapConnection *connection, int x, int y) { struct MapHeader const *mapHeader; mapHeader = GetMapHeaderFromConnection(connection); @@ -753,10 +753,10 @@ static int IsPosInConnectingMap(struct MapConnection *connection, int x, int y) return FALSE; } -struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y) +const struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y) { int count; - struct MapConnection *connection; + const struct MapConnection *connection; int i; u8 direction; if (!gMapHeader.connections) diff --git a/src/frontier_pass.c b/src/frontier_pass.c index 61bd1d4091..07e06ad3b9 100644 --- a/src/frontier_pass.c +++ b/src/frontier_pass.c @@ -30,6 +30,17 @@ #include "constants/region_map_sections.h" #include "constants/songs.h" +// gFrontierPassBg_Pal has 8*16 colors, but they attempt to load 13*16 colors. +// As a result it goes out of bounds and interprets 160 bytes of whatever comes +// after gFrontierPassBg_Pal (by default, gFrontierPassBg_Gfx) as a palette. +// Nothing uses these colors (except the Trainer Card, which correctly writes them) +// so in practice this bug has no effect on the game. +#ifdef BUGFIX +#define NUM_BG_PAL_SLOTS 8 +#else +#define NUM_BG_PAL_SLOTS 13 +#endif + // All windows displayed in the frontier pass. enum { @@ -768,7 +779,7 @@ static bool32 InitFrontierPass(void) CopyBgTilemapBufferToVram(2); break; case 8: - LoadPalette(gFrontierPassBg_Pal[0], 0, 13 * PLTT_SIZE_4BPP); + LoadPalette(gFrontierPassBg_Pal, 0, NUM_BG_PAL_SLOTS * PLTT_SIZE_4BPP); LoadPalette(gFrontierPassBg_Pal[1 + sPassData->trainerStars], BG_PLTT_ID(1), PLTT_SIZE_4BPP); LoadPalette(GetTextWindowPalette(0), BG_PLTT_ID(15), PLTT_SIZE_4BPP); DrawFrontierPassBg(); @@ -1412,7 +1423,7 @@ static bool32 InitFrontierMap(void) case 5: if (FreeTempTileDataBuffersIfPossible()) return FALSE; - LoadPalette(gFrontierPassBg_Pal[0], BG_PLTT_ID(0), 13 * PLTT_SIZE_4BPP); + LoadPalette(gFrontierPassBg_Pal, BG_PLTT_ID(0), NUM_BG_PAL_SLOTS * PLTT_SIZE_4BPP); LoadPalette(GetTextWindowPalette(0), BG_PLTT_ID(15), PLTT_SIZE_4BPP); CopyToBgTilemapBuffer(2, sMapScreen_Tilemap, 0, 0); CopyBgTilemapBufferToVram(2); diff --git a/src/frontier_util.c b/src/frontier_util.c index 1863aa622e..85e016a26b 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -497,7 +497,7 @@ static const struct FrontierBrainMon sFrontierBrainsMons[][2][FRONTIER_PARTY_SIZ }, }; -static const u8 sBattlePointAwards[NUM_FRONTIER_FACILITIES][FRONTIER_MODE_COUNT][30] = +static const u8 sBattlePointAwards[NUM_FRONTIER_FACILITIES][FRONTIER_MODE_COUNT][30] = { /* facility, mode, tier */ [FRONTIER_FACILITY_TOWER] = /* Tier: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 */ @@ -1990,7 +1990,7 @@ static void CheckPartyIneligibility(void) numEligibleMons = 0; do { - u16 species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES2); + u16 species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES_OR_EGG); u16 heldItem = GetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM); u8 level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); u16 hp = GetMonData(&gPlayerParty[monId], MON_DATA_HP); diff --git a/src/graphics.c b/src/graphics.c index f1ffeb56c7..e7a0cbe642 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -340,7 +340,7 @@ const u32 gBattleAnimSpriteGfx_BlackSmoke[] = INCBIN_U32("graphics/battle_anims/ const u32 gBattleAnimSpritePal_BlackSmoke[] = INCBIN_U32("graphics/battle_anims/sprites/black_smoke.gbapal.lz"); const u32 gBattleAnimSpriteGfx_BlackBall[] = INCBIN_U32("graphics/battle_anims/sprites/black_ball.4bpp.lz"); -const u32 gBattleAnimSpritePal_BlackBall[] = INCBIN_U32("graphics/battle_anims/sprites/black_ball.bin"); +const u32 gBattleAnimSpritePal_BlackBall[] = INCBIN_U32("graphics/battle_anims/sprites/black_ball.gbapal.lz"); const u32 gBattleAnimSpritePal_Glass[] = INCBIN_U32("graphics/battle_anims/sprites/glass.gbapal.lz"); const u32 gBattleAnimSpriteGfx_Glass[] = INCBIN_U32("graphics/battle_anims/sprites/glass.4bpp.lz"); @@ -576,7 +576,7 @@ const u16 gBattleAnimUnused_Unknown2[] = INCBIN_U16("graphics/battle_anims/unuse const u16 gBattleAnimUnused_Unknown3[] = INCBIN_U16("graphics/battle_anims/unused/unknown_3.bin"); const u32 gBattleAnimUnusedGfx_LineSketch2[] = INCBIN_U32("graphics/battle_anims/unused/line_sketch_2.8bpp.lz"); -const u16 gBattleAnimUnusedPal_LineSketch2[] = INCBIN_U16("graphics/battle_anims/unused/line_sketch_2_pal.bin"); +const u16 gBattleAnimUnusedPal_LineSketch2[] = INCBIN_U16("graphics/battle_anims/unused/line_sketch_2.gbapal.lz"); const u32 gBattleAnimUnusedTilemap_LineSketch2[] = INCBIN_U32("graphics/battle_anims/unused/line_sketch_2.bin.lz"); const u32 gBattleAnimSpriteGfx_BlueLines[] = INCBIN_U32("graphics/battle_anims/sprites/blue_lines.4bpp.lz"); @@ -1917,10 +1917,10 @@ const u32 gNamingScreenKeyboardSymbols_Tilemap[] = INCBIN_U32("graphics/naming_s const u16 gUnionRoomChat_Background_Pal[] = INCBIN_U16("graphics/union_room_chat/background.gbapal"); const u32 gUnionRoomChat_Background_Gfx[] = INCBIN_U32("graphics/union_room_chat/background.4bpp.lz"); const u32 gUnionRoomChat_Background_Tilemap[] = INCBIN_U32("graphics/union_room_chat/background.bin.lz"); -const u16 gUnionRoomChat_Window_Pal1[] = INCBIN_U16("graphics/union_room_chat/window_1.gbapal"); -const u16 gUnionRoomChat_Window_Pal2[] = INCBIN_U16("graphics/union_room_chat/window_2.gbapal"); -const u32 gUnionRoomChat_Border_Gfx[] = INCBIN_U32("graphics/union_room_chat/border.4bpp.lz"); -const u32 gUnionRoomChat_Border_Tilemap[] = INCBIN_U32("graphics/union_room_chat/border.bin.lz"); +const u16 gUnionRoomChat_InputText_Pal[] = INCBIN_U16("graphics/union_room_chat/input_text.gbapal"); +const u16 gUnionRoomChat_Keyboard_Pal[] = INCBIN_U16("graphics/union_room_chat/keyboard.gbapal"); +const u32 gUnionRoomChat_Keyboard_Gfx[] = INCBIN_U32("graphics/union_room_chat/keyboard.4bpp.lz"); +const u32 gUnionRoomChat_Keyboard_Tilemap[] = INCBIN_U32("graphics/union_room_chat/keyboard.bin.lz"); const u32 gUnionRoomChat_RButtonLabels[] = INCBIN_U32("graphics/union_room_chat/r_button_labels.4bpp.lz"); const u16 gTilesetPalettes_General[][16] = @@ -2013,7 +2013,6 @@ const u16 gTitleScreenPressStartPal[] = INCBIN_U16("graphics/title_screen/p const u32 gTitleScreenPressStartGfx[] = INCBIN_U32("graphics/title_screen/press_start.4bpp.lz"); const u32 gTitleScreenPokemonLogoTilemap[] = INCBIN_U32("graphics/title_screen/pokemon_logo.bin.lz"); -// size in LoadPalette calls is reported as 0xD0 << 1, which is 0x1A0, but palette is only 0x100 bytes long so it loads garbage as well const u16 gFrontierPassBg_Pal[][16] = INCBIN_U16("graphics/frontier_pass/bg.gbapal"); const u32 gFrontierPassBg_Gfx[] = INCBIN_U32("graphics/frontier_pass/bg.4bpp.lz"); const u32 gFrontierPassMapAndCard_Gfx[] = INCBIN_U32("graphics/frontier_pass/map_and_card.8bpp.lz"); diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 2be4132f5b..402db27a15 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -445,7 +445,7 @@ static void Task_Hof_InitMonData(u8 taskId) u8 nick[POKEMON_NAME_LENGTH + 2]; if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES)) { - sHofMonPtr->mon[i].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + sHofMonPtr->mon[i].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); sHofMonPtr->mon[i].tid = GetMonData(&gPlayerParty[i], MON_DATA_OT_ID); sHofMonPtr->mon[i].personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY); sHofMonPtr->mon[i].lvl = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL); diff --git a/src/item.c b/src/item.c index 18b6242c43..b2b19480a3 100644 --- a/src/item.c +++ b/src/item.c @@ -7,26 +7,25 @@ #include "malloc.h" #include "secret_base.h" #include "item_menu.h" +#include "party_menu.h" #include "strings.h" #include "load_save.h" #include "item_use.h" #include "battle_pyramid.h" #include "battle_pyramid_bag.h" +#include "constants/battle.h" #include "constants/items.h" +#include "constants/item_effects.h" #include "constants/hold_effects.h" -// this file's functions static bool8 CheckPyramidBagHasItem(u16 itemId, u16 count); static bool8 CheckPyramidBagHasSpace(u16 itemId, u16 count); -// EWRAM variables EWRAM_DATA struct BagPocket gBagPockets[POCKETS_COUNT] = {0}; -// rodata #include "data/text/item_descriptions.h" #include "data/items.h" -// code static u16 GetBagItemQuantity(u16 *quantity) { return gSaveBlock2Ptr->encryptionKey ^ *quantity; @@ -926,14 +925,36 @@ ItemUseFunc ItemId_GetFieldFunc(u16 itemId) return gItems[SanitizeItemId(itemId)].fieldUseFunc; } +// Returns an item's battle effect script ID. u8 ItemId_GetBattleUsage(u16 itemId) { - return gItems[SanitizeItemId(itemId)].battleUsage; -} - -ItemUseFunc ItemId_GetBattleFunc(u16 itemId) -{ - return gItems[SanitizeItemId(itemId)].battleUseFunc; + u16 item = SanitizeItemId(itemId); + // Handle E-Reader berries. + if (item == ITEM_ENIGMA_BERRY_E_READER) + { + switch (GetItemEffectType(gSpecialVar_ItemId)) + { + case ITEM_EFFECT_X_ITEM: + return EFFECT_ITEM_INCREASE_STAT; + case ITEM_EFFECT_HEAL_HP: + return EFFECT_ITEM_RESTORE_HP; + case ITEM_EFFECT_CURE_POISON: + case ITEM_EFFECT_CURE_SLEEP: + case ITEM_EFFECT_CURE_BURN: + case ITEM_EFFECT_CURE_FREEZE: + case ITEM_EFFECT_CURE_PARALYSIS: + case ITEM_EFFECT_CURE_ALL_STATUS: + case ITEM_EFFECT_CURE_CONFUSION: + case ITEM_EFFECT_CURE_INFATUATION: + return EFFECT_ITEM_CURE_STATUS; + case ITEM_EFFECT_HEAL_PP: + return EFFECT_ITEM_RESTORE_PP; + default: + return 0; + } + } + else + return gItems[item].battleUsage; } u8 ItemId_GetSecondaryId(u16 itemId) @@ -945,3 +966,38 @@ u8 ItemId_GetFlingPower(u16 itemId) { return gItems[SanitizeItemId(itemId)].flingPower; } + + +u32 GetItemStatus1Mask(u16 itemId) +{ + const u8 *effect = GetItemEffect(itemId); + switch (effect[3]) + { + case ITEM3_PARALYSIS: + return STATUS1_PARALYSIS; + case ITEM3_FREEZE: + return STATUS1_FREEZE; + case ITEM3_BURN: + return STATUS1_BURN; + case ITEM3_POISON: + return STATUS1_POISON | STATUS1_TOXIC_POISON; + case ITEM3_SLEEP: + return STATUS1_SLEEP; + case ITEM3_STATUS_ALL: + return STATUS1_ANY; + } + return 0; +} + +u32 GetItemStatus2Mask(u16 itemId) +{ + const u8 *effect = GetItemEffect(itemId); + if (effect[3] & ITEM3_STATUS_ALL) + return STATUS2_INFATUATION | STATUS2_CONFUSION; + else if (effect[0] & ITEM0_INFATUATION) + return STATUS2_INFATUATION; + else if (effect[3] & ITEM3_CONFUSION) + return STATUS2_CONFUSION; + else + return 0; +} diff --git a/src/item_menu.c b/src/item_menu.c index 4c66b09239..2a382b0645 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -1985,11 +1985,18 @@ static void ItemMenu_Cancel(u8 taskId) static void ItemMenu_UseInBattle(u8 taskId) { - if (ItemId_GetBattleFunc(gSpecialVar_ItemId)) - { - RemoveContextWindow(); - ItemId_GetBattleFunc(gSpecialVar_ItemId)(taskId); - } + // Safety check + u16 type = ItemId_GetType(gSpecialVar_ItemId); + if (!ItemId_GetBattleUsage(gSpecialVar_ItemId)) + return; + + RemoveContextWindow(); + if (type == ITEM_USE_BAG_MENU) + ItemUseInBattle_BagMenu(taskId); + else if (type == ITEM_USE_PARTY_MENU) + ItemUseInBattle_PartyMenu(taskId); + else if (type == ITEM_USE_PARTY_MENU_MOVES) + ItemUseInBattle_PartyMenuChooseMove(taskId); } void CB2_ReturnToBagMenuPocket(void) diff --git a/src/item_use.c b/src/item_use.c index dbdcc16d6d..437cf80376 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -75,6 +75,7 @@ static void Task_CloseCantUseKeyItemMessage(u8); static void SetDistanceOfClosestHiddenItem(u8, s16, s16); static void CB2_OpenPokeblockFromBag(void); static void ItemUseOnFieldCB_Honey(u8 taskId); +static bool32 CannotUseBagBattleItem(u16 itemId); // EWRAM variables EWRAM_DATA static void(*sItemUseOnFieldCB)(u8 taskId) = NULL; @@ -86,9 +87,10 @@ EWRAM_DATA static void(*sItemUseOnFieldCB)(u8 taskId) = NULL; // Never occurs in vanilla, but can occur with improperly created items static const MainCallback sItemUseCallbacks[] = { - [ITEM_USE_PARTY_MENU - 1] = CB2_ShowPartyMenuForItemUse, - [ITEM_USE_FIELD - 1] = CB2_ReturnToField, - [ITEM_USE_PBLOCK_CASE - 1] = NULL, + [ITEM_USE_PARTY_MENU - 1] = CB2_ShowPartyMenuForItemUse, + [ITEM_USE_FIELD - 1] = CB2_ReturnToField, + [ITEM_USE_PBLOCK_CASE - 1] = NULL, + [ITEM_USE_PARTY_MENU_MOVES - 1] = CB2_ShowPartyMenuForItemUse, }; static const u8 sClockwiseDirections[] = {DIR_NORTH, DIR_EAST, DIR_SOUTH, DIR_WEST}; @@ -380,7 +382,7 @@ static bool8 ItemfinderCheckForHiddenItems(const struct MapEvents *events, u8 ta static bool8 IsHiddenItemPresentAtCoords(const struct MapEvents *events, s16 x, s16 y) { u8 bgEventCount = events->bgEventCount; - struct BgEvent *bgEvent = events->bgEvents; + const struct BgEvent *bgEvent = events->bgEvents; int i; for (i = 0; i < bgEventCount; i++) @@ -396,7 +398,7 @@ static bool8 IsHiddenItemPresentAtCoords(const struct MapEvents *events, s16 x, return FALSE; } -static bool8 IsHiddenItemPresentInConnection(struct MapConnection *connection, int x, int y) +static bool8 IsHiddenItemPresentInConnection(const struct MapConnection *connection, int x, int y) { u16 localX, localY; @@ -461,7 +463,7 @@ static void CheckForHiddenItemsInMapConnection(u8 taskId) || var2 > y || y >= height) { - struct MapConnection *conn = GetMapConnectionAtPos(x, y); + const struct MapConnection *conn = GetMapConnectionAtPos(x, y); if (conn && IsHiddenItemPresentInConnection(conn, x, y) == TRUE) SetDistanceOfClosestHiddenItem(taskId, x - playerX, y - playerY); } @@ -1105,25 +1107,6 @@ static void Task_UseStatIncreaseItem(u8 taskId) } } -// e.g. X Attack, Guard Spec -void ItemUseInBattle_StatIncrease(u8 taskId) -{ - u16 partyId = gBattlerPartyIndexes[gBattlerInMenuId]; - - if (ExecuteTableBasedItemEffect(&gPlayerParty[partyId], gSpecialVar_ItemId, partyId, 0) != FALSE) - { - if (!InBattlePyramid()) - DisplayItemMessage(taskId, FONT_NORMAL, gText_WontHaveEffect, CloseItemMessage); - else - DisplayItemMessageInBattlePyramid(taskId, gText_WontHaveEffect, Task_CloseBattlePyramidBagMessage); - } - else - { - gTasks[taskId].func = Task_UseStatIncreaseItem; - gTasks[taskId].data[8] = 0; - } -} - static void ItemUseInBattle_ShowPartyMenu(u8 taskId) { if (!InBattlePyramid()) @@ -1138,40 +1121,119 @@ static void ItemUseInBattle_ShowPartyMenu(u8 taskId) } } -void ItemUseInBattle_Medicine(u8 taskId) +void ItemUseInBattle_PartyMenu(u8 taskId) { - gItemUseCB = ItemUseCB_Medicine; + gItemUseCB = ItemUseCB_BattleScript; ItemUseInBattle_ShowPartyMenu(taskId); } -// Unused. Sacred Ash cannot be used in battle -void ItemUseInBattle_SacredAsh(u8 taskId) +void ItemUseInBattle_PartyMenuChooseMove(u8 taskId) { - gItemUseCB = ItemUseCB_SacredAsh; + gItemUseCB = ItemUseCB_BattleChooseMove; ItemUseInBattle_ShowPartyMenu(taskId); } -void ItemUseInBattle_PPRecovery(u8 taskId) +// Returns whether an item can be used in battle and sets the fail text. +static bool32 CannotUseBagBattleItem(u16 itemId) { - gItemUseCB = ItemUseCB_PPRecovery; - ItemUseInBattle_ShowPartyMenu(taskId); -} + u8 cannotUse = FALSE; + u16 battleUsage = ItemId_GetBattleUsage(itemId); + const u8* failStr = NULL; -// Fluffy Tail / Poke Doll -void ItemUseInBattle_Escape(u8 taskId) -{ - - if((gBattleTypeFlags & BATTLE_TYPE_TRAINER) == FALSE) + // Embargo Check + if ((gPartyMenu.slotId == 0 && gStatuses3[B_POSITION_PLAYER_LEFT] & STATUS3_EMBARGO) + || (gPartyMenu.slotId == 1 && gStatuses3[B_POSITION_PLAYER_RIGHT] & STATUS3_EMBARGO)) + { + return TRUE; + } + // X-Items + if (battleUsage == EFFECT_ITEM_INCREASE_STAT + && gBattleMons[gBattlerInMenuId].statStages[gItemEffectTable[itemId][1]] == MAX_STAT_STAGE) + { + cannotUse++; + } + // Dire Hit + if (battleUsage == EFFECT_ITEM_SET_FOCUS_ENERGY + && (gBattleMons[gBattlerInMenuId].status2 & STATUS2_FOCUS_ENERGY)) + { + cannotUse++; + } + // Guard Spec + if (battleUsage == EFFECT_ITEM_SET_MIST + && gSideStatuses[GetBattlerSide(gBattlerInMenuId)] & SIDE_STATUS_MIST) + { + cannotUse++; + } + // Escape Items + if (battleUsage == EFFECT_ITEM_ESCAPE + && gBattleTypeFlags & BATTLE_TYPE_TRAINER) + { + cannotUse++; + } + // Poke Balls + if (battleUsage == EFFECT_ITEM_THROW_BALL) + { + switch (GetBallThrowableState()) + { + case BALL_THROW_UNABLE_TWO_MONS: + failStr = sText_CantThrowPokeBall_TwoMons; + cannotUse++; + break; + case BALL_THROW_UNABLE_NO_ROOM: + failStr = gText_BoxFull; + cannotUse++; + break; + #if B_SEMI_INVULNERABLE_CATCH >= GEN_4 + case BALL_THROW_UNABLE_SEMI_INVULNERABLE: + failStr = sText_CantThrowPokeBall_SemiInvulnerable; + cannotUse++; + break; + #endif + case BALL_THROW_UNABLE_DISABLED_FLAG: + failStr = sText_CantThrowPokeBall_Disabled; + cannotUse++; + break; + } + } + // Max Mushrooms + if (battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS) + { + u32 i; + for (i = 1; i < NUM_STATS; i++) + { + if (CompareStat(gBattlerInMenuId, i, MAX_STAT_STAGE, CMP_EQUAL)) + { + cannotUse++; + break; + } + } + } + + if (failStr != NULL) + StringExpandPlaceholders(gStringVar4, failStr); + else + StringExpandPlaceholders(gStringVar4, gText_WontHaveEffect); + return cannotUse; +} + +void ItemUseInBattle_BagMenu(u8 taskId) +{ + if (CannotUseBagBattleItem(gSpecialVar_ItemId)) { - RemoveUsedItem(); if (!InBattlePyramid()) - DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, Task_FadeAndCloseBagMenu); + DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, CloseItemMessage); else - DisplayItemMessageInBattlePyramid(taskId, gStringVar4, CloseBattlePyramidBag); + DisplayItemMessageInBattlePyramid(taskId, gStringVar4, Task_CloseBattlePyramidBagMessage); } else { - DisplayDadsAdviceCannotUseItemMessage(taskId, gTasks[taskId].tUsingRegisteredKeyItem); + PlaySE(SE_SELECT); + RemoveUsedItem(); + ScheduleBgCopyTilemapToVram(2); + if (!InBattlePyramid()) + gTasks[taskId].func = Task_FadeAndCloseBagMenu; + else + gTasks[taskId].func = CloseBattlePyramidBag; } } @@ -1219,33 +1281,6 @@ void ItemUseOutOfBattle_EnigmaBerry(u8 taskId) } } -void ItemUseInBattle_EnigmaBerry(u8 taskId) -{ - switch (GetItemEffectType(gSpecialVar_ItemId)) - { - case ITEM_EFFECT_X_ITEM: - ItemUseInBattle_StatIncrease(taskId); - break; - case ITEM_EFFECT_HEAL_HP: - case ITEM_EFFECT_CURE_POISON: - case ITEM_EFFECT_CURE_SLEEP: - case ITEM_EFFECT_CURE_BURN: - case ITEM_EFFECT_CURE_FREEZE: - case ITEM_EFFECT_CURE_PARALYSIS: - case ITEM_EFFECT_CURE_ALL_STATUS: - case ITEM_EFFECT_CURE_CONFUSION: - case ITEM_EFFECT_CURE_INFATUATION: - ItemUseInBattle_Medicine(taskId); - break; - case ITEM_EFFECT_HEAL_PP: - ItemUseInBattle_PPRecovery(taskId); - break; - default: - ItemUseOutOfBattle_CannotUse(taskId); - break; - } -} - void ItemUseOutOfBattle_FormChange(u8 taskId) { gItemUseCB = ItemUseCB_FormChange; diff --git a/src/link.c b/src/link.c index de857af339..06bde1e38f 100644 --- a/src/link.c +++ b/src/link.c @@ -28,6 +28,13 @@ #include "constants/rgb.h" #include "constants/trade.h" +// Window IDs for the link error screens +enum { + WIN_LINK_ERROR_TOP, + WIN_LINK_ERROR_MID, + WIN_LINK_ERROR_BOTTOM, +}; + struct BlockTransfer { u16 pos; @@ -193,8 +200,9 @@ static const struct BgTemplate sLinkErrorBgTemplates[] = { .priority = 1 } }; + static const struct WindowTemplate sLinkErrorWindowTemplates[] = { - { + [WIN_LINK_ERROR_TOP] = { .bg = 0, .tilemapLeft = 0, .tilemapTop = 0, @@ -202,7 +210,8 @@ static const struct WindowTemplate sLinkErrorWindowTemplates[] = { .height = 5, .paletteNum = 15, .baseBlock = 0x002 - }, { + }, + [WIN_LINK_ERROR_MID] = { .bg = 0, .tilemapLeft = 0, .tilemapTop = 6, @@ -210,7 +219,8 @@ static const struct WindowTemplate sLinkErrorWindowTemplates[] = { .height = 7, .paletteNum = 15, .baseBlock = 0x098 - }, { + }, + [WIN_LINK_ERROR_BOTTOM] = { .bg = 0, .tilemapLeft = 0, .tilemapTop = 13, @@ -1641,26 +1651,26 @@ static void ErrorMsg_MoveCloserToPartner(void) CopyToBgTilemapBuffer(1, sWirelessLinkDisplayTilemap, 0, 0); CopyBgTilemapBufferToVram(1); LoadPalette(sWirelessLinkDisplayPal, 0, 0x20); - FillWindowPixelBuffer(0, PIXEL_FILL(0)); - FillWindowPixelBuffer(2, PIXEL_FILL(0)); - AddTextPrinterParameterized3(0, FONT_SHORT_COPY_1, 2, 6, sTextColors, 0, gText_CommErrorEllipsis); - AddTextPrinterParameterized3(2, FONT_SHORT_COPY_1, 2, 1, sTextColors, 0, gText_MoveCloserToLinkPartner); - PutWindowTilemap(0); - PutWindowTilemap(2); - CopyWindowToVram(0, COPYWIN_NONE); // Does nothing - CopyWindowToVram(2, COPYWIN_FULL); + FillWindowPixelBuffer(WIN_LINK_ERROR_TOP, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_LINK_ERROR_BOTTOM, PIXEL_FILL(0)); + AddTextPrinterParameterized3(WIN_LINK_ERROR_TOP, FONT_SHORT_COPY_1, 2, 6, sTextColors, 0, gText_CommErrorEllipsis); + AddTextPrinterParameterized3(WIN_LINK_ERROR_BOTTOM, FONT_SHORT_COPY_1, 2, 1, sTextColors, 0, gText_MoveCloserToLinkPartner); + PutWindowTilemap(WIN_LINK_ERROR_TOP); + PutWindowTilemap(WIN_LINK_ERROR_BOTTOM); + CopyWindowToVram(WIN_LINK_ERROR_TOP, COPYWIN_NONE); // Does nothing + CopyWindowToVram(WIN_LINK_ERROR_BOTTOM, COPYWIN_FULL); } static void ErrorMsg_CheckConnections(void) { LoadBgTiles(0, sCommErrorBg_Gfx, 0x20, 0); - FillWindowPixelBuffer(1, PIXEL_FILL(0)); - FillWindowPixelBuffer(2, PIXEL_FILL(0)); - AddTextPrinterParameterized3(1, FONT_SHORT_COPY_1, 2, 0, sTextColors, 0, gText_CommErrorCheckConnections); - PutWindowTilemap(1); - PutWindowTilemap(2); - CopyWindowToVram(1, COPYWIN_NONE); // Does nothing - CopyWindowToVram(2, COPYWIN_FULL); + FillWindowPixelBuffer(WIN_LINK_ERROR_MID, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_LINK_ERROR_BOTTOM, PIXEL_FILL(0)); + AddTextPrinterParameterized3(WIN_LINK_ERROR_MID, FONT_SHORT_COPY_1, 2, 0, sTextColors, 0, gText_CommErrorCheckConnections); + PutWindowTilemap(WIN_LINK_ERROR_MID); + PutWindowTilemap(WIN_LINK_ERROR_BOTTOM); + CopyWindowToVram(WIN_LINK_ERROR_MID, COPYWIN_NONE); // Does nothing + CopyWindowToVram(WIN_LINK_ERROR_BOTTOM, COPYWIN_FULL); } static void CB2_PrintErrorMessage(void) @@ -1691,9 +1701,9 @@ static void CB2_PrintErrorMessage(void) break; case 130: if (gWirelessCommType == 2) - AddTextPrinterParameterized3(0, FONT_SHORT_COPY_1, 2, 20, sTextColors, 0, gText_ABtnTitleScreen); + AddTextPrinterParameterized3(WIN_LINK_ERROR_TOP, FONT_SHORT_COPY_1, 2, 20, sTextColors, 0, gText_ABtnTitleScreen); else if (gWirelessCommType == 1) - AddTextPrinterParameterized3(0, FONT_SHORT_COPY_1, 2, 20, sTextColors, 0, gText_ABtnRegistrationCounter); + AddTextPrinterParameterized3(WIN_LINK_ERROR_TOP, FONT_SHORT_COPY_1, 2, 20, sTextColors, 0, gText_ABtnRegistrationCounter); break; } if (gMain.state == 160) diff --git a/src/link_rfu_3.c b/src/link_rfu_3.c index 2ad7a738ef..1936d3741b 100644 --- a/src/link_rfu_3.c +++ b/src/link_rfu_3.c @@ -677,7 +677,7 @@ void InitHostRfuGameData(struct RfuGameData *data, u8 activity, bool32 startedAc data->compatibility.hasNews = FALSE; data->compatibility.hasCard = FALSE; data->compatibility.unknown = FALSE; - data->compatibility.isChampion = FlagGet(FLAG_IS_CHAMPION); + data->compatibility.canLinkNationally = FlagGet(FLAG_IS_CHAMPION); data->compatibility.hasNationalDex = IsNationalPokedexEnabled(); data->compatibility.gameClear = FlagGet(FLAG_SYS_GAME_CLEAR); } diff --git a/src/main_menu.c b/src/main_menu.c index 9d510c0272..377cd635c1 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -503,7 +503,9 @@ static const u8 *const sFemalePresetNames[] = { gText_DefaultNameHalie }; -// .text +// The number of male vs. female names is assumed to be the same. +// If they aren't, the smaller of the two sizes will be used and any extra names will be ignored. +#define NUM_PRESET_NAMES min(ARRAY_COUNT(sMalePresetNames), ARRAY_COUNT(sFemalePresetNames)) enum { @@ -1597,7 +1599,7 @@ static void Task_NewGameBirchSpeech_StartNamingScreen(u8 taskId) { FreeAllWindowBuffers(); FreeAndDestroyMonPicSprite(gTasks[taskId].tLotadSpriteId); - NewGameBirchSpeech_SetDefaultPlayerName(Random() % 20); + NewGameBirchSpeech_SetDefaultPlayerName(Random() % NUM_PRESET_NAMES); DestroyTask(taskId); DoNamingScreen(NAMING_SCREEN_PLAYER, gSaveBlock2Ptr->playerName, gSaveBlock2Ptr->playerGender, 0, 0, CB2_NewGameBirchSpeech_ReturnFromNamingScreen); } diff --git a/src/match_call.c b/src/match_call.c index a9d18b3477..c3378040e3 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -1812,6 +1812,9 @@ static void PopulateSpeciesFromTrainerParty(int matchCallId, u8 *destStr) case F_TRAINER_PARTY_CUSTOM_MOVESET | F_TRAINER_PARTY_HELD_ITEM: speciesName = gSpeciesNames[party.ItemCustomMoves[monId].species]; break; + case F_TRAINER_PARTY_EVERYTHING_CUSTOMIZED: + speciesName = gSpeciesNames[party.EverythingCustomized[monId].species]; + break; } StringCopy(destStr, speciesName); diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index 90e3671cc9..9bec5fd08f 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -88,7 +88,7 @@ static void SetupHipster(void) struct MauvilleManHipster *hipster = &gSaveBlock1Ptr->oldMan.hipster; hipster->id = MAUVILLE_MAN_HIPSTER; - hipster->alreadySpoken = FALSE; + hipster->taughtWord = FALSE; hipster->language = gGameLanguage; } @@ -225,27 +225,28 @@ void PlayBardSong(void) ScriptContext_Stop(); } -void GetHipsterSpokenFlag(void) +void HasHipsterTaughtWord(void) { - gSpecialVar_Result = (&gSaveBlock1Ptr->oldMan.hipster)->alreadySpoken; + gSpecialVar_Result = (&gSaveBlock1Ptr->oldMan.hipster)->taughtWord; } -void SetHipsterSpokenFlag(void) +void SetHipsterTaughtWord(void) { - (&gSaveBlock1Ptr->oldMan.hipster)->alreadySpoken = TRUE; + (&gSaveBlock1Ptr->oldMan.hipster)->taughtWord = TRUE; } void HipsterTryTeachWord(void) { - u16 phrase = GetNewHipsterPhraseToTeach(); + u16 word = UnlockRandomTrendySaying(); - if (phrase == EC_EMPTY_WORD) + if (word == EC_EMPTY_WORD) { + // All words already unlocked gSpecialVar_Result = FALSE; } else { - CopyEasyChatWord(gStringVar1, phrase); + CopyEasyChatWord(gStringVar1, word); gSpecialVar_Result = TRUE; } } @@ -369,7 +370,7 @@ static void ResetBardFlag(void) static void ResetHipsterFlag(void) { - (&gSaveBlock1Ptr->oldMan.hipster)->alreadySpoken = FALSE; + (&gSaveBlock1Ptr->oldMan.hipster)->taughtWord = FALSE; } static void ResetTraderFlag(void) diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 6c153772f7..802d1aec32 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -106,10 +106,9 @@ static const u8 sConditionToLineLength[MAX_CONDITION + 1] = 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35 }; - static const struct WindowTemplate sMoveRelearnerWindowTemplates[] = { - { + [RELEARNERWIN_DESC_BATTLE] = { .bg = 1, .tilemapLeft = 1, .tilemapTop = 1, @@ -118,7 +117,7 @@ static const struct WindowTemplate sMoveRelearnerWindowTemplates[] = .paletteNum = 15, .baseBlock = 0xA }, - { + [RELEARNERWIN_DESC_CONTEST] = { .bg = 1, .tilemapLeft = 1, .tilemapTop = 1, @@ -127,7 +126,7 @@ static const struct WindowTemplate sMoveRelearnerWindowTemplates[] = .paletteNum = 15, .baseBlock = 0xCA }, - { + [RELEARNERWIN_MOVE_LIST] = { .bg = 1, .tilemapLeft = 19, .tilemapTop = 1, @@ -136,7 +135,7 @@ static const struct WindowTemplate sMoveRelearnerWindowTemplates[] = .paletteNum = 15, .baseBlock = 0x18A }, - { + [RELEARNERWIN_MSG] = { .bg = 1, .tilemapLeft = 4, .tilemapTop = 15, @@ -145,7 +144,8 @@ static const struct WindowTemplate sMoveRelearnerWindowTemplates[] = .paletteNum = 15, .baseBlock = 0x202 }, - { + // Unused. Identical to sMoveRelearnerYesNoMenuTemplate + [RELEARNERWIN_YESNO] = { .bg = 0, .tilemapLeft = 22, .tilemapTop = 8, @@ -176,7 +176,7 @@ static const struct ListMenuTemplate sMoveRelearnerMovesListTemplate = .itemPrintFunc = NULL, .totalItems = 0, .maxShowed = 0, - .windowId = 2, + .windowId = RELEARNERWIN_MOVE_LIST, .header_X = 0, .item_X = 8, .cursor_X = 0, @@ -702,7 +702,7 @@ void ConditionGraph_CalcPositions(u8 *conditions, struct UCoords16 *positions) // Move relearner //---------------- -void InitMoveRelearnerWindows(bool8 useContextWindow) +void InitMoveRelearnerWindows(bool8 useContestWindow) { u8 i; @@ -714,20 +714,20 @@ void InitMoveRelearnerWindows(bool8 useContextWindow) for (i = 0; i < ARRAY_COUNT(sMoveRelearnerWindowTemplates) - 1; i++) FillWindowPixelBuffer(i, PIXEL_FILL(1)); - if (!useContextWindow) + if (!useContestWindow) { - PutWindowTilemap(0); - DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x1, 0xE); + PutWindowTilemap(RELEARNERWIN_DESC_BATTLE); + DrawStdFrameWithCustomTileAndPalette(RELEARNERWIN_DESC_BATTLE, FALSE, 0x1, 0xE); } else { - PutWindowTilemap(1); - DrawStdFrameWithCustomTileAndPalette(1, FALSE, 1, 0xE); + PutWindowTilemap(RELEARNERWIN_DESC_CONTEST); + DrawStdFrameWithCustomTileAndPalette(RELEARNERWIN_DESC_CONTEST, FALSE, 1, 0xE); } - PutWindowTilemap(2); - PutWindowTilemap(3); - DrawStdFrameWithCustomTileAndPalette(2, FALSE, 1, 0xE); - DrawStdFrameWithCustomTileAndPalette(3, FALSE, 1, 0xE); + PutWindowTilemap(RELEARNERWIN_MOVE_LIST); + PutWindowTilemap(RELEARNERWIN_MSG); + DrawStdFrameWithCustomTileAndPalette(RELEARNERWIN_MOVE_LIST, FALSE, 1, 0xE); + DrawStdFrameWithCustomTileAndPalette(RELEARNERWIN_MSG, FALSE, 1, 0xE); MoveRelearnerDummy(); ScheduleBgCopyTilemapToVram(1); } @@ -758,33 +758,34 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) u8 buffer[32]; const u8 *str; - FillWindowPixelBuffer(0, PIXEL_FILL(1)); + FillWindowPixelBuffer(RELEARNERWIN_DESC_BATTLE, PIXEL_FILL(1)); str = gText_MoveRelearnerBattleMoves; - x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 0x80); - AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 1, TEXT_SKIP_DRAW, NULL); + x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 128); + AddTextPrinterParameterized(RELEARNERWIN_DESC_BATTLE, FONT_NORMAL, str, x, 1, TEXT_SKIP_DRAW, NULL); str = gText_MoveRelearnerPP; - AddTextPrinterParameterized(0, FONT_NORMAL, str, 4, 0x29, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(RELEARNERWIN_DESC_BATTLE, FONT_NORMAL, str, 4, 41, TEXT_SKIP_DRAW, NULL); str = gText_MoveRelearnerPower; - x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x6A); - AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 0x19, TEXT_SKIP_DRAW, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, str, 106); + AddTextPrinterParameterized(RELEARNERWIN_DESC_BATTLE, FONT_NORMAL, str, x, 25, TEXT_SKIP_DRAW, NULL); str = gText_MoveRelearnerAccuracy; - x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x6A); - AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 0x29, TEXT_SKIP_DRAW, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, str, 106); + AddTextPrinterParameterized(RELEARNERWIN_DESC_BATTLE, FONT_NORMAL, str, x, 41, TEXT_SKIP_DRAW, NULL); if (chosenMove == LIST_CANCEL) { - CopyWindowToVram(0, COPYWIN_GFX); + // On "Cancel", skip printing move data + CopyWindowToVram(RELEARNERWIN_DESC_BATTLE, COPYWIN_GFX); return; } move = &gBattleMoves[chosenMove]; str = gTypeNames[move->type]; - AddTextPrinterParameterized(0, FONT_NORMAL, str, 4, 0x19, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(RELEARNERWIN_DESC_BATTLE, FONT_NORMAL, str, 4, 25, TEXT_SKIP_DRAW, NULL); x = 4 + GetStringWidth(FONT_NORMAL, gText_MoveRelearnerPP, 0); ConvertIntToDecimalStringN(buffer, move->pp, STR_CONV_MODE_LEFT_ALIGN, 2); - AddTextPrinterParameterized(0, FONT_NORMAL, buffer, x, 0x29, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(RELEARNERWIN_DESC_BATTLE, FONT_NORMAL, buffer, x, 41, TEXT_SKIP_DRAW, NULL); if (move->power < 2) { @@ -795,7 +796,7 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) ConvertIntToDecimalStringN(buffer, move->power, STR_CONV_MODE_LEFT_ALIGN, 3); str = buffer; } - AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x19, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(RELEARNERWIN_DESC_BATTLE, FONT_NORMAL, str, 106, 25, TEXT_SKIP_DRAW, NULL); if (move->accuracy == 0) { @@ -806,14 +807,14 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) ConvertIntToDecimalStringN(buffer, move->accuracy, STR_CONV_MODE_LEFT_ALIGN, 3); str = buffer; } - AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x29, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(RELEARNERWIN_DESC_BATTLE, FONT_NORMAL, str, 106, 41, TEXT_SKIP_DRAW, NULL); if (move->effect != EFFECT_PLACEHOLDER) str = gMoveDescriptionPointers[chosenMove - 1]; else str = gNotDoneYetDescription; - AddTextPrinterParameterized(0, FONT_NARROW, str, 0, 0x41, 0, NULL); + AddTextPrinterParameterized(RELEARNERWIN_DESC_BATTLE, FONT_NARROW, str, 0, 65, 0, NULL); } static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove) @@ -823,33 +824,33 @@ static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove) const struct ContestMove *move; MoveRelearnerShowHideHearts(chosenMove); - FillWindowPixelBuffer(1, PIXEL_FILL(1)); + FillWindowPixelBuffer(RELEARNERWIN_DESC_CONTEST, PIXEL_FILL(1)); str = gText_MoveRelearnerContestMovesTitle; - x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 0x80); - AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 1, TEXT_SKIP_DRAW, NULL); + x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 128); + AddTextPrinterParameterized(RELEARNERWIN_DESC_CONTEST, FONT_NORMAL, str, x, 1, TEXT_SKIP_DRAW, NULL); str = gText_MoveRelearnerAppeal; - x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x5C); - AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 0x19, TEXT_SKIP_DRAW, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, str, 92); + AddTextPrinterParameterized(RELEARNERWIN_DESC_CONTEST, FONT_NORMAL, str, x, 25, TEXT_SKIP_DRAW, NULL); str = gText_MoveRelearnerJam; - x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x5C); - AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 0x29, TEXT_SKIP_DRAW, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, str, 92); + AddTextPrinterParameterized(RELEARNERWIN_DESC_CONTEST, FONT_NORMAL, str, x, 41, TEXT_SKIP_DRAW, NULL); if (chosenMove == MENU_NOTHING_CHOSEN) { - CopyWindowToVram(1, COPYWIN_GFX); + CopyWindowToVram(RELEARNERWIN_DESC_CONTEST, COPYWIN_GFX); return; } move = &gContestMoves[chosenMove]; str = gContestMoveTypeTextPointers[move->contestCategory]; - AddTextPrinterParameterized(1, FONT_NORMAL, str, 4, 0x19, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(RELEARNERWIN_DESC_CONTEST, FONT_NORMAL, str, 4, 25, TEXT_SKIP_DRAW, NULL); str = gContestEffectDescriptionPointers[move->effect]; - AddTextPrinterParameterized(1, FONT_NARROW, str, 0, 0x41, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(RELEARNERWIN_DESC_CONTEST, FONT_NARROW, str, 0, 65, TEXT_SKIP_DRAW, NULL); - CopyWindowToVram(1, COPYWIN_GFX); + CopyWindowToVram(RELEARNERWIN_DESC_CONTEST, COPYWIN_GFX); } static void MoveRelearnerCursorCallback(s32 itemIndex, bool8 onInit, struct ListMenu *list) @@ -860,20 +861,20 @@ static void MoveRelearnerCursorCallback(s32 itemIndex, bool8 onInit, struct List MoveRelearnerMenuLoadContestMoveDescription(itemIndex); } -void MoveRelearnerPrintText(u8 *str) +void MoveRelearnerPrintMessage(u8 *str) { u8 speed; - FillWindowPixelBuffer(3, PIXEL_FILL(1)); + FillWindowPixelBuffer(RELEARNERWIN_MSG, PIXEL_FILL(1)); gTextFlags.canABSpeedUpPrint = TRUE; speed = GetPlayerTextSpeedDelay(); - AddTextPrinterParameterized2(3, FONT_NORMAL, str, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, 3); + AddTextPrinterParameterized2(RELEARNERWIN_MSG, FONT_NORMAL, str, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, 3); } bool16 MoveRelearnerRunTextPrinters(void) { RunTextPrinters(); - return IsTextPrinterActive(3); + return IsTextPrinterActive(RELEARNERWIN_MSG); } void MoveRelearnerCreateYesNoMenu(void) @@ -1076,7 +1077,7 @@ void GetConditionMenuMonGfx(void *tilesDst, void *palDst, u16 boxId, u16 monId, if (partyId != numMons) { - u16 species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES2, NULL); + u16 species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES_OR_EGG, NULL); u32 trainerId = GetBoxOrPartyMonData(boxId, monId, MON_DATA_OT_ID, NULL); u32 personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL); diff --git a/src/mini_printf.c b/src/mini_printf.c index 8345a3935e..9fb4ecfac9 100644 --- a/src/mini_printf.c +++ b/src/mini_printf.c @@ -41,7 +41,7 @@ #ifndef NDEBUG -struct mini_buff +struct mini_buff { char *buffer, *pbuffer; u32 buffer_len; @@ -95,9 +95,9 @@ static s32 _putsAscii(char *s, s32 len, void *buf) s32 i; struct mini_buff *b; - if (!buf) + if (!buf) return len; - + b = buf; p0 = b->buffer; @@ -118,9 +118,9 @@ static s32 _putsEncoded(char *s, s32 len, void *buf) s32 i; struct mini_buff *b; - if (!buf) + if (!buf) return len; - + b = buf; p0 = b->buffer; @@ -142,7 +142,7 @@ static s32 mini_strlen(const char *s) return len; } -static s32 mini_itoa(u32 value, u32 radix, s32 uppercase, bool32 unsig, char *buffer) +static s32 mini_itoa(s32 value, u32 radix, s32 uppercase, bool32 unsig, char *buffer) { char *pbuffer = buffer; s32 negative = 0; @@ -159,7 +159,7 @@ static s32 mini_itoa(u32 value, u32 radix, s32 uppercase, bool32 unsig, char *bu } /* This builds the string back to front ... */ - do + do { s32 digit = value % radix; *(pbuffer++) = (digit < 10 ? '0' + digit : (uppercase ? 'A' : 'a') + digit - 10); @@ -243,7 +243,7 @@ s32 mini_vpprintf(void* buf, const char *fmt, va_list va) { len = 1; len = _putsAscii(&ch, len, buf); - } else + } else { char pad_char = ' '; s32 pad_to = 0; @@ -270,7 +270,7 @@ s32 mini_vpprintf(void* buf, const char *fmt, va_list va) ch=*(fmt++); } - switch (ch) + switch (ch) { case 0: goto end; diff --git a/src/move_relearner.c b/src/move_relearner.c index 05ec549e14..af4593e533 100644 --- a/src/move_relearner.c +++ b/src/move_relearner.c @@ -465,10 +465,10 @@ static void CB2_MoveRelearnerMain(void) UpdatePaletteFade(); } -static void FormatAndPrintText(const u8 *src) +static void PrintMessageWithPlaceholders(const u8 *src) { StringExpandPlaceholders(gStringVar4, src); - MoveRelearnerPrintText(gStringVar4); + MoveRelearnerPrintMessage(gStringVar4); } // See the state machine doc at the top of the file. @@ -522,7 +522,7 @@ static void DoMoveRelearnerMain(void) { if (GiveMoveToMon(&gPlayerParty[sMoveRelearnerStruct->partyMon], GetCurrentSelectedMove()) != MON_HAS_MAX_MOVES) { - FormatAndPrintText(gText_MoveRelearnerPkmnLearnedMove); + PrintMessageWithPlaceholders(gText_MoveRelearnerPkmnLearnedMove); gSpecialVar_0x8004 = TRUE; sMoveRelearnerStruct->state = MENU_STATE_PRINT_TEXT_THEN_FANFARE; } @@ -574,7 +574,7 @@ static void DoMoveRelearnerMain(void) } break; case MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT: - FormatAndPrintText(gText_MoveRelearnerPkmnTryingToLearnMove); + PrintMessageWithPlaceholders(gText_MoveRelearnerPkmnTryingToLearnMove); sMoveRelearnerStruct->state++; break; case MENU_STATE_WAIT_FOR_TRYING_TO_LEARN: @@ -590,7 +590,7 @@ static void DoMoveRelearnerMain(void) if (selection == 0) { - FormatAndPrintText(gText_MoveRelearnerWhichMoveToForget); + PrintMessageWithPlaceholders(gText_MoveRelearnerWhichMoveToForget); sMoveRelearnerStruct->state = MENU_STATE_PRINT_WHICH_MOVE_PROMPT; } else if (selection == MENU_B_PRESSED || selection == 1) @@ -601,7 +601,7 @@ static void DoMoveRelearnerMain(void) break; case MENU_STATE_PRINT_STOP_TEACHING: StringCopy(gStringVar2, gMoveNames[GetCurrentSelectedMove()]); - FormatAndPrintText(gText_MoveRelearnerStopTryingToTeachMove); + PrintMessageWithPlaceholders(gText_MoveRelearnerStopTryingToTeachMove); sMoveRelearnerStruct->state++; break; case MENU_STATE_WAIT_FOR_STOP_TEACHING: @@ -637,7 +637,7 @@ static void DoMoveRelearnerMain(void) case MENU_STATE_CHOOSE_SETUP_STATE: if (!MoveRelearnerRunTextPrinters()) { - FillWindowPixelBuffer(3, 0x11); + FillWindowPixelBuffer(RELEARNERWIN_MSG, 0x11); if (sMoveRelearnerMenuSate.showContestInfo == FALSE) { sMoveRelearnerStruct->state = MENU_STATE_SETUP_BATTLE_MODE; @@ -694,7 +694,7 @@ static void DoMoveRelearnerMain(void) ShowTeachMoveText(TRUE); } RemoveScrollArrows(); - CopyWindowToVram(3, COPYWIN_GFX); + CopyWindowToVram(RELEARNERWIN_MSG, COPYWIN_GFX); break; case MENU_STATE_TRY_OVERWRITE_MOVE: if (!gPaletteFade.active) @@ -711,7 +711,7 @@ static void DoMoveRelearnerMain(void) RemoveMonPPBonus(&gPlayerParty[sMoveRelearnerStruct->partyMon], sMoveRelearnerStruct->moveSlot); SetMonMoveSlot(&gPlayerParty[sMoveRelearnerStruct->partyMon], GetCurrentSelectedMove(), sMoveRelearnerStruct->moveSlot); StringCopy(gStringVar2, gMoveNames[GetCurrentSelectedMove()]); - FormatAndPrintText(gText_MoveRelearnerAndPoof); + PrintMessageWithPlaceholders(gText_MoveRelearnerAndPoof); sMoveRelearnerStruct->state = MENU_STATE_DOUBLE_FANFARE_FORGOT_MOVE; gSpecialVar_0x8004 = TRUE; } @@ -720,7 +720,7 @@ static void DoMoveRelearnerMain(void) case MENU_STATE_DOUBLE_FANFARE_FORGOT_MOVE: if (!MoveRelearnerRunTextPrinters()) { - FormatAndPrintText(gText_MoveRelearnerPkmnForgotMoveAndLearnedNew); + PrintMessageWithPlaceholders(gText_MoveRelearnerPkmnForgotMoveAndLearnedNew); sMoveRelearnerStruct->state = MENU_STATE_PRINT_TEXT_THEN_FANFARE; PlayFanfare(MUS_LEVEL_UP); } @@ -765,15 +765,13 @@ static void HideHeartSpritesAndShowTeachMoveText(bool8 onlyHideSprites) s32 i; for (i = 0; i < 16; i++) - { gSprites[sMoveRelearnerStruct->heartSpriteIds[i]].invisible = TRUE; - } if (!onlyHideSprites) { StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn); - FillWindowPixelBuffer(3, 0x11); - AddTextPrinterParameterized(3, FONT_NORMAL, gStringVar4, 0, 1, 0, NULL); + FillWindowPixelBuffer(RELEARNERWIN_MSG, 0x11); + AddTextPrinterParameterized(RELEARNERWIN_MSG, FONT_NORMAL, gStringVar4, 0, 1, 0, NULL); } } @@ -786,21 +784,19 @@ static void HandleInput(bool8 showContest) { case LIST_NOTHING_CHOSEN: if (!(JOY_NEW(DPAD_LEFT | DPAD_RIGHT)) && !GetLRKeysPressed()) - { break; - } PlaySE(SE_SELECT); if (showContest == FALSE) { - PutWindowTilemap(1); + PutWindowTilemap(RELEARNERWIN_DESC_CONTEST); sMoveRelearnerStruct->state = MENU_STATE_SETUP_CONTEST_MODE; sMoveRelearnerMenuSate.showContestInfo = TRUE; } else { - PutWindowTilemap(0); + PutWindowTilemap(RELEARNERWIN_DESC_BATTLE); sMoveRelearnerStruct->state = MENU_STATE_SETUP_BATTLE_MODE; sMoveRelearnerMenuSate.showContestInfo = FALSE; } @@ -813,7 +809,7 @@ static void HandleInput(bool8 showContest) RemoveScrollArrows(); sMoveRelearnerStruct->state = MENU_STATE_PRINT_GIVE_UP_PROMPT; StringExpandPlaceholders(gStringVar4, gText_MoveRelearnerGiveUp); - MoveRelearnerPrintText(gStringVar4); + MoveRelearnerPrintMessage(gStringVar4); break; default: PlaySE(SE_SELECT); @@ -821,7 +817,7 @@ static void HandleInput(bool8 showContest) sMoveRelearnerStruct->state = MENU_STATE_PRINT_TEACH_MOVE_PROMPT; StringCopy(gStringVar2, gMoveNames[itemId]); StringExpandPlaceholders(gStringVar4, gText_MoveRelearnerTeachMoveConfirm); - MoveRelearnerPrintText(gStringVar4); + MoveRelearnerPrintMessage(gStringVar4); break; } } @@ -842,8 +838,8 @@ static void ShowTeachMoveText(bool8 shouldDoNothingInstead) if (shouldDoNothingInstead == FALSE) { StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn); - FillWindowPixelBuffer(3, 0x11); - AddTextPrinterParameterized(3, FONT_NORMAL, gStringVar4, 0, 1, 0, NULL); + FillWindowPixelBuffer(RELEARNERWIN_MSG, 0x11); + AddTextPrinterParameterized(RELEARNERWIN_MSG, FONT_NORMAL, gStringVar4, 0, 1, 0, NULL); } } @@ -857,9 +853,7 @@ static void CreateUISprites(void) // These are the appeal hearts. for (i = 0; i < 8; i++) - { sMoveRelearnerStruct->heartSpriteIds[i] = CreateSprite(&sConstestMoveHeartSprite, (i - (i / 4) * 4) * 8 + 104, (i / 4) * 8 + 36, 0); - } // These are the jam harts. // The animation is used to toggle between full/empty heart sprites. @@ -870,17 +864,13 @@ static void CreateUISprites(void) } for (i = 0; i < 16; i++) - { gSprites[sMoveRelearnerStruct->heartSpriteIds[i]].invisible = TRUE; - } } static void AddScrollArrows(void) { if (sMoveRelearnerStruct->moveDisplayArrowTask == TASK_NONE) - { sMoveRelearnerStruct->moveDisplayArrowTask = AddScrollIndicatorArrowPair(&sDisplayModeArrowsTemplate, &sMoveRelearnerStruct->scrollOffset); - } if (sMoveRelearnerStruct->moveListScrollArrowTask == TASK_NONE) { @@ -934,49 +924,35 @@ void MoveRelearnerShowHideHearts(s32 moveId) if (!sMoveRelearnerMenuSate.showContestInfo || moveId == LIST_CANCEL) { for (i = 0; i < 16; i++) - { gSprites[sMoveRelearnerStruct->heartSpriteIds[i]].invisible = TRUE; - } } else { numHearts = (u8)(gContestEffects[gContestMoves[moveId].effect].appeal / 10); if (numHearts == 0xFF) - { numHearts = 0; - } for (i = 0; i < 8; i++) { if (i < numHearts) - { StartSpriteAnim(&gSprites[sMoveRelearnerStruct->heartSpriteIds[i]], 1); - } else - { StartSpriteAnim(&gSprites[sMoveRelearnerStruct->heartSpriteIds[i]], 0); - } gSprites[sMoveRelearnerStruct->heartSpriteIds[i]].invisible = FALSE; } numHearts = (u8)(gContestEffects[gContestMoves[moveId].effect].jam / 10); if (numHearts == 0xFF) - { numHearts = 0; - } for (i = 0; i < 8; i++) { if (i < numHearts) - { StartSpriteAnim(&gSprites[sMoveRelearnerStruct->heartSpriteIds[i + 8]], 3); - } else - { StartSpriteAnim(&gSprites[sMoveRelearnerStruct->heartSpriteIds[i + 8]], 2); - } gSprites[sMoveRelearnerStruct->heartSpriteIds[i + 8]].invisible = FALSE; } } diff --git a/src/mystery_event_menu.c b/src/mystery_event_menu.c index 92b07d45b7..79cab2b050 100644 --- a/src/mystery_event_menu.c +++ b/src/mystery_event_menu.c @@ -20,6 +20,11 @@ #include "decompress.h" #include "constants/rgb.h" +enum { + WIN_MSG, + WIN_LOADING, +}; + static void CB2_MysteryEventMenu(void); static void PrintMysteryMenuText(u8 windowId, const u8 *text, u8 x, u8 y, s32 speed); @@ -40,7 +45,7 @@ static const struct BgTemplate sBgTemplates[] = static const struct WindowTemplate sWindowTemplates[] = { - { + [WIN_MSG] = { .bg = 0, .tilemapLeft = 4, .tilemapTop = 15, @@ -49,7 +54,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 14, .baseBlock = 20 }, - { + [WIN_LOADING] = { .bg = 0, .tilemapLeft = 7, .tilemapTop = 6, @@ -87,7 +92,7 @@ void CB2_InitMysteryEventMenu(void) s32 i; DeactivateAllTextPrinters(); - for (i = 0; i < 2; i++) + for (i = 0; i < (int)ARRAY_COUNT(sWindowTemplates) - 1; i++) FillWindowPixelBuffer(i, PIXEL_FILL(0)); FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, DISPLAY_TILE_WIDTH, DISPLAY_TILE_HEIGHT); @@ -131,9 +136,9 @@ static void CB2_MysteryEventMenu(void) switch (gMain.state) { case 0: - DrawStdFrameWithCustomTileAndPalette(0, TRUE, 1, 0xD); - PutWindowTilemap(0); - CopyWindowToVram(0, COPYWIN_FULL); + DrawStdFrameWithCustomTileAndPalette(WIN_MSG, TRUE, 1, 0xD); + PutWindowTilemap(WIN_MSG); + CopyWindowToVram(WIN_MSG, COPYWIN_FULL); ShowBg(0); BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK); gMain.state++; @@ -141,12 +146,12 @@ static void CB2_MysteryEventMenu(void) case 1: if (!gPaletteFade.active) { - PrintMysteryMenuText(0, gText_LinkStandby2, 1, 2, 1); + PrintMysteryMenuText(WIN_MSG, gText_LinkStandby2, 1, 2, 1); gMain.state++; } break; case 2: - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(WIN_MSG)) { gMain.state++; gLinkType = LINKTYPE_MYSTERY_EVENT; @@ -154,10 +159,10 @@ static void CB2_MysteryEventMenu(void) } break; case 3: - if ((gLinkStatus & 0x20) && (gLinkStatus & 0x1C) > 4) + if ((gLinkStatus & LINK_STAT_MASTER) && (gLinkStatus & LINK_STAT_PLAYER_COUNT) > 4) { PlaySE(SE_PIN); - PrintMysteryMenuText(0, gText_PressAToLoadEvent, 1, 2, 1); + PrintMysteryMenuText(WIN_MSG, gText_PressAToLoadEvent, 1, 2, 1); gMain.state++; } if (JOY_NEW(B_BUTTON)) @@ -168,7 +173,7 @@ static void CB2_MysteryEventMenu(void) } break; case 4: - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(WIN_MSG)) gMain.state++; break; case 5: @@ -178,10 +183,10 @@ static void CB2_MysteryEventMenu(void) { PlaySE(SE_SELECT); CheckShouldAdvanceLinkState(); - DrawStdFrameWithCustomTileAndPalette(1, TRUE, 1, 0xD); - PrintMysteryMenuText(1, gText_LoadingEvent, 1, 2, 0); - PutWindowTilemap(1); - CopyWindowToVram(1, COPYWIN_FULL); + DrawStdFrameWithCustomTileAndPalette(WIN_LOADING, TRUE, 1, 0xD); + PrintMysteryMenuText(WIN_LOADING, gText_LoadingEvent, 1, 2, 0); + PutWindowTilemap(WIN_LOADING); + CopyWindowToVram(WIN_LOADING, COPYWIN_FULL); gMain.state++; } else if (JOY_NEW(B_BUTTON)) @@ -194,7 +199,7 @@ static void CB2_MysteryEventMenu(void) else { GetEventLoadMessage(gStringVar4, MEVENT_STATUS_LOAD_ERROR); - PrintMysteryMenuText(0, gStringVar4, 1, 2, 1); + PrintMysteryMenuText(WIN_MSG, gStringVar4, 1, 2, 1); gMain.state = 13; } break; @@ -207,19 +212,19 @@ static void CB2_MysteryEventMenu(void) { SetCloseLinkCallback(); GetEventLoadMessage(gStringVar4, MEVENT_STATUS_LOAD_ERROR); - PrintMysteryMenuText(0, gStringVar4, 1, 2, 1); + PrintMysteryMenuText(WIN_MSG, gStringVar4, 1, 2, 1); gMain.state = 13; } else if (CheckLanguageMatch()) { - PrintMysteryMenuText(0, gText_DontRemoveCableTurnOff, 1, 2, 1); + PrintMysteryMenuText(WIN_MSG, gText_DontRemoveCableTurnOff, 1, 2, 1); gMain.state++; } else { CloseLink(); GetEventLoadMessage(gStringVar4, MEVENT_STATUS_LOAD_ERROR); - PrintMysteryMenuText(0, gStringVar4, 1, 2, 1); + PrintMysteryMenuText(WIN_MSG, gStringVar4, 1, 2, 1); gMain.state = 13; } } @@ -232,7 +237,7 @@ static void CB2_MysteryEventMenu(void) } break; case 7: - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(WIN_MSG)) gMain.state++; break; case 8: @@ -260,11 +265,11 @@ static void CB2_MysteryEventMenu(void) } break; case 12: - PrintMysteryMenuText(0, gStringVar4, 1, 2, 1); + PrintMysteryMenuText(WIN_MSG, gStringVar4, 1, 2, 1); gMain.state++; break; case 13: - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(WIN_MSG)) { gMain.state++; sUnused = 0; @@ -287,11 +292,11 @@ static void CB2_MysteryEventMenu(void) break; } - if (gLinkStatus & 0x40 && !IsLinkMaster()) + if (gLinkStatus & LINK_STAT_CONN_ESTABLISHED && !IsLinkMaster()) { CloseLink(); GetEventLoadMessage(gStringVar4, MEVENT_STATUS_LOAD_ERROR); - PrintMysteryMenuText(0, gStringVar4, 1, 2, 1); + PrintMysteryMenuText(WIN_MSG, gStringVar4, 1, 2, 1); gMain.state = 13; } diff --git a/src/mystery_event_script.c b/src/mystery_event_script.c index d1b514a173..b146bbab39 100644 --- a/src/mystery_event_script.c +++ b/src/mystery_event_script.c @@ -293,7 +293,7 @@ bool8 MEScrCmd_givenationaldex(struct ScriptContext *ctx) bool8 MEScrCmd_addrareword(struct ScriptContext *ctx) { - UnlockAdditionalPhrase(ScriptReadByte(ctx)); + UnlockTrendySaying(ScriptReadByte(ctx)); StringExpandPlaceholders(gStringVar4, gText_MysteryEventRareWord); ctx->mStatus = MEVENT_STATUS_SUCCESS; return FALSE; @@ -319,7 +319,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx) void *mailPtr = (void *)(data + sizeof(struct Pokemon)); pokemon = *(struct Pokemon *)pokemonPtr; - species = GetMonData(&pokemon, MON_DATA_SPECIES2); + species = GetMonData(&pokemon, MON_DATA_SPECIES_OR_EGG); if (species == SPECIES_EGG) StringCopyN(gStringVar1, gText_EggNickname, POKEMON_NAME_LENGTH + 1); diff --git a/src/mystery_gift_menu.c b/src/mystery_gift_menu.c index 3ac48822cd..c73f43a568 100644 --- a/src/mystery_gift_menu.c +++ b/src/mystery_gift_menu.c @@ -32,6 +32,12 @@ #include "wonder_news.h" #include "constants/cable_club.h" +enum { + WIN_HEADER, + WIN_MSG, + WIN_UNK, // Cleared, but nothing is ever apparently rendered on it +}; + #define LIST_MENU_TILE_NUM 10 #define LIST_MENU_PAL_NUM BG_PLTT_ID(14) @@ -98,7 +104,7 @@ static const struct BgTemplate sBGTemplates[] = { }; static const struct WindowTemplate sMainWindows[] = { - { + [WIN_HEADER] = { .bg = 0, .tilemapLeft = 0, .tilemapTop = 0, @@ -106,7 +112,8 @@ static const struct WindowTemplate sMainWindows[] = { .height = 2, .paletteNum = 12, .baseBlock = 0x0013 - }, { + }, + [WIN_MSG] = { .bg = 0, .tilemapLeft = 1, .tilemapTop = 15, @@ -114,7 +121,8 @@ static const struct WindowTemplate sMainWindows[] = { .height = 4, .paletteNum = 12, .baseBlock = 0x004f - }, { + }, + [WIN_UNK] = { .bg = 0, .tilemapLeft = 0, .tilemapTop = 15, @@ -224,7 +232,7 @@ static const struct ListMenuTemplate sListMenuTemplate_ThreeOptions = { .itemPrintFunc = NULL, .totalItems = 3, .maxShowed = 3, - .windowId = 0, + .windowId = 0, // Overwritten by DoMysteryGiftListMenu .header_X = 0, .item_X = 8, .cursor_X = 0, @@ -269,7 +277,7 @@ static const struct ListMenuTemplate sListMenu_ReceiveSendToss = { .itemPrintFunc = NULL, .totalItems = 4, .maxShowed = 4, - .windowId = 0, + .windowId = 0, // Overwritten by DoMysteryGiftListMenu .header_X = 0, .item_X = 8, .cursor_X = 0, @@ -290,7 +298,7 @@ static const struct ListMenuTemplate sListMenu_ReceiveToss = { .itemPrintFunc = NULL, .totalItems = 3, .maxShowed = 3, - .windowId = 0, + .windowId = 0, // Overwritten by DoMysteryGiftListMenu .header_X = 0, .item_X = 8, .cursor_X = 0, @@ -311,7 +319,7 @@ static const struct ListMenuTemplate sListMenu_ReceiveSend = { .itemPrintFunc = NULL, .totalItems = 3, .maxShowed = 3, - .windowId = 0, + .windowId = 0, // Overwritten by DoMysteryGiftListMenu .header_X = 0, .item_X = 8, .cursor_X = 0, @@ -332,7 +340,7 @@ static const struct ListMenuTemplate sListMenu_Receive = { .itemPrintFunc = NULL, .totalItems = 2, .maxShowed = 2, - .windowId = 0, + .windowId = 0, // Overwritten by DoMysteryGiftListMenu .header_X = 0, .item_X = 8, .cursor_X = 0, @@ -354,9 +362,9 @@ static const u8 *const sUnusedMenuTexts[] = { gText_ReturnToTitle }; -ALIGNED(2) static const u8 sTextColors_TopMenu[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; -ALIGNED(2) static const u8 sTextColors_TopMenu_Copy[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; -ALIGNED(2) static const u8 sMG_Ereader_TextColor_2[] = { TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY }; +ALIGNED(2) static const u8 sTextColors_Header[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; +ALIGNED(2) static const u8 sTextColors_Header_Copy[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; +ALIGNED(2) static const u8 sMG_Ereader_TextColor_2[] = { TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY }; static void VBlankCB_MysteryGiftEReader(void) { @@ -420,7 +428,7 @@ static bool32 HandleMysteryGiftOrEReaderSetup(s32 isEReader) FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 17); FillBgTilemapBufferRect(2, 0x000, 0, 0, 32, 32, 17); MG_DrawCheckerboardPattern(3); - PrintMysteryGiftOrEReaderTopMenu(isEReader, FALSE); + PrintMysteryGiftOrEReaderHeader(isEReader, FALSE); gMain.state++; break; case 2: @@ -474,26 +482,27 @@ void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void) SetMainCallback2(CB2_InitTitleScreen); } -void PrintMysteryGiftOrEReaderTopMenu(bool8 isEReader, bool32 useCancel) +// Print the text window at the top of the screen with the title and control instructions +void PrintMysteryGiftOrEReaderHeader(bool8 isEReader, bool32 useCancel) { - const u8 *header; + const u8 *title; const u8 *options; - FillWindowPixelBuffer(0, 0); + FillWindowPixelBuffer(WIN_HEADER, 0); if (!isEReader) { - header = gText_MysteryGift; + title = gText_MysteryGift; options = !useCancel ? gText_PickOKExit : gText_PickOKCancel; } else { - header = gJPText_MysteryGift; + title = gJPText_MysteryGift; options = gJPText_DecideStop; } - AddTextPrinterParameterized4(0, FONT_NORMAL, 4, 1, 0, 0, sTextColors_TopMenu, TEXT_SKIP_DRAW, header); - AddTextPrinterParameterized4(0, FONT_SMALL, GetStringRightAlignXOffset(FONT_SMALL, options, 0xDE), 1, 0, 0, sTextColors_TopMenu, TEXT_SKIP_DRAW, options); - CopyWindowToVram(0, COPYWIN_GFX); - PutWindowTilemap(0); + AddTextPrinterParameterized4(WIN_HEADER, FONT_NORMAL, 4, 1, 0, 0, sTextColors_Header, TEXT_SKIP_DRAW, title); + AddTextPrinterParameterized4(WIN_HEADER, FONT_SMALL, GetStringRightAlignXOffset(FONT_SMALL, options, 0xDE), 1, 0, 0, sTextColors_Header, TEXT_SKIP_DRAW, options); + CopyWindowToVram(WIN_HEADER, COPYWIN_GFX); + PutWindowTilemap(WIN_HEADER); } void MG_DrawTextBorder(u8 windowId) @@ -533,21 +542,21 @@ static void ClearScreenInBg0(bool32 ignoreTopTwoRows) CopyBgTilemapBufferToVram(0); } -void AddTextPrinterToWindow1(const u8 *str) +void MG_AddMessageTextPrinter(const u8 *str) { StringExpandPlaceholders(gStringVar4, str); - FillWindowPixelBuffer(1, 0x11); - AddTextPrinterParameterized4(1, FONT_NORMAL, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); - DrawTextBorderOuter(1, 0x001, 0xF); - PutWindowTilemap(1); - CopyWindowToVram(1, COPYWIN_FULL); + FillWindowPixelBuffer(WIN_MSG, 0x11); + AddTextPrinterParameterized4(WIN_MSG, FONT_NORMAL, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); + DrawTextBorderOuter(WIN_MSG, 0x001, 0xF); + PutWindowTilemap(WIN_MSG); + CopyWindowToVram(WIN_MSG, COPYWIN_FULL); } -static void ClearTextWindow(void) +static void ClearMessage(void) { - rbox_fill_rectangle(1); - ClearWindowTilemap(1); - CopyWindowToVram(1, COPYWIN_MAP); + rbox_fill_rectangle(WIN_MSG); + ClearWindowTilemap(WIN_MSG); + CopyWindowToVram(WIN_MSG, COPYWIN_MAP); } #define DOWN_ARROW_X 208 @@ -558,18 +567,18 @@ bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str) switch (*textState) { case 0: - AddTextPrinterToWindow1(str); + MG_AddMessageTextPrinter(str); (*textState)++; break; case 1: - DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); - if (({JOY_NEW(A_BUTTON | B_BUTTON);})) + DrawDownArrow(WIN_MSG, DOWN_ARROW_X, DOWN_ARROW_Y, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); + if (JOY_NEW(A_BUTTON | B_BUTTON)) (*textState)++; break; case 2: - DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); + DrawDownArrow(WIN_MSG, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); *textState = 0; - ClearTextWindow(); + ClearMessage(); return TRUE; case 0xFF: *textState = 2; @@ -580,12 +589,12 @@ bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str) static void HideDownArrow(void) { - DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); + DrawDownArrow(WIN_MSG, DOWN_ARROW_X, DOWN_ARROW_Y, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); } static void ShowDownArrow(void) { - DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); + DrawDownArrow(WIN_MSG, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); } // Unused @@ -609,12 +618,12 @@ static bool32 HideDownArrowAndWaitButton(u8 *textState) static bool32 PrintStringAndWait2Seconds(u8 *counter, const u8 *str) { if (*counter == 0) - AddTextPrinterToWindow1(str); + MG_AddMessageTextPrinter(str); if (++(*counter) > 120) { *counter = 0; - ClearTextWindow(); + ClearMessage(); return TRUE; } else @@ -648,8 +657,8 @@ static u32 MysteryGift_HandleThreeOptionMenu(u8 *unused0, u16 * unused1, u8 whic response = DoMysteryGiftListMenu(&windowTemplate, &listMenuTemplate, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); if (response != LIST_NOTHING_CHOSEN) { - ClearWindowTilemap(2); - CopyWindowToVram(2, COPYWIN_MAP); + ClearWindowTilemap(WIN_UNK); + CopyWindowToVram(WIN_UNK, COPYWIN_MAP); } return response; } @@ -865,7 +874,7 @@ static bool32 SaveOnMysteryGiftMenu(u8 *state) switch (*state) { case 0: - AddTextPrinterToWindow1(gText_DataWillBeSaved); + MG_AddMessageTextPrinter(gText_DataWillBeSaved); (*state)++; break; case 1: @@ -873,7 +882,7 @@ static bool32 SaveOnMysteryGiftMenu(u8 *state) (*state)++; break; case 2: - AddTextPrinterToWindow1(gText_SaveCompletedPressA); + MG_AddMessageTextPrinter(gText_SaveCompletedPressA); (*state)++; break; case 3: @@ -882,7 +891,7 @@ static bool32 SaveOnMysteryGiftMenu(u8 *state) break; case 4: *state = 0; - ClearTextWindow(); + ClearMessage(); return TRUE; } @@ -967,7 +976,7 @@ static bool32 PrintSuccessMessage(u8 *state, const u8 *msg, u16 * timer) { case 0: if (msg != NULL) - AddTextPrinterToWindow1(msg); + MG_AddMessageTextPrinter(msg); PlayFanfare(MUS_OBTAIN_ITEM); *timer = 0; (*state)++; @@ -980,7 +989,7 @@ static bool32 PrintSuccessMessage(u8 *state, const u8 *msg, u16 * timer) if (IsFanfareTaskInactive()) { *state = 0; - ClearTextWindow(); + ClearMessage(); return TRUE; } break; @@ -1161,7 +1170,7 @@ static void Task_MysteryGift(u8 taskId) if (PrintMysteryGiftMenuMessage(&data->textState, gText_DontHaveCardNewOneInput)) { data->state = MG_STATE_SOURCE_PROMPT; - PrintMysteryGiftOrEReaderTopMenu(FALSE, TRUE); + PrintMysteryGiftOrEReaderHeader(FALSE, TRUE); } } else @@ -1169,16 +1178,16 @@ static void Task_MysteryGift(u8 taskId) if (PrintMysteryGiftMenuMessage(&data->textState, gText_DontHaveNewsNewOneInput)) { data->state = MG_STATE_SOURCE_PROMPT; - PrintMysteryGiftOrEReaderTopMenu(FALSE, TRUE); + PrintMysteryGiftOrEReaderHeader(FALSE, TRUE); } } break; } case MG_STATE_SOURCE_PROMPT: if (!data->isWonderNews) - AddTextPrinterToWindow1(gText_WhereShouldCardBeAccessed); + MG_AddMessageTextPrinter(gText_WhereShouldCardBeAccessed); else - AddTextPrinterToWindow1(gText_WhereShouldNewsBeAccessed); + MG_AddMessageTextPrinter(gText_WhereShouldNewsBeAccessed); data->state = MG_STATE_SOURCE_PROMPT_INPUT; break; case MG_STATE_SOURCE_PROMPT_INPUT: @@ -1186,17 +1195,17 @@ static void Task_MysteryGift(u8 taskId) switch (MysteryGift_HandleThreeOptionMenu(&data->textState, &data->var, TRUE)) { case 0: // "Wireless Communication" - ClearTextWindow(); + ClearMessage(); data->state = MG_STATE_CLIENT_LINK_START; data->sourceIsFriend = FALSE; break; case 1: // "Friend" - ClearTextWindow(); + ClearMessage(); data->state = MG_STATE_CLIENT_LINK_START; data->sourceIsFriend = TRUE; break; case LIST_CANCEL: - ClearTextWindow(); + ClearMessage(); if (ValidateCardOrNews(data->isWonderNews)) { data->state = MG_STATE_LOAD_GIFT; @@ -1204,7 +1213,7 @@ static void Task_MysteryGift(u8 taskId) else { data->state = MG_STATE_TO_MAIN_MENU; - PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); + PrintMysteryGiftOrEReaderHeader(FALSE, FALSE); } break; } @@ -1246,7 +1255,7 @@ static void Task_MysteryGift(u8 taskId) } break; case MG_STATE_CLIENT_COMMUNICATING: - AddTextPrinterToWindow1(gText_Communicating); + MG_AddMessageTextPrinter(gText_Communicating); data->state = MG_STATE_CLIENT_LINK; break; case MG_STATE_CLIENT_LINK: @@ -1379,7 +1388,7 @@ static void Task_MysteryGift(u8 taskId) { // Did not receive card/news, return to main menu data->state = MG_STATE_TO_MAIN_MENU; - PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); + PrintMysteryGiftOrEReaderHeader(FALSE, FALSE); } else { @@ -1500,7 +1509,7 @@ static void Task_MysteryGift(u8 taskId) if (PrintThrownAway(&data->textState, data->isWonderNews)) { data->state = MG_STATE_TO_MAIN_MENU; - PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); + PrintMysteryGiftOrEReaderHeader(FALSE, FALSE); } break; case MG_STATE_GIFT_INPUT_EXIT: @@ -1546,12 +1555,12 @@ static void Task_MysteryGift(u8 taskId) if (!data->isWonderNews) { - AddTextPrinterToWindow1(gText_SendingWonderCard); + MG_AddMessageTextPrinter(gText_SendingWonderCard); MysterGiftServer_CreateForCard(); } else { - AddTextPrinterToWindow1(gText_SendingWonderNews); + MG_AddMessageTextPrinter(gText_SendingWonderNews); MysterGiftServer_CreateForNews(); } data->state = MG_STATE_SERVER_LINK; @@ -1586,7 +1595,7 @@ static void Task_MysteryGift(u8 taskId) else { data->state = MG_STATE_TO_MAIN_MENU; - PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); + PrintMysteryGiftOrEReaderHeader(FALSE, FALSE); } } break; @@ -1595,7 +1604,7 @@ static void Task_MysteryGift(u8 taskId) if (PrintMysteryGiftMenuMessage(&data->textState, gText_CommunicationError)) { data->state = MG_STATE_TO_MAIN_MENU; - PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); + PrintMysteryGiftOrEReaderHeader(FALSE, FALSE); } break; case MG_STATE_EXIT: diff --git a/src/mystery_gift_view.c b/src/mystery_gift_view.c index 4ac0489bb2..bc1939adf1 100644 --- a/src/mystery_gift_view.c +++ b/src/mystery_gift_view.c @@ -310,7 +310,7 @@ s32 WonderCard_Exit(bool32 useCancel) FreeMonIconPalettes(); break; case 5: - PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, useCancel); + PrintMysteryGiftOrEReaderHeader(gGiftIsFromEReader, useCancel); CopyBgTilemapBufferToVram(0); BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); break; @@ -785,7 +785,7 @@ s32 WonderNews_Exit(bool32 useCancel) } break; case 5: - PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, useCancel); + PrintMysteryGiftOrEReaderHeader(gGiftIsFromEReader, useCancel); MG_DrawCheckerboardPattern(3); CopyBgTilemapBufferToVram(0); CopyBgTilemapBufferToVram(3); diff --git a/src/overworld.c b/src/overworld.c index 4d3ff83406..2e9959b876 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -156,7 +156,7 @@ static void InitMenuBasedScript(const u8 *); static void LoadCableClubPlayer(s32, s32, struct CableClubPlayer *); static bool32 IsCableClubPlayerUnfrozen(struct CableClubPlayer *); static bool32 CanCableClubPlayerPressStart(struct CableClubPlayer *); -static u8 *TryGetTileEventScript(struct CableClubPlayer *); +static const u8 *TryGetTileEventScript(struct CableClubPlayer *); static bool32 PlayerIsAtSouthExit(struct CableClubPlayer *); static const u8 *TryInteractWithPlayer(struct CableClubPlayer *); static u16 KeyInterCB_DeferToRecvQueue(u32); @@ -401,6 +401,25 @@ void Overworld_ResetStateAfterDigEscRope(void) FlagClear(FLAG_SYS_USE_FLASH); } +#if B_RESET_FLAGS_VARS_AFTER_WHITEOUT == TRUE + void Overworld_ResetBattleFlagsAndVars(void) +{ + #if VAR_TERRAIN != 0 + VarSet(VAR_TERRAIN, 0); + #endif + + #if B_VAR_WILD_AI_FLAGS != 0 + VarSet(B_VAR_WILD_AI_FLAGS,0); + #endif + + FlagClear(B_FLAG_INVERSE_BATTLE); + FlagClear(B_FLAG_FORCE_DOUBLE_WILD); + FlagClear(B_SMART_WILD_AI_FLAG); + FlagClear(B_FLAG_NO_BAG_USE); + FlagClear(B_FLAG_NO_CATCHING); +} +#endif + static void Overworld_ResetStateAfterWhiteOut(void) { ResetInitialPlayerAvatarState(); @@ -409,8 +428,8 @@ static void Overworld_ResetStateAfterWhiteOut(void) FlagClear(FLAG_SYS_SAFARI_MODE); FlagClear(FLAG_SYS_USE_STRENGTH); FlagClear(FLAG_SYS_USE_FLASH); -#if VAR_TERRAIN != 0 - VarSet(VAR_TERRAIN, 0); +#if B_RESET_FLAGS_VARS_AFTER_WHITEOUT == TRUE + Overworld_ResetBattleFlagsAndVars(); #endif // If you were defeated by Kyogre/Groudon and the step counter has // maxed out, end the abnormal weather. @@ -487,7 +506,7 @@ void LoadObjEventTemplatesFromHeader(void) void LoadSaveblockObjEventScripts(void) { - struct ObjectEventTemplate *mapHeaderObjTemplates = gMapHeader.events->objectEvents; + const struct ObjectEventTemplate *mapHeaderObjTemplates = gMapHeader.events->objectEvents; struct ObjectEventTemplate *savObjTemplates = gSaveBlock1Ptr->objectEventTemplates; s32 i; @@ -1109,7 +1128,7 @@ u16 GetCurrLocationDefaultMusic(void) if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ROUTE111) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE111) && GetSavedWeather() == WEATHER_SANDSTORM) - return MUS_ROUTE111; + return MUS_DESERT; music = GetLocationMusic(&gSaveBlock1Ptr->location); if (music != MUS_ROUTE118) @@ -2719,7 +2738,7 @@ static bool32 CanCableClubPlayerPressStart(struct CableClubPlayer *player) return FALSE; } -static u8 *TryGetTileEventScript(struct CableClubPlayer *player) +static const u8 *TryGetTileEventScript(struct CableClubPlayer *player) { if (player->movementMode != MOVEMENT_MODE_SCRIPTED) return FACING_NONE; diff --git a/src/party_menu.c b/src/party_menu.c index 7be838d624..3e0d047649 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -161,14 +161,18 @@ enum { #define MENU_DIR_RIGHT 2 #define MENU_DIR_LEFT -2 -enum -{ +enum { CAN_LEARN_MOVE, CANNOT_LEARN_MOVE, ALREADY_KNOWS_MOVE, CANNOT_LEARN_MOVE_IS_EGG }; +enum { + // Window ids 0-5 are implicitly assigned to each party pokemon in InitPartyMenuBoxes + WIN_MSG = PARTY_SIZE, +}; + struct PartyMenuBoxInfoRects { void (*blitFunc)(u8, u8, u8, u8, u8, bool8); @@ -321,7 +325,7 @@ static void UpdateCurrentPartySelection(s8 *, s8); static void UpdatePartySelectionSingleLayout(s8 *, s8); static void UpdatePartySelectionDoubleLayout(s8 *, s8); static s8 GetNewSlotDoubleLayout(s8, s8); -static void PartyMenuPrintText(const u8 *); +static void PrintMessage(const u8 *); static void Task_PrintAndWaitForText(u8); static bool16 IsMonAllowedInPokemonJump(struct Pokemon *); static bool16 IsMonAllowedInDodrioBerryPicking(struct Pokemon *); @@ -386,8 +390,8 @@ static void Task_DisplayHPRestoredMessage(u8); static u16 ItemEffectToMonEv(struct Pokemon *, u8); static void ItemEffectToStatString(u8, u8 *); static void ReturnToUseOnWhichMon(u8); -static void SetSelectedMoveForPPItem(u8); -static void TryUsePPItem(u8); +static void SetSelectedMoveForItem(u8); +static void TryUseItemOnMove(u8); static void Task_LearnedMove(u8); static void Task_ReplaceMoveYesNo(u8); static void Task_DoLearnedMoveFanfareAfterText(u8); @@ -476,6 +480,9 @@ static bool8 SetUpFieldMove_Fly(void); static bool8 SetUpFieldMove_Waterfall(void); static bool8 SetUpFieldMove_Dive(void); void TryItemHoldFormChange(struct Pokemon *mon); +static void ShowMoveSelectWindow(u8 slot); +static void Task_HandleWhichMoveInput(u8 taskId); +static bool32 CannotUsePartyBattleItem(u16 itemId, struct Pokemon* mon); // static const data #include "data/party_menu.h" @@ -1350,6 +1357,24 @@ static void HandleChooseMonSelection(u8 taskId, s8 *slotPtr) TryEnterMonForMinigame(taskId, (u8)*slotPtr); } break; + case PARTY_ACTION_CHOOSE_FAINTED_MON: + { + u8 partyId = GetPartyIdFromBattleSlot((u8)*slotPtr); + if (GetMonData(&gPlayerParty[*slotPtr], MON_DATA_HP) > 0 + || GetMonData(&gPlayerParty[*slotPtr], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG + || ((gBattleTypeFlags & BATTLE_TYPE_MULTI) && partyId >= (PARTY_SIZE / 2))) + { + // Can't select if egg, alive, or doesn't belong to you + PlaySE(SE_FAILURE); + } + else + { + PlaySE(SE_SELECT); + gSelectedMonPartyId = partyId; + Task_ClosePartyMenu(taskId); + } + break; + } default: case PARTY_ACTION_ABILITY_PREVENTS: case PARTY_ACTION_SWITCHING: @@ -1375,6 +1400,7 @@ static void HandleChooseMonCancel(u8 taskId, s8 *slotPtr) switch (gPartyMenu.action) { case PARTY_ACTION_SEND_OUT: + case PARTY_ACTION_CHOOSE_FAINTED_MON: PlaySE(SE_FAILURE); break; case PARTY_ACTION_SWITCH: @@ -1702,7 +1728,7 @@ u8 DisplayPartyMenuMessage(const u8 *str, bool8 keepOpen) { u8 taskId; - PartyMenuPrintText(str); + PrintMessage(str); taskId = CreateTask(Task_PrintAndWaitForText, 1); gTasks[taskId].tKeepOpen = keepOpen; return taskId; @@ -1710,12 +1736,12 @@ u8 DisplayPartyMenuMessage(const u8 *str, bool8 keepOpen) static void Task_PrintAndWaitForText(u8 taskId) { - if (RunTextPrintersRetIsActive(6) != TRUE) + if (RunTextPrintersRetIsActive(WIN_MSG) != TRUE) { if (gTasks[taskId].tKeepOpen == FALSE) { - ClearStdWindowAndFrameToTransparent(6, FALSE); - ClearWindowTilemap(6); + ClearStdWindowAndFrameToTransparent(WIN_MSG, FALSE); + ClearWindowTilemap(WIN_MSG); } DestroyTask(taskId); } @@ -1741,8 +1767,8 @@ static void Task_ReturnToChooseMonAfterText(u8 taskId) { if (IsPartyMenuTextPrinterActive() != TRUE) { - ClearStdWindowAndFrameToTransparent(6, FALSE); - ClearWindowTilemap(6); + ClearStdWindowAndFrameToTransparent(WIN_MSG, FALSE); + ClearWindowTilemap(WIN_MSG); if (MenuHelpers_IsLinkActive() == TRUE) { gTasks[taskId].func = Task_WaitForLinkAndReturnToChooseMon; @@ -2031,7 +2057,7 @@ static u8 CanTeachMove(struct Pokemon *mon, u16 move) { if (GetMonData(mon, MON_DATA_IS_EGG)) return CANNOT_LEARN_MOVE_IS_EGG; - else if (!CanLearnTeachableMove(GetMonData(mon, MON_DATA_SPECIES2), move)) + else if (!CanLearnTeachableMove(GetMonData(mon, MON_DATA_SPECIES_OR_EGG), move)) return CANNOT_LEARN_MOVE; else if (MonKnowsMove(mon, move) == TRUE) return ALREADY_KNOWS_MOVE; @@ -2550,11 +2576,11 @@ static u8 DisplaySelectionWindow(u8 windowType) return sPartyMenuInternal->windowId[0]; } -static void PartyMenuPrintText(const u8 *text) +static void PrintMessage(const u8 *text) { - DrawStdFrameWithCustomTileAndPalette(6, FALSE, 0x4F, 13); + DrawStdFrameWithCustomTileAndPalette(WIN_MSG, FALSE, 0x4F, 13); gTextFlags.canABSpeedUpPrint = TRUE; - AddTextPrinterParameterized2(6, FONT_NORMAL, text, GetPlayerTextSpeedDelay(), 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(WIN_MSG, FONT_NORMAL, text, GetPlayerTextSpeedDelay(), 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } static void PartyMenuDisplayYesNoMenu(void) @@ -3580,11 +3606,11 @@ static void CursorCb_Store(u8 taskId) // Register mon for the Trading Board in Union Room static void CursorCb_Register(u8 taskId) { - u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2); + u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES_OR_EGG); u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES); - u8 isEventLegal = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_EVENT_LEGAL); + u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MODERN_FATEFUL_ENCOUNTER); - switch (CanRegisterMonForTradingBoard(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), species2, species, isEventLegal)) + switch (CanRegisterMonForTradingBoard(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), species2, species, isModernFatefulEncounter)) { case CANT_REGISTER_MON_NOW: StringExpandPlaceholders(gStringVar4, gText_PkmnCantBeTradedNow); @@ -3610,10 +3636,10 @@ static void CursorCb_Register(u8 taskId) static void CursorCb_Trade1(u8 taskId) { - u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2); + u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES_OR_EGG); u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES); - u8 isEventLegal = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_EVENT_LEGAL); - u32 stringId = GetUnionRoomTradeMessageId(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), gRfuPartnerCompatibilityData, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isEventLegal); + u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MODERN_FATEFUL_ENCOUNTER); + u32 stringId = GetUnionRoomTradeMessageId(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), gRfuPartnerCompatibilityData, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isModernFatefulEncounter); if (stringId != UR_TRADE_MSG_NONE) { @@ -3919,7 +3945,7 @@ static void CreatePartyMonIconSprite(struct Pokemon *mon, struct PartyMenuBox *m { u16 species2; - species2 = GetMonData(mon, MON_DATA_SPECIES2); + species2 = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); CreatePartyMonIconSpriteParameterized(species2, GetMonData(mon, MON_DATA_PERSONALITY), menuBox, 1); UpdatePartyMonHPBar(menuBox->monSpriteId, mon); } @@ -4278,12 +4304,10 @@ static void Task_SetSacredAshCB(u8 taskId) static bool8 IsHPRecoveryItem(u16 item) { - const u8 *effect; + const u8 *effect = GetItemEffect(item); - if (item == ITEM_ENIGMA_BERRY_E_READER) - effect = gSaveBlock1Ptr->enigmaBerry.itemEffect; - else - effect = gItemEffectTable[item - ITEM_POTION]; + if (effect == NULL) + return FALSE; if (effect[4] & ITEM4_HEAL_HP) return TRUE; @@ -4370,18 +4394,94 @@ static bool8 IsItemFlute(u16 item) return FALSE; } -static bool8 ExecuteTableBasedItemEffect_(u8 partyMonIndex, u16 item, u8 monMoveIndex) +static bool32 CannotUsePartyBattleItem(u16 itemId, struct Pokemon* mon) { - if (gMain.inBattle) + u8 i; + u8 cannotUse = FALSE; + u16 battleUsage = ItemId_GetBattleUsage(itemId); + u16 hp = GetMonData(mon, MON_DATA_HP); + + // Embargo Check + if ((gPartyMenu.slotId == 0 && gStatuses3[B_POSITION_PLAYER_LEFT] & STATUS3_EMBARGO) + || (gPartyMenu.slotId == 1 && gStatuses3[B_POSITION_PLAYER_RIGHT] & STATUS3_EMBARGO)) { - if ((partyMonIndex == 0 && gStatuses3[B_POSITION_PLAYER_LEFT] & STATUS3_EMBARGO) - || (partyMonIndex == 1 && gStatuses3[B_POSITION_PLAYER_RIGHT] & STATUS3_EMBARGO)) - return TRUE; // cannot use on this mon - else - return ExecuteTableBasedItemEffect(&gPlayerParty[partyMonIndex], item, GetPartyIdFromBattleSlot(partyMonIndex), monMoveIndex); + return FALSE; + } + // Items that restore HP (Potions, Sitrus Berry, etc.) + if (battleUsage == EFFECT_ITEM_RESTORE_HP && (hp == 0 || hp == GetMonData(mon, MON_DATA_MAX_HP))) + { + cannotUse++; + } + // Items that cure status (Burn Heal, Awakening, etc.) + if (battleUsage == EFFECT_ITEM_CURE_STATUS + && !((GetMonData(mon, MON_DATA_STATUS) & GetItemStatus1Mask(itemId)) + || (gPartyMenu.slotId == 0 && gBattleMons[gBattlerInMenuId].status2 & GetItemStatus2Mask(itemId)))) + { + cannotUse++; + } + // Items that restore HP and cure status (Full Restore) + if (battleUsage == EFFECT_ITEM_HEAL_AND_CURE_STATUS + && (hp == 0 || hp == GetMonData(mon, MON_DATA_MAX_HP)) + && !((GetMonData(mon, MON_DATA_STATUS) & GetItemStatus1Mask(itemId)) + || (gPartyMenu.slotId == 0 && gBattleMons[gBattlerInMenuId].status2 & GetItemStatus2Mask(itemId)))) + { + cannotUse++; + } + // Items that revive a party member + if (battleUsage == EFFECT_ITEM_REVIVE && hp != 0) + { + cannotUse++; + } + // Items that restore PP (Elixir, Ether, Leppa Berry) + if (battleUsage == EFFECT_ITEM_RESTORE_PP) + { + if (GetItemEffect(itemId)[6] == ITEM4_HEAL_PP) + { + for (i = 0; i < MAX_MON_MOVES; i++) + { + if (GetMonData(mon, MON_DATA_PP1 + i) < CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + i), GetMonData(mon, MON_DATA_PP_BONUSES), i)); + break; + } + if (i == MAX_MON_MOVES) + cannotUse++; + } + else if (GetMonData(mon, MON_DATA_PP1 + gPartyMenu.data1) == CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + gPartyMenu.data1), GetMonData(mon, MON_DATA_PP_BONUSES), gPartyMenu.data1)) + { + cannotUse++; + } + } + return cannotUse; +} + +// Battle scripts called in HandleAction_UseItem +void ItemUseCB_BattleScript(u8 taskId, TaskFunc task) +{ + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; + if (CannotUsePartyBattleItem(gSpecialVar_ItemId, mon)) + { + gPartyMenuUseExitCallback = FALSE; + PlaySE(SE_SELECT); + DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); + ScheduleBgCopyTilemapToVram(2); + gTasks[taskId].func = task; } else - return ExecuteTableBasedItemEffect(&gPlayerParty[partyMonIndex], item, partyMonIndex, monMoveIndex); + { + gBattleStruct->itemPartyIndex[gBattlerInMenuId] = GetPartyIdFromBattleSlot(gPartyMenu.slotId); + gPartyMenuUseExitCallback = TRUE; + PlaySE(SE_SELECT); + RemoveBagItem(gSpecialVar_ItemId, 1); + ScheduleBgCopyTilemapToVram(2); + gTasks[taskId].func = task; + } +} + +void ItemUseCB_BattleChooseMove(u8 taskId, TaskFunc task) +{ + PlaySE(SE_SELECT); + DisplayPartyMenuStdMessage(PARTY_MSG_RESTORE_WHICH_MOVE); + ShowMoveSelectWindow(gPartyMenu.slotId); + gTasks[taskId].func = Task_HandleWhichMoveInput; } void ItemUseCB_Medicine(u8 taskId, TaskFunc task) @@ -4404,7 +4504,7 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task) if (hp == GetMonData(mon, MON_DATA_MAX_HP)) canHeal = FALSE; } - cannotUse = ExecuteTableBasedItemEffect_(gPartyMenu.slotId, item, 0); + cannotUse = ExecuteTableBasedItemEffect(mon, item, gPartyMenu.slotId, 0); } if (cannotUse != FALSE) @@ -4665,7 +4765,7 @@ void ItemUseCB_ReduceEV(u8 taskId, TaskFunc task) u8 effectType = GetItemEffectType(item); u16 friendship = GetMonData(mon, MON_DATA_FRIENDSHIP); u16 ev = ItemEffectToMonEv(mon, effectType); - bool8 cannotUseEffect = ExecuteTableBasedItemEffect_(gPartyMenu.slotId, item, 0); + bool8 cannotUseEffect = ExecuteTableBasedItemEffect(mon, item, gPartyMenu.slotId, 0); u16 newFriendship = GetMonData(mon, MON_DATA_FRIENDSHIP); u16 newEv = ItemEffectToMonEv(mon, effectType); @@ -4781,25 +4881,19 @@ static void Task_HandleWhichMoveInput(u8 taskId) else { PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); - SetSelectedMoveForPPItem(taskId); + SetSelectedMoveForItem(taskId); } } } void ItemUseCB_PPRecovery(u8 taskId, TaskFunc task) { - const u8 *effect; - u16 item = gSpecialVar_ItemId; + const u8 *effect = GetItemEffect(gSpecialVar_ItemId); - if (item == ITEM_ENIGMA_BERRY_E_READER) - effect = gSaveBlock1Ptr->enigmaBerry.itemEffect; - else - effect = gItemEffectTable[item - ITEM_POTION]; - - if (!(effect[4] & ITEM4_HEAL_PP_ONE)) + if (effect == NULL || !(effect[4] & ITEM4_HEAL_PP_ONE)) { gPartyMenu.data1 = 0; - TryUsePPItem(taskId); + TryUseItemOnMove(taskId); } else { @@ -4810,11 +4904,11 @@ void ItemUseCB_PPRecovery(u8 taskId, TaskFunc task) } } -static void SetSelectedMoveForPPItem(u8 taskId) +static void SetSelectedMoveForItem(u8 taskId) { PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); gPartyMenu.data1 = Menu_GetCursorPos(); - TryUsePPItem(taskId); + TryUseItemOnMove(taskId); } static void ReturnToUseOnWhichMon(u8 taskId) @@ -4825,34 +4919,58 @@ static void ReturnToUseOnWhichMon(u8 taskId) DisplayPartyMenuStdMessage(PARTY_MSG_USE_ON_WHICH_MON); } -static void TryUsePPItem(u8 taskId) +static void TryUseItemOnMove(u8 taskId) { - u16 move = MOVE_NONE; - s16 *moveSlot = &gPartyMenu.data1; - u16 item = gSpecialVar_ItemId; struct PartyMenu *ptr = &gPartyMenu; - struct Pokemon *mon; - - if (ExecuteTableBasedItemEffect_(ptr->slotId, item, *moveSlot)) + struct Pokemon *mon = &gPlayerParty[ptr->slotId]; + // In battle, set appropriate variables to be used in battle script. + if (gMain.inBattle) { - gPartyMenuUseExitCallback = FALSE; - PlaySE(SE_SELECT); - DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); - ScheduleBgCopyTilemapToVram(2); - gTasks[taskId].func = Task_ClosePartyMenuAfterText; + if (CannotUsePartyBattleItem(gSpecialVar_ItemId, mon)) + { + gPartyMenuUseExitCallback = FALSE; + PlaySE(SE_SELECT); + DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); + ScheduleBgCopyTilemapToVram(2); + gTasks[taskId].func = Task_ClosePartyMenuAfterText; + } + else + { + gBattleStruct->itemPartyIndex[gBattlerInMenuId] = GetPartyIdFromBattleSlot(gPartyMenu.slotId); + gChosenMovePos = ptr->data1; + gPartyMenuUseExitCallback = TRUE; + RemoveBagItem(gSpecialVar_ItemId, 1); + ScheduleBgCopyTilemapToVram(2); + gTasks[taskId].func = Task_ClosePartyMenuAfterText; + } } + // Outside of battle, only PP items are used on moves. else { - gPartyMenuUseExitCallback = TRUE; - mon = &gPlayerParty[ptr->slotId]; - PlaySE(SE_USE_ITEM); - RemoveBagItem(item, 1); - move = GetMonData(mon, MON_DATA_MOVE1 + *moveSlot); - StringCopy(gStringVar1, gMoveNames[move]); - GetMedicineItemEffectMessage(item); - DisplayPartyMenuMessage(gStringVar4, TRUE); - ScheduleBgCopyTilemapToVram(2); - gTasks[taskId].func = Task_ClosePartyMenuAfterText; + u16 move = MOVE_NONE; + s16 *moveSlot = &gPartyMenu.data1; + u16 item = gSpecialVar_ItemId; + + if (ExecuteTableBasedItemEffect(mon, item, ptr->slotId, *moveSlot)) + { + gPartyMenuUseExitCallback = FALSE; + PlaySE(SE_SELECT); + DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); + ScheduleBgCopyTilemapToVram(2); + gTasks[taskId].func = Task_ClosePartyMenuAfterText; + } + else + { + gPartyMenuUseExitCallback = TRUE; + PlaySE(SE_USE_ITEM); + RemoveBagItem(item, 1); + move = GetMonData(mon, MON_DATA_MOVE1 + *moveSlot); + StringCopy(gStringVar1, gMoveNames[move]); + GetMedicineItemEffectMessage(item); + DisplayPartyMenuMessage(gStringVar4, TRUE); + ScheduleBgCopyTilemapToVram(2); + gTasks[taskId].func = Task_ClosePartyMenuAfterText; + } } } @@ -4966,7 +5084,7 @@ static void Task_LearnedMove(u8 taskId) if (move[1] == 0) { AdjustFriendship(mon, FRIENDSHIP_EVENT_LEARN_TMHM); - if (item < ITEM_HM01_CUT) + if (!ItemId_GetImportance(item)) RemoveBagItem(item, 1); } GetMonNickname(mon, gStringVar1); @@ -5161,13 +5279,12 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task) u16 *itemPtr = &gSpecialVar_ItemId; bool8 cannotUseEffect; u8 holdEffectParam = ItemId_GetHoldEffectParam(*itemPtr); - u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVO_MODE_NORMAL, ITEM_NONE, NULL); sInitialLevel = GetMonData(mon, MON_DATA_LEVEL); if (sInitialLevel != MAX_LEVEL) { BufferMonStatsToTaskData(mon, arrayPtr); - cannotUseEffect = ExecuteTableBasedItemEffect_(gPartyMenu.slotId, *itemPtr, 0); + cannotUseEffect = ExecuteTableBasedItemEffect(mon, *itemPtr, gPartyMenu.slotId, 0); BufferMonStatsToTaskData(mon, &ptr->data[NUM_STATS]); } else @@ -5177,10 +5294,22 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task) PlaySE(SE_SELECT); if (cannotUseEffect) { - if (targetSpecies != SPECIES_NONE && holdEffectParam == 0) + u16 targetSpecies = SPECIES_NONE; + + // Resets values to 0 so other means of teaching moves doesn't overwrite levels + sInitialLevel = 0; + sFinalLevel = 0; + + if (holdEffectParam == 0) + targetSpecies = GetEvolutionTargetSpecies(mon, EVO_MODE_NORMAL, ITEM_NONE, NULL); + + if (targetSpecies != SPECIES_NONE) { - PartyMenuTryEvolution(taskId); RemoveBagItem(gSpecialVar_ItemId, 1); + FreePartyPointers(); + gCB2_AfterEvolution = gPartyMenu.exitCallback; + BeginEvolutionScene(mon, targetSpecies, TRUE, gPartyMenu.slotId); + DestroyTask(taskId); } else { @@ -5422,7 +5551,7 @@ static void UseSacredAsh(u8 taskId) } hp = GetMonData(mon, MON_DATA_HP); - if (ExecuteTableBasedItemEffect_(gPartyMenu.slotId, gSpecialVar_ItemId, 0)) + if (ExecuteTableBasedItemEffect(mon, gSpecialVar_ItemId, gPartyMenu.slotId, 0)) { gTasks[taskId].func = Task_SacredAshLoop; return; @@ -5489,7 +5618,7 @@ void ItemUseCB_EvolutionStone(u8 taskId, TaskFunc task) { PlaySE(SE_SELECT); gCB2_AfterEvolution = gPartyMenu.exitCallback; - if (ExecuteTableBasedItemEffect_(gPartyMenu.slotId, gSpecialVar_ItemId, 0)) + if (ExecuteTableBasedItemEffect(&gPlayerParty[gPartyMenu.slotId], gSpecialVar_ItemId, gPartyMenu.slotId, 0)) { gPartyMenuUseExitCallback = FALSE; DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE); @@ -5498,7 +5627,8 @@ void ItemUseCB_EvolutionStone(u8 taskId, TaskFunc task) } else { - RemoveBagItem(gSpecialVar_ItemId, 1); + if (ItemId_GetPocket(gSpecialVar_ItemId) != POCKET_KEY_ITEMS) + RemoveBagItem(gSpecialVar_ItemId, 1); FreePartyPointers(); } } @@ -5653,20 +5783,22 @@ void TryItemHoldFormChange(struct Pokemon *mon) #undef tAnimWait #undef tNextFunc +const u8* GetItemEffect(u16 item) +{ + if (item == ITEM_ENIGMA_BERRY_E_READER) + return gSaveBlock1Ptr->enigmaBerry.itemEffect; + else + return gItemEffectTable[item]; +} + u8 GetItemEffectType(u16 item) { - const u8 *itemEffect; u32 statusCure; + const u8 *itemEffect = GetItemEffect(item); - if (!ITEM_HAS_EFFECT(item)) + if (itemEffect == NULL) return ITEM_EFFECT_NONE; - // Read the item's effect properties. - if (item == ITEM_ENIGMA_BERRY_E_READER) - itemEffect = gSaveBlock1Ptr->enigmaBerry.itemEffect; - else - itemEffect = gItemEffectTable[item - ITEM_POTION]; - if ((itemEffect[0] & ITEM0_DIRE_HIT) || itemEffect[1] || (itemEffect[3] & ITEM3_GUARD_SPEC)) return ITEM_EFFECT_X_ITEM; else if (itemEffect[0] & ITEM0_SACRED_ASH) diff --git a/src/pokeblock.c b/src/pokeblock.c index 3f0b3b5c5f..e490f372c4 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -765,7 +765,7 @@ static void DrawPokeblockInfo(s32 pkblId) struct Pokeblock *pokeblock; u16 rectTilemapSrc[2]; - FillWindowPixelBuffer(7, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_FEEL, PIXEL_FILL(0)); if (pkblId != LIST_CANCEL) { @@ -802,7 +802,7 @@ static void DrawPokeblockInfo(s32 pkblId) for (i = 0; i < FLAVOR_COUNT; i++) CopyToBgTilemapBufferRect(2, rectTilemapSrc, (i / 3 * 6) + 1, (i % 3 * 2) + 13, 1, 2); - CopyWindowToVram(7, COPYWIN_GFX); + CopyWindowToVram(WIN_FEEL, COPYWIN_GFX); } ScheduleBgCopyTilemapToVram(0); diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index 9a7ce414d6..7b61eec478 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -725,14 +725,14 @@ static bool8 LoadMonAndSceneGfx(struct Pokemon *mon) { case 0: // Load mon gfx - species = GetMonData(mon, MON_DATA_SPECIES2); + species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); personality = GetMonData(mon, MON_DATA_PERSONALITY); HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality); sPokeblockFeed->loadGfxState++; break; case 1: // Load mon palette - species = GetMonData(mon, MON_DATA_SPECIES2); + species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); personality = GetMonData(mon, MON_DATA_PERSONALITY); trainerId = GetMonData(mon, MON_DATA_OT_ID); palette = GetMonSpritePalStructFromOtIdPersonality(species, trainerId, personality); @@ -907,7 +907,7 @@ static void Task_FadeOutPokeblockFeed(u8 taskId) static u8 CreateMonSprite(struct Pokemon *mon) { - u16 species = GetMonData(mon, MON_DATA_SPECIES2); + u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); u8 spriteId = CreateSprite(&gMultiuseSpriteTemplate, MON_X, MON_Y, 2); sPokeblockFeed->species = species; diff --git a/src/pokemon.c b/src/pokemon.c index 71dcb5bcbc..e82cb98c30 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1670,6 +1670,7 @@ static const u16 sSpeciesToNationalPokedexNum[NUM_SPECIES - 1] = [SPECIES_CALYREX_ICE_RIDER - 1] = NATIONAL_DEX_CALYREX, [SPECIES_CALYREX_SHADOW_RIDER - 1] = NATIONAL_DEX_CALYREX, [SPECIES_ENAMORUS_THERIAN - 1] = NATIONAL_DEX_ENAMORUS, + [SPECIES_BASCULEGION_FEMALE - 1] = NATIONAL_DEX_BASCULEGION, #endif }; @@ -1918,33 +1919,32 @@ const struct SpindaSpot gSpindaSpotGraphics[] = #include "data/pokemon/item_effects.h" const s8 gNatureStatTable[NUM_NATURES][NUM_NATURE_STATS] = -{ - // Atk Def Spd Sp.Atk Sp.Def - [NATURE_HARDY] = { 0, 0, 0, 0, 0}, - [NATURE_LONELY] = { +1, -1, 0, 0, 0}, - [NATURE_BRAVE] = { +1, 0, -1, 0, 0}, - [NATURE_ADAMANT] = { +1, 0, 0, -1, 0}, - [NATURE_NAUGHTY] = { +1, 0, 0, 0, -1}, - [NATURE_BOLD] = { -1, +1, 0, 0, 0}, - [NATURE_DOCILE] = { 0, 0, 0, 0, 0}, - [NATURE_RELAXED] = { 0, +1, -1, 0, 0}, - [NATURE_IMPISH] = { 0, +1, 0, -1, 0}, - [NATURE_LAX] = { 0, +1, 0, 0, -1}, - [NATURE_TIMID] = { -1, 0, +1, 0, 0}, - [NATURE_HASTY] = { 0, -1, +1, 0, 0}, - [NATURE_SERIOUS] = { 0, 0, 0, 0, 0}, - [NATURE_JOLLY] = { 0, 0, +1, -1, 0}, - [NATURE_NAIVE] = { 0, 0, +1, 0, -1}, - [NATURE_MODEST] = { -1, 0, 0, +1, 0}, - [NATURE_MILD] = { 0, -1, 0, +1, 0}, - [NATURE_QUIET] = { 0, 0, -1, +1, 0}, - [NATURE_BASHFUL] = { 0, 0, 0, 0, 0}, - [NATURE_RASH] = { 0, 0, 0, +1, -1}, - [NATURE_CALM] = { -1, 0, 0, 0, +1}, - [NATURE_GENTLE] = { 0, -1, 0, 0, +1}, - [NATURE_SASSY] = { 0, 0, -1, 0, +1}, - [NATURE_CAREFUL] = { 0, 0, 0, -1, +1}, - [NATURE_QUIRKY] = { 0, 0, 0, 0, 0}, +{ // Attack Defense Speed Sp.Atk Sp. Def + [NATURE_HARDY] = { 0, 0, 0, 0, 0 }, + [NATURE_LONELY] = { +1, -1, 0, 0, 0 }, + [NATURE_BRAVE] = { +1, 0, -1, 0, 0 }, + [NATURE_ADAMANT] = { +1, 0, 0, -1, 0 }, + [NATURE_NAUGHTY] = { +1, 0, 0, 0, -1 }, + [NATURE_BOLD] = { -1, +1, 0, 0, 0 }, + [NATURE_DOCILE] = { 0, 0, 0, 0, 0 }, + [NATURE_RELAXED] = { 0, +1, -1, 0, 0 }, + [NATURE_IMPISH] = { 0, +1, 0, -1, 0 }, + [NATURE_LAX] = { 0, +1, 0, 0, -1 }, + [NATURE_TIMID] = { -1, 0, +1, 0, 0 }, + [NATURE_HASTY] = { 0, -1, +1, 0, 0 }, + [NATURE_SERIOUS] = { 0, 0, 0, 0, 0 }, + [NATURE_JOLLY] = { 0, 0, +1, -1, 0 }, + [NATURE_NAIVE] = { 0, 0, +1, 0, -1 }, + [NATURE_MODEST] = { -1, 0, 0, +1, 0 }, + [NATURE_MILD] = { 0, -1, 0, +1, 0 }, + [NATURE_QUIET] = { 0, 0, -1, +1, 0 }, + [NATURE_BASHFUL] = { 0, 0, 0, 0, 0 }, + [NATURE_RASH] = { 0, 0, 0, +1, -1 }, + [NATURE_CALM] = { -1, 0, 0, 0, +1 }, + [NATURE_GENTLE] = { 0, -1, 0, 0, +1 }, + [NATURE_SASSY] = { 0, 0, -1, 0, +1 }, + [NATURE_CAREFUL] = { 0, 0, 0, -1, +1 }, + [NATURE_QUIRKY] = { 0, 0, 0, 0, 0 }, }; #include "data/pokemon/trainer_class_lookups.h" @@ -3938,12 +3938,12 @@ void ConvertPokemonToBattleTowerPokemon(struct Pokemon *mon, struct BattleTowerP GetMonData(mon, MON_DATA_NICKNAME, dest->nickname); } -void CreateEventLegalMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId) +static void CreateEventMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId) { - bool32 isEventLegal = TRUE; + bool32 isModernFatefulEncounter = TRUE; CreateMon(mon, species, level, fixedIV, hasFixedPersonality, fixedPersonality, otIdType, fixedOtId); - SetMonData(mon, MON_DATA_EVENT_LEGAL, &isEventLegal); + SetMonData(mon, MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter); } // If FALSE, should load this game's Deoxys form. If TRUE, should load normal Deoxys form @@ -4033,14 +4033,14 @@ u16 GetUnionRoomTrainerClass(void) return gFacilityClassToTrainerClass[gUnionRoomFacilityClasses[arrId]]; } -void CreateEventLegalEnemyMon(void) +void CreateEnemyEventMon(void) { s32 species = gSpecialVar_0x8004; s32 level = gSpecialVar_0x8005; s32 itemId = gSpecialVar_0x8006; ZeroEnemyPartyMons(); - CreateEventLegalMon(&gEnemyParty[0], species, level, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0); + CreateEventMon(&gEnemyParty[0], species, level, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0); if (itemId) { u8 heldItem[2]; @@ -4939,10 +4939,10 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) case MON_DATA_UNUSED_RIBBONS: retVal = substruct3->unusedRibbons; break; - case MON_DATA_EVENT_LEGAL: - retVal = substruct3->eventLegal; + case MON_DATA_MODERN_FATEFUL_ENCOUNTER: + retVal = substruct3->modernFatefulEncounter; break; - case MON_DATA_SPECIES2: + case MON_DATA_SPECIES_OR_EGG: retVal = substruct0->species; if (substruct0->species && (substruct3->isEgg || boxMon->isBadEgg)) retVal = SPECIES_EGG; @@ -5069,7 +5069,7 @@ void SetMonData(struct Pokemon *mon, s32 field, const void *dataArg) case MON_DATA_MAIL: SET8(mon->mail); break; - case MON_DATA_SPECIES2: + case MON_DATA_SPECIES_OR_EGG: break; default: SetBoxMonData(&mon->box, field, data); @@ -5323,8 +5323,8 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) case MON_DATA_UNUSED_RIBBONS: SET8(substruct3->unusedRibbons); break; - case MON_DATA_EVENT_LEGAL: - SET8(substruct3->eventLegal); + case MON_DATA_MODERN_FATEFUL_ENCOUNTER: + SET8(substruct3->modernFatefulEncounter); break; case MON_DATA_IVS: { @@ -5446,9 +5446,9 @@ u8 GetMonsStateToDoubles(void) for (i = 0; i < gPlayerPartyCount; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_EGG && GetMonData(&gPlayerParty[i], MON_DATA_HP, NULL) != 0 - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_NONE) + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_NONE) aliveCount++; } @@ -5462,7 +5462,7 @@ u8 GetMonsStateToDoubles_2(void) for (i = 0; i < PARTY_SIZE; i++) { - u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL); + u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL); if (species != SPECIES_EGG && species != SPECIES_NONE && GetMonData(&gPlayerParty[i], MON_DATA_HP, NULL) != 0) aliveCount++; @@ -5736,57 +5736,16 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov // Get item hold effect heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); if (heldItem == ITEM_ENIGMA_BERRY_E_READER) - { - if (gMain.inBattle) - holdEffect = gEnigmaBerries[gBattlerInMenuId].holdEffect; - else - holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; - } + holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; else - { holdEffect = ItemId_GetHoldEffect(heldItem); - } - - // Get battler id (if relevant) - gPotentialItemEffectBattler = gBattlerInMenuId; - if (gMain.inBattle) - { - gActiveBattler = gBattlerInMenuId; - i = (GetBattlerSide(gActiveBattler) != B_SIDE_PLAYER); - while (i < gBattlersCount) - { - if (gBattlerPartyIndexes[i] == partyIndex) - { - battlerId = i; - break; - } - i += 2; - } - } - else - { - gActiveBattler = 0; - battlerId = MAX_BATTLERS_COUNT; - } // Skip using the item if it won't do anything - if (!ITEM_HAS_EFFECT(item)) - return TRUE; - if (gItemEffectTable[item - ITEM_POTION] == NULL && item != ITEM_ENIGMA_BERRY_E_READER) + if (gItemEffectTable[item] == NULL && item != ITEM_ENIGMA_BERRY_E_READER) return TRUE; // Get item effect - if (item == ITEM_ENIGMA_BERRY_E_READER) - { - if (gMain.inBattle) - itemEffect = gEnigmaBerries[gActiveBattler].itemEffect; - else - itemEffect = gSaveBlock1Ptr->enigmaBerry.itemEffect; - } - else - { - itemEffect = gItemEffectTable[item - ITEM_POTION]; - } + itemEffect = GetItemEffect(item); // Do item effect for (i = 0; i < ITEM_EFFECT_ARG_START; i++) @@ -5795,85 +5754,13 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov { // Handle ITEM0 effects (infatuation, Dire Hit, X Attack). ITEM0_SACRED_ASH is handled in party_menu.c + // Now handled in item battle scripts. case 0: - // Cure infatuation - if ((itemEffect[i] & ITEM0_INFATUATION) - && gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && (gBattleMons[battlerId].status2 & STATUS2_INFATUATION)) - { - gBattleMons[battlerId].status2 &= ~STATUS2_INFATUATION; - retVal = FALSE; - } - - // Dire Hit - if ((itemEffect[i] & ITEM0_DIRE_HIT) - && !(gBattleMons[gActiveBattler].status2 & STATUS2_FOCUS_ENERGY)) - { - gBattleMons[gActiveBattler].status2 |= STATUS2_FOCUS_ENERGY; - retVal = FALSE; - } break; // Handle ITEM1 effects (in-battle stat boosting effects) + // Now handled in item battle scripts. case 1: - // X Attack - if ((itemEffect[i] & ITEM1_X_ATTACK) - && gBattleMons[gActiveBattler].statStages[STAT_ATK] < MAX_STAT_STAGE) - { - gBattleMons[gActiveBattler].statStages[STAT_ATK] += X_ITEM_STAGES; - if (gBattleMons[gActiveBattler].statStages[STAT_ATK] > MAX_STAT_STAGE) - gBattleMons[gActiveBattler].statStages[STAT_ATK] = MAX_STAT_STAGE; - retVal = FALSE; - } - - // X Defense - if ((itemEffect[i] & ITEM1_X_DEFENSE) - && gBattleMons[gActiveBattler].statStages[STAT_DEF] < MAX_STAT_STAGE) - { - gBattleMons[gActiveBattler].statStages[STAT_DEF] += X_ITEM_STAGES; - if (gBattleMons[gActiveBattler].statStages[STAT_DEF] > MAX_STAT_STAGE) - gBattleMons[gActiveBattler].statStages[STAT_DEF] = MAX_STAT_STAGE; - retVal = FALSE; - } - - // X Speed - if ((itemEffect[i] & ITEM1_X_SPEED) - && gBattleMons[gActiveBattler].statStages[STAT_SPEED] < MAX_STAT_STAGE) - { - gBattleMons[gActiveBattler].statStages[STAT_SPEED] += X_ITEM_STAGES; - if (gBattleMons[gActiveBattler].statStages[STAT_SPEED] > MAX_STAT_STAGE) - gBattleMons[gActiveBattler].statStages[STAT_SPEED] = MAX_STAT_STAGE; - retVal = FALSE; - } - - // X Sp Attack - if ((itemEffect[i] & ITEM1_X_SPATK) - && gBattleMons[gActiveBattler].statStages[STAT_SPATK] < MAX_STAT_STAGE) - { - gBattleMons[gActiveBattler].statStages[STAT_SPATK] += X_ITEM_STAGES; - if (gBattleMons[gActiveBattler].statStages[STAT_SPATK] > MAX_STAT_STAGE) - gBattleMons[gActiveBattler].statStages[STAT_SPATK] = MAX_STAT_STAGE; - retVal = FALSE; - } - - // X Sp Defense - if ((itemEffect[i] & ITEM1_X_SPDEF) - && gBattleMons[gActiveBattler].statStages[STAT_SPDEF] < MAX_STAT_STAGE) - { - gBattleMons[gActiveBattler].statStages[STAT_SPDEF] += X_ITEM_STAGES; - if (gBattleMons[gActiveBattler].statStages[STAT_SPDEF] > MAX_STAT_STAGE) - gBattleMons[gActiveBattler].statStages[STAT_SPDEF] = MAX_STAT_STAGE; - retVal = FALSE; - } - - // X Accuracy - if ((itemEffect[i] & ITEM1_X_ACCURACY) - && gBattleMons[gActiveBattler].statStages[STAT_ACC] < MAX_STAT_STAGE) - { - gBattleMons[gActiveBattler].statStages[STAT_ACC] += X_ITEM_STAGES; - if (gBattleMons[gActiveBattler].statStages[STAT_ACC] > MAX_STAT_STAGE) - gBattleMons[gActiveBattler].statStages[STAT_ACC] = MAX_STAT_STAGE; - retVal = FALSE; - } break; // Formerly used by the item effects of the X Sp. Atk and the X Accuracy case 2: @@ -5881,14 +5768,6 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov // Handle ITEM3 effects (Guard Spec, Rare Candy, cure status) case 3: - // Guard Spec - if ((itemEffect[i] & ITEM3_GUARD_SPEC) - && gSideTimers[GetBattlerSide(gActiveBattler)].mistTimer == 0) - { - gSideTimers[GetBattlerSide(gActiveBattler)].mistTimer = 5; - retVal = FALSE; - } - // Rare Candy / EXP Candy if ((itemEffect[i] & ITEM3_LEVEL_UP) && GetMonData(mon, MON_DATA_LEVEL, NULL) != MAX_LEVEL) @@ -5917,13 +5796,8 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov } // Cure status - if ((itemEffect[i] & ITEM3_SLEEP) - && HealStatusConditions(mon, partyIndex, STATUS1_SLEEP, battlerId) == 0) - { - if (battlerId != MAX_BATTLERS_COUNT) - gBattleMons[battlerId].status2 &= ~STATUS2_NIGHTMARE; + if ((itemEffect[i] & ITEM3_SLEEP) && HealStatusConditions(mon, partyIndex, STATUS1_SLEEP, battlerId) == 0) retVal = FALSE; - } if ((itemEffect[i] & ITEM3_POISON) && HealStatusConditions(mon, partyIndex, STATUS1_PSN_ANY | STATUS1_TOXIC_COUNTER, battlerId) == 0) retVal = FALSE; if ((itemEffect[i] & ITEM3_BURN) && HealStatusConditions(mon, partyIndex, STATUS1_BURN, battlerId) == 0) @@ -5932,12 +5806,6 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov retVal = FALSE; if ((itemEffect[i] & ITEM3_PARALYSIS) && HealStatusConditions(mon, partyIndex, STATUS1_PARALYSIS, battlerId) == 0) retVal = FALSE; - if ((itemEffect[i] & ITEM3_CONFUSION) // heal confusion - && gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && (gBattleMons[battlerId].status2 & STATUS2_CONFUSION)) - { - gBattleMons[battlerId].status2 &= ~STATUS2_CONFUSION; - retVal = FALSE; - } break; // Handle ITEM4 effects (Change HP/Atk EVs, HP heal, PP heal, PP up, Revive, and evolution stones) @@ -5986,7 +5854,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov if (itemEffect[10] & ITEM10_IS_VITAMIN) evCap = EV_ITEM_RAISE_LIMIT; else - evCap = 252; + evCap = MAX_PER_STAT_EVS; if (dataSigned >= evCap) break; @@ -6012,6 +5880,10 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov break; } dataSigned += evChange; + #if I_EV_LOWERING_BERRY_JUMP == GEN_4 + if (dataSigned > 100) + dataSigned = 100; + #endif if (dataSigned < 0) dataSigned = 0; } @@ -6024,38 +5896,12 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov break; case 2: // ITEM4_HEAL_HP - // If Revive, update number of times revive has been used - if (effectFlags & (ITEM4_REVIVE >> 2)) + // Check use validity. + if ((effectFlags & (ITEM4_REVIVE >> 2) && GetMonData(mon, MON_DATA_HP, NULL) != 0) + || (!(effectFlags & (ITEM4_REVIVE >> 2)) && GetMonData(mon, MON_DATA_HP, NULL) == 0)) { - if (GetMonData(mon, MON_DATA_HP, NULL) != 0) - { - itemEffectParam++; - break; - } - if (gMain.inBattle) - { - if (battlerId != MAX_BATTLERS_COUNT) - { - gAbsentBattlerFlags &= ~gBitTable[battlerId]; - CopyPlayerPartyMonToBattleData(battlerId, GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[battlerId])); - if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER && gBattleResults.numRevivesUsed < 255) - gBattleResults.numRevivesUsed++; - } - else - { - gAbsentBattlerFlags &= ~gBitTable[gActiveBattler ^ 2]; - if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER && gBattleResults.numRevivesUsed < 255) - gBattleResults.numRevivesUsed++; - } - } - } - else - { - if (GetMonData(mon, MON_DATA_HP, NULL) == 0) - { - itemEffectParam++; - break; - } + itemEffectParam++; + break; } // Get amount of HP to restore @@ -6083,35 +5929,11 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov // Only restore HP if not at max health if (GetMonData(mon, MON_DATA_MAX_HP, NULL) != GetMonData(mon, MON_DATA_HP, NULL)) { - if (!usedByAI) - { - // Restore HP - dataUnsigned = GetMonData(mon, MON_DATA_HP, NULL) + dataUnsigned; - if (dataUnsigned > GetMonData(mon, MON_DATA_MAX_HP, NULL)) - dataUnsigned = GetMonData(mon, MON_DATA_MAX_HP, NULL); - SetMonData(mon, MON_DATA_HP, &dataUnsigned); - - // Update battler (if applicable) - if (gMain.inBattle && battlerId != MAX_BATTLERS_COUNT) - { - gBattleMons[battlerId].hp = dataUnsigned; - if (!(effectFlags & (ITEM4_REVIVE >> 2)) && GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) - { - if (gBattleResults.numHealingItemsUsed < 255) - gBattleResults.numHealingItemsUsed++; - - temp2 = gActiveBattler; - gActiveBattler = battlerId; - BtlController_EmitGetMonData(BUFFER_A, REQUEST_ALL_BATTLE, 0); - MarkBattlerForControllerExec(gActiveBattler); - gActiveBattler = temp2; - } - } - } - else - { - gBattleMoveDamage = -dataUnsigned; - } + // Restore HP + dataUnsigned = GetMonData(mon, MON_DATA_HP, NULL) + dataUnsigned; + if (dataUnsigned > GetMonData(mon, MON_DATA_MAX_HP, NULL)) + dataUnsigned = GetMonData(mon, MON_DATA_MAX_HP, NULL); + SetMonData(mon, MON_DATA_HP, &dataUnsigned); retVal = FALSE; } effectFlags &= ~(ITEM4_REVIVE >> 2); @@ -6136,11 +5958,6 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov dataUnsigned = CalculatePPWithBonus(moveId, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), temp2); } SetMonData(mon, MON_DATA_PP1 + temp2, &dataUnsigned); - - // Heal battler PP too (if applicable) - if (gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && MOVE_IS_PERMANENT(battlerId, temp2)) - gBattleMons[battlerId].pp[temp2] = dataUnsigned; - retVal = FALSE; } } @@ -6162,11 +5979,6 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov dataUnsigned = CalculatePPWithBonus(moveId, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex); } SetMonData(mon, MON_DATA_PP1 + moveIndex, &dataUnsigned); - - // Heal battler PP too (if applicable) - if (gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && MOVE_IS_PERMANENT(battlerId, moveIndex)) - gBattleMons[battlerId].pp[moveIndex] = dataUnsigned; - retVal = FALSE; } } @@ -6222,7 +6034,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov if (itemEffect[10] & ITEM10_IS_VITAMIN) evCap = EV_ITEM_RAISE_LIMIT; else - evCap = 252; + evCap = MAX_PER_STAT_EVS; if (dataSigned >= evCap) break; @@ -6248,6 +6060,10 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov break; } dataSigned += evChange; + #if I_BERRY_EV_JUMP == GEN_4 + if (dataSigned > 100) + dataSigned = 100; + #endif if (dataSigned < 0) dataSigned = 0; } @@ -6339,9 +6155,9 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) offset = ITEM_EFFECT_ARG_START; - temp = gItemEffectTable[itemId - ITEM_POTION]; + temp = gItemEffectTable[itemId]; - if (!temp && itemId != ITEM_ENIGMA_BERRY_E_READER) + if (temp != NULL && !temp && itemId != ITEM_ENIGMA_BERRY_E_READER) return 0; if (itemId == ITEM_ENIGMA_BERRY_E_READER) @@ -6469,7 +6285,7 @@ u8 *UseStatIncreaseItem(u16 itemId) } else { - itemEffect = gItemEffectTable[itemId - ITEM_POTION]; + itemEffect = gItemEffectTable[itemId]; } gPotentialItemEffectBattler = gBattlerInMenuId; @@ -6543,7 +6359,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s partnerSpecies = GetMonData(tradePartner, MON_DATA_SPECIES, 0); partnerHeldItem = GetMonData(tradePartner, MON_DATA_HELD_ITEM, 0); - if (partnerHeldItem == ITEM_ENIGMA_BERRY) + if (partnerHeldItem == ITEM_ENIGMA_BERRY_E_READER) partnerHoldEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; else partnerHoldEffect = ItemId_GetHoldEffect(partnerHeldItem); @@ -6814,6 +6630,11 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s if (GetMonGender(mon) == MON_MALE && gEvolutionTable[species][i].param == evolutionItem) targetSpecies = gEvolutionTable[species][i].targetSpecies; break; + case EVO_ITEM_NIGHT: + RtcCalcLocalTime(); + if (gLocalTime.hours >= 0 && gLocalTime.hours < 12 && gEvolutionTable[species][i].param == evolutionItem) + targetSpecies = gEvolutionTable[species][i].targetSpecies; + break; } } break; @@ -7153,7 +6974,7 @@ void AdjustFriendship(struct Pokemon *mon, u8 event) if (ShouldSkipFriendshipChange()) return; - species = GetMonData(mon, MON_DATA_SPECIES2, 0); + species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, 0); heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, 0); if (heldItem == ITEM_ENIGMA_BERRY_E_READER) @@ -7213,7 +7034,7 @@ void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies) u8 bonus; heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, 0); - if (heldItem == ITEM_ENIGMA_BERRY) + if (heldItem == ITEM_ENIGMA_BERRY_E_READER) { if (gMain.inBattle) holdEffect = gEnigmaBerries[0].holdEffect; @@ -7590,7 +7411,7 @@ u8 GetNumberOfRelearnableMoves(struct Pokemon *mon) u16 learnedMoves[MAX_MON_MOVES]; u16 moves[MAX_LEVEL_UP_MOVES]; u8 numMoves = 0; - u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0); + u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, 0); u8 level = GetMonData(mon, MON_DATA_LEVEL, 0); int i, j, k; @@ -7759,7 +7580,7 @@ static void Task_PlayMapChosenOrBattleBGM(u8 taskId) const u32 *GetMonFrontSpritePal(struct Pokemon *mon) { - u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0); + u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, 0); u32 otId = GetMonData(mon, MON_DATA_OT_ID, 0); u32 personality = GetMonData(mon, MON_DATA_PERSONALITY, 0); return GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality); @@ -7791,7 +7612,7 @@ const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 p const struct CompressedSpritePalette *GetMonSpritePalStruct(struct Pokemon *mon) { - u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0); + u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, 0); u32 otId = GetMonData(mon, MON_DATA_OT_ID, 0); u32 personality = GetMonData(mon, MON_DATA_PERSONALITY, 0); return GetMonSpritePalStructFromOtIdPersonality(species, otId, personality); @@ -8281,8 +8102,6 @@ static bool8 ShouldSkipFriendshipChange(void) #define ALLOC_FAIL_BUFFER (1 << 0) #define ALLOC_FAIL_STRUCT (1 << 1) #define GFX_MANAGER_ACTIVE 0xA3 // Arbitrary value -#define GFX_MANAGER_SPR_SIZE (MON_PIC_SIZE * 4) // Only Castform uses more than MON_PIC_SIZE, despite not displaying its forms. -#define GFX_MANAGER_NUM_FRAMES 4 // Only 2 frames are needed static void InitMonSpritesGfx_Battle(struct MonSpritesGfxManager* gfx) { @@ -8329,7 +8148,7 @@ struct MonSpritesGfxManager *CreateMonSpritesGfxManager(u8 managerId, u8 mode) case MON_SPR_GFX_MODE_FULL_PARTY: gfx->numSprites = PARTY_SIZE + 1; gfx->numSprites2 = PARTY_SIZE + 1; - gfx->numFrames = GFX_MANAGER_NUM_FRAMES; + gfx->numFrames = MAX_MON_PIC_FRAMES; gfx->dataSize = 1; gfx->mode = MON_SPR_GFX_MODE_FULL_PARTY; break; @@ -8338,14 +8157,14 @@ struct MonSpritesGfxManager *CreateMonSpritesGfxManager(u8 managerId, u8 mode) default: gfx->numSprites = MAX_BATTLERS_COUNT; gfx->numSprites2 = MAX_BATTLERS_COUNT; - gfx->numFrames = GFX_MANAGER_NUM_FRAMES; + gfx->numFrames = MAX_MON_PIC_FRAMES; gfx->dataSize = 1; gfx->mode = MON_SPR_GFX_MODE_NORMAL; break; } // Set up sprite / sprite pointer buffers - gfx->spriteBuffer = AllocZeroed(gfx->dataSize * GFX_MANAGER_SPR_SIZE * gfx->numSprites); + gfx->spriteBuffer = AllocZeroed(gfx->dataSize * MON_PIC_SIZE * MAX_MON_PIC_FRAMES * gfx->numSprites); gfx->spritePointers = AllocZeroed(gfx->numSprites * 32); // ? Only * 4 is necessary, perhaps they were thinking bits. if (gfx->spriteBuffer == NULL || gfx->spritePointers == NULL) { @@ -8354,7 +8173,7 @@ struct MonSpritesGfxManager *CreateMonSpritesGfxManager(u8 managerId, u8 mode) else { for (i = 0; i < gfx->numSprites; i++) - gfx->spritePointers[i] = gfx->spriteBuffer + (gfx->dataSize * GFX_MANAGER_SPR_SIZE * i); + gfx->spritePointers[i] = gfx->spriteBuffer + (gfx->dataSize * MON_PIC_SIZE * MAX_MON_PIC_FRAMES * i); } // Set up sprite structs diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 0758ea37d3..bd46e8767d 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -815,9 +815,9 @@ const u8 *const gMonIconTable[] = [SPECIES_BRUXISH] = gMonIcon_Bruxish, [SPECIES_DRAMPA] = gMonIcon_Drampa, [SPECIES_DHELMISE] = gMonIcon_Dhelmise, - [SPECIES_JANGMO_O] = gMonIcon_Jangmoo, - [SPECIES_HAKAMO_O] = gMonIcon_Hakamoo, - [SPECIES_KOMMO_O] = gMonIcon_Kommoo, + [SPECIES_JANGMO_O] = gMonIcon_JangmoO, + [SPECIES_HAKAMO_O] = gMonIcon_HakamoO, + [SPECIES_KOMMO_O] = gMonIcon_KommoO, [SPECIES_TAPU_KOKO] = gMonIcon_TapuKoko, [SPECIES_TAPU_LELE] = gMonIcon_TapuLele, [SPECIES_TAPU_BULU] = gMonIcon_TapuBulu, @@ -1293,6 +1293,7 @@ const u8 *const gMonIconTable[] = [SPECIES_CALYREX_ICE_RIDER] = gMonIcon_CalyrexIceRider, [SPECIES_CALYREX_SHADOW_RIDER] = gMonIcon_CalyrexShadowRider, [SPECIES_ENAMORUS_THERIAN] = gMonIcon_EnamorusTherian, + [SPECIES_BASCULEGION_FEMALE] = gMonIcon_BasculegionFemale, #endif [SPECIES_EGG] = gMonIcon_Egg, }; @@ -1325,9 +1326,6 @@ const u8 *const gMonIconTableFemale[] = #if P_GEN_6_POKEMON == TRUE [SPECIES_PYROAR] = gMonIcon_PyroarF, #endif -#if P_GEN_8_POKEMON == TRUE - [SPECIES_BASCULEGION] = gMonIcon_BasculegionF, -#endif }; const u8 gMonIconPaletteIndices[] = @@ -2542,6 +2540,7 @@ const u8 gMonIconPaletteIndices[] = [SPECIES_CALYREX_ICE_RIDER] = 0, [SPECIES_CALYREX_SHADOW_RIDER] = 0, [SPECIES_ENAMORUS_THERIAN] = 1, + [SPECIES_BASCULEGION_FEMALE] = 0, #endif [SPECIES_EGG] = 1, }; diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index f7438f1395..aba3e9d31c 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -2536,7 +2536,7 @@ void IsPokemonJumpSpeciesInParty(void) { if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_HAS_SPECIES)) { - u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (IsSpeciesAllowedInPokemonJump(species)) { gSpecialVar_Result = TRUE; @@ -2896,7 +2896,7 @@ static void CreateJumpMonSprite(struct PokemonJumpGfx *jumpGfx, struct PokemonJu u8 spriteId; spriteTemplate = sSpriteTemplate_JumpMon; - buffer = Alloc(0x2000); + buffer = Alloc(MON_PIC_SIZE * MAX_MON_PIC_FRAMES); unusedBuffer = Alloc(MON_PIC_SIZE); if (multiplayerId == GetPokeJumpMultiplayerId()) subpriority = 3; diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index d83533d59e..7d9f71f55e 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -551,7 +551,7 @@ struct PokemonStorageSystemData u16 *displayMonTilePtr; struct Sprite *displayMonSprite; u16 displayMonPalBuffer[0x40]; - u8 tileBuffer[MON_PIC_SIZE * 4]; // 4x the size of a 'Mon sprite to account for Castform + u8 tileBuffer[MON_PIC_SIZE * MAX_MON_PIC_FRAMES]; u8 itemIconBuffer[0x800]; u8 wallpaperBgTilemapBuffer[0x1000]; u8 displayMenuTilemapBuffer[0x800]; @@ -4444,7 +4444,7 @@ static u8 GetMonIconPriorityByCursorPos(void) static void CreateMovingMonIcon(void) { u32 personality = GetMonData(&sStorage->movingMon, MON_DATA_PERSONALITY); - u16 species = GetMonData(&sStorage->movingMon, MON_DATA_SPECIES2); + u16 species = GetMonData(&sStorage->movingMon, MON_DATA_SPECIES_OR_EGG); u8 priority = GetMonIconPriorityByCursorPos(); sStorage->movingMonSprite = CreateMonIconSprite(species, personality, 0, 0, priority, 7); @@ -4466,7 +4466,7 @@ static void InitBoxMonSprites(u8 boxId) { for (j = 0; j < IN_BOX_COLUMNS; j++) { - species = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES2); + species = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE) { personality = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_PERSONALITY); @@ -4494,7 +4494,7 @@ static void InitBoxMonSprites(u8 boxId) static void CreateBoxMonIconAtPos(u8 boxPosition) { - u16 species = GetCurrentBoxMonData(boxPosition, MON_DATA_SPECIES2); + u16 species = GetCurrentBoxMonData(boxPosition, MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE) { @@ -4728,7 +4728,7 @@ static void GetIncomingBoxMonData(u8 boxId) { for (j = 0; j < IN_BOX_COLUMNS; j++) { - sStorage->boxSpecies[boxPosition] = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES2); + sStorage->boxSpecies[boxPosition] = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES_OR_EGG); if (sStorage->boxSpecies[boxPosition] != SPECIES_NONE) sStorage->boxPersonalities[boxPosition] = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_PERSONALITY); boxPosition++; @@ -4756,14 +4756,14 @@ static void SetBoxMonIconObjMode(u8 boxPosition, u8 objMode) static void CreatePartyMonsSprites(bool8 visible) { u16 i, count; - u16 species = GetMonData(&gPlayerParty[0], MON_DATA_SPECIES2); + u16 species = GetMonData(&gPlayerParty[0], MON_DATA_SPECIES_OR_EGG); u32 personality = GetMonData(&gPlayerParty[0], MON_DATA_PERSONALITY); sStorage->partySprites[0] = CreateMonIconSprite(species, personality, 104, 64, 1, 12); count = 1; for (i = 1; i < PARTY_SIZE; i++) { - species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE) { personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY); @@ -6914,7 +6914,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode) { struct Pokemon *mon = (struct Pokemon *)pokemon; - sStorage->displayMonSpecies = GetMonData(mon, MON_DATA_SPECIES2); + sStorage->displayMonSpecies = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); if (sStorage->displayMonSpecies != SPECIES_NONE) { sanityIsBadEgg = GetMonData(mon, MON_DATA_SANITY_IS_BAD_EGG); @@ -6937,7 +6937,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode) { struct BoxPokemon *boxMon = (struct BoxPokemon *)pokemon; - sStorage->displayMonSpecies = GetBoxMonData(pokemon, MON_DATA_SPECIES2); + sStorage->displayMonSpecies = GetBoxMonData(pokemon, MON_DATA_SPECIES_OR_EGG); if (sStorage->displayMonSpecies != SPECIES_NONE) { u32 otId = GetBoxMonData(boxMon, MON_DATA_OT_ID); @@ -8485,7 +8485,7 @@ static void MultiMove_DeselectRow(u8 row, u8 minColumn, u8 maxColumn) static void MultiMove_SetIconToBg(u8 x, u8 y) { u8 position = x + (IN_BOX_COLUMNS * y); - u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES2); + u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES_OR_EGG); u32 personality = GetCurrentBoxMonData(position, MON_DATA_PERSONALITY); if (species != SPECIES_NONE) @@ -8510,7 +8510,7 @@ static void MultiMove_SetIconToBg(u8 x, u8 y) static void MultiMove_ClearIconFromBg(u8 x, u8 y) { u8 position = x + (IN_BOX_COLUMNS * y); - u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES2); + u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE) { diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 2d42002adb..3313076262 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -1474,7 +1474,7 @@ static bool8 ExtractMonDataToSummaryStruct(struct Pokemon *mon) { case 0: sum->species = GetMonData(mon, MON_DATA_SPECIES); - sum->species2 = GetMonData(mon, MON_DATA_SPECIES2); + sum->species2 = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); sum->exp = GetMonData(mon, MON_DATA_EXP); sum->level = GetMonData(mon, MON_DATA_LEVEL); sum->abilityNum = GetMonData(mon, MON_DATA_ABILITY_NUM); diff --git a/src/pokenav_conditions.c b/src/pokenav_conditions.c index 0477ebbf52..3c06f6c649 100644 --- a/src/pokenav_conditions.c +++ b/src/pokenav_conditions.c @@ -531,7 +531,7 @@ static void ConditionGraphDrawMonPic(s16 listId, u8 loadId) boxId = monListPtr->monData[listId].boxId; monId = monListPtr->monData[listId].monId; - species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES2, NULL); + species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES_OR_EGG, NULL); tid = GetBoxOrPartyMonData(boxId, monId, MON_DATA_OT_ID, NULL); personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL); LoadSpecialPokePic(menu->monPicGfx[loadId], species, personality, TRUE); diff --git a/src/pokenav_match_call_gfx.c b/src/pokenav_match_call_gfx.c index 626e584b70..1747d3ef0b 100755 --- a/src/pokenav_match_call_gfx.c +++ b/src/pokenav_match_call_gfx.c @@ -49,7 +49,7 @@ struct Pokenav_MatchCallGfx u8 unusedTilemapBuffer[BG_SCREEN_SIZE]; u8 bgTilemapBuffer2[BG_SCREEN_SIZE]; u8 *trainerPicGfxPtr; - u8 trainerPicGfx[0x800]; + u8 trainerPicGfx[TRAINER_PIC_SIZE]; u8 trainerPicPal[0x20]; }; diff --git a/src/random.c b/src/random.c index de923fba63..14983e7764 100644 --- a/src/random.c +++ b/src/random.c @@ -31,3 +31,35 @@ u16 Random2(void) gRng2Value = ISO_RANDOMIZE1(gRng2Value); return gRng2Value >> 16; } + +__attribute__((weak, alias("RandomUniformDefault"))) +u32 RandomUniform(enum RandomTag tag, u32 lo, u32 hi); + +__attribute__((weak, alias("RandomWeightedArrayDefault"))) +u32 RandomWeightedArray(enum RandomTag tag, u32 sum, u32 n, const u8 *weights); + +__attribute__((weak, alias("RandomElementArrayDefault"))) +const void *RandomElementArray(enum RandomTag tag, const void *array, size_t size, size_t count); + +u32 RandomUniformDefault(enum RandomTag tag, u32 lo, u32 hi) +{ + return lo + (((hi - lo + 1) * Random()) >> 16); +} + +u32 RandomWeightedArrayDefault(enum RandomTag tag, u32 sum, u32 n, const u8 *weights) +{ + s32 i, targetSum; + targetSum = (sum * Random()) >> 16; + for (i = 0; i < n - 1; i++) + { + targetSum -= weights[i]; + if (targetSum < 0) + return i; + } + return n - 1; +} + +const void *RandomElementArrayDefault(enum RandomTag tag, const void *array, size_t size, size_t count) +{ + return (const u8 *)array + size * RandomUniformDefault(tag, 0, count - 1); +} diff --git a/src/region_map.c b/src/region_map.c index d55afb9618..ebe3afb8e9 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -53,6 +53,13 @@ enum { TAG_FLY_ICON, }; +// Window IDs for the fly map +enum { + WIN_MAPSEC_NAME, + WIN_MAPSEC_NAME_TALL, // For fly destinations with subtitles (just Ever Grande) + WIN_FLY_TO_WHERE, +}; + struct MultiNameFlyDest { const u8 *const *name; @@ -378,7 +385,7 @@ static const struct BgTemplate sFlyMapBgTemplates[] = static const struct WindowTemplate sFlyMapWindowTemplates[] = { - { + [WIN_MAPSEC_NAME] = { .bg = 0, .tilemapLeft = 17, .tilemapTop = 17, @@ -387,7 +394,7 @@ static const struct WindowTemplate sFlyMapWindowTemplates[] = .paletteNum = 15, .baseBlock = 0x01 }, - { + [WIN_MAPSEC_NAME_TALL] = { .bg = 0, .tilemapLeft = 17, .tilemapTop = 15, @@ -396,7 +403,7 @@ static const struct WindowTemplate sFlyMapWindowTemplates[] = .paletteNum = 15, .baseBlock = 0x19 }, - { + [WIN_FLY_TO_WHERE] = { .bg = 0, .tilemapLeft = 1, .tilemapTop = 18, @@ -1394,7 +1401,7 @@ void CreateRegionMapCursor(u16 tileTag, u16 paletteTag) } LoadSpriteSheet(&sheet); LoadSpritePalette(&palette); - spriteId = CreateSprite(&template, 0x38, 0x48, 0); + spriteId = CreateSprite(&template, 56, 72, 0); if (spriteId != MAX_SPRITES) { sRegionMap->cursorSprite = &gSprites[spriteId]; @@ -1703,9 +1710,9 @@ void CB2_OpenFlyMap(void) break; case 7: LoadPalette(sRegionMapFramePal, BG_PLTT_ID(1), sizeof(sRegionMapFramePal)); - PutWindowTilemap(2); - FillWindowPixelBuffer(2, PIXEL_FILL(0)); - AddTextPrinterParameterized(2, FONT_NORMAL, gText_FlyToWhere, 0, 1, 0, NULL); + PutWindowTilemap(WIN_FLY_TO_WHERE); + FillWindowPixelBuffer(WIN_FLY_TO_WHERE, PIXEL_FILL(0)); + AddTextPrinterParameterized(WIN_FLY_TO_WHERE, FONT_NORMAL, gText_FlyToWhere, 0, 1, 0, NULL); ScheduleBgCopyTilemapToVram(0); gMain.state++; break; @@ -1758,7 +1765,7 @@ static void DrawFlyDestTextWindow(void) bool32 namePrinted; const u8 *name; - if (sFlyMap->regionMap.mapSecType > MAPSECTYPE_NONE && sFlyMap->regionMap.mapSecType <= MAPSECTYPE_BATTLE_FRONTIER) + if (sFlyMap->regionMap.mapSecType > MAPSECTYPE_NONE && sFlyMap->regionMap.mapSecType < NUM_MAPSEC_TYPES) { namePrinted = FALSE; for (i = 0; i < ARRAY_COUNT(sMultiNameFlyDestinations); i++) @@ -1769,11 +1776,11 @@ static void DrawFlyDestTextWindow(void) { StringLength(sMultiNameFlyDestinations[i].name[sFlyMap->regionMap.posWithinMapSec]); namePrinted = TRUE; - ClearStdWindowAndFrameToTransparent(0, FALSE); - DrawStdFrameWithCustomTileAndPalette(1, FALSE, 101, 13); - AddTextPrinterParameterized(1, FONT_NORMAL, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL); + ClearStdWindowAndFrameToTransparent(WIN_MAPSEC_NAME, FALSE); + DrawStdFrameWithCustomTileAndPalette(WIN_MAPSEC_NAME_TALL, FALSE, 101, 13); + AddTextPrinterParameterized(WIN_MAPSEC_NAME_TALL, FONT_NORMAL, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL); name = sMultiNameFlyDestinations[i].name[sFlyMap->regionMap.posWithinMapSec]; - AddTextPrinterParameterized(1, FONT_NORMAL, name, GetStringRightAlignXOffset(FONT_NORMAL, name, 96), 17, 0, NULL); + AddTextPrinterParameterized(WIN_MAPSEC_NAME_TALL, FONT_NORMAL, name, GetStringRightAlignXOffset(FONT_NORMAL, name, 96), 17, 0, NULL); ScheduleBgCopyTilemapToVram(0); sDrawFlyDestTextWindow = TRUE; } @@ -1784,15 +1791,15 @@ static void DrawFlyDestTextWindow(void) { if (sDrawFlyDestTextWindow == TRUE) { - ClearStdWindowAndFrameToTransparent(1, FALSE); - DrawStdFrameWithCustomTileAndPalette(0, FALSE, 101, 13); + ClearStdWindowAndFrameToTransparent(WIN_MAPSEC_NAME_TALL, FALSE); + DrawStdFrameWithCustomTileAndPalette(WIN_MAPSEC_NAME, FALSE, 101, 13); } else { // Window is already drawn, just empty it - FillWindowPixelBuffer(0, PIXEL_FILL(1)); + FillWindowPixelBuffer(WIN_MAPSEC_NAME, PIXEL_FILL(1)); } - AddTextPrinterParameterized(0, FONT_NORMAL, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL); + AddTextPrinterParameterized(WIN_MAPSEC_NAME, FONT_NORMAL, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL); ScheduleBgCopyTilemapToVram(0); sDrawFlyDestTextWindow = FALSE; } @@ -1802,11 +1809,11 @@ static void DrawFlyDestTextWindow(void) // Selection is on MAPSECTYPE_NONE, draw empty fly destination text window if (sDrawFlyDestTextWindow == TRUE) { - ClearStdWindowAndFrameToTransparent(1, FALSE); - DrawStdFrameWithCustomTileAndPalette(0, FALSE, 101, 13); + ClearStdWindowAndFrameToTransparent(WIN_MAPSEC_NAME_TALL, FALSE); + DrawStdFrameWithCustomTileAndPalette(WIN_MAPSEC_NAME, FALSE, 101, 13); } - FillWindowPixelBuffer(0, PIXEL_FILL(1)); - CopyWindowToVram(0, COPYWIN_GFX); + FillWindowPixelBuffer(WIN_MAPSEC_NAME, PIXEL_FILL(1)); + CopyWindowToVram(WIN_MAPSEC_NAME, COPYWIN_GFX); ScheduleBgCopyTilemapToVram(0); sDrawFlyDestTextWindow = FALSE; } diff --git a/src/reset_rtc_screen.c b/src/reset_rtc_screen.c index 5c93148675..98ccb71b64 100644 --- a/src/reset_rtc_screen.c +++ b/src/reset_rtc_screen.c @@ -49,6 +49,11 @@ enum { SELECTION_NONE }; +enum { + WIN_TIME, + WIN_MSG, +}; + struct ResetRtcInputMap { /*0x0*/ u8 dataIndex; @@ -79,7 +84,7 @@ static const struct BgTemplate sBgTemplates[] = static const struct WindowTemplate sWindowTemplates[] = { - { + [WIN_TIME] = { .bg = 0, .tilemapLeft = 1, .tilemapTop = 1, @@ -88,7 +93,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 15, .baseBlock = 0x155 }, - { + [WIN_MSG] = { .bg = 0, .tilemapLeft = 2, .tilemapTop = 15, @@ -562,8 +567,8 @@ static void VBlankCB(void) static void ShowMessage(const u8 *str) { - DrawDialogFrameWithCustomTileAndPalette(1, FALSE, 0x200, 0xF); - AddTextPrinterParameterized(1, FONT_NORMAL, str, 0, 1, 0, NULL); + DrawDialogFrameWithCustomTileAndPalette(WIN_MSG, FALSE, 0x200, 0xF); + AddTextPrinterParameterized(WIN_MSG, FONT_NORMAL, str, 0, 1, 0, NULL); ScheduleBgCopyTilemapToVram(0); } @@ -576,11 +581,11 @@ static void Task_ShowResetRtcPrompt(u8 taskId) switch (tState) { case 0: - DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x214, 0xE); + DrawStdFrameWithCustomTileAndPalette(WIN_TIME, FALSE, 0x214, 0xE); - AddTextPrinterParameterized(0, FONT_NORMAL, gText_PresentTime, 0, 1, TEXT_SKIP_DRAW, 0); + AddTextPrinterParameterized(WIN_TIME, FONT_NORMAL, gText_PresentTime, 0, 1, TEXT_SKIP_DRAW, 0); PrintTime( - 0, + WIN_TIME, 0, 17, gLocalTime.days, @@ -588,9 +593,9 @@ static void Task_ShowResetRtcPrompt(u8 taskId) gLocalTime.minutes, gLocalTime.seconds); - AddTextPrinterParameterized(0, FONT_NORMAL, gText_PreviousTime, 0, 33, TEXT_SKIP_DRAW, 0); + AddTextPrinterParameterized(WIN_TIME, FONT_NORMAL, gText_PreviousTime, 0, 33, TEXT_SKIP_DRAW, 0); PrintTime( - 0, + WIN_TIME, 0, 49, gSaveBlock2Ptr->lastBerryTreeUpdate.days, @@ -599,7 +604,7 @@ static void Task_ShowResetRtcPrompt(u8 taskId) gSaveBlock2Ptr->lastBerryTreeUpdate.seconds); ShowMessage(gText_ResetRTCConfirmCancel); - CopyWindowToVram(0, COPYWIN_GFX); + CopyWindowToVram(WIN_TIME, COPYWIN_GFX); ScheduleBgCopyTilemapToVram(0); tState++; case 1: @@ -666,7 +671,7 @@ static void Task_ResetRtcScreen(u8 taskId) // Wait for A or B press on prompt first if (gTasks[tSubTaskId].isActive != TRUE) { - ClearStdWindowAndFrameToTransparent(0, FALSE); + ClearStdWindowAndFrameToTransparent(WIN_TIME, FALSE); ShowMessage(gText_PleaseResetTime); gLocalTime = gSaveBlock2Ptr->lastBerryTreeUpdate; tSubTaskId = CreateTask(Task_ResetRtc_Init, 80); diff --git a/src/reshow_battle_screen.c b/src/reshow_battle_screen.c index 16310a7c36..b24db3f876 100644 --- a/src/reshow_battle_screen.c +++ b/src/reshow_battle_screen.c @@ -258,6 +258,8 @@ static void CreateBattlerSprite(u8 battler) { if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_HP) == 0) return; + if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_IS_EGG)) + return; SetMultiuseSpriteTemplateToPokemon(GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_SPECIES), GetBattlerPosition(battler)); gBattlerSpriteIds[battler] = CreateSprite(&gMultiuseSpriteTemplate, GetBattlerSpriteCoord(battler, BATTLER_COORD_X_2), posY, GetBattlerSpriteSubpriority(battler)); @@ -311,7 +313,7 @@ static void CreateHealthboxSprite(u8 battler) } else if (!(gBattleTypeFlags & BATTLE_TYPE_SAFARI)) { - if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_HP) == 0) + if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_HP) == 0 || GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_IS_EGG)) SetHealthboxSpriteInvisible(healthboxSpriteId); } } diff --git a/src/rom_header_gf.c b/src/rom_header_gf.c index 118cc5e277..7b8822acc6 100644 --- a/src/rom_header_gf.c +++ b/src/rom_header_gf.c @@ -9,8 +9,8 @@ // The purpose of this struct is for outside applications to be // able to access parts of the ROM or its save file, like a public API. // In vanilla, it was used by Colosseum and XD to access pokemon graphics. -// -// If this struct is rearranged in any way, it defeats the purpose of +// +// If this struct is rearranged in any way, it defeats the purpose of // having it at all. Applications like PKHex or streaming HUDs may find // these values useful, so there's some potential benefit to keeping it. // If there's a compilation problem below, just comment out the assignment diff --git a/src/roulette.c b/src/roulette.c index 283cceebfe..06561f7988 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -1144,7 +1144,7 @@ static void InitRouletteTableData(void) for (i = 0; i < PARTY_SIZE; i++) { - switch (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2)) + switch (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG)) { case SPECIES_SHROOMISH: sRoulette->partySpeciesFlags |= HAS_SHROOMISH; diff --git a/src/scrcmd.c b/src/scrcmd.c index 7b51df9f92..3a5a17fa82 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -2225,21 +2225,21 @@ bool8 ScrCmd_lockfortrainer(struct ScriptContext *ctx) } } -// This command will set a Pokémon's eventLegal bit; there is no similar command to clear it. -bool8 ScrCmd_setmoneventlegal(struct ScriptContext *ctx) +// This command will set a Pokémon's modernFatefulEncounter bit; there is no similar command to clear it. +bool8 ScrCmd_setmonmodernfatefulencounter(struct ScriptContext *ctx) { - bool8 isEventLegal = TRUE; + bool8 isModernFatefulEncounter = TRUE; u16 partyIndex = VarGet(ScriptReadHalfword(ctx)); - SetMonData(&gPlayerParty[partyIndex], MON_DATA_EVENT_LEGAL, &isEventLegal); + SetMonData(&gPlayerParty[partyIndex], MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter); return FALSE; } -bool8 ScrCmd_checkmoneventlegal(struct ScriptContext *ctx) +bool8 ScrCmd_checkmonmodernfatefulencounter(struct ScriptContext *ctx) { u16 partyIndex = VarGet(ScriptReadHalfword(ctx)); - gSpecialVar_Result = GetMonData(&gPlayerParty[partyIndex], MON_DATA_EVENT_LEGAL, NULL); + gSpecialVar_Result = GetMonData(&gPlayerParty[partyIndex], MON_DATA_MODERN_FATEFUL_ENCOUNTER, NULL); return FALSE; } diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index e33c8ffcad..15d5b2e5d2 100755 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -128,7 +128,7 @@ static bool8 CheckPartyMonHasHeldItem(u16 item) for(i = 0; i < PARTY_SIZE; i++) { - u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE && species != SPECIES_EGG && GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM) == item) return TRUE; } diff --git a/src/shop.c b/src/shop.c index 8fea1e1178..b4978f063e 100644 --- a/src/shop.c +++ b/src/shop.c @@ -639,7 +639,10 @@ static void BuyMenuPrintPriceInList(u8 windowId, u32 itemId, u8 y) 5); } - StringExpandPlaceholders(gStringVar4, gText_PokedollarVar1); + if (ItemId_GetImportance(itemId) && (CheckBagHasItem(itemId, 1) || CheckPCHasItem(itemId, 1))) + StringCopy(gStringVar4, gText_SoldOut); + else + StringExpandPlaceholders(gStringVar4, gText_PokedollarVar1); x = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 120); AddTextPrinterParameterized4(windowId, FONT_NARROW, x, y, 0, 0, sShopBuyMenuTextColors[COLORID_ITEM_LIST], TEXT_SKIP_DRAW, gStringVar4); } @@ -989,7 +992,9 @@ static void Task_BuyMenu(u8 taskId) else sShopData->totalCost = gDecorations[itemId].price; - if (!IsEnoughMoney(&gSaveBlock1Ptr->money, sShopData->totalCost)) + if (ItemId_GetImportance(itemId) && (CheckBagHasItem(itemId, 1) || CheckPCHasItem(itemId, 1))) + BuyMenuDisplayMessage(taskId, gText_ThatItemIsSoldOut, BuyMenuReturnToItemList); + else if (!IsEnoughMoney(&gSaveBlock1Ptr->money, sShopData->totalCost)) { BuyMenuDisplayMessage(taskId, gText_YouDontHaveMoney, BuyMenuReturnToItemList); } @@ -998,7 +1003,15 @@ static void Task_BuyMenu(u8 taskId) if (sMartInfo.martType == MART_TYPE_NORMAL) { CopyItemName(itemId, gStringVar1); - if (ItemId_GetPocket(itemId) == POCKET_TM_HM) + if (ItemId_GetImportance(itemId)) + { + ConvertIntToDecimalStringN(gStringVar2, sShopData->totalCost, STR_CONV_MODE_LEFT_ALIGN, 6); + StringExpandPlaceholders(gStringVar4, gText_YouWantedVar1ThatllBeVar2); + tItemCount = 1; + sShopData->totalCost = (ItemId_GetPrice(tItemId) >> IsPokeNewsActive(POKENEWS_SLATEPORT)) * tItemCount; + BuyMenuDisplayMessage(taskId, gStringVar4, BuyMenuConfirmPurchase); + } + else if (ItemId_GetPocket(itemId) == POCKET_TM_HM) { StringCopy(gStringVar2, gMoveNames[ItemIdToBattleMoveId(itemId)]); BuyMenuDisplayMessage(taskId, gText_Var1CertainlyHowMany2, Task_BuyHowManyDialogueInit); @@ -1103,8 +1116,8 @@ static void BuyMenuTryMakePurchase(u8 taskId) { if (AddBagItem(tItemId, tItemCount) == TRUE) { - BuyMenuDisplayMessage(taskId, gText_HereYouGoThankYou, BuyMenuSubtractMoney); RecordItemPurchase(taskId); + BuyMenuDisplayMessage(taskId, gText_HereYouGoThankYou, BuyMenuSubtractMoney); } else { @@ -1170,6 +1183,7 @@ static void BuyMenuReturnToItemList(u8 taskId) s16 *data = gTasks[taskId].data; ClearDialogWindowAndFrameToTransparent(WIN_MESSAGE, FALSE); + RedrawListMenu(tListTaskId); BuyMenuPrintCursor(tListTaskId, COLORID_ITEM_LIST); PutWindowTilemap(WIN_ITEM_LIST); PutWindowTilemap(WIN_ITEM_DESCRIPTION); diff --git a/src/strings.c b/src/strings.c index 8815212e05..75ff2ef994 100644 --- a/src/strings.c +++ b/src/strings.c @@ -341,6 +341,8 @@ const u8 gText_Var1DisdainfullyAteVar2[] = _("{STR_VAR_1} disdainfully ate the\n const u8 gText_ShopBuy[] = _("BUY"); const u8 gText_ShopSell[] = _("SELL"); const u8 gText_ShopQuit[] = _("QUIT"); +const u8 gText_ThatItemIsSoldOut[] = _("I'm sorry, but that item is sold out.{PAUSE_UNTIL_PRESS}"); +const u8 gText_SoldOut[] = _("SOLD OUT"); const u8 gText_InBagVar1[] = _("IN BAG: {STR_VAR_1}"); const u8 gText_QuitShopping[] = _("Quit shopping."); const u8 gText_Var1CertainlyHowMany[] = _("{STR_VAR_1}? Certainly.\nHow many would you like?"); @@ -1191,7 +1193,11 @@ const u8 gText_PsychUp48BP[] = _("PSYCH UP{CLEAR_TO 0x4E}48BP"); const u8 gText_IcePunch48BP[] = _("ICE PUNCH{CLEAR_TO 0x4E}48BP"); const u8 gText_ThunderPunch48BP[] = _("THUNDERPUNCH{CLEAR_TO 0x4E}48BP"); const u8 gText_FirePunch48BP[] = _("FIRE PUNCH{CLEAR_TO 0x4E}48BP"); +#if OW_POISON_DAMAGE < GEN_4 const u8 gText_PkmnFainted_FldPsn[] = _("{STR_VAR_1} fainted…\p\n"); +#else +const u8 gText_PkmnFainted_FldPsn[] = _("{STR_VAR_1} survived the poisoning.\nThe poison faded away!\p"); +#endif const u8 gText_Marco[] = _("MARCO"); const u8 gText_TrainerCardName[] = _("NAME: "); const u8 gText_TrainerCardIDNo[] = _("IDNo."); diff --git a/src/trade.c b/src/trade.c index b1aa60e10b..b09cc5af73 100644 --- a/src/trade.c +++ b/src/trade.c @@ -51,6 +51,68 @@ #include "constants/songs.h" #include "constants/union_room.h" +// IDs for RunTradeMenuCallback +enum { + CB_MAIN_MENU, + CB_SELECTED_MON, + CB_SHOW_MON_SUMMARY, + CB_CONFIRM_TRADE_PROMPT, + CB_CANCEL_TRADE_PROMPT, + CB_READY_WAIT, // Unused in Emerald, equivalent to CB_IDLE + CB_SET_SELECTED_MONS, + CB_PRINT_IS_THIS_OKAY, + CB_HANDLE_TRADE_CANCELED, + CB_FADE_TO_START_TRADE, + CB_WAIT_TO_START_TRADE, + CB_INIT_EXIT_CANCELED_TRADE, + CB_EXIT_CANCELED_TRADE, + CB_START_LINK_TRADE, + CB_INIT_CONFIRM_TRADE_PROMPT, + CB_UNUSED_CLOSE_MSG, + CB_WAIT_TO_START_RFU_TRADE, + CB_PARTNER_MON_INVALID, + CB_IDLE = 100, +}; + +// Indexes for sActionTexts +enum { + TEXT_CANCEL, + TEXT_CHOOSE_MON, + TEXT_SUMMARY, + TEXT_TRADE, + TEXT_CANCEL_TRADE, + TEXT_JP_QUIT, +}; + +// Indexes for sMessages +enum { + MSG_STANDBY, + MSG_CANCELED, + MSG_ONLY_MON1, + MSG_ONLY_MON2, + MSG_WAITING_FOR_FRIEND, + MSG_FRIEND_WANTS_TO_TRADE, + MSG_MON_CANT_BE_TRADED, + MSG_EGG_CANT_BE_TRADED, + MSG_FRIENDS_MON_CANT_BE_TRADED, +}; + +// IDs for QueueAction +enum { + QUEUE_SEND_DATA, + QUEUE_STANDBY, + QUEUE_ONLY_MON1, + QUEUE_ONLY_MON2, + QUEUE_UNUSED1, // Presumably intended for MSG_WAITING_FOR_FRIEND + QUEUE_UNUSED2, // Presumably intended for MSG_FRIEND_WANTS_TO_TRADE + QUEUE_MON_CANT_BE_TRADED, + QUEUE_EGG_CANT_BE_TRADED, + QUEUE_FRIENDS_MON_CANT_BE_TRADED, +}; + +#define QUEUE_DELAY_MSG 3 +#define QUEUE_DELAY_DATA 5 + // The following tags are offsets from GFXTAG_MENU_TEXT // They're looped over in CB2_CreateTradeMenu and CB2_ReturnToTradeMenu // and used as indexes into sMenuTextTileBuffers @@ -69,153 +131,160 @@ enum { GFXTAG_CHOOSE_PKMN_EMPTY_1, // 6 sprites to cover the full bottom bar, but only first 3 are needed GFXTAG_CHOOSE_PKMN_EMPTY_2, GFXTAG_CHOOSE_PKMN_EMPTY_3, - GFXTAG_MENU_TEXT_COUNT + NUM_MENU_TEXT_SPRITES }; -#define GFXTAG_PLAYER_NAME (1 + GFXTAG_PLAYER_NAME_R - GFXTAG_PLAYER_NAME_L) -#define GFXTAG_PARTNER_NAME (1 + GFXTAG_PARTNER_NAME_R - GFXTAG_PARTNER_NAME_L) -#define GFXTAG_CHOOSE_PKMN (1 + GFXTAG_CHOOSE_PKMN_EMPTY_3 - GFXTAG_CHOOSE_PKMN_L) +#define NUM_PLAYER_NAME_SPRITES (1 + GFXTAG_PLAYER_NAME_R - GFXTAG_PLAYER_NAME_L) +#define NUM_PARTNER_NAME_SPRITES (1 + GFXTAG_PARTNER_NAME_R - GFXTAG_PARTNER_NAME_L) +#define NUM_CHOOSE_PKMN_SPRITES (1 + GFXTAG_CHOOSE_PKMN_EMPTY_3 - GFXTAG_CHOOSE_PKMN_L) + +// Values for signaling to/from the link partner +enum { + STATUS_NONE, + STATUS_READY, + STATUS_CANCEL, +}; + +// Checked to confirm DrawSelectedMonScreen has reached final state +#define DRAW_SELECTED_FINISH 5 struct InGameTrade { - /*0x00*/ u8 nickname[POKEMON_NAME_LENGTH + 1]; - /*0x0C*/ u16 species; - /*0x0E*/ u8 ivs[NUM_STATS]; - /*0x14*/ u8 abilityNum; - /*0x18*/ u32 otId; - /*0x1C*/ u8 conditions[CONTEST_CATEGORIES_COUNT]; - /*0x24*/ u32 personality; - /*0x28*/ u16 heldItem; - /*0x2A*/ u8 mailNum; - /*0x2B*/ u8 otName[11]; - /*0x36*/ u8 otGender; - /*0x37*/ u8 sheen; - /*0x38*/ u16 requestedSpecies; + u8 nickname[POKEMON_NAME_LENGTH + 1]; + u16 species; + u8 ivs[NUM_STATS]; + u8 abilityNum; + u32 otId; + u8 conditions[CONTEST_CATEGORIES_COUNT]; + u32 personality; + u16 heldItem; + u8 mailNum; + u8 otName[11]; + u8 otGender; + u8 sheen; + u16 requestedSpecies; }; -static EWRAM_DATA u8 *sMenuTextAllocBuffer = NULL; +static EWRAM_DATA u8 *sMenuTextTileBuffer = NULL; // Bytes 0-2 are used for the player's name text // Bytes 3-5 are used for the partner's name text // Bytes 6-7 are used for the Cancel text // Bytes 8-13 are used for the Choose a Pokemon text // See the corresponding GFXTAGs in src/data/trade.h -static EWRAM_DATA u8 *sMenuTextTileBuffers[GFXTAG_MENU_TEXT_COUNT] = {NULL}; +static EWRAM_DATA u8 *sMenuTextTileBuffers[NUM_MENU_TEXT_SPRITES] = {NULL}; EWRAM_DATA struct Mail gTradeMail[PARTY_SIZE] = {0}; EWRAM_DATA u8 gSelectedTradeMonPositions[2] = {0}; static EWRAM_DATA struct { - /*0x0000*/ u8 bg2hofs; - /*0x0001*/ u8 bg3hofs; - /*0x0002*/ u8 filler_2[38]; - /*0x0028*/ u8 partySpriteIds[2][PARTY_SIZE]; - /*0x0034*/ u8 cursorSpriteId; - /*0x0035*/ u8 cursorPosition; - /*0x0036*/ u8 partyCounts[2]; - /*0x0038*/ bool8 monPresent[PARTY_SIZE * 2]; - /*0x0044*/ bool8 neverRead_44; - /*0x0045*/ bool8 isLiveMon[2][PARTY_SIZE]; - /*0x0051*/ bool8 isEgg[2][PARTY_SIZE]; - /*0x005D*/ u8 hpBarLevels[2][PARTY_SIZE]; - /*0x0069*/ u8 bufferPartyState; - /*0x006A*/ u8 filler_6A[5]; - /*0x006F*/ u8 tradeMenuFunc; - /*0x0070*/ u8 neverRead_70; - /*0x0071*/ u8 filler_71; - /*0x0072*/ u16 bottomTextTileStart; - /*0x0074*/ u8 drawPartyState[2]; - /*0x0076*/ u8 selectedMonIdx[2]; - /*0x0078*/ u8 playerLinkFlagChoseAction; - /*0x0079*/ u8 partnerLinkFlagChoseAction; - /*0x007A*/ u8 playerLinkFlagStatus; - /*0x007B*/ u8 partnerLinkFlagStatus; - /*0x007C*/ u8 filler_7C[2]; - /*0x007E*/ u8 partnerCursorPosition; - /*0x007F*/ u8 unused_7F; - /*0x0080*/ u16 linkData[20]; - /*0x00A8*/ u8 timer; - /*0x00A9*/ u8 giftRibbons[GIFT_RIBBONS_COUNT]; - /*0x00B4*/ u8 filler_B4[0x81C]; - /*0x08D0*/ struct { - bool8 queued; - u16 queueDelay; + u8 bg2hofs; + u8 bg3hofs; + u8 filler_2[38]; + u8 partySpriteIds[2][PARTY_SIZE]; + u8 cursorSpriteId; + u8 cursorPosition; + u8 partyCounts[2]; + bool8 optionsActive[PARTY_SIZE * 2 + 1]; + bool8 isLiveMon[2][PARTY_SIZE]; + bool8 isEgg[2][PARTY_SIZE]; + u8 hpBarLevels[2][PARTY_SIZE]; + u8 bufferPartyState; + u8 filler_6A[5]; + u8 callbackId; + u8 neverRead_70; + u16 bottomTextTileStart; + u8 drawSelectedMonState[2]; + u8 selectedMonIdx[2]; + u8 playerSelectStatus; + u8 partnerSelectStatus; + u8 playerConfirmStatus; + u8 partnerConfirmStatus; + u8 filler_7C[2]; + u8 partnerCursorPosition; + u16 linkData[20]; + u8 timer; + u8 giftRibbons[GIFT_RIBBONS_COUNT]; + u8 filler_B4[0x81C]; + struct { + bool8 active; + u16 delay; u8 actionId; } queuedActions[4]; - /*0x08F0*/ u16 tilemapBuffer[0x400]; -} *sTradeMenuData = {NULL}; + u16 tilemapBuffer[BG_SCREEN_SIZE / 2]; +} *sTradeMenu = NULL; static EWRAM_DATA struct { - /*0x00*/ struct Pokemon tempMon; // Used as a temp variable when swapping Pokémon - /*0x64*/ u32 timer; - /*0x68*/ u32 monPersonalities[2]; - /*0x70*/ u8 filler_70[2]; - /*0x72*/ u8 playerLinkFlagFinishTrade; - /*0x73*/ u8 partnerLinkFlagFinishTrade; - /*0x74*/ u16 linkData[10]; - /*0x88*/ u8 linkTimeoutZero1; - /*0x89*/ u8 linkTimeoutZero2; - /*0x8A*/ u16 linkTimeoutCounter; - /*0x8C*/ u16 neverRead_8C; - /*0x8E*/ u8 monSpriteIds[2]; - /*0x90*/ u8 connectionSpriteId1; // Multi-purpose sprite ids used during the transfer sequence - /*0x91*/ u8 connectionSpriteId2; - /*0x92*/ u8 cableEndSpriteId; - /*0x93*/ u8 sendTradeFinishState; - /*0x94*/ u16 state; - /*0x96*/ u8 filler_96[0xD2 - 0x96]; - /*0xD2*/ u8 releasePokeballSpriteId; - /*0xD3*/ u8 bouncingPokeballSpriteId; - /*0xD4*/ u16 texX; - /*0xD6*/ u16 texY; - /*0xD8*/ u16 neverRead_D8; - /*0xDA*/ u16 neverRead_DA; - /*0xDC*/ u16 scrX; - /*0xDE*/ u16 scrY; - /*0xE0*/ s16 bg1vofs; - /*0xE2*/ s16 bg1hofs; - /*0xE4*/ s16 bg2vofs; - /*0xE6*/ s16 bg2hofs; - /*0xE8*/ u16 sXY; - /*0xEA*/ u16 gbaScale; - /*0xEC*/ u16 alpha; - /*0xEE*/ bool8 isLinkTrade; - /*0xF0*/ u16 monSpecies[2]; - /*0xF4*/ u16 cachedMapMusic; - /*0xF6*/ u8 textColors[3]; - /*0xF9*/ u8 filler_F9; - /*0xFA*/ bool8 isCableTrade; - /*0xFB*/ u8 wirelessWinLeft; - /*0xFC*/ u8 wirelessWinTop; - /*0xFD*/ u8 wirelessWinRight; - /*0xFE*/ u8 wirelessWinBottom; -} *sTradeData = {NULL}; + struct Pokemon tempMon; // Used as a temp variable when swapping Pokémon + u32 timer; + u32 monPersonalities[2]; + u8 filler_70[2]; + u8 playerFinishStatus; + u8 partnerFinishStatus; + u16 linkData[10]; + u8 linkTimeoutZero1; + u8 linkTimeoutZero2; + u16 linkTimeoutTimer; + u16 neverRead_8C; + u8 monSpriteIds[2]; + u8 connectionSpriteId1; // Multi-purpose sprite ids used during the transfer sequence + u8 connectionSpriteId2; + u8 cableEndSpriteId; + u8 scheduleLinkTransfer; + u16 state; + u8 filler_96[0x3C]; + u8 releasePokeballSpriteId; + u8 bouncingPokeballSpriteId; + u16 texX; + u16 texY; + u16 neverRead_D8; + u16 neverRead_DA; + u16 scrX; + u16 scrY; + s16 bg1vofs; + s16 bg1hofs; + s16 bg2vofs; + s16 bg2hofs; + u16 sXY; + u16 gbaScale; + u16 alpha; + bool8 isLinkTrade; + u16 monSpecies[2]; + u16 cachedMapMusic; + u8 textColors[3]; + u8 filler_F9; + bool8 isCableTrade; + u8 wirelessWinLeft; + u8 wirelessWinTop; + u8 wirelessWinRight; + u8 wirelessWinBottom; +} *sTradeAnim = NULL; static bool32 IsWirelessTrade(void); static void CB2_CreateTradeMenu(void); static void VBlankCB_TradeMenu(void); static void CB2_TradeMenu(void); static void LoadTradeBgGfx(u8); -static void SetTradePartyMonsVisible(void); +static void SetActiveMenuOptions(void); static bool8 BufferTradeParties(void); -static void CB1_SendOrReactToLinkTradeData(void); -static void CallTradeMenuFunc(void); +static void CB1_UpdateLink(void); +static void RunTradeMenuCallback(void); static void SetSelectedMon(u8); -static void DrawTradeMenuParty(u8); +static void DrawSelectedMonScreen(u8); static u8 GetMonNicknameWidth(u8 *, u8, u8); -static void BufferTradeMonMoves(u8 *, u8, u8); -static void PrintPartyNicknamesForTradeMenu(u8); -static void DrawTradeMenuPartyMonInfo(u8, u8, u8, u8, u8, u8); -static void DrawTradeMenuPartyInfo(u8); -static void PrintNicknamesForTradeMenu(void); -static void RedrawTradeMenuParty(u8); +static void BufferMovesString(u8 *, u8, u8); +static void PrintPartyNicknames(u8); +static void PrintLevelAndGender(u8, u8, u8, u8, u8, u8); +static void PrintPartyLevelsAndGenders(u8); +static void PrintTradePartnerPartyNicknames(void); +static void RedrawPartyWindow(u8); static void Task_DrawSelectionSummary(u8); static void Task_DrawSelectionTrade(u8); static void QueueAction(u16, u8); static u32 GetNumQueuedActions(void); static void DoQueuedActions(void); static void PrintTradeMessage(u8); -static bool8 LoadTradeMenuSpriteSheetsAndPalettes(void); +static bool8 LoadUISpriteGfx(void); static void DrawBottomRowText(const u8 *, u8 *, u8); -static void SetTradePartyLiveStatuses(u8); -static void GetTradePartyHPBarLevels(u8); +static void ComputePartyTradeableFlags(u8); +static void ComputePartyHPBarLevels(u8); static void SetTradePartyHPBarSprites(void); static void SaveTradeGiftRibbons(void); static u32 CanTradeSelectedMon(struct Pokemon *, int, int); @@ -224,29 +293,29 @@ static void SpriteCB_LinkMonShadow(struct Sprite *); static void SpriteCB_CableEndSending(struct Sprite *); static void SpriteCB_CableEndReceiving(struct Sprite *); static void SpriteCB_GbaScreen(struct Sprite *); -static void InitTradeBgInternal(void); -static void CB2_UpdateInGameTrade(void); +static void TradeAnimInit_LoadGfx(void); +static void CB2_InGameTrade(void); static void SetTradeSequenceBgGpuRegs(u8); static void LoadTradeSequenceSpriteSheetsAndPalettes(void); static void BufferTradeSceneStrings(void); -static bool8 AnimateTradeSequence(void); -static bool8 AnimateTradeSequenceCable(void); -static bool8 AnimateTradeSequenceWireless(void); +static bool8 DoTradeAnim(void); +static bool8 DoTradeAnim_Cable(void); +static bool8 DoTradeAnim_Wireless(void); static void SpriteCB_BouncingPokeball(struct Sprite *); static void SpriteCB_BouncingPokeballDepart(struct Sprite *); static void SpriteCB_BouncingPokeballDepartEnd(struct Sprite *); static void SpriteCB_BouncingPokeballArrive(struct Sprite *); static void BufferInGameTradeMonName(void); -static void SetInGameTradeMail(struct Mail *, const struct InGameTrade *); +static void GetInGameTradeMail(struct Mail *, const struct InGameTrade *); static void CB2_UpdateLinkTrade(void); -static void CB2_TryFinishTrade(void); +static void CB2_WaitTradeComplete(void); static void CB2_SaveAndEndTrade(void); -static void CB2_FreeTradeData(void); +static void CB2_FreeTradeAnim(void); static void Task_InGameTrade(u8); static void CheckPartnersMonForRibbons(void); static void Task_AnimateWirelessSignal(u8); -static void Task_NarrowWindowForCrossing_Wireless(u8); -static void Task_NarrowWindowForCrossing_Cable(u8); +static void Task_OpenCenterWhiteColumn(u8); +static void Task_CloseCenterWhiteColumn(u8); static void CB2_SaveAndEndWirelessTrade(void); #include "data/trade.h" @@ -336,16 +405,16 @@ static void InitTradeMenu(void) LoadPalette(gStandardMenuPalette, BG_PLTT_ID(15), PLTT_SIZEOF(10)); LoadPalette(gStandardMenuPalette, BG_PLTT_ID(13), PLTT_SIZEOF(10)); ResetBgsAndClearDma3BusyFlags(0); - InitBgsFromTemplates(0, sTradeMenuBgTemplates, ARRAY_COUNT(sTradeMenuBgTemplates)); - SetBgTilemapBuffer(1, sTradeMenuData->tilemapBuffer); + InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates)); + SetBgTilemapBuffer(1, sTradeMenu->tilemapBuffer); - if (InitWindows(sTradeMenuWindowTemplates)) + if (InitWindows(sWindowTemplates)) { u32 i; DeactivateAllTextPrinters(); - for (i = 0; i < 18; i++) + for (i = 0; i < ARRAY_COUNT(sWindowTemplates) - 1; i++) { ClearWindowTilemap(i); FillWindowPixelBuffer(i, PIXEL_FILL(0)); @@ -355,14 +424,14 @@ static void InitTradeMenu(void) LoadUserWindowBorderGfx_(0, 20, BG_PLTT_ID(12)); LoadUserWindowBorderGfx(2, 1, BG_PLTT_ID(14)); LoadMonIconPalettes(); - sTradeMenuData->bufferPartyState = 0; - sTradeMenuData->tradeMenuFunc = 0; - sTradeMenuData->neverRead_70 = 0; - sTradeMenuData->drawPartyState[TRADE_PLAYER] = 0; - sTradeMenuData->drawPartyState[TRADE_PARTNER] = 0; - sTradeMenuData->playerLinkFlagStatus = 0; - sTradeMenuData->partnerLinkFlagStatus = 0; - sTradeMenuData->timer = 0; + sTradeMenu->bufferPartyState = 0; + sTradeMenu->callbackId = CB_MAIN_MENU; + sTradeMenu->neverRead_70 = 0; + sTradeMenu->drawSelectedMonState[TRADE_PLAYER] = 0; + sTradeMenu->drawSelectedMonState[TRADE_PARTNER] = 0; + sTradeMenu->playerConfirmStatus = STATUS_NONE; + sTradeMenu->partnerConfirmStatus = STATUS_NONE; + sTradeMenu->timer = 0; } } @@ -383,12 +452,12 @@ static void CB2_CreateTradeMenu(void) switch (gMain.state) { case 0: - sTradeMenuData = AllocZeroed(sizeof(*sTradeMenuData)); + sTradeMenu = AllocZeroed(sizeof(*sTradeMenu)); InitTradeMenu(); - sMenuTextAllocBuffer = AllocZeroed(GFXTAG_MENU_TEXT_COUNT * 256); + sMenuTextTileBuffer = AllocZeroed(NUM_MENU_TEXT_SPRITES * 256); - for (i = 0; i < GFXTAG_MENU_TEXT_COUNT; i++) - sMenuTextTileBuffers[i] = &sMenuTextAllocBuffer[i * 256]; + for (i = 0; i < NUM_MENU_TEXT_SPRITES; i++) + sMenuTextTileBuffers[i] = &sMenuTextTileBuffer[i * 256]; gMain.state++; break; @@ -398,13 +467,13 @@ static void CB2_CreateTradeMenu(void) for (i = 0; i < PARTY_SIZE; i++) CreateMon(&gEnemyParty[i], SPECIES_NONE, 0, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0); - PrintTradeMessage(TRADE_MSG_STANDBY); + PrintTradeMessage(MSG_STANDBY); ShowBg(0); if (!gReceivedRemoteLinkPlayers) { gLinkType = LINKTYPE_TRADE_CONNECTING; - sTradeMenuData->timer = 0; + sTradeMenu->timer = 0; if (gWirelessCommType) { @@ -425,10 +494,10 @@ static void CB2_CreateTradeMenu(void) } break; case 2: - sTradeMenuData->timer++; - if (sTradeMenuData->timer > 11) + sTradeMenu->timer++; + if (sTradeMenu->timer > 11) { - sTradeMenuData->timer = 0; + sTradeMenu->timer = 0; gMain.state++; } break; @@ -437,7 +506,7 @@ static void CB2_CreateTradeMenu(void) { if (IsLinkMaster()) { - if (++sTradeMenuData->timer > 30) + if (++sTradeMenu->timer > 30) { CheckShouldAdvanceLinkState(); gMain.state++; @@ -455,7 +524,7 @@ static void CB2_CreateTradeMenu(void) DestroyTask_RfuIdle(); CalculatePlayerPartyCount(); gMain.state++; - sTradeMenuData->timer = 0; + sTradeMenu->timer = 0; if (gWirelessCommType) { Rfu_SetLinkRecovery(TRUE); @@ -489,13 +558,13 @@ static void CB2_CreateTradeMenu(void) CalculateEnemyPartyCount(); SetGpuReg(REG_OFFSET_DISPCNT, 0); SetGpuReg(REG_OFFSET_BLDCNT, 0); - sTradeMenuData->partyCounts[TRADE_PLAYER] = gPlayerPartyCount; - sTradeMenuData->partyCounts[TRADE_PARTNER] = gEnemyPartyCount; + sTradeMenu->partyCounts[TRADE_PLAYER] = gPlayerPartyCount; + sTradeMenu->partyCounts[TRADE_PARTNER] = gEnemyPartyCount; - for (i = 0; i < sTradeMenuData->partyCounts[TRADE_PLAYER]; i++) + for (i = 0; i < sTradeMenu->partyCounts[TRADE_PLAYER]; i++) { struct Pokemon *mon = &gPlayerParty[i]; - sTradeMenuData->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2), + sTradeMenu->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES_OR_EGG), SpriteCB_MonIcon, (sTradeMonSpriteCoords[i][0] * 8) + 14, (sTradeMonSpriteCoords[i][1] * 8) - 12, @@ -503,10 +572,10 @@ static void CB2_CreateTradeMenu(void) GetMonData(mon, MON_DATA_PERSONALITY)); } - for (i = 0; i < sTradeMenuData->partyCounts[TRADE_PARTNER]; i++) + for (i = 0; i < sTradeMenu->partyCounts[TRADE_PARTNER]; i++) { struct Pokemon *mon = &gEnemyParty[i]; - sTradeMenuData->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL), + sTradeMenu->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL), SpriteCB_MonIcon, (sTradeMonSpriteCoords[i + PARTY_SIZE][0] * 8) + 14, (sTradeMonSpriteCoords[i + PARTY_SIZE][1] * 8) - 12, @@ -517,30 +586,30 @@ static void CB2_CreateTradeMenu(void) break; case 8: LoadHeldItemIcons(); - DrawHeldItemIconsForTrade(&sTradeMenuData->partyCounts[0], sTradeMenuData->partySpriteIds[0], TRADE_PLAYER); + DrawHeldItemIconsForTrade(&sTradeMenu->partyCounts[0], sTradeMenu->partySpriteIds[0], TRADE_PLAYER); gMain.state++; break; case 9: - DrawHeldItemIconsForTrade(&sTradeMenuData->partyCounts[0], sTradeMenuData->partySpriteIds[0], TRADE_PARTNER); + DrawHeldItemIconsForTrade(&sTradeMenu->partyCounts[0], sTradeMenu->partySpriteIds[0], TRADE_PARTNER); gMain.state++; break; case 10: DrawTextWindowAndBufferTiles(gSaveBlock2Ptr->playerName, sMenuTextTileBuffers[GFXTAG_PLAYER_NAME_L], 0, 0, 3); id = GetMultiplayerId(); DrawTextWindowAndBufferTiles(gLinkPlayers[id ^ 1].name, sMenuTextTileBuffers[GFXTAG_PARTNER_NAME_L], 0, 0, 3); - DrawTextWindowAndBufferTiles(sTradeActionTexts[TRADE_TEXT_CANCEL], sMenuTextTileBuffers[GFXTAG_CANCEL_L], 0, 0, 2); - DrawBottomRowText(sTradeActionTexts[TRADE_TEXT_CHOOSE_MON], sMenuTextTileBuffers[GFXTAG_CHOOSE_PKMN_L], 24); + DrawTextWindowAndBufferTiles(sActionTexts[TEXT_CANCEL], sMenuTextTileBuffers[GFXTAG_CANCEL_L], 0, 0, 2); + DrawBottomRowText(sActionTexts[TEXT_CHOOSE_MON], sMenuTextTileBuffers[GFXTAG_CHOOSE_PKMN_L], 24); gMain.state++; - sTradeMenuData->timer = 0; + sTradeMenu->timer = 0; break; case 11: - if (LoadTradeMenuSpriteSheetsAndPalettes()) + if (LoadUISpriteGfx()) gMain.state++; break; case 12: // Create player's name text sprites xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gSaveBlock2Ptr->playerName, 120); - for (i = 0; i < GFXTAG_PLAYER_NAME; i++) + for (i = 0; i < NUM_PLAYER_NAME_SPRITES; i++) { temp = sSpriteTemplate_MenuText; temp.tileTag += i + GFXTAG_PLAYER_NAME_L; @@ -549,7 +618,7 @@ static void CB2_CreateTradeMenu(void) // Create partner's name text sprites xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gLinkPlayers[GetMultiplayerId() ^ 1].name, 120); - for (i = 0; i < GFXTAG_PARTNER_NAME; i++) + for (i = 0; i < NUM_PARTNER_NAME_SPRITES; i++) { temp = sSpriteTemplate_MenuText; temp.tileTag += i + GFXTAG_PARTNER_NAME_L; @@ -564,33 +633,33 @@ static void CB2_CreateTradeMenu(void) CreateSprite(&temp, 215, 152, 1); temp = sSpriteTemplate_MenuText; temp.tileTag += GFXTAG_CANCEL_R; - CreateSprite(&temp, 247, 152, 1); + CreateSprite(&temp, 215 + 32, 152, 1); // Create Choose a Pokémon text sprites (only 3 are needed, other 3 are empty) - for (i = 0; i < GFXTAG_CHOOSE_PKMN; i++) + for (i = 0; i < NUM_CHOOSE_PKMN_SPRITES; i++) { temp = sSpriteTemplate_MenuText; temp.tileTag += i + GFXTAG_CHOOSE_PKMN_L; CreateSprite(&temp, (i * 32) + 24, 150, 1); } - sTradeMenuData->cursorSpriteId = CreateSprite(&sSpriteTemplate_Cursor, sTradeMonSpriteCoords[0][0] * 8 + 32, sTradeMonSpriteCoords[0][1] * 8, 2); - sTradeMenuData->cursorPosition = 0; + sTradeMenu->cursorSpriteId = CreateSprite(&sSpriteTemplate_Cursor, sTradeMonSpriteCoords[0][0] * 8 + 32, sTradeMonSpriteCoords[0][1] * 8, 2); + sTradeMenu->cursorPosition = 0; gMain.state++; rbox_fill_rectangle(0); break; case 14: - SetTradePartyLiveStatuses(TRADE_PLAYER); - PrintPartyNicknamesForTradeMenu(TRADE_PLAYER); - sTradeMenuData->bg2hofs = 0; - sTradeMenuData->bg3hofs = 0; - SetTradePartyMonsVisible(); + ComputePartyTradeableFlags(TRADE_PLAYER); + PrintPartyNicknames(TRADE_PLAYER); + sTradeMenu->bg2hofs = 0; + sTradeMenu->bg3hofs = 0; + SetActiveMenuOptions(); gMain.state++; PlayBGM(MUS_SCHOOL); break; case 15: - SetTradePartyLiveStatuses(TRADE_PARTNER); - PrintPartyNicknamesForTradeMenu(TRADE_PARTNER); + ComputePartyTradeableFlags(TRADE_PARTNER); + PrintPartyNicknames(TRADE_PARTNER); gMain.state++; // fallthrough case 16: @@ -611,18 +680,18 @@ static void CB2_CreateTradeMenu(void) gMain.state++; break; case 20: - GetTradePartyHPBarLevels(TRADE_PLAYER); + ComputePartyHPBarLevels(TRADE_PLAYER); gMain.state++; break; case 21: - GetTradePartyHPBarLevels(TRADE_PARTNER); + ComputePartyHPBarLevels(TRADE_PARTNER); SetTradePartyHPBarSprites(); gMain.state++; break; case 22: if (!gPaletteFade.active) { - gMain.callback1 = CB1_SendOrReactToLinkTradeData; + gMain.callback1 = CB1_UpdateLink; SetMainCallback2(CB2_TradeMenu); } break; @@ -650,7 +719,7 @@ static void CB2_ReturnToTradeMenu(void) break; case 1: gMain.state++; - sTradeMenuData->timer = 0; + sTradeMenu->timer = 0; break; case 2: gMain.state++; @@ -675,16 +744,16 @@ static void CB2_ReturnToTradeMenu(void) break; case 7: CalculateEnemyPartyCount(); - sTradeMenuData->partyCounts[TRADE_PLAYER] = gPlayerPartyCount; - sTradeMenuData->partyCounts[TRADE_PARTNER] = gEnemyPartyCount; + sTradeMenu->partyCounts[TRADE_PLAYER] = gPlayerPartyCount; + sTradeMenu->partyCounts[TRADE_PARTNER] = gEnemyPartyCount; ClearWindowTilemap(0); - PrintPartyNicknamesForTradeMenu(TRADE_PLAYER); - PrintPartyNicknamesForTradeMenu(TRADE_PARTNER); + PrintPartyNicknames(TRADE_PLAYER); + PrintPartyNicknames(TRADE_PARTNER); - for (i = 0; i < sTradeMenuData->partyCounts[TRADE_PLAYER]; i++) + for (i = 0; i < sTradeMenu->partyCounts[TRADE_PLAYER]; i++) { struct Pokemon *mon = &gPlayerParty[i]; - sTradeMenuData->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL), + sTradeMenu->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL), SpriteCB_MonIcon, (sTradeMonSpriteCoords[i][0] * 8) + 14, (sTradeMonSpriteCoords[i][1] * 8) - 12, @@ -692,10 +761,10 @@ static void CB2_ReturnToTradeMenu(void) GetMonData(mon, MON_DATA_PERSONALITY)); } - for (i = 0; i < sTradeMenuData->partyCounts[TRADE_PARTNER]; i++) + for (i = 0; i < sTradeMenu->partyCounts[TRADE_PARTNER]; i++) { struct Pokemon *mon = &gEnemyParty[i]; - sTradeMenuData->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL), + sTradeMenu->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL), SpriteCB_MonIcon, (sTradeMonSpriteCoords[i + PARTY_SIZE][0] * 8) + 14, (sTradeMonSpriteCoords[i + PARTY_SIZE][1] * 8) - 12, @@ -706,30 +775,30 @@ static void CB2_ReturnToTradeMenu(void) break; case 8: LoadHeldItemIcons(); - DrawHeldItemIconsForTrade(&sTradeMenuData->partyCounts[0], sTradeMenuData->partySpriteIds[0], TRADE_PLAYER); + DrawHeldItemIconsForTrade(&sTradeMenu->partyCounts[0], sTradeMenu->partySpriteIds[0], TRADE_PLAYER); gMain.state++; break; case 9: - DrawHeldItemIconsForTrade(&sTradeMenuData->partyCounts[0], sTradeMenuData->partySpriteIds[0], TRADE_PARTNER); + DrawHeldItemIconsForTrade(&sTradeMenu->partyCounts[0], sTradeMenu->partySpriteIds[0], TRADE_PARTNER); gMain.state++; break; case 10: DrawTextWindowAndBufferTiles(gSaveBlock2Ptr->playerName, sMenuTextTileBuffers[GFXTAG_PLAYER_NAME_L], 0, 0, 3); id = GetMultiplayerId(); DrawTextWindowAndBufferTiles(gLinkPlayers[id ^ 1].name, sMenuTextTileBuffers[GFXTAG_PARTNER_NAME_L], 0, 0, 3); - DrawTextWindowAndBufferTiles(sTradeActionTexts[TRADE_TEXT_CANCEL], sMenuTextTileBuffers[GFXTAG_CANCEL_L], 0, 0, 2); - DrawBottomRowText(sTradeActionTexts[TRADE_TEXT_CHOOSE_MON], sMenuTextTileBuffers[GFXTAG_CHOOSE_PKMN_L], 24); + DrawTextWindowAndBufferTiles(sActionTexts[TEXT_CANCEL], sMenuTextTileBuffers[GFXTAG_CANCEL_L], 0, 0, 2); + DrawBottomRowText(sActionTexts[TEXT_CHOOSE_MON], sMenuTextTileBuffers[GFXTAG_CHOOSE_PKMN_L], 24); gMain.state++; - sTradeMenuData->timer = 0; + sTradeMenu->timer = 0; break; case 11: - if (LoadTradeMenuSpriteSheetsAndPalettes()) + if (LoadUISpriteGfx()) gMain.state++; break; case 12: // Create player's name text sprites xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gSaveBlock2Ptr->playerName, 120); - for (i = 0; i < GFXTAG_PLAYER_NAME; i++) + for (i = 0; i < NUM_PLAYER_NAME_SPRITES; i++) { temp = sSpriteTemplate_MenuText; temp.tileTag += i + GFXTAG_PLAYER_NAME_L; @@ -738,7 +807,7 @@ static void CB2_ReturnToTradeMenu(void) // Create partner's name text sprites xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gLinkPlayers[GetMultiplayerId() ^ 1].name, 120); - for (i = 0; i < GFXTAG_PARTNER_NAME; i++) + for (i = 0; i < NUM_PARTNER_NAME_SPRITES; i++) { temp = sSpriteTemplate_MenuText; temp.tileTag += i + GFXTAG_PARTNER_NAME_L; @@ -753,24 +822,24 @@ static void CB2_ReturnToTradeMenu(void) CreateSprite(&temp, 215, 152, 1); temp = sSpriteTemplate_MenuText; temp.tileTag += GFXTAG_CANCEL_R; - CreateSprite(&temp, 247, 152, 1); + CreateSprite(&temp, 215 + 32, 152, 1); // Create Choose a Pokémon text sprites - for (i = 0; i < GFXTAG_CHOOSE_PKMN; i++) + for (i = 0; i < NUM_CHOOSE_PKMN_SPRITES; i++) { temp = sSpriteTemplate_MenuText; temp.tileTag += i + GFXTAG_CHOOSE_PKMN_L; CreateSprite(&temp, (i * 32) + 24, 150, 1); } - if (sTradeMenuData->cursorPosition < PARTY_SIZE) - sTradeMenuData->cursorPosition = gLastViewedMonIndex; + if (sTradeMenu->cursorPosition < PARTY_SIZE) + sTradeMenu->cursorPosition = gLastViewedMonIndex; else - sTradeMenuData->cursorPosition = gLastViewedMonIndex + PARTY_SIZE; + sTradeMenu->cursorPosition = gLastViewedMonIndex + PARTY_SIZE; - sTradeMenuData->cursorSpriteId = CreateSprite(&sSpriteTemplate_Cursor, - sTradeMonSpriteCoords[sTradeMenuData->cursorPosition][0] * 8 + 32, - sTradeMonSpriteCoords[sTradeMenuData->cursorPosition][1] * 8, 2); + sTradeMenu->cursorSpriteId = CreateSprite(&sSpriteTemplate_Cursor, + sTradeMonSpriteCoords[sTradeMenu->cursorPosition][0] * 8 + 32, + sTradeMonSpriteCoords[sTradeMenu->cursorPosition][1] * 8, 2); gMain.state = 16; break; case 16: @@ -779,9 +848,9 @@ static void CB2_ReturnToTradeMenu(void) break; case 17: LoadTradeBgGfx(1); - sTradeMenuData->bg2hofs = 0; - sTradeMenuData->bg3hofs = 0; - SetTradePartyMonsVisible(); + sTradeMenu->bg2hofs = 0; + sTradeMenu->bg3hofs = 0; + SetActiveMenuOptions(); gMain.state++; break; case 18: @@ -804,9 +873,7 @@ static void CB2_ReturnToTradeMenu(void) break; case 22: if (!gPaletteFade.active) - { SetMainCallback2(CB2_TradeMenu); - } break; } @@ -823,59 +890,59 @@ static void VBlankCB_TradeMenu(void) TransferPlttBuffer(); } -static void LinkTradeFadeOut(void) +static void CB_FadeToStartTrade(void) { - if (++sTradeMenuData->timer > 15) + if (++sTradeMenu->timer > 15) { BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_LINK_TRADE_WAIT_FADE; + sTradeMenu->callbackId = CB_WAIT_TO_START_TRADE; } } -static void LinkTradeWaitForFade(void) +static void CB_WaitToStartTrade(void) { if (!gPaletteFade.active) { - gSelectedTradeMonPositions[TRADE_PLAYER] = sTradeMenuData->cursorPosition; - gSelectedTradeMonPositions[TRADE_PARTNER] = sTradeMenuData->partnerCursorPosition; + gSelectedTradeMonPositions[TRADE_PLAYER] = sTradeMenu->cursorPosition; + gSelectedTradeMonPositions[TRADE_PARTNER] = sTradeMenu->partnerCursorPosition; if (gWirelessCommType) { - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_LINK_TRADE_WAIT_QUEUE; + sTradeMenu->callbackId = CB_WAIT_TO_START_RFU_TRADE; } else { SetCloseLinkCallbackAndType(32); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_START_LINK_TRADE; + sTradeMenu->callbackId = CB_START_LINK_TRADE; } } } -static void SetLinkTradeCallbacks(void) +static void CB_StartLinkTrade(void) { gMain.savedCallback = CB2_StartCreateTradeMenu; - // Wireless Link Trade if (gWirelessCommType) { + // Wireless Link Trade if (IsLinkRfuTaskFinished()) { - Free(sMenuTextAllocBuffer); + Free(sMenuTextTileBuffer); FreeAllWindowBuffers(); - Free(sTradeMenuData); + Free(sTradeMenu); gMain.callback1 = NULL; DestroyWirelessStatusIndicatorSprite(); SetMainCallback2(CB2_LinkTrade); } } - // Cable Link Trade else { + // Cable Link Trade if (!gReceivedRemoteLinkPlayers) { - Free(sMenuTextAllocBuffer); + Free(sMenuTextTileBuffer); FreeAllWindowBuffers(); - Free(sTradeMenuData); + Free(sTradeMenu); gMain.callback1 = NULL; SetMainCallback2(CB2_LinkTrade); } @@ -884,13 +951,15 @@ static void SetLinkTradeCallbacks(void) static void CB2_TradeMenu(void) { - CallTradeMenuFunc(); + RunTradeMenuCallback(); DoQueuedActions(); - DrawTradeMenuParty(TRADE_PLAYER); - DrawTradeMenuParty(TRADE_PARTNER); - SetGpuReg(REG_OFFSET_BG2HOFS, sTradeMenuData->bg2hofs++); - SetGpuReg(REG_OFFSET_BG3HOFS, sTradeMenuData->bg3hofs--); + // As long as drawSelectedMonState is 0, these do nothing + DrawSelectedMonScreen(TRADE_PLAYER); + DrawSelectedMonScreen(TRADE_PARTNER); + + SetGpuReg(REG_OFFSET_BG2HOFS, sTradeMenu->bg2hofs++); + SetGpuReg(REG_OFFSET_BG3HOFS, sTradeMenu->bg3hofs--); RunTextPrintersAndIsPrinter0Active(); RunTasks(); @@ -913,8 +982,8 @@ static void LoadTradeBgGfx(u8 state) break; case 1: LoadBgTilemap(3, sTradeStripesBG3Tilemap, 0x800, 0); - DrawTradeMenuPartyInfo(TRADE_PLAYER); - DrawTradeMenuPartyInfo(TRADE_PARTNER); + PrintPartyLevelsAndGenders(TRADE_PLAYER); + PrintPartyLevelsAndGenders(TRADE_PARTNER); CopyBgTilemapBufferToVram(1); break; case 2: @@ -928,47 +997,50 @@ static void LoadTradeBgGfx(u8 state) } } -static void SetTradePartyMonsVisible(void) +// Determine (based on party counts) where the main menu cursor can go +static void SetActiveMenuOptions(void) { int i; for (i = 0; i < PARTY_SIZE; i++) { - if (i < sTradeMenuData->partyCounts[TRADE_PLAYER]) + if (i < sTradeMenu->partyCounts[TRADE_PLAYER]) { - gSprites[sTradeMenuData->partySpriteIds[TRADE_PLAYER][i]].invisible = FALSE; - sTradeMenuData->monPresent[i] = TRUE; + // Present player pokemon + gSprites[sTradeMenu->partySpriteIds[TRADE_PLAYER][i]].invisible = FALSE; + sTradeMenu->optionsActive[i] = TRUE; } else { - sTradeMenuData->monPresent[i] = FALSE; + // Absent player pokemon + sTradeMenu->optionsActive[i] = FALSE; } - if (i < sTradeMenuData->partyCounts[TRADE_PARTNER]) + if (i < sTradeMenu->partyCounts[TRADE_PARTNER]) { - gSprites[sTradeMenuData->partySpriteIds[TRADE_PARTNER][i]].invisible = FALSE; - sTradeMenuData->monPresent[i + PARTY_SIZE] = TRUE; + // Present partner pokemon + gSprites[sTradeMenu->partySpriteIds[TRADE_PARTNER][i]].invisible = FALSE; + sTradeMenu->optionsActive[i + PARTY_SIZE] = TRUE; } else { - sTradeMenuData->monPresent[i + PARTY_SIZE] = FALSE; + // Absent partner pokemon + sTradeMenu->optionsActive[i + PARTY_SIZE] = FALSE; } } - sTradeMenuData->neverRead_44 = TRUE; + // Cancel is always active + sTradeMenu->optionsActive[PARTY_SIZE * 2] = TRUE; } // why not just use memcpy? -static void Trade_Memcpy(void *dataDest, const void *dataSrc, u32 count) +static void Trade_Memcpy(void *dest, const void *src, u32 size) { - u8 *dest = dataDest; - const u8 *src = dataSrc; + u8 *_dest = dest; + const u8 *_src = src; u32 i; - - for (i = 0; i < count; i++) - { - dest[i] = src[i]; - } + for (i = 0; i < size; i++) + _dest[i] = _src[i]; } static bool8 BufferTradeParties(void) @@ -977,107 +1049,107 @@ static bool8 BufferTradeParties(void) int i; struct Pokemon *mon; - switch (sTradeMenuData->bufferPartyState) + switch (sTradeMenu->bufferPartyState) { case 0: // The parties are sent in pairs rather than all at once Trade_Memcpy(gBlockSendBuffer, &gPlayerParty[0], 2 * sizeof(struct Pokemon)); - sTradeMenuData->bufferPartyState++; - sTradeMenuData->timer = 0; + sTradeMenu->bufferPartyState++; + sTradeMenu->timer = 0; break; case 1: if (IsLinkTradeTaskFinished()) { if (_GetBlockReceivedStatus() == 0) { - sTradeMenuData->bufferPartyState++; + sTradeMenu->bufferPartyState++; } else { TradeResetReceivedFlags(); - sTradeMenuData->bufferPartyState++; + sTradeMenu->bufferPartyState++; } } break; case 3: if (id == 0) RequestLinkData(BLOCK_REQ_SIZE_200); - sTradeMenuData->bufferPartyState++; + sTradeMenu->bufferPartyState++; break; case 4: if (_GetBlockReceivedStatus() == 3) { Trade_Memcpy(&gEnemyParty[0], gBlockRecvBuffer[id ^ 1], 2 * sizeof(struct Pokemon)); TradeResetReceivedFlags(); - sTradeMenuData->bufferPartyState++; + sTradeMenu->bufferPartyState++; } break; case 5: Trade_Memcpy(gBlockSendBuffer, &gPlayerParty[2], 2 * sizeof(struct Pokemon)); - sTradeMenuData->bufferPartyState++; + sTradeMenu->bufferPartyState++; break; case 7: if (id == 0) RequestLinkData(BLOCK_REQ_SIZE_200); - sTradeMenuData->bufferPartyState++; + sTradeMenu->bufferPartyState++; break; case 8: if (_GetBlockReceivedStatus() == 3) { Trade_Memcpy(&gEnemyParty[2], gBlockRecvBuffer[id ^ 1], 2 * sizeof(struct Pokemon)); TradeResetReceivedFlags(); - sTradeMenuData->bufferPartyState++; + sTradeMenu->bufferPartyState++; } break; case 9: Trade_Memcpy(gBlockSendBuffer, &gPlayerParty[4], 2 * sizeof(struct Pokemon)); - sTradeMenuData->bufferPartyState++; + sTradeMenu->bufferPartyState++; break; case 11: if (id == 0) RequestLinkData(BLOCK_REQ_SIZE_200); - sTradeMenuData->bufferPartyState++; + sTradeMenu->bufferPartyState++; break; case 12: if (_GetBlockReceivedStatus() == 3) { Trade_Memcpy(&gEnemyParty[4], gBlockRecvBuffer[id ^ 1], 2 * sizeof(struct Pokemon)); TradeResetReceivedFlags(); - sTradeMenuData->bufferPartyState++; + sTradeMenu->bufferPartyState++; } break; case 13: Trade_Memcpy(gBlockSendBuffer, gSaveBlock1Ptr->mail, PARTY_SIZE * sizeof(struct Mail) + 4); - sTradeMenuData->bufferPartyState++; + sTradeMenu->bufferPartyState++; break; case 15: if (id == 0) RequestLinkData(BLOCK_REQ_SIZE_220); - sTradeMenuData->bufferPartyState++; + sTradeMenu->bufferPartyState++; break; case 16: if (_GetBlockReceivedStatus() == 3) { Trade_Memcpy(gTradeMail, gBlockRecvBuffer[id ^ 1], PARTY_SIZE * sizeof(struct Mail)); TradeResetReceivedFlags(); - sTradeMenuData->bufferPartyState++; + sTradeMenu->bufferPartyState++; } break; case 17: - Trade_Memcpy(gBlockSendBuffer, gSaveBlock1Ptr->giftRibbons, sizeof(sTradeMenuData->giftRibbons)); - sTradeMenuData->bufferPartyState++; + Trade_Memcpy(gBlockSendBuffer, gSaveBlock1Ptr->giftRibbons, sizeof(sTradeMenu->giftRibbons)); + sTradeMenu->bufferPartyState++; break; case 19: if (id == 0) RequestLinkData(BLOCK_REQ_SIZE_40); - sTradeMenuData->bufferPartyState++; + sTradeMenu->bufferPartyState++; break; case 20: if (_GetBlockReceivedStatus() == 3) { - Trade_Memcpy(sTradeMenuData->giftRibbons, gBlockRecvBuffer[id ^ 1], sizeof(sTradeMenuData->giftRibbons)); + Trade_Memcpy(sTradeMenu->giftRibbons, gBlockRecvBuffer[id ^ 1], sizeof(sTradeMenu->giftRibbons)); TradeResetReceivedFlags(); - sTradeMenuData->bufferPartyState++; + sTradeMenu->bufferPartyState++; } break; case 21: @@ -1092,10 +1164,8 @@ static bool8 BufferTradeParties(void) { GetMonData(mon, MON_DATA_NICKNAME, name); - if (!StringCompareWithoutExtCtrlCodes(name, sJPText_Shedinja)) - { + if (!StringCompareWithoutExtCtrlCodes(name, sText_ShedinjaJP)) SetMonData(mon, MON_DATA_NICKNAME, gSpeciesNames[SPECIES_SHEDINJA]); - } } } } @@ -1106,40 +1176,39 @@ static bool8 BufferTradeParties(void) case 10: case 14: case 18: - sTradeMenuData->timer++; - if (sTradeMenuData->timer > 10) + sTradeMenu->timer++; + if (sTradeMenu->timer > 10) { - sTradeMenuData->timer = 0; - sTradeMenuData->bufferPartyState++; + sTradeMenu->timer = 0; + sTradeMenu->bufferPartyState++; } break; } return FALSE; } -static void DrawIsThisTradeOkay(void) +static void PrintIsThisTradeOkay(void) { - DrawBottomRowText(sText_IsThisTradeOkay, (void *)(OBJ_VRAM0 + (sTradeMenuData->bottomTextTileStart * 32)), 24); + DrawBottomRowText(sText_IsThisTradeOkay, (void *)(OBJ_VRAM0 + (sTradeMenu->bottomTextTileStart * 32)), 24); } -// mpId is unused -static void UpdateLinkTradeFlags(u8 mpId, u8 status) +static void Leader_ReadLinkBuffer(u8 mpId, u8 status) { if (status & 1) { switch (gBlockRecvBuffer[0][0]) { case LINKCMD_REQUEST_CANCEL: - sTradeMenuData->playerLinkFlagChoseAction = WANTS_TO_CANCEL; + sTradeMenu->playerSelectStatus = STATUS_CANCEL; break; case LINKCMD_READY_TO_TRADE: - sTradeMenuData->playerLinkFlagChoseAction = WANTS_TO_TRADE; + sTradeMenu->playerSelectStatus = STATUS_READY; break; case LINKCMD_INIT_BLOCK: - sTradeMenuData->playerLinkFlagStatus = INITIATE_TRADE; + sTradeMenu->playerConfirmStatus = STATUS_READY; break; case LINKCMD_READY_CANCEL_TRADE: - sTradeMenuData->playerLinkFlagStatus = CANCEL_TRADE; + sTradeMenu->playerConfirmStatus = STATUS_CANCEL; break; } TradeResetReceivedFlag(0); @@ -1150,25 +1219,24 @@ static void UpdateLinkTradeFlags(u8 mpId, u8 status) switch (gBlockRecvBuffer[1][0]) { case LINKCMD_REQUEST_CANCEL: - sTradeMenuData->partnerLinkFlagChoseAction = WANTS_TO_CANCEL; + sTradeMenu->partnerSelectStatus = STATUS_CANCEL; break; case LINKCMD_READY_TO_TRADE: - sTradeMenuData->partnerCursorPosition = gBlockRecvBuffer[1][1] + 6; - sTradeMenuData->partnerLinkFlagChoseAction = WANTS_TO_TRADE; + sTradeMenu->partnerCursorPosition = gBlockRecvBuffer[1][1] + PARTY_SIZE; + sTradeMenu->partnerSelectStatus = STATUS_READY; break; case LINKCMD_INIT_BLOCK: - sTradeMenuData->partnerLinkFlagStatus = INITIATE_TRADE; + sTradeMenu->partnerConfirmStatus = STATUS_READY; break; case LINKCMD_READY_CANCEL_TRADE: - sTradeMenuData->partnerLinkFlagStatus = CANCEL_TRADE; + sTradeMenu->partnerConfirmStatus = STATUS_CANCEL; break; } TradeResetReceivedFlag(1); } } -// mpId is unused -static void ReactToLinkTradeData(u8 mpId, u8 status) +static void Follower_ReadLinkBuffer(u8 mpId, u8 status) { if (status & 1) { @@ -1176,27 +1244,27 @@ static void ReactToLinkTradeData(u8 mpId, u8 status) { case LINKCMD_BOTH_CANCEL_TRADE: BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - PrintTradeMessage(TRADE_MSG_WAITING_FOR_FRIEND); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_CANCEL_TRADE_1; + PrintTradeMessage(MSG_WAITING_FOR_FRIEND); + sTradeMenu->callbackId = CB_INIT_EXIT_CANCELED_TRADE; break; case LINKCMD_PARTNER_CANCEL_TRADE: - PrintTradeMessage(TRADE_MSG_FRIEND_WANTS_TO_TRADE); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_REDRAW_MAIN_MENU; + PrintTradeMessage(MSG_FRIEND_WANTS_TO_TRADE); + sTradeMenu->callbackId = CB_HANDLE_TRADE_CANCELED; break; case LINKCMD_SET_MONS_TO_TRADE: - sTradeMenuData->partnerCursorPosition = gBlockRecvBuffer[0][1] + 6; + sTradeMenu->partnerCursorPosition = gBlockRecvBuffer[0][1] + PARTY_SIZE; rbox_fill_rectangle(0); - SetSelectedMon(sTradeMenuData->cursorPosition); - SetSelectedMon(sTradeMenuData->partnerCursorPosition); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_CONFIRM_TRADE_PROMPT; + SetSelectedMon(sTradeMenu->cursorPosition); + SetSelectedMon(sTradeMenu->partnerCursorPosition); + sTradeMenu->callbackId = CB_PRINT_IS_THIS_OKAY; break; case LINKCMD_START_TRADE: BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_LINK_TRADE_WAIT_FADE; + sTradeMenu->callbackId = CB_WAIT_TO_START_TRADE; break; case LINKCMD_PLAYER_CANCEL_TRADE: - PrintTradeMessage(TRADE_MSG_CANCELED); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_REDRAW_MAIN_MENU; + PrintTradeMessage(MSG_CANCELED); + sTradeMenu->callbackId = CB_HANDLE_TRADE_CANCELED; } TradeResetReceivedFlag(0); } @@ -1205,76 +1273,87 @@ static void ReactToLinkTradeData(u8 mpId, u8 status) TradeResetReceivedFlag(1); } -static void QueueLinkTradeData(void) +static void Leader_HandleCommunication(void) { - if (sTradeMenuData->playerLinkFlagChoseAction && sTradeMenuData->partnerLinkFlagChoseAction) + if (sTradeMenu->playerSelectStatus != STATUS_NONE + && sTradeMenu->partnerSelectStatus != STATUS_NONE) { - if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_TRADE - && sTradeMenuData->partnerLinkFlagChoseAction == WANTS_TO_TRADE) + if (sTradeMenu->playerSelectStatus == STATUS_READY + && sTradeMenu->partnerSelectStatus == STATUS_READY) { - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_BOTH_MONS_SELECTED; - sTradeMenuData->linkData[0] = LINKCMD_SET_MONS_TO_TRADE; - sTradeMenuData->linkData[1] = sTradeMenuData->cursorPosition; + // Both players have selected a pokemon to trade + sTradeMenu->callbackId = CB_SET_SELECTED_MONS; + sTradeMenu->linkData[0] = LINKCMD_SET_MONS_TO_TRADE; + sTradeMenu->linkData[1] = sTradeMenu->cursorPosition; QueueAction(QUEUE_DELAY_DATA, QUEUE_SEND_DATA); - sTradeMenuData->playerLinkFlagChoseAction = sTradeMenuData->partnerLinkFlagChoseAction = 0; + sTradeMenu->playerSelectStatus = sTradeMenu->partnerSelectStatus = STATUS_NONE; } - else if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_TRADE - && sTradeMenuData->partnerLinkFlagChoseAction == WANTS_TO_CANCEL) + else if (sTradeMenu->playerSelectStatus == STATUS_READY + && sTradeMenu->partnerSelectStatus == STATUS_CANCEL) { - PrintTradeMessage(TRADE_MSG_CANCELED); - sTradeMenuData->linkData[0] = LINKCMD_PARTNER_CANCEL_TRADE; - sTradeMenuData->linkData[1] = 0; + // The player has selected a pokemon to trade, + // but the partner has selected Cancel + PrintTradeMessage(MSG_CANCELED); + sTradeMenu->linkData[0] = LINKCMD_PARTNER_CANCEL_TRADE; + sTradeMenu->linkData[1] = 0; QueueAction(QUEUE_DELAY_DATA, QUEUE_SEND_DATA); - sTradeMenuData->playerLinkFlagStatus = sTradeMenuData->partnerLinkFlagStatus = 0; - sTradeMenuData->playerLinkFlagChoseAction = sTradeMenuData->partnerLinkFlagChoseAction = 0; - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_REDRAW_MAIN_MENU; + sTradeMenu->playerConfirmStatus = sTradeMenu->partnerConfirmStatus = STATUS_NONE; + sTradeMenu->playerSelectStatus = sTradeMenu->partnerSelectStatus = STATUS_NONE; + sTradeMenu->callbackId = CB_HANDLE_TRADE_CANCELED; } - else if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_CANCEL - && sTradeMenuData->partnerLinkFlagChoseAction == WANTS_TO_TRADE) + else if (sTradeMenu->playerSelectStatus == STATUS_CANCEL + && sTradeMenu->partnerSelectStatus == STATUS_READY) { - PrintTradeMessage(TRADE_MSG_FRIEND_WANTS_TO_TRADE); - sTradeMenuData->linkData[0] = LINKCMD_PLAYER_CANCEL_TRADE; - sTradeMenuData->linkData[1] = 0; + // The partner has selected a pokemon to trade, + // but the player has selected cancel + PrintTradeMessage(MSG_FRIEND_WANTS_TO_TRADE); + sTradeMenu->linkData[0] = LINKCMD_PLAYER_CANCEL_TRADE; + sTradeMenu->linkData[1] = 0; QueueAction(QUEUE_DELAY_DATA, QUEUE_SEND_DATA); - sTradeMenuData->playerLinkFlagStatus = sTradeMenuData->partnerLinkFlagStatus = 0; - sTradeMenuData->playerLinkFlagChoseAction = sTradeMenuData->partnerLinkFlagChoseAction = 0; - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_REDRAW_MAIN_MENU; + sTradeMenu->playerConfirmStatus = sTradeMenu->partnerConfirmStatus = STATUS_NONE; + sTradeMenu->playerSelectStatus = sTradeMenu->partnerSelectStatus = STATUS_NONE; + sTradeMenu->callbackId = CB_HANDLE_TRADE_CANCELED; } - else if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_CANCEL - && sTradeMenuData->partnerLinkFlagChoseAction == WANTS_TO_CANCEL) + else if (sTradeMenu->playerSelectStatus == STATUS_CANCEL + && sTradeMenu->partnerSelectStatus == STATUS_CANCEL) { - sTradeMenuData->linkData[0] = LINKCMD_BOTH_CANCEL_TRADE; - sTradeMenuData->linkData[1] = 0; + // Both players have selected Cancel + sTradeMenu->linkData[0] = LINKCMD_BOTH_CANCEL_TRADE; + sTradeMenu->linkData[1] = 0; QueueAction(QUEUE_DELAY_DATA, QUEUE_SEND_DATA); BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - sTradeMenuData->playerLinkFlagChoseAction = sTradeMenuData->partnerLinkFlagChoseAction = 0; - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_CANCEL_TRADE_1; + sTradeMenu->playerSelectStatus = sTradeMenu->partnerSelectStatus = STATUS_NONE; + sTradeMenu->callbackId = CB_INIT_EXIT_CANCELED_TRADE; } } - if (sTradeMenuData->playerLinkFlagStatus && sTradeMenuData->partnerLinkFlagStatus) + if (sTradeMenu->playerConfirmStatus != STATUS_NONE + && sTradeMenu->partnerConfirmStatus != STATUS_NONE) { - if (sTradeMenuData->playerLinkFlagStatus == INITIATE_TRADE - && sTradeMenuData->partnerLinkFlagStatus == INITIATE_TRADE) + if (sTradeMenu->playerConfirmStatus == STATUS_READY + && sTradeMenu->partnerConfirmStatus == STATUS_READY) { - sTradeMenuData->linkData[0] = LINKCMD_START_TRADE; - sTradeMenuData->linkData[1] = 0; + // Both players have confirmed trade + sTradeMenu->linkData[0] = LINKCMD_START_TRADE; + sTradeMenu->linkData[1] = 0; QueueAction(QUEUE_DELAY_DATA, QUEUE_SEND_DATA); - sTradeMenuData->playerLinkFlagStatus = 0; - sTradeMenuData->partnerLinkFlagStatus = 0; - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_LINK_TRADE_FADE_OUT; + sTradeMenu->playerConfirmStatus = STATUS_NONE; + sTradeMenu->partnerConfirmStatus = STATUS_NONE; + sTradeMenu->callbackId = CB_FADE_TO_START_TRADE; } - if (sTradeMenuData->playerLinkFlagStatus == CANCEL_TRADE - || sTradeMenuData->partnerLinkFlagStatus == CANCEL_TRADE) + if (sTradeMenu->playerConfirmStatus == STATUS_CANCEL + || sTradeMenu->partnerConfirmStatus == STATUS_CANCEL) { - PrintTradeMessage(TRADE_MSG_CANCELED); - sTradeMenuData->linkData[0] = LINKCMD_PLAYER_CANCEL_TRADE; - sTradeMenuData->linkData[1] = 0; + // One of the players has decided not to confirm the trade, + // or the trade was not allowed. + PrintTradeMessage(MSG_CANCELED); + sTradeMenu->linkData[0] = LINKCMD_PLAYER_CANCEL_TRADE; + sTradeMenu->linkData[1] = 0; QueueAction(QUEUE_DELAY_DATA, QUEUE_SEND_DATA); - sTradeMenuData->playerLinkFlagStatus = 0; - sTradeMenuData->partnerLinkFlagStatus = 0; - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_REDRAW_MAIN_MENU; + sTradeMenu->playerConfirmStatus = STATUS_NONE; + sTradeMenu->partnerConfirmStatus = STATUS_NONE; + sTradeMenu->callbackId = CB_HANDLE_TRADE_CANCELED; } } } @@ -1288,10 +1367,10 @@ static void _SetLinkData(u16 *linkData, u16 linkCmd, u16 cursorPosition) static void SetLinkData(u16 linkCmd, u16 cursorPosition) { - _SetLinkData(sTradeMenuData->linkData, linkCmd, cursorPosition); + _SetLinkData(sTradeMenu->linkData, linkCmd, cursorPosition); } -static void CB1_SendOrReactToLinkTradeData(void) +static void CB1_UpdateLink(void) { u8 mpId = GetMultiplayerId(); u8 status; @@ -1299,25 +1378,25 @@ static void CB1_SendOrReactToLinkTradeData(void) if ((status = _GetBlockReceivedStatus())) { if (mpId == 0) - UpdateLinkTradeFlags(mpId, status); + Leader_ReadLinkBuffer(mpId, status); else - ReactToLinkTradeData(mpId, status); + Follower_ReadLinkBuffer(mpId, status); } if (mpId == 0) - QueueLinkTradeData(); + Leader_HandleCommunication(); } -static u8 GetNewTradeMenuPosition(u8 oldPosition, u8 direction) +static u8 GetNewCursorPosition(u8 oldPosition, u8 direction) { int i; u8 newPosition = 0; for (i = 0; i < PARTY_SIZE; i++) { - if (sTradeMenuData->monPresent[sTradeNextSelectedMonTable[oldPosition][direction][i]] == TRUE) + if (sTradeMenu->optionsActive[sCursorMoveDestinations[oldPosition][direction][i]] == TRUE) { - newPosition = sTradeNextSelectedMonTable[oldPosition][direction][i]; + newPosition = sCursorMoveDestinations[oldPosition][direction][i]; break; } } @@ -1327,157 +1406,151 @@ static u8 GetNewTradeMenuPosition(u8 oldPosition, u8 direction) static void TradeMenuMoveCursor(u8 *cursorPosition, u8 direction) { - u8 newPosition = GetNewTradeMenuPosition(*cursorPosition, direction); + u8 newPosition = GetNewCursorPosition(*cursorPosition, direction); if (newPosition == (PARTY_SIZE * 2)) // CANCEL { - StartSpriteAnim(&gSprites[sTradeMenuData->cursorSpriteId], CURSOR_ANIM_ON_CANCEL); - gSprites[sTradeMenuData->cursorSpriteId].x = DISPLAY_WIDTH - 16; - gSprites[sTradeMenuData->cursorSpriteId].y = DISPLAY_HEIGHT; + StartSpriteAnim(&gSprites[sTradeMenu->cursorSpriteId], CURSOR_ANIM_ON_CANCEL); + gSprites[sTradeMenu->cursorSpriteId].x = DISPLAY_WIDTH - 16; + gSprites[sTradeMenu->cursorSpriteId].y = DISPLAY_HEIGHT; } else { - StartSpriteAnim(&gSprites[sTradeMenuData->cursorSpriteId], CURSOR_ANIM_NORMAL); - gSprites[sTradeMenuData->cursorSpriteId].x = sTradeMonSpriteCoords[newPosition][0] * 8 + 32; - gSprites[sTradeMenuData->cursorSpriteId].y = sTradeMonSpriteCoords[newPosition][1] * 8; + StartSpriteAnim(&gSprites[sTradeMenu->cursorSpriteId], CURSOR_ANIM_NORMAL); + gSprites[sTradeMenu->cursorSpriteId].x = sTradeMonSpriteCoords[newPosition][0] * 8 + 32; + gSprites[sTradeMenu->cursorSpriteId].y = sTradeMonSpriteCoords[newPosition][1] * 8; } if (*cursorPosition != newPosition) - { PlaySE(SE_SELECT); - } *cursorPosition = newPosition; } static void SetReadyToTrade(void) { - PrintTradeMessage(TRADE_MSG_STANDBY); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_STANDBY; + PrintTradeMessage(MSG_STANDBY); + sTradeMenu->callbackId = CB_IDLE; if (GetMultiplayerId() == 1) - SetLinkData(LINKCMD_READY_TO_TRADE, sTradeMenuData->cursorPosition); + { + // Communicate to the link leader that we're ready to trade + SetLinkData(LINKCMD_READY_TO_TRADE, sTradeMenu->cursorPosition); + } else - sTradeMenuData->playerLinkFlagChoseAction = WANTS_TO_TRADE; + { + // We are the link leader, no communication necessary + sTradeMenu->playerSelectStatus = STATUS_READY; + } } -static void TradeMenuProcessInput(void) +static void CB_ProcessMenuInput(void) { if (JOY_REPEAT(DPAD_UP)) - { - TradeMenuMoveCursor(&sTradeMenuData->cursorPosition, 0); - } + TradeMenuMoveCursor(&sTradeMenu->cursorPosition, 0); else if (JOY_REPEAT(DPAD_DOWN)) - { - TradeMenuMoveCursor(&sTradeMenuData->cursorPosition, 1); - } + TradeMenuMoveCursor(&sTradeMenu->cursorPosition, 1); else if (JOY_REPEAT(DPAD_LEFT)) - { - TradeMenuMoveCursor(&sTradeMenuData->cursorPosition, 2); - } + TradeMenuMoveCursor(&sTradeMenu->cursorPosition, 2); else if (JOY_REPEAT(DPAD_RIGHT)) - { - TradeMenuMoveCursor(&sTradeMenuData->cursorPosition, 3); - } + TradeMenuMoveCursor(&sTradeMenu->cursorPosition, 3); if (JOY_NEW(A_BUTTON)) { PlaySE(SE_SELECT); - // Cursor is in player's party - if (sTradeMenuData->cursorPosition < PARTY_SIZE) + if (sTradeMenu->cursorPosition < PARTY_SIZE) { + // Selected pokemon in player's party DrawTextBorderOuter(1, 1, 14); FillWindowPixelBuffer(1, PIXEL_FILL(1)); PrintMenuTable(1, ARRAY_COUNT(sSelectTradeMonActions), sSelectTradeMonActions); InitMenuInUpperLeftCornerNormal(1, ARRAY_COUNT(sSelectTradeMonActions), 0); PutWindowTilemap(1); CopyWindowToVram(1, COPYWIN_FULL); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_SELECTED_MON; + sTradeMenu->callbackId = CB_SELECTED_MON; } - // Cursor is in partner's party - else if (sTradeMenuData->cursorPosition < PARTY_SIZE * 2) + else if (sTradeMenu->cursorPosition < PARTY_SIZE * 2) { + // Selected pokemon in partner's party BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_SHOW_MON_SUMMARY; + sTradeMenu->callbackId = CB_SHOW_MON_SUMMARY; } - // Cursor is on Cancel - else if (sTradeMenuData->cursorPosition == PARTY_SIZE * 2) + else if (sTradeMenu->cursorPosition == PARTY_SIZE * 2) { + // Selected Cancel CreateYesNoMenu(&sTradeYesNoWindowTemplate, 1, 14, 0); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_CANCEL_TRADE_PROMPT; - DrawBottomRowText(sTradeActionTexts[TRADE_TEXT_CANCEL_TRADE], (void *)(OBJ_VRAM0 + sTradeMenuData->bottomTextTileStart * 32), 24); + sTradeMenu->callbackId = CB_CANCEL_TRADE_PROMPT; + DrawBottomRowText(sActionTexts[TEXT_CANCEL_TRADE], (void *)(OBJ_VRAM0 + sTradeMenu->bottomTextTileStart * 32), 24); } } } -static void TradeMenuChooseMon(void) +static void RedrawChooseAPokemonWindow(void) { - PrintNicknamesForTradeMenu(); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_MAIN_MENU; - gSprites[sTradeMenuData->cursorSpriteId].invisible = FALSE; - DrawBottomRowText(sTradeActionTexts[TRADE_TEXT_CHOOSE_MON], (void *)(OBJ_VRAM0 + sTradeMenuData->bottomTextTileStart * 32), 24); + PrintTradePartnerPartyNicknames(); + sTradeMenu->callbackId = CB_MAIN_MENU; + gSprites[sTradeMenu->cursorSpriteId].invisible = FALSE; + DrawBottomRowText(sActionTexts[TEXT_CHOOSE_MON], (void *)(OBJ_VRAM0 + sTradeMenu->bottomTextTileStart * 32), 24); } -static void TradeMenuProcessInput_SelectedMon(void) +static void CB_ProcessSelectedMonInput(void) { switch (Menu_ProcessInputNoWrap()) { case MENU_B_PRESSED: PlaySE(SE_SELECT); - TradeMenuChooseMon(); + RedrawChooseAPokemonWindow(); break; case MENU_NOTHING_CHOSEN: break; case 0: // Summary BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_SHOW_MON_SUMMARY; + sTradeMenu->callbackId = CB_SHOW_MON_SUMMARY; break; case 1: // Trade - switch (CanTradeSelectedMon(gPlayerParty, gPlayerPartyCount, sTradeMenuData->cursorPosition)) + switch (CanTradeSelectedMon(gPlayerParty, gPlayerPartyCount, sTradeMenu->cursorPosition)) { case CAN_TRADE_MON: SetReadyToTrade(); - gSprites[sTradeMenuData->cursorSpriteId].invisible = TRUE; + gSprites[sTradeMenu->cursorSpriteId].invisible = TRUE; break; case CANT_TRADE_LAST_MON: QueueAction(QUEUE_DELAY_MSG, QUEUE_ONLY_MON2); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_REDRAW_MAIN_MENU; + sTradeMenu->callbackId = CB_HANDLE_TRADE_CANCELED; break; case CANT_TRADE_NATIONAL: case CANT_TRADE_INVALID_MON: QueueAction(QUEUE_DELAY_MSG, QUEUE_MON_CANT_BE_TRADED); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_REDRAW_MAIN_MENU; + sTradeMenu->callbackId = CB_HANDLE_TRADE_CANCELED; break; case CANT_TRADE_EGG_YET: - case CANT_TRADE_EGG_YET2: + case CANT_TRADE_PARTNER_EGG_YET: QueueAction(QUEUE_DELAY_MSG, QUEUE_EGG_CANT_BE_TRADED); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_REDRAW_MAIN_MENU; + sTradeMenu->callbackId = CB_HANDLE_TRADE_CANCELED; break; } break; } } -static void ChooseMonAfterButtonPress(void) +static void CB_ChooseMonAfterButtonPress(void) { - if ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON))) + if (JOY_NEW(A_BUTTON) || JOY_NEW(B_BUTTON)) { PlaySE(SE_SELECT); - TradeMenuChooseMon(); + RedrawChooseAPokemonWindow(); } } -static void TradeMenuShowMonSummaryScreen(void) +static void CB_ShowTradeMonSummaryScreen(void) { if (!gPaletteFade.active) { - // Player's party - if (sTradeMenuData->cursorPosition < PARTY_SIZE) - ShowPokemonSummaryScreen(SUMMARY_MODE_LOCK_MOVES, gPlayerParty, sTradeMenuData->cursorPosition, sTradeMenuData->partyCounts[TRADE_PLAYER] - 1, CB2_ReturnToTradeMenu); - // Partner's party + if (sTradeMenu->cursorPosition < PARTY_SIZE) + ShowPokemonSummaryScreen(SUMMARY_MODE_LOCK_MOVES, gPlayerParty, sTradeMenu->cursorPosition, sTradeMenu->partyCounts[TRADE_PLAYER] - 1, CB2_ReturnToTradeMenu); else - ShowPokemonSummaryScreen(SUMMARY_MODE_LOCK_MOVES, gEnemyParty, sTradeMenuData->cursorPosition - PARTY_SIZE, sTradeMenuData->partyCounts[TRADE_PARTNER] - 1, CB2_ReturnToTradeMenu); + ShowPokemonSummaryScreen(SUMMARY_MODE_LOCK_MOVES, gEnemyParty, sTradeMenu->cursorPosition - PARTY_SIZE, sTradeMenu->partyCounts[TRADE_PARTNER] - 1, CB2_ReturnToTradeMenu); FreeAllWindowBuffers(); } } @@ -1500,7 +1573,7 @@ static u8 CheckValidityOfTradeMons(u8 *aliveMons, u8 playerPartyCount, u8 player // Partner cant trade illegitimate Deoxys or Mew if (partnerSpecies == SPECIES_DEOXYS || partnerSpecies == SPECIES_MEW) { - if (!GetMonData(&gEnemyParty[partnerMonIdx], MON_DATA_EVENT_LEGAL)) + if (!GetMonData(&gEnemyParty[partnerMonIdx], MON_DATA_MODERN_FATEFUL_ENCOUNTER)) return PARTNER_MON_INVALID; } @@ -1511,7 +1584,7 @@ static u8 CheckValidityOfTradeMons(u8 *aliveMons, u8 playerPartyCount, u8 player // Partner cant trade Egg or non-Hoenn mon if player doesn't have National Dex if (!IsNationalPokedexEnabled()) { - if (sTradeMenuData->isEgg[TRADE_PARTNER][partnerMonIdx] || !IsSpeciesInHoennDex(partnerSpecies)) + if (sTradeMenu->isEgg[TRADE_PARTNER][partnerMonIdx] || !IsSpeciesInHoennDex(partnerSpecies)) return PARTNER_MON_INVALID; } @@ -1527,14 +1600,12 @@ static bool32 CheckMonsBeforeTrade(void) int i; u8 aliveMons[PARTY_SIZE * 2]; - for (i = 0; i < sTradeMenuData->partyCounts[TRADE_PLAYER]; i++) - { - aliveMons[i] = sTradeMenuData->isLiveMon[TRADE_PLAYER][i]; - } + for (i = 0; i < sTradeMenu->partyCounts[TRADE_PLAYER]; i++) + aliveMons[i] = sTradeMenu->isLiveMon[TRADE_PLAYER][i]; - switch (CheckValidityOfTradeMons(aliveMons, sTradeMenuData->partyCounts[TRADE_PLAYER], - sTradeMenuData->cursorPosition, - sTradeMenuData->partnerCursorPosition)) + switch (CheckValidityOfTradeMons(aliveMons, sTradeMenu->partyCounts[TRADE_PLAYER], + sTradeMenu->cursorPosition, + sTradeMenu->partnerCursorPosition)) { case PLAYER_MON_INVALID: QueueAction(QUEUE_DELAY_MSG, QUEUE_ONLY_MON2); @@ -1552,24 +1623,24 @@ static bool32 CheckMonsBeforeTrade(void) return FALSE; } -static void ConfirmOrCancelTrade(void) +static void CB_ProcessConfirmTradeInput(void) { switch (Menu_ProcessInputNoWrapClearOnChoose()) { - case 0: // Confirm Trade + case 0: // YES, Confirm selection if (!CheckMonsBeforeTrade()) - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_STANDBY; + sTradeMenu->callbackId = CB_IDLE; else - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_PARTNER_MON_INVALID; + sTradeMenu->callbackId = CB_PARTNER_MON_INVALID; PutWindowTilemap(17); break; - case 1: // Cancel Trade + case 1: // NO, Cancel Trade case MENU_B_PRESSED: QueueAction(QUEUE_DELAY_MSG, QUEUE_STANDBY); if (IsLinkTradeTaskFinished()) SetLinkData(LINKCMD_READY_CANCEL_TRADE, 0); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_STANDBY; + sTradeMenu->callbackId = CB_IDLE; PutWindowTilemap(17); break; } @@ -1580,66 +1651,65 @@ static void RestoreNicknamesCoveredByYesNo(void) { int i; - for (i = 0; i < sTradeMenuData->partyCounts[1] - 4; i++) + for (i = 0; i < sTradeMenu->partyCounts[1] - 4; i++) { - PutWindowTilemap(i + 12); - CopyWindowToVram(i + 12, COPYWIN_MAP); + PutWindowTilemap(i + PARTY_SIZE * 2); + CopyWindowToVram(i + PARTY_SIZE * 2, COPYWIN_MAP); } } -static void CancelTradeYesNo(void) +static void CB_ProcessCancelTradeInput(void) { switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: // YES, Cancel - PrintTradeMessage(TRADE_MSG_WAITING_FOR_FRIEND); + PrintTradeMessage(MSG_WAITING_FOR_FRIEND); SetLinkData(LINKCMD_REQUEST_CANCEL, 0); - gSprites[sTradeMenuData->cursorSpriteId].invisible = TRUE; - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_STANDBY; + gSprites[sTradeMenu->cursorSpriteId].invisible = TRUE; + sTradeMenu->callbackId = CB_IDLE; RestoreNicknamesCoveredByYesNo(); break; case 1: // NO, Continue case MENU_B_PRESSED: PlaySE(SE_SELECT); - TradeMenuChooseMon(); + RedrawChooseAPokemonWindow(); break; } } -static void SetBothSelectedMons(void) +static void CB_SetSelectedMons(void) { if (GetMultiplayerId() == 0) { rbox_fill_rectangle(0); - SetSelectedMon(sTradeMenuData->cursorPosition); - SetSelectedMon(sTradeMenuData->partnerCursorPosition); + SetSelectedMon(sTradeMenu->cursorPosition); + SetSelectedMon(sTradeMenu->partnerCursorPosition); } - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_CONFIRM_TRADE_PROMPT; + sTradeMenu->callbackId = CB_PRINT_IS_THIS_OKAY; } -static void ConfirmTradePrompt(void) +static void CB_PrintIsThisTradeOkay(void) { - if (sTradeMenuData->drawPartyState[TRADE_PLAYER] == DRAW_PARTY_FINISH - && sTradeMenuData->drawPartyState[TRADE_PARTNER] == DRAW_PARTY_FINISH) + if (sTradeMenu->drawSelectedMonState[TRADE_PLAYER] == DRAW_SELECTED_FINISH + && sTradeMenu->drawSelectedMonState[TRADE_PARTNER] == DRAW_SELECTED_FINISH) { - DrawIsThisTradeOkay(); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_DELAY_TRADE_CONFIRM; + PrintIsThisTradeOkay(); + sTradeMenu->callbackId = CB_INIT_CONFIRM_TRADE_PROMPT; } } -static void DelayTradeConfirmation(void) +static void CB_InitConfirmTradePrompt(void) { - sTradeMenuData->timer++; - - if (sTradeMenuData->timer > 120) + sTradeMenu->timer++; + if (sTradeMenu->timer > 120) { CreateYesNoMenu(&sTradeYesNoWindowTemplate, 1, 14, 0); - sTradeMenuData->timer = 0; - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_CONFIRM_OR_CANCEL_TRADE; + sTradeMenu->timer = 0; + sTradeMenu->callbackId = CB_CONFIRM_TRADE_PROMPT; } } -static void RedrawTradeMenuAfterPressA(void) +static void CB_HandleTradeCanceled(void) { int i; @@ -1655,38 +1725,34 @@ static void RedrawTradeMenuAfterPressA(void) rbox_fill_rectangle(i + 14); } - RedrawTradeMenuParty(TRADE_PLAYER); - RedrawTradeMenuParty(TRADE_PARTNER); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_MAIN_MENU; - gSprites[sTradeMenuData->cursorSpriteId].invisible = FALSE; + RedrawPartyWindow(TRADE_PLAYER); + RedrawPartyWindow(TRADE_PARTNER); + sTradeMenu->callbackId = CB_MAIN_MENU; + gSprites[sTradeMenu->cursorSpriteId].invisible = FALSE; } } -static void CancelTrade_1(void) +static void CB_InitExitCanceledTrade(void) { if (!gPaletteFade.active) { if (gWirelessCommType) - { SetLinkStandbyCallback(); - } else - { SetCloseLinkCallbackAndType(12); - } - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_CANCEL_TRADE_2; + sTradeMenu->callbackId = CB_EXIT_CANCELED_TRADE; } } -static void CancelTrade_2(void) +static void CB_ExitCanceledTrade(void) { if (gWirelessCommType) { if (IsLinkTradeTaskFinished() && GetNumQueuedActions() == 0) { - Free(sMenuTextAllocBuffer); - Free(sTradeMenuData); + Free(sMenuTextTileBuffer); + Free(sTradeMenu); FreeAllWindowBuffers(); DestroyWirelessStatusIndicatorSprite(); SetMainCallback2(CB2_ReturnToFieldFromMultiplayer); @@ -1696,88 +1762,88 @@ static void CancelTrade_2(void) { if (!gReceivedRemoteLinkPlayers) { - Free(sMenuTextAllocBuffer); - Free(sTradeMenuData); + Free(sMenuTextTileBuffer); + Free(sTradeMenu); FreeAllWindowBuffers(); SetMainCallback2(CB2_ReturnToFieldFromMultiplayer); } } } -static void LinkTradeWaitForQueue(void) +static void CB_WaitToStartRfuTrade(void) { if (!Rfu_SetLinkRecovery(FALSE) && GetNumQueuedActions() == 0) { SetLinkStandbyCallback(); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_START_LINK_TRADE; + sTradeMenu->callbackId = CB_START_LINK_TRADE; } } -static void PartnersMonWasInvalid(void) +static void CB_PartnersMonWasInvalid(void) { if (JOY_NEW(A_BUTTON)) { SetLinkData(LINKCMD_READY_CANCEL_TRADE, 0); - sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_STANDBY; + sTradeMenu->callbackId = CB_IDLE; } } -static void CallTradeMenuFunc(void) +static void RunTradeMenuCallback(void) { - switch (sTradeMenuData->tradeMenuFunc) + switch (sTradeMenu->callbackId) { - case TRADEMENUFUNC_MAIN_MENU: - TradeMenuProcessInput(); + case CB_MAIN_MENU: + CB_ProcessMenuInput(); break; - case TRADEMENUFUNC_SELECTED_MON: - TradeMenuProcessInput_SelectedMon(); + case CB_SELECTED_MON: + CB_ProcessSelectedMonInput(); break; - case TRADEMENUFUNC_SHOW_MON_SUMMARY: - TradeMenuShowMonSummaryScreen(); + case CB_SHOW_MON_SUMMARY: + CB_ShowTradeMonSummaryScreen(); break; - case TRADEMENUFUNC_CONFIRM_OR_CANCEL_TRADE: - ConfirmOrCancelTrade(); + case CB_CONFIRM_TRADE_PROMPT: + CB_ProcessConfirmTradeInput(); break; - case TRADEMENUFUNC_CANCEL_TRADE_PROMPT: - CancelTradeYesNo(); + case CB_CANCEL_TRADE_PROMPT: + CB_ProcessCancelTradeInput(); break; - case TRADEMENUFUNC_BOTH_MONS_SELECTED: - SetBothSelectedMons(); + case CB_SET_SELECTED_MONS: + CB_SetSelectedMons(); break; - case TRADEMENUFUNC_CONFIRM_TRADE_PROMPT: - ConfirmTradePrompt(); + case CB_PRINT_IS_THIS_OKAY: + CB_PrintIsThisTradeOkay(); break; - case TRADEMENUFUNC_REDRAW_MAIN_MENU: - RedrawTradeMenuAfterPressA(); + case CB_HANDLE_TRADE_CANCELED: + CB_HandleTradeCanceled(); break; - case TRADEMENUFUNC_LINK_TRADE_FADE_OUT: - LinkTradeFadeOut(); + case CB_FADE_TO_START_TRADE: + CB_FadeToStartTrade(); break; - case TRADEMENUFUNC_LINK_TRADE_WAIT_FADE: - LinkTradeWaitForFade(); + case CB_WAIT_TO_START_TRADE: + CB_WaitToStartTrade(); break; - case TRADEMENUFUNC_CANCEL_TRADE_1: - CancelTrade_1(); + case CB_INIT_EXIT_CANCELED_TRADE: + CB_InitExitCanceledTrade(); break; - case TRADEMENUFUNC_CANCEL_TRADE_2: - CancelTrade_2(); + case CB_EXIT_CANCELED_TRADE: + CB_ExitCanceledTrade(); break; - case TRADEMENUFUNC_START_LINK_TRADE: - SetLinkTradeCallbacks(); + case CB_START_LINK_TRADE: + CB_StartLinkTrade(); break; - case TRADEMENUFUNC_DELAY_TRADE_CONFIRM: - DelayTradeConfirmation(); + case CB_INIT_CONFIRM_TRADE_PROMPT: + CB_InitConfirmTradePrompt(); break; - case TRADEMENUFUNC_UNUSED_15: - ChooseMonAfterButtonPress(); + case CB_UNUSED_CLOSE_MSG: + CB_ChooseMonAfterButtonPress(); break; - case TRADEMENUFUNC_LINK_TRADE_WAIT_QUEUE: - LinkTradeWaitForQueue(); + case CB_WAIT_TO_START_RFU_TRADE: + CB_WaitToStartRfuTrade(); break; - case TRADEMENUFUNC_PARTNER_MON_INVALID: - PartnersMonWasInvalid(); + case CB_PARTNER_MON_INVALID: + CB_PartnersMonWasInvalid(); break; - //case TRADEMENUFUNC_STANDBY: is nop + //case CB_IDLE: is nop } } @@ -1786,14 +1852,16 @@ static void SetSelectedMon(u8 cursorPosition) //cursorPosition 0-5 are the player's mons, 6-11 are the partner's u8 whichParty = cursorPosition / PARTY_SIZE; - if (sTradeMenuData->drawPartyState[whichParty] == 0) + if (sTradeMenu->drawSelectedMonState[whichParty] == 0) { - sTradeMenuData->drawPartyState[whichParty] = 1; - sTradeMenuData->selectedMonIdx[whichParty] = cursorPosition; + // Start the animation to display just the selected + // pokemon in the middle of the screen + sTradeMenu->drawSelectedMonState[whichParty] = 1; + sTradeMenu->selectedMonIdx[whichParty] = cursorPosition; } } -static void DrawTradeMenuParty(u8 whichParty) +static void DrawSelectedMonScreen(u8 whichParty) { s8 nameStringWidth; u8 nickname[20]; @@ -1801,105 +1869,111 @@ static void DrawTradeMenuParty(u8 whichParty) u8 i; u8 partyIdx; u8 selectedMonParty; - u8 selectedMonIdx = sTradeMenuData->selectedMonIdx[whichParty]; + u8 selectedMonIdx = sTradeMenu->selectedMonIdx[whichParty]; selectedMonParty = TRADE_PARTNER; - if (sTradeMenuData->selectedMonIdx[whichParty] < PARTY_SIZE) + if (sTradeMenu->selectedMonIdx[whichParty] < PARTY_SIZE) selectedMonParty = TRADE_PLAYER; partyIdx = selectedMonIdx % PARTY_SIZE; nameStringWidth = 0; - switch (sTradeMenuData->drawPartyState[whichParty]) + switch (sTradeMenu->drawSelectedMonState[whichParty]) { + default: + // Idle while state is 0, and once it reaches the final state (DRAW_SELECTED_FINISH) + break; case 1: - for (i = 0; i < sTradeMenuData->partyCounts[whichParty]; i++) - { - gSprites[sTradeMenuData->partySpriteIds[0][i + (selectedMonParty * PARTY_SIZE)]].invisible = TRUE; - } - - for (i = 0; i < 6; i++) - { + // Erase the rest of the party + for (i = 0; i < sTradeMenu->partyCounts[whichParty]; i++) + gSprites[sTradeMenu->partySpriteIds[selectedMonParty][i]].invisible = TRUE; + for (i = 0; i < PARTY_SIZE; i++) ClearWindowTilemap(i + (whichParty * PARTY_SIZE + 2)); - } - gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].invisible = FALSE; - gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].data[0] = 20; - gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].data[2] = (sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE][0] - + sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE + 1][0]) / 2 * 8 + 14; - gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].data[4] = (sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE][1] * 8) - 12; - StoreSpriteCallbackInData6(&gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]], SpriteCB_MonIcon); - sTradeMenuData->drawPartyState[whichParty]++; - TradeMenuBouncePartySprites(&gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]]); + // Re-display the selected pokemon + gSprites[sTradeMenu->partySpriteIds[selectedMonParty][partyIdx]].invisible = FALSE; + + // Move the selected pokemon to the center + gSprites[sTradeMenu->partySpriteIds[selectedMonParty][partyIdx]].data[0] = 20; + gSprites[sTradeMenu->partySpriteIds[selectedMonParty][partyIdx]].data[2] = (sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE][0] + + sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE + 1][0]) / 2 * 8 + 14; + gSprites[sTradeMenu->partySpriteIds[selectedMonParty][partyIdx]].data[4] = (sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE][1] * 8) - 12; + StoreSpriteCallbackInData6(&gSprites[sTradeMenu->partySpriteIds[selectedMonParty][partyIdx]], SpriteCB_MonIcon); + sTradeMenu->drawSelectedMonState[whichParty]++; + Trade_MoveSelectedMonToTarget(&gSprites[sTradeMenu->partySpriteIds[selectedMonParty][partyIdx]]); + CopyToBgTilemapBufferRect_ChangePalette(1, sTradePartyBoxTilemap, whichParty * 15, 0, 15, 17, 0); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); if (selectedMonParty == TRADE_PLAYER) - PrintNicknamesForTradeMenu(); + PrintTradePartnerPartyNicknames(); break; case 2: - if (gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].callback == SpriteCB_MonIcon) - sTradeMenuData->drawPartyState[whichParty] = 3; + // Wait for the selected pokemon's sprite to move to the correct position + if (gSprites[sTradeMenu->partySpriteIds[selectedMonParty][partyIdx]].callback == SpriteCB_MonIcon) + sTradeMenu->drawSelectedMonState[whichParty] = 3; break; case 3: + // Redisplay the bg box CopyToBgTilemapBufferRect_ChangePalette(1, sTradeMovesBoxTilemap, selectedMonParty * 15, 0, 15, 17, 0); CopyBgTilemapBufferToVram(1); - gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].x = (sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE][0] - + sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE + 1][0]) / 2 * 8 + 14; - gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].y = (sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE][1] * 8) - 12; - gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].x2 = 0; - gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].y2 = 0; + + // Finalize the selected pokemon's position + gSprites[sTradeMenu->partySpriteIds[selectedMonParty][partyIdx]].x = (sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE][0] + + sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE + 1][0]) / 2 * 8 + 14; + gSprites[sTradeMenu->partySpriteIds[selectedMonParty][partyIdx]].y = (sTradeMonSpriteCoords[selectedMonParty * PARTY_SIZE][1] * 8) - 12; + gSprites[sTradeMenu->partySpriteIds[selectedMonParty][partyIdx]].x2 = 0; + gSprites[sTradeMenu->partySpriteIds[selectedMonParty][partyIdx]].y2 = 0; + + // Print selected pokemon's name and moves nameStringWidth = GetMonNicknameWidth(nickname, selectedMonParty, partyIdx); AddTextPrinterParameterized3((whichParty * 2) + 14, FONT_SMALL, (80 - nameStringWidth) / 2, 4, sTradeTextColors, 0, nickname); - BufferTradeMonMoves(movesString, selectedMonParty, partyIdx); + BufferMovesString(movesString, selectedMonParty, partyIdx); AddTextPrinterParameterized4((whichParty * 2) + 15, FONT_NORMAL, 0, 0, 0, 0, sTradeTextColors, 0, movesString); PutWindowTilemap((whichParty * 2) + 14); CopyWindowToVram((whichParty * 2) + 14, COPYWIN_FULL); PutWindowTilemap((whichParty * 2) + 15); CopyWindowToVram((whichParty * 2) + 15, COPYWIN_FULL); - sTradeMenuData->drawPartyState[whichParty]++; + + sTradeMenu->drawSelectedMonState[whichParty]++; break; case 4: - DrawTradeMenuPartyMonInfo(whichParty, partyIdx, - sTradeMenuPartyMonBoxDimensions[whichParty][0] + 4, - sTradeMenuPartyMonBoxDimensions[whichParty][1] + 1, - sTradeMenuPartyMonBoxDimensions[whichParty][0], - sTradeMenuPartyMonBoxDimensions[whichParty][1]); - sTradeMenuData->drawPartyState[whichParty]++; + PrintLevelAndGender(whichParty, partyIdx, + sSelectedMonLevelGenderCoords[whichParty][0] + 4, + sSelectedMonLevelGenderCoords[whichParty][1] + 1, + sSelectedMonLevelGenderCoords[whichParty][0], + sSelectedMonLevelGenderCoords[whichParty][1]); + sTradeMenu->drawSelectedMonState[whichParty]++; break; } } -static u8 GetMonNicknameWidth(u8 *str, u8 whichParty, u8 monIdx) +static u8 GetMonNicknameWidth(u8 *str, u8 whichParty, u8 partyIdx) { - u8 nickname[12]; + u8 nickname[POKEMON_NAME_LENGTH]; if (whichParty == TRADE_PLAYER) - GetMonData(&gPlayerParty[monIdx], MON_DATA_NICKNAME, nickname); + GetMonData(&gPlayerParty[partyIdx], MON_DATA_NICKNAME, nickname); else - GetMonData(&gEnemyParty[monIdx], MON_DATA_NICKNAME, nickname); + GetMonData(&gEnemyParty[partyIdx], MON_DATA_NICKNAME, nickname); StringCopy_Nickname(str, nickname); return GetStringWidth(FONT_SMALL, str, GetFontAttribute(FONT_SMALL, FONTATTR_LETTER_SPACING)); } -static void BufferTradeMonMoves(u8 *str, u8 whichParty, u8 partyIdx) +static void BufferMovesString(u8 *str, u8 whichParty, u8 partyIdx) { u16 moves[MAX_MON_MOVES]; u16 i; - if (!sTradeMenuData->isEgg[whichParty][partyIdx]) + if (!sTradeMenu->isEgg[whichParty][partyIdx]) { for (i = 0; i < MAX_MON_MOVES; i++) { if (whichParty == TRADE_PLAYER) - { moves[i] = GetMonData(&gPlayerParty[partyIdx], i + MON_DATA_MOVE1, NULL); - } else - { moves[i] = GetMonData(&gEnemyParty[partyIdx], i + MON_DATA_MOVE1, NULL); - } } StringCopy(str, sText_EmptyString); @@ -1907,9 +1981,7 @@ static void BufferTradeMonMoves(u8 *str, u8 whichParty, u8 partyIdx) for (i = 0; i < MAX_MON_MOVES; i++) { if (moves[i] != MOVE_NONE) - { StringAppend(str, gMoveNames[moves[i]]); - } StringAppend(str, sText_NewLine); } @@ -1921,7 +1993,7 @@ static void BufferTradeMonMoves(u8 *str, u8 whichParty, u8 partyIdx) } } -static void PrintMonNicknameForTradeMenu(u8 whichParty, u8 windowId, u8 *nickname) +static void PrintPartyMonNickname(u8 whichParty, u8 windowId, u8 *nickname) { u8 xPos; windowId += (whichParty * PARTY_SIZE) + 2; @@ -1931,27 +2003,27 @@ static void PrintMonNicknameForTradeMenu(u8 whichParty, u8 windowId, u8 *nicknam CopyWindowToVram(windowId, COPYWIN_FULL); } -static void PrintPartyNicknamesForTradeMenu(u8 whichParty) +static void PrintPartyNicknames(u8 whichParty) { u8 i; u8 nickname[20]; u8 str[32]; struct Pokemon *party = (whichParty == TRADE_PLAYER) ? gPlayerParty : gEnemyParty; - for (i = 0; i < sTradeMenuData->partyCounts[whichParty]; i++) + for (i = 0; i < sTradeMenu->partyCounts[whichParty]; i++) { GetMonData(&party[i], MON_DATA_NICKNAME, nickname); StringCopy_Nickname(str, nickname); - PrintMonNicknameForTradeMenu(whichParty, i, str); + PrintPartyMonNickname(whichParty, i, str); } } -static void DrawTradeMenuPartyMonInfo(u8 whichParty, u8 monIdx, u8 x, u8 y, u8 width, u8 height) +static void PrintLevelAndGender(u8 whichParty, u8 monIdx, u8 x, u8 y, u8 width, u8 height) { u8 level; u32 symbolTile; u8 gender; - u8 nickname[12]; + u8 nickname[POKEMON_NAME_LENGTH]; CopyToBgTilemapBufferRect_ChangePalette(1, gTradeMenuMonBox_Tilemap, width, height, 6, 3, 0); CopyBgTilemapBufferToVram(1); @@ -1961,20 +2033,20 @@ static void DrawTradeMenuPartyMonInfo(u8 whichParty, u8 monIdx, u8 x, u8 y, u8 w else level = GetMonData(&gEnemyParty[monIdx], MON_DATA_LEVEL, NULL); - if (!sTradeMenuData->isEgg[whichParty][monIdx]) + if (!sTradeMenu->isEgg[whichParty][monIdx]) { if (level / 10 != 0) - sTradeMenuData->tilemapBuffer[x + (y * 32)] = (level / 10) + 0x60; + sTradeMenu->tilemapBuffer[x + (y * 32)] = (level / 10) + 0x60; - sTradeMenuData->tilemapBuffer[x + (y * 32) + 1] = (level % 10) + 0x70; + sTradeMenu->tilemapBuffer[x + (y * 32) + 1] = (level % 10) + 0x70; } else { - sTradeMenuData->tilemapBuffer[x + (y * 32) - 32] = sTradeMenuData->tilemapBuffer[x + (y * 32) - 33]; - sTradeMenuData->tilemapBuffer[x + (y * 32) - 31] = sTradeMenuData->tilemapBuffer[x + (y * 32) - 36] | 0x400; + sTradeMenu->tilemapBuffer[x + (y * 32) - 32] = sTradeMenu->tilemapBuffer[x + (y * 32) - 33]; + sTradeMenu->tilemapBuffer[x + (y * 32) - 31] = sTradeMenu->tilemapBuffer[x + (y * 32) - 36] | 0x400; } - if (sTradeMenuData->isEgg[whichParty][monIdx]) + if (sTradeMenu->isEgg[whichParty][monIdx]) { symbolTile = 0x480; } @@ -2004,62 +2076,57 @@ static void DrawTradeMenuPartyMonInfo(u8 whichParty, u8 monIdx, u8 x, u8 y, u8 w break; } } - sTradeMenuData->tilemapBuffer[(y - 1) * 32 + x + 1] = symbolTile; + sTradeMenu->tilemapBuffer[(y - 1) * 32 + x + 1] = symbolTile; } -static void DrawTradeMenuPartyInfo(u8 whichParty) +static void PrintPartyLevelsAndGenders(u8 whichParty) { s32 i; - for (i = 0; i < sTradeMenuData->partyCounts[whichParty]; i++) + for (i = 0; i < sTradeMenu->partyCounts[whichParty]; i++) { - const u8 (*r5)[2]; - const u8 (*r4)[2]; - u32 r0 = 3 * whichParty; - const u8 (*r1)[2][2] = sTradeMonLevelCoords; - - r5 = r1[r0]; - r4 = sTradeMonBoxCoords[r0]; - DrawTradeMenuPartyMonInfo( + s32 j = i + PARTY_SIZE * whichParty; + PrintLevelAndGender( whichParty, i, - r5[i][0], - r5[i][1], - r4[i][0], - r4[i][1] + sTradeMonLevelCoords[j][0], + sTradeMonLevelCoords[j][1], + sTradeMonBoxCoords[j][0], + sTradeMonBoxCoords[j][1] ); } } -static void ResetTradeMenuPartyPositions(u8 whichParty) +static void ShowTradePartyMonIcons(u8 whichParty) { int i; - for (i = 0; i < sTradeMenuData->partyCounts[whichParty]; i++) + for (i = 0; i < sTradeMenu->partyCounts[whichParty]; i++) { - gSprites[sTradeMenuData->partySpriteIds[whichParty][i]].invisible = FALSE; - gSprites[sTradeMenuData->partySpriteIds[whichParty][i]].x = sTradeMonSpriteCoords[(whichParty * PARTY_SIZE) + i][0] * 8 + 14; - gSprites[sTradeMenuData->partySpriteIds[whichParty][i]].y = sTradeMonSpriteCoords[(whichParty * PARTY_SIZE) + i][1] * 8 - 12; - gSprites[sTradeMenuData->partySpriteIds[whichParty][i]].x2 = 0; - gSprites[sTradeMenuData->partySpriteIds[whichParty][i]].y2 = 0; + gSprites[sTradeMenu->partySpriteIds[whichParty][i]].invisible = FALSE; + gSprites[sTradeMenu->partySpriteIds[whichParty][i]].x = sTradeMonSpriteCoords[(whichParty * PARTY_SIZE) + i][0] * 8 + 14; + gSprites[sTradeMenu->partySpriteIds[whichParty][i]].y = sTradeMonSpriteCoords[(whichParty * PARTY_SIZE) + i][1] * 8 - 12; + gSprites[sTradeMenu->partySpriteIds[whichParty][i]].x2 = 0; + gSprites[sTradeMenu->partySpriteIds[whichParty][i]].y2 = 0; } } -static void PrintNicknamesForTradeMenu(void) +static void PrintTradePartnerPartyNicknames(void) { rbox_fill_rectangle(1); - //PrintPartyNicknamesForTradeMenu(TRADE_PLAYER); ? - PrintPartyNicknamesForTradeMenu(TRADE_PARTNER); + //PrintPartyNicknames(TRADE_PLAYER); ? + PrintPartyNicknames(TRADE_PARTNER); } -static void RedrawTradeMenuParty(u8 whichParty) +// Returning to the party selection screen from the "is this trade ok?" screen +static void RedrawPartyWindow(u8 whichParty) { CopyToBgTilemapBufferRect_ChangePalette(1, sTradePartyBoxTilemap, whichParty * 15, 0, 15, 17, 0); CopyBgTilemapBufferToVram(1); - DrawTradeMenuPartyInfo(whichParty); - PrintPartyNicknamesForTradeMenu(whichParty); - ResetTradeMenuPartyPositions(whichParty); - DrawBottomRowText(sTradeActionTexts[TRADE_TEXT_CHOOSE_MON], (void *)(OBJ_VRAM0 + (sTradeMenuData->bottomTextTileStart * 32)), 24); - sTradeMenuData->drawPartyState[whichParty] = 0; + PrintPartyLevelsAndGenders(whichParty); + PrintPartyNicknames(whichParty); + ShowTradePartyMonIcons(whichParty); + DrawBottomRowText(sActionTexts[TEXT_CHOOSE_MON], (void *)(OBJ_VRAM0 + (sTradeMenu->bottomTextTileStart * 32)), 24); + sTradeMenu->drawSelectedMonState[whichParty] = 0; } static void Task_DrawSelectionSummary(u8 taskId) @@ -2078,13 +2145,14 @@ static void QueueAction(u16 delay, u8 actionId) { int i; - for (i = 0; i < (int)ARRAY_COUNT(sTradeMenuData->queuedActions); i++) + for (i = 0; i < (int)ARRAY_COUNT(sTradeMenu->queuedActions); i++) { - if (!sTradeMenuData->queuedActions[i].queued) + // Find first available spot + if (!sTradeMenu->queuedActions[i].active) { - sTradeMenuData->queuedActions[i].queueDelay = delay; - sTradeMenuData->queuedActions[i].actionId = actionId; - sTradeMenuData->queuedActions[i].queued = TRUE; + sTradeMenu->queuedActions[i].delay = delay; + sTradeMenu->queuedActions[i].actionId = actionId; + sTradeMenu->queuedActions[i].active = TRUE; break; } } @@ -2095,9 +2163,9 @@ static u32 GetNumQueuedActions(void) u32 numActions = 0; int i; - for (i = 0; i < (int)ARRAY_COUNT(sTradeMenuData->queuedActions); i++) + for (i = 0; i < (int)ARRAY_COUNT(sTradeMenu->queuedActions); i++) { - numActions += sTradeMenuData->queuedActions[i].queued; + numActions += sTradeMenu->queuedActions[i].active; } return numActions; @@ -2107,43 +2175,43 @@ static void DoQueuedActions(void) { int i; - for (i = 0; i < (int)ARRAY_COUNT(sTradeMenuData->queuedActions); i++) + for (i = 0; i < (int)ARRAY_COUNT(sTradeMenu->queuedActions); i++) { - if (sTradeMenuData->queuedActions[i].queued) + if (sTradeMenu->queuedActions[i].active) { - if (sTradeMenuData->queuedActions[i].queueDelay) + if (sTradeMenu->queuedActions[i].delay != 0) { - sTradeMenuData->queuedActions[i].queueDelay--; + sTradeMenu->queuedActions[i].delay--; } else { - switch (sTradeMenuData->queuedActions[i].actionId) + switch (sTradeMenu->queuedActions[i].actionId) { case QUEUE_SEND_DATA: - SendLinkData(sTradeMenuData->linkData, 20); + SendLinkData(sTradeMenu->linkData, 20); break; case QUEUE_STANDBY: - PrintTradeMessage(TRADE_MSG_STANDBY); + PrintTradeMessage(MSG_STANDBY); break; case QUEUE_ONLY_MON1: - PrintTradeMessage(TRADE_MSG_ONLY_MON1); + PrintTradeMessage(MSG_ONLY_MON1); break; case QUEUE_ONLY_MON2: case QUEUE_UNUSED1: case QUEUE_UNUSED2: - PrintTradeMessage(TRADE_MSG_ONLY_MON2); + PrintTradeMessage(MSG_ONLY_MON2); break; case QUEUE_MON_CANT_BE_TRADED: - PrintTradeMessage(TRADE_MSG_MON_CANT_BE_TRADED); + PrintTradeMessage(MSG_MON_CANT_BE_TRADED); break; case QUEUE_EGG_CANT_BE_TRADED: - PrintTradeMessage(TRADE_MSG_EGG_CANT_BE_TRADED); + PrintTradeMessage(MSG_EGG_CANT_BE_TRADED); break; case QUEUE_FRIENDS_MON_CANT_BE_TRADED: - PrintTradeMessage(TRADE_MSG_FRIENDS_MON_CANT_BE_TRADED); + PrintTradeMessage(MSG_FRIENDS_MON_CANT_BE_TRADED); break; } - sTradeMenuData->queuedActions[i].queued = FALSE; + sTradeMenu->queuedActions[i].active = FALSE; } } } @@ -2152,24 +2220,24 @@ static void DoQueuedActions(void) static void PrintTradeMessage(u8 messageId) { FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized(0, FONT_NORMAL, sTradeMessages[messageId], 0, 1, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, sMessages[messageId], 0, 1, TEXT_SKIP_DRAW, NULL); DrawTextBorderOuter(0, 20, 12); PutWindowTilemap(0); CopyWindowToVram(0, COPYWIN_FULL); } -static bool8 LoadTradeMenuSpriteSheetsAndPalettes(void) +static bool8 LoadUISpriteGfx(void) { struct SpriteSheet sheet; - if (sTradeMenuData->timer < GFXTAG_MENU_TEXT_COUNT) + if (sTradeMenu->timer < NUM_MENU_TEXT_SPRITES) { - sheet.data = sMenuTextTileBuffers[sTradeMenuData->timer]; + sheet.data = sMenuTextTileBuffers[sTradeMenu->timer]; sheet.size = 0x100; - sheet.tag = GFXTAG_MENU_TEXT + sTradeMenuData->timer; + sheet.tag = GFXTAG_MENU_TEXT + sTradeMenu->timer; } - switch (sTradeMenuData->timer) + switch (sTradeMenu->timer) { case GFXTAG_PLAYER_NAME_L: case GFXTAG_PLAYER_NAME_M: @@ -2180,11 +2248,11 @@ static bool8 LoadTradeMenuSpriteSheetsAndPalettes(void) case GFXTAG_CANCEL_L: case GFXTAG_CANCEL_R: LoadSpriteSheet(&sheet); - sTradeMenuData->timer++; + sTradeMenu->timer++; break; case GFXTAG_CHOOSE_PKMN_L: - sTradeMenuData->bottomTextTileStart = LoadSpriteSheet(&sheet); - sTradeMenuData->timer++; + sTradeMenu->bottomTextTileStart = LoadSpriteSheet(&sheet); + sTradeMenu->timer++; break; case GFXTAG_CHOOSE_PKMN_M: case GFXTAG_CHOOSE_PKMN_R: @@ -2192,22 +2260,22 @@ static bool8 LoadTradeMenuSpriteSheetsAndPalettes(void) case GFXTAG_CHOOSE_PKMN_EMPTY_2: case GFXTAG_CHOOSE_PKMN_EMPTY_3: LoadSpriteSheet(&sheet); - sTradeMenuData->timer++; + sTradeMenu->timer++; break; - case GFXTAG_MENU_TEXT_COUNT: - LoadSpritePalette(&sSpritePalette_TradeScreenText); - sTradeMenuData->timer++; + case NUM_MENU_TEXT_SPRITES: + LoadSpritePalette(&sSpritePalette_MenuText); + sTradeMenu->timer++; break; - case GFXTAG_MENU_TEXT_COUNT + 1: + case NUM_MENU_TEXT_SPRITES + 1: LoadSpritePalette(&sCursor_SpritePalette); - sTradeMenuData->timer++; + sTradeMenu->timer++; break; - case GFXTAG_MENU_TEXT_COUNT + 2: + case NUM_MENU_TEXT_SPRITES + 2: LoadSpriteSheet(&sCursor_SpriteSheet); - sTradeMenuData->timer++; + sTradeMenu->timer++; break; - case GFXTAG_MENU_TEXT_COUNT + 3: - sTradeMenuData->timer = 0; + case NUM_MENU_TEXT_SPRITES + 3: + sTradeMenu->timer = 0; return TRUE; } @@ -2219,75 +2287,75 @@ static void DrawBottomRowText(const u8 *str, u8 *dest, u8 unused) DrawTextWindowAndBufferTiles(str, dest, 0, 0, 6); } -static void SetTradePartyLiveStatuses(u8 whichParty) +static void ComputePartyTradeableFlags(u8 whichParty) { int i; switch (whichParty) { case TRADE_PLAYER: - for (i = 0; i < sTradeMenuData->partyCounts[whichParty]; i++) + for (i = 0; i < sTradeMenu->partyCounts[whichParty]; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG) == TRUE) { - sTradeMenuData->isLiveMon[whichParty][i] = FALSE; - sTradeMenuData->isEgg[whichParty][i] = TRUE; + sTradeMenu->isLiveMon[whichParty][i] = FALSE; + sTradeMenu->isEgg[whichParty][i] = TRUE; } else if (GetMonData(&gPlayerParty[i], MON_DATA_HP) == 0) { - sTradeMenuData->isLiveMon[whichParty][i] = FALSE; - sTradeMenuData->isEgg[whichParty][i] = FALSE; + sTradeMenu->isLiveMon[whichParty][i] = FALSE; + sTradeMenu->isEgg[whichParty][i] = FALSE; } else { - sTradeMenuData->isLiveMon[whichParty][i] = TRUE; - sTradeMenuData->isEgg[whichParty][i] = FALSE; + sTradeMenu->isLiveMon[whichParty][i] = TRUE; + sTradeMenu->isEgg[whichParty][i] = FALSE; } } break; case TRADE_PARTNER: - for (i = 0; i < sTradeMenuData->partyCounts[whichParty]; i++) + for (i = 0; i < sTradeMenu->partyCounts[whichParty]; i++) { if (GetMonData(&gEnemyParty[i], MON_DATA_IS_EGG) == TRUE) { - sTradeMenuData->isLiveMon[whichParty][i] = FALSE; - sTradeMenuData->isEgg[whichParty][i] = TRUE; + sTradeMenu->isLiveMon[whichParty][i] = FALSE; + sTradeMenu->isEgg[whichParty][i] = TRUE; } else if (GetMonData(&gEnemyParty[i], MON_DATA_HP) == 0) { - sTradeMenuData->isLiveMon[whichParty][i] = FALSE; - sTradeMenuData->isEgg[whichParty][i] = FALSE; + sTradeMenu->isLiveMon[whichParty][i] = FALSE; + sTradeMenu->isEgg[whichParty][i] = FALSE; } else { - sTradeMenuData->isLiveMon[whichParty][i] = TRUE; - sTradeMenuData->isEgg[whichParty][i] = FALSE; + sTradeMenu->isLiveMon[whichParty][i] = TRUE; + sTradeMenu->isEgg[whichParty][i] = FALSE; } } break; } } -static void GetTradePartyHPBarLevels(u8 who) +static void ComputePartyHPBarLevels(u8 whichParty) { u16 i, curHp, maxHp; - switch (who) + switch (whichParty) { case TRADE_PLAYER: - for (i = 0; i < sTradeMenuData->partyCounts[TRADE_PLAYER]; i++) + for (i = 0; i < sTradeMenu->partyCounts[TRADE_PLAYER]; i++) { curHp = GetMonData(&gPlayerParty[i], MON_DATA_HP); maxHp = GetMonData(&gPlayerParty[i], MON_DATA_MAX_HP); - sTradeMenuData->hpBarLevels[TRADE_PLAYER][i] = GetHPBarLevel(curHp, maxHp); + sTradeMenu->hpBarLevels[TRADE_PLAYER][i] = GetHPBarLevel(curHp, maxHp); } break; case TRADE_PARTNER: - for (i = 0; i < sTradeMenuData->partyCounts[TRADE_PARTNER]; i++) + for (i = 0; i < sTradeMenu->partyCounts[TRADE_PARTNER]; i++) { curHp = GetMonData(&gEnemyParty[i], MON_DATA_HP); maxHp = GetMonData(&gEnemyParty[i], MON_DATA_MAX_HP); - sTradeMenuData->hpBarLevels[TRADE_PARTNER][i] = GetHPBarLevel(curHp, maxHp); + sTradeMenu->hpBarLevels[TRADE_PARTNER][i] = GetHPBarLevel(curHp, maxHp); } break; } @@ -2299,10 +2367,8 @@ static void SetTradePartyHPBarSprites(void) for (i = 0; i < 2; i++) { - for (j = 0; j < sTradeMenuData->partyCounts[i]; j++) - { - SetPartyHPBarSprite(&gSprites[sTradeMenuData->partySpriteIds[i][j]], 4 - sTradeMenuData->hpBarLevels[i][j]); - } + for (j = 0; j < sTradeMenu->partyCounts[i]; j++) + SetPartyHPBarSprite(&gSprites[sTradeMenu->partySpriteIds[i][j]], 4 - sTradeMenu->hpBarLevels[i][j]); } } @@ -2310,12 +2376,12 @@ static void SaveTradeGiftRibbons(void) { int i; - for (i = 0; i < (int)ARRAY_COUNT(sTradeMenuData->giftRibbons); i++) + for (i = 0; i < (int)ARRAY_COUNT(sTradeMenu->giftRibbons); i++) { - if (gSaveBlock1Ptr->giftRibbons[i] == 0 && sTradeMenuData->giftRibbons[i] != 0) + if (gSaveBlock1Ptr->giftRibbons[i] == 0 && sTradeMenu->giftRibbons[i] != 0) { - if (sTradeMenuData->giftRibbons[i] < 64) - gSaveBlock1Ptr->giftRibbons[i] = sTradeMenuData->giftRibbons[i]; + if (sTradeMenu->giftRibbons[i] < MAX_GIFT_RIBBON) + gSaveBlock1Ptr->giftRibbons[i] = sTradeMenu->giftRibbons[i]; } } } @@ -2323,13 +2389,13 @@ static void SaveTradeGiftRibbons(void) static u32 CanTradeSelectedMon(struct Pokemon *playerParty, int partyCount, int monIdx) { int i, numMonsLeft; - struct LinkPlayer *player; + struct LinkPlayer *partner; u32 species[PARTY_SIZE]; u32 species2[PARTY_SIZE]; for (i = 0; i < partyCount; i++) { - species2[i] = GetMonData(&playerParty[i], MON_DATA_SPECIES2); + species2[i] = GetMonData(&playerParty[i], MON_DATA_SPECIES_OR_EGG); species[i] = GetMonData(&playerParty[i], MON_DATA_SPECIES); } @@ -2343,15 +2409,15 @@ static u32 CanTradeSelectedMon(struct Pokemon *playerParty, int partyCount, int return CANT_TRADE_NATIONAL; } - player = &gLinkPlayers[GetMultiplayerId() ^ 1]; - if ((player->version & 0xFF) != VERSION_RUBY && - (player->version & 0xFF) != VERSION_SAPPHIRE) + partner = &gLinkPlayers[GetMultiplayerId() ^ 1]; + if ((partner->version & 0xFF) != VERSION_RUBY && + (partner->version & 0xFF) != VERSION_SAPPHIRE) { // Does partner not have National Dex - if (!(player->progressFlagsCopy & 0xF)) + if (!(partner->progressFlagsCopy & 0xF)) { if (species2[monIdx] == SPECIES_EGG) - return CANT_TRADE_EGG_YET2; + return CANT_TRADE_PARTNER_EGG_YET; if (!IsSpeciesInHoennDex(species2[monIdx])) return CANT_TRADE_INVALID_MON; @@ -2360,7 +2426,7 @@ static u32 CanTradeSelectedMon(struct Pokemon *playerParty, int partyCount, int if (species[monIdx] == SPECIES_DEOXYS || species[monIdx] == SPECIES_MEW) { - if (!GetMonData(&playerParty[monIdx], MON_DATA_EVENT_LEGAL)) + if (!GetMonData(&playerParty[monIdx], MON_DATA_MODERN_FATEFUL_ENCOUNTER)) return CANT_TRADE_INVALID_MON; } @@ -2390,30 +2456,30 @@ static u32 CanTradeSelectedMon(struct Pokemon *playerParty, int partyCount, int s32 GetGameProgressForLinkTrade(void) { - // isGameFrLg could have been a bool but they use 2 and > 0 instead - // possible other checks (for other game versions?) were planned/removed - s32 isGameFrLg; + // The usage of this value is a little unusual given it's treated as a bool, + // but it's the result of its usage in FRLG, where 0 is FRLG, 1 is RS, and 2 is Emerald. + s32 versionId; // 0: RSE, 2: FRLG u16 version; if (gReceivedRemoteLinkPlayers) { - isGameFrLg = 0; + versionId = 0; version = (gLinkPlayers[GetMultiplayerId() ^ 1].version & 0xFF); if (version == VERSION_RUBY || version == VERSION_SAPPHIRE || version == VERSION_EMERALD) - isGameFrLg = 0; + versionId = 0; else if (version == VERSION_FIRE_RED || version == VERSION_LEAF_GREEN) - isGameFrLg = 2; + versionId = 2; - // If trading with FRLG, both players must be champion - if (isGameFrLg > 0) + // If trading with FRLG, both players must have progessed the story enough + if (versionId > 0) { // Is player champion if (gLinkPlayers[GetMultiplayerId()].progressFlagsCopy & 0xF0) { - if (isGameFrLg == 2) //unnecessary check, isGameFrLg always 2 here + if (versionId == 2) // Check is only relevant in FRLG, this will always be true { - // Is partner champion + // Has FRLG partner finished the Sevii Islands if (gLinkPlayers[GetMultiplayerId() ^ 1].progressFlagsCopy & 0xF0) return TRADE_BOTH_PLAYERS_READY; else @@ -2429,35 +2495,36 @@ s32 GetGameProgressForLinkTrade(void) return TRADE_BOTH_PLAYERS_READY; } -static bool32 IsDeoxysOrMewUntradable(u16 species, bool8 isEventLegal) +static bool32 IsDeoxysOrMewUntradable(u16 species, bool8 isModernFatefulEncounter) { if (species == SPECIES_DEOXYS || species == SPECIES_MEW) { - if (!isEventLegal) + if (!isModernFatefulEncounter) return TRUE; } return FALSE; } -int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isEventLegal) +int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isModernFatefulEncounter) { bool8 playerHasNationalDex = player.hasNationalDex; - bool8 playerIsChampion = player.isChampion; + bool8 playerCanLinkNationally = player.canLinkNationally; bool8 partnerHasNationalDex = partner.hasNationalDex; - bool8 partnerIsChampion = partner.isChampion; + bool8 partnerCanLinkNationally = partner.canLinkNationally; u8 partnerVersion = partner.version; - // If partner is not using Emerald, both players must be champion + // If partner is not using Emerald, both players must have progressed the story + // to a certain point (becoming champion in RSE, finishing the Sevii islands in FRLG) if (partnerVersion != VERSION_EMERALD) { - if (!playerIsChampion) + if (!playerCanLinkNationally) return UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_1; - else if (!partnerIsChampion) + else if (!partnerCanLinkNationally) return UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_2; } // Cannot trade illegitimate Deoxys/Mew - if (IsDeoxysOrMewUntradable(playerSpecies, isEventLegal)) + if (IsDeoxysOrMewUntradable(playerSpecies, isModernFatefulEncounter)) return UR_TRADE_MSG_MON_CANT_BE_TRADED; // Can't trade specific species @@ -2504,11 +2571,11 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf return UR_TRADE_MSG_NONE; } -int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isEventLegal) +int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isModernFatefulEncounter) { bool8 hasNationalDex = player.hasNationalDex; - if (IsDeoxysOrMewUntradable(species, isEventLegal)) + if (IsDeoxysOrMewUntradable(species, isModernFatefulEncounter)) return CANT_REGISTER_MON_NOW; // Can't trade specific species @@ -2538,7 +2605,7 @@ int CanSpinTradeMon(struct Pokemon *mon, u16 monIdx) // Make Eggs not count for numMonsLeft for (i = 0; i < gPlayerPartyCount; i++) { - speciesArray[i] = GetMonData(&mon[i], MON_DATA_SPECIES2); + speciesArray[i] = GetMonData(&mon[i], MON_DATA_SPECIES_OR_EGG); if (speciesArray[i] == SPECIES_EGG) speciesArray[i] = SPECIES_NONE; } @@ -2610,6 +2677,7 @@ static void SpriteCB_LinkMonGlowWireless(struct Sprite *sprite) } } +// Palette flash for trade glow core static void SpriteCB_LinkMonShadow(struct Sprite *sprite) { if (!sprite->data[1]) @@ -2654,7 +2722,7 @@ static void SetTradeBGAffine(void) { struct BgAffineDstData affine; - DoBgAffineSet(&affine, sTradeData->texX * 0x100, sTradeData->texY * 0x100, sTradeData->scrX, sTradeData->scrY, sTradeData->sXY, sTradeData->sXY, sTradeData->alpha); + DoBgAffineSet(&affine, sTradeAnim->texX * 0x100, sTradeAnim->texY * 0x100, sTradeAnim->scrX, sTradeAnim->scrY, sTradeAnim->sXY, sTradeAnim->sXY, sTradeAnim->alpha); SetGpuReg(REG_OFFSET_BG2PA, affine.pa); SetGpuReg(REG_OFFSET_BG2PB, affine.pb); SetGpuReg(REG_OFFSET_BG2PC, affine.pc); @@ -2669,14 +2737,14 @@ static void SetTradeGpuRegs(void) { u16 dispcnt; - SetGpuReg(REG_OFFSET_BG1VOFS, sTradeData->bg1vofs); - SetGpuReg(REG_OFFSET_BG1HOFS, sTradeData->bg1hofs); + SetGpuReg(REG_OFFSET_BG1VOFS, sTradeAnim->bg1vofs); + SetGpuReg(REG_OFFSET_BG1HOFS, sTradeAnim->bg1hofs); dispcnt = GetGpuReg(REG_OFFSET_DISPCNT); if ((dispcnt & 7) == DISPCNT_MODE_0) { - SetGpuReg(REG_OFFSET_BG2VOFS, sTradeData->bg2vofs); - SetGpuReg(REG_OFFSET_BG2HOFS, sTradeData->bg2hofs); + SetGpuReg(REG_OFFSET_BG2VOFS, sTradeAnim->bg2vofs); + SetGpuReg(REG_OFFSET_BG2HOFS, sTradeAnim->bg2hofs); } else { @@ -2684,7 +2752,7 @@ static void SetTradeGpuRegs(void) } } -static void VBlankCB_Trade(void) +static void VBlankCB_TradeAnim(void) { SetTradeGpuRegs(); LoadOam(); @@ -2692,30 +2760,30 @@ static void VBlankCB_Trade(void) TransferPlttBuffer(); } -static void ClearLinkTimeoutCounter(void) +static void ClearLinkTimeoutTimer(void) { - sTradeData->linkTimeoutCounter = 0; - sTradeData->linkTimeoutZero1 = 0; - sTradeData->linkTimeoutZero2 = 0; + sTradeAnim->linkTimeoutTimer = 0; + sTradeAnim->linkTimeoutZero1 = 0; + sTradeAnim->linkTimeoutZero2 = 0; } static void CheckForLinkTimeout(void) { - if (sTradeData->linkTimeoutZero1 == sTradeData->linkTimeoutZero2) - sTradeData->linkTimeoutCounter++; + if (sTradeAnim->linkTimeoutZero1 == sTradeAnim->linkTimeoutZero2) + sTradeAnim->linkTimeoutTimer++; else - sTradeData->linkTimeoutCounter = 0; + sTradeAnim->linkTimeoutTimer = 0; - if (sTradeData->linkTimeoutCounter > LINK_TRADE_TIMEOUT) + if (sTradeAnim->linkTimeoutTimer > 300) { CloseLink(); SetMainCallback2(CB2_LinkError); - sTradeData->linkTimeoutCounter = 0; - sTradeData->linkTimeoutZero2 = 0; - sTradeData->linkTimeoutZero1 = 0; + sTradeAnim->linkTimeoutTimer = 0; + sTradeAnim->linkTimeoutZero2 = 0; + sTradeAnim->linkTimeoutZero1 = 0; } - sTradeData->linkTimeoutZero2 = sTradeData->linkTimeoutZero1; + sTradeAnim->linkTimeoutZero2 = sTradeAnim->linkTimeoutZero1; } static u32 TradeGetMultiplayerId(void) @@ -2747,20 +2815,20 @@ static void LoadTradeMonPic(u8 whichParty, u8 state) switch (state) { case 0: - species = GetMonData(mon, MON_DATA_SPECIES2); + species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); personality = GetMonData(mon, MON_DATA_PERSONALITY); HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[whichParty * 2 + B_POSITION_OPPONENT_LEFT], species, personality); LoadCompressedSpritePalette(GetMonSpritePalStruct(mon)); - sTradeData->monSpecies[whichParty] = species; - sTradeData->monPersonalities[whichParty] = personality; + sTradeAnim->monSpecies[whichParty] = species; + sTradeAnim->monPersonalities[whichParty] = personality; break; case 1: SetMultiuseSpriteTemplateToPokemon(GetMonSpritePalStruct(mon)->tag, pos); - sTradeData->monSpriteIds[whichParty] = CreateSprite(&gMultiuseSpriteTemplate, 120, 60, 6); - gSprites[sTradeData->monSpriteIds[whichParty]].invisible = TRUE; - gSprites[sTradeData->monSpriteIds[whichParty]].callback = SpriteCallbackDummy; + sTradeAnim->monSpriteIds[whichParty] = CreateSprite(&gMultiuseSpriteTemplate, 120, 60, 6); + gSprites[sTradeAnim->monSpriteIds[whichParty]].invisible = TRUE; + gSprites[sTradeAnim->monSpriteIds[whichParty]].callback = SpriteCallbackDummy; break; } } @@ -2775,34 +2843,34 @@ void CB2_LinkTrade(void) gLinkType = LINKTYPE_TRADE_DISCONNECTED; CloseLink(); } - sTradeData = AllocZeroed(sizeof(*sTradeData)); + sTradeAnim = AllocZeroed(sizeof(*sTradeAnim)); AllocateMonSpritesGfx(); ResetTasks(); ResetSpriteData(); FreeAllSpritePalettes(); - SetVBlankCallback(VBlankCB_Trade); - InitTradeBgInternal(); - ClearLinkTimeoutCounter(); + SetVBlankCallback(VBlankCB_TradeAnim); + TradeAnimInit_LoadGfx(); + ClearLinkTimeoutTimer(); gMain.state++; - sTradeData->neverRead_8C = 0; - sTradeData->state = 0; - sTradeData->isLinkTrade = TRUE; - sTradeData->texX = 64; - sTradeData->texY = 64; - sTradeData->neverRead_D8 = 0; - sTradeData->neverRead_DA = 0; - sTradeData->scrX = 120; - sTradeData->scrY = 80; - sTradeData->sXY = 256; - sTradeData->alpha = 0; + sTradeAnim->neverRead_8C = 0; + sTradeAnim->state = 0; + sTradeAnim->isLinkTrade = TRUE; + sTradeAnim->texX = 64; + sTradeAnim->texY = 64; + sTradeAnim->neverRead_D8 = 0; + sTradeAnim->neverRead_DA = 0; + sTradeAnim->scrX = DISPLAY_WIDTH / 2; + sTradeAnim->scrY = DISPLAY_HEIGHT / 2; + sTradeAnim->sXY = 256; + sTradeAnim->alpha = 0; break; case 1: if (!gReceivedRemoteLinkPlayers) { - sTradeData->isCableTrade = TRUE; + sTradeAnim->isCableTrade = TRUE; OpenLink(); gMain.state++; - sTradeData->timer = 0; + sTradeAnim->timer = 0; } else { @@ -2810,9 +2878,9 @@ void CB2_LinkTrade(void) } break; case 2: - if (++sTradeData->timer > 60) + if (++sTradeAnim->timer > 60) { - sTradeData->timer = 0; + sTradeAnim->timer = 0; gMain.state++; } break; @@ -2821,7 +2889,7 @@ void CB2_LinkTrade(void) { if (GetLinkPlayerCount_2() >= GetSavedPlayerCount()) { - if (++sTradeData->timer > 30) + if (++sTradeAnim->timer > 30) { CheckShouldAdvanceLinkState(); gMain.state++; @@ -2843,9 +2911,9 @@ void CB2_LinkTrade(void) gMain.state++; break; case 5: - sTradeData->playerLinkFlagFinishTrade = 0; - sTradeData->partnerLinkFlagFinishTrade = 0; - sTradeData->sendTradeFinishState = 0; + sTradeAnim->playerFinishStatus = 0; + sTradeAnim->partnerFinishStatus = 0; + sTradeAnim->scheduleLinkTransfer = 0; LoadTradeMonPic(TRADE_PLAYER, 0); gMain.state++; break; @@ -2910,7 +2978,7 @@ void LinkTradeDrawWindow(void) CopyWindowToVram(0, COPYWIN_FULL); } -static void InitTradeBgInternal(void) +static void TradeAnimInit_LoadGfx(void) { SetGpuReg(REG_OFFSET_DISPCNT, 0); ResetBgsAndClearDma3BusyFlags(0); @@ -2921,18 +2989,20 @@ static void InitTradeBgInternal(void) SetBgTilemapBuffer(1, Alloc(BG_SCREEN_SIZE)); SetBgTilemapBuffer(3, Alloc(BG_SCREEN_SIZE)); DeactivateAllTextPrinters(); + // Doing the graphics load... DecompressAndLoadBgGfxUsingHeap(0, gBattleTextboxTiles, 0, 0, 0); LZDecompressWram(gBattleTextboxTilemap, gDecompressionBuffer); - CopyToBgTilemapBuffer(0, gDecompressionBuffer, 0x800, 0); + CopyToBgTilemapBuffer(0, gDecompressionBuffer, BG_SCREEN_SIZE, 0); LoadCompressedPalette(gBattleTextboxPalette, BG_PLTT_ID(0), PLTT_SIZE_4BPP); InitWindows(sTradeSequenceWindowTemplates); + // ... and doing the same load again DecompressAndLoadBgGfxUsingHeap(0, gBattleTextboxTiles, 0, 0, 0); LZDecompressWram(gBattleTextboxTilemap, gDecompressionBuffer); - CopyToBgTilemapBuffer(0, gDecompressionBuffer, 0x800, 0); + CopyToBgTilemapBuffer(0, gDecompressionBuffer, BG_SCREEN_SIZE, 0); LoadCompressedPalette(gBattleTextboxPalette, BG_PLTT_ID(0), PLTT_SIZE_4BPP); } -static void CB2_InGameTrade(void) +static void CB2_InitInGameTrade(void) { u8 otName[11]; @@ -2946,25 +3016,25 @@ static void CB2_InGameTrade(void) StringCopy(gLinkPlayers[1].name, otName); gLinkPlayers[0].language = GAME_LANGUAGE; gLinkPlayers[1].language = GetMonData(&gEnemyParty[0], MON_DATA_LANGUAGE); - sTradeData = AllocZeroed(sizeof(*sTradeData)); + sTradeAnim = AllocZeroed(sizeof(*sTradeAnim)); AllocateMonSpritesGfx(); ResetTasks(); ResetSpriteData(); FreeAllSpritePalettes(); - SetVBlankCallback(VBlankCB_Trade); - InitTradeBgInternal(); - sTradeData->isLinkTrade = FALSE; - sTradeData->neverRead_8C = 0; - sTradeData->state = 0; - sTradeData->texX = 64; - sTradeData->texY = 64; - sTradeData->neverRead_D8 = 0; - sTradeData->neverRead_DA = 0; - sTradeData->scrX = 120; - sTradeData->scrY = 80; - sTradeData->sXY = 256; - sTradeData->alpha = 0; - sTradeData->timer = 0; + SetVBlankCallback(VBlankCB_TradeAnim); + TradeAnimInit_LoadGfx(); + sTradeAnim->isLinkTrade = FALSE; + sTradeAnim->neverRead_8C = 0; + sTradeAnim->state = 0; + sTradeAnim->texX = 64; + sTradeAnim->texY = 64; + sTradeAnim->neverRead_D8 = 0; + sTradeAnim->neverRead_DA = 0; + sTradeAnim->scrX = DISPLAY_WIDTH / 2; + sTradeAnim->scrY = DISPLAY_HEIGHT / 2; + sTradeAnim->sXY = 256; + sTradeAnim->alpha = 0; + sTradeAnim->timer = 0; gMain.state = 5; break; case 5: @@ -3004,7 +3074,7 @@ static void CB2_InGameTrade(void) gMain.state++; break; case 12: - SetMainCallback2(CB2_UpdateInGameTrade); + SetMainCallback2(CB2_InGameTrade); break; } @@ -3048,11 +3118,14 @@ static void TradeMons(u8 playerPartyIdx, u8 partnerPartyIdx) struct Pokemon *partnerMon = &gEnemyParty[partnerPartyIdx]; u16 partnerMail = GetMonData(partnerMon, MON_DATA_MAIL); + // The mail attached to the sent Pokemon no longer exists in your file. if (playerMail != MAIL_NONE) ClearMail(&gSaveBlock1Ptr->mail[playerMail]); - SWAP(*playerMon, *partnerMon, sTradeData->tempMon); + SWAP(*playerMon, *partnerMon, sTradeAnim->tempMon); + // By default, a Pokemon received from a trade will have 70 Friendship. + // Eggs use Friendship to track egg cycles, so don't set this on Eggs. friendship = 70; if (!GetMonData(playerMon, MON_DATA_IS_EGG)) SetMonData(playerMon, MON_DATA_FRIENDSHIP, &friendship); @@ -3065,26 +3138,26 @@ static void TradeMons(u8 playerPartyIdx, u8 partnerPartyIdx) TryEnableNationalDexFromLinkPartner(); } -static void TrySendTradeFinishData(void) +static void HandleLinkDataSend(void) { - switch (sTradeData->sendTradeFinishState) + switch (sTradeAnim->scheduleLinkTransfer) { case 1: if (IsLinkTaskFinished()) { - SendBlock(BitmaskAllOtherLinkPlayers(), sTradeData->linkData, sizeof(sTradeData->linkData)); - sTradeData->sendTradeFinishState++; + SendBlock(BitmaskAllOtherLinkPlayers(), sTradeAnim->linkData, sizeof(sTradeAnim->linkData)); + sTradeAnim->scheduleLinkTransfer++; } // fallthrough case 2: - sTradeData->sendTradeFinishState = 0; + sTradeAnim->scheduleLinkTransfer = 0; break; } } -static void CB2_UpdateInGameTrade(void) +static void CB2_InGameTrade(void) { - AnimateTradeSequence(); + DoTradeAnim(); RunTasks(); RunTextPrinters(); AnimateSprites(); @@ -3097,8 +3170,8 @@ static void SetTradeSequenceBgGpuRegs(u8 state) switch (state) { case 0: - sTradeData->bg2vofs = 0; - sTradeData->bg2hofs = 180; + sTradeAnim->bg2vofs = 0; + sTradeAnim->bg2hofs = 180; SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG0_ON | @@ -3114,8 +3187,8 @@ static void SetTradeSequenceBgGpuRegs(u8 state) DmaCopy16Defvars(3, gTradePlatform_Tilemap, (void *) BG_SCREEN_ADDR(18), 0x1000); break; case 1: - sTradeData->bg1hofs = 0; - sTradeData->bg1vofs = 348; + sTradeAnim->bg1hofs = 0; + sTradeAnim->bg1vofs = 348; SetGpuReg(REG_OFFSET_BG1VOFS, 348); SetGpuReg(REG_OFFSET_BG1CNT, BGCNT_PRIORITY(2) | BGCNT_CHARBASE(0) | @@ -3128,13 +3201,13 @@ static void SetTradeSequenceBgGpuRegs(u8 state) BGCNT_SCREENBASE(18) | BGCNT_TXT256x512); - if (sTradeData->isCableTrade) + if (sTradeAnim->isCableTrade) { - DmaCopy16Defvars(3, sGbaCable_Tilemap, (void *) BG_SCREEN_ADDR(5), 0x1000); + DmaCopy16Defvars(3, sGbaMapCable, (void *) BG_SCREEN_ADDR(5), 0x1000); } else { - DmaCopy16Defvars(3, sGbaWireless_Tilemap, (void *) BG_SCREEN_ADDR(5), 0x1000); + DmaCopy16Defvars(3, sGbaMapWireless, (void *) BG_SCREEN_ADDR(5), 0x1000); } DmaCopyLarge16(3, gTradeGba_Gfx, (void *) BG_CHAR_ADDR(0), 0x1420, 0x1000); @@ -3144,15 +3217,15 @@ static void SetTradeSequenceBgGpuRegs(u8 state) DISPCNT_OBJ_ON); break; case 2: - sTradeData->bg1vofs = 0; - sTradeData->bg1hofs = 0; - if (!sTradeData->isCableTrade) + sTradeAnim->bg1vofs = 0; + sTradeAnim->bg1hofs = 0; + if (!sTradeAnim->isCableTrade) { SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_1 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG1_ON | DISPCNT_OBJ_ON); - LZ77UnCompVram(sCrossingHighlightWireless_Tilemap, (void *) BG_SCREEN_ADDR(5)); + LZ77UnCompVram(sWirelessCloseup_Map, (void *) BG_SCREEN_ADDR(5)); BlendPalettes(0x8, 16, RGB_BLACK); } else @@ -3161,7 +3234,7 @@ static void SetTradeSequenceBgGpuRegs(u8 state) DISPCNT_OBJ_1D_MAP | DISPCNT_BG1_ON | DISPCNT_OBJ_ON); - DmaCopy16Defvars(3, sCrossingHighlightCable_Tilemap, (void *) BG_SCREEN_ADDR(5), 0x800); + DmaCopy16Defvars(3, sCableCloseup_Map, (void *) BG_SCREEN_ADDR(5), 0x800); BlendPalettes(0x1, 16, RGB_BLACK); } break; @@ -3169,7 +3242,7 @@ static void SetTradeSequenceBgGpuRegs(u8 state) LoadPalette(sWirelessSignalNone_Pal, BG_PLTT_ID(3), PLTT_SIZE_4BPP); LZ77UnCompVram(sWirelessSignal_Gfx, (void *) BG_CHAR_ADDR(1)); LZ77UnCompVram(sWirelessSignal_Tilemap, (void *) BG_SCREEN_ADDR(18)); - sTradeData->bg2vofs = 80; + sTradeAnim->bg2vofs = 80; SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG1_ON | @@ -3186,26 +3259,26 @@ static void SetTradeSequenceBgGpuRegs(u8 state) BGCNT_256COLOR | BGCNT_SCREENBASE(18) | BGCNT_AFF128x128); - sTradeData->texX = 64; - sTradeData->texY = 92; - sTradeData->sXY = 32; - sTradeData->gbaScale = 1024; - sTradeData->alpha = 0; + sTradeAnim->texX = 64; + sTradeAnim->texY = 92; + sTradeAnim->sXY = 32; + sTradeAnim->gbaScale = 1024; + sTradeAnim->alpha = 0; DmaCopyLarge16(3, sGbaAffine_Gfx, (void *) BG_CHAR_ADDR(1), 0x2840, 0x1000); - if (sTradeData->isCableTrade) + if (sTradeAnim->isCableTrade) { - DmaCopy16Defvars(3, sGbaCable_AffineTilemap, (void *) BG_SCREEN_ADDR(18), 0x100); + DmaCopy16Defvars(3, sGbaAffineMapCable, (void *) BG_SCREEN_ADDR(18), 0x100); } else { - DmaCopy16Defvars(3, sGbaWireless_AffineTilemap, (void *) BG_SCREEN_ADDR(18), 0x100); + DmaCopy16Defvars(3, sGbaAffineMapWireless, (void *) BG_SCREEN_ADDR(18), 0x100); } break; case 5: - sTradeData->bg1vofs = 0; - sTradeData->bg1hofs = 0; + sTradeAnim->bg1vofs = 0; + sTradeAnim->bg1hofs = 0; break; case 6: SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_1 | @@ -3217,28 +3290,28 @@ static void SetTradeSequenceBgGpuRegs(u8 state) BGCNT_256COLOR | BGCNT_SCREENBASE(18) | BGCNT_AFF128x128); - sTradeData->texX = 64; - sTradeData->texY = 92; - sTradeData->sXY = 256; - sTradeData->gbaScale = 128; - sTradeData->scrX = 120; - sTradeData->scrY = 80; - sTradeData->alpha = 0; + sTradeAnim->texX = 64; + sTradeAnim->texY = 92; + sTradeAnim->sXY = 256; + sTradeAnim->gbaScale = 128; + sTradeAnim->scrX = 120; + sTradeAnim->scrY = 80; + sTradeAnim->alpha = 0; DmaCopyLarge16(3, sGbaAffine_Gfx, (void *) BG_CHAR_ADDR(1), 0x2840, 0x1000); - if (sTradeData->isCableTrade) + if (sTradeAnim->isCableTrade) { - DmaCopy16Defvars(3, sGbaCable_AffineTilemap, (void *) BG_SCREEN_ADDR(18), 0x100); + DmaCopy16Defvars(3, sGbaAffineMapCable, (void *) BG_SCREEN_ADDR(18), 0x100); } else { - DmaCopy16Defvars(3, sGbaWireless_AffineTilemap, (void *) BG_SCREEN_ADDR(18), 0x100); + DmaCopy16Defvars(3, sGbaAffineMapWireless, (void *) BG_SCREEN_ADDR(18), 0x100); } break; case 7: - sTradeData->bg2vofs = 0; - sTradeData->bg2hofs = 0; + sTradeAnim->bg2vofs = 0; + sTradeAnim->bg2hofs = 0; SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BG2CNT, BGCNT_PRIORITY(2) | BGCNT_CHARBASE(1) | @@ -3269,7 +3342,7 @@ static void BufferTradeSceneStrings(void) u8 name[20]; const struct InGameTrade *ingameTrade; - if (sTradeData->isLinkTrade) + if (sTradeAnim->isLinkTrade) { mpId = GetMultiplayerId(); StringCopy(gStringVar1, gLinkPlayers[mpId ^ 1].name); @@ -3289,476 +3362,476 @@ static void BufferTradeSceneStrings(void) } // returns TRUE if it finished a link trade, FALSE if it finished an in-game trade or if sequence is still going -static bool8 AnimateTradeSequence(void) +static bool8 DoTradeAnim(void) { - if (sTradeData->isCableTrade) - return AnimateTradeSequenceCable(); + if (sTradeAnim->isCableTrade) + return DoTradeAnim_Cable(); else - return AnimateTradeSequenceWireless(); + return DoTradeAnim_Wireless(); } -// Below are the states for the main switch in AnimateTradeSequenceCable and AnimateTradeSequenceWireless -// When AnimateTradeSequenceWireless has a unique version of a -// state used by AnimateTradeSequenceCable, it adds the below modifier -#define TS_WIRELESS_STATE 100 +// Below are the states for the main switch in DoTradeAnim_Cable and DoTradeAnim_Wireless +// When DoTradeAnim_Wireless has a unique version of a state used by DoTradeAnim_Cable, it adds the below modifier +#define STATE_WIRELESS 100 enum { - TS_STATE_START, - TS_STATE_MON_SLIDE_IN, + STATE_START, + STATE_MON_SLIDE_IN, // 2-9 unused - TS_STATE_SEND_MSG = 10, - TS_STATE_BYE_BYE, - TS_STATE_POKEBALL_DEPART, - TS_STATE_POKEBALL_DEPART_WAIT, - TS_STATE_FADE_OUT_TO_GBA_SEND, + STATE_SEND_MSG = 10, + STATE_BYE_BYE, + STATE_POKEBALL_DEPART, + STATE_POKEBALL_DEPART_WAIT, + STATE_FADE_OUT_TO_GBA_SEND, // 15-19 unused - TS_STATE_WAIT_FADE_OUT_TO_GBA_SEND = 20, - TS_STATE_FADE_IN_TO_GBA_SEND, - TS_STATE_WAIT_FADE_IN_TO_GBA_SEND, - TS_STATE_GBA_ZOOM_OUT, - TS_STATE_GBA_FLASH_SEND, - TS_STATE_GBA_STOP_FLASH_SEND, - TS_STATE_PAN_AWAY_GBA, - TS_STATE_CREATE_LINK_MON_LEAVING, - TS_STATE_LINK_MON_TRAVEL_OUT, - TS_STATE_FADE_OUT_TO_CROSSING, - TS_STATE_WAIT_FADE_OUT_TO_CROSSING, - TS_STATE_FADE_IN_TO_CROSSING, - TS_STATE_WAIT_FADE_IN_TO_CROSSING, - TS_STATE_CROSSING_LINK_MONS_ENTER, - TS_STATE_CROSSING_BLEND_WHITE_1, - TS_STATE_CROSSING_BLEND_WHITE_2, - TS_STATE_CROSSING_BLEND_WHITE_3, - TS_STATE_CROSSING_CREATE_MON_PICS, - TS_STATE_CROSSING_MON_PICS_MOVE, - TS_STATE_CROSSING_LINK_MONS_EXIT, - TS_STATE_CREATE_LINK_MON_ARRIVING, - TS_STATE_FADE_OUT_TO_GBA_RECV, - TS_STATE_WAIT_FADE_OUT_TO_GBA_RECV, - TS_STATE_LINK_MON_TRAVEL_IN, - TS_STATE_PAN_TO_GBA, - TS_STATE_DESTROY_LINK_MON, - TS_STATE_LINK_MON_ARRIVED_DELAY, - TS_STATE_MOVE_GBA_TO_CENTER, - TS_STATE_GBA_FLASH_RECV, - TS_STATE_UNUSED, - TS_STATE_GBA_STOP_FLASH_RECV, - TS_STATE_GBA_ZOOM_IN, - TS_STATE_FADE_OUT_TO_NEW_MON, + STATE_WAIT_FADE_OUT_TO_GBA_SEND = 20, + STATE_FADE_IN_TO_GBA_SEND, + STATE_WAIT_FADE_IN_TO_GBA_SEND, + STATE_GBA_ZOOM_OUT, + STATE_GBA_FLASH_SEND, + STATE_GBA_STOP_FLASH_SEND, + STATE_PAN_AWAY_GBA, + STATE_CREATE_LINK_MON_LEAVING, + STATE_LINK_MON_TRAVEL_OUT, + STATE_FADE_OUT_TO_CROSSING, + STATE_WAIT_FADE_OUT_TO_CROSSING, + STATE_FADE_IN_TO_CROSSING, + STATE_WAIT_FADE_IN_TO_CROSSING, + STATE_CROSSING_LINK_MONS_ENTER, + STATE_CROSSING_BLEND_WHITE_1, + STATE_CROSSING_BLEND_WHITE_2, + STATE_CROSSING_BLEND_WHITE_3, + STATE_CROSSING_CREATE_MON_PICS, + STATE_CROSSING_MON_PICS_MOVE, + STATE_CROSSING_LINK_MONS_EXIT, + STATE_CREATE_LINK_MON_ARRIVING, + STATE_FADE_OUT_TO_GBA_RECV, + STATE_WAIT_FADE_OUT_TO_GBA_RECV, + STATE_LINK_MON_TRAVEL_IN, + STATE_PAN_TO_GBA, + STATE_DESTROY_LINK_MON, + STATE_LINK_MON_ARRIVED_DELAY, + STATE_MOVE_GBA_TO_CENTER, + STATE_GBA_FLASH_RECV, + STATE_UNUSED, + STATE_GBA_STOP_FLASH_RECV, + STATE_GBA_ZOOM_IN, + STATE_FADE_OUT_TO_NEW_MON, // 53-59 unused - TS_STATE_WAIT_FADE_OUT_TO_NEW_MON = 60, - TS_STATE_FADE_IN_TO_NEW_MON, - TS_STATE_WAIT_FADE_IN_TO_NEW_MON, - TS_STATE_POKEBALL_ARRIVE, - TS_STATE_FADE_POKEBALL_TO_NORMAL, - TS_STATE_POKEBALL_ARRIVE_WAIT, - TS_STATE_SHOW_NEW_MON, - TS_STATE_NEW_MON_MSG, - TS_STATE_TAKE_CARE_OF_MON, - TS_STATE_AFTER_NEW_MON_DELAY, - TS_STATE_CHECK_RIBBONS, - TS_STATE_END_LINK_TRADE, - TS_STATE_TRY_EVOLUTION, - TS_STATE_FADE_OUT_END, - TS_STATE_WAIT_FADE_OUT_END, + STATE_WAIT_FADE_OUT_TO_NEW_MON = 60, + STATE_FADE_IN_TO_NEW_MON, + STATE_WAIT_FADE_IN_TO_NEW_MON, + STATE_POKEBALL_ARRIVE, + STATE_FADE_POKEBALL_TO_NORMAL, + STATE_POKEBALL_ARRIVE_WAIT, + STATE_SHOW_NEW_MON, + STATE_NEW_MON_MSG, + STATE_TAKE_CARE_OF_MON, + STATE_AFTER_NEW_MON_DELAY, + STATE_CHECK_RIBBONS, + STATE_END_LINK_TRADE, + STATE_TRY_EVOLUTION, + STATE_FADE_OUT_END, + STATE_WAIT_FADE_OUT_END, // Special states - TS_STATE_GBA_FLASH_SEND_WIRELESS = TS_STATE_GBA_FLASH_SEND + TS_WIRELESS_STATE, - TS_STATE_GBA_STOP_FLASH_SEND_WIRELESS, - TS_STATE_WAIT_WIRELESS_SIGNAL_SEND, - TS_STATE_PAN_TO_GBA_WIRELESS = TS_STATE_PAN_TO_GBA + TS_WIRELESS_STATE, - TS_STATE_DESTROY_LINK_MON_WIRELESS, - TS_STATE_WAIT_WIRELESS_SIGNAL_RECV, - TS_STATE_DELAY_FOR_MON_ANIM = 167, - TS_STATE_LINK_MON_TRAVEL_OFFSCREEN = 200, - TS_STATE_WAIT_FOR_MON_CRY = 267, + STATE_GBA_FLASH_SEND_WIRELESS = STATE_GBA_FLASH_SEND + STATE_WIRELESS, + STATE_GBA_STOP_FLASH_SEND_WIRELESS, + STATE_WAIT_WIRELESS_SIGNAL_SEND, + STATE_PAN_TO_GBA_WIRELESS = STATE_PAN_TO_GBA + STATE_WIRELESS, + STATE_DESTROY_LINK_MON_WIRELESS, + STATE_WAIT_WIRELESS_SIGNAL_RECV, + STATE_DELAY_FOR_MON_ANIM = 167, + STATE_LINK_MON_TRAVEL_OFFSCREEN = 200, + STATE_WAIT_FOR_MON_CRY = 267, }; -static bool8 AnimateTradeSequenceCable(void) +static bool8 DoTradeAnim_Cable(void) { u16 evoTarget; - switch (sTradeData->state) + switch (sTradeAnim->state) { - case TS_STATE_START: - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].invisible = FALSE; - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].x2 = -180; - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y2 = gMonFrontPicCoords[sTradeData->monSpecies[TRADE_PLAYER]].y_offset; - sTradeData->state++; - sTradeData->cachedMapMusic = GetCurrentMapMusic(); + case STATE_START: + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].invisible = FALSE; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].x2 = -180; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].y2 = gMonFrontPicCoords[sTradeAnim->monSpecies[TRADE_PLAYER]].y_offset; + sTradeAnim->state++; + sTradeAnim->cachedMapMusic = GetCurrentMapMusic(); PlayNewMapMusic(MUS_EVOLUTION); break; - case TS_STATE_MON_SLIDE_IN: - if (sTradeData->bg2hofs > 0) + case STATE_MON_SLIDE_IN: + if (sTradeAnim->bg2hofs > 0) { // Sliding - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].x2 += 3; - sTradeData->bg2hofs -= 3; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].x2 += 3; + sTradeAnim->bg2hofs -= 3; } else { // Pokémon has arrived onscreen - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].x2 = 0; - sTradeData->bg2hofs = 0; - sTradeData->state = TS_STATE_SEND_MSG; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].x2 = 0; + sTradeAnim->bg2hofs = 0; + sTradeAnim->state = STATE_SEND_MSG; } break; - case TS_STATE_SEND_MSG: + case STATE_SEND_MSG: StringExpandPlaceholders(gStringVar4, gText_XWillBeSentToY); DrawTextOnTradeWindow(0, gStringVar4, 0); - if (sTradeData->monSpecies[TRADE_PLAYER] != SPECIES_EGG) - PlayCry_Normal(sTradeData->monSpecies[TRADE_PLAYER], 0); + if (sTradeAnim->monSpecies[TRADE_PLAYER] != SPECIES_EGG) + PlayCry_Normal(sTradeAnim->monSpecies[TRADE_PLAYER], 0); - sTradeData->state = TS_STATE_BYE_BYE; - sTradeData->timer = 0; + sTradeAnim->state = STATE_BYE_BYE; + sTradeAnim->timer = 0; break; - case TS_STATE_BYE_BYE: - if (++sTradeData->timer == 80) + case STATE_BYE_BYE: + if (++sTradeAnim->timer == 80) { - sTradeData->releasePokeballSpriteId = CreateTradePokeballSprite(sTradeData->monSpriteIds[0], gSprites[sTradeData->monSpriteIds[0]].oam.paletteNum, 120, 32, 2, 1, 0x14, 0xfffff); - sTradeData->state++; + sTradeAnim->releasePokeballSpriteId = CreateTradePokeballSprite(sTradeAnim->monSpriteIds[TRADE_PLAYER], gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].oam.paletteNum, 120, 32, 2, 1, 0x14, 0xfffff); + sTradeAnim->state++; StringExpandPlaceholders(gStringVar4, gText_ByeByeVar1); DrawTextOnTradeWindow(0, gStringVar4, 0); } break; - case TS_STATE_POKEBALL_DEPART: - if (gSprites[sTradeData->releasePokeballSpriteId].callback == SpriteCallbackDummy) + case STATE_POKEBALL_DEPART: + if (gSprites[sTradeAnim->releasePokeballSpriteId].callback == SpriteCallbackDummy) { - sTradeData->bouncingPokeballSpriteId = CreateSprite(&sSpriteTemplate_Pokeball, 120, 32, 0); - gSprites[sTradeData->bouncingPokeballSpriteId].callback = SpriteCB_BouncingPokeballDepart; - DestroySprite(&gSprites[sTradeData->releasePokeballSpriteId]); - sTradeData->state++; + sTradeAnim->bouncingPokeballSpriteId = CreateSprite(&sSpriteTemplate_Pokeball, 120, 32, 0); + gSprites[sTradeAnim->bouncingPokeballSpriteId].callback = SpriteCB_BouncingPokeballDepart; + DestroySprite(&gSprites[sTradeAnim->releasePokeballSpriteId]); + sTradeAnim->state++; } break; - case TS_STATE_POKEBALL_DEPART_WAIT: + case STATE_POKEBALL_DEPART_WAIT: // The game waits here for the sprite to finish its animation sequence. break; - case TS_STATE_FADE_OUT_TO_GBA_SEND: + case STATE_FADE_OUT_TO_GBA_SEND: BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - sTradeData->state = TS_STATE_WAIT_FADE_OUT_TO_GBA_SEND; + sTradeAnim->state = STATE_WAIT_FADE_OUT_TO_GBA_SEND; break; - case TS_STATE_WAIT_FADE_OUT_TO_GBA_SEND: + case STATE_WAIT_FADE_OUT_TO_GBA_SEND: if (!gPaletteFade.active) { SetTradeSequenceBgGpuRegs(4); FillWindowPixelBuffer(0, PIXEL_FILL(15)); CopyWindowToVram(0, COPYWIN_FULL); - sTradeData->state++; + sTradeAnim->state++; } break; - case TS_STATE_FADE_IN_TO_GBA_SEND: + case STATE_FADE_IN_TO_GBA_SEND: BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_BLACK); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_WAIT_FADE_IN_TO_GBA_SEND: + case STATE_WAIT_FADE_IN_TO_GBA_SEND: if (!gPaletteFade.active) - sTradeData->state = TS_STATE_GBA_ZOOM_OUT; + sTradeAnim->state = STATE_GBA_ZOOM_OUT; break; - case TS_STATE_GBA_ZOOM_OUT: - if (sTradeData->gbaScale > 0x100) + case STATE_GBA_ZOOM_OUT: + if (sTradeAnim->gbaScale > 0x100) { - sTradeData->gbaScale -= 0x34; + sTradeAnim->gbaScale -= 0x34; } else { SetTradeSequenceBgGpuRegs(1); - sTradeData->gbaScale = 0x80; - sTradeData->state++; - sTradeData->timer = 0; + sTradeAnim->gbaScale = 0x80; + sTradeAnim->state++; + sTradeAnim->timer = 0; } - sTradeData->sXY = 0x8000 / sTradeData->gbaScale; + sTradeAnim->sXY = 0x8000 / sTradeAnim->gbaScale; break; - case TS_STATE_GBA_FLASH_SEND: - if (++sTradeData->timer > 20) + case STATE_GBA_FLASH_SEND: + if (++sTradeAnim->timer > 20) { SetTradeBGAffine(); - sTradeData->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_GbaScreenFlash_Long, 120, 80, 0); - sTradeData->state++; + sTradeAnim->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_GbaScreenFlash_Long, 120, 80, 0); + sTradeAnim->state++; } break; - case TS_STATE_GBA_STOP_FLASH_SEND: - if (gSprites[sTradeData->connectionSpriteId2].animEnded) + case STATE_GBA_STOP_FLASH_SEND: + if (gSprites[sTradeAnim->connectionSpriteId2].animEnded) { - DestroySprite(&gSprites[sTradeData->connectionSpriteId2]); + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId2]); SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(12, 4)); - sTradeData->state++; + sTradeAnim->state++; } break; - case TS_STATE_PAN_AWAY_GBA: - if (--sTradeData->bg1vofs == 316) - sTradeData->state++; + case STATE_PAN_AWAY_GBA: + if (--sTradeAnim->bg1vofs == 316) + sTradeAnim->state++; - if (sTradeData->bg1vofs == 328) - sTradeData->cableEndSpriteId = CreateSprite(&sSpriteTemplate_CableEnd, 128, 65, 0); + if (sTradeAnim->bg1vofs == 328) + sTradeAnim->cableEndSpriteId = CreateSprite(&sSpriteTemplate_CableEnd, 128, 65, 0); break; - case TS_STATE_CREATE_LINK_MON_LEAVING: - sTradeData->connectionSpriteId1 = CreateSprite(&sSpriteTemplate_LinkMonGlow, 128, 80, 3); - sTradeData->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 128, 80, 0); - StartSpriteAnim(&gSprites[sTradeData->connectionSpriteId2], ANIM_LINKMON_SMALL); - sTradeData->state++; + case STATE_CREATE_LINK_MON_LEAVING: + sTradeAnim->connectionSpriteId1 = CreateSprite(&sSpriteTemplate_LinkMonGlow, 128, 80, 3); + sTradeAnim->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 128, 80, 0); + StartSpriteAnim(&gSprites[sTradeAnim->connectionSpriteId2], ANIM_LINKMON_SMALL); + sTradeAnim->state++; break; - case TS_STATE_LINK_MON_TRAVEL_OUT: - if ((sTradeData->bg1vofs -= 2) == 166) - sTradeData->state = TS_STATE_LINK_MON_TRAVEL_OFFSCREEN; + case STATE_LINK_MON_TRAVEL_OUT: + if ((sTradeAnim->bg1vofs -= 2) == 166) + sTradeAnim->state = STATE_LINK_MON_TRAVEL_OFFSCREEN; SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_1 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG1_ON | DISPCNT_OBJ_ON); break; - case TS_STATE_LINK_MON_TRAVEL_OFFSCREEN: - gSprites[sTradeData->connectionSpriteId1].y -= 2; - gSprites[sTradeData->connectionSpriteId2].y -= 2; - if (gSprites[sTradeData->connectionSpriteId1].y < -8) - sTradeData->state = TS_STATE_FADE_OUT_TO_CROSSING; + case STATE_LINK_MON_TRAVEL_OFFSCREEN: + gSprites[sTradeAnim->connectionSpriteId1].y -= 2; + gSprites[sTradeAnim->connectionSpriteId2].y -= 2; + if (gSprites[sTradeAnim->connectionSpriteId1].y < -8) + sTradeAnim->state = STATE_FADE_OUT_TO_CROSSING; break; - case TS_STATE_FADE_OUT_TO_CROSSING: + case STATE_FADE_OUT_TO_CROSSING: BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 16, RGB_BLACK); - sTradeData->state = TS_STATE_WAIT_FADE_OUT_TO_CROSSING; + sTradeAnim->state = STATE_WAIT_FADE_OUT_TO_CROSSING; break; - case TS_STATE_WAIT_FADE_OUT_TO_CROSSING: + case STATE_WAIT_FADE_OUT_TO_CROSSING: if (!gPaletteFade.active) { - DestroySprite(&gSprites[sTradeData->connectionSpriteId1]); - DestroySprite(&gSprites[sTradeData->connectionSpriteId2]); + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId1]); + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId2]); SetTradeSequenceBgGpuRegs(2); - sTradeData->state++; + sTradeAnim->state++; } break; - case TS_STATE_FADE_IN_TO_CROSSING: + case STATE_FADE_IN_TO_CROSSING: BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_BLACK); - sTradeData->connectionSpriteId1 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 111, 170, 0); - sTradeData->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 129, -10, 0); - sTradeData->state++; + sTradeAnim->connectionSpriteId1 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 111, 170, 0); + sTradeAnim->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 129, -10, 0); + sTradeAnim->state++; break; - case TS_STATE_WAIT_FADE_IN_TO_CROSSING: + case STATE_WAIT_FADE_IN_TO_CROSSING: if (!gPaletteFade.active) { PlaySE(SE_WARP_OUT); - sTradeData->state++; + sTradeAnim->state++; } - gSprites[sTradeData->connectionSpriteId1].y2 -= 3; - gSprites[sTradeData->connectionSpriteId2].y2 += 3; + gSprites[sTradeAnim->connectionSpriteId1].y2 -= 3; + gSprites[sTradeAnim->connectionSpriteId2].y2 += 3; break; - case TS_STATE_CROSSING_LINK_MONS_ENTER: - gSprites[sTradeData->connectionSpriteId1].y2 -= 3; - gSprites[sTradeData->connectionSpriteId2].y2 += 3; - if (gSprites[sTradeData->connectionSpriteId1].y2 <= -90) + case STATE_CROSSING_LINK_MONS_ENTER: + gSprites[sTradeAnim->connectionSpriteId1].y2 -= 3; + gSprites[sTradeAnim->connectionSpriteId2].y2 += 3; + if (gSprites[sTradeAnim->connectionSpriteId1].y2 <= -90) { - gSprites[sTradeData->connectionSpriteId1].data[1] = 1; - gSprites[sTradeData->connectionSpriteId2].data[1] = 1; - sTradeData->state++; + gSprites[sTradeAnim->connectionSpriteId1].data[1] = 1; + gSprites[sTradeAnim->connectionSpriteId2].data[1] = 1; + sTradeAnim->state++; } break; - case TS_STATE_CROSSING_BLEND_WHITE_1: + case STATE_CROSSING_BLEND_WHITE_1: BlendPalettes(0x1, 16, RGB_WHITEALPHA); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_CROSSING_BLEND_WHITE_2: + case STATE_CROSSING_BLEND_WHITE_2: BlendPalettes(0x1, 0, RGB_WHITEALPHA); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_CROSSING_BLEND_WHITE_3: + case STATE_CROSSING_BLEND_WHITE_3: BlendPalettes(0x1, 16, RGB_WHITEALPHA); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_CROSSING_CREATE_MON_PICS: - if (!IsMonSpriteNotFlipped(sTradeData->monSpecies[TRADE_PLAYER])) + case STATE_CROSSING_CREATE_MON_PICS: + if (!IsMonSpriteNotFlipped(sTradeAnim->monSpecies[TRADE_PLAYER])) { - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].affineAnims = sAffineAnims_CrossingMonPics; - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].oam.affineMode = ST_OAM_AFFINE_DOUBLE; - CalcCenterToCornerVec(&gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]], SPRITE_SHAPE(64x64), SPRITE_SIZE(64x64), ST_OAM_AFFINE_DOUBLE); - StartSpriteAffineAnim(&gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]], 0); + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].affineAnims = sAffineAnims_CrossingMonPics; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].oam.affineMode = ST_OAM_AFFINE_DOUBLE; + CalcCenterToCornerVec(&gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]], SPRITE_SHAPE(64x64), SPRITE_SIZE(64x64), ST_OAM_AFFINE_DOUBLE); + StartSpriteAffineAnim(&gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]], 0); } else { - StartSpriteAffineAnim(&gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]], 0); + StartSpriteAffineAnim(&gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]], 0); } - StartSpriteAffineAnim(&gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]], 0); - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].x = 60; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].x = 180; - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y = 192; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].y = -32; - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].invisible = FALSE; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].invisible = FALSE; - sTradeData->state++; + StartSpriteAffineAnim(&gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]], 0); + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].x = 60; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].x = 180; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].y = 192; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].y = -32; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].invisible = FALSE; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].invisible = FALSE; + sTradeAnim->state++; break; - case TS_STATE_CROSSING_MON_PICS_MOVE: - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y2 -= 3; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].y2 += 3; - if (gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y2 < -DISPLAY_HEIGHT - && gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y2 >= -DISPLAY_HEIGHT - 3) + case STATE_CROSSING_MON_PICS_MOVE: + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].y2 -= 3; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].y2 += 3; + if (gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].y2 < -DISPLAY_HEIGHT + && gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].y2 >= -DISPLAY_HEIGHT - 3) { PlaySE(SE_WARP_IN); } - if (gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y2 < -222) + if (gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].y2 < -222) { - gSprites[sTradeData->connectionSpriteId1].data[1] = 0; - gSprites[sTradeData->connectionSpriteId2].data[1] = 0; - sTradeData->state++; - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].invisible = TRUE; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].invisible = TRUE; + gSprites[sTradeAnim->connectionSpriteId1].data[1] = 0; + gSprites[sTradeAnim->connectionSpriteId2].data[1] = 0; + sTradeAnim->state++; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].invisible = TRUE; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].invisible = TRUE; BlendPalettes(0x1, 0, RGB_WHITEALPHA); } break; - case TS_STATE_CROSSING_LINK_MONS_EXIT: - gSprites[sTradeData->connectionSpriteId1].y2 -= 3; - gSprites[sTradeData->connectionSpriteId2].y2 += 3; - if (gSprites[sTradeData->connectionSpriteId1].y2 <= -222) + case STATE_CROSSING_LINK_MONS_EXIT: + gSprites[sTradeAnim->connectionSpriteId1].y2 -= 3; + gSprites[sTradeAnim->connectionSpriteId2].y2 += 3; + if (gSprites[sTradeAnim->connectionSpriteId1].y2 <= -222) { BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 16, RGB_BLACK); - sTradeData->state++; - DestroySprite(&gSprites[sTradeData->connectionSpriteId1]); - DestroySprite(&gSprites[sTradeData->connectionSpriteId2]); + sTradeAnim->state++; + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId1]); + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId2]); } break; - case TS_STATE_CREATE_LINK_MON_ARRIVING: + case STATE_CREATE_LINK_MON_ARRIVING: if (!gPaletteFade.active) { - sTradeData->state++; + sTradeAnim->state++; SetTradeSequenceBgGpuRegs(1); - sTradeData->bg1vofs = 166; - sTradeData->connectionSpriteId1 = CreateSprite(&sSpriteTemplate_LinkMonGlow, 128, -20, 3); - sTradeData->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 128, -20, 0); - StartSpriteAnim(&gSprites[sTradeData->connectionSpriteId2], ANIM_LINKMON_SMALL); + sTradeAnim->bg1vofs = 166; + sTradeAnim->connectionSpriteId1 = CreateSprite(&sSpriteTemplate_LinkMonGlow, 128, -20, 3); + sTradeAnim->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 128, -20, 0); + StartSpriteAnim(&gSprites[sTradeAnim->connectionSpriteId2], ANIM_LINKMON_SMALL); } break; - case TS_STATE_FADE_OUT_TO_GBA_RECV: + case STATE_FADE_OUT_TO_GBA_RECV: BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_BLACK); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_WAIT_FADE_OUT_TO_GBA_RECV: + case STATE_WAIT_FADE_OUT_TO_GBA_RECV: SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG1_ON | DISPCNT_OBJ_ON); if (!gPaletteFade.active) - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_LINK_MON_TRAVEL_IN: - gSprites[sTradeData->connectionSpriteId1].y2 += 3; - gSprites[sTradeData->connectionSpriteId2].y2 += 3; - if (gSprites[sTradeData->connectionSpriteId1].y2 + gSprites[sTradeData->connectionSpriteId1].y == 64) + case STATE_LINK_MON_TRAVEL_IN: + gSprites[sTradeAnim->connectionSpriteId1].y2 += 3; + gSprites[sTradeAnim->connectionSpriteId2].y2 += 3; + if (gSprites[sTradeAnim->connectionSpriteId1].y2 + gSprites[sTradeAnim->connectionSpriteId1].y == 64) + sTradeAnim->state++; + break; + case STATE_PAN_TO_GBA: + if ((sTradeAnim->bg1vofs += 2) > 316) { - sTradeData->state++; + sTradeAnim->bg1vofs = 316; + sTradeAnim->state++; } break; - case TS_STATE_PAN_TO_GBA: - if ((sTradeData->bg1vofs += 2) > 316) + case STATE_DESTROY_LINK_MON: + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId1]); + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId2]); + sTradeAnim->state++; + sTradeAnim->timer = 0; + break; + case STATE_LINK_MON_ARRIVED_DELAY: + if (++sTradeAnim->timer == 10) + sTradeAnim->state++; + break; + case STATE_MOVE_GBA_TO_CENTER: + if (++sTradeAnim->bg1vofs > 348) { - sTradeData->bg1vofs = 316; - sTradeData->state++; + sTradeAnim->bg1vofs = 348; + sTradeAnim->state++; + } + if (sTradeAnim->bg1vofs == 328 && sTradeAnim->isCableTrade) + { + sTradeAnim->cableEndSpriteId = CreateSprite(&sSpriteTemplate_CableEnd, 128, 65, 0); + gSprites[sTradeAnim->cableEndSpriteId].callback = SpriteCB_CableEndReceiving; } break; - case TS_STATE_DESTROY_LINK_MON: - DestroySprite(&gSprites[sTradeData->connectionSpriteId1]); - DestroySprite(&gSprites[sTradeData->connectionSpriteId2]); - sTradeData->state++; - sTradeData->timer = 0; + case STATE_GBA_FLASH_RECV: + sTradeAnim->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_GbaScreenFlash_Long, 120, 80, 0); + sTradeAnim->state = STATE_GBA_STOP_FLASH_RECV; break; - case TS_STATE_LINK_MON_ARRIVED_DELAY: - if (++sTradeData->timer == 10) - sTradeData->state++; - break; - case TS_STATE_MOVE_GBA_TO_CENTER: - if (++sTradeData->bg1vofs > 348) + case STATE_GBA_STOP_FLASH_RECV: + if (gSprites[sTradeAnim->connectionSpriteId2].animEnded) { - sTradeData->bg1vofs = 348; - sTradeData->state++; - } - if (sTradeData->bg1vofs == 328 && sTradeData->isCableTrade) - { - sTradeData->cableEndSpriteId = CreateSprite(&sSpriteTemplate_CableEnd, 128, 65, 0); - gSprites[sTradeData->cableEndSpriteId].callback = SpriteCB_CableEndReceiving; - } - break; - case TS_STATE_GBA_FLASH_RECV: - sTradeData->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_GbaScreenFlash_Long, 120, 80, 0); - sTradeData->state = TS_STATE_GBA_STOP_FLASH_RECV; - break; - case TS_STATE_GBA_STOP_FLASH_RECV: - if (gSprites[sTradeData->connectionSpriteId2].animEnded) - { - DestroySprite(&gSprites[sTradeData->connectionSpriteId2]); + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId2]); SetTradeSequenceBgGpuRegs(6); - sTradeData->state++; + sTradeAnim->state++; PlaySE(SE_M_SAND_ATTACK); } break; - case TS_STATE_GBA_ZOOM_IN: - if (sTradeData->gbaScale < 0x400) + case STATE_GBA_ZOOM_IN: + if (sTradeAnim->gbaScale < 0x400) { - sTradeData->gbaScale += 0x34; + sTradeAnim->gbaScale += 0x34; } else { - sTradeData->gbaScale = 0x400; - sTradeData->state++; + sTradeAnim->gbaScale = 0x400; + sTradeAnim->state++; } - sTradeData->sXY = 0x8000 / sTradeData->gbaScale; + sTradeAnim->sXY = 0x8000 / sTradeAnim->gbaScale; break; - case TS_STATE_FADE_OUT_TO_NEW_MON: + case STATE_FADE_OUT_TO_NEW_MON: BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - sTradeData->state = TS_STATE_WAIT_FADE_OUT_TO_NEW_MON; + sTradeAnim->state = STATE_WAIT_FADE_OUT_TO_NEW_MON; break; - case TS_STATE_WAIT_FADE_OUT_TO_NEW_MON: + case STATE_WAIT_FADE_OUT_TO_NEW_MON: if (!gPaletteFade.active) { SetTradeSequenceBgGpuRegs(5); SetTradeSequenceBgGpuRegs(7); gPaletteFade.bufferTransferDisabled = TRUE; - sTradeData->state++; + sTradeAnim->state++; } break; - case TS_STATE_FADE_IN_TO_NEW_MON: + case STATE_FADE_IN_TO_NEW_MON: gPaletteFade.bufferTransferDisabled = FALSE; BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_WAIT_FADE_IN_TO_NEW_MON: + case STATE_WAIT_FADE_IN_TO_NEW_MON: SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG2_ON | DISPCNT_OBJ_ON); if (!gPaletteFade.active) - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_POKEBALL_ARRIVE: - sTradeData->bouncingPokeballSpriteId = CreateSprite(&sSpriteTemplate_Pokeball, 120, -8, 0); - gSprites[sTradeData->bouncingPokeballSpriteId].data[3] = 74; - gSprites[sTradeData->bouncingPokeballSpriteId].callback = SpriteCB_BouncingPokeballArrive; - StartSpriteAnim(&gSprites[sTradeData->bouncingPokeballSpriteId], 1); - StartSpriteAffineAnim(&gSprites[sTradeData->bouncingPokeballSpriteId], 2); - BlendPalettes(1 << (16 + gSprites[sTradeData->bouncingPokeballSpriteId].oam.paletteNum), 16, RGB_WHITEALPHA); - sTradeData->state++; - sTradeData->timer = 0; + case STATE_POKEBALL_ARRIVE: + sTradeAnim->bouncingPokeballSpriteId = CreateSprite(&sSpriteTemplate_Pokeball, 120, -8, 0); + gSprites[sTradeAnim->bouncingPokeballSpriteId].data[3] = 74; + gSprites[sTradeAnim->bouncingPokeballSpriteId].callback = SpriteCB_BouncingPokeballArrive; + StartSpriteAnim(&gSprites[sTradeAnim->bouncingPokeballSpriteId], 1); + StartSpriteAffineAnim(&gSprites[sTradeAnim->bouncingPokeballSpriteId], 2); + BlendPalettes(1 << (16 + gSprites[sTradeAnim->bouncingPokeballSpriteId].oam.paletteNum), 16, RGB_WHITEALPHA); + sTradeAnim->state++; + sTradeAnim->timer = 0; break; - case TS_STATE_FADE_POKEBALL_TO_NORMAL: - BeginNormalPaletteFade(1 << (16 + gSprites[sTradeData->bouncingPokeballSpriteId].oam.paletteNum), 1, 16, 0, RGB_WHITEALPHA); - sTradeData->state++; + case STATE_FADE_POKEBALL_TO_NORMAL: + BeginNormalPaletteFade(1 << (16 + gSprites[sTradeAnim->bouncingPokeballSpriteId].oam.paletteNum), 1, 16, 0, RGB_WHITEALPHA); + sTradeAnim->state++; break; - case TS_STATE_POKEBALL_ARRIVE_WAIT: - if (gSprites[sTradeData->bouncingPokeballSpriteId].callback == SpriteCallbackDummy) + case STATE_POKEBALL_ARRIVE_WAIT: + if (gSprites[sTradeAnim->bouncingPokeballSpriteId].callback == SpriteCallbackDummy) { - HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT], sTradeData->monSpecies[TRADE_PARTNER], sTradeData->monPersonalities[TRADE_PARTNER]); - sTradeData->state++; + HandleLoadSpecialPokePic(TRUE, + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT], + sTradeAnim->monSpecies[TRADE_PARTNER], + sTradeAnim->monPersonalities[TRADE_PARTNER]); + sTradeAnim->state++; } break; - case TS_STATE_SHOW_NEW_MON: - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].x = 120; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].y = gMonFrontPicCoords[sTradeData->monSpecies[TRADE_PARTNER]].y_offset + 60; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].x2 = 0; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].y2 = 0; - StartSpriteAnim(&gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]], 0); - CreatePokeballSpriteToReleaseMon(sTradeData->monSpriteIds[TRADE_PARTNER], gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].oam.paletteNum, 120, 84, 2, 1, 20, PALETTES_BG | (0xF << 16), sTradeData->monSpecies[TRADE_PARTNER]); - FreeSpriteOamMatrix(&gSprites[sTradeData->bouncingPokeballSpriteId]); - DestroySprite(&gSprites[sTradeData->bouncingPokeballSpriteId]); - sTradeData->state++; + case STATE_SHOW_NEW_MON: + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].x = 120; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].y = gMonFrontPicCoords[sTradeAnim->monSpecies[TRADE_PARTNER]].y_offset + 60; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].x2 = 0; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].y2 = 0; + StartSpriteAnim(&gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]], 0); + CreatePokeballSpriteToReleaseMon(sTradeAnim->monSpriteIds[TRADE_PARTNER], gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].oam.paletteNum, 120, 84, 2, 1, 20, PALETTES_BG | (0xF << 16), sTradeAnim->monSpecies[TRADE_PARTNER]); + FreeSpriteOamMatrix(&gSprites[sTradeAnim->bouncingPokeballSpriteId]); + DestroySprite(&gSprites[sTradeAnim->bouncingPokeballSpriteId]); + sTradeAnim->state++; break; - case TS_STATE_NEW_MON_MSG: + case STATE_NEW_MON_MSG: SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG0_ON | @@ -3766,76 +3839,70 @@ static bool8 AnimateTradeSequenceCable(void) DISPCNT_OBJ_ON); StringExpandPlaceholders(gStringVar4, gText_XSentOverY); DrawTextOnTradeWindow(0, gStringVar4, 0); - sTradeData->state = TS_STATE_DELAY_FOR_MON_ANIM; - sTradeData->timer = 0; + sTradeAnim->state = STATE_DELAY_FOR_MON_ANIM; + sTradeAnim->timer = 0; break; - case TS_STATE_DELAY_FOR_MON_ANIM: - if (++sTradeData->timer > 60) + case STATE_DELAY_FOR_MON_ANIM: + if (++sTradeAnim->timer > 60) { - sTradeData->state = TS_STATE_WAIT_FOR_MON_CRY; - sTradeData->timer = 0; + sTradeAnim->state = STATE_WAIT_FOR_MON_CRY; + sTradeAnim->timer = 0; } break; - case TS_STATE_WAIT_FOR_MON_CRY: + case STATE_WAIT_FOR_MON_CRY: if (IsCryFinished()) - sTradeData->state = TS_STATE_TAKE_CARE_OF_MON; + sTradeAnim->state = STATE_TAKE_CARE_OF_MON; break; - case TS_STATE_TAKE_CARE_OF_MON: - if (++sTradeData->timer == 10) + case STATE_TAKE_CARE_OF_MON: + if (++sTradeAnim->timer == 10) PlayFanfare(MUS_EVOLVED); - if (sTradeData->timer == 250) + if (sTradeAnim->timer == 250) { - sTradeData->state++; + sTradeAnim->state++; StringExpandPlaceholders(gStringVar4, gText_TakeGoodCareOfX); DrawTextOnTradeWindow(0, gStringVar4, 0); - sTradeData->timer = 0; + sTradeAnim->timer = 0; } break; - case TS_STATE_AFTER_NEW_MON_DELAY: - if (++sTradeData->timer == 60) - sTradeData->state++; + case STATE_AFTER_NEW_MON_DELAY: + if (++sTradeAnim->timer == 60) + sTradeAnim->state++; break; - case TS_STATE_CHECK_RIBBONS: + case STATE_CHECK_RIBBONS: CheckPartnersMonForRibbons(); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_END_LINK_TRADE: - if (sTradeData->isLinkTrade) - { + case STATE_END_LINK_TRADE: + if (sTradeAnim->isLinkTrade) return TRUE; - } else if (JOY_NEW(A_BUTTON)) - { - sTradeData->state++; - } + sTradeAnim->state++; break; - case TS_STATE_TRY_EVOLUTION: // Only if in-game trade, link trades use CB2_TryLinkTradeEvolution + case STATE_TRY_EVOLUTION: // Only if in-game trade, link trades use CB2_TryLinkTradeEvolution TradeMons(gSpecialVar_0x8005, 0); - gCB2_AfterEvolution = CB2_UpdateInGameTrade; + gCB2_AfterEvolution = CB2_InGameTrade; evoTarget = GetEvolutionTargetSpecies(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], EVO_MODE_TRADE, ITEM_NONE, &gPlayerParty[gSelectedTradeMonPositions[TRADE_PARTNER]]); if (evoTarget != SPECIES_NONE) - { - TradeEvolutionScene(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], evoTarget, sTradeData->monSpriteIds[TRADE_PARTNER], gSelectedTradeMonPositions[TRADE_PLAYER]); - } - sTradeData->state++; + TradeEvolutionScene(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], evoTarget, sTradeAnim->monSpriteIds[TRADE_PARTNER], gSelectedTradeMonPositions[TRADE_PLAYER]); + sTradeAnim->state++; break; - case TS_STATE_FADE_OUT_END: + case STATE_FADE_OUT_END: BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_WAIT_FADE_OUT_END: + case STATE_WAIT_FADE_OUT_END: if (!gPaletteFade.active) { - PlayNewMapMusic(sTradeData->cachedMapMusic); - if (sTradeData) + PlayNewMapMusic(sTradeAnim->cachedMapMusic); + if (sTradeAnim) { FreeAllWindowBuffers(); Free(GetBgTilemapBuffer(3)); Free(GetBgTilemapBuffer(1)); Free(GetBgTilemapBuffer(0)); FreeMonSpritesGfx(); - FREE_AND_SET_NULL(sTradeData); + FREE_AND_SET_NULL(sTradeAnim); } SetMainCallback2(CB2_ReturnToField); BufferInGameTradeMonName(); @@ -3845,111 +3912,116 @@ static bool8 AnimateTradeSequenceCable(void) return FALSE; } -static bool8 AnimateTradeSequenceWireless(void) +// Task data for Task_AnimateWirelessSignal +#define tIdx data[0] +#define tCounter data[1] +#define tSignalComingBack data[2] + +static bool8 DoTradeAnim_Wireless(void) { u16 evoTarget; - switch (sTradeData->state) + switch (sTradeAnim->state) { - case TS_STATE_START: - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].invisible = FALSE; - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].x2 = -180; - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y2 = gMonFrontPicCoords[sTradeData->monSpecies[TRADE_PLAYER]].y_offset; - sTradeData->state++; - sTradeData->cachedMapMusic = GetCurrentMapMusic(); + case STATE_START: + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].invisible = FALSE; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].x2 = -180; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].y2 = gMonFrontPicCoords[sTradeAnim->monSpecies[TRADE_PLAYER]].y_offset; + sTradeAnim->state++; + sTradeAnim->cachedMapMusic = GetCurrentMapMusic(); PlayNewMapMusic(MUS_EVOLUTION); break; - case TS_STATE_MON_SLIDE_IN: - if (sTradeData->bg2hofs > 0) + case STATE_MON_SLIDE_IN: + if (sTradeAnim->bg2hofs > 0) { - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].x2 += 3; - sTradeData->bg2hofs -= 3; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].x2 += 3; + sTradeAnim->bg2hofs -= 3; } else { - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].x2 = 0; - sTradeData->bg2hofs = 0; - sTradeData->state = TS_STATE_SEND_MSG; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].x2 = 0; + sTradeAnim->bg2hofs = 0; + sTradeAnim->state = STATE_SEND_MSG; } break; - case TS_STATE_SEND_MSG: + case STATE_SEND_MSG: StringExpandPlaceholders(gStringVar4, gText_XWillBeSentToY); DrawTextOnTradeWindow(0, gStringVar4, 0); - if (sTradeData->monSpecies[TRADE_PLAYER] != SPECIES_EGG) - PlayCry_Normal(sTradeData->monSpecies[TRADE_PLAYER], 0); + if (sTradeAnim->monSpecies[TRADE_PLAYER] != SPECIES_EGG) + PlayCry_Normal(sTradeAnim->monSpecies[TRADE_PLAYER], 0); - sTradeData->state = TS_STATE_BYE_BYE; - sTradeData->timer = 0; + sTradeAnim->state = STATE_BYE_BYE; + sTradeAnim->timer = 0; break; - case TS_STATE_BYE_BYE: - if (++sTradeData->timer == 80) + case STATE_BYE_BYE: + if (++sTradeAnim->timer == 80) { - sTradeData->releasePokeballSpriteId = CreateTradePokeballSprite(sTradeData->monSpriteIds[0], gSprites[sTradeData->monSpriteIds[0]].oam.paletteNum, 120, 32, 2, 1, 0x14, 0xfffff); - sTradeData->state++; + sTradeAnim->releasePokeballSpriteId = CreateTradePokeballSprite(sTradeAnim->monSpriteIds[TRADE_PLAYER], gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].oam.paletteNum, 120, 32, 2, 1, 0x14, 0xfffff); + sTradeAnim->state++; StringExpandPlaceholders(gStringVar4, gText_ByeByeVar1); DrawTextOnTradeWindow(0, gStringVar4, 0); } break; - case TS_STATE_POKEBALL_DEPART: - if (gSprites[sTradeData->releasePokeballSpriteId].callback == SpriteCallbackDummy) + case STATE_POKEBALL_DEPART: + if (gSprites[sTradeAnim->releasePokeballSpriteId].callback == SpriteCallbackDummy) { - sTradeData->bouncingPokeballSpriteId = CreateSprite(&sSpriteTemplate_Pokeball, 120, 32, 0); - gSprites[sTradeData->bouncingPokeballSpriteId].callback = SpriteCB_BouncingPokeballDepart; - DestroySprite(&gSprites[sTradeData->releasePokeballSpriteId]); - sTradeData->state++; + sTradeAnim->bouncingPokeballSpriteId = CreateSprite(&sSpriteTemplate_Pokeball, 120, 32, 0); + gSprites[sTradeAnim->bouncingPokeballSpriteId].callback = SpriteCB_BouncingPokeballDepart; + DestroySprite(&gSprites[sTradeAnim->releasePokeballSpriteId]); + sTradeAnim->state++; } break; - case TS_STATE_POKEBALL_DEPART_WAIT: + case STATE_POKEBALL_DEPART_WAIT: // The game waits here for the sprite to finish its animation sequence. break; - case TS_STATE_FADE_OUT_TO_GBA_SEND: + case STATE_FADE_OUT_TO_GBA_SEND: BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - sTradeData->state = TS_STATE_WAIT_FADE_OUT_TO_GBA_SEND; + sTradeAnim->state = STATE_WAIT_FADE_OUT_TO_GBA_SEND; break; - case TS_STATE_WAIT_FADE_OUT_TO_GBA_SEND: + case STATE_WAIT_FADE_OUT_TO_GBA_SEND: if (!gPaletteFade.active) { SetTradeSequenceBgGpuRegs(4); FillWindowPixelBuffer(0, PIXEL_FILL(15)); CopyWindowToVram(0, COPYWIN_FULL); - sTradeData->state++; + sTradeAnim->state++; } break; - case TS_STATE_FADE_IN_TO_GBA_SEND: + case STATE_FADE_IN_TO_GBA_SEND: BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_BLACK); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_WAIT_FADE_IN_TO_GBA_SEND: + case STATE_WAIT_FADE_IN_TO_GBA_SEND: if (!gPaletteFade.active) - sTradeData->state = TS_STATE_GBA_ZOOM_OUT; + sTradeAnim->state = STATE_GBA_ZOOM_OUT; break; - case TS_STATE_GBA_ZOOM_OUT: - if (sTradeData->gbaScale > 0x100) + case STATE_GBA_ZOOM_OUT: + if (sTradeAnim->gbaScale > 0x100) { - sTradeData->gbaScale -= 0x34; + sTradeAnim->gbaScale -= 0x34; } else { SetTradeSequenceBgGpuRegs(1); - sTradeData->gbaScale = 0x80; - sTradeData->state = TS_STATE_GBA_FLASH_SEND_WIRELESS; - sTradeData->timer = 0; + sTradeAnim->gbaScale = 0x80; + sTradeAnim->state = STATE_GBA_FLASH_SEND_WIRELESS; + sTradeAnim->timer = 0; } - sTradeData->sXY = 0x8000 / sTradeData->gbaScale; + sTradeAnim->sXY = 0x8000 / sTradeAnim->gbaScale; break; - case TS_STATE_GBA_FLASH_SEND_WIRELESS: - if (++sTradeData->timer > 20) + case STATE_GBA_FLASH_SEND_WIRELESS: + if (++sTradeAnim->timer > 20) { SetTradeSequenceBgGpuRegs(3); - sTradeData->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_GbaScreenFlash_Short, 120, 80, 0); - sTradeData->state++; + sTradeAnim->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_GbaScreenFlash_Short, 120, 80, 0); + sTradeAnim->state++; } break; - case TS_STATE_GBA_STOP_FLASH_SEND_WIRELESS: - if (gSprites[sTradeData->connectionSpriteId2].animEnded) + case STATE_GBA_STOP_FLASH_SEND_WIRELESS: + if (gSprites[sTradeAnim->connectionSpriteId2].animEnded) { - DestroySprite(&gSprites[sTradeData->connectionSpriteId2]); + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId2]); SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_TGT1_OBJ | BLDCNT_EFFECT_BLEND | @@ -3958,307 +4030,305 @@ static bool8 AnimateTradeSequenceWireless(void) // Start wireless signal effect CreateTask(Task_AnimateWirelessSignal, 5); - sTradeData->state++; + sTradeAnim->state++; } break; - case TS_STATE_WAIT_WIRELESS_SIGNAL_SEND: + case STATE_WAIT_WIRELESS_SIGNAL_SEND: if (!FuncIsActiveTask(Task_AnimateWirelessSignal)) - sTradeData->state = TS_STATE_PAN_AWAY_GBA; + sTradeAnim->state = STATE_PAN_AWAY_GBA; break; - case TS_STATE_PAN_AWAY_GBA: - if (--sTradeData->bg1vofs == 316) - sTradeData->state++; + case STATE_PAN_AWAY_GBA: + if (--sTradeAnim->bg1vofs == 316) + sTradeAnim->state++; break; - case TS_STATE_CREATE_LINK_MON_LEAVING: - sTradeData->connectionSpriteId1 = CreateSprite(&sSpriteTemplate_LinkMonGlow, 120, 80, 3); - gSprites[sTradeData->connectionSpriteId1].callback = SpriteCB_LinkMonGlowWireless; - sTradeData->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 120, 80, 0); - StartSpriteAnim(&gSprites[sTradeData->connectionSpriteId2], ANIM_LINKMON_SMALL); - sTradeData->state++; + case STATE_CREATE_LINK_MON_LEAVING: + sTradeAnim->connectionSpriteId1 = CreateSprite(&sSpriteTemplate_LinkMonGlow, 120, 80, 3); + gSprites[sTradeAnim->connectionSpriteId1].callback = SpriteCB_LinkMonGlowWireless; + sTradeAnim->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 120, 80, 0); + StartSpriteAnim(&gSprites[sTradeAnim->connectionSpriteId2], ANIM_LINKMON_SMALL); + sTradeAnim->state++; break; - case TS_STATE_LINK_MON_TRAVEL_OUT: - if ((sTradeData->bg1vofs -= 3) == 166) - sTradeData->state = TS_STATE_LINK_MON_TRAVEL_OFFSCREEN; + case STATE_LINK_MON_TRAVEL_OUT: + if ((sTradeAnim->bg1vofs -= 3) == 166) + sTradeAnim->state = STATE_LINK_MON_TRAVEL_OFFSCREEN; SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_1 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG1_ON | DISPCNT_OBJ_ON); break; - case TS_STATE_LINK_MON_TRAVEL_OFFSCREEN: - gSprites[sTradeData->connectionSpriteId1].y -= 2; - gSprites[sTradeData->connectionSpriteId2].y -= 2; - if (gSprites[sTradeData->connectionSpriteId1].y < -8) - { - sTradeData->state = TS_STATE_FADE_OUT_TO_CROSSING; - } + case STATE_LINK_MON_TRAVEL_OFFSCREEN: + gSprites[sTradeAnim->connectionSpriteId1].y -= 2; + gSprites[sTradeAnim->connectionSpriteId2].y -= 2; + if (gSprites[sTradeAnim->connectionSpriteId1].y < -8) + sTradeAnim->state = STATE_FADE_OUT_TO_CROSSING; break; - case TS_STATE_FADE_OUT_TO_CROSSING: + case STATE_FADE_OUT_TO_CROSSING: BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 16, RGB_BLACK); - sTradeData->state = TS_STATE_WAIT_FADE_OUT_TO_CROSSING; + sTradeAnim->state = STATE_WAIT_FADE_OUT_TO_CROSSING; break; - case TS_STATE_WAIT_FADE_OUT_TO_CROSSING: + case STATE_WAIT_FADE_OUT_TO_CROSSING: if (!gPaletteFade.active) { - DestroySprite(&gSprites[sTradeData->connectionSpriteId1]); - DestroySprite(&gSprites[sTradeData->connectionSpriteId2]); + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId1]); + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId2]); SetTradeSequenceBgGpuRegs(2); - sTradeData->state++; + sTradeAnim->state++; } break; - case TS_STATE_FADE_IN_TO_CROSSING: + case STATE_FADE_IN_TO_CROSSING: BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_BLACK); - sTradeData->connectionSpriteId1 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 111, 170, 0); - sTradeData->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 129, -10, 0); - sTradeData->state++; + sTradeAnim->connectionSpriteId1 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 111, 170, 0); + sTradeAnim->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 129, -10, 0); + sTradeAnim->state++; break; - case TS_STATE_WAIT_FADE_IN_TO_CROSSING: + case STATE_WAIT_FADE_IN_TO_CROSSING: if (!gPaletteFade.active) { PlaySE(SE_WARP_OUT); - sTradeData->state++; + sTradeAnim->state++; } - gSprites[sTradeData->connectionSpriteId1].y2 -= 3; - gSprites[sTradeData->connectionSpriteId2].y2 += 3; + gSprites[sTradeAnim->connectionSpriteId1].y2 -= 3; + gSprites[sTradeAnim->connectionSpriteId2].y2 += 3; break; - case TS_STATE_CROSSING_LINK_MONS_ENTER: - gSprites[sTradeData->connectionSpriteId1].y2 -= 3; - gSprites[sTradeData->connectionSpriteId2].y2 += 3; - if (gSprites[sTradeData->connectionSpriteId1].y2 <= -90) + case STATE_CROSSING_LINK_MONS_ENTER: + gSprites[sTradeAnim->connectionSpriteId1].y2 -= 3; + gSprites[sTradeAnim->connectionSpriteId2].y2 += 3; + if (gSprites[sTradeAnim->connectionSpriteId1].y2 <= -90) { - gSprites[sTradeData->connectionSpriteId1].data[1] = 1; - gSprites[sTradeData->connectionSpriteId2].data[1] = 1; - sTradeData->state++; - CreateTask(Task_NarrowWindowForCrossing_Wireless, 5); + gSprites[sTradeAnim->connectionSpriteId1].data[1] = 1; + gSprites[sTradeAnim->connectionSpriteId2].data[1] = 1; + sTradeAnim->state++; + CreateTask(Task_OpenCenterWhiteColumn, 5); } break; - case TS_STATE_CROSSING_BLEND_WHITE_1: + case STATE_CROSSING_BLEND_WHITE_1: BlendPalettes(0x8, 16, RGB_WHITEALPHA); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_CROSSING_BLEND_WHITE_2: + case STATE_CROSSING_BLEND_WHITE_2: BlendPalettes(0x8, 16, RGB_WHITEALPHA); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_CROSSING_BLEND_WHITE_3: + case STATE_CROSSING_BLEND_WHITE_3: BlendPalettes(0x8, 16, RGB_WHITEALPHA); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_CROSSING_CREATE_MON_PICS: - if (!IsMonSpriteNotFlipped(sTradeData->monSpecies[TRADE_PLAYER])) + case STATE_CROSSING_CREATE_MON_PICS: + if (!IsMonSpriteNotFlipped(sTradeAnim->monSpecies[TRADE_PLAYER])) { - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].affineAnims = sAffineAnims_CrossingMonPics; - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].oam.affineMode = ST_OAM_AFFINE_DOUBLE; - CalcCenterToCornerVec(&gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]], SPRITE_SHAPE(64x64), SPRITE_SIZE(64x64), ST_OAM_AFFINE_DOUBLE); - StartSpriteAffineAnim(&gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]], 0); + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].affineAnims = sAffineAnims_CrossingMonPics; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].oam.affineMode = ST_OAM_AFFINE_DOUBLE; + CalcCenterToCornerVec(&gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]], SPRITE_SHAPE(64x64), SPRITE_SIZE(64x64), ST_OAM_AFFINE_DOUBLE); + StartSpriteAffineAnim(&gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]], 0); } else { - StartSpriteAffineAnim(&gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]], 0); + StartSpriteAffineAnim(&gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]], 0); } - StartSpriteAffineAnim(&gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]], 0); - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].x = 40; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].x = 200; - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y = 192; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].y = -32; - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].invisible = FALSE; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].invisible = FALSE; - sTradeData->state++; + StartSpriteAffineAnim(&gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]], 0); + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].x = 40; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].x = 200; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].y = 192; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].y = -32; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].invisible = FALSE; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].invisible = FALSE; + sTradeAnim->state++; break; - case TS_STATE_CROSSING_MON_PICS_MOVE: - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y2 -= 3; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].y2 += 3; - if (gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y2 < -DISPLAY_HEIGHT - && gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y2 >= -DISPLAY_HEIGHT - 3) + case STATE_CROSSING_MON_PICS_MOVE: + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].y2 -= 3; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].y2 += 3; + if (gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].y2 < -DISPLAY_HEIGHT + && gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].y2 >= -DISPLAY_HEIGHT - 3) { PlaySE(SE_WARP_IN); } - if (gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y2 < -222) + if (gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].y2 < -222) { - gSprites[sTradeData->connectionSpriteId1].data[1] = 0; - gSprites[sTradeData->connectionSpriteId2].data[1] = 0; - sTradeData->state++; - gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].invisible = TRUE; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].invisible = TRUE; - CreateTask(Task_NarrowWindowForCrossing_Cable, 5); + gSprites[sTradeAnim->connectionSpriteId1].data[1] = 0; + gSprites[sTradeAnim->connectionSpriteId2].data[1] = 0; + sTradeAnim->state++; + gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]].invisible = TRUE; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].invisible = TRUE; + CreateTask(Task_CloseCenterWhiteColumn, 5); } break; - case TS_STATE_CROSSING_LINK_MONS_EXIT: - gSprites[sTradeData->connectionSpriteId1].y2 -= 3; - gSprites[sTradeData->connectionSpriteId2].y2 += 3; - if (gSprites[sTradeData->connectionSpriteId1].y2 <= -222) + case STATE_CROSSING_LINK_MONS_EXIT: + gSprites[sTradeAnim->connectionSpriteId1].y2 -= 3; + gSprites[sTradeAnim->connectionSpriteId2].y2 += 3; + if (gSprites[sTradeAnim->connectionSpriteId1].y2 <= -222) { BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 16, RGB_BLACK); - sTradeData->state++; - DestroySprite(&gSprites[sTradeData->connectionSpriteId1]); - DestroySprite(&gSprites[sTradeData->connectionSpriteId2]); + sTradeAnim->state++; + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId1]); + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId2]); } break; - case TS_STATE_CREATE_LINK_MON_ARRIVING: + case STATE_CREATE_LINK_MON_ARRIVING: if (!gPaletteFade.active) { - sTradeData->state++; + sTradeAnim->state++; SetTradeSequenceBgGpuRegs(1); - sTradeData->bg1vofs = 166; + sTradeAnim->bg1vofs = 166; SetTradeSequenceBgGpuRegs(3); - sTradeData->bg2vofs = 412; - sTradeData->connectionSpriteId1 = CreateSprite(&sSpriteTemplate_LinkMonGlow, 120, -20, 3); - gSprites[sTradeData->connectionSpriteId1].callback = SpriteCB_LinkMonGlowWireless; - sTradeData->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 120, -20, 0); - StartSpriteAnim(&gSprites[sTradeData->connectionSpriteId2], ANIM_LINKMON_SMALL); + sTradeAnim->bg2vofs = 412; + sTradeAnim->connectionSpriteId1 = CreateSprite(&sSpriteTemplate_LinkMonGlow, 120, -20, 3); + gSprites[sTradeAnim->connectionSpriteId1].callback = SpriteCB_LinkMonGlowWireless; + sTradeAnim->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_LinkMonShadow, 120, -20, 0); + StartSpriteAnim(&gSprites[sTradeAnim->connectionSpriteId2], ANIM_LINKMON_SMALL); } break; - case TS_STATE_FADE_OUT_TO_GBA_RECV: + case STATE_FADE_OUT_TO_GBA_RECV: BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_BLACK); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_WAIT_FADE_OUT_TO_GBA_RECV: + case STATE_WAIT_FADE_OUT_TO_GBA_RECV: SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG1_ON | DISPCNT_OBJ_ON); if (!gPaletteFade.active) - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_LINK_MON_TRAVEL_IN: - gSprites[sTradeData->connectionSpriteId1].y2 += 4; - gSprites[sTradeData->connectionSpriteId2].y2 += 4; - if (gSprites[sTradeData->connectionSpriteId1].y2 + gSprites[sTradeData->connectionSpriteId1].y == 64) + case STATE_LINK_MON_TRAVEL_IN: + gSprites[sTradeAnim->connectionSpriteId1].y2 += 4; + gSprites[sTradeAnim->connectionSpriteId2].y2 += 4; + if (gSprites[sTradeAnim->connectionSpriteId1].y2 + gSprites[sTradeAnim->connectionSpriteId1].y == 64) { - sTradeData->state = TS_STATE_PAN_TO_GBA_WIRELESS; - sTradeData->timer = 0; + sTradeAnim->state = STATE_PAN_TO_GBA_WIRELESS; + sTradeAnim->timer = 0; } break; - case TS_STATE_PAN_TO_GBA_WIRELESS: + case STATE_PAN_TO_GBA_WIRELESS: SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG1_ON | DISPCNT_BG2_ON | DISPCNT_OBJ_ON); - sTradeData->bg1vofs += 3; - sTradeData->bg2vofs += 3; - if (++sTradeData->timer == 10) + sTradeAnim->bg1vofs += 3; + sTradeAnim->bg2vofs += 3; + if (++sTradeAnim->timer == 10) { u8 taskId = CreateTask(Task_AnimateWirelessSignal, 5); - gTasks[taskId].data[2] = TRUE; + gTasks[taskId].tSignalComingBack = TRUE; } - if (sTradeData->bg1vofs > 316) + if (sTradeAnim->bg1vofs > 316) { - sTradeData->bg1vofs = 316; - sTradeData->state++; + sTradeAnim->bg1vofs = 316; + sTradeAnim->state++; } break; - case TS_STATE_DESTROY_LINK_MON_WIRELESS: - DestroySprite(&gSprites[sTradeData->connectionSpriteId1]); - DestroySprite(&gSprites[sTradeData->connectionSpriteId2]); - sTradeData->state++; - sTradeData->timer = 0; + case STATE_DESTROY_LINK_MON_WIRELESS: + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId1]); + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId2]); + sTradeAnim->state++; + sTradeAnim->timer = 0; break; - case TS_STATE_WAIT_WIRELESS_SIGNAL_RECV: + case STATE_WAIT_WIRELESS_SIGNAL_RECV: if (!FuncIsActiveTask(Task_AnimateWirelessSignal)) { - sTradeData->state = TS_STATE_LINK_MON_ARRIVED_DELAY; - sTradeData->timer = 0; + sTradeAnim->state = STATE_LINK_MON_ARRIVED_DELAY; + sTradeAnim->timer = 0; } break; - case TS_STATE_LINK_MON_ARRIVED_DELAY: - if (++sTradeData->timer == 10) - sTradeData->state++; + case STATE_LINK_MON_ARRIVED_DELAY: + if (++sTradeAnim->timer == 10) + sTradeAnim->state++; break; - case TS_STATE_MOVE_GBA_TO_CENTER: - if (++sTradeData->bg1vofs > 348) + case STATE_MOVE_GBA_TO_CENTER: + if (++sTradeAnim->bg1vofs > 348) { - sTradeData->bg1vofs = 348; - sTradeData->state++; + sTradeAnim->bg1vofs = 348; + sTradeAnim->state++; } break; - case TS_STATE_GBA_FLASH_RECV: - sTradeData->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_GbaScreenFlash_Long, 120, 80, 0); - sTradeData->state = TS_STATE_GBA_STOP_FLASH_RECV; + case STATE_GBA_FLASH_RECV: + sTradeAnim->connectionSpriteId2 = CreateSprite(&sSpriteTemplate_GbaScreenFlash_Long, 120, 80, 0); + sTradeAnim->state = STATE_GBA_STOP_FLASH_RECV; break; - case TS_STATE_GBA_STOP_FLASH_RECV: - if (gSprites[sTradeData->connectionSpriteId2].animEnded) + case STATE_GBA_STOP_FLASH_RECV: + if (gSprites[sTradeAnim->connectionSpriteId2].animEnded) { - DestroySprite(&gSprites[sTradeData->connectionSpriteId2]); + DestroySprite(&gSprites[sTradeAnim->connectionSpriteId2]); SetTradeSequenceBgGpuRegs(6); - sTradeData->state++; + sTradeAnim->state++; PlaySE(SE_M_SAND_ATTACK); } break; - case TS_STATE_GBA_ZOOM_IN: - if (sTradeData->gbaScale < 0x400) + case STATE_GBA_ZOOM_IN: + if (sTradeAnim->gbaScale < 0x400) { - sTradeData->gbaScale += 0x34; + sTradeAnim->gbaScale += 0x34; } else { - sTradeData->gbaScale = 0x400; - sTradeData->state++; + sTradeAnim->gbaScale = 0x400; + sTradeAnim->state++; } - sTradeData->sXY = 0x8000 / sTradeData->gbaScale; + sTradeAnim->sXY = 0x8000 / sTradeAnim->gbaScale; break; - case TS_STATE_FADE_OUT_TO_NEW_MON: + case STATE_FADE_OUT_TO_NEW_MON: BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - sTradeData->state = TS_STATE_WAIT_FADE_OUT_TO_NEW_MON; + sTradeAnim->state = STATE_WAIT_FADE_OUT_TO_NEW_MON; break; - case TS_STATE_WAIT_FADE_OUT_TO_NEW_MON: + case STATE_WAIT_FADE_OUT_TO_NEW_MON: if (!gPaletteFade.active) { SetTradeSequenceBgGpuRegs(5); SetTradeSequenceBgGpuRegs(7); gPaletteFade.bufferTransferDisabled = TRUE; - sTradeData->state++; + sTradeAnim->state++; } break; - case TS_STATE_FADE_IN_TO_NEW_MON: + case STATE_FADE_IN_TO_NEW_MON: gPaletteFade.bufferTransferDisabled = FALSE; BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_WAIT_FADE_IN_TO_NEW_MON: + case STATE_WAIT_FADE_IN_TO_NEW_MON: SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG2_ON | DISPCNT_OBJ_ON); if (!gPaletteFade.active) - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_POKEBALL_ARRIVE: - sTradeData->bouncingPokeballSpriteId = CreateSprite(&sSpriteTemplate_Pokeball, 120, -8, 0); - gSprites[sTradeData->bouncingPokeballSpriteId].data[3] = 74; - gSprites[sTradeData->bouncingPokeballSpriteId].callback = SpriteCB_BouncingPokeballArrive; - StartSpriteAnim(&gSprites[sTradeData->bouncingPokeballSpriteId], 1); - StartSpriteAffineAnim(&gSprites[sTradeData->bouncingPokeballSpriteId], 2); - BlendPalettes(1 << (16 + gSprites[sTradeData->bouncingPokeballSpriteId].oam.paletteNum), 16, RGB_WHITEALPHA); - sTradeData->state++; - sTradeData->timer = 0; + case STATE_POKEBALL_ARRIVE: + sTradeAnim->bouncingPokeballSpriteId = CreateSprite(&sSpriteTemplate_Pokeball, 120, -8, 0); + gSprites[sTradeAnim->bouncingPokeballSpriteId].data[3] = 74; + gSprites[sTradeAnim->bouncingPokeballSpriteId].callback = SpriteCB_BouncingPokeballArrive; + StartSpriteAnim(&gSprites[sTradeAnim->bouncingPokeballSpriteId], 1); + StartSpriteAffineAnim(&gSprites[sTradeAnim->bouncingPokeballSpriteId], 2); + BlendPalettes(1 << (16 + gSprites[sTradeAnim->bouncingPokeballSpriteId].oam.paletteNum), 16, RGB_WHITEALPHA); + sTradeAnim->state++; + sTradeAnim->timer = 0; break; - case TS_STATE_FADE_POKEBALL_TO_NORMAL: - BeginNormalPaletteFade(1 << (16 + gSprites[sTradeData->bouncingPokeballSpriteId].oam.paletteNum), 1, 16, 0, RGB_WHITEALPHA); - sTradeData->state++; + case STATE_FADE_POKEBALL_TO_NORMAL: + BeginNormalPaletteFade(1 << (16 + gSprites[sTradeAnim->bouncingPokeballSpriteId].oam.paletteNum), 1, 16, 0, RGB_WHITEALPHA); + sTradeAnim->state++; break; - case TS_STATE_POKEBALL_ARRIVE_WAIT: - if (gSprites[sTradeData->bouncingPokeballSpriteId].callback == SpriteCallbackDummy) + case STATE_POKEBALL_ARRIVE_WAIT: + if (gSprites[sTradeAnim->bouncingPokeballSpriteId].callback == SpriteCallbackDummy) { HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT], - sTradeData->monSpecies[TRADE_PARTNER], - sTradeData->monPersonalities[TRADE_PARTNER]); - sTradeData->state++; + sTradeAnim->monSpecies[TRADE_PARTNER], + sTradeAnim->monPersonalities[TRADE_PARTNER]); + sTradeAnim->state++; } break; - case TS_STATE_SHOW_NEW_MON: - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].x = 120; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].y = gMonFrontPicCoords[sTradeData->monSpecies[TRADE_PARTNER]].y_offset + 60; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].x2 = 0; - gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].y2 = 0; - StartSpriteAnim(&gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]], 0); - CreatePokeballSpriteToReleaseMon(sTradeData->monSpriteIds[TRADE_PARTNER], gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].oam.paletteNum, 120, 84, 2, 1, 20, PALETTES_BG | (0xF << 16), sTradeData->monSpecies[TRADE_PARTNER]); - FreeSpriteOamMatrix(&gSprites[sTradeData->bouncingPokeballSpriteId]); - DestroySprite(&gSprites[sTradeData->bouncingPokeballSpriteId]); - sTradeData->state++; + case STATE_SHOW_NEW_MON: + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].x = 120; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].y = gMonFrontPicCoords[sTradeAnim->monSpecies[TRADE_PARTNER]].y_offset + 60; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].x2 = 0; + gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].y2 = 0; + StartSpriteAnim(&gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]], 0); + CreatePokeballSpriteToReleaseMon(sTradeAnim->monSpriteIds[TRADE_PARTNER], gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]].oam.paletteNum, 120, 84, 2, 1, 20, PALETTES_BG | (0xF << 16), sTradeAnim->monSpecies[TRADE_PARTNER]); + FreeSpriteOamMatrix(&gSprites[sTradeAnim->bouncingPokeballSpriteId]); + DestroySprite(&gSprites[sTradeAnim->bouncingPokeballSpriteId]); + sTradeAnim->state++; break; - case TS_STATE_NEW_MON_MSG: + case STATE_NEW_MON_MSG: SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG0_ON | @@ -4266,76 +4336,70 @@ static bool8 AnimateTradeSequenceWireless(void) DISPCNT_OBJ_ON); StringExpandPlaceholders(gStringVar4, gText_XSentOverY); DrawTextOnTradeWindow(0, gStringVar4, 0); - sTradeData->state = TS_STATE_DELAY_FOR_MON_ANIM; - sTradeData->timer = 0; + sTradeAnim->state = STATE_DELAY_FOR_MON_ANIM; + sTradeAnim->timer = 0; break; - case TS_STATE_DELAY_FOR_MON_ANIM: - if (++sTradeData->timer > 60) + case STATE_DELAY_FOR_MON_ANIM: + if (++sTradeAnim->timer > 60) { - sTradeData->state = TS_STATE_WAIT_FOR_MON_CRY; - sTradeData->timer = 0; + sTradeAnim->state = STATE_WAIT_FOR_MON_CRY; + sTradeAnim->timer = 0; } break; - case TS_STATE_WAIT_FOR_MON_CRY: + case STATE_WAIT_FOR_MON_CRY: if (IsCryFinished()) - sTradeData->state = TS_STATE_TAKE_CARE_OF_MON; + sTradeAnim->state = STATE_TAKE_CARE_OF_MON; break; - case TS_STATE_TAKE_CARE_OF_MON: - if (++sTradeData->timer == 10) + case STATE_TAKE_CARE_OF_MON: + if (++sTradeAnim->timer == 10) PlayFanfare(MUS_EVOLVED); - if (sTradeData->timer == 250) + if (sTradeAnim->timer == 250) { - sTradeData->state++; + sTradeAnim->state++; StringExpandPlaceholders(gStringVar4, gText_TakeGoodCareOfX); DrawTextOnTradeWindow(0, gStringVar4, 0); - sTradeData->timer = 0; + sTradeAnim->timer = 0; } break; - case TS_STATE_AFTER_NEW_MON_DELAY: - if (++sTradeData->timer == 60) - sTradeData->state++; + case STATE_AFTER_NEW_MON_DELAY: + if (++sTradeAnim->timer == 60) + sTradeAnim->state++; break; - case TS_STATE_CHECK_RIBBONS: + case STATE_CHECK_RIBBONS: CheckPartnersMonForRibbons(); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_END_LINK_TRADE: - if (sTradeData->isLinkTrade) - { + case STATE_END_LINK_TRADE: + if (sTradeAnim->isLinkTrade) return TRUE; - } else if (JOY_NEW(A_BUTTON)) - { - sTradeData->state++; - } + sTradeAnim->state++; break; - case TS_STATE_TRY_EVOLUTION: // Only if in-game trade, link trades use CB2_TryLinkTradeEvolution + case STATE_TRY_EVOLUTION: // Only if in-game trade, link trades use CB2_TryLinkTradeEvolution TradeMons(gSpecialVar_0x8005, 0); - gCB2_AfterEvolution = CB2_UpdateInGameTrade; + gCB2_AfterEvolution = CB2_InGameTrade; evoTarget = GetEvolutionTargetSpecies(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], EVO_MODE_TRADE, ITEM_NONE, &gPlayerParty[gSelectedTradeMonPositions[TRADE_PARTNER]]); if (evoTarget != SPECIES_NONE) - { - TradeEvolutionScene(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], evoTarget, sTradeData->monSpriteIds[TRADE_PARTNER], gSelectedTradeMonPositions[TRADE_PLAYER]); - } - sTradeData->state++; + TradeEvolutionScene(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], evoTarget, sTradeAnim->monSpriteIds[TRADE_PARTNER], gSelectedTradeMonPositions[TRADE_PLAYER]); + sTradeAnim->state++; break; - case TS_STATE_FADE_OUT_END: + case STATE_FADE_OUT_END: BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - sTradeData->state++; + sTradeAnim->state++; break; - case TS_STATE_WAIT_FADE_OUT_END: + case STATE_WAIT_FADE_OUT_END: if (!gPaletteFade.active) { - PlayNewMapMusic(sTradeData->cachedMapMusic); - if (sTradeData) + PlayNewMapMusic(sTradeAnim->cachedMapMusic); + if (sTradeAnim) { FreeAllWindowBuffers(); Free(GetBgTilemapBuffer(3)); Free(GetBgTilemapBuffer(1)); Free(GetBgTilemapBuffer(0)); FreeMonSpritesGfx(); - FREE_AND_SET_NULL(sTradeData); + FREE_AND_SET_NULL(sTradeAnim); } SetMainCallback2(CB2_ReturnToField); BufferInGameTradeMonName(); @@ -4346,7 +4410,7 @@ static bool8 AnimateTradeSequenceWireless(void) } // Try to evolve a Pokémon received in a link trade -// In-game trades resolve evolution during the trade sequence, in TS_STATE_TRY_EVOLUTION +// In-game trades resolve evolution during the trade sequence, in STATE_TRY_EVOLUTION static void CB2_TryLinkTradeEvolution(void) { u16 evoTarget; @@ -4360,7 +4424,7 @@ static void CB2_TryLinkTradeEvolution(void) gCB2_AfterEvolution = CB2_SaveAndEndTrade; evoTarget = GetEvolutionTargetSpecies(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], EVO_MODE_TRADE, ITEM_NONE, &gPlayerParty[gSelectedTradeMonPositions[TRADE_PARTNER]]); if (evoTarget != SPECIES_NONE) - TradeEvolutionScene(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], evoTarget, sTradeData->monSpriteIds[TRADE_PARTNER], gSelectedTradeMonPositions[TRADE_PLAYER]); + TradeEvolutionScene(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], evoTarget, sTradeAnim->monSpriteIds[TRADE_PARTNER], gSelectedTradeMonPositions[TRADE_PLAYER]); else if (IsWirelessTrade()) SetMainCallback2(CB2_SaveAndEndWirelessTrade); else @@ -4375,25 +4439,25 @@ static void CB2_TryLinkTradeEvolution(void) UpdatePaletteFade(); } -static void UpdateTradeFinishFlags(void) +static void HandleLinkDataReceive(void) { - u8 blockReceivedStatus; + u8 recvStatus; TradeGetMultiplayerId(); // no effect call, ret val ignored - blockReceivedStatus = GetBlockReceivedStatus(); - if (blockReceivedStatus & 0x01) + recvStatus = GetBlockReceivedStatus(); + if (recvStatus & (1 << 0)) { if (gBlockRecvBuffer[0][0] == LINKCMD_CONFIRM_FINISH_TRADE) SetMainCallback2(CB2_TryLinkTradeEvolution); if (gBlockRecvBuffer[0][0] == LINKCMD_READY_FINISH_TRADE) - sTradeData->playerLinkFlagFinishTrade = READY_FINISH_TRADE; + sTradeAnim->playerFinishStatus = STATUS_READY; ResetBlockReceivedFlag(0); } - if (blockReceivedStatus & 0x02) + if (recvStatus & (1 << 1)) { if (gBlockRecvBuffer[1][0] == LINKCMD_READY_FINISH_TRADE) - sTradeData->partnerLinkFlagFinishTrade = READY_FINISH_TRADE; + sTradeAnim->partnerFinishStatus = STATUS_READY; ResetBlockReceivedFlag(1); } @@ -4444,7 +4508,7 @@ static void SpriteCB_BouncingPokeballDepartEnd(struct Sprite *sprite) if (++ sprite->data[0] == 23) { DestroySprite(sprite); - sTradeData->state = TS_STATE_FADE_OUT_TO_GBA_SEND; // Resume the master trade animation + sTradeAnim->state = STATE_FADE_OUT_TO_GBA_SEND; // Resume the master trade animation } } } @@ -4491,14 +4555,14 @@ static void BufferInGameTradeMonName(void) StringCopy(gStringVar2, gSpeciesNames[inGameTrade->species]); } -static void _CreateInGameTradePokemon(u8 whichPlayerMon, u8 whichInGameTrade) +static void CreateInGameTradePokemonInternal(u8 whichPlayerMon, u8 whichInGameTrade) { const struct InGameTrade *inGameTrade = &sIngameTrades[whichInGameTrade]; u8 level = GetMonData(&gPlayerParty[whichPlayerMon], MON_DATA_LEVEL); struct Mail mail; u8 metLocation = METLOC_IN_GAME_TRADE; - u8 isMail; + u8 mailNum; struct Pokemon *pokemon = &gEnemyParty[0]; CreateMon(pokemon, inGameTrade->species, level, USE_RANDOM_IVS, TRUE, inGameTrade->personality, OT_ID_PRESET, inGameTrade->otId); @@ -4521,14 +4585,14 @@ static void _CreateInGameTradePokemon(u8 whichPlayerMon, u8 whichInGameTrade) SetMonData(pokemon, MON_DATA_SHEEN, &inGameTrade->sheen); SetMonData(pokemon, MON_DATA_MET_LOCATION, &metLocation); - isMail = FALSE; + mailNum = 0; if (inGameTrade->heldItem != ITEM_NONE) { if (ItemIsMail(inGameTrade->heldItem)) { - SetInGameTradeMail(&mail, inGameTrade); + GetInGameTradeMail(&mail, inGameTrade); gTradeMail[0] = mail; - SetMonData(pokemon, MON_DATA_MAIL, &isMail); + SetMonData(pokemon, MON_DATA_MAIL, &mailNum); SetMonData(pokemon, MON_DATA_HELD_ITEM, &inGameTrade->heldItem); } else @@ -4539,14 +4603,12 @@ static void _CreateInGameTradePokemon(u8 whichPlayerMon, u8 whichInGameTrade) CalculateMonStats(&gEnemyParty[0]); } -static void SetInGameTradeMail(struct Mail *mail, const struct InGameTrade *trade) +static void GetInGameTradeMail(struct Mail *mail, const struct InGameTrade *trade) { s32 i; for (i = 0; i < MAIL_WORDS_COUNT; i++) - { mail->words[i] = sIngameTradeMail[trade->mailNum][i]; - } StringCopy(mail->playerName, trade->otName); PadNameString(mail->playerName, CHAR_SPACE); @@ -4568,25 +4630,25 @@ u16 GetTradeSpecies(void) void CreateInGameTradePokemon(void) { - _CreateInGameTradePokemon(gSpecialVar_0x8005, gSpecialVar_0x8004); + CreateInGameTradePokemonInternal(gSpecialVar_0x8005, gSpecialVar_0x8004); } static void CB2_UpdateLinkTrade(void) { - if (AnimateTradeSequence() == TRUE) + if (DoTradeAnim() == TRUE) { - DestroySprite(&gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]]); - FreeSpriteOamMatrix(&gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]]); + DestroySprite(&gSprites[sTradeAnim->monSpriteIds[TRADE_PLAYER]]); + FreeSpriteOamMatrix(&gSprites[sTradeAnim->monSpriteIds[TRADE_PARTNER]]); TradeMons(gSelectedTradeMonPositions[TRADE_PLAYER], gSelectedTradeMonPositions[TRADE_PARTNER] % PARTY_SIZE); if (!IsWirelessTrade()) { - sTradeData->linkData[0] = LINKCMD_READY_FINISH_TRADE; - sTradeData->sendTradeFinishState = 1; + sTradeAnim->linkData[0] = LINKCMD_READY_FINISH_TRADE; + sTradeAnim->scheduleLinkTransfer = 1; } - SetMainCallback2(CB2_TryFinishTrade); + SetMainCallback2(CB2_WaitTradeComplete); } - TrySendTradeFinishData(); - UpdateTradeFinishFlags(); + HandleLinkDataSend(); + HandleLinkDataReceive(); RunTasks(); RunTextPrinters(); AnimateSprites(); @@ -4594,7 +4656,7 @@ static void CB2_UpdateLinkTrade(void) UpdatePaletteFade(); } -static void CB2_TryFinishTrade(void) +static void CB2_WaitTradeComplete(void) { u8 mpId = TradeGetMultiplayerId(); if (IsWirelessTrade()) @@ -4603,15 +4665,15 @@ static void CB2_TryFinishTrade(void) } else { - UpdateTradeFinishFlags(); + HandleLinkDataReceive(); if (mpId == 0 - && sTradeData->playerLinkFlagFinishTrade == READY_FINISH_TRADE - && sTradeData->partnerLinkFlagFinishTrade == READY_FINISH_TRADE) + && sTradeAnim->playerFinishStatus == STATUS_READY + && sTradeAnim->partnerFinishStatus == STATUS_READY) { - sTradeData->linkData[0] = LINKCMD_CONFIRM_FINISH_TRADE; - SendBlock(BitmaskAllOtherLinkPlayers(), sTradeData->linkData, sizeof(sTradeData->linkData)); - sTradeData->playerLinkFlagFinishTrade = FINISH_TRADE; - sTradeData->partnerLinkFlagFinishTrade = FINISH_TRADE; + sTradeAnim->linkData[0] = LINKCMD_CONFIRM_FINISH_TRADE; + SendBlock(BitmaskAllOtherLinkPlayers(), sTradeAnim->linkData, sizeof(sTradeAnim->linkData)); + sTradeAnim->playerFinishStatus = STATUS_CANCEL; + sTradeAnim->partnerFinishStatus = STATUS_CANCEL; } } RunTasks(); @@ -4632,24 +4694,20 @@ static void CB2_SaveAndEndTrade(void) case 1: SetTradeLinkStandbyCallback(0); gMain.state = 100; - sTradeData->timer = 0; + sTradeAnim->timer = 0; break; case 100: - if (++sTradeData->timer > 180) + if (++sTradeAnim->timer > 180) { gMain.state = 101; - sTradeData->timer = 0; + sTradeAnim->timer = 0; } if (_IsLinkTaskFinished()) - { gMain.state = 2; - } break; case 101: if (_IsLinkTaskFinished()) - { gMain.state = 2; - } break; case 2: gMain.state = 50; @@ -4665,10 +4723,10 @@ static void CB2_SaveAndEndTrade(void) SetContinueGameWarpStatusToDynamicWarp(); LinkFullSave_Init(); gMain.state++; - sTradeData->timer = 0; + sTradeAnim->timer = 0; break; case 51: - if (++sTradeData->timer == 5) + if (++sTradeAnim->timer == 5) gMain.state++; break; case 52: @@ -4680,38 +4738,34 @@ static void CB2_SaveAndEndTrade(void) else { // Save isn't finished, delay again - sTradeData->timer = 0; + sTradeAnim->timer = 0; gMain.state = 51; } break; case 4: LinkFullSave_ReplaceLastSector(); gMain.state = 40; - sTradeData->timer = 0; + sTradeAnim->timer = 0; break; case 40: - if (++sTradeData->timer > 50) + if (++sTradeAnim->timer > 50) { if (GetMultiplayerId() == 0) - { - sTradeData->timer = Random() % 30; - } + sTradeAnim->timer = Random() % 30; else - { - sTradeData->timer = 0; - } + sTradeAnim->timer = 0; gMain.state = 41; } break; case 41: - if (sTradeData->timer == 0) + if (sTradeAnim->timer == 0) { SetTradeLinkStandbyCallback(1); gMain.state = 42; } else { - sTradeData->timer--; + sTradeAnim->timer--; } break; case 42: @@ -4722,7 +4776,7 @@ static void CB2_SaveAndEndTrade(void) } break; case 5: - if (++sTradeData->timer > 60) + if (++sTradeAnim->timer > 60) { gMain.state++; SetTradeLinkStandbyCallback(2); @@ -4746,13 +4800,9 @@ static void CB2_SaveAndEndTrade(void) if (IsBGMStopped() == TRUE) { if (gWirelessCommType && gMain.savedCallback == CB2_StartCreateTradeMenu) - { SetTradeLinkStandbyCallback(3); - } else - { SetCloseLinkCallback(); - } gMain.state++; } break; @@ -4762,13 +4812,13 @@ static void CB2_SaveAndEndTrade(void) if (_IsLinkTaskFinished()) { gSoftResetDisabled = FALSE; - SetMainCallback2(CB2_FreeTradeData); + SetMainCallback2(CB2_FreeTradeAnim); } } else if (!gReceivedRemoteLinkPlayers) { gSoftResetDisabled = FALSE; - SetMainCallback2(CB2_FreeTradeData); + SetMainCallback2(CB2_FreeTradeAnim); } break; } @@ -4781,7 +4831,7 @@ static void CB2_SaveAndEndTrade(void) UpdatePaletteFade(); } -static void CB2_FreeTradeData(void) +static void CB2_FreeTradeAnim(void) { if (!gPaletteFade.active) { @@ -4790,7 +4840,7 @@ static void CB2_FreeTradeData(void) Free(GetBgTilemapBuffer(1)); Free(GetBgTilemapBuffer(0)); FreeMonSpritesGfx(); - FREE_AND_SET_NULL(sTradeData); + FREE_AND_SET_NULL(sTradeAnim); if (gWirelessCommType) DestroyWirelessStatusIndicatorSprite(); SetMainCallback2(gMain.savedCallback); @@ -4812,7 +4862,7 @@ static void Task_InGameTrade(u8 taskId) { if (!gPaletteFade.active) { - SetMainCallback2(CB2_InGameTrade); + SetMainCallback2(CB2_InitInGameTrade); gFieldCallback = FieldCB_ContinueScriptHandleMusic; DestroyTask(taskId); } @@ -4822,40 +4872,35 @@ static void CheckPartnersMonForRibbons(void) { u8 i; u8 numRibbons = 0; - for (i = 0; i < (MON_DATA_UNUSED_RIBBONS - MON_DATA_CHAMPION_RIBBON); i ++) - { + for (i = 0; i < (MON_DATA_UNUSED_RIBBONS - MON_DATA_CHAMPION_RIBBON); i++) numRibbons += GetMonData(&gEnemyParty[gSelectedTradeMonPositions[TRADE_PARTNER] % PARTY_SIZE], MON_DATA_CHAMPION_RIBBON + i); - } + if (numRibbons != 0) FlagSet(FLAG_SYS_RIBBON_GET); } void LoadTradeAnimGfx(void) { - InitTradeBgInternal(); + TradeAnimInit_LoadGfx(); } void DrawTextOnTradeWindow(u8 windowId, const u8 *str, u8 speed) { FillWindowPixelBuffer(windowId, PIXEL_FILL(15)); - sTradeData->textColors[0] = TEXT_DYNAMIC_COLOR_6; - sTradeData->textColors[1] = TEXT_COLOR_WHITE; - sTradeData->textColors[2] = TEXT_COLOR_GREEN; - AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 2, 0, 0, sTradeData->textColors, speed, str); + sTradeAnim->textColors[0] = TEXT_DYNAMIC_COLOR_6; + sTradeAnim->textColors[1] = TEXT_COLOR_WHITE; + sTradeAnim->textColors[2] = TEXT_COLOR_GREEN; + AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 2, 0, 0, sTradeAnim->textColors, speed, str); CopyWindowToVram(windowId, COPYWIN_FULL); } -#define idx data[0] -#define counter data[1] -#define signalComingBack data[2] - static void Task_AnimateWirelessSignal(u8 taskId) { s16 *data = gTasks[taskId].data; - u16 paletteIdx = sWirelessSignalTiming[idx][0] * 16; + u16 paletteIdx = sWirelessSignalAnimParams[tIdx][0] * 16; - if (!signalComingBack) + if (!tSignalComingBack) { if (paletteIdx == 256) LoadPalette(sWirelessSignalNone_Pal, BG_PLTT_ID(3), PLTT_SIZE_4BPP); @@ -4870,37 +4915,37 @@ static void Task_AnimateWirelessSignal(u8 taskId) LoadPalette(&sWirelessSignalRecv_Pal[paletteIdx], BG_PLTT_ID(3), PLTT_SIZE_4BPP); } - if (sWirelessSignalTiming[idx][0] == 0 && counter == 0) + if (sWirelessSignalAnimParams[tIdx][0] == 0 && tCounter == 0) PlaySE(SE_M_HEAL_BELL); - if (counter == sWirelessSignalTiming[idx][1]) + if (tCounter == sWirelessSignalAnimParams[tIdx][1]) { - idx++; - counter = 0; - if (sWirelessSignalTiming[idx][1] == 0xFF) + tIdx++; + tCounter = 0; + if (sWirelessSignalAnimParams[tIdx][1] == 0xFF) { DestroyTask(taskId); } } else { - counter++; + tCounter++; } } -#undef idx -#undef counter -#undef signalComingBack +#undef tIdx +#undef tCounter +#undef tSignalComingBack -static void Task_NarrowWindowForCrossing_Wireless(u8 taskId) +static void Task_OpenCenterWhiteColumn(u8 taskId) { s16 *data = gTasks[taskId].data; if (data[0] == 0) { - sTradeData->wirelessWinLeft = sTradeData->wirelessWinRight = DISPLAY_WIDTH / 2; - sTradeData->wirelessWinTop = 0; - sTradeData->wirelessWinBottom = DISPLAY_HEIGHT; + sTradeAnim->wirelessWinLeft = sTradeAnim->wirelessWinRight = DISPLAY_WIDTH / 2; + sTradeAnim->wirelessWinTop = 0; + sTradeAnim->wirelessWinBottom = DISPLAY_HEIGHT; SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON); SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_OBJ); SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG0 | @@ -4908,41 +4953,41 @@ static void Task_NarrowWindowForCrossing_Wireless(u8 taskId) WININ_WIN0_OBJ); } - SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE2(sTradeData->wirelessWinLeft, sTradeData->wirelessWinRight)); - SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE2(sTradeData->wirelessWinTop, sTradeData->wirelessWinBottom)); + SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE2(sTradeAnim->wirelessWinLeft, sTradeAnim->wirelessWinRight)); + SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE2(sTradeAnim->wirelessWinTop, sTradeAnim->wirelessWinBottom)); data[0]++; - sTradeData->wirelessWinLeft -= 5; - sTradeData->wirelessWinRight += 5; + sTradeAnim->wirelessWinLeft -= 5; + sTradeAnim->wirelessWinRight += 5; - if (sTradeData->wirelessWinLeft < 80) + if (sTradeAnim->wirelessWinLeft < 80) DestroyTask(taskId); } -static void Task_NarrowWindowForCrossing_Cable(u8 taskId) +static void Task_CloseCenterWhiteColumn(u8 taskId) { s16 *data = gTasks[taskId].data; if (data[0] == 0) { - sTradeData->wirelessWinLeft = 80; - sTradeData->wirelessWinRight = DISPLAY_WIDTH - 80; + sTradeAnim->wirelessWinLeft = 80; + sTradeAnim->wirelessWinRight = DISPLAY_WIDTH - 80; SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_OBJ); SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG0 | WININ_WIN0_BG1 | WININ_WIN0_OBJ); } - SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE2(sTradeData->wirelessWinLeft, sTradeData->wirelessWinRight)); - SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE2(sTradeData->wirelessWinTop, sTradeData->wirelessWinBottom)); + SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE2(sTradeAnim->wirelessWinLeft, sTradeAnim->wirelessWinRight)); + SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE2(sTradeAnim->wirelessWinTop, sTradeAnim->wirelessWinBottom)); - if (sTradeData->wirelessWinLeft != DISPLAY_WIDTH / 2) + if (sTradeAnim->wirelessWinLeft != DISPLAY_WIDTH / 2) { data[0]++; - sTradeData->wirelessWinLeft += 5; - sTradeData->wirelessWinRight -= 5; + sTradeAnim->wirelessWinLeft += 5; + sTradeAnim->wirelessWinRight -= 5; - if (sTradeData->wirelessWinLeft > DISPLAY_WIDTH / 2 - 5) + if (sTradeAnim->wirelessWinLeft > DISPLAY_WIDTH / 2 - 5) BlendPalettes(0x8, 0, RGB_WHITEALPHA); } else @@ -4964,7 +5009,7 @@ static void CB2_SaveAndEndWirelessTrade(void) case 1: SetTradeLinkStandbyCallback(0); gMain.state = 2; - sTradeData->timer = 0; + sTradeAnim->timer = 0; break; case 2: if (_IsLinkTaskFinished()) @@ -4974,11 +5019,11 @@ static void CB2_SaveAndEndWirelessTrade(void) DrawTextOnTradeWindow(0, gStringVar4, 0); IncrementGameStat(GAME_STAT_POKEMON_TRADES); LinkFullSave_Init(); - sTradeData->timer = 0; + sTradeAnim->timer = 0; } break; case 3: - if (++sTradeData->timer == 5) + if (++sTradeAnim->timer == 5) gMain.state = 4; break; case 4: @@ -4988,34 +5033,34 @@ static void CB2_SaveAndEndWirelessTrade(void) } else { - sTradeData->timer = 0; + sTradeAnim->timer = 0; gMain.state = 3; } break; case 5: LinkFullSave_ReplaceLastSector(); gMain.state = 6; - sTradeData->timer = 0; + sTradeAnim->timer = 0; break; case 6: - if (++sTradeData->timer > 10) + if (++sTradeAnim->timer > 10) { if (GetMultiplayerId() == 0) - sTradeData->timer = Random() % 30; + sTradeAnim->timer = Random() % 30; else - sTradeData->timer = 0; + sTradeAnim->timer = 0; gMain.state = 7; } break; case 7: - if (sTradeData->timer == 0) + if (sTradeAnim->timer == 0) { SetTradeLinkStandbyCallback(1); gMain.state = 8; } else { - sTradeData->timer--; + sTradeAnim->timer--; } break; case 8: @@ -5026,7 +5071,7 @@ static void CB2_SaveAndEndWirelessTrade(void) } break; case 9: - if (++sTradeData->timer > 60) + if (++sTradeAnim->timer > 60) { gMain.state++; SetTradeLinkStandbyCallback(2); @@ -5051,7 +5096,7 @@ static void CB2_SaveAndEndWirelessTrade(void) if (_IsLinkTaskFinished()) { gSoftResetDisabled = FALSE; - SetMainCallback2(CB2_FreeTradeData); + SetMainCallback2(CB2_FreeTradeAnim); } break; } diff --git a/src/trainer_card.c b/src/trainer_card.c index 4da1d938a8..1535c3d997 100755 --- a/src/trainer_card.c +++ b/src/trainer_card.c @@ -33,6 +33,12 @@ #include "constants/trainers.h" #include "constants/union_room.h" +enum { + WIN_MSG, + WIN_CARD_TEXT, + WIN_TRAINER_PIC, +}; + struct TrainerCardData { u8 mainState; @@ -226,7 +232,7 @@ static const struct BgTemplate sTrainerCardBgTemplates[4] = static const struct WindowTemplate sTrainerCardWindowTemplates[] = { - { + [WIN_MSG] = { .bg = 1, .tilemapLeft = 2, .tilemapTop = 15, @@ -235,7 +241,7 @@ static const struct WindowTemplate sTrainerCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 0x253, }, - { + [WIN_CARD_TEXT] = { .bg = 1, .tilemapLeft = 1, .tilemapTop = 1, @@ -244,7 +250,7 @@ static const struct WindowTemplate sTrainerCardWindowTemplates[] = .paletteNum = 15, .baseBlock = 0x1, }, - { + [WIN_TRAINER_PIC] = { .bg = 3, .tilemapLeft = 19, .tilemapTop = 5, @@ -376,7 +382,7 @@ static void Task_TrainerCard(u8 taskId) case 0: if (!IsDma3ManagerBusyWithBgCopy()) { - FillWindowPixelBuffer(1, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_CARD_TEXT, PIXEL_FILL(0)); sData->mainState++; } break; @@ -385,13 +391,13 @@ static void Task_TrainerCard(u8 taskId) sData->mainState++; break; case 2: - DrawTrainerCardWindow(1); + DrawTrainerCardWindow(WIN_CARD_TEXT); sData->mainState++; break; case 3: - FillWindowPixelBuffer(2, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_TRAINER_PIC, PIXEL_FILL(0)); CreateTrainerCardTrainerPic(); - DrawTrainerCardWindow(2); + DrawTrainerCardWindow(WIN_TRAINER_PIC); sData->mainState++; break; case 4: @@ -411,7 +417,7 @@ static void Task_TrainerCard(u8 taskId) if (gWirelessCommType == 1 && gReceivedRemoteLinkPlayers == TRUE) { LoadWirelessStatusIndicatorSpriteGfx(); - CreateWirelessStatusIndicatorSprite(230, 150); + CreateWirelessStatusIndicatorSprite(DISPLAY_WIDTH - 10, DISPLAY_HEIGHT - 10); } BlendPalettes(PALETTES_ALL, 16, sData->blendColor); BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, sData->blendColor); @@ -434,7 +440,7 @@ static void Task_TrainerCard(u8 taskId) if (!gReceivedRemoteLinkPlayers && sData->timeColonNeedDraw) { PrintTimeOnCard(); - DrawTrainerCardWindow(1); + DrawTrainerCardWindow(WIN_CARD_TEXT); sData->timeColonNeedDraw = FALSE; } if (JOY_NEW(A_BUTTON)) @@ -497,9 +503,9 @@ static void Task_TrainerCard(u8 taskId) break; case STATE_WAIT_LINK_PARTNER: SetCloseLinkCallback(); - DrawDialogueFrame(0, TRUE); - AddTextPrinterParameterized(0, FONT_NORMAL, gText_WaitingTrainerFinishReading, 0, 1, 255, 0); - CopyWindowToVram(0, COPYWIN_FULL); + DrawDialogueFrame(WIN_MSG, TRUE); + AddTextPrinterParameterized(WIN_MSG, FONT_NORMAL, gText_WaitingTrainerFinishReading, 0, 1, 255, 0); + CopyWindowToVram(WIN_MSG, COPYWIN_FULL); sData->mainState = STATE_CLOSE_CARD_LINK; break; case STATE_CLOSE_CARD_LINK: @@ -1002,9 +1008,9 @@ static void PrintNameOnCardFront(void) StringCopy(txtPtr, sData->trainerCard.playerName); ConvertInternationalString(txtPtr, sData->language); if (sData->cardType == CARD_TYPE_FRLG) - AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 28, sTrainerCardTextColors, TEXT_SKIP_DRAW, buffer); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, 20, 28, sTrainerCardTextColors, TEXT_SKIP_DRAW, buffer); else - AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 33, sTrainerCardTextColors, TEXT_SKIP_DRAW, buffer); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, 16, 33, sTrainerCardTextColors, TEXT_SKIP_DRAW, buffer); } static void PrintIdOnCard(void) @@ -1026,7 +1032,7 @@ static void PrintIdOnCard(void) top = 9; } - AddTextPrinterParameterized3(1, FONT_NORMAL, xPos, top, sTrainerCardTextColors, TEXT_SKIP_DRAW, buffer); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, xPos, top, sTrainerCardTextColors, TEXT_SKIP_DRAW, buffer); } static void PrintMoneyOnCard(void) @@ -1035,9 +1041,9 @@ static void PrintMoneyOnCard(void) u8 top; if (!sData->isHoenn) - AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 56, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardMoney); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, 20, 56, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardMoney); else - AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 57, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardMoney); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, 16, 57, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardMoney); ConvertIntToDecimalStringN(gStringVar1, sData->trainerCard.money, STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_PokedollarVar1); @@ -1051,7 +1057,7 @@ static void PrintMoneyOnCard(void) xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 128); top = 57; } - AddTextPrinterParameterized3(1, FONT_NORMAL, xOffset, top, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, xOffset, top, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4); } static u16 GetCaughtMonsCount(void) @@ -1069,9 +1075,9 @@ static void PrintPokedexOnCard(void) if (FlagGet(FLAG_SYS_POKEDEX_GET)) { if (!sData->isHoenn) - AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 72, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardPokedex); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, 20, 72, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardPokedex); else - AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 73, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardPokedex); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, 16, 73, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardPokedex); StringCopy(ConvertIntToDecimalStringN(gStringVar4, sData->trainerCard.caughtMonsCount, STR_CONV_MODE_LEFT_ALIGN, 3), gText_EmptyString6); if (!sData->isHoenn) { @@ -1083,7 +1089,7 @@ static void PrintPokedexOnCard(void) xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 128); top = 73; } - AddTextPrinterParameterized3(1, FONT_NORMAL, xOffset, top, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, xOffset, top, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4); } } @@ -1097,9 +1103,9 @@ static void PrintTimeOnCard(void) u32 x, y, totalWidth; if (!sData->isHoenn) - AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 88, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardTime); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, 20, 88, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardTime); else - AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 89, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardTime); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, 16, 89, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardTime); if (sData->isLink) { @@ -1131,14 +1137,14 @@ static void PrintTimeOnCard(void) totalWidth = width + 30; x -= totalWidth; - FillWindowPixelRect(1, PIXEL_FILL(0), x, y, totalWidth, 15); + FillWindowPixelRect(WIN_CARD_TEXT, PIXEL_FILL(0), x, y, totalWidth, 15); ConvertIntToDecimalStringN(gStringVar4, hours, STR_CONV_MODE_RIGHT_ALIGN, 3); - AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, x, y, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4); x += 18; - AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTimeColonTextColors[sData->timeColonInvisible], TEXT_SKIP_DRAW, gText_Colon2); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, x, y, sTimeColonTextColors[sData->timeColonInvisible], TEXT_SKIP_DRAW, gText_Colon2); x += width; ConvertIntToDecimalStringN(gStringVar4, minutes, STR_CONV_MODE_LEADING_ZEROS, 2); - AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, x, y, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4); } static void PrintProfilePhraseOnCard(void) @@ -1148,10 +1154,10 @@ static void PrintProfilePhraseOnCard(void) if (sData->isLink) { - AddTextPrinterParameterized3(1, FONT_NORMAL, 8, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[0]); - AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringWidth(FONT_NORMAL, sData->easyChatProfile[0], 0) + 14, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[1]); - AddTextPrinterParameterized3(1, FONT_NORMAL, 8, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[2]); - AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringWidth(FONT_NORMAL, sData->easyChatProfile[2], 0) + 14, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[3]); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, 8, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[0]); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, GetStringWidth(FONT_NORMAL, sData->easyChatProfile[0], 0) + 14, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[1]); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, 8, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[2]); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, GetStringWidth(FONT_NORMAL, sData->easyChatProfile[2], 0) + 14, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[3]); } } @@ -1169,9 +1175,9 @@ static void BufferNameForCardBack(void) static void PrintNameOnCardBack(void) { if (!sData->isHoenn) - AddTextPrinterParameterized3(1, FONT_NORMAL, 136, 9, sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->textPlayersCard); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, 136, 9, sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->textPlayersCard); else - AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, sData->textPlayersCard, 216), 9, sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->textPlayersCard); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, sData->textPlayersCard, 216), 9, sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->textPlayersCard); } static const u8 sText_HofTime[] = _("{STR_VAR_1}:{STR_VAR_2}:{STR_VAR_3}"); @@ -1192,8 +1198,8 @@ static void PrintStatOnBackOfCard(u8 top, const u8 *statName, u8 *stat, const u8 static const u8 xOffsets[] = {8, 16}; static const u8 widths[] = {216, 216}; - AddTextPrinterParameterized3(1, FONT_NORMAL, xOffsets[sData->isHoenn], top * 16 + 33, sTrainerCardTextColors, TEXT_SKIP_DRAW, statName); - AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, stat, widths[sData->isHoenn]), top * 16 + 33, color, TEXT_SKIP_DRAW, stat); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, xOffsets[sData->isHoenn], top * 16 + 33, sTrainerCardTextColors, TEXT_SKIP_DRAW, statName); + AddTextPrinterParameterized3(WIN_CARD_TEXT, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, stat, widths[sData->isHoenn]), top * 16 + 33, color, TEXT_SKIP_DRAW, stat); } static void PrintHofDebutTimeOnCard(void) @@ -1672,7 +1678,7 @@ static bool8 Task_DrawFlippedCardSide(struct Task *task) switch (sData->flipDrawState) { case 0: - FillWindowPixelBuffer(1, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_CARD_TEXT, PIXEL_FILL(0)); FillBgTilemapBufferRect_Palette0(3, 0, 0, 0, 0x20, 0x20); break; case 1: @@ -1691,13 +1697,13 @@ static bool8 Task_DrawFlippedCardSide(struct Task *task) if (!sData->onBack) DrawCardFrontOrBack(sData->backTilemap); else - DrawTrainerCardWindow(1); + DrawTrainerCardWindow(WIN_CARD_TEXT); break; case 3: if (!sData->onBack) DrawCardBackStats(); else - FillWindowPixelBuffer(2, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_TRAINER_PIC, PIXEL_FILL(0)); break; case 4: if (sData->onBack) @@ -1722,12 +1728,12 @@ static bool8 Task_SetCardFlipped(struct Task *task) // If on back of card, draw front of card because its being flipped if (sData->onBack) { - DrawTrainerCardWindow(2); + DrawTrainerCardWindow(WIN_TRAINER_PIC); DrawCardScreenBackground(sData->bgTilemap); DrawCardFrontOrBack(sData->frontTilemap); DrawStarsAndBadgesOnCard(); } - DrawTrainerCardWindow(1); + DrawTrainerCardWindow(WIN_CARD_TEXT); sData->onBack ^= 1; task->tFlipState++; sData->allowDMACopy = TRUE; @@ -1882,7 +1888,7 @@ static void CreateTrainerCardTrainerPic(void) sTrainerPicOffset[sData->isHoenn][sData->trainerCard.gender][0], sTrainerPicOffset[sData->isHoenn][sData->trainerCard.gender][1], 8, - 2); + WIN_TRAINER_PIC); } else { @@ -1891,6 +1897,6 @@ static void CreateTrainerCardTrainerPic(void) sTrainerPicOffset[sData->isHoenn][sData->trainerCard.gender][0], sTrainerPicOffset[sData->isHoenn][sData->trainerCard.gender][1], 8, - 2); + WIN_TRAINER_PIC); } } diff --git a/src/trainer_hill.c b/src/trainer_hill.c index f6ee9e8182..2995a2cb29 100644 --- a/src/trainer_hill.c +++ b/src/trainer_hill.c @@ -685,7 +685,8 @@ static u16 GetMetatileForFloor(u8 floorId, u32 x, u32 y, u32 floorWidth) // floo void GenerateTrainerHillFloorLayout(u16 *mapArg) { s32 y, x; - u16 *src, *dst; + const u16 *src; + u16 *dst; u8 mapId = GetCurrentTrainerHillMapId(); if (mapId == TRAINER_HILL_ENTRANCE) diff --git a/src/trainer_pokemon_sprites.c b/src/trainer_pokemon_sprites.c index 7707e59cc1..14849c19e5 100644 --- a/src/trainer_pokemon_sprites.c +++ b/src/trainer_pokemon_sprites.c @@ -9,6 +9,12 @@ #include "pokemon.h" #include "constants/trainers.h" +#define PICS_COUNT 8 + +// Needs to be large enough to store either a decompressed pokemon pic or trainer pic +#define PIC_SPRITE_SIZE max(MON_PIC_SIZE, TRAINER_PIC_SIZE) +#define MAX_PIC_FRAMES max(MAX_MON_PIC_FRAMES, MAX_TRAINER_PIC_FRAMES) + struct PicData { u8 *frames; @@ -18,8 +24,6 @@ struct PicData u8 active; }; -#define PICS_COUNT 8 - static EWRAM_DATA struct SpriteTemplate sCreatingSpriteTemplate = {}; static EWRAM_DATA struct PicData sSpritePics[PICS_COUNT] = {}; @@ -138,11 +142,11 @@ static u16 CreatePicSprite(u16 species, u32 otId, u32 personality, bool8 isFront if (i == PICS_COUNT) return 0xFFFF; - framePics = Alloc(4 * 0x800); + framePics = Alloc(PIC_SPRITE_SIZE * MAX_PIC_FRAMES); if (!framePics) return 0xFFFF; - images = Alloc(4 * sizeof(struct SpriteFrameImage)); + images = Alloc(sizeof(struct SpriteFrameImage) * MAX_PIC_FRAMES); if (!images) { Free(framePics); @@ -153,10 +157,10 @@ static u16 CreatePicSprite(u16 species, u32 otId, u32 personality, bool8 isFront // debug trap? return 0xFFFF; } - for (j = 0; j < 4; j ++) + for (j = 0; j < MAX_PIC_FRAMES; j ++) { - images[j].data = framePics + 0x800 * j; - images[j].size = 0x800; + images[j].data = framePics + PIC_SPRITE_SIZE * j; + images[j].size = PIC_SPRITE_SIZE; } sCreatingSpriteTemplate.tileTag = TAG_NONE; sCreatingSpriteTemplate.oam = &sOamData_Normal; @@ -193,7 +197,7 @@ u16 CreateMonPicSprite_Affine(u16 species, u32 otId, u32 personality, u8 flags, if (i == PICS_COUNT) return 0xFFFF; - framePics = Alloc(4 * MON_PIC_SIZE); + framePics = Alloc(MON_PIC_SIZE * MAX_MON_PIC_FRAMES); if (!framePics) return 0xFFFF; @@ -206,7 +210,7 @@ u16 CreateMonPicSprite_Affine(u16 species, u32 otId, u32 personality, u8 flags, { type = flags; } - images = Alloc(4 * sizeof(struct SpriteFrameImage)); + images = Alloc(sizeof(struct SpriteFrameImage) * MAX_MON_PIC_FRAMES); if (!images) { Free(framePics); @@ -217,7 +221,7 @@ u16 CreateMonPicSprite_Affine(u16 species, u32 otId, u32 personality, u8 flags, // debug trap? return 0xFFFF; } - for (j = 0; j < 4; j ++) + for (j = 0; j < MAX_MON_PIC_FRAMES; j ++) { images[j].data = framePics + MON_PIC_SIZE * j; images[j].size = MON_PIC_SIZE; @@ -291,10 +295,10 @@ static u16 CreateTrainerCardSprite(u16 species, u32 otId, u32 personality, bool8 { u8 *framePics; - framePics = Alloc(4 * 0x800); + framePics = Alloc(TRAINER_PIC_SIZE * MAX_TRAINER_PIC_FRAMES); if (framePics && !DecompressPic(species, personality, isFrontPic, framePics, isTrainer)) { - BlitBitmapRectToWindow(windowId, framePics, 0, 0, 0x40, 0x40, destX, destY, 0x40, 0x40); + BlitBitmapRectToWindow(windowId, framePics, 0, 0, TRAINER_PIC_WIDTH, TRAINER_PIC_HEIGHT, destX, destY, TRAINER_PIC_WIDTH, TRAINER_PIC_HEIGHT); LoadPicPaletteBySlot(species, otId, personality, paletteSlot, isTrainer); Free(framePics); return 0; diff --git a/src/trainer_see.c b/src/trainer_see.c index 9496e119b4..8d34506288 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -692,8 +692,8 @@ void TryPrepareSecondApproachingTrainer(void) #define sLocalId data[0] #define sMapNum data[1] #define sMapGroup data[2] -#define sData3 data[3] -#define sData4 data[4] +#define sYVelocity data[3] +#define sYOffset data[4] #define sFldEffId data[7] u8 FldEff_ExclamationMarkIcon(void) @@ -739,7 +739,7 @@ static void SetIconSpriteData(struct Sprite *sprite, u16 fldEffId, u8 spriteAnim sprite->sLocalId = gFieldEffectArguments[0]; sprite->sMapNum = gFieldEffectArguments[1]; sprite->sMapGroup = gFieldEffectArguments[2]; - sprite->sData3 = -5; + sprite->sYVelocity = -5; sprite->sFldEffId = fldEffId; StartSpriteAnim(sprite, spriteAnimNum); @@ -757,23 +757,23 @@ static void SpriteCB_TrainerIcons(struct Sprite *sprite) else { struct Sprite *objEventSprite = &gSprites[gObjectEvents[objEventId].spriteId]; - sprite->sData4 += sprite->sData3; + sprite->sYOffset += sprite->sYVelocity; sprite->x = objEventSprite->x; sprite->y = objEventSprite->y - 16; sprite->x2 = objEventSprite->x2; - sprite->y2 = objEventSprite->y2 + sprite->sData4; - if (sprite->sData4) - sprite->sData3++; + sprite->y2 = objEventSprite->y2 + sprite->sYOffset; + if (sprite->sYOffset) + sprite->sYVelocity++; else - sprite->sData3 = 0; + sprite->sYVelocity = 0; } } #undef sLocalId #undef sMapNum #undef sMapGroup -#undef sData3 -#undef sData4 +#undef sYVelocity +#undef sYOffset #undef sFldEffId u8 GetCurrentApproachingTrainerObjectEventId(void) diff --git a/src/union_room.c b/src/union_room.c index c622ee04a6..38f2b22fa8 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -1271,7 +1271,7 @@ static u32 IsTryingToTradeAcrossVersionTooSoon(struct WirelessLink_Group *data, { if (!(gSaveBlock2Ptr->specialSaveWarpFlags & CHAMPION_SAVEWARP)) return UR_TRADE_PLAYER_NOT_READY; - else if (partner->rfu.data.compatibility.isChampion) + else if (partner->rfu.data.compatibility.canLinkNationally) return UR_TRADE_READY; } else @@ -1927,7 +1927,7 @@ static void Task_SendMysteryGift(u8 taskId) data->state = 3; break; case 3: - AddTextPrinterToWindow1(gStringVar4); + MG_AddMessageTextPrinter(gStringVar4); data->state = 4; break; case 4: @@ -2001,7 +2001,7 @@ static void Task_SendMysteryGift(u8 taskId) } break; case 9: - AddTextPrinterToWindow1(gStringVar4); + MG_AddMessageTextPrinter(gStringVar4); data->state = 10; break; case 10: @@ -2104,7 +2104,7 @@ static void Task_CardOrNewsWithFriend(u8 taskId) data->state = 1; break; case 1: - AddTextPrinterToWindow1(sText_ChooseTrainer); + MG_AddMessageTextPrinter(sText_ChooseTrainer); data->state = 2; break; case 2: @@ -2176,7 +2176,7 @@ static void Task_CardOrNewsWithFriend(u8 taskId) } break; case 4: - AddTextPrinterToWindow1(sText_AwaitingPlayersResponse); + MG_AddMessageTextPrinter(sText_AwaitingPlayersResponse); CopyAndTranslatePlayerName(gStringVar1, &data->playerList->players[data->leaderId]); data->state = 5; break; @@ -2195,7 +2195,7 @@ static void Task_CardOrNewsWithFriend(u8 taskId) data->state = 8; break; case RFU_STATUS_JOIN_GROUP_OK: - AddTextPrinterToWindow1(sText_PlayerSentBackOK); + MG_AddMessageTextPrinter(sText_PlayerSentBackOK); RfuSetStatus(RFU_STATUS_OK, 0); break; } @@ -2223,7 +2223,7 @@ static void Task_CardOrNewsWithFriend(u8 taskId) break; case 7: DestroyWirelessStatusIndicatorSprite(); - AddTextPrinterToWindow1(sText_PleaseStartOver); + MG_AddMessageTextPrinter(sText_PleaseStartOver); DestroyTask(taskId); LinkRfu_Shutdown(); gSpecialVar_Result = LINKUP_FAILED; @@ -2272,7 +2272,7 @@ static void Task_CardOrNewsOverWireless(u8 taskId) data->state = 1; break; case 1: - AddTextPrinterToWindow1(sText_SearchingForWirelessSystemWait); + MG_AddMessageTextPrinter(sText_SearchingForWirelessSystemWait); data->state = 2; break; case 2: @@ -2341,7 +2341,7 @@ static void Task_CardOrNewsOverWireless(u8 taskId) } break; case 4: - AddTextPrinterToWindow1(sText_AwaitingResponseFromWirelessSystem); + MG_AddMessageTextPrinter(sText_AwaitingResponseFromWirelessSystem); CopyAndTranslatePlayerName(gStringVar1, &data->playerList->players[data->leaderId]); data->state = 5; break; @@ -2360,7 +2360,7 @@ static void Task_CardOrNewsOverWireless(u8 taskId) data->state = 8; break; case RFU_STATUS_JOIN_GROUP_OK: - AddTextPrinterToWindow1(sText_WirelessLinkEstablished); + MG_AddMessageTextPrinter(sText_WirelessLinkEstablished); RfuSetStatus(RFU_STATUS_OK, 0); break; } @@ -4176,7 +4176,7 @@ static s32 IsRequestedTradeInPlayerParty(u32 type, u32 species) { for (i = 0; i < gPlayerPartyCount; i++) { - species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (species == SPECIES_EGG) return UR_TRADE_MATCH; } @@ -4186,7 +4186,7 @@ static s32 IsRequestedTradeInPlayerParty(u32 type, u32 species) { for (i = 0; i < gPlayerPartyCount; i++) { - species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (gSpeciesInfo[species].types[0] == type || gSpeciesInfo[species].types[1] == type) return UR_TRADE_MATCH; } @@ -4319,7 +4319,7 @@ static bool32 HasAtLeastTwoMonsOfLevel30OrLower(void) for (i = 0; i < gPlayerPartyCount; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL) <= UNION_ROOM_MAX_LEVEL - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG) + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) count++; } @@ -4348,7 +4348,7 @@ void Script_ResetUnionRoomTrade(void) static bool32 RegisterTradeMonAndGetIsEgg(u32 monId, struct UnionRoomTrade *trade) { - trade->playerSpecies = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES2); + trade->playerSpecies = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES_OR_EGG); trade->playerLevel = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); trade->playerPersonality = GetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY); if (trade->playerSpecies == SPECIES_EGG) @@ -4359,7 +4359,7 @@ static bool32 RegisterTradeMonAndGetIsEgg(u32 monId, struct UnionRoomTrade *trad static void RegisterTradeMon(u32 monId, struct UnionRoomTrade *trade) { - trade->species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES2); + trade->species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES_OR_EGG); trade->level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); trade->personality = GetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY); } @@ -4390,7 +4390,7 @@ static u32 GetPartyPositionOfRegisteredMon(struct UnionRoomTrade *trade, u8 mult cur_personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY); if (cur_personality != personality) continue; - cur_species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + cur_species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (cur_species != species) continue; response = i; diff --git a/src/union_room_chat.c b/src/union_room_chat.c old mode 100755 new mode 100644 index af4ec2721f..253e025689 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -116,6 +116,13 @@ enum { // Shared by all above #define PALTAG_INTERFACE 0 +enum { + WIN_CHAT_HISTORY, + WIN_TEXT_ENTRY, + WIN_KEYBOARD, + WIN_SWAP_MENU, +}; + struct UnionRoomChat { u32 filler1; @@ -166,8 +173,7 @@ struct UnionRoomChatDisplay u8 bg1Buffer[BG_SCREEN_SIZE]; u8 bg3Buffer[BG_SCREEN_SIZE]; u8 bg2Buffer[BG_SCREEN_SIZE]; - u8 unk2128[0x20]; - u8 unk2148[0x20]; + u8 textEntryTiles[TILE_SIZE_4BPP * 2]; }; struct UnionRoomChatSprites @@ -247,11 +253,11 @@ static void FreeSprites(void); static void ResetGpuBgState(void); static void SetBgTilemapBuffers(void); static void ClearBg0(void); -static void LoadChatWindowBorderGfx(void); +static void LoadKeyboardWindowGfx(void); static void LoadChatWindowGfx(void); static void LoadChatUnkPalette(void); static void LoadChatMessagesWindow(void); -static void LoadKeyboardWindow(void); +static void DrawKeyboardWindow(void); static void LoadKeyboardSwapWindow(void); static void LoadTextEntryWindow(void); static void CreateKeyboardCursorSprite(void); @@ -520,8 +526,8 @@ static const u8 *const sUnionRoomKeyboardText[UNION_ROOM_KB_PAGE_COUNT - 1][UNIO } }; -static const u16 sUnk_Palette1[] = INCBIN_U16("graphics/union_room_chat/unk_palette1.gbapal"); -static const u16 sUnk_Palette2[] = INCBIN_U16("graphics/union_room_chat/unk_palette2.gbapal"); +static const u16 sUnusedPalette[] = INCBIN_U16("graphics/union_room_chat/unused.gbapal"); // Loaded but never apparently used +static const u16 sChatMessagesWindow_Pal[] = INCBIN_U16("graphics/union_room_chat/chat_messages_window.gbapal"); static const struct BgTemplate sBgTemplates[] = { { @@ -560,7 +566,7 @@ static const struct BgTemplate sBgTemplates[] = { }; static const struct WindowTemplate sWinTemplates[] = { - { + [WIN_CHAT_HISTORY] = { .bg = 3, .tilemapLeft = 8, .tilemapTop = 1, @@ -568,7 +574,8 @@ static const struct WindowTemplate sWinTemplates[] = { .height = 19, .paletteNum = 15, .baseBlock = 0x0001, - }, { + }, + [WIN_TEXT_ENTRY] = { .bg = 1, .tilemapLeft = 9, .tilemapTop = 18, @@ -576,7 +583,8 @@ static const struct WindowTemplate sWinTemplates[] = { .height = 2, .paletteNum = 12, .baseBlock = 0x007a, - }, { + }, + [WIN_KEYBOARD] = { .bg = 1, .tilemapLeft = 0, .tilemapTop = 2, @@ -584,7 +592,8 @@ static const struct WindowTemplate sWinTemplates[] = { .height = 15, .paletteNum = 7, .baseBlock = 0x0020, - }, { + }, + [WIN_SWAP_MENU] = { .bg = 0, .tilemapLeft = 1, .tilemapTop = 2, @@ -749,15 +758,15 @@ static const u32 sTextEntryArrowTiles[] = INCBIN_U32("graphics/union_room_chat/t static const u32 sRButtonGfxTiles[] = INCBIN_U32("graphics/union_room_chat/r_button.4bpp.lz"); static const struct CompressedSpriteSheet sSpriteSheets[] = { - {sKeyboardCursorTiles, 0x1000, 0}, - {sTextEntryArrowTiles, 0x0040, 1}, - {sTextEntryCursorTiles, 0x0040, 2}, - {sRButtonGfxTiles, 0x0080, 3}, - {gUnionRoomChat_RButtonLabels, 0x0400, 4} + {.data = sKeyboardCursorTiles, .size = 0x1000, .tag = GFXTAG_KEYBOARD_CURSOR}, + {.data = sTextEntryArrowTiles, .size = 0x0040, .tag = GFXTAG_TEXT_ENTRY_ARROW}, + {.data = sTextEntryCursorTiles, .size = 0x0040, .tag = GFXTAG_TEXT_ENTRY_CURSOR}, + {.data = sRButtonGfxTiles, .size = 0x0080, .tag = GFXTAG_RBUTTON_ICON}, + {.data = gUnionRoomChat_RButtonLabels, .size = 0x0400, .tag = GFXTAG_RBUTTON_LABELS} }; static const struct SpritePalette sSpritePalette = { - sUnionRoomChatInterfacePal, 0 + .data = sUnionRoomChatInterfacePal, .tag = PALTAG_INTERFACE }; static const struct OamData sOam_KeyboardCursor = { @@ -960,7 +969,7 @@ static void CB2_LoadInterface(void) sChat->handleInputTask = CreateTask(Task_HandlePlayerInput, 8); sChat->receiveMessagesTask = CreateTask(Task_ReceiveChatMessage, 7); LoadWirelessStatusIndicatorSpriteGfx(); - CreateWirelessStatusIndicatorSprite(232, 150); + CreateWirelessStatusIndicatorSprite(DISPLAY_WIDTH - 8, DISPLAY_HEIGHT - 10); } break; } @@ -1749,7 +1758,7 @@ static void RegisterTextAtRow(void) static void ResetMessageEntryBuffer(void) { sChat->messageEntryBuffer[0] = EOS; - sChat->lastBufferCursorPos = 15; + sChat->lastBufferCursorPos = MAX_MESSAGE_LENGTH; sChat->bufferCursorPos = 0; } @@ -2053,10 +2062,10 @@ static void Task_ReceiveChatMessage(u8 taskId) tState = 3; // fall through case 3: - for (; tI < 5 && ((tBlockReceivedStatus >> tI) & 1) == 0; tI++) + for (; tI < MAX_RFU_PLAYERS && ((tBlockReceivedStatus >> tI) & 1) == 0; tI++) ; - if (tI == 5) + if (tI == MAX_RFU_PLAYERS) { tState = 1; return; @@ -2244,7 +2253,7 @@ static bool32 Display_LoadGfx(u8 *state) ClearBg0(); break; case 2: - LoadChatWindowBorderGfx(); + LoadKeyboardWindowGfx(); break; case 3: LoadChatWindowGfx(); @@ -2254,7 +2263,7 @@ static bool32 Display_LoadGfx(u8 *state) break; case 5: LoadChatMessagesWindow(); - LoadKeyboardWindow(); + DrawKeyboardWindow(); LoadKeyboardSwapWindow(); LoadTextEntryWindow(); break; @@ -2280,7 +2289,7 @@ static bool32 Display_ShowKeyboardSwapMenu(u8 *state) { case 0: ShowKeyboardSwapMenu(); - CopyWindowToVram(3, COPYWIN_FULL); + CopyWindowToVram(WIN_SWAP_MENU, COPYWIN_FULL); break; case 1: return IsDma3ManagerBusyWithBgCopy(); @@ -2296,7 +2305,7 @@ static bool32 Display_HideKeyboardSwapMenu(u8 *state) { case 0: HideKeyboardSwapMenu(); - CopyWindowToVram(3, COPYWIN_FULL); + CopyWindowToVram(WIN_SWAP_MENU, COPYWIN_FULL); break; case 1: return IsDma3ManagerBusyWithBgCopy(); @@ -2316,7 +2325,7 @@ static bool32 Display_SwitchPages(u8 *state) return TRUE; PrintCurrentKeyboardPage(); - CopyWindowToVram(2, COPYWIN_GFX); + CopyWindowToVram(WIN_KEYBOARD, COPYWIN_GFX); break; case 1: if (IsDma3ManagerBusyWithBgCopy()) @@ -2393,7 +2402,7 @@ static bool32 Display_UpdateMessageBuffer(u8 *state) FillTextEntryWindow(x, width, 0); str = GetMessageEntryBuffer(); DrawTextEntryMessage(0, str, 3, 1, 2); - CopyWindowToVram(1, COPYWIN_GFX); + CopyWindowToVram(WIN_TEXT_ENTRY, COPYWIN_GFX); break; case 1: if (!IsDma3ManagerBusyWithBgCopy()) @@ -2422,7 +2431,7 @@ static bool32 Display_AskRegisterText(u8 *state) length = StringLength_Multibyte(str); FillTextEntryWindow(x, length, PIXEL_FILL(6)); DrawTextEntryMessage(x, str, 0, 4, 5); - CopyWindowToVram(1, COPYWIN_GFX); + CopyWindowToVram(WIN_TEXT_ENTRY, COPYWIN_GFX); break; case 1: if (!IsDma3ManagerBusyWithBgCopy()) @@ -2463,7 +2472,7 @@ static bool32 Display_CancelRegister(u8 *state) length = StringLength_Multibyte(str); FillTextEntryWindow(x, length, PIXEL_FILL(0)); DrawTextEntryMessage(x, str, 3, 1, 2); - CopyWindowToVram(1, COPYWIN_GFX); + CopyWindowToVram(WIN_TEXT_ENTRY, COPYWIN_GFX); break; case 1: if (!IsDma3ManagerBusyWithBgCopy()) @@ -2501,7 +2510,7 @@ static bool32 Display_ReturnToKeyboard(u8 *state) { case 0: PrintCurrentKeyboardPage(); - CopyWindowToVram(2, COPYWIN_GFX); + CopyWindowToVram(WIN_KEYBOARD, COPYWIN_GFX); (*state)++; break; case 1: @@ -2527,7 +2536,7 @@ static bool32 Display_ScrollChat(u8 *state) str = GetLastReceivedMessage(); colorIdx = GetReceivedPlayerIndex(); PrintChatMessage(row, str, colorIdx); - CopyWindowToVram(0, COPYWIN_GFX); + CopyWindowToVram(WIN_CHAT_HISTORY, COPYWIN_GFX); break; case 1: if (IsDma3ManagerBusyWithBgCopy()) @@ -2546,8 +2555,8 @@ static bool32 Display_ScrollChat(u8 *state) } // fall through case 2: - ScrollWindow(0, 0, 5, PIXEL_FILL(1)); - CopyWindowToVram(0, COPYWIN_GFX); + ScrollWindow(WIN_CHAT_HISTORY, 0, 5, PIXEL_FILL(1)); + CopyWindowToVram(WIN_CHAT_HISTORY, COPYWIN_GFX); sDisplay->scrollCount++; (*state)++; // fall through @@ -2864,7 +2873,7 @@ static void DestroyStdMessageWindow(void) static void FillTextEntryWindow(u16 x, u16 width, u8 fillValue) { - FillWindowPixelRect(1, fillValue, x * 8, 1, width * 8, 14); + FillWindowPixelRect(WIN_TEXT_ENTRY, fillValue, x * 8, 1, width * 8, 14); } static void DrawTextEntryMessage(u16 x, u8 *str, u8 bgColor, u8 fgColor, u8 shadowColor) @@ -2881,7 +2890,7 @@ static void DrawTextEntryMessage(u16 x, u8 *str, u8 bgColor, u8 fgColor, u8 shad strBuffer[1] = EXT_CTRL_CODE_MIN_LETTER_SPACING; strBuffer[2] = 8; StringCopy(&strBuffer[3], str); - AddTextPrinterParameterized3(1, FONT_SHORT, x * 8, 1, color, TEXT_SKIP_DRAW, strBuffer); + AddTextPrinterParameterized3(WIN_TEXT_ENTRY, FONT_SHORT, x * 8, 1, color, TEXT_SKIP_DRAW, strBuffer); } static void PrintCurrentKeyboardPage(void) @@ -2894,7 +2903,7 @@ static void PrintCurrentKeyboardPage(void) u8 str[45]; u8 *str2; - FillWindowPixelBuffer(2, PIXEL_FILL(15)); + FillWindowPixelBuffer(WIN_KEYBOARD, PIXEL_FILL(15)); page = GetCurrentKeyboardPage(); color[0] = TEXT_COLOR_TRANSPARENT; color[1] = TEXT_DYNAMIC_COLOR_5; @@ -2916,7 +2925,7 @@ static void PrintCurrentKeyboardPage(void) return; StringCopy(&str[3], sUnionRoomKeyboardText[page][i]); - AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SKIP_DRAW, str); + AddTextPrinterParameterized3(WIN_KEYBOARD, FONT_SMALL, left, top, color, TEXT_SKIP_DRAW, str); } } else @@ -2927,7 +2936,7 @@ static void PrintCurrentKeyboardPage(void) str2 = GetRegisteredTextByRow(i); if (GetStringWidth(FONT_SMALL, str2, 0) <= 40) { - AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SKIP_DRAW, str2); + AddTextPrinterParameterized3(WIN_KEYBOARD, FONT_SMALL, left, top, color, TEXT_SKIP_DRAW, str2); } else { @@ -2938,8 +2947,8 @@ static void PrintCurrentKeyboardPage(void) StringCopyN_Multibyte(str, str2, length); } while (GetStringWidth(FONT_SMALL, str, 0) > 35); - AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SKIP_DRAW, str); - AddTextPrinterParameterized3(2, FONT_SMALL, left + 35, top, color, TEXT_SKIP_DRAW, sText_Ellipsis); + AddTextPrinterParameterized3(WIN_KEYBOARD, FONT_SMALL, left, top, color, TEXT_SKIP_DRAW, str); + AddTextPrinterParameterized3(WIN_KEYBOARD, FONT_SMALL, left + 35, top, color, TEXT_SKIP_DRAW, sText_Ellipsis); } } } @@ -2989,17 +2998,17 @@ static bool32 SlideKeyboardPageIn(void) static void ShowKeyboardSwapMenu(void) { - FillWindowPixelBuffer(3, PIXEL_FILL(1)); - DrawTextBorderOuter(3, 1, 13); - PrintMenuActionTextsAtPos(3, FONT_SHORT, 8, 1, 14, ARRAY_COUNT(sKeyboardPageTitleTexts), sKeyboardPageTitleTexts); - InitMenuNormal(3, FONT_SHORT, 0, 1, 14, 5, GetCurrentKeyboardPage()); - PutWindowTilemap(3); + FillWindowPixelBuffer(WIN_SWAP_MENU, PIXEL_FILL(1)); + DrawTextBorderOuter(WIN_SWAP_MENU, 1, 13); + PrintMenuActionTextsAtPos(WIN_SWAP_MENU, FONT_SHORT, 8, 1, 14, ARRAY_COUNT(sKeyboardPageTitleTexts), sKeyboardPageTitleTexts); + InitMenuNormal(WIN_SWAP_MENU, FONT_SHORT, 0, 1, 14, 5, GetCurrentKeyboardPage()); + PutWindowTilemap(WIN_SWAP_MENU); } static void HideKeyboardSwapMenu(void) { - ClearStdWindowAndFrameToTransparent(3, FALSE); - ClearWindowTilemap(3); + ClearStdWindowAndFrameToTransparent(WIN_SWAP_MENU, FALSE); + ClearWindowTilemap(WIN_SWAP_MENU); } static void PrintChatMessage(u16 row, u8 *str, u8 colorIdx) @@ -3009,8 +3018,8 @@ static void PrintChatMessage(u16 row, u8 *str, u8 colorIdx) color[0] = TEXT_COLOR_WHITE; color[1] = colorIdx * 2 + 2; color[2] = colorIdx * 2 + 3; - FillWindowPixelRect(0, PIXEL_FILL(1), 0, row * 15, 168, 15); - AddTextPrinterParameterized3(0, FONT_SHORT, 0, row * 15 + 1, color, TEXT_SKIP_DRAW, str); + FillWindowPixelRect(WIN_CHAT_HISTORY, PIXEL_FILL(1), 0, row * 15, 168, 15); + AddTextPrinterParameterized3(WIN_CHAT_HISTORY, FONT_SHORT, 0, row * 15 + 1, color, TEXT_SKIP_DRAW, str); } static void ResetGpuBgState(void) @@ -3053,12 +3062,12 @@ static void ClearBg0(void) CopyBgTilemapBufferToVram(0); } -static void LoadChatWindowBorderGfx(void) +static void LoadKeyboardWindowGfx(void) { - LoadPalette(gUnionRoomChat_Window_Pal2, BG_PLTT_ID(7), PLTT_SIZE_4BPP); - LoadPalette(gUnionRoomChat_Window_Pal1, BG_PLTT_ID(12), PLTT_SIZE_4BPP); - DecompressAndCopyTileDataToVram(1, gUnionRoomChat_Border_Gfx, 0, 0, 0); - CopyToBgTilemapBuffer(1, gUnionRoomChat_Border_Tilemap, 0, 0); + LoadPalette(gUnionRoomChat_Keyboard_Pal, BG_PLTT_ID(7), PLTT_SIZE_4BPP); + LoadPalette(gUnionRoomChat_InputText_Pal, BG_PLTT_ID(12), PLTT_SIZE_4BPP); + DecompressAndCopyTileDataToVram(1, gUnionRoomChat_Keyboard_Gfx, 0, 0, 0); + CopyToBgTilemapBuffer(1, gUnionRoomChat_Keyboard_Tilemap, 0, 0); CopyBgTilemapBufferToVram(1); } @@ -3070,8 +3079,12 @@ static void LoadChatWindowGfx(void) ptr = DecompressAndCopyTileDataToVram(2, gUnionRoomChat_Background_Gfx, 0, 0, 0); if (ptr) { - CpuFastCopy(&ptr[0x220], sDisplay->unk2128, sizeof(sDisplay->unk2128)); - CpuFastCopy(&ptr[0x420], sDisplay->unk2148, sizeof(sDisplay->unk2148)); + // The below is nonsense. Tiles 0x11 and 0x21 of the background tileset are + // the second half of "OK" and the "T" in "START" in the instructions header. + // They're later blitted onto the text entry window, then immediately cleared. + // The window has a different palette as well, so the tiles would appear mostly black anyway. + CpuFastCopy(&ptr[0x11 * TILE_SIZE_4BPP], &sDisplay->textEntryTiles[TILE_SIZE_4BPP * 0], TILE_SIZE_4BPP); + CpuFastCopy(&ptr[0x21 * TILE_SIZE_4BPP], &sDisplay->textEntryTiles[TILE_SIZE_4BPP * 1], TILE_SIZE_4BPP); } CopyToBgTilemapBuffer(2, gUnionRoomChat_Background_Tilemap, 0, 0); @@ -3080,23 +3093,23 @@ static void LoadChatWindowGfx(void) static void LoadChatUnkPalette(void) { - LoadPalette(sUnk_Palette1, BG_PLTT_ID(8), sizeof(sUnk_Palette1)); - RequestDma3Fill(0, (void *)BG_CHAR_ADDR(1) + 0x20, 0x20, 1); + LoadPalette(sUnusedPalette, BG_PLTT_ID(8), sizeof(sUnusedPalette)); + RequestDma3Fill(0, (void *)BG_CHAR_ADDR(1) + TILE_SIZE_4BPP, TILE_SIZE_4BPP, 1); } static void LoadChatMessagesWindow(void) { - LoadPalette(sUnk_Palette2, BG_PLTT_ID(15), sizeof(sUnk_Palette2)); - PutWindowTilemap(0); - FillWindowPixelBuffer(0, PIXEL_FILL(1)); - CopyWindowToVram(0, COPYWIN_FULL); + LoadPalette(sChatMessagesWindow_Pal, BG_PLTT_ID(15), sizeof(sChatMessagesWindow_Pal)); + PutWindowTilemap(WIN_CHAT_HISTORY); + FillWindowPixelBuffer(WIN_CHAT_HISTORY, PIXEL_FILL(1)); + CopyWindowToVram(WIN_CHAT_HISTORY, COPYWIN_FULL); } -static void LoadKeyboardWindow(void) +static void DrawKeyboardWindow(void) { - PutWindowTilemap(2); + PutWindowTilemap(WIN_KEYBOARD); PrintCurrentKeyboardPage(); - CopyWindowToVram(2, COPYWIN_FULL); + CopyWindowToVram(WIN_KEYBOARD, COPYWIN_FULL); } static void LoadTextEntryWindow(void) @@ -3106,20 +3119,21 @@ static void LoadTextEntryWindow(void) unused[0] = 0; unused[1] = 0xFF; + // Pointless, cleared below. The tiles are nonsense anyway, see LoadChatWindowGfx. for (i = 0; i < MAX_MESSAGE_LENGTH; i++) - BlitBitmapToWindow(1, sDisplay->unk2128, i * 8, 0, 8, 16); + BlitBitmapToWindow(WIN_TEXT_ENTRY, sDisplay->textEntryTiles, i * 8, 0, 8, 16); - FillWindowPixelBuffer(1, PIXEL_FILL(0)); - PutWindowTilemap(1); - CopyWindowToVram(1, COPYWIN_FULL); + FillWindowPixelBuffer(WIN_TEXT_ENTRY, PIXEL_FILL(0)); + PutWindowTilemap(WIN_TEXT_ENTRY); + CopyWindowToVram(WIN_TEXT_ENTRY, COPYWIN_FULL); } static void LoadKeyboardSwapWindow(void) { - FillWindowPixelBuffer(3, PIXEL_FILL(1)); - LoadUserWindowBorderGfx(3, 1, BG_PLTT_ID(13)); - LoadUserWindowBorderGfx_(3, 0xA, BG_PLTT_ID(2)); - LoadPalette(gStandardMenuPalette, BG_PLTT_ID(14), PLTT_SIZE_4BPP); + FillWindowPixelBuffer(WIN_SWAP_MENU, PIXEL_FILL(1)); + LoadUserWindowBorderGfx(WIN_SWAP_MENU, 1, BG_PLTT_ID(13)); + LoadUserWindowBorderGfx_(WIN_SWAP_MENU, 0xA, BG_PLTT_ID(2)); + LoadPalette(gStandardMenuPalette, BG_PLTT_ID(14), PLTT_SIZE_4BPP); } static void InitScanlineEffect(void) diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index be6fc89349..b64ac4152b 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -88,7 +88,7 @@ struct UsePokeblockMenu { u32 unused; u16 partyPalettes[PARTY_SIZE][0x40]; - u8 partySheets[NUM_SELECTIONS_LOADED][0x2000]; + u8 partySheets[NUM_SELECTIONS_LOADED][MON_PIC_SIZE * MAX_MON_PIC_FRAMES]; u8 unusedBuffer[0x1000]; u8 tilemapBuffer[BG_SCREEN_SIZE + 2]; u8 selectionIconSpriteIds[PARTY_SIZE + 1]; diff --git a/src/wallclock.c b/src/wallclock.c index 571748d114..ab1add25a0 100644 --- a/src/wallclock.c +++ b/src/wallclock.c @@ -55,25 +55,28 @@ static void SpriteCB_AMIndicator(struct Sprite *sprite); #define PALTAG_WALL_CLOCK_MALE 0x1000 #define PALTAG_WALL_CLOCK_FEMALE 0x1001 -enum -{ +enum { PERIOD_AM, PERIOD_PM, }; -enum -{ +enum { MOVE_NONE, MOVE_BACKWARD, MOVE_FORWARD, }; +enum { + WIN_MSG, + WIN_BUTTON_LABEL, +}; + static const u32 sHand_Gfx[] = INCBIN_U32("graphics/wallclock/hand.4bpp.lz"); static const u16 sTextPrompt_Pal[] = INCBIN_U16("graphics/wallclock/text_prompt.gbapal"); // for "Cancel" or "Confirm" static const struct WindowTemplate sWindowTemplates[] = { - { + [WIN_MSG] = { .bg = 0, .tilemapLeft = 3, .tilemapTop = 17, @@ -82,7 +85,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 14, .baseBlock = 512 }, - { + [WIN_BUTTON_LABEL] = { .bg = 2, .tilemapLeft = 24, .tilemapTop = 16, @@ -717,8 +720,8 @@ void CB2_StartWallClock(void) WallClockInit(); - AddTextPrinterParameterized(1, FONT_NORMAL, gText_Confirm3, 0, 1, 0, NULL); - PutWindowTilemap(1); + AddTextPrinterParameterized(WIN_BUTTON_LABEL, FONT_NORMAL, gText_Confirm3, 0, 1, 0, NULL); + PutWindowTilemap(WIN_BUTTON_LABEL); ScheduleBgCopyTilemapToVram(2); } @@ -765,8 +768,8 @@ void CB2_ViewWallClock(void) WallClockInit(); - AddTextPrinterParameterized(1, FONT_NORMAL, gText_Cancel4, 0, 1, 0, NULL); - PutWindowTilemap(1); + AddTextPrinterParameterized(WIN_BUTTON_LABEL, FONT_NORMAL, gText_Cancel4, 0, 1, 0, NULL); + PutWindowTilemap(WIN_BUTTON_LABEL); ScheduleBgCopyTilemapToVram(2); } @@ -829,9 +832,9 @@ static void Task_SetClock_HandleInput(u8 taskId) static void Task_SetClock_AskConfirm(u8 taskId) { - DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x250, 0x0d); - AddTextPrinterParameterized(0, FONT_NORMAL, gText_IsThisTheCorrectTime, 0, 1, 0, NULL); - PutWindowTilemap(0); + DrawStdFrameWithCustomTileAndPalette(WIN_MSG, FALSE, 0x250, 0x0d); + AddTextPrinterParameterized(WIN_MSG, FONT_NORMAL, gText_IsThisTheCorrectTime, 0, 1, 0, NULL); + PutWindowTilemap(WIN_MSG); ScheduleBgCopyTilemapToVram(0); CreateYesNoMenu(&sWindowTemplate_ConfirmYesNo, 0x250, 0x0d, 1); gTasks[taskId].func = Task_SetClock_HandleConfirmInput; @@ -848,8 +851,8 @@ static void Task_SetClock_HandleConfirmInput(u8 taskId) case 1: // NO case MENU_B_PRESSED: PlaySE(SE_SELECT); - ClearStdWindowAndFrameToTransparent(0, FALSE); - ClearWindowTilemap(0); + ClearStdWindowAndFrameToTransparent(WIN_MSG, FALSE); + ClearWindowTilemap(WIN_MSG); gTasks[taskId].func = Task_SetClock_HandleInput; break; } diff --git a/src/wild_encounter.c b/src/wild_encounter.c index d228b87a14..ef668c3a1c 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -1097,7 +1097,11 @@ static void ApplyCleanseTagEncounterRateMod(u32 *encRate) bool8 TryDoDoubleWildBattle(void) { +#if B_DOUBLE_WILD_REQUIRE_2_MONS == TRUE if (GetSafariZoneFlag() || GetMonsStateToDoubles() != PLAYER_HAS_TWO_USABLE_MONS) +#else + if (GetSafariZoneFlag()) +#endif return FALSE; #if B_FLAG_FORCE_DOUBLE_WILD != 0 else if (FlagGet(B_FLAG_FORCE_DOUBLE_WILD)) diff --git a/src/wireless_communication_status_screen.c b/src/wireless_communication_status_screen.c index 14ee1cf993..f80e2356ee 100644 --- a/src/wireless_communication_status_screen.c +++ b/src/wireless_communication_status_screen.c @@ -28,12 +28,21 @@ enum { COLORMODE_WHITE_DGRAY, }; -#define GROUPTYPE_TRADE 0 -#define GROUPTYPE_BATTLE 1 -#define GROUPTYPE_UNION 2 -#define GROUPTYPE_TOTAL 3 -#define GROUPTYPE_NONE -1 -#define NUM_GROUPTYPES 4 +enum { + WIN_TITLE, + WIN_GROUP_NAMES, + WIN_GROUP_COUNTS, +}; + +enum { + GROUPTYPE_TRADE, + GROUPTYPE_BATTLE, + GROUPTYPE_UNION, + GROUPTYPE_TOTAL, + NUM_GROUPTYPES +}; + +#define GROUPTYPE_NONE 0xFF struct WirelessCommunicationStatusScreen { @@ -88,7 +97,7 @@ static const struct BgTemplate sBgTemplates[] = { }; static const struct WindowTemplate sWindowTemplates[] = { - { + [WIN_TITLE] = { .bg = 0, .tilemapLeft = 3, .tilemapTop = 0, @@ -96,7 +105,8 @@ static const struct WindowTemplate sWindowTemplates[] = { .height = 3, .paletteNum = 15, .baseBlock = 0x0001 - }, { + }, + [WIN_GROUP_NAMES] = { .bg = 0, .tilemapLeft = 3, .tilemapTop = 4, @@ -104,7 +114,8 @@ static const struct WindowTemplate sWindowTemplates[] = { .height = 15, .paletteNum = 15, .baseBlock = 0x0049 - }, { + }, + [WIN_GROUP_COUNTS] = { .bg = 0, .tilemapLeft = 24, .tilemapTop = 4, @@ -126,7 +137,6 @@ static const u8 *const sHeaderTexts[NUM_GROUPTYPES + 1] = { // Activity, group type, number of players // 0 players means the number of players can change and should be counted dynamically // GROUPTYPE_TOTAL have no unique group and are simply counted in the total of "people communicating" -// UB: GROUPTYPE_NONE (-1) can potentially be used as an index into a u8[4] in CountPlayersInGroupAndGetActivity static const u8 sActivityGroupInfo[][3] = { {ACTIVITY_BATTLE_SINGLE, GROUPTYPE_BATTLE, 2}, {ACTIVITY_BATTLE_DOUBLE, GROUPTYPE_BATTLE, 2}, @@ -254,24 +264,24 @@ static void CyclePalette(s16 * counter, s16 * palIdx) static void PrintHeaderTexts(void) { s32 i; - FillWindowPixelBuffer(0, PIXEL_FILL(0)); - FillWindowPixelBuffer(1, PIXEL_FILL(0)); - FillWindowPixelBuffer(2, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_TITLE, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_GROUP_NAMES, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_GROUP_COUNTS, PIXEL_FILL(0)); // Print title - WCSS_AddTextPrinterParameterized(0, FONT_NORMAL, sHeaderTexts[0], GetStringCenterAlignXOffset(FONT_NORMAL, sHeaderTexts[0], 0xC0), 6, COLORMODE_GREEN); + WCSS_AddTextPrinterParameterized(WIN_TITLE, FONT_NORMAL, sHeaderTexts[0], GetStringCenterAlignXOffset(FONT_NORMAL, sHeaderTexts[0], 0xC0), 6, COLORMODE_GREEN); // Print label for each group (excluding total) for (i = 0; i < NUM_GROUPTYPES - 1; i++) - WCSS_AddTextPrinterParameterized(1, FONT_NORMAL, sHeaderTexts[i + 1], 0, 30 * i + 8, COLORMODE_WHITE_LGRAY); + WCSS_AddTextPrinterParameterized(WIN_GROUP_NAMES, FONT_NORMAL, sHeaderTexts[i + 1], 0, 30 * i + 8, COLORMODE_WHITE_LGRAY); // Print label for total - WCSS_AddTextPrinterParameterized(1, FONT_NORMAL, sHeaderTexts[i + 1], 0, 30 * i + 8, COLORMODE_RED); + WCSS_AddTextPrinterParameterized(WIN_GROUP_NAMES, FONT_NORMAL, sHeaderTexts[i + 1], 0, 30 * i + 8, COLORMODE_RED); - PutWindowTilemap(0); - CopyWindowToVram(0, COPYWIN_GFX); - PutWindowTilemap(1); - CopyWindowToVram(1, COPYWIN_GFX); + PutWindowTilemap(WIN_TITLE); + CopyWindowToVram(WIN_TITLE, COPYWIN_GFX); + PutWindowTilemap(WIN_GROUP_NAMES); + CopyWindowToVram(WIN_GROUP_NAMES, COPYWIN_GFX); } #define tState data[0] @@ -299,17 +309,17 @@ static void Task_WirelessCommunicationScreen(u8 taskId) case 3: if (UpdateCommunicationCounts(sStatusScreen->groupCounts, sStatusScreen->prevGroupCounts, sStatusScreen->activities, sStatusScreen->rfuTaskId)) { - FillWindowPixelBuffer(2, PIXEL_FILL(0)); + FillWindowPixelBuffer(WIN_GROUP_COUNTS, PIXEL_FILL(0)); for (i = 0; i < NUM_GROUPTYPES; i++) { ConvertIntToDecimalStringN(gStringVar4, sStatusScreen->groupCounts[i], STR_CONV_MODE_RIGHT_ALIGN, 2); if (i != GROUPTYPE_TOTAL) - WCSS_AddTextPrinterParameterized(2, FONT_NORMAL, gStringVar4, 12, 30 * i + 8, COLORMODE_WHITE_LGRAY); + WCSS_AddTextPrinterParameterized(WIN_GROUP_COUNTS, FONT_NORMAL, gStringVar4, 12, 30 * i + 8, COLORMODE_WHITE_LGRAY); else - WCSS_AddTextPrinterParameterized(2, FONT_NORMAL, gStringVar4, 12, 98, COLORMODE_RED); + WCSS_AddTextPrinterParameterized(WIN_GROUP_COUNTS, FONT_NORMAL, gStringVar4, 12, 98, COLORMODE_RED); } - PutWindowTilemap(2); - CopyWindowToVram(2, COPYWIN_FULL); + PutWindowTilemap(WIN_GROUP_COUNTS); + CopyWindowToVram(WIN_GROUP_COUNTS, COPYWIN_FULL); } if (JOY_NEW(A_BUTTON) || JOY_NEW(B_BUTTON)) { @@ -382,6 +392,13 @@ static u32 CountPlayersInGroupAndGetActivity(struct RfuPlayer * player, u32 * gr for (i = 0; i < ARRAY_COUNT(sActivityGroupInfo); i++) { +#ifdef UBFIX + // GROUPTYPE_NONE is 0xFF, and shouldn't be used as an index into groupCounts. + // In theory the only activity with this group type (ACTIVITY_SEARCH) wouldn't + // satisfy the condition below, but not necessarily. + if (group_type(i) == GROUPTYPE_NONE) + continue; +#endif if (activity == group_activity(i) && player->groupScheduledAnim == UNION_ROOM_SPAWN_IN) { if (group_players(i) == 0) diff --git a/test/ability_blaze.c b/test/ability_blaze.c index 259b863ec3..1e12c6b294 100644 --- a/test/ability_blaze.c +++ b/test/ability_blaze.c @@ -15,6 +15,6 @@ SINGLE_BATTLE_TEST("Blaze boosts Fire-type moves in a pinch", s16 damage) } SCENE { HP_BAR(opponent, captureDamage: &results[i].damage); } FINALLY { - EXPECT_GT(results[1].damage, results[0].damage); + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); } } diff --git a/test/ability_compound_eyes.c b/test/ability_compound_eyes.c index 97ab84dd27..d90604d5c3 100644 --- a/test/ability_compound_eyes.c +++ b/test/ability_compound_eyes.c @@ -3,7 +3,7 @@ SINGLE_BATTLE_TEST("Compound Eyes raises accuracy") { - PASSES_RANDOMLY(91, 100); + PASSES_RANDOMLY(91, 100, RNG_ACCURACY); GIVEN { ASSUME(gBattleMoves[MOVE_THUNDER].accuracy == 70); PLAYER(SPECIES_BUTTERFREE) { Ability(ABILITY_COMPOUND_EYES); }; @@ -21,12 +21,11 @@ SINGLE_BATTLE_TEST("Compound Eyes raises accuracy") // than we expect. SINGLE_BATTLE_TEST("Compound Eyes does not affect OHKO moves") { - KNOWN_FAILING; - PASSES_RANDOMLY(30, 100); + PASSES_RANDOMLY(30, 100, RNG_ACCURACY); GIVEN { ASSUME(gBattleMoves[MOVE_FISSURE].accuracy == 30); ASSUME(gBattleMoves[MOVE_FISSURE].effect == EFFECT_OHKO); - PLAYER(SPECIES_BUTTERFREE) { Ability(ABILITY_TINTED_LENS); }; + PLAYER(SPECIES_BUTTERFREE) { Ability(ABILITY_COMPOUND_EYES); }; OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { MOVE(player, MOVE_FISSURE); } diff --git a/test/ability_contrary.c b/test/ability_contrary.c new file mode 100644 index 0000000000..33cfa7ce87 --- /dev/null +++ b/test/ability_contrary.c @@ -0,0 +1,143 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); +} + +SINGLE_BATTLE_TEST("Contrary raises Attack when Intimidated", s16 damage) +{ + u32 ability; + PARAMETRIZE { ability = ABILITY_CONTRARY; } + PARAMETRIZE { ability = ABILITY_TANGLED_FEET; } + GIVEN { + PLAYER(SPECIES_MIGHTYENA) { Ability(ABILITY_INTIMIDATE); } + OPPONENT(SPECIES_SPINDA) { Ability(ability); } + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); } + } SCENE { + ABILITY_POPUP(player, ABILITY_INTIMIDATE); + if (ability == ABILITY_CONTRARY) { + ABILITY_POPUP(opponent, ABILITY_CONTRARY); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's Attack rose!"); + } + HP_BAR(player, captureDamage: &results[i].damage); + } + FINALLY { + EXPECT_MUL_EQ(results[1].damage, Q_4_12(2.125), results[0].damage); + } +} + +SINGLE_BATTLE_TEST("Contrary raises stats after using a move which would normally lower them: Overheat", s16 damageBefore, s16 damageAfter) +{ + u32 ability; + PARAMETRIZE { ability = ABILITY_CONTRARY; } + PARAMETRIZE { ability = ABILITY_TANGLED_FEET; } + GIVEN { + ASSUME(gBattleMoves[MOVE_OVERHEAT].effect == EFFECT_OVERHEAT); + ASSUME(gBattleMoves[MOVE_OVERHEAT].split == SPLIT_SPECIAL); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_SPINDA) { Ability(ability); } + } WHEN { + TURN { MOVE(opponent, MOVE_OVERHEAT); } + TURN { MOVE(opponent, MOVE_OVERHEAT); } + } SCENE { + MESSAGE("Foe Spinda used Overheat!"); + HP_BAR(player, captureDamage: &results[i].damageBefore); + if (ability == ABILITY_CONTRARY) { + // ABILITY_POPUP(opponent, ABILITY_CONTRARY); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's Sp. Atk sharply rose!"); + } + else { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's Sp. Atk harshly fell!"); + } + + // MESSAGE("Foe Spinda used Overheat!"); + HP_BAR(player, captureDamage: &results[i].damageAfter); + if (ability == ABILITY_CONTRARY) { + // ABILITY_POPUP(opponent, ABILITY_CONTRARY); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's Sp. Atk sharply rose!"); + } + else { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's Sp. Atk harshly fell!"); + } + } + FINALLY { + EXPECT_MUL_EQ(results[0].damageBefore, Q_4_12(2.0), results[0].damageAfter); + EXPECT_MUL_EQ(results[1].damageBefore, Q_4_12(0.5), results[1].damageAfter); + } +} + +SINGLE_BATTLE_TEST("Contrary lowers a stat after using a move which would normally raise it: Swords Dance", s16 damageBefore, s16 damageAfter) +{ + u32 ability; + PARAMETRIZE { ability = ABILITY_CONTRARY; } + PARAMETRIZE { ability = ABILITY_TANGLED_FEET; } + GIVEN { + ASSUME(gBattleMoves[MOVE_SWORDS_DANCE].effect == EFFECT_ATTACK_UP_2); + PLAYER(SPECIES_WOBBUFFET) {Defense(102); } + OPPONENT(SPECIES_SPINDA) { Ability(ability); Attack(100); } + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); } + TURN { MOVE(opponent, MOVE_SWORDS_DANCE); } + TURN { MOVE(opponent, MOVE_TACKLE); } + } SCENE { + MESSAGE("Foe Spinda used Tackle!"); + HP_BAR(player, captureDamage: &results[i].damageBefore); + + //MESSAGE("Foe Spinda used Swords Dance!"); + if (ability == ABILITY_CONTRARY) { + // ABILITY_POPUP(opponent, ABILITY_CONTRARY); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's Attack harshly fell!"); + } + else { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's Attack sharply rose!"); + } + + // MESSAGE("Foe Spinda used Tackle!"); + HP_BAR(player, captureDamage: &results[i].damageAfter); + } + FINALLY { + EXPECT_MUL_EQ(results[0].damageBefore, Q_4_12(0.5), results[0].damageAfter); + EXPECT_MUL_EQ(results[1].damageBefore, Q_4_12(2.0), results[1].damageAfter); + } +} + +SINGLE_BATTLE_TEST("Contrary raises a stat after using a move which would normally lower it: Growl", s16 damage) +{ + u32 ability; + PARAMETRIZE { ability = ABILITY_CONTRARY; } + PARAMETRIZE { ability = ABILITY_TANGLED_FEET; } + GIVEN { + ASSUME(gBattleMoves[MOVE_GROWL].effect == EFFECT_ATTACK_DOWN); + PLAYER(SPECIES_WOBBUFFET) {Speed(3); } + OPPONENT(SPECIES_SPINDA) { Ability(ability); Speed(2); } + } WHEN { + TURN { MOVE(player, MOVE_GROWL); MOVE(opponent, MOVE_TACKLE); } + } SCENE { + MESSAGE("Wobbuffet used Growl!"); + if (ability == ABILITY_CONTRARY) { + // ABILITY_POPUP(opponent, ABILITY_CONTRARY); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's Attack rose!"); + } + else { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Spinda's Attack fell!"); + } + + MESSAGE("Foe Spinda used Tackle!"); + HP_BAR(player, captureDamage: &results[i].damage); + } + FINALLY { + EXPECT_MUL_EQ(results[1].damage, Q_4_12(2.125), results[0].damage); + } +} diff --git a/test/ability_cute_charm.c b/test/ability_cute_charm.c index 5e089efdf2..ccf5c490b3 100644 --- a/test/ability_cute_charm.c +++ b/test/ability_cute_charm.c @@ -1,9 +1,6 @@ #include "global.h" #include "test_battle.h" -// TODO: Currently PASSES_RANDOMLY is incapable of testing Cute Charm -// because it only activates 33% of the time, but we only want to -// measure the 50% of the time that the infatuation prevents our move. SINGLE_BATTLE_TEST("Cute Charm inflicts infatuation on contact") { u32 move; diff --git a/test/ability_damp.c b/test/ability_damp.c index 33d1ae466a..c473660f5c 100644 --- a/test/ability_damp.c +++ b/test/ability_damp.c @@ -19,6 +19,26 @@ SINGLE_BATTLE_TEST("Damp prevents explosion-like moves from enemies") } } +DOUBLE_BATTLE_TEST("Damp prevents explosion-like moves from enemies in a double battle") +{ + u32 move; + PARAMETRIZE { move = MOVE_EXPLOSION; } + PARAMETRIZE { move = MOVE_SELF_DESTRUCT; } + PARAMETRIZE { move = MOVE_MIND_BLOWN; } + PARAMETRIZE { move = MOVE_MISTY_EXPLOSION; } + GIVEN { + PLAYER(SPECIES_PARAS) { Ability(ABILITY_DAMP); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponentLeft, move); } + } SCENE { + ABILITY_POPUP(playerLeft, ABILITY_DAMP); + NONE_OF { HP_BAR(playerLeft); HP_BAR(opponentLeft); HP_BAR(playerRight); HP_BAR(opponentRight); } + } +} + SINGLE_BATTLE_TEST("Damp prevents explosion-like moves from self") { u32 move; diff --git a/test/ability_download.c b/test/ability_download.c new file mode 100644 index 0000000000..d83d90196e --- /dev/null +++ b/test/ability_download.c @@ -0,0 +1,95 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); + ASSUME(gBattleMoves[MOVE_TRI_ATTACK].split == SPLIT_SPECIAL); +} + +SINGLE_BATTLE_TEST("Download raises Attack if player has lower Def than Sp. Def", s16 damage) +{ + u32 ability; + PARAMETRIZE { ability = ABILITY_TRACE; } + PARAMETRIZE { ability = ABILITY_DOWNLOAD; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET) {Defense(100); SpDefense(200); }; + OPPONENT(SPECIES_PORYGON) { Ability(ability); Attack(100); }; + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); } + } SCENE { + if (ability == ABILITY_DOWNLOAD) + { + ABILITY_POPUP(opponent, ABILITY_DOWNLOAD); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Porygon's Download raised its Attack!"); + } + HP_BAR(player, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Download raises Sp.Attack if enemy has lower Sp. Def than Def", s16 damage) +{ + u32 ability; + PARAMETRIZE { ability = ABILITY_TRACE; } + PARAMETRIZE { ability = ABILITY_DOWNLOAD; } + GIVEN { + PLAYER(SPECIES_PORYGON) { Ability(ability); SpAttack(100); }; + OPPONENT(SPECIES_WOBBUFFET) {Defense(200); SpDefense(100); }; + } WHEN { + TURN { MOVE(player, MOVE_TRI_ATTACK); } + } SCENE { + if (ability == ABILITY_DOWNLOAD) + { + ABILITY_POPUP(player, ABILITY_DOWNLOAD); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Porygon's Download raised its Sp. Atk!"); + } + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Download doesn't activate if target hasn't been sent out yet", s16 damagePhysical, s16 damageSpecial) +{ + u32 ability; + PARAMETRIZE { ability = ABILITY_TRACE; } + PARAMETRIZE { ability = ABILITY_DOWNLOAD; } + GIVEN { + ASSUME(gBattleMoves[MOVE_EXPLOSION].effect == EFFECT_EXPLOSION); + PLAYER(SPECIES_WOBBUFFET) { Speed(100); }; + PLAYER(SPECIES_PORYGON) { Ability(ability); Defense(400); SpDefense(300); Speed(300); Attack(100); }; + OPPONENT(SPECIES_WOBBUFFET) { HP(1); Speed(100); }; + OPPONENT(SPECIES_PORYGON2) { Ability(ability); Defense(100); SpDefense(200); Speed(200); }; + } WHEN { + TURN { MOVE(player, MOVE_EXPLOSION); SEND_OUT(player, 1); SEND_OUT(opponent, 1); } + TURN { MOVE(player, MOVE_TACKLE); MOVE(opponent, MOVE_TRI_ATTACK);} + } SCENE { + HP_BAR(player, hp: 0); + ANIMATION(ANIM_TYPE_MOVE, MOVE_EXPLOSION, player); + // Everyone faints. + + MESSAGE("Go! Porygon!"); + MESSAGE("2 sent out Porygon2!"); + + if (ability == ABILITY_DOWNLOAD) + { + ABILITY_POPUP(player, ABILITY_DOWNLOAD); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Porygon's Download raised its Attack!"); + ABILITY_POPUP(opponent, ABILITY_DOWNLOAD); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Porygon2's Download raised its Sp. Atk!"); + } + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); + HP_BAR(opponent, captureDamage: &results[i].damagePhysical); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TRI_ATTACK, opponent); + HP_BAR(player, captureDamage: &results[i].damageSpecial); + } FINALLY { + EXPECT_MUL_EQ(results[0].damagePhysical, Q_4_12(1.5), results[1].damagePhysical); + EXPECT_MUL_EQ(results[0].damageSpecial, Q_4_12(1.5), results[1].damageSpecial); + } +} diff --git a/test/ability_insomnia.c b/test/ability_insomnia.c index b9fe387532..9398bd30ab 100644 --- a/test/ability_insomnia.c +++ b/test/ability_insomnia.c @@ -11,7 +11,7 @@ SINGLE_BATTLE_TEST("Insomnia prevents sleep") TURN { MOVE(opponent, MOVE_SPORE); } } SCENE { ABILITY_POPUP(player, ABILITY_INSOMNIA); - NONE_OF { + NONE_OF { ANIMATION(ANIM_TYPE_MOVE, MOVE_SPORE, opponent); ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, player); STATUS_ICON(player, sleep: TRUE); @@ -31,7 +31,7 @@ SINGLE_BATTLE_TEST("Insomnia prevents yawn") TURN { } } SCENE { ABILITY_POPUP(player, ABILITY_INSOMNIA); - NONE_OF { + NONE_OF { ANIMATION(ANIM_TYPE_MOVE, MOVE_YAWN, opponent); ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, player); STATUS_ICON(player, sleep: TRUE); @@ -49,7 +49,7 @@ SINGLE_BATTLE_TEST("Insomnia prevents rest") TURN { MOVE(player, MOVE_REST); } } SCENE { ABILITY_POPUP(player, ABILITY_INSOMNIA); - NONE_OF { + NONE_OF { ANIMATION(ANIM_TYPE_MOVE, MOVE_REST, player); ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, player); STATUS_ICON(player, sleep: TRUE); diff --git a/test/ability_intimidate.c b/test/ability_intimidate.c index 450ca64029..40804cbb19 100644 --- a/test/ability_intimidate.c +++ b/test/ability_intimidate.c @@ -10,17 +10,21 @@ SINGLE_BATTLE_TEST("Intimidate (opponent) lowers player's attack after switch ou { u32 ability; PARAMETRIZE { ability = ABILITY_INTIMIDATE; } - PARAMETRIZE { ability = ABILITY_RECKLESS; } + PARAMETRIZE { ability = ABILITY_SHED_SKIN; } GIVEN { PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); - OPPONENT(SPECIES_STARAPTOR) { Ability(ability); }; + OPPONENT(SPECIES_ARBOK) { Ability(ability); }; } WHEN { TURN { SWITCH(opponent, 1); } TURN { MOVE(player, MOVE_TACKLE); } } SCENE { if (ability == ABILITY_INTIMIDATE) + { ABILITY_POPUP(opponent, ABILITY_INTIMIDATE); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Foe Arbok's Intimidate cuts Wobbuffet's attack!"); + } HP_BAR(opponent, captureDamage: &results[i].damage); } FINALLY { EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); @@ -30,21 +34,128 @@ SINGLE_BATTLE_TEST("Intimidate (opponent) lowers player's attack after switch ou SINGLE_BATTLE_TEST("Intimidate (opponent) lowers player's attack after KO", s16 damage) { u32 ability; - KNOWN_FAILING; PARAMETRIZE { ability = ABILITY_INTIMIDATE; } - PARAMETRIZE { ability = ABILITY_RECKLESS; } + PARAMETRIZE { ability = ABILITY_SHED_SKIN; } GIVEN { PLAYER(SPECIES_WOBBUFFET) { Speed(2); }; OPPONENT(SPECIES_WOBBUFFET) { HP(1); Speed(1); }; - OPPONENT(SPECIES_STARAPTOR) { Ability(ABILITY_INTIMIDATE); Speed(1); }; + OPPONENT(SPECIES_ARBOK) { Ability(ability); Speed(1); }; } WHEN { TURN { MOVE(player, MOVE_TACKLE); SEND_OUT(opponent, 1); } TURN { MOVE(player, MOVE_TACKLE); } } SCENE { + HP_BAR(opponent); if (ability == ABILITY_INTIMIDATE) + { ABILITY_POPUP(opponent, ABILITY_INTIMIDATE); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Foe Arbok's Intimidate cuts Wobbuffet's attack!"); + } HP_BAR(opponent, captureDamage: &results[i].damage); } FINALLY { EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); } } + +DOUBLE_BATTLE_TEST("Intimidate doesn't activate on an empty field in a double battle") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_EXPLOSION].effect == EFFECT_EXPLOSION); + PLAYER(SPECIES_WOBBUFFET) { }; + PLAYER(SPECIES_WOBBUFFET) { HP(1); }; + PLAYER(SPECIES_EKANS) { Ability(ABILITY_INTIMIDATE); }; + PLAYER(SPECIES_ABRA); + OPPONENT(SPECIES_WOBBUFFET) { HP(1); }; + OPPONENT(SPECIES_WOBBUFFET) { HP(1); }; + OPPONENT(SPECIES_ARBOK) { Ability(ABILITY_INTIMIDATE); }; + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(playerLeft, MOVE_EXPLOSION); SEND_OUT(playerLeft, 2); SEND_OUT(opponentLeft, 2); SEND_OUT(playerRight, 3); SEND_OUT(opponentRight, 3); } + TURN { MOVE(playerLeft, MOVE_CELEBRATE);} + } SCENE { + HP_BAR(playerLeft, hp: 0); + ANIMATION(ANIM_TYPE_MOVE, MOVE_EXPLOSION, playerLeft); + // Everyone faints. + + MESSAGE("Go! Ekans!"); + MESSAGE("2 sent out Arbok!"); + MESSAGE("Go! Abra!"); + MESSAGE("2 sent out Wynaut!"); + + ABILITY_POPUP(playerLeft, ABILITY_INTIMIDATE); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentLeft); + MESSAGE("Ekans's Intimidate cuts Foe Arbok's attack!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentRight); + MESSAGE("Ekans's Intimidate cuts Foe Wynaut's attack!"); + + ABILITY_POPUP(opponentLeft, ABILITY_INTIMIDATE); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); + MESSAGE("Foe Arbok's Intimidate cuts Ekans's attack!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerRight); + MESSAGE("Foe Arbok's Intimidate cuts Abra's attack!"); + } +} + +SINGLE_BATTLE_TEST("Intimidate and Eject Button force the opponent to Attack") +{ + GIVEN { + ASSUME(gItems[ITEM_EJECT_BUTTON].holdEffect == HOLD_EFFECT_EJECT_BUTTON); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_BUTTON); }; + OPPONENT(SPECIES_HITMONTOP) { Moves(MOVE_TACKLE); }; + } WHEN { + TURN { + MOVE(player, MOVE_QUICK_ATTACK); + MOVE(opponent, MOVE_TACKLE); + SEND_OUT(opponent, 1); + } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_QUICK_ATTACK, player); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + MESSAGE("Foe Wobbuffet is switched out with the Eject Button!"); + MESSAGE("2 sent out Hitmontop!"); + ABILITY_POPUP(opponent, ABILITY_INTIMIDATE); + MESSAGE("Foe Hitmontop's Intimidate cuts Wobbuffet's attack!"); + NONE_OF { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + MESSAGE("Foe Hitmontop used Tackle!"); + } + } +} + +DOUBLE_BATTLE_TEST("Intimidate activates on an empty slot") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + PLAYER(SPECIES_CROAGUNK); + PLAYER(SPECIES_WYNAUT); + PLAYER(SPECIES_HITMONTOP) { Ability(ABILITY_INTIMIDATE); }; + OPPONENT(SPECIES_RALTS); + OPPONENT(SPECIES_AZURILL); + } WHEN { + TURN { + SWITCH(playerLeft, 2); + MOVE(playerRight, MOVE_GUNK_SHOT, target: opponentLeft); + MOVE(opponentRight, MOVE_SPLASH); + } + TURN { + SWITCH(playerLeft, 3); + MOVE(playerRight, MOVE_SPLASH); + } + + + } SCENE { + MESSAGE("Wobbuffet, that's enough! Come back!"); + MESSAGE("Go! Wynaut!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_GUNK_SHOT, playerRight); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, opponentRight); + MESSAGE("Wynaut, that's enough! Come back!"); + MESSAGE("Go! Hitmontop!"); + ABILITY_POPUP(playerLeft, ABILITY_INTIMIDATE); + NONE_OF { + MESSAGE("Hitmontop's Intimidate cuts Foe Ralts's attack!"); + } + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentRight); + MESSAGE("Hitmontop's Intimidate cuts Foe Azurill's attack!"); + } +} diff --git a/test/ability_magic_bounce.c b/test/ability_magic_bounce.c new file mode 100644 index 0000000000..848f632ab5 --- /dev/null +++ b/test/ability_magic_bounce.c @@ -0,0 +1,84 @@ +#include "global.h" +#include "test_battle.h" + + +SINGLE_BATTLE_TEST("Magic Bounce bounces back status moves") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_TOXIC].effect == EFFECT_TOXIC); + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_ESPEON) { Ability(ABILITY_MAGIC_BOUNCE);}; + } WHEN { + TURN { MOVE(player, MOVE_TOXIC); } + } SCENE { + ABILITY_POPUP(opponent, ABILITY_MAGIC_BOUNCE); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_TOXIC, player); + MESSAGE("Wynaut's Toxic was bounced back by Foe Espeon's Magic Bounce!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TOXIC, opponent); + STATUS_ICON(player, badPoison: TRUE); + } +} + +SINGLE_BATTLE_TEST("Magic Bounce bounces back powder moves") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_STUN_SPORE].flags & FLAG_POWDER); + ASSUME(gBattleMoves[MOVE_STUN_SPORE].effect == EFFECT_PARALYZE); + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_ESPEON) { Ability(ABILITY_MAGIC_BOUNCE);}; + } WHEN { + TURN { MOVE(player, MOVE_STUN_SPORE); } + } SCENE { + ABILITY_POPUP(opponent, ABILITY_MAGIC_BOUNCE); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_TOXIC, player); + MESSAGE("Wynaut's Stun Spore was bounced back by Foe Espeon's Magic Bounce!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_STUN_SPORE, opponent); + STATUS_ICON(player, paralysis: TRUE); + } +} + +SINGLE_BATTLE_TEST("Magic Bounce cannot bounce back powder moves against Grass Types") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_STUN_SPORE].flags & FLAG_POWDER); + ASSUME(gSpeciesInfo[SPECIES_ODDISH].types[0] == TYPE_GRASS); + PLAYER(SPECIES_ODDISH); + OPPONENT(SPECIES_ESPEON) { Ability(ABILITY_MAGIC_BOUNCE);}; + } WHEN { + TURN { MOVE(player, MOVE_STUN_SPORE); } + } SCENE { + ABILITY_POPUP(opponent, ABILITY_MAGIC_BOUNCE); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_STUN_SPORE, player); + MESSAGE("Oddish's Stun Spore was bounced back by Foe Espeon's Magic Bounce!"); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_STUN_SPORE, opponent); + MESSAGE("It doesn't affect Oddish…"); + NOT STATUS_ICON(player, paralysis: TRUE); + } +} + + +DOUBLE_BATTLE_TEST("Magic Bounce bounces back moves hitting both foes at two foes") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_LEER].effect == EFFECT_DEFENSE_DOWN); + ASSUME(gBattleMoves[MOVE_LEER].target == MOVE_TARGET_BOTH); + PLAYER(SPECIES_ABRA); + PLAYER(SPECIES_KADABRA); + OPPONENT(SPECIES_ESPEON) { Ability(ABILITY_MAGIC_BOUNCE);}; + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(playerLeft, MOVE_LEER); } + } SCENE { + ABILITY_POPUP(opponentLeft, ABILITY_MAGIC_BOUNCE); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_LEER, playerLeft); + MESSAGE("Abra's Leer was bounced back by Foe Espeon's Magic Bounce!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_LEER, opponentLeft); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); + MESSAGE("Abra's Defense fell!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerRight); + MESSAGE("Kadabra's Defense fell!"); + // Also check if second original target gets hit by Leer as this was once bugged + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentRight); + MESSAGE("Foe Wynaut's Defense fell!"); + } +} diff --git a/test/ability_oblivious.c b/test/ability_oblivious.c index 0708845ed1..efe2901eca 100644 --- a/test/ability_oblivious.c +++ b/test/ability_oblivious.c @@ -63,6 +63,6 @@ SINGLE_BATTLE_TEST("Oblivious prevents Intimidate") ABILITY_POPUP(opponent, ABILITY_INTIMIDATE); ABILITY_POPUP(player, ABILITY_OBLIVIOUS); NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); } - MESSAGE("Slowpoke's attack was not lowered!"); + MESSAGE("Slowpoke's Attack was not lowered!"); } } diff --git a/test/ability_overgrow.c b/test/ability_overgrow.c new file mode 100644 index 0000000000..82d8dd467e --- /dev/null +++ b/test/ability_overgrow.c @@ -0,0 +1,20 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Overgrow boosts Grass-type moves in a pinch", s16 damage) +{ + u16 hp; + PARAMETRIZE { hp = 99; } + PARAMETRIZE { hp = 33; } + GIVEN { + ASSUME(gBattleMoves[MOVE_VINE_WHIP].type == TYPE_GRASS); + PLAYER(SPECIES_BULBASAUR) { Ability(ABILITY_OVERGROW); MaxHP(99); HP(hp); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_VINE_WHIP); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + } +} diff --git a/test/ability_pastel_veil.c b/test/ability_pastel_veil.c index 5d7a8f0203..ddc0806198 100644 --- a/test/ability_pastel_veil.c +++ b/test/ability_pastel_veil.c @@ -35,7 +35,7 @@ SINGLE_BATTLE_TEST("Pastel Veil immediately cures Mold Breaker poison") { GIVEN { ASSUME(gBattleMoves[MOVE_TOXIC].effect == EFFECT_TOXIC); - PLAYER(SPECIES_DRILBUR) { Ability(ABILITY_MOLD_BREAKER); } + PLAYER(SPECIES_PINSIR) { Ability(ABILITY_MOLD_BREAKER); } OPPONENT(SPECIES_PONYTA_GALARIAN) { Ability(ABILITY_PASTEL_VEIL); } } WHEN { TURN { MOVE(player, MOVE_TOXIC); } @@ -52,7 +52,7 @@ DOUBLE_BATTLE_TEST("Pastel Veil does not cure Mold Breaker poison on partner") { GIVEN { ASSUME(gBattleMoves[MOVE_TOXIC].effect == EFFECT_TOXIC); - PLAYER(SPECIES_DRILBUR) { Ability(ABILITY_MOLD_BREAKER); } + PLAYER(SPECIES_PINSIR) { Ability(ABILITY_MOLD_BREAKER); } PLAYER(SPECIES_WYNAUT); OPPONENT(SPECIES_PONYTA_GALARIAN) { Ability(ABILITY_PASTEL_VEIL); } OPPONENT(SPECIES_WYNAUT); diff --git a/test/ability_sand_veil.c b/test/ability_sand_veil.c index 5d2325140d..5514f27c0e 100644 --- a/test/ability_sand_veil.c +++ b/test/ability_sand_veil.c @@ -16,7 +16,7 @@ SINGLE_BATTLE_TEST("Sand Veil prevents damage from sandstorm") SINGLE_BATTLE_TEST("Sand Veil reduces accuracy during sandstorm") { - PASSES_RANDOMLY(4,5); + PASSES_RANDOMLY(4, 5, RNG_ACCURACY); GIVEN { ASSUME(gBattleMoves[MOVE_POUND].accuracy == 100); PLAYER(SPECIES_SANDSHREW) { Ability(ABILITY_SAND_VEIL); }; diff --git a/test/ability_speed_boost.c b/test/ability_speed_boost.c index b3e128931a..39219a5cc7 100644 --- a/test/ability_speed_boost.c +++ b/test/ability_speed_boost.c @@ -1,7 +1,7 @@ #include "global.h" #include "test_battle.h" -SINGLE_BATTLE_TEST("Speed Boost gradually boosts speed") +SINGLE_BATTLE_TEST("Speed Boost gradually boosts Speed") { GIVEN { PLAYER(SPECIES_TORCHIC) { Ability(ABILITY_SPEED_BOOST); Speed(99); }; diff --git a/test/ability_stench.c b/test/ability_stench.c index 7285ee768c..fb76ebc07e 100644 --- a/test/ability_stench.c +++ b/test/ability_stench.c @@ -3,10 +3,10 @@ SINGLE_BATTLE_TEST("Stench has a 10% chance to flinch") { - PASSES_RANDOMLY(1,10); + PASSES_RANDOMLY(1, 10, RNG_STENCH); GIVEN { ASSUME(gBattleMoves[MOVE_TACKLE].power > 0); - PLAYER(SPECIES_STUNKY) { Ability(ABILITY_STENCH); }; + PLAYER(SPECIES_GRIMER) { Ability(ABILITY_STENCH); }; OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { MOVE(player, MOVE_TACKLE); MOVE(opponent, MOVE_CELEBRATE); } @@ -17,12 +17,13 @@ SINGLE_BATTLE_TEST("Stench has a 10% chance to flinch") SINGLE_BATTLE_TEST("Stench does not stack with King's Rock") { - PASSES_RANDOMLY(1,10); + KNOWN_FAILING; + PASSES_RANDOMLY(1, 10, RNG_STENCH); GIVEN { ASSUME(gItems[ITEM_KINGS_ROCK].holdEffect == HOLD_EFFECT_FLINCH); ASSUME(gBattleMoves[MOVE_TACKLE].power > 0); - PLAYER(SPECIES_STUNKY) { Ability(ABILITY_STENCH); Item(ITEM_KINGS_ROCK); }; + PLAYER(SPECIES_GRIMER) { Ability(ABILITY_STENCH); Item(ITEM_KINGS_ROCK); }; OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { MOVE(player, MOVE_TACKLE); MOVE(opponent, MOVE_CELEBRATE); } diff --git a/test/ability_swarm.c b/test/ability_swarm.c new file mode 100644 index 0000000000..7709e976ea --- /dev/null +++ b/test/ability_swarm.c @@ -0,0 +1,20 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Swarm boosts Bug-type moves in a pinch", s16 damage) +{ + u16 hp; + PARAMETRIZE { hp = 99; } + PARAMETRIZE { hp = 33; } + GIVEN { + ASSUME(gBattleMoves[MOVE_BUG_BITE].type == TYPE_BUG); + PLAYER(SPECIES_LEDYBA) { Ability(ABILITY_SWARM); MaxHP(99); HP(hp); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_BUG_BITE); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + } +} diff --git a/test/ability_torrent.c b/test/ability_torrent.c new file mode 100644 index 0000000000..e5c701775d --- /dev/null +++ b/test/ability_torrent.c @@ -0,0 +1,20 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Torrent boosts Water-type moves in a pinch", s16 damage) +{ + u16 hp; + PARAMETRIZE { hp = 99; } + PARAMETRIZE { hp = 33; } + GIVEN { + ASSUME(gBattleMoves[MOVE_BUBBLE].type == TYPE_WATER); + PLAYER(SPECIES_SQUIRTLE) { Ability(ABILITY_TORRENT); MaxHP(99); HP(hp); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_BUBBLE); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + } +} diff --git a/test/ability_volt_absorb.c b/test/ability_volt_absorb.c index f485f65574..18902eaa20 100644 --- a/test/ability_volt_absorb.c +++ b/test/ability_volt_absorb.c @@ -63,6 +63,30 @@ SINGLE_BATTLE_TEST("Volt Absorb is only triggered once on multi strike moves") } } +DOUBLE_BATTLE_TEST("Volt Absorb does not stop Electric Typed Explosion from damaging other pokemon", s16 damage1, s16 damage2) // Fixed issue #1961 +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_EXPLOSION].effect == EFFECT_EXPLOSION); + ASSUME(gBattleMoves[MOVE_EXPLOSION].type == TYPE_NORMAL); + PLAYER(SPECIES_JOLTEON) { Ability(ABILITY_VOLT_ABSORB); HP(1); MaxHP(TEST_MAX_HP); } + PLAYER(SPECIES_ABRA); + OPPONENT(SPECIES_GRAVELER_ALOLAN) { Ability(ABILITY_GALVANIZE); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponentLeft, MOVE_EXPLOSION); } + } SCENE { + ABILITY_POPUP(playerLeft, ABILITY_VOLT_ABSORB); + HP_BAR(playerLeft, hp: TEST_MAX_HP / 4 + 1); + MESSAGE("Jolteon restored HP using its Volt Absorb!"); + HP_BAR(playerRight, captureDamage: &results->damage1); + HP_BAR(opponentRight, captureDamage: &results->damage2); + } + FINALLY { + EXPECT_NE(results[0].damage1, 0); + EXPECT_NE(results[0].damage2, 0); + } +} + SINGLE_BATTLE_TEST("Volt Absorb prevents Cell Battery from activating") { GIVEN { @@ -75,11 +99,11 @@ SINGLE_BATTLE_TEST("Volt Absorb prevents Cell Battery from activating") ABILITY_POPUP(player, ABILITY_VOLT_ABSORB); HP_BAR(player, hp: TEST_MAX_HP / 4 + 1); MESSAGE("Jolteon restored HP using its Volt Absorb!"); - NONE_OF { + NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Using Cell Battery, the attack of Jolteon rose!"); + MESSAGE("Using Cell Battery, the Attack of Jolteon rose!"); } - + } } diff --git a/test/ability_water_absorb.c b/test/ability_water_absorb.c index 1748ee7ff5..aaaa149ace 100644 --- a/test/ability_water_absorb.c +++ b/test/ability_water_absorb.c @@ -78,10 +78,10 @@ SINGLE_BATTLE_TEST("Water Absorb prevents Items from activating") ABILITY_POPUP(player, ABILITY_WATER_ABSORB); HP_BAR(player, hp: TEST_MAX_HP / 4 + 1); MESSAGE("Poliwag restored HP using its Water Absorb!"); - NONE_OF { + NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); } - + } } diff --git a/test/hold_effect_eject_button.c b/test/hold_effect_eject_button.c new file mode 100644 index 0000000000..0d28d7bf04 --- /dev/null +++ b/test/hold_effect_eject_button.c @@ -0,0 +1,189 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gItems[ITEM_EJECT_BUTTON].holdEffect == HOLD_EFFECT_EJECT_BUTTON); +} + +SINGLE_BATTLE_TEST("Eject Button is not triggered when there is nothing to switch in") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_BUTTON); }; + OPPONENT(SPECIES_WOBBUFFET) { HP(0); }; + } WHEN { + TURN { + MOVE(player, MOVE_QUICK_ATTACK); + MOVE(opponent, MOVE_TACKLE); + } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_QUICK_ATTACK, player); + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + MESSAGE("Foe Wobbuffet is switched out with the Eject Button!"); + } + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + } +} + +SINGLE_BATTLE_TEST("Eject Button is not activated by a Sheer Force boosted move") +{ + GIVEN { + PLAYER(SPECIES_NIDOKING) { Ability(ABILITY_SHEER_FORCE); }; + OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_BUTTON); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { + MOVE(player, MOVE_FLAMETHROWER); + MOVE(opponent, MOVE_TACKLE); + } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_FLAMETHROWER, player); + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + MESSAGE("Foe Wobbuffet is switched out with the Eject Button!"); + } + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + } +} + +SINGLE_BATTLE_TEST("Eject Button will not activate under Substitute") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_RAICHU) { Item(ITEM_EJECT_BUTTON); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { + MOVE(opponent, MOVE_SUBSTITUTE); + MOVE(player, MOVE_TACKLE); + } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SUBSTITUTE, opponent); + MESSAGE("Foe Raichu made a SUBSTITUTE!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); + MESSAGE("The SUBSTITUTE took damage for Foe Raichu!"); + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + MESSAGE("Foe Raichu is switched out with the Eject Button!"); + } + } +} + +SINGLE_BATTLE_TEST("Eject Button is not blocked by trapping abilities or moves") +{ + GIVEN { + PLAYER(SPECIES_DUGTRIO) { Ability(ABILITY_ARENA_TRAP); }; + OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_BUTTON); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { + MOVE(player, MOVE_TACKLE); + SEND_OUT(opponent, 1); + } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + MESSAGE("Foe Wobbuffet is switched out with the Eject Button!"); + MESSAGE("2 sent out Wobbuffet!"); + } +} + +SINGLE_BATTLE_TEST("Eject Button is not triggered after the mon loses Eject Button") +{ + GIVEN { + PLAYER(SPECIES_RAICHU); + OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_BUTTON); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { + MOVE(player, MOVE_KNOCK_OFF); + MOVE(opponent, MOVE_TACKLE); + } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_KNOCK_OFF, player); + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + MESSAGE("Foe Wobbuffet is switched out with the Eject Button!"); + } + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + } +} + +SINGLE_BATTLE_TEST("Eject Button is not triggered after given to player by Picketpocket") +{ + GIVEN { + PLAYER(SPECIES_REGIELEKI) { Item(ITEM_EJECT_BUTTON); }; + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_SNEASEL) { Ability(ABILITY_PICKPOCKET); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { + MOVE(player, MOVE_TACKLE); + MOVE(opponent, MOVE_TACKLE); + } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); + ABILITY_POPUP(opponent, ABILITY_PICKPOCKET); + MESSAGE("Foe Sneasel stole Regieleki's Eject Button!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + } +} + +SINGLE_BATTLE_TEST("Eject Button has no chance to activate after Dragon Tail") +{ + GIVEN { + PLAYER(SPECIES_KOMMO_O); + OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_BUTTON); }; + OPPONENT(SPECIES_CHANSEY); + } WHEN { + TURN { + MOVE(player, MOVE_DRAGON_TAIL); + MOVE(opponent, MOVE_TACKLE); + } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DRAGON_TAIL, player); + MESSAGE("Foe Chansey was dragged out!"); + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + MESSAGE("Foe Chansey is switched out with the Eject Button!"); + } + } +} + +SINGLE_BATTLE_TEST("Eject Button prevents Volt Switch / U-Turn from activating") +{ + GIVEN { + PLAYER(SPECIES_MANECTRIC); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_BUTTON); }; + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { + MOVE(player, MOVE_VOLT_SWITCH); + SEND_OUT(opponent, 1); + } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_VOLT_SWITCH, player); + MESSAGE("Foe Wobbuffet is switched out with the Eject Button!"); + } +} + +SINGLE_BATTLE_TEST("Eject Button is activated before Emergency Exit") +{ + GIVEN { + PLAYER(SPECIES_LATIAS); + OPPONENT(SPECIES_GOLISOPOD) { Ability(ABILITY_EMERGENCY_EXIT); Item(ITEM_EJECT_BUTTON); }; + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { + MOVE(player, MOVE_THUNDERBOLT); + SEND_OUT(opponent, 1); + } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_THUNDERBOLT, player); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent); + MESSAGE("Foe Golisopod is switched out with the Eject Button!"); + } +} diff --git a/test/hold_effect_red_card.c b/test/hold_effect_red_card.c new file mode 100644 index 0000000000..0a8bb3460c --- /dev/null +++ b/test/hold_effect_red_card.c @@ -0,0 +1,380 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gItems[ITEM_RED_CARD].holdEffect == HOLD_EFFECT_RED_CARD); +} + +SINGLE_BATTLE_TEST("Red Card switches the attacker with a random non-fainted replacement") +{ + PASSES_RANDOMLY(1, 2, RNG_FORCE_RANDOM_SWITCH); + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_RED_CARD); } + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_BULBASAUR); + OPPONENT(SPECIES_CHARMANDER); + OPPONENT(SPECIES_SQUIRTLE) { HP(0); } + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Wobbuffet!"); + MESSAGE("Foe Bulbasaur was dragged out!"); + } +} + +DOUBLE_BATTLE_TEST("Red Card switches the target with a random non-battler, non-fainted replacement") +{ + PASSES_RANDOMLY(1, 2, RNG_FORCE_RANDOM_SWITCH); + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_RED_CARD); } + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + OPPONENT(SPECIES_BULBASAUR); + OPPONENT(SPECIES_CHARMANDER); + OPPONENT(SPECIES_SQUIRTLE) { HP(0); } + } WHEN { + TURN { MOVE(opponentLeft, MOVE_TACKLE, target: playerLeft); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponentLeft); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, playerLeft); + MESSAGE("Wobbuffet held up its Red Card against Foe Wobbuffet!"); + MESSAGE("Foe Bulbasaur was dragged out!"); + } +} + +SINGLE_BATTLE_TEST("Red Card does not activate if holder faints") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { HP(1); Item(ITEM_RED_CARD); } + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); SEND_OUT(player, 1); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Wobbuffet!"); + } + } +} + +SINGLE_BATTLE_TEST("Red Card does not activate if target is behind a Substitute") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_RED_CARD); } + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(player, MOVE_SUBSTITUTE); MOVE(opponent, MOVE_TACKLE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Wobbuffet!"); + } + } +} + +SINGLE_BATTLE_TEST("Red Card activates after the last hit of a multi-hit move") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_RED_CARD); } + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponent, MOVE_DOUBLE_KICK); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DOUBLE_KICK, opponent); + HP_BAR(player); + HP_BAR(player); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Wobbuffet!"); + } +} + +SINGLE_BATTLE_TEST("Red Card does not activate if no replacements") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_RED_CARD); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Wobbuffet!"); + } + } +} + +SINGLE_BATTLE_TEST("Red Card does not activate if replacements fainted") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_RED_CARD); } + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT) { HP(0); } + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Wobbuffet!"); + } + } +} + +SINGLE_BATTLE_TEST("Red Card does not activate if knocked off") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_RED_CARD); } + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponent, MOVE_KNOCK_OFF); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_KNOCK_OFF, opponent); + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Wobbuffet!"); + } + } +} + +SINGLE_BATTLE_TEST("Red Card does not activate if stolen by a move") +{ + u32 item; + bool32 activate; + PARAMETRIZE { item = ITEM_NONE; activate = FALSE; } + PARAMETRIZE { item = ITEM_POTION; activate = TRUE; } + ASSUME(gBattleMoves[MOVE_THIEF].effect == EFFECT_THIEF); + + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_RED_CARD); } + OPPONENT(SPECIES_WOBBUFFET) { Item(item); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponent, MOVE_THIEF); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_THIEF, opponent); + if (activate) { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Wobbuffet!"); + } else { + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Wobbuffet!"); + } + } + } +} + +SINGLE_BATTLE_TEST("Red Card does not activate if stolen by Magician") +{ + u32 item; + bool32 activate; + PARAMETRIZE { item = ITEM_NONE; activate = FALSE; } + PARAMETRIZE { item = ITEM_POTION; activate = TRUE; } + + GIVEN { + ASSUME(P_GEN_6_POKEMON == TRUE); + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_RED_CARD); } + OPPONENT(SPECIES_FENNEKIN) { Ability(ABILITY_MAGICIAN); Item(item); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + if (activate) { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Fennekin!"); + } else { + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Fennekin!"); + } + } + } +} + +DOUBLE_BATTLE_TEST("Red Card activates for only the fastest target") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Speed(3); Item(ITEM_RED_CARD); } + PLAYER(SPECIES_WYNAUT) { Speed(2); Item(ITEM_RED_CARD); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(5); } + OPPONENT(SPECIES_WYNAUT) { Speed(4); } + OPPONENT(SPECIES_UNOWN) { Speed(1); } + } WHEN { + TURN { + MOVE(opponentLeft, MOVE_ROCK_SLIDE); + MOVE(opponentRight, MOVE_TACKLE, target: playerRight); + } + } SCENE { + // Fastest target's Red Card activates. + ANIMATION(ANIM_TYPE_MOVE, MOVE_ROCK_SLIDE, opponentLeft); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, playerLeft); + MESSAGE("Wobbuffet held up its Red Card against Foe Wobbuffet!"); + MESSAGE("Foe Unown was dragged out!"); + + // Slower target's Red Card still able to activate on other battler. + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponentRight); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, playerRight); + MESSAGE("Wynaut held up its Red Card against Foe Wynaut!"); + MESSAGE("Foe Wobbuffet was dragged out!"); + } +} + +DOUBLE_BATTLE_TEST("Red Card activates but fails if the attacker is rooted") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_RED_CARD); } + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + OPPONENT(SPECIES_UNOWN); + } WHEN { + TURN { MOVE(opponentLeft, MOVE_INGRAIN); } + TURN { + MOVE(opponentLeft, MOVE_TACKLE, target: playerLeft); + MOVE(opponentRight, MOVE_TACKLE, target: playerLeft); + } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponentLeft); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, playerLeft); + MESSAGE("Wobbuffet held up its Red Card against Foe Wobbuffet!"); + MESSAGE("Foe Wobbuffet anchored itself with its roots!"); + + // Red Card already consumed so cannot activate. + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponentRight); + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, playerRight); + MESSAGE("Wynaut held up its Red Card against Foe Wynaut!"); + } + } +} + +DOUBLE_BATTLE_TEST("Red Card activates but fails if the attacker has Suction Cups") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_RED_CARD); } + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_OCTILLERY) { Ability(ABILITY_SUCTION_CUPS); } + OPPONENT(SPECIES_WYNAUT); + OPPONENT(SPECIES_UNOWN); + } WHEN { + TURN { + MOVE(opponentLeft, MOVE_TACKLE, target: playerLeft); + MOVE(opponentRight, MOVE_TACKLE, target: playerLeft); + } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponentLeft); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, playerLeft); + MESSAGE("Wobbuffet held up its Red Card against Foe Octillery!"); + MESSAGE("Foe Octillery anchors itself with Suction Cups!"); + + // Red Card already consumed so cannot activate. + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponentRight); + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, playerRight); + MESSAGE("Wynaut held up its Red Card against Foe Wynaut!"); + } + } +} + +SINGLE_BATTLE_TEST("Red Card does not activate if switched by Dragon Tail") +{ + bool32 hasWynaut, activate; + PARAMETRIZE { hasWynaut = TRUE; activate = FALSE; } + PARAMETRIZE { hasWynaut = FALSE; activate = TRUE; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_RED_CARD); } + if (hasWynaut) PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponent, MOVE_DRAGON_TAIL); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DRAGON_TAIL, opponent); + if (activate) { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Wobbuffet!"); + } else { + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Wobbuffet!"); + } + } + } +} + +SINGLE_BATTLE_TEST("Red Card activates and overrides U-turn") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_RED_CARD); } + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponent, MOVE_U_TURN); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_U_TURN, opponent); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Wobbuffet!"); + } +} + +SINGLE_BATTLE_TEST("Red Card does not activate if attacker's Sheer Force applied") +{ + u32 move; + bool32 activate; + PARAMETRIZE { move = MOVE_TACKLE; activate = TRUE; } + PARAMETRIZE { move = MOVE_STOMP; activate = FALSE; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_RED_CARD); } + OPPONENT(SPECIES_TAUROS) { Ability(ABILITY_SHEER_FORCE); } + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponent, move); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, move, opponent); + if (activate) { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Tauros!"); + } else { + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Wobbuffet held up its Red Card against Foe Tauros!"); + } + } + } +} + +SINGLE_BATTLE_TEST("Red Card activates before Emergency Exit") +{ + GIVEN { + ASSUME(P_GEN_7_POKEMON == TRUE); + PLAYER(SPECIES_GOLISOPOD) { MaxHP(100); HP(51); Item(ITEM_RED_CARD); } + PLAYER(SPECIES_WIMPOD); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); SEND_OUT(player, 1); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player); + MESSAGE("Golisopod held up its Red Card against Foe Wobbuffet!"); + ABILITY_POPUP(player, ABILITY_EMERGENCY_EXIT); + MESSAGE("Go! Wimpod!"); + } +} + +// SINGLE_BATTLE_TEST("Red Card activates but fails if the attacker has Dynamaxed") diff --git a/test/item_effect_increase_stat.c b/test/item_effect_increase_stat.c new file mode 100644 index 0000000000..b459e3ac88 --- /dev/null +++ b/test/item_effect_increase_stat.c @@ -0,0 +1,25 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("X-Attack sharply raises battler's Attack stat", s16 damage) +{ + u16 useItem; + PARAMETRIZE { useItem = FALSE; } + PARAMETRIZE { useItem = TRUE; } + GIVEN { + ASSUME(gItems[ITEM_X_ATTACK].battleUsage == EFFECT_ITEM_INCREASE_STAT); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (useItem) TURN { USE_ITEM(player, ITEM_X_ATTACK); } + TURN { MOVE(player, MOVE_TACKLE); } + } SCENE { + MESSAGE("Wobbuffet used Tackle!"); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + if (B_X_ITEMS_BUFF >= GEN_7) + EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[1].damage); + else + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + } +} diff --git a/test/item_effect_restore_hp.c b/test/item_effect_restore_hp.c new file mode 100644 index 0000000000..971ec2400b --- /dev/null +++ b/test/item_effect_restore_hp.c @@ -0,0 +1,37 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Potion restores a battler's HP by 20") +{ + s16 damage; + GIVEN { + ASSUME(gItems[ITEM_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP); + PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(100); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_POTION, partyIndex: 0); } + } SCENE { + HP_BAR(player, captureDamage: &damage); + } FINALLY { + EXPECT_EQ(damage, -20); + } +} + +SINGLE_BATTLE_TEST("Sitrus Berry restores a battler's HP") +{ + s16 damage; + GIVEN { + ASSUME(gItems[ITEM_SITRUS_BERRY].battleUsage == EFFECT_ITEM_RESTORE_HP); + PLAYER(SPECIES_WOBBUFFET) { HP(50); MaxHP(100); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_SITRUS_BERRY, partyIndex: 0); } + } SCENE { + HP_BAR(player, captureDamage: &damage); + } FINALLY { + if (I_SITRUS_BERRY_HEAL >= GEN_4) + EXPECT_EQ(damage, -25); + else + EXPECT_EQ(damage, -30); + } +} diff --git a/test/item_effect_restore_pp.c b/test/item_effect_restore_pp.c new file mode 100644 index 0000000000..234d4ae4e5 --- /dev/null +++ b/test/item_effect_restore_pp.c @@ -0,0 +1,19 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Ether restores the PP of one of a battler's moves") +{ + GIVEN { + ASSUME(gItems[ITEM_ETHER].battleUsage == EFFECT_ITEM_RESTORE_PP); + ASSUME(gItems[ITEM_ETHER].type == ITEM_USE_PARTY_MENU_MOVES); + PLAYER(SPECIES_WOBBUFFET) { Moves(MOVE_TACKLE, MOVE_CONFUSION); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_TACKLE); } + TURN { MOVE(player, MOVE_CONFUSION); } + TURN { USE_ITEM(player, ITEM_ETHER, partyIndex: 0, move: MOVE_TACKLE); } + } FINALLY { + EXPECT_EQ(player->pp[0], 35); + EXPECT_EQ(player->pp[1], 24); + } +} diff --git a/test/mega_evolution.c b/test/mega_evolution.c index 13e9cd5b22..7080e85a3c 100644 --- a/test/mega_evolution.c +++ b/test/mega_evolution.c @@ -37,15 +37,15 @@ SINGLE_BATTLE_TEST("Mega Evolution affects turn order") { GIVEN { ASSUME(B_MEGA_EVO_TURN_ORDER); - PLAYER(SPECIES_DIANCIE) { Item(ITEM_DIANCITE); Speed(105); } + PLAYER(SPECIES_GARDEVOIR) { Item(ITEM_GARDEVOIRITE); Speed(105); } OPPONENT(SPECIES_WOBBUFFET) { Speed(106); } } WHEN { TURN { MOVE(player, MOVE_CELEBRATE, megaEvolve: TRUE); } } SCENE { - MESSAGE("Diancie used Celebrate!"); + MESSAGE("Gardevoir used Celebrate!"); MESSAGE("Foe Wobbuffet used Celebrate!"); } THEN { - ASSUME(player->speed == 225); + ASSUME(player->speed == 205); } } diff --git a/test/move.c b/test/move.c index d7e759f27a..9e23c2bd00 100644 --- a/test/move.c +++ b/test/move.c @@ -10,7 +10,7 @@ SINGLE_BATTLE_TEST("Accuracy controls the proportion of misses") PARAMETRIZE { move = MOVE_RAZOR_LEAF; } PARAMETRIZE { move = MOVE_SCRATCH; } ASSUME(0 < gBattleMoves[move].accuracy && gBattleMoves[move].accuracy <= 100); - PASSES_RANDOMLY(gBattleMoves[move].accuracy, 100); + PASSES_RANDOMLY(gBattleMoves[move].accuracy, 100, RNG_ACCURACY); GIVEN { PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); @@ -27,10 +27,9 @@ SINGLE_BATTLE_TEST("Secondary Effect Chance controls the proportion of secondary PARAMETRIZE { move = MOVE_THUNDER_SHOCK; } PARAMETRIZE { move = MOVE_DISCHARGE; } PARAMETRIZE { move = MOVE_NUZZLE; } - ASSUME(gBattleMoves[move].accuracy == 100); ASSUME(gBattleMoves[move].effect == EFFECT_PARALYZE_HIT); ASSUME(0 < gBattleMoves[move].secondaryEffectChance && gBattleMoves[move].secondaryEffectChance <= 100); - PASSES_RANDOMLY(gBattleMoves[move].secondaryEffectChance, 100); + PASSES_RANDOMLY(gBattleMoves[move].secondaryEffectChance, 100, RNG_SECONDARY_EFFECT); GIVEN { PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); @@ -55,7 +54,7 @@ SINGLE_BATTLE_TEST("Turn order is determined by priority") } } -SINGLE_BATTLE_TEST("Turn order is determined by speed if priority ties") +SINGLE_BATTLE_TEST("Turn order is determined by Speed if priority ties") { GIVEN { PLAYER(SPECIES_WOBBUFFET) { Speed(2); } @@ -68,8 +67,9 @@ SINGLE_BATTLE_TEST("Turn order is determined by speed if priority ties") } } -SINGLE_BATTLE_TEST("Turn order is determined randomly if priority and speed tie") +SINGLE_BATTLE_TEST("Turn order is determined randomly if priority and Speed tie") { + KNOWN_FAILING; // The algorithm is significantly biased. PASSES_RANDOMLY(1, 2); GIVEN { PLAYER(SPECIES_WOBBUFFET) { Speed(1); } @@ -85,15 +85,29 @@ SINGLE_BATTLE_TEST("Turn order is determined randomly if priority and speed tie" SINGLE_BATTLE_TEST("Critical hits occur at a 1/24 rate") { ASSUME(B_CRIT_CHANCE >= GEN_7); - ASSUME(gBattleMoves[MOVE_SCRATCH].accuracy == 100); - PASSES_RANDOMLY(100 / 24, 100); + PASSES_RANDOMLY(1, 24, RNG_CRITICAL_HIT); GIVEN { PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { MOVE(player, MOVE_SCRATCH); } } SCENE { - MESSAGE("It's a critical hit!"); + MESSAGE("A critical hit!"); + } +} + +SINGLE_BATTLE_TEST("Slash's critical hits occur at a 1/8 rate") +{ + ASSUME(B_CRIT_CHANCE >= GEN_7); + ASSUME(gBattleMoves[MOVE_SLASH].flags & FLAG_HIGH_CRIT); + PASSES_RANDOMLY(1, 8, RNG_CRITICAL_HIT); + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_SLASH); } + } SCENE { + MESSAGE("A critical hit!"); } } diff --git a/test/move_effect_accuracy_down.c b/test/move_effect_accuracy_down.c index 2a90d8ea25..a6a79d8db6 100644 --- a/test/move_effect_accuracy_down.c +++ b/test/move_effect_accuracy_down.c @@ -9,7 +9,7 @@ ASSUMPTIONS SINGLE_BATTLE_TEST("Sand Attack lowers Accuracy") { ASSUME(gBattleMoves[MOVE_SCRATCH].accuracy == 100); - PASSES_RANDOMLY(gBattleMoves[MOVE_SCRATCH].accuracy * 3 / 4, 100); + PASSES_RANDOMLY(gBattleMoves[MOVE_SCRATCH].accuracy * 3 / 4, 100, RNG_ACCURACY); GIVEN { PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); diff --git a/test/move_effect_after_you.c b/test/move_effect_after_you.c index 400fc053f7..a488d7a8c5 100644 --- a/test/move_effect_after_you.c +++ b/test/move_effect_after_you.c @@ -8,7 +8,6 @@ ASSUMPTIONS DOUBLE_BATTLE_TEST("After You makes the target move after user") { - if (B_RECALC_TURN_AFTER_ACTIONS >= GEN_8) KNOWN_FAILING; // #2615. GIVEN { PLAYER(SPECIES_WOBBUFFET) { Speed(4); } PLAYER(SPECIES_WYNAUT) { Speed(1); } diff --git a/test/move_effect_assist.c b/test/move_effect_assist.c new file mode 100644 index 0000000000..e95d84654f --- /dev/null +++ b/test/move_effect_assist.c @@ -0,0 +1,22 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_ASSIST].effect == EFFECT_ASSIST); +} + +SINGLE_BATTLE_TEST("Assist fails if there are no valid moves to choose from") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) {Moves(MOVE_ASSIST, MOVE_CELEBRATE, MOVE_METRONOME, MOVE_ME_FIRST); } + PLAYER(SPECIES_WOBBUFFET) {Moves(MOVE_ASSIST, MOVE_ENDURE, MOVE_DRAGON_TAIL, MOVE_SPOTLIGHT); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_ASSIST); } + } SCENE { + MESSAGE("Wobbuffet used Assist!"); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_ASSIST, player); + MESSAGE("But it failed!"); + } +} diff --git a/test/move_effect_attack_down.c b/test/move_effect_attack_down.c index 6333bbea1f..0df14f701a 100644 --- a/test/move_effect_attack_down.c +++ b/test/move_effect_attack_down.c @@ -22,7 +22,7 @@ SINGLE_BATTLE_TEST("Growl lowers Attack", s16 damage) if (lowerAttack) { ANIMATION(ANIM_TYPE_MOVE, MOVE_GROWL, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Wobbuffet's attack fell!"); + MESSAGE("Foe Wobbuffet's Attack fell!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); HP_BAR(player, captureDamage: &results[i].damage); diff --git a/test/move_effect_attack_up.c b/test/move_effect_attack_up.c index 7b57fa0d26..4978d03f96 100644 --- a/test/move_effect_attack_up.c +++ b/test/move_effect_attack_up.c @@ -22,7 +22,7 @@ SINGLE_BATTLE_TEST("Meditate raises Attack", s16 damage) if (raiseAttack) { ANIMATION(ANIM_TYPE_MOVE, MOVE_MEDITATE, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Wobbuffet's attack rose!"); + MESSAGE("Wobbuffet's Attack rose!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); HP_BAR(opponent, captureDamage: &results[i].damage); diff --git a/test/move_effect_attack_up_user_ally.c b/test/move_effect_attack_up_user_ally.c new file mode 100644 index 0000000000..e920752dec --- /dev/null +++ b/test/move_effect_attack_up_user_ally.c @@ -0,0 +1,65 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_HOWL].effect == EFFECT_ATTACK_UP_USER_ALLY); +} + +SINGLE_BATTLE_TEST("Howl raises user's Attack", s16 damage) +{ + bool32 raiseAttack; + PARAMETRIZE { raiseAttack = FALSE; } + PARAMETRIZE { raiseAttack = TRUE; } + GIVEN { + ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (raiseAttack) TURN { MOVE(player, MOVE_HOWL); } + TURN { MOVE(player, MOVE_TACKLE); } + } SCENE { + if (raiseAttack) { + ANIMATION(ANIM_TYPE_MOVE, MOVE_HOWL, player); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Wobbuffet's Attack rose!"); + } + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + } +} + +DOUBLE_BATTLE_TEST("Howl raises user's and partner's Attack", s16 damageLeft, s16 damageRight) +{ + bool32 raiseAttack; + PARAMETRIZE { raiseAttack = FALSE; } + PARAMETRIZE { raiseAttack = TRUE; } + GIVEN { + ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); + PLAYER(SPECIES_WOBBUFFET) { Speed(15); }; + PLAYER(SPECIES_WYNAUT) { Speed(10); }; + OPPONENT(SPECIES_WOBBUFFET) { Speed(13); }; + OPPONENT(SPECIES_WYNAUT) { Speed(12); }; + } WHEN { + if (raiseAttack) TURN { MOVE(playerLeft, MOVE_HOWL); } + TURN { MOVE(playerLeft, MOVE_TACKLE, target: opponentLeft); } + TURN { MOVE(playerRight, MOVE_TACKLE, target: opponentRight); } + } SCENE { + if (raiseAttack) { + ANIMATION(ANIM_TYPE_MOVE, MOVE_HOWL, playerLeft); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); + MESSAGE("Wobbuffet's Attack rose!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerRight); + MESSAGE("Wynaut's Attack rose!"); + } + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, playerLeft); + HP_BAR(opponentLeft, captureDamage: &results[i].damageLeft); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, playerRight); + HP_BAR(opponentRight, captureDamage: &results[i].damageRight); + } FINALLY { + EXPECT_MUL_EQ(results[0].damageLeft, Q_4_12(1.5), results[1].damageLeft); + EXPECT_MUL_EQ(results[0].damageRight, Q_4_12(1.5), results[1].damageRight); + } +} diff --git a/test/move_effect_barb_barrage.c b/test/move_effect_barb_barrage.c new file mode 100644 index 0000000000..9d9c2cc843 --- /dev/null +++ b/test/move_effect_barb_barrage.c @@ -0,0 +1,43 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + //ASSUME(gBattleMoves[MOVE_BARB_BARRAGE].effect == EFFECT_BARB_BARRAGE); +} + +SINGLE_BATTLE_TEST("Barb Barrage inflicts poison") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_BARB_BARRAGE); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_BARB_BARRAGE, player); + HP_BAR(opponent); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_PSN, opponent); + STATUS_ICON(opponent, poison: TRUE); + } +} + +SINGLE_BATTLE_TEST("Barb Barrage's power doubles if the target is poisoned/badly poisoned", s16 damage) +{ + u32 status1; + PARAMETRIZE { status1 = 0; } + PARAMETRIZE { status1 = STATUS1_POISON; } + PARAMETRIZE { status1 = STATUS1_TOXIC_POISON; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET) {Status1(status1);} + } WHEN { + TURN { MOVE(player, MOVE_BARB_BARRAGE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_BARB_BARRAGE, player); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[1].damage); + EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[2].damage); + } +} diff --git a/test/move_effect_defense_down.c b/test/move_effect_defense_down.c index 6e5a45e848..9ecd1c25f2 100644 --- a/test/move_effect_defense_down.c +++ b/test/move_effect_defense_down.c @@ -22,7 +22,7 @@ SINGLE_BATTLE_TEST("Tail Whip lowers Defense", s16 damage) if (lowerDefense) { ANIMATION(ANIM_TYPE_MOVE, MOVE_TAIL_WHIP, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Wobbuffet's defense fell!"); + MESSAGE("Foe Wobbuffet's Defense fell!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); HP_BAR(opponent, captureDamage: &results[i].damage); diff --git a/test/move_effect_defense_up.c b/test/move_effect_defense_up.c index 8db9a7f7e4..492ce7bc93 100644 --- a/test/move_effect_defense_up.c +++ b/test/move_effect_defense_up.c @@ -22,7 +22,7 @@ SINGLE_BATTLE_TEST("Harden raises Defense", s16 damage) if (raiseDefense) { ANIMATION(ANIM_TYPE_MOVE, MOVE_HARDEN, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Wobbuffet's defense rose!"); + MESSAGE("Wobbuffet's Defense rose!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); HP_BAR(player, captureDamage: &results[i].damage); diff --git a/test/move_effect_defog.c b/test/move_effect_defog.c new file mode 100644 index 0000000000..751ddf60f6 --- /dev/null +++ b/test/move_effect_defog.c @@ -0,0 +1,370 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_DEFOG].effect == EFFECT_DEFOG); + ASSUME(gBattleMoves[MOVE_REFLECT].effect == EFFECT_REFLECT); + ASSUME(gBattleMoves[MOVE_LIGHT_SCREEN].effect == EFFECT_LIGHT_SCREEN); + ASSUME(gBattleMoves[MOVE_MIST].effect == EFFECT_MIST); + ASSUME(gBattleMoves[MOVE_SAFEGUARD].effect == EFFECT_SAFEGUARD); + ASSUME(gBattleMoves[MOVE_AURORA_VEIL].effect == EFFECT_AURORA_VEIL); + ASSUME(gBattleMoves[MOVE_STEALTH_ROCK].effect == EFFECT_STEALTH_ROCK); + ASSUME(gBattleMoves[MOVE_SPIKES].effect == EFFECT_SPIKES); + ASSUME(gBattleMoves[MOVE_TOXIC_SPIKES].effect == EFFECT_TOXIC_SPIKES); + ASSUME(gBattleMoves[MOVE_STICKY_WEB].effect == EFFECT_STICKY_WEB); + ASSUME(gBattleMoves[MOVE_TOXIC].effect == EFFECT_TOXIC); + ASSUME(gBattleMoves[MOVE_SCREECH].effect == EFFECT_DEFENSE_DOWN_2); + ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); + ASSUME(gBattleMoves[MOVE_GUST].split == SPLIT_SPECIAL); +} + +SINGLE_BATTLE_TEST("Defog lowers evasiveness by 1") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_DEFOG); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DEFOG, player); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Wobbuffet's evasiveness fell!"); + } +} + +SINGLE_BATTLE_TEST("Defog does not lower evasiveness if target behind Substitute") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) {Speed(4); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(5); } + } WHEN { + TURN { MOVE(opponent, MOVE_SUBSTITUTE); MOVE(player, MOVE_DEFOG); } + } SCENE { + MESSAGE("Foe Wobbuffet used Substitute!"); + MESSAGE("But it failed!"); + NONE_OF { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DEFOG, player); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Wobbuffet's evasiveness fell!"); + } + } +} + +DOUBLE_BATTLE_TEST("Defog lowers evasiveness by 1 and removes Reflect and Light Screen from opponent's side", s16 damagePhysical, s16 damageSpecial) +{ + u16 move; + + PARAMETRIZE { move = MOVE_DEFOG; } + PARAMETRIZE { move = MOVE_CELEBRATE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET) {Speed(4); } + PLAYER(SPECIES_WOBBUFFET) {Speed(3); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(2); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(1); } + } WHEN { + TURN { MOVE(opponentLeft, MOVE_REFLECT); MOVE(opponentRight, MOVE_LIGHT_SCREEN); } + TURN { MOVE(playerLeft, move, target:opponentLeft); } + TURN { MOVE(playerLeft, MOVE_TACKLE, target:opponentLeft); MOVE(playerRight, MOVE_GUST, target:opponentRight); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_REFLECT, opponentLeft); + ANIMATION(ANIM_TYPE_MOVE, MOVE_LIGHT_SCREEN, opponentRight); + ANIMATION(ANIM_TYPE_MOVE, move, playerLeft); + if (move == MOVE_DEFOG) { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentLeft); + MESSAGE("Foe Wobbuffet's evasiveness fell!"); + MESSAGE("Foe's Reflect wore off!"); + MESSAGE("Foe's Light Screen wore off!"); + } + MESSAGE("Wobbuffet used Tackle!"); + HP_BAR(opponentLeft, captureDamage: &results[i].damagePhysical); + MESSAGE("Wobbuffet used Gust!"); + HP_BAR(opponentRight, captureDamage: &results[i].damageSpecial); + } FINALLY { + EXPECT_MUL_EQ(results[1].damagePhysical, Q_4_12(1.5), results[0].damagePhysical); + EXPECT_MUL_EQ(results[1].damageSpecial, Q_4_12(1.5), results[0].damageSpecial); + } +} + +DOUBLE_BATTLE_TEST("Defog lowers evasiveness by 1 and removes Mist and Safeguard from opponent's side") +{ + u16 move; + + PARAMETRIZE { move = MOVE_DEFOG; } + PARAMETRIZE { move = MOVE_CELEBRATE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET) {Speed(4); } + PLAYER(SPECIES_WOBBUFFET) {Speed(3); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(2); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(1); } + } WHEN { + TURN { MOVE(opponentLeft, MOVE_MIST); MOVE(opponentRight, MOVE_SAFEGUARD); } + TURN { MOVE(playerLeft, move, target:opponentLeft); } + TURN { MOVE(playerLeft, MOVE_SCREECH, target:opponentLeft); MOVE(playerRight, MOVE_TOXIC, target:opponentRight); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_MIST, opponentLeft); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SAFEGUARD, opponentRight); + if (move == MOVE_DEFOG) { + MESSAGE("Foe Wobbuffet is protected by MIST!"); + ANIMATION(ANIM_TYPE_MOVE, move, playerLeft); + MESSAGE("Foe's Mist wore off!"); + MESSAGE("Foe's Safeguard wore off!"); + } + MESSAGE("Wobbuffet used Screech!"); + if (move == MOVE_DEFOG) { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SCREECH, playerLeft); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentLeft); + } + else { + MESSAGE("Foe Wobbuffet is protected by MIST!"); + NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentLeft); + } + MESSAGE("Wobbuffet used Toxic!"); + if (move == MOVE_DEFOG) { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TOXIC, playerRight); + STATUS_ICON(opponentRight, badPoison: TRUE); + } + else { + MESSAGE("Foe Wobbuffet's party is protected by SAFEGUARD!"); + NOT STATUS_ICON(opponentRight, badPoison: TRUE); + } + } +} + +DOUBLE_BATTLE_TEST("Defog lowers evasiveness by 1 and removes Stealth Rock and Sticky Web from player's side") +{ + u16 move; + + PARAMETRIZE { move = MOVE_DEFOG; } + PARAMETRIZE { move = MOVE_CELEBRATE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET) {Speed(4); } + PLAYER(SPECIES_WOBBUFFET) {Speed(3); } + PLAYER(SPECIES_WOBBUFFET) {Speed(3); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(2); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(1); } + } WHEN { + TURN { MOVE(opponentLeft, MOVE_STEALTH_ROCK); MOVE(opponentRight, MOVE_STICKY_WEB); } + TURN { MOVE(playerLeft, move, target:opponentLeft); } + TURN { SWITCH(playerLeft, 2); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_STEALTH_ROCK, opponentLeft); + ANIMATION(ANIM_TYPE_MOVE, MOVE_STICKY_WEB, opponentRight); + ANIMATION(ANIM_TYPE_MOVE, move, playerLeft); + if (move == MOVE_DEFOG) { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentLeft); + MESSAGE("Foe Wobbuffet's evasiveness fell!"); + MESSAGE("The pointed stones disappeared from around your team!"); + MESSAGE("The sticky web has disappeared from the ground around your team!"); + } + // Switch happens + MESSAGE("Wobbuffet, that's enough! Come back!"); + MESSAGE("Go! Wobbuffet!"); + if (move != MOVE_DEFOG) { + HP_BAR(playerLeft); + MESSAGE("Pointed stones dug into Wobbuffet!"); + MESSAGE("Wobbuffet was caught in a Sticky Web!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); + MESSAGE("Wobbuffet's Speed fell!"); + } + else { + NONE_OF { + HP_BAR(playerLeft); + MESSAGE("Pointed stones dug into Wobbuffet!"); + MESSAGE("Wobbuffet was caught in a Sticky Web!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); + MESSAGE("Wobbuffet's Speed fell!"); + } + } + } +} + +SINGLE_BATTLE_TEST("Defog lowers evasiveness by 1 and removes Spikes from player's side") +{ + u16 move; + + PARAMETRIZE { move = MOVE_DEFOG; } + PARAMETRIZE { move = MOVE_CELEBRATE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET) {Speed(2); } + PLAYER(SPECIES_WOBBUFFET) {Speed(2); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(5); } + } WHEN { + TURN { MOVE(opponent, MOVE_SPIKES); MOVE(player, move); } + TURN { SWITCH(player, 1); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SPIKES, opponent); + ANIMATION(ANIM_TYPE_MOVE, move, player); + if (move == MOVE_DEFOG) { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Wobbuffet's evasiveness fell!"); + MESSAGE("The spikes disappeared from the ground around your team!"); + } + // Switch happens + MESSAGE("Wobbuffet, that's enough! Come back!"); + MESSAGE("Go! Wobbuffet!"); + if (move != MOVE_DEFOG) { + HP_BAR(player); + MESSAGE("Wobbuffet is hurt by spikes!"); + } + else { + NONE_OF { + HP_BAR(player); + MESSAGE("Wobbuffet is hurt by spikes!"); + } + } + } +} + +SINGLE_BATTLE_TEST("Defog lowers evasiveness by 1 and removes terrain") +{ + u16 move; + + PARAMETRIZE { move = MOVE_PSYCHIC_TERRAIN; } + PARAMETRIZE { move = MOVE_ELECTRIC_TERRAIN; } + PARAMETRIZE { move = MOVE_MISTY_TERRAIN; } + PARAMETRIZE { move = MOVE_GRASSY_TERRAIN; } + GIVEN { + ASSUME(B_DEFOG_CLEARS_TERRAIN >= GEN_8); + PLAYER(SPECIES_WOBBUFFET) {Speed(50); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(5); } + } WHEN { + TURN { MOVE(player, move); MOVE(opponent, MOVE_DEFOG); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, move, player); + ANIMATION(ANIM_TYPE_MOVE, MOVE_DEFOG, opponent); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Wobbuffet's evasiveness fell!"); + if (move == MOVE_PSYCHIC_TERRAIN) { + MESSAGE("The weirdness disappeared from the battlefield."); + } + else if (move == MOVE_ELECTRIC_TERRAIN) { + MESSAGE("The electricity disappeared from the battlefield."); + } + else if (move == MOVE_MISTY_TERRAIN) { + MESSAGE("The mist disappeared from the battlefield."); + } + else if (move == MOVE_GRASSY_TERRAIN) { + MESSAGE("The grass disappeared from the battlefield."); + } + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_RESTORE_BG, player); + } +} + +SINGLE_BATTLE_TEST("Defog lowers evasiveness by 1 and removes Toxic Spikes from opponent's side") +{ + u16 move; + + PARAMETRIZE { move = MOVE_DEFOG; } + PARAMETRIZE { move = MOVE_CELEBRATE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET) {Speed(5); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(2); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(2); } + } WHEN { + TURN { MOVE(player, MOVE_TOXIC_SPIKES); MOVE(opponent, move); } + TURN { SWITCH(opponent, 1); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TOXIC_SPIKES, player); + ANIMATION(ANIM_TYPE_MOVE, move, opponent); + if (move == MOVE_DEFOG) { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Wobbuffet's evasiveness fell!"); + MESSAGE("The poison spikes disappeared from the ground around the opposing team!"); + } + // Switch happens + MESSAGE("2 sent out Wobbuffet!"); + if (move != MOVE_DEFOG) { + MESSAGE("Foe Wobbuffet was poisoned!"); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_PSN, opponent); + STATUS_ICON(opponent, poison: TRUE); + } + else { + NONE_OF { + MESSAGE("Foe Wobbuffet was poisoned!"); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_PSN, opponent); + STATUS_ICON(opponent, poison: TRUE); + } + } + } +} + +DOUBLE_BATTLE_TEST("Defog lowers evasiveness by 1 and removes Aurora Veil from player's side", s16 damagePhysical, s16 damageSpecial) +{ + u16 move; + + PARAMETRIZE { move = MOVE_DEFOG; } + PARAMETRIZE { move = MOVE_CELEBRATE; } + GIVEN { + ASSUME(gBattleMoves[MOVE_HAIL].effect == EFFECT_HAIL); + ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[0] == TYPE_ICE); + PLAYER(SPECIES_GLALIE) {Speed(4); } + PLAYER(SPECIES_GLALIE) {Speed(3); } + OPPONENT(SPECIES_GLALIE) {Speed(2); } + OPPONENT(SPECIES_GLALIE) {Speed(1); } + } WHEN { + TURN { MOVE(playerLeft, MOVE_HAIL); MOVE(playerRight, MOVE_AURORA_VEIL); } + TURN { MOVE(opponentLeft, move, target:playerLeft); } + TURN { MOVE(opponentLeft, MOVE_TACKLE, target:playerLeft); MOVE(opponentRight, MOVE_GUST, target:playerRight); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_HAIL, playerLeft); + ANIMATION(ANIM_TYPE_MOVE, MOVE_AURORA_VEIL, playerRight); + ANIMATION(ANIM_TYPE_MOVE, move, opponentLeft); + if (move == MOVE_DEFOG) { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); + MESSAGE("Glalie's evasiveness fell!"); + MESSAGE("Ally's Aurora Veil wore off!"); + } + MESSAGE("Foe Glalie used Tackle!"); + HP_BAR(playerLeft, captureDamage: &results[i].damagePhysical); + MESSAGE("Foe Glalie used Gust!"); + HP_BAR(playerRight, captureDamage: &results[i].damageSpecial); + } FINALLY { + EXPECT_MUL_EQ(results[1].damagePhysical, Q_4_12(1.5), results[0].damagePhysical); + EXPECT_MUL_EQ(results[1].damageSpecial, Q_4_12(1.5), results[0].damageSpecial); + } +} + +DOUBLE_BATTLE_TEST("Defog lowers evasiveness by 1 and removes everything it can") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_HAIL].effect == EFFECT_HAIL); + ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[0] == TYPE_ICE); + PLAYER(SPECIES_GLALIE) {Speed(4); } + PLAYER(SPECIES_GLALIE) {Speed(3); } + PLAYER(SPECIES_GLALIE) {Speed(12); } + PLAYER(SPECIES_GLALIE) {Speed(3); } + OPPONENT(SPECIES_GLALIE) {Speed(2); } + OPPONENT(SPECIES_GLALIE) {Speed(1); } + OPPONENT(SPECIES_GLALIE) {Speed(1); } + OPPONENT(SPECIES_GLALIE) {Speed(1); } + } WHEN { + TURN { MOVE(playerLeft, MOVE_STICKY_WEB); MOVE(playerRight, MOVE_SPIKES); MOVE(opponentLeft, MOVE_STICKY_WEB); MOVE(opponentRight, MOVE_SPIKES); } + TURN { SWITCH(playerLeft, 2); SWITCH(playerRight, 3); SWITCH(opponentLeft, 2); SWITCH(opponentRight, 3);} + TURN { MOVE(playerLeft, MOVE_TOXIC_SPIKES); MOVE(playerRight, MOVE_STEALTH_ROCK); MOVE(opponentLeft, MOVE_TOXIC_SPIKES); MOVE(opponentRight, MOVE_STEALTH_ROCK); } + TURN { MOVE(playerLeft, MOVE_HAIL); MOVE(playerRight, MOVE_AURORA_VEIL); MOVE(opponentLeft, MOVE_AURORA_VEIL); MOVE(opponentRight, MOVE_LIGHT_SCREEN); } + TURN { MOVE(playerLeft, MOVE_REFLECT); MOVE(playerRight, MOVE_LIGHT_SCREEN); MOVE(opponentLeft, MOVE_REFLECT); MOVE(opponentRight, MOVE_SAFEGUARD); } + TURN { MOVE(playerLeft, MOVE_MIST); MOVE(playerRight, MOVE_SAFEGUARD); MOVE(opponentLeft, MOVE_MIST); MOVE(opponentRight, MOVE_DEFOG, target: playerLeft); } + } SCENE { + MESSAGE("Foe Glalie used Defog!"); + MESSAGE("Glalie is protected by MIST!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_DEFOG, opponentRight); + // Player side + MESSAGE("Ally's Reflect wore off!"); + MESSAGE("Ally's Light Screen wore off!"); + MESSAGE("Ally's Mist wore off!"); + MESSAGE("Ally's Aurora Veil wore off!"); + MESSAGE("Ally's Safeguard wore off!"); + + MESSAGE("The spikes disappeared from the ground around your team!"); + MESSAGE("The pointed stones disappeared from around your team!"); + MESSAGE("The poison spikes disappeared from the ground around your team!"); + MESSAGE("The sticky web has disappeared from the ground around your team!"); + + // Opponent side + MESSAGE("The spikes disappeared from the ground around the opposing team!"); + MESSAGE("The pointed stones disappeared from around the opposing team!"); + MESSAGE("The poison spikes disappeared from the ground around the opposing team!"); + MESSAGE("The sticky web has disappeared from the ground around the opposing team!"); + } +} diff --git a/test/move_effect_dire_claw.c b/test/move_effect_dire_claw.c new file mode 100644 index 0000000000..2212c3cb0e --- /dev/null +++ b/test/move_effect_dire_claw.c @@ -0,0 +1,129 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_DIRE_CLAW].effect == EFFECT_DIRE_CLAW); +} + +SINGLE_BATTLE_TEST("Dire Claw can inflict poison, paralysis or sleep") +{ + u8 statusAnim; + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PSN; } + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; } + PARAMETRIZE { statusAnim = B_ANIM_STATUS_SLP; } + PASSES_RANDOMLY(1, 3, RNG_DIRE_CLAW); + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_DIRE_CLAW); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DIRE_CLAW, player); + HP_BAR(opponent); + ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent); + if (statusAnim == B_ANIM_STATUS_PRZ) { + STATUS_ICON(opponent, paralysis: TRUE); + } + else if (statusAnim == B_ANIM_STATUS_SLP) { + STATUS_ICON(opponent, sleep: TRUE); + } + else if (statusAnim == B_ANIM_STATUS_PSN) { + STATUS_ICON(opponent, poison: TRUE); + } + } +} + +SINGLE_BATTLE_TEST("Dire Claw cannot poison/paralyze poison/electric types respectively") +{ + u8 statusAnim; + u16 species; + u32 rng; + #if B_PARALYZE_ELECTRIC >= GEN_6 + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; species = SPECIES_RAICHU; } + #endif // B_PARALYZE_ELECTRIC + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PSN; rng = MOVE_EFFECT_POISON; species = SPECIES_ARBOK;} + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(species); + } WHEN { + TURN { MOVE(player, MOVE_DIRE_CLAW, WITH_RNG(RNG_DIRE_CLAW, rng)); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DIRE_CLAW, player); + HP_BAR(opponent); + NOT ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent); + if (statusAnim == B_ANIM_STATUS_PRZ) { + NOT STATUS_ICON(opponent, paralysis: TRUE); + } + else if (statusAnim == B_ANIM_STATUS_PSN) { + NOT STATUS_ICON(opponent, poison: TRUE); + } + } +} + +SINGLE_BATTLE_TEST("Dire Claw cannot poison/paralyze/cause to fall asleep pokemon with abilities preventing respective statuses") +{ + u8 statusAnim; + u16 species, ability; + u32 rng; + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; species = SPECIES_RAICHU; ability = ABILITY_LIGHTNING_ROD; } + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; species = SPECIES_JOLTEON; ability = ABILITY_VOLT_ABSORB; } + #if P_GEN_4_POKEMON == TRUE + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; species = SPECIES_ELECTIVIRE; ability = ABILITY_MOTOR_DRIVE; } + #endif // P_GEN_4_POKEMON + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PSN; rng = MOVE_EFFECT_POISON; species = SPECIES_ZANGOOSE; ability = ABILITY_IMMUNITY; } + PARAMETRIZE { statusAnim = B_ANIM_STATUS_SLP; rng = MOVE_EFFECT_SLEEP; species = SPECIES_VIGOROTH; ability = ABILITY_VITAL_SPIRIT; } + PARAMETRIZE { statusAnim = B_ANIM_STATUS_SLP; rng = MOVE_EFFECT_SLEEP; species = SPECIES_HYPNO; ability = ABILITY_INSOMNIA; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(species) {Ability(ability);} + } WHEN { + TURN { MOVE(player, MOVE_DIRE_CLAW, WITH_RNG(RNG_DIRE_CLAW, rng)); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DIRE_CLAW, player); + HP_BAR(opponent); + NOT ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent); + if (statusAnim == B_ANIM_STATUS_PRZ) { + NOT STATUS_ICON(opponent, paralysis: TRUE); + } + else if (statusAnim == B_ANIM_STATUS_SLP) { + NOT STATUS_ICON(opponent, sleep: TRUE); + } + else if (statusAnim == B_ANIM_STATUS_PSN) { + NOT STATUS_ICON(opponent, poison: TRUE); + } + } +} + +SINGLE_BATTLE_TEST("Dire Claw cannot poison/paralyze/cause to fall asleep a mon which is already statused") +{ + u8 statusAnim; + u32 rng; + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PSN; rng = MOVE_EFFECT_POISON; } + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; } + PARAMETRIZE { statusAnim = B_ANIM_STATUS_SLP; rng = MOVE_EFFECT_SLEEP; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET) {Status1(STATUS1_BURN);} + } WHEN { + TURN { MOVE(player, MOVE_DIRE_CLAW, WITH_RNG(RNG_DIRE_CLAW, rng)); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DIRE_CLAW, player); + HP_BAR(opponent); + NOT ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent); + if (statusAnim == B_ANIM_STATUS_PRZ) { + NOT STATUS_ICON(opponent, paralysis: TRUE); + } + else if (statusAnim == B_ANIM_STATUS_SLP) { + NOT STATUS_ICON(opponent, sleep: TRUE); + } + else if (statusAnim == B_ANIM_STATUS_PSN) { + NOT STATUS_ICON(opponent, poison: TRUE); + } + } +} diff --git a/test/move_effect_evasion_up.c b/test/move_effect_evasion_up.c index d14d153344..4a4e99db72 100644 --- a/test/move_effect_evasion_up.c +++ b/test/move_effect_evasion_up.c @@ -9,7 +9,7 @@ ASSUMPTIONS SINGLE_BATTLE_TEST("Double Team raises Evasion") { ASSUME(gBattleMoves[MOVE_SCRATCH].accuracy == 100); - PASSES_RANDOMLY(gBattleMoves[MOVE_SCRATCH].accuracy * 3 / 4, 100); + PASSES_RANDOMLY(gBattleMoves[MOVE_SCRATCH].accuracy * 3 / 4, 100, RNG_ACCURACY); GIVEN { PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); diff --git a/test/move_effect_explosion.c b/test/move_effect_explosion.c index 872f3f7090..41e74044ba 100644 --- a/test/move_effect_explosion.c +++ b/test/move_effect_explosion.c @@ -8,7 +8,6 @@ ASSUMPTIONS SINGLE_BATTLE_TEST("Explosion causes the user to faint") { - u16 remainingHP; GIVEN { PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); @@ -17,12 +16,29 @@ SINGLE_BATTLE_TEST("Explosion causes the user to faint") } SCENE { HP_BAR(player, hp: 0); ANIMATION(ANIM_TYPE_MOVE, MOVE_EXPLOSION, player); + MESSAGE("Wobbuffet fainted!"); + } +} + +SINGLE_BATTLE_TEST("Explosion causes the user & the target to faint") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET) { HP(1); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_EXPLOSION); } + } SCENE { + HP_BAR(player, hp: 0); + ANIMATION(ANIM_TYPE_MOVE, MOVE_EXPLOSION, player); + HP_BAR(opponent, hp: 0); + MESSAGE("Foe Wobbuffet fainted!"); + MESSAGE("Wobbuffet fainted!"); } } SINGLE_BATTLE_TEST("Explosion causes the user to faint even if it misses") { - u16 remainingHP; GIVEN { PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); @@ -31,12 +47,12 @@ SINGLE_BATTLE_TEST("Explosion causes the user to faint even if it misses") } SCENE { HP_BAR(player, hp: 0); ANIMATION(ANIM_TYPE_MOVE, MOVE_EXPLOSION, player); + MESSAGE("Wobbuffet fainted!"); } } SINGLE_BATTLE_TEST("Explosion causes the user to faint even if it has no effect") { - u16 remainingHP; GIVEN { ASSUME(gBattleMoves[MOVE_EXPLOSION].type == TYPE_NORMAL); ASSUME(gSpeciesInfo[SPECIES_GASTLY].types[0] == TYPE_GHOST); @@ -49,5 +65,29 @@ SINGLE_BATTLE_TEST("Explosion causes the user to faint even if it has no effect" ANIMATION(ANIM_TYPE_MOVE, MOVE_EXPLOSION, player); MESSAGE("It doesn't affect Foe Gastly…"); NOT HP_BAR(opponent); + MESSAGE("Wobbuffet fainted!"); + } +} + +DOUBLE_BATTLE_TEST("Explosion causes everyone to faint in a double battle") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + PLAYER(SPECIES_WYNAUT) { HP(1); } + OPPONENT(SPECIES_ABRA) { HP(1); } + OPPONENT(SPECIES_KADABRA) { HP(1); } + OPPONENT(SPECIES_KADABRA); + } WHEN { + TURN { MOVE(playerLeft, MOVE_EXPLOSION); } + } SCENE { + HP_BAR(playerLeft, hp: 0); + ANIMATION(ANIM_TYPE_MOVE, MOVE_EXPLOSION, playerLeft); + HP_BAR(opponentLeft, hp: 0); + MESSAGE("Foe Abra fainted!"); + HP_BAR(playerRight, hp: 0); + MESSAGE("Wynaut fainted!"); + HP_BAR(opponentRight, hp: 0); + MESSAGE("Foe Kadabra fainted!"); + MESSAGE("Wobbuffet fainted!"); } } diff --git a/test/move_effect_healing_wish.c b/test/move_effect_healing_wish.c new file mode 100644 index 0000000000..98e8730b34 --- /dev/null +++ b/test/move_effect_healing_wish.c @@ -0,0 +1,80 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_HEALING_WISH].effect == EFFECT_HEALING_WISH); + ASSUME(gBattleMoves[MOVE_LUNAR_DANCE].effect == EFFECT_HEALING_WISH); +} + +#define TEST_MAX_HP (100) + +SINGLE_BATTLE_TEST("Healing Wish causes the user to faint and fully heals the replacement") +{ + GIVEN { + ASSUME(B_HEALING_WISH_SWITCH >= GEN_5); + PLAYER(SPECIES_GARDEVOIR); + PLAYER(SPECIES_WYNAUT) { HP(1); MaxHP(TEST_MAX_HP); Status1(STATUS1_POISON); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_HEALING_WISH); SEND_OUT(player, 1); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_HEALING_WISH, player); + HP_BAR(player, hp: 0); + MESSAGE("Gardevoir fainted!"); + MESSAGE("The healing wish came true for Wynaut!"); + HP_BAR(player, hp: TEST_MAX_HP); + STATUS_ICON(player, none: TRUE); + MESSAGE("Wynaut regained health!"); + } +} + +DOUBLE_BATTLE_TEST("Lunar Dance causes the user to faint and fully heals the replacement in a double battle") +{ + GIVEN { + ASSUME(B_HEALING_WISH_SWITCH >= GEN_5); + PLAYER(SPECIES_GARDEVOIR) { Speed(300); } + PLAYER(SPECIES_WOBBUFFET) { Speed(50); } + PLAYER(SPECIES_WYNAUT) { HP(TEST_MAX_HP - 1); MaxHP(TEST_MAX_HP); Status1(STATUS1_BURN); Speed(50); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(50); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(50); } + } WHEN { + TURN { MOVE(playerLeft, MOVE_LUNAR_DANCE); SEND_OUT(playerLeft, 2); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_LUNAR_DANCE, playerLeft); + HP_BAR(playerLeft, hp: 0); + MESSAGE("Gardevoir fainted!"); + MESSAGE("Wynaut became cloaked in mystical moonlight!"); + HP_BAR(playerLeft, hp: TEST_MAX_HP); + STATUS_ICON(playerLeft, none: TRUE); + MESSAGE("Wynaut regained health!"); + } +} + +SINGLE_BATTLE_TEST("Healing Wish effect activates only if the switched pokemon can be healed") +{ + GIVEN { + ASSUME(B_HEALING_WISH_SWITCH >= GEN_8); + PLAYER(SPECIES_GARDEVOIR) { Speed(300); } + PLAYER(SPECIES_NINJASK) { Speed(400); } + PLAYER(SPECIES_WYNAUT) { HP(TEST_MAX_HP / 2); MaxHP(TEST_MAX_HP); Status1(STATUS1_PARALYSIS); Speed(50); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(50); } + } WHEN { + TURN { MOVE(player, MOVE_HEALING_WISH); SEND_OUT(player, 1); } + TURN { MOVE(player, MOVE_U_TURN); SEND_OUT(player, 2); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_HEALING_WISH, player); + HP_BAR(player, hp: 0); + MESSAGE("Gardevoir fainted!"); + NONE_OF { + MESSAGE("The healing wish came true for Wynaut!"); + MESSAGE("Wynaut regained health!"); + } + ANIMATION(ANIM_TYPE_MOVE, MOVE_U_TURN, player); + MESSAGE("Do it! Wynaut!"); + MESSAGE("The healing wish came true for Wynaut!"); + HP_BAR(player, hp: TEST_MAX_HP); + STATUS_ICON(player, none: TRUE); + MESSAGE("Wynaut regained health!"); + } +} diff --git a/test/move_effect_hit_escape.c b/test/move_effect_hit_escape.c index cc34db2e28..fb5ff2dd54 100644 --- a/test/move_effect_hit_escape.c +++ b/test/move_effect_hit_escape.c @@ -65,6 +65,7 @@ SINGLE_BATTLE_TEST("U-turn does not switch the user out if replacements fainted" SINGLE_BATTLE_TEST("U-turn does not switch the user out if Wimp Out activates") { GIVEN { + ASSUME(P_GEN_7_POKEMON == TRUE); PLAYER(SPECIES_WOBBUFFET); PLAYER(SPECIES_WYNAUT); OPPONENT(SPECIES_WIMPOD) { MaxHP(100); HP(51); Ability(ABILITY_WIMP_OUT); } @@ -82,6 +83,7 @@ SINGLE_BATTLE_TEST("U-turn does not switch the user out if Wimp Out activates") SINGLE_BATTLE_TEST("U-turn switches the user out if Wimp Out fails to activate") { GIVEN { + ASSUME(P_GEN_7_POKEMON == TRUE); PLAYER(SPECIES_WOBBUFFET); PLAYER(SPECIES_WYNAUT); OPPONENT(SPECIES_WIMPOD) { MaxHP(100); HP(51); Ability(ABILITY_WIMP_OUT); } diff --git a/test/move_effect_hit_set_entry_hazardss.c b/test/move_effect_hit_set_entry_hazardss.c new file mode 100644 index 0000000000..4e9761aac3 --- /dev/null +++ b/test/move_effect_hit_set_entry_hazardss.c @@ -0,0 +1,117 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_STONE_AXE].effect == EFFECT_HIT_SET_ENTRY_HAZARD); + ASSUME(gBattleMoves[MOVE_CEASELESS_EDGE].effect == EFFECT_HIT_SET_ENTRY_HAZARD); +} + +SINGLE_BATTLE_TEST("Stone Axe / Ceaseless Edge set up hazards after hitting the target") +{ + u16 move; + PARAMETRIZE {move = MOVE_STONE_AXE; } + PARAMETRIZE {move = MOVE_CEASELESS_EDGE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, move); } + TURN { SWITCH(opponent, 1); } + } SCENE { + s32 maxHP = GetMonData(&OPPONENT_PARTY[1], MON_DATA_MAX_HP); + ANIMATION(ANIM_TYPE_MOVE, move, player); + HP_BAR(opponent); + if (move == MOVE_CEASELESS_EDGE) { + MESSAGE("Spikes were scattered all around the opposing team!"); + } + else { + MESSAGE("Pointed stones float in the air around the opposing team!"); + } + MESSAGE("2 sent out Wobbuffet!"); + if (move == MOVE_CEASELESS_EDGE) { + HP_BAR(opponent, damage: maxHP / 8); + MESSAGE("Foe Wobbuffet is hurt by spikes!"); + } + else { + HP_BAR(opponent, damage: maxHP / 8); + MESSAGE("Pointed stones dug into Foe Wobbuffet!"); + } + } +} + +SINGLE_BATTLE_TEST("Ceaseless Edge can set up to 3 layers of Spikes") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(player, MOVE_CEASELESS_EDGE); } + TURN { MOVE(player, MOVE_CEASELESS_EDGE); } + TURN { MOVE(player, MOVE_CEASELESS_EDGE); } + TURN { MOVE(player, MOVE_CEASELESS_EDGE); } + TURN { SWITCH(opponent, 1); } + } SCENE { + s32 maxHP = GetMonData(&OPPONENT_PARTY[1], MON_DATA_MAX_HP); + + ANIMATION(ANIM_TYPE_MOVE, MOVE_CEASELESS_EDGE, player); + HP_BAR(opponent); + MESSAGE("Spikes were scattered all around the opposing team!"); + + ANIMATION(ANIM_TYPE_MOVE, MOVE_CEASELESS_EDGE, player); + HP_BAR(opponent); + MESSAGE("Spikes were scattered all around the opposing team!"); + + ANIMATION(ANIM_TYPE_MOVE, MOVE_CEASELESS_EDGE, player); + HP_BAR(opponent); + MESSAGE("Spikes were scattered all around the opposing team!"); + + ANIMATION(ANIM_TYPE_MOVE, MOVE_CEASELESS_EDGE, player); + HP_BAR(opponent); + NOT MESSAGE("Spikes were scattered all around the opposing team!"); + + MESSAGE("2 sent out Wynaut!"); + HP_BAR(opponent, damage: maxHP / 4); + MESSAGE("Foe Wynaut is hurt by spikes!"); + } +} + +SINGLE_BATTLE_TEST("Stone Axe can set up pointed stones only once") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + } WHEN { + TURN { MOVE(player, MOVE_STONE_AXE); } + TURN { MOVE(player, MOVE_STONE_AXE); } + TURN { MOVE(player, MOVE_STONE_AXE); } + TURN { MOVE(player, MOVE_STONE_AXE); } + TURN { SWITCH(opponent, 1); } + } SCENE { + s32 maxHP = GetMonData(&OPPONENT_PARTY[1], MON_DATA_MAX_HP); + + ANIMATION(ANIM_TYPE_MOVE, MOVE_STONE_AXE, player); + HP_BAR(opponent); + MESSAGE("Pointed stones float in the air around the opposing team!"); + + ANIMATION(ANIM_TYPE_MOVE, MOVE_STONE_AXE, player); + HP_BAR(opponent); + NOT MESSAGE("Pointed stones float in the air around the opposing team!"); + + ANIMATION(ANIM_TYPE_MOVE, MOVE_STONE_AXE, player); + HP_BAR(opponent); + NOT MESSAGE("Pointed stones float in the air around the opposing team!"); + + ANIMATION(ANIM_TYPE_MOVE, MOVE_STONE_AXE, player); + HP_BAR(opponent); + NOT MESSAGE("Pointed stones float in the air around the opposing team!"); + + MESSAGE("2 sent out Wynaut!"); + HP_BAR(opponent, damage: maxHP / 8); + MESSAGE("Pointed stones dug into Foe Wynaut!"); + } +} + diff --git a/test/move_effect_hit_switch_target.c b/test/move_effect_hit_switch_target.c new file mode 100644 index 0000000000..5af3062a4f --- /dev/null +++ b/test/move_effect_hit_switch_target.c @@ -0,0 +1,71 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_DRAGON_TAIL].effect == EFFECT_HIT_SWITCH_TARGET); + ASSUME(gBattleMoves[MOVE_LOCK_ON].effect == EFFECT_LOCK_ON); +} + +SINGLE_BATTLE_TEST("Dragon Tail switches the target with a random non-fainted replacement") +{ + PASSES_RANDOMLY(1, 2, RNG_FORCE_RANDOM_SWITCH); + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_BULBASAUR); + OPPONENT(SPECIES_CHARMANDER); + OPPONENT(SPECIES_SQUIRTLE) { HP(0); } + } WHEN { + TURN { MOVE(player, MOVE_DRAGON_TAIL); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DRAGON_TAIL, player); + MESSAGE("Foe Bulbasaur was dragged out!"); + } +} + +DOUBLE_BATTLE_TEST("Dragon Tail switches the target with a random non-battler, non-fainted replacement") +{ + PASSES_RANDOMLY(1, 2, RNG_FORCE_RANDOM_SWITCH); + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + OPPONENT(SPECIES_BULBASAUR); + OPPONENT(SPECIES_CHARMANDER); + OPPONENT(SPECIES_SQUIRTLE) { HP(0); } + } WHEN { + TURN { MOVE(playerLeft, MOVE_DRAGON_TAIL, target: opponentRight); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DRAGON_TAIL, playerLeft); + MESSAGE("Foe Bulbasaur was dragged out!"); + } +} + +SINGLE_BATTLE_TEST("Dragon Tail does not fail if no replacements") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_DRAGON_TAIL); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DRAGON_TAIL, player); + NOT MESSAGE("But it failed!"); + } +} + +SINGLE_BATTLE_TEST("Dragon Tail does not fail if replacements fainted") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT) { HP(0); } + } WHEN { + TURN { MOVE(player, MOVE_DRAGON_TAIL); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DRAGON_TAIL, player); + NOT MESSAGE("But it failed!"); + } +} diff --git a/test/move_effect_mind_blown.c b/test/move_effect_mind_blown.c new file mode 100644 index 0000000000..6b053cfb56 --- /dev/null +++ b/test/move_effect_mind_blown.c @@ -0,0 +1,109 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_MIND_BLOWN].effect == EFFECT_MIND_BLOWN); +} + +#define HP_TEST (400) + +SINGLE_BATTLE_TEST("Mind Blown makes the user lose 1/2 of its HP") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { HP(HP_TEST); MaxHP(HP_TEST); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_MIND_BLOWN); } + } SCENE { + HP_BAR(player, hp: HP_TEST / 2); + ANIMATION(ANIM_TYPE_MOVE, MOVE_MIND_BLOWN, player); + NOT MESSAGE("Wobbuffet fainted!"); // Wobb had more than 1/2 of its HP, so it can't faint. + } +} + +DOUBLE_BATTLE_TEST("Mind Blown makes the user lose 1/2 of its HP in a double battle") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { HP(HP_TEST); MaxHP(HP_TEST); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(playerLeft, MOVE_MIND_BLOWN); } + } SCENE { + HP_BAR(playerLeft, hp: HP_TEST / 2); + ANIMATION(ANIM_TYPE_MOVE, MOVE_MIND_BLOWN, playerLeft); + NOT MESSAGE("Wobbuffet fainted!"); // Wobb had more than 1/2 of its HP, so it can't faint. + } +} + +SINGLE_BATTLE_TEST("Mind Blown causes the user to faint when below 1/2 of its HP") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { HP(HP_TEST / 2); MaxHP(HP_TEST); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_MIND_BLOWN); } + } SCENE { + HP_BAR(player, hp: 0); + ANIMATION(ANIM_TYPE_MOVE, MOVE_MIND_BLOWN, player); + MESSAGE("Wobbuffet fainted!"); + } +} + +DOUBLE_BATTLE_TEST("Mind Blown causes the user to faint when below 1/2 of its HP in a double battle") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { HP(HP_TEST / 2); MaxHP(HP_TEST); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(playerLeft, MOVE_MIND_BLOWN);} + } SCENE { + HP_BAR(playerLeft, hp: 0); + ANIMATION(ANIM_TYPE_MOVE, MOVE_MIND_BLOWN, playerLeft); + MESSAGE("Wobbuffet fainted!"); + } +} + +SINGLE_BATTLE_TEST("Mind Blown causes the user & the target to faint when below 1/2 of its HP") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { HP(HP_TEST / 2) ; MaxHP(HP_TEST); } + OPPONENT(SPECIES_WOBBUFFET) { HP(1); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_MIND_BLOWN);} + } SCENE { + HP_BAR(player, hp: 0); + ANIMATION(ANIM_TYPE_MOVE, MOVE_MIND_BLOWN, player); + HP_BAR(opponent, hp: 0); + MESSAGE("Foe Wobbuffet fainted!"); + MESSAGE("Wobbuffet fainted!"); + } +} + +DOUBLE_BATTLE_TEST("Mind Blown causes everyone to faint in a double battle") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { HP(HP_TEST / 2); MaxHP(HP_TEST); } + PLAYER(SPECIES_WYNAUT) { HP(1); } + OPPONENT(SPECIES_ABRA) { HP(1); } + OPPONENT(SPECIES_KADABRA) { HP(1); } + OPPONENT(SPECIES_KADABRA); + } WHEN { + TURN { MOVE(playerLeft, MOVE_MIND_BLOWN, criticalHit: FALSE); } + } SCENE { + HP_BAR(playerLeft, hp: 0); + ANIMATION(ANIM_TYPE_MOVE, MOVE_MIND_BLOWN, playerLeft); + HP_BAR(opponentLeft, hp: 0); + MESSAGE("Foe Abra fainted!"); + HP_BAR(playerRight, hp: 0); + MESSAGE("Wynaut fainted!"); + HP_BAR(opponentRight, hp: 0); + MESSAGE("Foe Kadabra fainted!"); + MESSAGE("Wobbuffet fainted!"); + } +} diff --git a/test/move_effect_rampage.c b/test/move_effect_rampage.c index a3afebf6ba..aa4a002fb1 100644 --- a/test/move_effect_rampage.c +++ b/test/move_effect_rampage.c @@ -8,7 +8,7 @@ ASSUMPTIONS SINGLE_BATTLE_TEST("Thrash lasts for 2 or 3 turns") { - PASSES_RANDOMLY(1, 2); + PASSES_RANDOMLY(1, 2, RNG_RAMPAGE_TURNS); GIVEN { PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); @@ -26,7 +26,6 @@ SINGLE_BATTLE_TEST("Thrash lasts for 2 or 3 turns") SINGLE_BATTLE_TEST("Thrash confuses the user after it finishes") { GIVEN { - RNGSeed(0x00000000); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } WHEN { @@ -45,7 +44,6 @@ SINGLE_BATTLE_TEST("Thrash does not confuse the user if it is canceled on turn 1 { GIVEN { ASSUME(B_RAMPAGE_CANCELLING >= GEN_5); - RNGSeed(0x00000000); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } WHEN { @@ -61,7 +59,6 @@ SINGLE_BATTLE_TEST("Thrash does not confuse the user if it is canceled on turn 2 { GIVEN { ASSUME(B_RAMPAGE_CANCELLING >= GEN_5); - RNGSeed(0x00000000); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } WHEN { @@ -78,7 +75,6 @@ SINGLE_BATTLE_TEST("Thrash confuses the user if it is canceled on turn 3 of 3") KNOWN_FAILING; GIVEN { ASSUME(B_RAMPAGE_CANCELLING >= GEN_5); - RNGSeed(0x00000000); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } WHEN { diff --git a/test/move_effect_recoil_if_miss.c b/test/move_effect_recoil_if_miss.c index 5c1f1a61af..8a80309d74 100644 --- a/test/move_effect_recoil_if_miss.c +++ b/test/move_effect_recoil_if_miss.c @@ -42,8 +42,8 @@ SINGLE_BATTLE_TEST("Jump Kick has 50% recoil on protect") SINGLE_BATTLE_TEST("Jump Kick has no recoil if no target") { - KNOWN_FAILING; // #2596. GIVEN { + ASSUME(B_HEALING_WISH_SWITCH >= GEN_5); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WYNAUT); diff --git a/test/move_effect_revival_blessing.c b/test/move_effect_revival_blessing.c new file mode 100644 index 0000000000..6bc76ec85e --- /dev/null +++ b/test/move_effect_revival_blessing.c @@ -0,0 +1,117 @@ +#include "global.h" +#include "test_battle.h" + +// Note: Since these tests are recorded battle, they don't test the right battle controller +// behaviors. These have been tested in-game, in double, in multi, and in link battles. AI will always +// revive their first fainted party member in order. + +#define MOVE_MESSAGE(name) \ + do { \ + if (B_EXPANDED_MOVE_NAMES == FALSE) \ + MESSAGE(name" used RevivlBlesng!"); \ + else \ + MESSAGE(name" used Revival Blessing!"); \ + } while (0); \ + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_REVIVAL_BLESSING].effect == EFFECT_REVIVAL_BLESSING); +} + +SINGLE_BATTLE_TEST("Revival Blessing revives a chosen fainted party member for the player") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + PLAYER(SPECIES_WOBBUFFET) { HP(0); } + PLAYER(SPECIES_WYNAUT) { HP(0); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_REVIVAL_BLESSING); SEND_OUT(player, 2); } + } SCENE { + MOVE_MESSAGE("Wobbuffet") + MESSAGE("Wynaut was revived and is ready to fight again!"); + } +} + +SINGLE_BATTLE_TEST("Revival Blessing revives a fainted party member for an opponent") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_RAICHU); + OPPONENT(SPECIES_PICHU) { HP(0); } + OPPONENT(SPECIES_PIKACHU) { HP(0); } + } WHEN { + TURN { MOVE(opponent, MOVE_REVIVAL_BLESSING); SEND_OUT(opponent, 1); } + } SCENE { + MOVE_MESSAGE("Foe Raichu") + MESSAGE("Pichu was revived and is ready to fight again!"); + } +} + +SINGLE_BATTLE_TEST("Revival Blessing fails if no party members are fainted") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_REVIVAL_BLESSING); } + } SCENE { + MOVE_MESSAGE("Wobbuffet") + MESSAGE("But it failed!"); + } +} + +// Note: There isn't a good way to test multi battles at the moment, but +// this PASSES in game! +TO_DO_BATTLE_TEST("Revival Blessing cannot revive a partner's party member"); +// DOUBLE_BATTLE_TEST("Revival Blessing cannot revive a partner's party member") +// { +// struct BattlePokemon *user; +// gBattleTypeFlags |= BATTLE_TYPE_TWO_OPPONENTS; +// PARAMETRIZE { user = opponentLeft; } +// PARAMETRIZE { user = opponentRight; } +// GIVEN { +// ASSUME((gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) != FALSE); +// PLAYER(SPECIES_WOBBUFFET); +// PLAYER(SPECIES_WOBBUFFET); +// OPPONENT(SPECIES_WOBBUFFET); +// OPPONENT(SPECIES_WOBBUFFET); +// OPPONENT(SPECIES_WOBBUFFET); +// OPPONENT(SPECIES_WYNAUT); +// OPPONENT(SPECIES_WYNAUT) { HP(0); } +// OPPONENT(SPECIES_WYNAUT); +// } WHEN { +// TURN { MOVE(user, MOVE_REVIVAL_BLESSING); } +// } SCENE { +// if (user == opponentLeft) { +// MOVE_MESSAGE(Foe Wobbuffet) +// MESSAGE("But it failed!"); +// } else { +// MOVE_MESSAGE(Foe Wynaut) +// MESSAGE("Wynaut was revived and is ready to fight again!"); +// } +// } +// } + +// Note: The test runner gets upset about "sending out" a battler on the field, +// but this PASSES in game! +TO_DO_BATTLE_TEST("Revived battlers still lose their turn"); +// DOUBLE_BATTLE_TEST("Revived battlers still lose their turn") +// { +// GIVEN { +// PLAYER(SPECIES_WOBBUFFET); +// PLAYER(SPECIES_WYNAUT); +// OPPONENT(SPECIES_WOBBUFFET); +// OPPONENT(SPECIES_WYNAUT) { HP(1); } +// } WHEN { +// TURN { MOVE(playerLeft, MOVE_TACKLE, target: opponentRight); +// MOVE(opponentLeft, MOVE_REVIVAL_BLESSING); +// SEND_OUT(opponentLeft, 1); } +// } SCENE { +// MESSAGE("Wobbuffet used Tackle!"); +// MESSAGE("Foe Wynaut fainted!"); +// MOVE_MESSAGE("Foe Wobbuffet") +// MESSAGE("Wynaut was revived and is ready to fight again!"); +// NOT { MESSAGE("Wynaut used Celebrate!"); } +// } +// } diff --git a/test/move_effect_roar.c b/test/move_effect_roar.c new file mode 100644 index 0000000000..99256b2986 --- /dev/null +++ b/test/move_effect_roar.c @@ -0,0 +1,70 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_ROAR].effect == EFFECT_ROAR); +} + +SINGLE_BATTLE_TEST("Roar switches the target with a random non-fainted replacement") +{ + PASSES_RANDOMLY(1, 2, RNG_FORCE_RANDOM_SWITCH); + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_BULBASAUR); + OPPONENT(SPECIES_CHARMANDER); + OPPONENT(SPECIES_SQUIRTLE) { HP(0); } + } WHEN { + TURN { MOVE(player, MOVE_ROAR); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_ROAR, player); + MESSAGE("Foe Bulbasaur was dragged out!"); + } +} + +DOUBLE_BATTLE_TEST("Roar switches the target with a random non-battler, non-fainted replacement") +{ + PASSES_RANDOMLY(1, 2, RNG_FORCE_RANDOM_SWITCH); + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT); + OPPONENT(SPECIES_BULBASAUR); + OPPONENT(SPECIES_CHARMANDER); + OPPONENT(SPECIES_SQUIRTLE) { HP(0); } + } WHEN { + TURN { MOVE(playerLeft, MOVE_ROAR, target: opponentRight); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_ROAR, playerLeft); + MESSAGE("Foe Bulbasaur was dragged out!"); + } +} + +SINGLE_BATTLE_TEST("Roar fails if no replacements") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_ROAR); } + } SCENE { + MESSAGE("Wobbuffet used Roar!"); + MESSAGE("But it failed!"); + } +} + +SINGLE_BATTLE_TEST("Roar fails if replacements fainted") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WYNAUT) { HP(0); } + } WHEN { + TURN { MOVE(player, MOVE_ROAR); } + } SCENE { + MESSAGE("Wobbuffet used Roar!"); + MESSAGE("But it failed!"); + } +} diff --git a/test/move_effect_shell_trap.c b/test/move_effect_shell_trap.c new file mode 100644 index 0000000000..27dc4b7f64 --- /dev/null +++ b/test/move_effect_shell_trap.c @@ -0,0 +1,168 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_SHELL_TRAP].effect == EFFECT_SHELL_TRAP); + ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); + ASSUME(gBattleMoves[MOVE_WATER_GUN].split == SPLIT_SPECIAL); + ASSUME(gBattleMoves[MOVE_LEER].split == SPLIT_STATUS); +} + +SINGLE_BATTLE_TEST("Shell Trap activates only if hit by a physical move") +{ + u32 move; + bool32 activate; + PARAMETRIZE { move = MOVE_TACKLE; activate = TRUE; } + PARAMETRIZE { move = MOVE_WATER_GUN; activate = FALSE; } + PARAMETRIZE { move = MOVE_LEER; activate = FALSE; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_SHELL_TRAP); MOVE(opponent, move); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_SHELL_TRAP_SETUP, player); + MESSAGE("Wobbuffet set a shell trap!"); + ANIMATION(ANIM_TYPE_MOVE, move, opponent); + + if (activate) { + MESSAGE("Wobbuffet used Shell Trap!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SHELL_TRAP, player); + HP_BAR(opponent); + } else { + MESSAGE("Wobbuffet's shell trap didn't work!"); + NONE_OF { + MESSAGE("Wobbuffet used Shell Trap!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SHELL_TRAP, player); + HP_BAR(opponent); + } + } + } +} + +SINGLE_BATTLE_TEST("Shell Trap does not activate if attacker's Sheer Force applied") +{ + u32 move; + bool32 activate; + PARAMETRIZE { move = MOVE_TACKLE; activate = TRUE; } + PARAMETRIZE { move = MOVE_STOMP; activate = FALSE; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_TAUROS) { Ability(ABILITY_SHEER_FORCE); } + } WHEN { + TURN { MOVE(player, MOVE_SHELL_TRAP); MOVE(opponent, move); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_SHELL_TRAP_SETUP, player); + MESSAGE("Wobbuffet set a shell trap!"); + ANIMATION(ANIM_TYPE_MOVE, move, opponent); + if (activate) { + MESSAGE("Wobbuffet used Shell Trap!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SHELL_TRAP, player); + HP_BAR(opponent); + } else { + MESSAGE("Wobbuffet's shell trap didn't work!"); + NONE_OF { + MESSAGE("Wobbuffet used Shell Trap!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SHELL_TRAP, player); + HP_BAR(opponent); + } + } + } +} + +SINGLE_BATTLE_TEST("Shell Trap does not activate if battler faints before being able to activate it") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { HP(1); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_SHELL_TRAP); MOVE(opponent, MOVE_TACKLE); SEND_OUT(player, 1); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_SHELL_TRAP_SETUP, player); + MESSAGE("Wobbuffet set a shell trap!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + MESSAGE("Wobbuffet fainted!"); + MESSAGE("Go! Wobbuffet!"); + NONE_OF { + MESSAGE("Wobbuffet used Shell Trap!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SHELL_TRAP, player); + HP_BAR(opponent); + } + } +} + +DOUBLE_BATTLE_TEST("Shell Trap activates immediately after being hit on turn 1 and attacks both opponents") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_SHELL_TRAP].target == MOVE_TARGET_BOTH); + PLAYER(SPECIES_WOBBUFFET) { Speed(1); } + PLAYER(SPECIES_WOBBUFFET) { Speed(2); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(5); } + OPPONENT(SPECIES_WYNAUT) { Speed(1); } + } WHEN { + TURN { MOVE(playerLeft, MOVE_SHELL_TRAP); MOVE(opponentLeft, MOVE_TACKLE, target:playerLeft); MOVE(playerRight, MOVE_CELEBRATE); MOVE(opponentRight, MOVE_CELEBRATE); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_SHELL_TRAP_SETUP, playerLeft); + MESSAGE("Wobbuffet set a shell trap!"); + MESSAGE("Foe Wobbuffet used Tackle!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponentLeft); + MESSAGE("Wobbuffet used Shell Trap!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SHELL_TRAP, playerLeft); + HP_BAR(opponentLeft); + HP_BAR(opponentRight); + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Wynaut used Celebrate!"); + } +} + +DOUBLE_BATTLE_TEST("Shell Trap activates immediately after being hit on turn 2 and attacks both opponents") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_SHELL_TRAP].target == MOVE_TARGET_BOTH); + PLAYER(SPECIES_WOBBUFFET) { Speed(1); } + PLAYER(SPECIES_WOBBUFFET) { Speed(2); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(5); } + OPPONENT(SPECIES_WYNAUT) { Speed(6); } + } WHEN { + TURN { MOVE(playerLeft, MOVE_SHELL_TRAP); MOVE(opponentLeft, MOVE_TACKLE, target:playerLeft); MOVE(playerRight, MOVE_CELEBRATE); MOVE(opponentRight, MOVE_CELEBRATE); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_SHELL_TRAP_SETUP, playerLeft); + MESSAGE("Wobbuffet set a shell trap!"); + MESSAGE("Foe Wynaut used Celebrate!"); + MESSAGE("Foe Wobbuffet used Tackle!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponentLeft); + MESSAGE("Wobbuffet used Shell Trap!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SHELL_TRAP, playerLeft); + HP_BAR(opponentLeft); + HP_BAR(opponentRight); + MESSAGE("Wobbuffet used Celebrate!"); + } +} + +DOUBLE_BATTLE_TEST("Shell Trap activates immediately after being hit on turn 3 and attacks both opponents") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_SHELL_TRAP].target == MOVE_TARGET_BOTH); + PLAYER(SPECIES_WOBBUFFET) { Speed(1); } + PLAYER(SPECIES_WOBBUFFET) { Speed(7); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(5); } + OPPONENT(SPECIES_WYNAUT) { Speed(6); } + } WHEN { + TURN { MOVE(playerLeft, MOVE_SHELL_TRAP); MOVE(opponentLeft, MOVE_TACKLE, target:playerLeft); MOVE(playerRight, MOVE_CELEBRATE); MOVE(opponentRight, MOVE_CELEBRATE); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_SHELL_TRAP_SETUP, playerLeft); + MESSAGE("Wobbuffet set a shell trap!"); + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Wynaut used Celebrate!"); + MESSAGE("Foe Wobbuffet used Tackle!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponentLeft); + MESSAGE("Wobbuffet used Shell Trap!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SHELL_TRAP, playerLeft); + HP_BAR(opponentLeft); + HP_BAR(opponentRight); + } +} diff --git a/test/move_effect_sleep.c b/test/move_effect_sleep.c index c80faf4bdf..c34e1248ee 100644 --- a/test/move_effect_sleep.c +++ b/test/move_effect_sleep.c @@ -6,16 +6,33 @@ ASSUMPTIONS ASSUME(gBattleMoves[MOVE_HYPNOSIS].effect == EFFECT_SLEEP); } -SINGLE_BATTLE_TEST("Hypnosis inflicts sleep") +SINGLE_BATTLE_TEST("Hypnosis inflicts 1-3 turns of sleep") { + u32 turns, count; + ASSUME(B_SLEEP_TURNS >= GEN_5); + PARAMETRIZE { turns = 1; } + PARAMETRIZE { turns = 2; } + PARAMETRIZE { turns = 3; } + PASSES_RANDOMLY(1, 3, RNG_SLEEP_TURNS); GIVEN { PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } WHEN { - TURN { MOVE(player, MOVE_HYPNOSIS); } + TURN { MOVE(player, MOVE_HYPNOSIS); MOVE(opponent, MOVE_CELEBRATE); } + for (count = 0; count < turns; ++count) + TURN {} } SCENE { ANIMATION(ANIM_TYPE_MOVE, MOVE_HYPNOSIS, player); ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, opponent); + MESSAGE("Foe Wobbuffet fell asleep!"); STATUS_ICON(opponent, sleep: TRUE); + for (count = 0; count < turns; ++count) + { + if (count < turns - 1) + MESSAGE("Foe Wobbuffet is fast asleep."); + ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, opponent); + } + MESSAGE("Foe Wobbuffet woke up!"); + STATUS_ICON(opponent, none: TRUE); } } diff --git a/test/move_effect_special_attack_down.c b/test/move_effect_special_attack_down.c index a20b8558e7..0511692d46 100644 --- a/test/move_effect_special_attack_down.c +++ b/test/move_effect_special_attack_down.c @@ -22,7 +22,7 @@ SINGLE_BATTLE_TEST("Confide lowers Special Attack", s16 damage) if (lowerSpecialAttack) { ANIMATION(ANIM_TYPE_MOVE, MOVE_CONFIDE, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); - MESSAGE("Foe Wobbuffet's sp. attack fell!"); + MESSAGE("Foe Wobbuffet's Sp. Atk fell!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_GUST, opponent); HP_BAR(player, captureDamage: &results[i].damage); diff --git a/test/move_effect_special_attack_up_3.c b/test/move_effect_special_attack_up_3.c index f7e7e11d14..ad53bedb9e 100644 --- a/test/move_effect_special_attack_up_3.c +++ b/test/move_effect_special_attack_up_3.c @@ -22,7 +22,7 @@ SINGLE_BATTLE_TEST("Tail Glow drastically raises Special Attack", s16 damage) if (raiseSpecialAttack) { ANIMATION(ANIM_TYPE_MOVE, MOVE_TAIL_GLOW, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Wobbuffet's sp. attack drastically rose!"); + MESSAGE("Wobbuffet's Sp. Atk drastically rose!"); } ANIMATION(ANIM_TYPE_MOVE, MOVE_GUST, player); HP_BAR(opponent, captureDamage: &results[i].damage); diff --git a/test/move_effect_spikes.c b/test/move_effect_spikes.c index 33b0bad4b9..0c84a5fb1e 100644 --- a/test/move_effect_spikes.c +++ b/test/move_effect_spikes.c @@ -28,7 +28,7 @@ SINGLE_BATTLE_TEST("Spikes damage on switch in") s32 maxHP = GetMonData(&OPPONENT_PARTY[1], MON_DATA_MAX_HP); for (count = 0; count < layers; ++count) { ANIMATION(ANIM_TYPE_MOVE, MOVE_SPIKES, player); - MESSAGE("Spikes were scattered all around the opponent's side!"); + MESSAGE("Spikes were scattered all around the opposing team!"); } MESSAGE("2 sent out Wynaut!"); HP_BAR(opponent, damage: maxHP / divisor); @@ -51,11 +51,11 @@ SINGLE_BATTLE_TEST("Spikes fails after 3 layers") } SCENE { s32 maxHP = GetMonData(&OPPONENT_PARTY[1], MON_DATA_MAX_HP); ANIMATION(ANIM_TYPE_MOVE, MOVE_SPIKES, player); - MESSAGE("Spikes were scattered all around the opponent's side!"); + MESSAGE("Spikes were scattered all around the opposing team!"); ANIMATION(ANIM_TYPE_MOVE, MOVE_SPIKES, player); - MESSAGE("Spikes were scattered all around the opponent's side!"); + MESSAGE("Spikes were scattered all around the opposing team!"); ANIMATION(ANIM_TYPE_MOVE, MOVE_SPIKES, player); - MESSAGE("Spikes were scattered all around the opponent's side!"); + MESSAGE("Spikes were scattered all around the opposing team!"); MESSAGE("Wobbuffet used Spikes!"); MESSAGE("But it failed!"); MESSAGE("2 sent out Wynaut!"); diff --git a/test/move_effect_stockpile.c b/test/move_effect_stockpile.c new file mode 100644 index 0000000000..bd0d3a113d --- /dev/null +++ b/test/move_effect_stockpile.c @@ -0,0 +1,254 @@ +#include "global.h" +#include "test_battle.h" + +// These tests cover all 3 effects: Stockpile, Spit up and Swallow. +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_STOCKPILE].effect == EFFECT_STOCKPILE); + ASSUME(gBattleMoves[MOVE_SWALLOW].effect == EFFECT_SWALLOW); + ASSUME(gBattleMoves[MOVE_SPIT_UP].effect == EFFECT_SPIT_UP); +} + +SINGLE_BATTLE_TEST("Stockpile's count can go up only to 3") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_STOCKPILE); } + TURN { MOVE(player, MOVE_STOCKPILE); } + TURN { MOVE(player, MOVE_STOCKPILE); } + TURN { MOVE(player, MOVE_STOCKPILE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_STOCKPILE, player); + MESSAGE("Wobbuffet stockpiled 1!"); + + ANIMATION(ANIM_TYPE_MOVE, MOVE_STOCKPILE, player); + MESSAGE("Wobbuffet stockpiled 2!"); + + ANIMATION(ANIM_TYPE_MOVE, MOVE_STOCKPILE, player); + MESSAGE("Wobbuffet stockpiled 3!"); + + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_STOCKPILE, player); + MESSAGE("Wobbuffet can't stockpile any more!"); + } +} + +#define MAX_HP_TEST 400 +SINGLE_BATTLE_TEST("Spit Up and Swallow don't work if used without Stockpile") +{ + u32 move; + PARAMETRIZE {move = MOVE_SWALLOW ;} + PARAMETRIZE {move = MOVE_SPIT_UP ;} + GIVEN { + PLAYER(SPECIES_WOBBUFFET) {HP(10), MaxHP(MAX_HP_TEST) ;} + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, move); } + TURN { MOVE(player, MOVE_STOCKPILE); } + TURN { MOVE(player, move); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, move, player); + if (move == MOVE_SWALLOW) + MESSAGE("But it failed to swallow a thing!"); + else + MESSAGE("But it failed to spit up a thing!"); + + ANIMATION(ANIM_TYPE_MOVE, MOVE_STOCKPILE, player); + MESSAGE("Wobbuffet stockpiled 1!"); + + ANIMATION(ANIM_TYPE_MOVE, move, player); + if (move == MOVE_SPIT_UP) { + HP_BAR(opponent); + } + else { + HP_BAR(player); + } + } +} + +SINGLE_BATTLE_TEST("Spit Up's power raises depending on Stockpile's count", s16 damage) +{ + u8 count; + PARAMETRIZE { count = 1;} + PARAMETRIZE { count = 2;} + PARAMETRIZE { count = 3;} + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_STOCKPILE); } + if (count != 1){ + TURN { MOVE(player, MOVE_STOCKPILE); } + if (count == 3) { + TURN { MOVE(player, MOVE_STOCKPILE); } + } + } + TURN { MOVE(player, MOVE_SPIT_UP); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_STOCKPILE, player); + MESSAGE("Wobbuffet stockpiled 1!"); + if (count != 1) { + ANIMATION(ANIM_TYPE_MOVE, MOVE_STOCKPILE, player); + MESSAGE("Wobbuffet stockpiled 2!"); + if (count == 3) { + ANIMATION(ANIM_TYPE_MOVE, MOVE_STOCKPILE, player); + MESSAGE("Wobbuffet stockpiled 3!"); + } + } + ANIMATION(ANIM_TYPE_MOVE, MOVE_SPIT_UP, player); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[1].damage); + EXPECT_MUL_EQ(results[0].damage, Q_4_12(3.0), results[2].damage); + } +} + +SINGLE_BATTLE_TEST("Swallow heals HP depending on Stockpile's count", s16 hpHeal) +{ + u8 count; + PARAMETRIZE { count = 1;} + PARAMETRIZE { count = 2;} + PARAMETRIZE { count = 3;} + GIVEN { + PLAYER(SPECIES_WOBBUFFET) {HP(1), MaxHP(MAX_HP_TEST); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_STOCKPILE); } + if (count != 1){ + TURN { MOVE(player, MOVE_STOCKPILE); } + if (count == 3) { + TURN { MOVE(player, MOVE_STOCKPILE); } + } + } + TURN { MOVE(player, MOVE_SWALLOW); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_STOCKPILE, player); + MESSAGE("Wobbuffet stockpiled 1!"); + if (count != 1) { + ANIMATION(ANIM_TYPE_MOVE, MOVE_STOCKPILE, player); + MESSAGE("Wobbuffet stockpiled 2!"); + if (count == 3) { + ANIMATION(ANIM_TYPE_MOVE, MOVE_STOCKPILE, player); + MESSAGE("Wobbuffet stockpiled 3!"); + } + } + ANIMATION(ANIM_TYPE_MOVE, MOVE_SWALLOW, player); + HP_BAR(player, captureDamage: &results[i].hpHeal); + } FINALLY { + EXPECT_EQ(results[0].hpHeal, -(MAX_HP_TEST / 4)); + EXPECT_EQ(results[1].hpHeal, -(MAX_HP_TEST / 2)); + EXPECT_EQ(results[2].hpHeal, -(MAX_HP_TEST - 1)); + } +} + +SINGLE_BATTLE_TEST("Stockpile temporarily raises Def and Sp. Def", s16 dmgPyhsical, s16 dmgSpecial) +{ + u16 move; + PARAMETRIZE {move = MOVE_STOCKPILE;} + PARAMETRIZE {move = MOVE_CELEBRATE;} + GIVEN { + ASSUME(B_STOCKPILE_RAISES_DEFS >= GEN_4); + ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); + ASSUME(gBattleMoves[MOVE_GUST].split == SPLIT_SPECIAL); + PLAYER(SPECIES_WOBBUFFET) {Speed(2); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(1); } + } WHEN { + TURN { MOVE(player, move); MOVE(opponent, MOVE_TACKLE); } + TURN { MOVE(opponent, MOVE_GUST); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, move, player); + if (move == MOVE_STOCKPILE) { + MESSAGE("Wobbuffet stockpiled 1!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Wobbuffet's Defense rose!"); + MESSAGE("Wobbuffet's Sp. Def rose!"); + } + + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + HP_BAR(player, captureDamage: &results[i].dmgPyhsical); + + ANIMATION(ANIM_TYPE_MOVE, MOVE_GUST, opponent); + HP_BAR(player, captureDamage: &results[i].dmgSpecial); + } FINALLY { + EXPECT_MUL_EQ(results[0].dmgPyhsical, Q_4_12(1.5), results[1].dmgPyhsical); + EXPECT_MUL_EQ(results[0].dmgSpecial, Q_4_12(1.5), results[1].dmgSpecial); + } +} + +DOUBLE_BATTLE_TEST("Stockpile's Def and Sp. Def boost is lost after using Spit Up or Swallow", s16 dmgPyhsicalBefore, s16 dmgPhysicalAfter, s16 dmgSpecialBefore, s16 dmgSpecialAfter) +{ + u8 count; + u16 move; + PARAMETRIZE {count = 1, move = MOVE_SPIT_UP;} + PARAMETRIZE {count = 2, move = MOVE_SWALLOW;} + PARAMETRIZE {count = 3, move = MOVE_SPIT_UP;} + GIVEN { + ASSUME(B_STOCKPILE_RAISES_DEFS >= GEN_4); + ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); + ASSUME(gBattleMoves[MOVE_GUST].split == SPLIT_SPECIAL); + PLAYER(SPECIES_WOBBUFFET) {Speed(4); HP(MAX_HP_TEST - 1); MaxHP(MAX_HP_TEST); } + PLAYER(SPECIES_WOBBUFFET) {Speed(3); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(2); } + OPPONENT(SPECIES_WOBBUFFET) {Speed(1); } + } WHEN { + TURN { MOVE(opponentLeft, MOVE_TACKLE, target:playerLeft, criticalHit:FALSE); MOVE(opponentRight, MOVE_GUST, criticalHit:FALSE, target:playerLeft);} + TURN { MOVE(playerLeft, MOVE_STOCKPILE);} + if (count != 1) { + TURN { MOVE(playerLeft, MOVE_STOCKPILE);} + if (count == 3) { + TURN { MOVE(playerLeft, MOVE_STOCKPILE);} + } + } + TURN { MOVE(playerLeft, move, target:opponentLeft); MOVE(opponentLeft, MOVE_TACKLE, target:playerLeft, criticalHit:FALSE); MOVE(opponentRight, MOVE_GUST, target:playerLeft, criticalHit:FALSE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponentLeft); + HP_BAR(playerLeft, captureDamage: &results[i].dmgPyhsicalBefore); + ANIMATION(ANIM_TYPE_MOVE, MOVE_GUST, opponentRight); + HP_BAR(playerLeft, captureDamage: &results[i].dmgSpecialBefore); + + ANIMATION(ANIM_TYPE_MOVE, MOVE_STOCKPILE, playerLeft); + if (count != 1) { + ANIMATION(ANIM_TYPE_MOVE, MOVE_STOCKPILE, playerLeft); + if (count == 3) { + ANIMATION(ANIM_TYPE_MOVE, MOVE_STOCKPILE, playerLeft); + } + } + ANIMATION(ANIM_TYPE_MOVE, move, playerLeft); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); + if (count == 1) { + MESSAGE("Wobbuffet's Defense fell!"); + } + else if (count == 2) { + MESSAGE("Wobbuffet's Defense harshly fell!"); + } + else { + MESSAGE("Wobbuffet's Defense severely fell!"); + } + + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); + if (count == 1) { + MESSAGE("Wobbuffet's Sp. Def fell!"); + } + else if (count == 2) { + MESSAGE("Wobbuffet's Sp. Def harshly fell!"); + } + else { + MESSAGE("Wobbuffet's Sp. Def severely fell!"); + } + MESSAGE("Wobbuffet's stockpiled effect wore off!"); + + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponentLeft); + HP_BAR(playerLeft, captureDamage: &results[i].dmgPhysicalAfter); + ANIMATION(ANIM_TYPE_MOVE, MOVE_GUST, opponentRight); + HP_BAR(playerLeft, captureDamage: &results[i].dmgSpecialAfter); + } FINALLY { + EXPECT_MUL_EQ(results[0].dmgPyhsicalBefore, UQ_4_12(1.0), results[0].dmgPhysicalAfter); + EXPECT_MUL_EQ(results[0].dmgSpecialBefore, UQ_4_12(1.0), results[0].dmgSpecialAfter); + EXPECT_MUL_EQ(results[1].dmgPyhsicalBefore, UQ_4_12(1.0), results[1].dmgPhysicalAfter); + EXPECT_MUL_EQ(results[1].dmgSpecialBefore, UQ_4_12(1.0), results[1].dmgSpecialAfter); + EXPECT_MUL_EQ(results[2].dmgPyhsicalBefore, UQ_4_12(1.0), results[2].dmgPhysicalAfter); + EXPECT_MUL_EQ(results[2].dmgSpecialBefore, UQ_4_12(1.0), results[2].dmgSpecialAfter); + } +} + diff --git a/test/move_effect_tri_attack.c b/test/move_effect_tri_attack.c new file mode 100644 index 0000000000..c3fbfaaceb --- /dev/null +++ b/test/move_effect_tri_attack.c @@ -0,0 +1,135 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_TRI_ATTACK].effect == EFFECT_TRI_ATTACK); +} + +SINGLE_BATTLE_TEST("Tri Attack can inflict paralysis, burn or freeze") +{ + u8 statusAnim; + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; } + PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; } + PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; } + PASSES_RANDOMLY(1, 3, RNG_TRI_ATTACK); + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_TRI_ATTACK); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TRI_ATTACK, player); + HP_BAR(opponent); + ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent); + if (statusAnim == B_ANIM_STATUS_BRN) { + STATUS_ICON(opponent, burn: TRUE); + } + else if (statusAnim == B_ANIM_STATUS_FRZ) { + STATUS_ICON(opponent, freeze: TRUE); + } + else if (statusAnim == B_ANIM_STATUS_PRZ) { + STATUS_ICON(opponent, paralysis: TRUE); + } + } +} + +SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze electric/fire/ice types respectively") +{ + u8 statusAnim; + u16 species; + u32 rng; + #if B_PARALYZE_ELECTRIC >= GEN_6 + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; species = SPECIES_RAICHU;} + #endif // B_PARALYZE_ELECTRIC + PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = MOVE_EFFECT_BURN; species = SPECIES_ARCANINE; } + PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = MOVE_EFFECT_FREEZE; species = SPECIES_GLALIE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(species); + } WHEN { + TURN { MOVE(player, MOVE_TRI_ATTACK, WITH_RNG(RNG_TRI_ATTACK, rng)); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TRI_ATTACK, player); + HP_BAR(opponent); + NOT ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent); + if (statusAnim == B_ANIM_STATUS_BRN) { + NOT STATUS_ICON(opponent, burn: TRUE); + } + else if (statusAnim == B_ANIM_STATUS_FRZ) { + NOT STATUS_ICON(opponent, freeze: TRUE); + } + else if (statusAnim == B_ANIM_STATUS_PRZ) { + NOT STATUS_ICON(opponent, paralysis: TRUE); + } + } +} + +SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze pokemon with abilities preventing respective statuses") +{ + u8 statusAnim; + u16 species, ability; + u32 rng; + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; species = SPECIES_RAICHU; ability = ABILITY_LIGHTNING_ROD; } + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; species = SPECIES_JOLTEON; ability = ABILITY_VOLT_ABSORB; } + #if P_GEN_4_POKEMON == TRUE + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; species = SPECIES_ELECTIVIRE; ability = ABILITY_MOTOR_DRIVE; } + #endif // P_GEN_4_POKEMON + #if P_GEN_7_POKEMON == TRUE + PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = MOVE_EFFECT_BURN; species = SPECIES_DEWPIDER; ability = ABILITY_WATER_BUBBLE; } + #endif // P_GEN_7_POKEMON + PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = MOVE_EFFECT_BURN; species = SPECIES_SEAKING; ability = ABILITY_WATER_VEIL; } + PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = MOVE_EFFECT_FREEZE; species = SPECIES_CAMERUPT; ability = ABILITY_MAGMA_ARMOR; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(species) {Ability(ability);} + } WHEN { + TURN { MOVE(player, MOVE_TRI_ATTACK, WITH_RNG(RNG_TRI_ATTACK, rng)); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TRI_ATTACK, player); + HP_BAR(opponent); + NOT ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent); + if (statusAnim == B_ANIM_STATUS_BRN) { + NOT STATUS_ICON(opponent, burn: TRUE); + } + else if (statusAnim == B_ANIM_STATUS_FRZ) { + NOT STATUS_ICON(opponent, freeze: TRUE); + } + else if (statusAnim == B_ANIM_STATUS_PRZ) { + NOT STATUS_ICON(opponent, paralysis: TRUE); + } + } +} + +SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze a mon which is already statused") +{ + u8 statusAnim; + u32 rng; + PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; } + PARAMETRIZE { statusAnim = B_ANIM_STATUS_BRN; rng = MOVE_EFFECT_BURN; } + PARAMETRIZE { statusAnim = B_ANIM_STATUS_FRZ; rng = MOVE_EFFECT_FREEZE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET) {Status1(STATUS1_SLEEP);} + } WHEN { + TURN { MOVE(player, MOVE_TRI_ATTACK, WITH_RNG(RNG_TRI_ATTACK, rng)); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TRI_ATTACK, player); + HP_BAR(opponent); + NOT ANIMATION(ANIM_TYPE_STATUS, statusAnim, opponent); + if (statusAnim == B_ANIM_STATUS_BRN) { + NOT STATUS_ICON(opponent, burn: TRUE); + } + else if (statusAnim == B_ANIM_STATUS_FRZ) { + NOT STATUS_ICON(opponent, freeze: TRUE); + } + else if (statusAnim == B_ANIM_STATUS_PRZ) { + NOT STATUS_ICON(opponent, paralysis: TRUE); + } + } +} diff --git a/test/move_effect_venoshock.c b/test/move_effect_venoshock.c new file mode 100644 index 0000000000..876f611c93 --- /dev/null +++ b/test/move_effect_venoshock.c @@ -0,0 +1,27 @@ +#include "global.h" +#include "test_battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_VENOSHOCK].effect == EFFECT_VENOSHOCK); +} + +SINGLE_BATTLE_TEST("Venoshock's power doubles if the target is poisoned/badly poisoned", s16 damage) +{ + u32 status1; + PARAMETRIZE { status1 = 0; } + PARAMETRIZE { status1 = STATUS1_POISON; } + PARAMETRIZE { status1 = STATUS1_TOXIC_POISON; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET) {Status1(status1);} + } WHEN { + TURN { MOVE(player, MOVE_VENOSHOCK); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_VENOSHOCK, player); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[1].damage); + EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[2].damage); + } +} diff --git a/test/powder_moves.c b/test/powder_moves.c new file mode 100644 index 0000000000..cb0aee5282 --- /dev/null +++ b/test/powder_moves.c @@ -0,0 +1,47 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Powder Moves are blocked by Grass Types") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_STUN_SPORE].flags & FLAG_POWDER); + ASSUME(gSpeciesInfo[SPECIES_ODDISH].types[0] == TYPE_GRASS); + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_ODDISH); + } WHEN { + TURN { MOVE(player, MOVE_STUN_SPORE); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_STUN_SPORE, player); + MESSAGE("It doesn't affect Foe Oddish…"); + } +} + +SINGLE_BATTLE_TEST("Powder Moves are blocked by Ability Overcoat") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_STUN_SPORE].flags & FLAG_POWDER); + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_PINECO) { Ability(ABILITY_OVERCOAT);}; + } WHEN { + TURN { MOVE(player, MOVE_STUN_SPORE); } + } SCENE { + ABILITY_POPUP(opponent, ABILITY_OVERCOAT); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_STUN_SPORE, player); + MESSAGE("It doesn't affect Foe Pineco…"); + } +} + +SINGLE_BATTLE_TEST("Powder Moves are blocked by Item Safety Goggles") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_STUN_SPORE].flags & FLAG_POWDER); + ASSUME(gItems[ITEM_SAFETY_GOGGLES].holdEffect == HOLD_EFFECT_SAFETY_GOGGLES); + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_ABRA) { Item(ITEM_SAFETY_GOGGLES);}; + } WHEN { + TURN { MOVE(player, MOVE_STUN_SPORE); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_STUN_SPORE, player); + MESSAGE("Foe Abra is not affected thanks to its SafetyGoggles!"); + } +} diff --git a/test/random.c b/test/random.c new file mode 100644 index 0000000000..39f587c062 --- /dev/null +++ b/test/random.c @@ -0,0 +1,112 @@ +#include "global.h" +#include "test.h" +#include "random.h" + +TEST("RandomUniform generates lo..hi") +{ + u32 lo, hi, i; + PARAMETRIZE { lo = 0; hi = 1; } + PARAMETRIZE { lo = 0; hi = 2; } + PARAMETRIZE { lo = 0; hi = 3; } + PARAMETRIZE { lo = 2; hi = 4; } + for (i = 0; i < 1024; i++) + { + u32 r = RandomUniformDefault(RNG_NONE, lo, hi); + EXPECT(lo <= r && r <= hi); + } +} + +TEST("RandomWeighted generates 0..n-1") +{ + u32 n, sum, i; + static const u8 ws[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + PARAMETRIZE { n = 1; } + PARAMETRIZE { n = 2; } + PARAMETRIZE { n = 3; } + PARAMETRIZE { n = 4; } + ASSUME(n <= ARRAY_COUNT(ws)); + for (i = 0, sum = 0; i < n; i++) + sum += ws[i]; + for (i = 0; i < 1024; i++) + { + u32 r = RandomWeightedArrayDefault(RNG_NONE, sum, n, ws); + EXPECT(0 <= r && r < n); + } +} + +TEST("RandomElement generates an element") +{ + u32 i; + static const u8 es[4] = { 1, 2, 4, 8 }; + for (i = 0; i < 1024; i++) + { + u32 e = *(const u8 *)RandomElementArrayDefault(RNG_NONE, es, sizeof(es[0]), ARRAY_COUNT(es)); + EXPECT(e == 1 || e == 2 || e == 4 || e == 8); + } +} + +TEST("RandomUniform generates uniform distribution") +{ + u32 i, error; + u16 distribution[4]; + + memset(distribution, 0, sizeof(distribution)); + for (i = 0; i < 4096; i++) + { + u32 r = RandomUniformDefault(RNG_NONE, 0, ARRAY_COUNT(distribution) - 1); + EXPECT(0 <= r && r < ARRAY_COUNT(distribution)); + distribution[r]++; + } + + error = 0; + for (i = 0; i < ARRAY_COUNT(distribution); i++) + error += abs(UQ_4_12(0.25) - distribution[i]); + + EXPECT_LT(error, UQ_4_12(0.025)); +} + +TEST("RandomWeighted generates distribution in proportion to the weights") +{ + u32 i, sum, error; + static const u8 ws[4] = { 1, 2, 2, 3 }; + u16 distribution[ARRAY_COUNT(ws)]; + + for (i = 0, sum = 0; i < ARRAY_COUNT(ws); i++) + sum += ws[i]; + + memset(distribution, 0, sizeof(distribution)); + for (i = 0; i < 4096; i++) + { + u32 r = RandomWeightedArrayDefault(RNG_NONE, sum, ARRAY_COUNT(ws), ws); + EXPECT(0 <= r && r < ARRAY_COUNT(ws)); + distribution[r]++; + } + + error = 0; + error += abs(UQ_4_12(0.125) - distribution[0]); + error += abs(UQ_4_12(0.250) - distribution[1]); + error += abs(UQ_4_12(0.250) - distribution[2]); + error += abs(UQ_4_12(0.375) - distribution[3]); + + EXPECT_LT(error, UQ_4_12(0.025)); +} + +TEST("RandomElement generates a uniform distribution") +{ + u32 i, error; + static const u8 es[4] = { 1, 2, 4, 8 }; + u16 distribution[9]; + + memset(distribution, 0, sizeof(distribution)); + for (i = 0; i < 4096; i++) + { + u32 e = *(const u8 *)RandomElementArrayDefault(RNG_NONE, es, sizeof(es[0]), ARRAY_COUNT(es)); + distribution[e]++; + } + + error = 0; + for (i = 0; i < ARRAY_COUNT(es); i++) + error += abs(UQ_4_12(0.25) - distribution[es[i]]); + + EXPECT_LT(error, UQ_4_12(0.025)); +} diff --git a/test/status1.c b/test/status1.c index 63a9cd0414..c244b9a604 100644 --- a/test/status1.c +++ b/test/status1.c @@ -53,7 +53,7 @@ SINGLE_BATTLE_TEST("Burn deals 1/16th damage per turn") } } -SINGLE_BATTLE_TEST("Burn reduces attack by 50%", s16 damage) +SINGLE_BATTLE_TEST("Burn reduces Attack by 50%", s16 damage) { bool32 burned; PARAMETRIZE { burned = FALSE; } @@ -72,7 +72,7 @@ SINGLE_BATTLE_TEST("Burn reduces attack by 50%", s16 damage) SINGLE_BATTLE_TEST("Freeze has a 20% chance of being thawed") { - PASSES_RANDOMLY(20, 100); + PASSES_RANDOMLY(20, 100, RNG_FROZEN); GIVEN { PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_FREEZE); } OPPONENT(SPECIES_WOBBUFFET); @@ -90,9 +90,8 @@ SINGLE_BATTLE_TEST("Freeze is thawed by opponent's Fire-type attacks") PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_FREEZE); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { - TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_EMBER); } + TURN { MOVE(opponent, MOVE_EMBER); MOVE(player, MOVE_CELEBRATE); } } SCENE { - MESSAGE("Wobbuffet is frozen solid!"); MESSAGE("Foe Wobbuffet used Ember!"); MESSAGE("Wobbuffet was defrosted!"); STATUS_ICON(player, none: TRUE); @@ -114,7 +113,7 @@ SINGLE_BATTLE_TEST("Freeze is thawed by user's Flame Wheel") } } -SINGLE_BATTLE_TEST("Paralysis reduces speed by 50%") +SINGLE_BATTLE_TEST("Paralysis reduces Speed by 50%") { u16 playerSpeed; bool32 playerFirst; @@ -145,7 +144,7 @@ SINGLE_BATTLE_TEST("Paralysis reduces speed by 50%") SINGLE_BATTLE_TEST("Paralysis has a 25% chance of skipping the turn") { - PASSES_RANDOMLY(25, 100); + PASSES_RANDOMLY(25, 100, RNG_PARALYSIS); GIVEN { PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_PARALYSIS); } OPPONENT(SPECIES_WOBBUFFET); diff --git a/test/terrain_electric.c b/test/terrain_electric.c new file mode 100644 index 0000000000..bb397fdf9b --- /dev/null +++ b/test/terrain_electric.c @@ -0,0 +1,63 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Electric Terrain protects grounded battlers from falling asleep") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_CLAYDOL) { Ability(ABILITY_LEVITATE); } + } WHEN { + TURN { MOVE(player, MOVE_ELECTRIC_TERRAIN); MOVE(opponent, MOVE_SPORE); } + TURN { MOVE(player, MOVE_SPORE); } + } SCENE { + MESSAGE("Wobbuffet used ElctrcTrrain!"); + MESSAGE("Foe Claydol used Spore!"); + MESSAGE("Wobbuffet surrounds itself with electrified terrain!"); + MESSAGE("Wobbuffet used Spore!"); + MESSAGE("Foe Claydol fell asleep!"); + STATUS_ICON(opponent, sleep: TRUE); + } +} + +SINGLE_BATTLE_TEST("Electric Terrain activates Electric Seed and Mimicry") +{ + GIVEN { + ASSUME(P_GEN_8_POKEMON == TRUE); + ASSUME(gItems[ITEM_ELECTRIC_SEED].holdEffect == HOLD_EFFECT_SEEDS); + ASSUME(gItems[ITEM_ELECTRIC_SEED].holdEffectParam == HOLD_EFFECT_PARAM_ELECTRIC_TERRAIN); + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_ELECTRIC_SEED); } + OPPONENT(SPECIES_STUNFISK_GALARIAN) { Ability(ABILITY_MIMICRY); } + } WHEN { + TURN { MOVE(player, MOVE_ELECTRIC_TERRAIN); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Using Electric Seed, the Defense of Wobbuffet rose!"); + ABILITY_POPUP(opponent); + MESSAGE("Foe Stunfisk's type changed to Electr!"); + } FINALLY { + EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].type1, TYPE_ELECTRIC); + } +} + +SINGLE_BATTLE_TEST("Electric Terrain increases power of Electric-type moves by 30/50 percent", s16 damage) +{ + bool32 terrain; + PARAMETRIZE { terrain = FALSE; } + PARAMETRIZE { terrain = TRUE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (terrain) + TURN { MOVE(player, MOVE_ELECTRIC_TERRAIN); } + TURN { MOVE(player, MOVE_THUNDER_SHOCK); } + } SCENE { + MESSAGE("Wobbuffet used ThunderShock!"); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + if (B_TERRAIN_TYPE_BOOST >= GEN_8) + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.3), results[1].damage); + else + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + } +} diff --git a/test/terrain_grassy.c b/test/terrain_grassy.c new file mode 100644 index 0000000000..ae6e6d9e92 --- /dev/null +++ b/test/terrain_grassy.c @@ -0,0 +1,86 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Grassy Terrain recovers 1/16th HP at end of turn") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { MaxHP(100); HP(1); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_GRASSY_TERRAIN); } + } SCENE { + s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP); + MESSAGE("Wobbuffet is healed by the grassy terrain!"); + HP_BAR(player, damage: -maxHP / 16); + } +} + +SINGLE_BATTLE_TEST("Grassy Terrain activates Grassy Seed and Mimicry") +{ + GIVEN { + ASSUME(P_GEN_8_POKEMON == TRUE); + ASSUME(gItems[ITEM_GRASSY_SEED].holdEffect == HOLD_EFFECT_SEEDS); + ASSUME(gItems[ITEM_GRASSY_SEED].holdEffectParam == HOLD_EFFECT_PARAM_GRASSY_TERRAIN); + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_GRASSY_SEED); } + OPPONENT(SPECIES_STUNFISK_GALARIAN) { Ability(ABILITY_MIMICRY); } + } WHEN { + TURN { MOVE(player, MOVE_GRASSY_TERRAIN); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Using Grassy Seed, the Defense of Wobbuffet rose!"); + ABILITY_POPUP(opponent); + MESSAGE("Foe Stunfisk's type changed to Grass!"); + } FINALLY { + EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].type1, TYPE_GRASS); + } +} + +SINGLE_BATTLE_TEST("Grassy Terrain increases power of Grass-type moves by 30/50 percent", s16 damage) +{ + bool32 terrain; + PARAMETRIZE { terrain = FALSE; } + PARAMETRIZE { terrain = TRUE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (terrain) + TURN { MOVE(player, MOVE_GRASSY_TERRAIN); } + TURN { MOVE(player, MOVE_ABSORB); } + } SCENE { + MESSAGE("Wobbuffet used Absorb!"); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + if (B_TERRAIN_TYPE_BOOST >= GEN_8) + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.3), results[1].damage); + else + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + } +} + +// Magnitude is not tested because its damage is variable. +SINGLE_BATTLE_TEST("Grassy Terrain decreases power of Earthquake and Bulldoze by 50 percent", s16 damage) +{ + bool32 terrain; + u16 move; + PARAMETRIZE { terrain = FALSE; move = MOVE_EARTHQUAKE; } // 0 + PARAMETRIZE { terrain = TRUE; move = MOVE_EARTHQUAKE; } // 1 + PARAMETRIZE { terrain = FALSE; move = MOVE_BULLDOZE; } // 2 + PARAMETRIZE { terrain = TRUE; move = MOVE_BULLDOZE; } // 3 + GIVEN { + ASSUME(gBattleMoves[MOVE_EARTHQUAKE].effect == EFFECT_EARTHQUAKE); + ASSUME(gBattleMoves[MOVE_BULLDOZE].effect == EFFECT_BULLDOZE); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (terrain) + TURN { MOVE(player, MOVE_GRASSY_TERRAIN); } + TURN { MOVE(player, move); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, move, player); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.5), results[1].damage); + EXPECT_MUL_EQ(results[2].damage, Q_4_12(0.5), results[3].damage); + } +} diff --git a/test/terrain_misty.c b/test/terrain_misty.c new file mode 100644 index 0000000000..668b036992 --- /dev/null +++ b/test/terrain_misty.c @@ -0,0 +1,80 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Misty Terrain protects grounded battlers from non-volatile status conditions") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_CLAYDOL) { Ability(ABILITY_LEVITATE); } + } WHEN { + TURN { MOVE(player, MOVE_MISTY_TERRAIN); MOVE(opponent, MOVE_TOXIC); } + TURN { MOVE(player, MOVE_TOXIC); } + } SCENE { + MESSAGE("Wobbuffet used MistyTerrain!"); + MESSAGE("Foe Claydol used Toxic!"); + MESSAGE("Wobbuffet surrounds itself with a protective mist!"); + NOT { STATUS_ICON(opponent, badPoison: TRUE); } + MESSAGE("Wobbuffet used Toxic!"); + STATUS_ICON(opponent, badPoison: TRUE); + } +} + +SINGLE_BATTLE_TEST("Misty Terrain activates Misty Seed and Mimicry") +{ + GIVEN { + ASSUME(P_GEN_8_POKEMON == TRUE); + ASSUME(gItems[ITEM_MISTY_SEED].holdEffect == HOLD_EFFECT_SEEDS); + ASSUME(gItems[ITEM_MISTY_SEED].holdEffectParam == HOLD_EFFECT_PARAM_MISTY_TERRAIN); + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_MISTY_SEED); } + OPPONENT(SPECIES_STUNFISK_GALARIAN) { Ability(ABILITY_MIMICRY); } + } WHEN { + TURN { MOVE(player, MOVE_MISTY_TERRAIN); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Using Misty Seed, the Sp. Def of Wobbuffet rose!"); + ABILITY_POPUP(opponent); + MESSAGE("Foe Stunfisk's type changed to Fairy!"); + } FINALLY { + EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].type1, TYPE_FAIRY); + } +} + +SINGLE_BATTLE_TEST("Misty Terrain does not increase the power of Fairy-type moves", s16 damage) +{ + bool32 terrain; + PARAMETRIZE { terrain = FALSE; } + PARAMETRIZE { terrain = TRUE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (terrain) + TURN { MOVE(player, MOVE_MISTY_TERRAIN); } + TURN { MOVE(player, MOVE_MOONBLAST); } + } SCENE { + MESSAGE("Wobbuffet used Moonblast!"); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_EQ(results[0].damage, results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Misty Terrain decreases power of Dragon-type moves by 50 percent", s16 damage) +{ + bool32 terrain; + PARAMETRIZE { terrain = FALSE; } + PARAMETRIZE { terrain = TRUE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (terrain) + TURN { MOVE(player, MOVE_MISTY_TERRAIN); } + TURN { MOVE(player, MOVE_DRAGON_CLAW); } + } SCENE { + MESSAGE("Wobbuffet used Dragon Claw!"); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.5), results[1].damage); + } +} diff --git a/test/terrain_psychic.c b/test/terrain_psychic.c new file mode 100644 index 0000000000..2cddef070f --- /dev/null +++ b/test/terrain_psychic.c @@ -0,0 +1,138 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Psychic Terrain protects grounded battlers from priority moves") +{ + GIVEN { + PLAYER(SPECIES_CLAYDOL) { Ability(ABILITY_LEVITATE); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_PSYCHIC_TERRAIN); } + TURN { MOVE(player, MOVE_QUICK_ATTACK); MOVE(opponent, MOVE_QUICK_ATTACK); } + } SCENE { + MESSAGE("Claydol used PsychcTrrain!"); + MESSAGE("Claydol cannot use Quick Attack!"); + NOT { HP_BAR(opponent); } + MESSAGE("Foe Wobbuffet used Quick Attack!"); + HP_BAR(player); + } +} + +SINGLE_BATTLE_TEST("Psychic Terrain activates Psychic Seed and Mimicry") +{ + GIVEN { + ASSUME(P_GEN_8_POKEMON == TRUE); + ASSUME(gItems[ITEM_PSYCHIC_SEED].holdEffect == HOLD_EFFECT_SEEDS); + ASSUME(gItems[ITEM_PSYCHIC_SEED].holdEffectParam == HOLD_EFFECT_PARAM_PSYCHIC_TERRAIN); + PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_PSYCHIC_SEED); } + OPPONENT(SPECIES_STUNFISK_GALARIAN) { Ability(ABILITY_MIMICRY); } + } WHEN { + TURN { MOVE(player, MOVE_PSYCHIC_TERRAIN); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Using Psychic Seed, the Sp. Def of Wobbuffet rose!"); + ABILITY_POPUP(opponent); + MESSAGE("Foe Stunfisk's type changed to Psychc!"); + } FINALLY { + EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].type1, TYPE_PSYCHIC); + } +} + +SINGLE_BATTLE_TEST("Psychic Terrain increases power of Psychic-type moves by 30/50 percent", s16 damage) +{ + bool32 terrain; + PARAMETRIZE { terrain = FALSE; } + PARAMETRIZE { terrain = TRUE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (terrain) + TURN { MOVE(player, MOVE_PSYCHIC_TERRAIN); } + TURN { MOVE(player, MOVE_CONFUSION); } + } SCENE { + MESSAGE("Wobbuffet used Confusion!"); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + if (B_TERRAIN_TYPE_BOOST >= GEN_8) + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.3), results[1].damage); + else + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target the user", s16 damage) +{ + GIVEN { + PLAYER(SPECIES_SABLEYE) { Ability(ABILITY_PRANKSTER); HP(1); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_PSYCHIC_TERRAIN); } + TURN { MOVE(player, MOVE_RECOVER); } + } SCENE { + MESSAGE("Sableye used PsychcTrrain!"); + MESSAGE("Sableye used Recover!"); + HP_BAR(player); + } +} + +SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all battlers", s16 damage) +{ + KNOWN_FAILING; + GIVEN { + PLAYER(SPECIES_SABLEYE) { Ability(ABILITY_PRANKSTER); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_PSYCHIC_TERRAIN); } + TURN { MOVE(player, MOVE_HAZE); } + } SCENE { + MESSAGE("Sableye used PsychcTrrain!"); + MESSAGE("Sableye used Haze!"); + } +} + +SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target all opponents", s16 damage) +{ + KNOWN_FAILING; + GIVEN { + PLAYER(SPECIES_SABLEYE) { Ability(ABILITY_PRANKSTER); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_PSYCHIC_TERRAIN); } + TURN { MOVE(player, MOVE_SPIKES); } + } SCENE { + MESSAGE("Sableye used PsychcTrrain!"); + MESSAGE("Sableye used Spikes!"); + } +} + +DOUBLE_BATTLE_TEST("Psychic Terrain doesn't block priority moves that target allies", s16 damage) +{ + GIVEN { + PLAYER(SPECIES_SABLEYE) { Ability(ABILITY_PRANKSTER); } + PLAYER(SPECIES_WOBBUFFET) { HP(1); } + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(playerLeft, MOVE_PSYCHIC_TERRAIN); } + TURN { MOVE(playerLeft, MOVE_HEAL_PULSE, target: playerRight); } + } SCENE { + MESSAGE("Sableye used PsychcTrrain!"); + MESSAGE("Sableye used Heal Pulse!"); + } +} + +SINGLE_BATTLE_TEST("Psychic Terrain doesn't block priority field moves", s16 damage) +{ + KNOWN_FAILING; + GIVEN { + PLAYER(SPECIES_SABLEYE) { Ability(ABILITY_PRANKSTER); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_PSYCHIC_TERRAIN); } + TURN { MOVE(player, MOVE_SUNNY_DAY); } + } SCENE { + MESSAGE("Sableye used PsychcTrrain!"); + MESSAGE("Sableye used Sunny Day!"); + } +} diff --git a/test/test.h b/test/test.h index cbcf117178..dfa1f12b11 100644 --- a/test/test.h +++ b/test/test.h @@ -9,10 +9,11 @@ enum TestResult { TEST_RESULT_FAIL, TEST_RESULT_PASS, - TEST_RESULT_SKIP, + TEST_RESULT_ASSUMPTION_FAIL, TEST_RESULT_INVALID, TEST_RESULT_ERROR, TEST_RESULT_TIMEOUT, + TEST_RESULT_TODO, }; struct TestRunner @@ -39,7 +40,6 @@ struct TestRunnerState u8 exitCode; s32 tests; s32 passes; - s32 skips; const char *skipFilename; const struct Test *test; u32 processCosts[MAX_PROCESSES]; @@ -54,6 +54,16 @@ extern const u8 gTestRunnerI; extern const char gTestRunnerArgv[256]; extern const struct TestRunner gAssumptionsRunner; + +struct FunctionTestRunnerState +{ + u8 parameters; + u8 runParameter; +}; + +extern const struct TestRunner gFunctionTestRunner; +extern struct FunctionTestRunnerState *gFunctionTestRunnerState; + extern struct TestRunnerState gTestRunnerState; void CB2_TestRunner(void); @@ -63,6 +73,17 @@ void Test_ExitWithResult(enum TestResult, const char *fmt, ...); s32 MgbaPrintf_(const char *fmt, ...); +#define TEST(_name) \ + static void CAT(Test, __LINE__)(void); \ + __attribute__((section(".tests"))) static const struct Test CAT(sTest, __LINE__) = \ + { \ + .name = _name, \ + .filename = __FILE__, \ + .runner = &gFunctionTestRunner, \ + .data = (void *)CAT(Test, __LINE__), \ + }; \ + static void CAT(Test, __LINE__)(void) + #define ASSUMPTIONS \ static void Assumptions(void); \ __attribute__((section(".tests"))) static const struct Test sAssumptions = \ @@ -78,7 +99,7 @@ s32 MgbaPrintf_(const char *fmt, ...); do \ { \ if (!(c)) \ - Test_ExitWithResult(TEST_RESULT_SKIP, "%s:%d: ASSUME failed", gTestRunnerState.test->filename, __LINE__); \ + Test_ExitWithResult(TEST_RESULT_ASSUMPTION_FAIL, "%s:%d: ASSUME failed", gTestRunnerState.test->filename, __LINE__); \ } while (0) #define EXPECT(c) \ @@ -139,4 +160,12 @@ s32 MgbaPrintf_(const char *fmt, ...); #define KNOWN_FAILING \ Test_ExpectedResult(TEST_RESULT_FAIL) +#define PARAMETRIZE if (gFunctionTestRunnerState->parameters++ == gFunctionTestRunnerState->runParameter) + +#define TO_DO \ + Test_ExpectedResult(TEST_RESULT_TODO) + +#define EXPECT_TO_DO \ + Test_ExitWithResult(TEST_RESULT_TODO, "%s:%d: EXPECT_TO_DO", gTestRunnerState.test->filename, __LINE__) + #endif diff --git a/test/test_battle.h b/test/test_battle.h index 8fb1ce6d3e..967bb661dd 100644 --- a/test/test_battle.h +++ b/test/test_battle.h @@ -65,8 +65,9 @@ * single turn. MOVE causes the player to use Stun Spore and adds the * move to the Pokémon's moveset if an explicit Moves was not specified. * Pokémon that are not mentioned in a TURN use Celebrate. - * The test runner attempts to rig the RNG so that the first move used - * in a turn does not miss and activates its secondary effects (if any). + * The test runner rigs the RNG so that unless otherwise specified, + * moves always hit, never critical hit, always activate their secondary + * effects, and always roll the same damage modifier. * * SCENE describes the player-visible output of the battle. In this case * ANIMATION checks that the Stun Spore animation played, MESSAGE checks @@ -112,17 +113,17 @@ * NOT STATUS_ICON(opponent, paralysis: TRUE); to say that Oddish was * not paralyzed without specifying the exact outputs which led to that. * - * As a final example, to test that Howl works you might: - * 1. Put a Wobbuffet that knows Howl and Tackle in your party. + * As a final example, to test that Meditate works you might: + * 1. Put a Wobbuffet that knows Meditate and Tackle in your party. * 2. Battle a wild Wobbuffet. * 3. Use Tackle and note the amount the HP bar reduced. * 4. Battle a wild Wobbuffet. - * 5. Use Howl and that that the stat change animation and message play. + * 5. Use Meditate and that the stat change animation and message play. * 6. Use Tackle and check that the HP bar reduced by more than in 3. * * This can be translated to an automated test as follows: * - * SINGLE_BATTLE_TEST("Howl raises Attack", s16 damage) + * SINGLE_BATTLE_TEST("Meditate raises Attack", s16 damage) * { * bool32 raiseAttack; * PARAMETRIZE { raiseAttack = FALSE; } @@ -132,11 +133,11 @@ * PLAYER(SPECIES_WOBBUFFET); * OPPONENT(SPECIES_WOBBUFFET); * } WHEN { - * if (raiseAttack) TURN { MOVE(player, MOVE_HOWL); } // 5. + * if (raiseAttack) TURN { MOVE(player, MOVE_MEDITATE); } // 5. * TURN { MOVE(player, MOVE_TACKLE); } // 3 & 6. * } SCENE { * if (raiseAttack) { - * ANIMATION(ANIM_TYPE_MOVE, MOVE_HOWL, player); + * ANIMATION(ANIM_TYPE_MOVE, MOVE_MEDITATE, player); * ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); // 5. * MESSAGE("Wobbuffet's attack rose!"); // 5. * } @@ -159,7 +160,7 @@ * of the first battle (with a small tolerance to account for rounding). * * You might notice that all the tests check the outputs the player - * could see rather than the internal battle state. e.g. the Howl test + * could see rather than the internal battle state. e.g. the Meditate test * could have used gBattleMons[B_POSITION_OPPONENT_LEFT].hp instead of * using HP_BAR to capture the damage. This is a deliberate choice, by * checking what the player can observe the tests are more robust to @@ -228,12 +229,35 @@ * } * } * - * PASSES_RANDOMLY(successes, trials) - * Checks that the test passes approximately successes/trials. Used for - * testing RNG-based attacks, e.g.: + * PASSES_RANDOMLY(successes, trials, [tag]) + * Checks that the test passes successes/trials. If tag is provided, the + * test is run for each value that the tag can produce. For example, to + * check that Paralysis causes the turn to be skipped 25/100 times, we + * can write the following test that passes only if the Pokémon is fully + * paralyzed and specify that we expect it to pass 25/100 times when + * RNG_PARALYSIS varies: + * SINGLE_BATTLE_TEST("Paralysis has a 25% chance of skipping the turn") + * { + * PASSES_RANDOMLY(25, 100, RNG_PARALYSIS); + * GIVEN { + * PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_PARALYSIS); } + * OPPONENT(SPECIES_WOBBUFFET); + * } WHEN { + * TURN { MOVE(player, MOVE_CELEBRATE); } + * } SCENE { + * MESSAGE("Wobbuffet is paralyzed! It can't move!"); + * } + * } + * All BattleRandom calls involving tag will return the same number, so + * this cannot be used to have two moves independently hit or miss, for + * example. + * + * If the tag is not provided, runs the test 50 times and computes an + * approximate pass ratio. * PASSES_RANDOMLY(gBattleMoves[move].accuracy, 100); - * Note that PASSES_RANDOMLY makes the tests run very slowly and should - * be avoided where possible. + * Note that this mode of PASSES_RANDOMLY makes the tests run very + * slowly and should be avoided where possible. If the mechanic you are + * testing is missing its tag, you should add it. * * GIVEN * Contains the initial state of the parties before the battle. @@ -279,13 +303,14 @@ * The inference process is naive, if your test contains anything that * modifies the speed of a battler you should specify them explicitly. * - * MOVE(battler, move | moveSlot:, [megaEvolve:], [hit:], [criticalHit:], [target:], [allowed:]) + * MOVE(battler, move | moveSlot:, [megaEvolve:], [hit:], [criticalHit:], [target:], [allowed:], [WITH_RNG(tag, value]) * Used when the battler chooses Fight. Either the move ID or move slot * must be specified. megaEvolve: TRUE causes the battler to Mega Evolve * if able, hit: FALSE causes the move to miss, criticalHit: TRUE causes * the move to land a critical hit, target: is used in double battles to * choose the target (when necessary), and allowed: FALSE is used to - * reject an illegal move e.g. a Disabled one. + * reject an illegal move e.g. a Disabled one. WITH_RNG allows the move + * to specify an explicit outcome for an RNG tag. * MOVE(playerLeft, MOVE_TACKLE, target: opponentRight); * If the battler does not have an explicit Moves specified the moveset * will be populated based on the MOVEs it uses. @@ -308,6 +333,13 @@ * Used when the battler chooses to switch to another Pokémon but not * via Switch, e.g. after fainting or due to a U-turn. * SEND_OUT(player, 1); + * + * USE_ITEM(battler, itemId, [partyIndex:], [move:]) + * Used when the battler chooses to use an item from the Bag. The item + * ID must be specified, and party index and move slot if applicable, e.g: + * USE_ITEM(player, ITEM_X_ATTACK); + * USE_ITEM(player, ITEM_POTION, partyIndex: 0); + * USE_ITEM(player, ITEM_LEPPA_BERRY, partyIndex: 0, move: MOVE_TACKLE); * * SCENE * Contains an abridged description of the UI during the THEN. The order @@ -419,6 +451,7 @@ #include "battle_anim.h" #include "data.h" #include "item.h" +#include "random.h" #include "recorded_battle.h" #include "test.h" #include "util.h" @@ -433,7 +466,8 @@ // NOTE: If the stack is too small the test runner will probably crash // or loop. #define BATTLE_TEST_STACK_SIZE 1024 -#define MAX_QUEUED_EVENTS 16 +#define MAX_TURNS 16 +#define MAX_QUEUED_EVENTS 25 enum { BATTLE_TEST_SINGLES, BATTLE_TEST_DOUBLES }; @@ -512,6 +546,20 @@ struct QueuedEvent } as; }; +struct TurnRNG +{ + u16 tag; + u16 value; +}; + +struct BattlerTurn +{ + u8 hit:2; + u8 criticalHit:2; + u8 secondaryEffect:2; + struct TurnRNG rng; +}; + struct BattleTestData { u8 stack[BATTLE_TEST_STACK_SIZE]; @@ -533,14 +581,13 @@ struct BattleTestData u8 turns; u8 actionBattlers; u8 moveBattlers; - bool8 hasRNGActions:1; struct RecordedBattleSave recordedBattle; u8 battleRecordTypes[MAX_BATTLERS_COUNT][BATTLER_RECORD_SIZE]; u8 battleRecordSourceLineOffsets[MAX_BATTLERS_COUNT][BATTLER_RECORD_SIZE]; u16 recordIndexes[MAX_BATTLERS_COUNT]; + struct BattlerTurn battleRecordTurns[MAX_TURNS][MAX_BATTLERS_COUNT]; u8 lastActionTurn; - u8 nextRNGTurn; u8 queuedEventsCount; u8 queueGroupType; @@ -555,11 +602,12 @@ struct BattleTestRunnerState u8 parametersCount; // Valid only in BattleTest_Setup. u8 parameters; u8 runParameter; + u16 rngTag; u8 trials; - u8 expectedPasses; - u8 observedPasses; - u8 skippedTrials; u8 runTrial; + u16 expectedRatio; + u16 observedRatio; + u16 trialRatio; bool8 runRandomly:1; bool8 runGiven:1; bool8 runWhen:1; @@ -601,6 +649,15 @@ extern struct BattleTestRunnerState *gBattleTestRunnerState; /* Test */ +#define TO_DO_BATTLE_TEST(_name) \ + SINGLE_BATTLE_TEST("TODO: " _name) \ + { \ + TO_DO; \ + GIVEN { PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } \ + WHEN { TURN { } } \ + THEN { EXPECT_TO_DO; } \ + } + #define SINGLE_BATTLE_TEST(_name, ...) \ struct CAT(Result, __LINE__) { MEMBERS(__VA_ARGS__) }; \ static void CAT(Test, __LINE__)(struct CAT(Result, __LINE__) *, u32, struct BattlePokemon *, struct BattlePokemon *); \ @@ -639,13 +696,20 @@ extern struct BattleTestRunnerState *gBattleTestRunnerState; /* Parametrize */ +#undef PARAMETRIZE // Override test/test.h's implementation. + #define PARAMETRIZE if (gBattleTestRunnerState->parametersCount++ == i) /* Randomly */ -#define PASSES_RANDOMLY(passes, trials) for (; gBattleTestRunnerState->runRandomly; gBattleTestRunnerState->runRandomly = FALSE) Randomly(__LINE__, passes, trials) +#define PASSES_RANDOMLY(passes, trials, ...) for (; gBattleTestRunnerState->runRandomly; gBattleTestRunnerState->runRandomly = FALSE) Randomly(__LINE__, passes, trials, (struct RandomlyContext) { __VA_ARGS__ }) -void Randomly(u32 sourceLine, u32 passes, u32 trials); +struct RandomlyContext +{ + u16 tag; +}; + +void Randomly(u32 sourceLine, u32 passes, u32 trials, struct RandomlyContext); /* Given */ @@ -708,6 +772,8 @@ enum { TURN_CLOSED, TURN_OPEN, TURN_CLOSING }; #define SWITCH(battler, partyIndex) Switch(__LINE__, battler, partyIndex) #define SKIP_TURN(battler) SkipTurn(__LINE__, battler) #define SEND_OUT(battler, partyIndex) SendOut(__LINE__, battler, partyIndex) +#define USE_ITEM(battler, ...) UseItem(__LINE__, battler, (struct ItemContext) { APPEND_TRUE(__VA_ARGS__) }) +#define WITH_RNG(tag, value) rng: ((struct TurnRNG) { tag, value }) struct MoveContext { @@ -719,6 +785,8 @@ struct MoveContext u16 explicitHit:1; u16 criticalHit:1; u16 explicitCriticalHit:1; + u16 secondaryEffect:1; + u16 explicitSecondaryEffect:1; u16 megaEvolve:1; u16 explicitMegaEvolve:1; // TODO: u8 zMove:1; @@ -726,6 +794,18 @@ struct MoveContext u16 explicitAllowed:1; struct BattlePokemon *target; bool8 explicitTarget; + struct TurnRNG rng; + bool8 explicitRNG; +}; + +struct ItemContext +{ + u16 itemId; + u16 explicitItemId:1; + u16 partyIndex; + u16 explicitPartyIndex:1; + u16 move; + u16 explicitMove:1; }; void OpenTurn(u32 sourceLine); @@ -734,7 +814,7 @@ void Move(u32 sourceLine, struct BattlePokemon *, struct MoveContext); void ForcedMove(u32 sourceLine, struct BattlePokemon *); void Switch(u32 sourceLine, struct BattlePokemon *, u32 partyIndex); void SkipTurn(u32 sourceLine, struct BattlePokemon *); - +void UseItem(u32 sourceLine, struct BattlePokemon *, struct ItemContext); void SendOut(u32 sourceLine, struct BattlePokemon *, u32 partyIndex); /* Scene */ diff --git a/test/test_runner.c b/test/test_runner.c index a10a3a89d5..ef9f2da738 100644 --- a/test/test_runner.c +++ b/test/test_runner.c @@ -4,14 +4,16 @@ #include "gpu_regs.h" #include "main.h" #include "malloc.h" +#include "random.h" #include "test.h" #include "test_runner.h" -#define TIMEOUT_SECONDS 30 +#define TIMEOUT_SECONDS 55 void CB2_TestRunner(void); EWRAM_DATA struct TestRunnerState gTestRunnerState; +EWRAM_DATA struct FunctionTestRunnerState *gFunctionTestRunnerState; void TestRunner_Battle(const struct Test *); @@ -60,7 +62,6 @@ void CB2_TestRunner(void) gTestRunnerState.exitCode = 0; gTestRunnerState.tests = 0; gTestRunnerState.passes = 0; - gTestRunnerState.skips = 0; gTestRunnerState.skipFilename = NULL; gTestRunnerState.test = __start_tests - 1; break; @@ -70,20 +71,15 @@ void CB2_TestRunner(void) if (gTestRunnerState.test == __stop_tests) { - MgbaPrintf_("%s%d/%d PASSED\e[0m", gTestRunnerState.exitCode == 0 ? "\e[32m" : "\e[31m", gTestRunnerState.passes, gTestRunnerState.tests); - if (gTestRunnerState.skips) - { - if (gTestRunnerSkipIsFail) - MgbaPrintf_("\e[31m%d SKIPPED\e[0m", gTestRunnerState.skips); - else - MgbaPrintf_("%d SKIPPED", gTestRunnerState.skips); - } gTestRunnerState.state = STATE_EXIT; return; } - if (!PrefixMatch(gTestRunnerArgv, gTestRunnerState.test->name)) + if (gTestRunnerState.test->runner != &gAssumptionsRunner + && !PrefixMatch(gTestRunnerArgv, gTestRunnerState.test->name)) + { return; + } // Greedily assign tests to processes based on estimated cost. // TODO: Make processCosts a min heap. @@ -111,6 +107,7 @@ void CB2_TestRunner(void) return; } + MgbaPrintf_(":N%s", gTestRunnerState.test->name); gTestRunnerState.state = STATE_REPORT_RESULT; gTestRunnerState.result = TEST_RESULT_PASS; gTestRunnerState.expectedResult = TEST_RESULT_PASS; @@ -126,11 +123,10 @@ void CB2_TestRunner(void) // NOTE: Assumes that the compiler interns __FILE__. if (gTestRunnerState.skipFilename == gTestRunnerState.test->filename) { - gTestRunnerState.result = TEST_RESULT_SKIP; + gTestRunnerState.result = TEST_RESULT_ASSUMPTION_FAIL; } else { - MgbaPrintf_(":N%s", gTestRunnerState.test->name); if (gTestRunnerState.test->runner->setUp) gTestRunnerState.test->runner->setUp(gTestRunnerState.test->data); gTestRunnerState.test->runner->run(gTestRunnerState.test->data); @@ -150,12 +146,6 @@ void CB2_TestRunner(void) if (gTestRunnerState.result != TEST_RESULT_PASS) gTestRunnerState.skipFilename = gTestRunnerState.test->filename; } - else if (gTestRunnerState.result == TEST_RESULT_SKIP) - { - gTestRunnerState.skips++; - if (gTestRunnerSkipIsFail) - gTestRunnerState.exitCode = 1; - } else { const char *color; @@ -169,7 +159,7 @@ void CB2_TestRunner(void) color = "\e[32m"; MgbaPrintf_(":N%s", gTestRunnerState.test->name); } - else if (gTestRunnerState.result != TEST_RESULT_SKIP || gTestRunnerSkipIsFail) + else if (gTestRunnerState.result != TEST_RESULT_ASSUMPTION_FAIL || gTestRunnerSkipIsFail) { gTestRunnerState.exitCode = 1; color = "\e[31m"; @@ -187,16 +177,52 @@ void CB2_TestRunner(void) switch (gTestRunnerState.result) { - case TEST_RESULT_FAIL: result = "FAIL"; break; - case TEST_RESULT_PASS: result = "PASS"; break; - case TEST_RESULT_SKIP: result = "SKIP"; break; - case TEST_RESULT_INVALID: result = "INVALID"; break; - case TEST_RESULT_ERROR: result = "ERROR"; break; - case TEST_RESULT_TIMEOUT: result = "TIMEOUT"; break; - default: result = "UNKNOWN"; break; + case TEST_RESULT_FAIL: + if (gTestRunnerState.expectedResult == TEST_RESULT_FAIL) + { + result = "KNOWN_FAILING"; + color = "\e[33m"; + } + else + { + result = "FAIL"; + } + break; + case TEST_RESULT_PASS: + result = "PASS"; + break; + case TEST_RESULT_ASSUMPTION_FAIL: + result = "ASSUMPTION_FAIL"; + color = "\e[33m"; + break; + case TEST_RESULT_TODO: + result = "TO_DO"; + color = "\e[33m"; + break; + case TEST_RESULT_INVALID: + result = "INVALID"; + break; + case TEST_RESULT_ERROR: + result = "ERROR"; + break; + case TEST_RESULT_TIMEOUT: + result = "TIMEOUT"; + break; + default: + result = "UNKNOWN"; + break; } - MgbaPrintf_(":R%s%s\e[0m", color, result); + if (gTestRunnerState.result == TEST_RESULT_PASS) + MgbaPrintf_(":P%s%s\e[0m", color, result); + else if (gTestRunnerState.result == TEST_RESULT_ASSUMPTION_FAIL) + MgbaPrintf_(":A%s%s\e[0m", color, result); + else if (gTestRunnerState.result == TEST_RESULT_TODO) + MgbaPrintf_(":T%s%s\e[0m", color, result); + else if (gTestRunnerState.expectedResult == gTestRunnerState.result) + MgbaPrintf_(":K%s%s\e[0m", color, result); + else + MgbaPrintf_(":F%s%s\e[0m", color, result); } break; @@ -212,6 +238,38 @@ void Test_ExpectedResult(enum TestResult result) gTestRunnerState.expectedResult = result; } +static void FunctionTest_SetUp(void *data) +{ + (void)data; + gFunctionTestRunnerState = AllocZeroed(sizeof(*gFunctionTestRunnerState)); + SeedRng(0); +} + +static void FunctionTest_Run(void *data) +{ + void (*function)(void) = data; + do + { + if (gFunctionTestRunnerState->parameters) + MgbaPrintf_(":N%s %d/%d", gTestRunnerState.test->name, gFunctionTestRunnerState->runParameter + 1, gFunctionTestRunnerState->parameters); + gFunctionTestRunnerState->parameters = 0; + function(); + } while (++gFunctionTestRunnerState->runParameter < gFunctionTestRunnerState->parameters); +} + +static void FunctionTest_TearDown(void *data) +{ + (void)data; + FREE_AND_SET_NULL(gFunctionTestRunnerState); +} + +const struct TestRunner gFunctionTestRunner = +{ + .setUp = FunctionTest_SetUp, + .run = FunctionTest_Run, + .tearDown = FunctionTest_TearDown, +}; + static void Assumptions_Run(void *data) { void (*function)(void) = data; @@ -270,11 +328,12 @@ static void Intr_Timer2(void) void Test_ExitWithResult(enum TestResult result, const char *fmt, ...) { + bool32 handled = FALSE; gTestRunnerState.result = result; ReinitCallbacks(); - if (gTestRunnerState.test->runner->handleExitWithResult - && !gTestRunnerState.test->runner->handleExitWithResult(gTestRunnerState.test->data, result) - && gTestRunnerState.result != gTestRunnerState.expectedResult) + if (gTestRunnerState.test->runner->handleExitWithResult) + handled = gTestRunnerState.test->runner->handleExitWithResult(gTestRunnerState.test->data, result); + if (!handled && gTestRunnerState.result != gTestRunnerState.expectedResult) { va_list va; va_start(va, fmt); diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index e40ed3e50b..365120f137 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -3,6 +3,7 @@ #include "battle_anim.h" #include "battle_controllers.h" #include "characters.h" +#include "item_menu.h" #include "main.h" #include "malloc.h" #include "random.h" @@ -15,26 +16,10 @@ #define STATE gBattleTestRunnerState #define DATA gBattleTestRunnerState->data -/* RNG seeds for controlling the first move of the turn. - * Found via brute force. */ +#define RNG_SEED_DEFAULT 0x00000000 -/* Default seed, triggers most things. - * The 1st roll % 100 is <= 29, to make 30%+ accuracycheck pass. - * The 2nd roll is not a critical hit at the regular crit stage. - * The 3rd roll is consumed by damagecalc. - * The 4th roll is consumed by adjustdamage. - * The 5th roll % 100 is <= 9, to make 10%+ seteffectwithchance pass - * and % 3 is == 0, to make Poison Point and other 1/3s pass. */ -#define RNG_SEED_DEFAULT 0x000002BE - -/* Causes the first attack to critical hit if B_CRIT_CHANCE >= GEN_6. - * The 2nd roll % 24 == 0 to be a critical hit at any stage. - * The other rolls match RNG_SEED_DEFAULT. */ -#define RNG_SEED_CRITICAL_HIT 0x0000A9F4 - -/* Causes the first attack to miss if possible. - * The 1st roll % 100 is 99, to make 99%- accuracycheck fail. */ -#define RNG_SEED_MISS 0x00000074 +#undef Q_4_12 +#define Q_4_12(n) (s32)((n) * 4096) EWRAM_DATA struct BattleTestRunnerState *gBattleTestRunnerState = NULL; @@ -129,12 +114,13 @@ static u32 BattleTest_EstimateCost(void *data) if (!STATE) return 0; STATE->runRandomly = TRUE; - DATA.recordedBattle.rngSeed = RNG_SEED_DEFAULT; InvokeTestFunction(test); cost = 1; if (STATE->parametersCount != 0) cost *= STATE->parametersCount; - if (STATE->trials != 0) + if (STATE->trials == 1) + cost *= 3; + else if (STATE->trials > 1) cost *= STATE->trials; FREE_AND_SET_NULL(STATE); return cost; @@ -162,6 +148,28 @@ static void BattleTest_SetUp(void *data) } } +static void PrintTestName(void) +{ + if (STATE->trials && STATE->parameters) + { + if (STATE->trials == 1) + MgbaPrintf_(":N%s %d/%d (%d/?)", gTestRunnerState.test->name, STATE->runParameter + 1, STATE->parameters, STATE->runTrial + 1); + else + MgbaPrintf_(":N%s %d/%d (%d/%d)", gTestRunnerState.test->name, STATE->runParameter + 1, STATE->parameters, STATE->runTrial + 1, STATE->trials); + } + else if (STATE->trials) + { + if (STATE->trials == 1) + MgbaPrintf_(":N%s (%d/?)", gTestRunnerState.test->name, STATE->runTrial + 1); + else + MgbaPrintf_(":N%s (%d/%d)", gTestRunnerState.test->name, STATE->runTrial + 1, STATE->trials); + } + else if (STATE->parameters) + { + MgbaPrintf_(":N%s %d/%d", gTestRunnerState.test->name, STATE->runParameter + 1, STATE->parameters); + } +} + // This does not take into account priority, statuses, or any other // modifiers. static void SetImplicitSpeeds(void) @@ -280,12 +288,149 @@ static void BattleTest_Run(void *data) STATE->checkProgressTrial = 0; STATE->checkProgressTurn = 0; - if (STATE->trials && STATE->parameters) - MgbaPrintf_(":N%s %d/%d (%d/%d)", gTestRunnerState.test->name, STATE->runParameter + 1, STATE->parameters, STATE->runTrial + 1, STATE->trials); - else if (STATE->trials) - MgbaPrintf_(":N%s (%d/%d)", gTestRunnerState.test->name, STATE->runTrial + 1, STATE->trials); - else if (STATE->parameters) - MgbaPrintf_(":N%s %d/%d", gTestRunnerState.test->name, STATE->runParameter + 1, STATE->parameters); + PrintTestName(); +} + +u32 RandomUniform(enum RandomTag tag, u32 lo, u32 hi) +{ + const struct BattlerTurn *turn = NULL; + u32 default_ = hi; + + if (gCurrentTurnActionNumber < gBattlersCount) + { + u32 battlerId = gBattlerByTurnOrder[gCurrentTurnActionNumber]; + turn = &DATA.battleRecordTurns[gBattleResults.battleTurnCounter][battlerId]; + } + + if (turn && turn->rng.tag == tag) + { + default_ = turn->rng.value; + } + + if (tag == STATE->rngTag) + { + u32 n = hi - lo + 1; + if (STATE->trials == 1) + { + STATE->trials = n; + PrintTestName(); + } + else if (STATE->trials != n) + { + Test_ExitWithResult(TEST_RESULT_ERROR, "RandomUniform called with inconsistent trials %d and %d", STATE->trials, n); + } + STATE->trialRatio = Q_4_12(1) / n; + return STATE->runTrial + lo; + } + + return default_; +} + +u32 RandomWeightedArray(enum RandomTag tag, u32 sum, u32 n, const u8 *weights) +{ + const struct BattlerTurn *turn = NULL; + u32 default_ = n-1; + + if (gCurrentTurnActionNumber < gBattlersCount) + { + u32 battlerId = gBattlerByTurnOrder[gCurrentTurnActionNumber]; + turn = &DATA.battleRecordTurns[gBattleResults.battleTurnCounter][battlerId]; + } + + if (turn && turn->rng.tag == tag) + { + default_ = turn->rng.value; + } + else + { + switch (tag) + { + case RNG_ACCURACY: + ASSUME(n == 2); + if (turn && turn->hit) + return turn->hit - 1; + default_ = TRUE; + break; + + case RNG_CRITICAL_HIT: + ASSUME(n == 2); + if (turn && turn->criticalHit) + return turn->criticalHit - 1; + default_ = FALSE; + break; + + case RNG_SECONDARY_EFFECT: + ASSUME(n == 2); + if (turn && turn->secondaryEffect) + return turn->secondaryEffect - 1; + default_ = TRUE; + break; + } + } + + if (tag == STATE->rngTag) + { + if (STATE->trials == 1) + { + STATE->trials = n; + PrintTestName(); + } + else if (STATE->trials != n) + { + Test_ExitWithResult(TEST_RESULT_ERROR, "RandomWeighted called with inconsistent trials %d and %d", STATE->trials, n); + } + // TODO: Detect inconsistent sum. + STATE->trialRatio = Q_4_12(weights[STATE->runTrial]) / sum; + return STATE->runTrial; + } + + return default_; +} + +const void *RandomElementArray(enum RandomTag tag, const void *array, size_t size, size_t count) +{ + const struct BattlerTurn *turn = NULL; + u32 index = count-1; + + if (gCurrentTurnActionNumber < gBattlersCount) + { + u32 battlerId = gBattlerByTurnOrder[gCurrentTurnActionNumber]; + turn = &DATA.battleRecordTurns[gBattleResults.battleTurnCounter][battlerId]; + } + + if (turn && turn->rng.tag == tag) + { + u32 element; + for (index = 0; index < count; index++) + { + memcpy(&element, (const u8 *)array + size * index, size); + if (element == turn->rng.value) + break; + } + if (index == count) + { + // TODO: Incorporate the line number. + const char *filename = gTestRunnerState.test->filename; + Test_ExitWithResult(TEST_RESULT_ERROR, "%s: RandomElement illegal value requested: %d", filename, turn->rng.value); + } + } + + if (tag == STATE->rngTag) + { + if (STATE->trials == 1) + { + STATE->trials = count; + PrintTestName(); + } + else if (STATE->trials != count) + { + Test_ExitWithResult(TEST_RESULT_ERROR, "RandomElement called with inconsistent trials %d and %d", STATE->trials, count); + } + STATE->trialRatio = Q_4_12(1) / count; + index = STATE->runTrial; + } + + return (const u8 *)array + size * index; } static s32 TryAbilityPopUp(s32 i, s32 n, u32 battlerId, u32 ability) @@ -711,42 +856,36 @@ static void CB2_BattleTest_NextTrial(void) SetMainCallback2(CB2_BattleTest_NextParameter); + switch (gTestRunnerState.result) + { + case TEST_RESULT_FAIL: + break; + case TEST_RESULT_PASS: + STATE->observedRatio += STATE->trialRatio; + break; + default: + return; + } + if (STATE->rngTag) + STATE->trialRatio = 0; + if (++STATE->runTrial < STATE->trials) { - switch (gTestRunnerState.result) - { - case TEST_RESULT_FAIL: - break; - case TEST_RESULT_PASS: - STATE->observedPasses++; - break; - case TEST_RESULT_SKIP: - STATE->skippedTrials++; - if (STATE->skippedTrials > STATE->trials / 4) - Test_ExitWithResult(TEST_RESULT_INVALID, "25%% of the trials were SKIPed"); - break; - default: - return; - } - if (STATE->parameters) - MgbaPrintf_(":N%s %d/%d (%d/%d)", gTestRunnerState.test->name, STATE->runParameter + 1, STATE->parameters, STATE->runTrial + 1, STATE->trials); - else - MgbaPrintf_(":N%s (%d/%d)", gTestRunnerState.test->name, STATE->runTrial + 1, STATE->trials); - gTestRunnerState.result = TEST_RESULT_PASS; + PrintTestName(); + gTestRunnerState.result = TEST_RESULT_PASS; DATA.recordedBattle.rngSeed = ISO_RANDOMIZE1(STATE->runTrial); DATA.queuedEvent = 0; DATA.lastActionTurn = 0; - DATA.nextRNGTurn = 0; SetVariablesForRecordedBattle(&DATA.recordedBattle); SetMainCallback2(CB2_InitBattle); } else { - // This is a tolerance of +/- 4%. - if (abs(STATE->observedPasses - STATE->expectedPasses) <= 2) + // This is a tolerance of +/- ~2%. + if (abs(STATE->observedRatio - STATE->expectedRatio) <= Q_4_12(0.02)) gTestRunnerState.result = TEST_RESULT_PASS; else - Test_ExitWithResult(TEST_RESULT_FAIL, "Expected %d/%d passes, observed %d/%d", STATE->expectedPasses, STATE->trials, STATE->observedPasses, STATE->trials); + Test_ExitWithResult(TEST_RESULT_FAIL, "Expected %q passes/successes, observed %q", STATE->expectedRatio, STATE->observedRatio); } } @@ -773,7 +912,8 @@ static bool32 BattleTest_CheckProgress(void *data) static bool32 BattleTest_HandleExitWithResult(void *data, enum TestResult result) { - if (result != TEST_RESULT_INVALID + if (result != TEST_RESULT_ASSUMPTION_FAIL + && result != TEST_RESULT_INVALID && result != TEST_RESULT_ERROR && result != TEST_RESULT_TIMEOUT && STATE->runTrial < STATE->trials) @@ -787,16 +927,25 @@ static bool32 BattleTest_HandleExitWithResult(void *data, enum TestResult result } } -void Randomly(u32 sourceLine, u32 passes, u32 trials) +void Randomly(u32 sourceLine, u32 passes, u32 trials, struct RandomlyContext ctx) { - INVALID_IF(DATA.recordedBattle.rngSeed != RNG_SEED_DEFAULT, "RNG seed already set"); - // This is a precision of 2%. - STATE->trials = 50; - STATE->expectedPasses = STATE->trials * passes / trials; - STATE->observedPasses = 0; - STATE->skippedTrials = 0; + INVALID_IF(passes > trials, "%d passes specified, but only %d trials", passes, trials); + STATE->rngTag = ctx.tag; STATE->runTrial = 0; - DATA.recordedBattle.rngSeed = 0; + STATE->expectedRatio = Q_4_12(passes) / trials; + STATE->observedRatio = 0; + if (STATE->rngTag) + { + STATE->trials = 1; + STATE->trialRatio = Q_4_12(1); + } + else + { + INVALID_IF(DATA.recordedBattle.rngSeed != RNG_SEED_DEFAULT, "RNG seed already set"); + STATE->trials = 50; + STATE->trialRatio = Q_4_12(1) / STATE->trials; + DATA.recordedBattle.rngSeed = 0; + } } void RNGSeed_(u32 sourceLine, u32 seed) @@ -1025,6 +1174,31 @@ void Status1_(u32 sourceLine, u32 status1) SetMonData(DATA.currentMon, MON_DATA_STATUS, &status1); } +static const char *const sBattlerIdentifiersSingles[] = +{ + "player", + "opponent", +}; + +static const char *const sBattlerIdentifiersDoubles[] = +{ + "playerLeft", + "opponentLeft", + "playerRight", + "opponentRight", +}; + +static const char *BattlerIdentifier(s32 battlerId) +{ + const struct BattleTest *test = gTestRunnerState.test->data; + switch (test->type) + { + case BATTLE_TEST_SINGLES: return sBattlerIdentifiersSingles[battlerId]; + case BATTLE_TEST_DOUBLES: return sBattlerIdentifiersDoubles[battlerId]; + } + return ""; +} + static void PushBattlerAction(u32 sourceLine, s32 battlerId, u32 actionType, u32 byte) { u32 recordIndex = DATA.recordIndexes[battlerId]++; @@ -1037,16 +1211,6 @@ static void PushBattlerAction(u32 sourceLine, s32 battlerId, u32 actionType, u32 void BattleTest_CheckBattleRecordActionType(u32 battlerId, u32 recordIndex, u32 actionType) { - // TODO: Support explicit seeds for each turn? - if (DATA.nextRNGTurn == gBattleResults.battleTurnCounter - && (DATA.recordedBattle.rngSeed == RNG_SEED_DEFAULT - || DATA.recordedBattle.rngSeed == RNG_SEED_CRITICAL_HIT - || DATA.recordedBattle.rngSeed == RNG_SEED_MISS)) - { - gRngValue = DATA.recordedBattle.rngSeed; - DATA.nextRNGTurn++; - } - // An illegal move choice will cause the battle to request a new // move slot and target. This detects the move slot. if (actionType == RECORDED_MOVE_SLOT @@ -1088,6 +1252,9 @@ void BattleTest_CheckBattleRecordActionType(u32 battlerId, u32 recordIndex, u32 case B_ACTION_SWITCH: actualMacro = "SWITCH"; break; + case B_ACTION_USE_ITEM: + actualMacro = "USE_ITEM"; + break; } break; case RECORDED_PARTY_INDEX: @@ -1122,10 +1289,11 @@ void BattleTest_CheckBattleRecordActionType(u32 battlerId, u32 recordIndex, u32 void OpenTurn(u32 sourceLine) { INVALID_IF(DATA.turnState != TURN_CLOSED, "Nested TURN"); + if (DATA.turns == MAX_TURNS) + Test_ExitWithResult(TEST_RESULT_ERROR, "%s:%d: TURN exceeds MAX_TURNS", gTestRunnerState.test->filename, sourceLine); DATA.turnState = TURN_OPEN; DATA.actionBattlers = 0x00; DATA.moveBattlers = 0x00; - DATA.hasRNGActions = FALSE; } static void SetSlowerThan(s32 battlerId) @@ -1195,7 +1363,6 @@ void Move(u32 sourceLine, struct BattlePokemon *battler, struct MoveContext ctx) else if (moveId == MOVE_NONE) { INVALID_IF(DATA.explicitMoves[battlerId & BIT_SIDE] & (1 << DATA.currentMonIndexes[battlerId]), "Missing explicit %S", gMoveNames[ctx.move]); - INVALID_IF(i == MAX_MON_MOVES, "Too many different moves"); SetMonData(mon, MON_DATA_MOVE1 + i, &ctx.move); SetMonData(DATA.currentMon, MON_DATA_PP1 + i, &gBattleMoves[ctx.move].pp); moveSlot = i; @@ -1203,6 +1370,7 @@ void Move(u32 sourceLine, struct BattlePokemon *battler, struct MoveContext ctx) break; } } + INVALID_IF(i == MAX_MON_MOVES, "Too many different moves for %s", BattlerIdentifier(battlerId)); } else if (ctx.explicitMoveSlot) { @@ -1227,6 +1395,7 @@ void Move(u32 sourceLine, struct BattlePokemon *battler, struct MoveContext ctx) const struct BattleMove *move = &gBattleMoves[moveId]; if (move->target == MOVE_TARGET_RANDOM || move->target == MOVE_TARGET_BOTH + || move->target == MOVE_TARGET_DEPENDS || move->target == MOVE_TARGET_FOES_AND_ALLY || move->target == MOVE_TARGET_OPPONENTS_FIELD || move->target == MOVE_TARGET_ALL_BATTLERS) @@ -1253,21 +1422,14 @@ void Move(u32 sourceLine, struct BattlePokemon *battler, struct MoveContext ctx) } } - if (ctx.explicitHit && !ctx.hit) - { - if (DATA.hasRNGActions != 0) - Test_ExitWithResult(TEST_RESULT_ERROR, "%s:%d: hit only supported on the first move", gTestRunnerState.test->filename, sourceLine); - INVALID_IF(DATA.recordedBattle.rngSeed != RNG_SEED_DEFAULT, "RNG seed already set"); - DATA.recordedBattle.rngSeed = RNG_SEED_MISS; - } - - if (ctx.explicitCriticalHit && ctx.criticalHit) - { - if (DATA.hasRNGActions != 0) - Test_ExitWithResult(TEST_RESULT_ERROR, "%s:%d: criticalHit only supported on the first move", gTestRunnerState.test->filename, sourceLine); - INVALID_IF(DATA.recordedBattle.rngSeed != RNG_SEED_DEFAULT, "RNG seed already set"); - DATA.recordedBattle.rngSeed = RNG_SEED_CRITICAL_HIT; - } + if (ctx.explicitHit) + DATA.battleRecordTurns[DATA.turns][battlerId].hit = 1 + ctx.hit; + if (ctx.explicitCriticalHit) + DATA.battleRecordTurns[DATA.turns][battlerId].criticalHit = 1 + ctx.criticalHit; + if (ctx.explicitSecondaryEffect) + DATA.battleRecordTurns[DATA.turns][battlerId].secondaryEffect = 1 + ctx.secondaryEffect; + if (ctx.explicitRNG) + DATA.battleRecordTurns[DATA.turns][battlerId].rng = ctx.rng; if (!(DATA.actionBattlers & (1 << battlerId))) { @@ -1288,14 +1450,6 @@ void Move(u32 sourceLine, struct BattlePokemon *battler, struct MoveContext ctx) DATA.actionBattlers |= 1 << battlerId; DATA.moveBattlers |= 1 << battlerId; } - - // WARNING: Approximation. The move could still cause the RNG to - // advance. - if (gBattleMoves[moveId].accuracy != 0 - || gBattleMoves[moveId].split != SPLIT_STATUS) - { - DATA.hasRNGActions = TRUE; - } } void ForcedMove(u32 sourceLine, struct BattlePokemon *battler) @@ -1358,6 +1512,40 @@ void SendOut(u32 sourceLine, struct BattlePokemon *battler, u32 partyIndex) DATA.currentMonIndexes[battlerId] = partyIndex; } +void UseItem(u32 sourceLine, struct BattlePokemon *battler, struct ItemContext ctx) +{ + s32 i; + s32 battlerId = battler - gBattleMons; + bool32 requirePartyIndex = ItemId_GetType(ctx.itemId) == ITEM_USE_PARTY_MENU || ItemId_GetType(ctx.itemId) == ITEM_USE_PARTY_MENU_MOVES; + // Check general bad use. + INVALID_IF(DATA.turnState == TURN_CLOSED, "USE_ITEM outside TURN"); + INVALID_IF(DATA.actionBattlers & (1 << battlerId), "Multiple battler actions"); + INVALID_IF(ctx.itemId >= ITEMS_COUNT, "Illegal item: %d", ctx.itemId); + // Check party menu items. + INVALID_IF(requirePartyIndex && !ctx.explicitPartyIndex, "%S requires explicit party index", ItemId_GetName(ctx.itemId)); + INVALID_IF(requirePartyIndex && ctx.partyIndex >= ((battlerId & BIT_SIDE) == B_SIDE_PLAYER ? DATA.playerPartySize : DATA.opponentPartySize), \ + "USE_ITEM to invalid party index"); + // Check move slot items. + if (ItemId_GetType(ctx.itemId) == ITEM_USE_PARTY_MENU_MOVES) + { + INVALID_IF(!ctx.explicitMove, "%S requires an explicit move", ItemId_GetName(ctx.itemId)); + for (i = 0; i < MAX_MON_MOVES; i++) + { + if (GetMonData(CurrentMon(battlerId), MON_DATA_MOVE1 + i, NULL) == ctx.move) + break; + } + INVALID_IF(i == MAX_MON_MOVES, "USE_ITEM on invalid move: %d", ctx.move); + } + PushBattlerAction(sourceLine, battlerId, RECORDED_ACTION_TYPE, B_ACTION_USE_ITEM); + PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_ID, (ctx.itemId >> 8) & 0xFF); + PushBattlerAction(sourceLine, battlerId, RECORDED_ITEM_ID, ctx.itemId & 0xFF); + if (ctx.explicitPartyIndex) + gBattleStruct->itemPartyIndex[battlerId] = ctx.partyIndex; + if (ctx.explicitMove) + gBattleStruct->itemPartyIndex[battlerId] = i; + DATA.actionBattlers |= 1 << battlerId; +} + static const char *const sQueueGroupTypeMacros[] = { [QUEUE_GROUP_NONE] = NULL, diff --git a/test/trainer_control.c b/test/trainer_control.c new file mode 100644 index 0000000000..2a21dcdf61 --- /dev/null +++ b/test/trainer_control.c @@ -0,0 +1,140 @@ +#include "global.h" +#include "test.h" +#include "battle.h" +#include "battle_main.h" +#include "data.h" +#include "malloc.h" +#include "string_util.h" +#include "constants/item.h" +#include "constants/abilities.h" +#include "constants/trainers.h" +#include "constants/battle.h" + + +static const struct TrainerMonCustomized sTestParty1[] = +{ + { + .species = SPECIES_WOBBUFFET, + .ball = ITEM_MASTER_BALL, + .ability = ABILITY_TELEPATHY, + .friendship = 42, + .gender = TRAINER_MON_FEMALE, + .heldItem = ITEM_ASSAULT_VEST, + .isShiny = TRUE, + .iv = TRAINER_PARTY_IVS(25,26,27,28,29,30), + .ev = TRAINER_PARTY_EVS(252, 0, 0, 252, 4, 0), + .lvl = 67, + .moves = {MOVE_AIR_SLASH, MOVE_BARRIER, MOVE_SOLAR_BEAM, MOVE_EXPLOSION}, + .nature = TRAINER_PARTY_NATURE(NATURE_HASTY), + .nickname = COMPOUND_STRING("Bubbles") + }, + { + .species = SPECIES_WOBBUFFET, + .ability = ABILITY_SHADOW_TAG, + .lvl = 5, + }, +}; + +static const struct TrainerMonNoItemDefaultMoves sTestParty2[] = +{ + { + .species = SPECIES_WOBBUFFET, + .lvl = 5, + }, + { + .species = SPECIES_WOBBUFFET, + .lvl = 6, + } +}; + +static const struct Trainer sTestTrainer1 = +{ + .trainerName = _("Test1"), + .party = EVERYTHING_CUSTOMIZED(sTestParty1), +}; + +static const struct Trainer sTestTrainer2 = +{ + .trainerName = _("Test2"), + .party = NO_ITEM_DEFAULT_MOVES(sTestParty2), +}; + +TEST("CreateNPCTrainerPartyForTrainer generates customized Pokémon") +{ + struct Pokemon *testParty = Alloc(6 * sizeof(struct Pokemon)); + u8 nickBuffer[20]; + CreateNPCTrainerPartyFromTrainer(testParty, &sTestTrainer1, TRUE, BATTLE_TYPE_TRAINER); + EXPECT(IsMonShiny(&testParty[0])); + EXPECT(!IsMonShiny(&testParty[1])); + + EXPECT(GetMonData(&testParty[0], MON_DATA_POKEBALL, 0) == ITEM_MASTER_BALL); + EXPECT(GetMonData(&testParty[1], MON_DATA_POKEBALL, 0) == ITEM_POKE_BALL); + + EXPECT(GetMonData(&testParty[0], MON_DATA_SPECIES, 0) == SPECIES_WOBBUFFET); + EXPECT(GetMonData(&testParty[1], MON_DATA_SPECIES, 0) == SPECIES_WOBBUFFET); + + EXPECT(GetMonAbility(&testParty[0]) == ABILITY_TELEPATHY); + EXPECT(GetMonAbility(&testParty[1]) == ABILITY_SHADOW_TAG); + + EXPECT(GetMonData(&testParty[0], MON_DATA_FRIENDSHIP, 0) == 42); + EXPECT(GetMonData(&testParty[1], MON_DATA_FRIENDSHIP, 0) == 0); + + EXPECT(GetMonData(&testParty[0], MON_DATA_HELD_ITEM, 0) == ITEM_ASSAULT_VEST); + EXPECT(GetMonData(&testParty[1], MON_DATA_HELD_ITEM, 0) == ITEM_NONE); + + EXPECT(GetMonData(&testParty[0], MON_DATA_HP_IV, 0) == 25); + EXPECT(GetMonData(&testParty[0], MON_DATA_ATK_IV, 0) == 26); + EXPECT(GetMonData(&testParty[0], MON_DATA_DEF_IV, 0) == 27); + EXPECT(GetMonData(&testParty[0], MON_DATA_SPEED_IV, 0) == 28); + EXPECT(GetMonData(&testParty[0], MON_DATA_SPATK_IV, 0) == 29); + EXPECT(GetMonData(&testParty[0], MON_DATA_SPDEF_IV, 0) == 30); + + EXPECT(GetMonData(&testParty[1], MON_DATA_HP_IV, 0) == 0); + EXPECT(GetMonData(&testParty[1], MON_DATA_ATK_IV, 0) == 0); + EXPECT(GetMonData(&testParty[1], MON_DATA_DEF_IV, 0) == 0); + EXPECT(GetMonData(&testParty[1], MON_DATA_SPEED_IV, 0) == 0); + EXPECT(GetMonData(&testParty[1], MON_DATA_SPATK_IV, 0) == 0); + EXPECT(GetMonData(&testParty[1], MON_DATA_SPDEF_IV, 0) == 0); + + EXPECT(GetMonData(&testParty[0], MON_DATA_HP_EV, 0) == 252); + EXPECT(GetMonData(&testParty[0], MON_DATA_ATK_EV, 0) == 0); + EXPECT(GetMonData(&testParty[0], MON_DATA_DEF_EV, 0) == 0); + EXPECT(GetMonData(&testParty[0], MON_DATA_SPEED_EV, 0) == 252); + EXPECT(GetMonData(&testParty[0], MON_DATA_SPATK_EV, 0) == 4); + EXPECT(GetMonData(&testParty[0], MON_DATA_SPDEF_EV, 0) == 0); + + EXPECT(GetMonData(&testParty[1], MON_DATA_HP_EV, 0) == 0); + EXPECT(GetMonData(&testParty[1], MON_DATA_ATK_EV, 0) == 0); + EXPECT(GetMonData(&testParty[1], MON_DATA_DEF_EV, 0) == 0); + EXPECT(GetMonData(&testParty[1], MON_DATA_SPEED_EV, 0) == 0); + EXPECT(GetMonData(&testParty[1], MON_DATA_SPATK_EV, 0) == 0); + EXPECT(GetMonData(&testParty[1], MON_DATA_SPDEF_EV, 0) == 0); + + EXPECT(GetMonData(&testParty[0], MON_DATA_LEVEL, 0) == 67); + EXPECT(GetMonData(&testParty[1], MON_DATA_LEVEL, 0) == 5); + + EXPECT(GetMonData(&testParty[0], MON_DATA_MOVE1, 0) == MOVE_AIR_SLASH); + EXPECT(GetMonData(&testParty[0], MON_DATA_MOVE2, 0) == MOVE_BARRIER); + EXPECT(GetMonData(&testParty[0], MON_DATA_MOVE3, 0) == MOVE_SOLAR_BEAM); + EXPECT(GetMonData(&testParty[0], MON_DATA_MOVE4, 0) == MOVE_EXPLOSION); + + GetMonData(&testParty[0], MON_DATA_NICKNAME, nickBuffer); + EXPECT(StringCompare(nickBuffer, COMPOUND_STRING("Bubbles")) == 0); + + GetMonData(&testParty[1], MON_DATA_NICKNAME, nickBuffer); + EXPECT(StringCompare(nickBuffer, COMPOUND_STRING("Wobbuffet")) == 0); + + EXPECT(GetGenderFromSpeciesAndPersonality(GetMonData(&testParty[0], MON_DATA_SPECIES, 0), testParty[0].box.personality) == MON_FEMALE); + + EXPECT(GetNature(&testParty[0]) == NATURE_HASTY); + + Free(testParty); +} + +TEST("CreateNPCTrainerPartyForTrainer generates different personalities for different mons") +{ + struct Pokemon *testParty = Alloc(6 * sizeof(struct Pokemon)); + CreateNPCTrainerPartyFromTrainer(testParty, &sTestTrainer2, TRUE, BATTLE_TYPE_TRAINER); + EXPECT(testParty[0].box.personality != testParty[1].box.personality); + Free(testParty); +} diff --git a/tools/mapjson/mapjson.cpp b/tools/mapjson/mapjson.cpp index dc8b9080a5..754154efb7 100644 --- a/tools/mapjson/mapjson.cpp +++ b/tools/mapjson/mapjson.cpp @@ -29,6 +29,7 @@ using json11::Json; #include "mapjson.h" +string version; string read_text_file(string filepath) { ifstream in_file(filepath); @@ -61,7 +62,7 @@ void write_text_file(string filepath, string text) { } -string json_to_string(const Json &data, const string &field = "") { +string json_to_string(const Json &data, const string &field = "", bool silent = false) { const Json value = !field.empty() ? data[field] : data; string output = ""; switch (value.type()) { @@ -75,12 +76,14 @@ string json_to_string(const Json &data, const string &field = "") { output = value.bool_value() ? "TRUE" : "FALSE"; break; default:{ - string s = !field.empty() ? ("Value for '" + field + "'") : "JSON field"; - FATAL_ERROR("%s is unexpected type; expected string, number, or bool.\n", s.c_str()); + if (!silent) { + string s = !field.empty() ? ("Value for '" + field + "'") : "JSON field"; + FATAL_ERROR("%s is unexpected type; expected string, number, or bool.\n", s.c_str()); + } } } - if (output.empty()){ + if (!silent && output.empty()) { string s = !field.empty() ? ("Value for '" + field + "'") : "JSON field"; FATAL_ERROR("%s cannot be empty.\n", s.c_str()); } @@ -88,14 +91,14 @@ string json_to_string(const Json &data, const string &field = "") { return output; } -string generate_map_header_text(Json map_data, Json layouts_data, string version) { +string generate_map_header_text(Json map_data, Json layouts_data) { string map_layout_id = json_to_string(map_data, "layout"); vector matched; - for (auto &field : layouts_data["layouts"].array_items()) { - if (map_layout_id == json_to_string(field, "id")) - matched.push_back(field); + for (auto &layout : layouts_data["layouts"].array_items()) { + if (map_layout_id == json_to_string(layout, "id", true)) + matched.push_back(layout); } if (matched.size() != 1) @@ -123,28 +126,33 @@ string generate_map_header_text(Json map_data, Json layouts_data, string version text << "\t.4byte " << mapName << "_MapScripts\n"; if (map_data.object_items().find("connections") != map_data.object_items().end() - && map_data["connections"].array_items().size() > 0) + && map_data["connections"].array_items().size() > 0 && json_to_string(map_data, "connections_no_include", true) != "TRUE") text << "\t.4byte " << mapName << "_MapConnections\n"; else - text << "\t.4byte 0x0\n"; + text << "\t.4byte NULL\n"; text << "\t.2byte " << json_to_string(map_data, "music") << "\n" << "\t.2byte " << json_to_string(layout, "id") << "\n" << "\t.byte " << json_to_string(map_data, "region_map_section") << "\n" << "\t.byte " << json_to_string(map_data, "requires_flash") << "\n" << "\t.byte " << json_to_string(map_data, "weather") << "\n" - << "\t.byte " << json_to_string(map_data, "map_type") << "\n" - << "\t.2byte 0\n"; + << "\t.byte " << json_to_string(map_data, "map_type") << "\n"; + + if (version != "firered") + text << "\t.2byte 0\n"; if (version == "ruby") text << "\t.byte " << json_to_string(map_data, "show_map_name") << "\n"; - else if (version == "emerald") + else if (version == "emerald" || version == "firered") text << "\tmap_header_flags " << "allow_cycling=" << json_to_string(map_data, "allow_cycling") << ", " << "allow_escaping=" << json_to_string(map_data, "allow_escaping") << ", " << "allow_running=" << json_to_string(map_data, "allow_running") << ", " << "show_map_name=" << json_to_string(map_data, "show_map_name") << "\n"; + if (version == "firered") + text << "\t.byte " << json_to_string(map_data, "floor_number") << "\n"; + text << "\t.byte " << json_to_string(map_data, "battle_scene") << "\n\n"; return text.str(); @@ -193,22 +201,36 @@ string generate_map_events_text(Json map_data) { text << objects_label << ":\n"; for (unsigned int i = 0; i < map_data["object_events"].array_items().size(); i++) { auto obj_event = map_data["object_events"].array_items()[i]; - text << "\tobject_event " << i + 1 << ", " - << json_to_string(obj_event, "graphics_id") << ", 0, " - << json_to_string(obj_event, "x") << ", " - << json_to_string(obj_event, "y") << ", " - << json_to_string(obj_event, "elevation") << ", " - << json_to_string(obj_event, "movement_type") << ", " - << json_to_string(obj_event, "movement_range_x") << ", " - << json_to_string(obj_event, "movement_range_y") << ", " - << json_to_string(obj_event, "trainer_type") << ", " - << json_to_string(obj_event, "trainer_sight_or_berry_tree_id") << ", " - << json_to_string(obj_event, "script") << ", " - << json_to_string(obj_event, "flag") << "\n"; + string type = json_to_string(obj_event, "type", true); + + // If no type field is present, assume it's a regular object event. + if (type == "" || type == "object") { + text << "\tobject_event " << i + 1 << ", " + << json_to_string(obj_event, "graphics_id") << ", " + << json_to_string(obj_event, "x") << ", " + << json_to_string(obj_event, "y") << ", " + << json_to_string(obj_event, "elevation") << ", " + << json_to_string(obj_event, "movement_type") << ", " + << json_to_string(obj_event, "movement_range_x") << ", " + << json_to_string(obj_event, "movement_range_y") << ", " + << json_to_string(obj_event, "trainer_type") << ", " + << json_to_string(obj_event, "trainer_sight_or_berry_tree_id") << ", " + << json_to_string(obj_event, "script") << ", " + << json_to_string(obj_event, "flag") << "\n"; + } else if (type == "clone") { + text << "\tclone_event " << i + 1 << ", " + << json_to_string(obj_event, "graphics_id") << ", " + << json_to_string(obj_event, "x") << ", " + << json_to_string(obj_event, "y") << ", " + << json_to_string(obj_event, "target_local_id") << ", " + << json_to_string(obj_event, "target_map") << "\n"; + } else { + FATAL_ERROR("Unknown object event type '%s'. Expected 'object' or 'clone'.\n", type.c_str()); + } } text << "\n"; } else { - objects_label = "0x0"; + objects_label = "NULL"; } if (map_data["warp_events"].array_items().size() > 0) { @@ -224,14 +246,15 @@ string generate_map_events_text(Json map_data) { } text << "\n"; } else { - warps_label = "0x0"; + warps_label = "NULL"; } if (map_data["coord_events"].array_items().size() > 0) { coords_label = mapName + "_MapCoordEvents"; text << coords_label << ":\n"; for (auto &coord_event : map_data["coord_events"].array_items()) { - if (json_to_string(coord_event, "type") == "trigger") { + string type = json_to_string(coord_event, "type"); + if (type == "trigger") { text << "\tcoord_event " << json_to_string(coord_event, "x") << ", " << json_to_string(coord_event, "y") << ", " @@ -240,24 +263,27 @@ string generate_map_events_text(Json map_data) { << json_to_string(coord_event, "var_value") << ", " << json_to_string(coord_event, "script") << "\n"; } - else if (coord_event["type"] == "weather") { + else if (type == "weather") { text << "\tcoord_weather_event " << json_to_string(coord_event, "x") << ", " << json_to_string(coord_event, "y") << ", " << json_to_string(coord_event, "elevation") << ", " << json_to_string(coord_event, "weather") << "\n"; + } else { + FATAL_ERROR("Unknown coord event type '%s'. Expected 'trigger' or 'weather'.\n", type.c_str()); } } text << "\n"; } else { - coords_label = "0x0"; + coords_label = "NULL"; } if (map_data["bg_events"].array_items().size() > 0) { bgs_label = mapName + "_MapBGEvents"; text << bgs_label << ":\n"; for (auto &bg_event : map_data["bg_events"].array_items()) { - if (bg_event["type"] == "sign") { + string type = json_to_string(bg_event, "type"); + if (type == "sign") { text << "\tbg_sign_event " << json_to_string(bg_event, "x") << ", " << json_to_string(bg_event, "y") << ", " @@ -265,25 +291,33 @@ string generate_map_events_text(Json map_data) { << json_to_string(bg_event, "player_facing_dir") << ", " << json_to_string(bg_event, "script") << "\n"; } - else if (bg_event["type"] == "hidden_item") { + else if (type == "hidden_item") { text << "\tbg_hidden_item_event " << json_to_string(bg_event, "x") << ", " << json_to_string(bg_event, "y") << ", " << json_to_string(bg_event, "elevation") << ", " << json_to_string(bg_event, "item") << ", " - << json_to_string(bg_event, "flag") << "\n"; + << json_to_string(bg_event, "flag"); + if (version == "firered") { + text << ", " + << json_to_string(bg_event, "quantity") << ", " + << json_to_string(bg_event, "underfoot"); + } + text << "\n"; } - else if (bg_event["type"] == "secret_base") { + else if (type == "secret_base") { text << "\tbg_secret_base_event " << json_to_string(bg_event, "x") << ", " << json_to_string(bg_event, "y") << ", " << json_to_string(bg_event, "elevation") << ", " << json_to_string(bg_event, "secret_base_id") << "\n"; + } else { + FATAL_ERROR("Unknown bg event type '%s'. Expected 'sign', 'hidden_item', or 'secret_base'.\n", type.c_str()); } } text << "\n"; } else { - bgs_label = "0x0"; + bgs_label = "NULL"; } text << mapName << "_MapEvents::\n" @@ -299,7 +333,7 @@ string get_directory_name(string filename) { return filename.substr(0, dir_pos + 1); } -void process_map(string map_filepath, string layouts_filepath, string version) { +void process_map(string map_filepath, string layouts_filepath) { string mapdata_err, layouts_err; string mapdata_json_text = read_text_file(map_filepath); @@ -313,7 +347,7 @@ void process_map(string map_filepath, string layouts_filepath, string version) { if (layouts_data == Json()) FATAL_ERROR("%s\n", layouts_err.c_str()); - string header_text = generate_map_header_text(map_data, layouts_data, version); + string header_text = generate_map_header_text(map_data, layouts_data); string events_text = generate_map_events_text(map_data); string connections_text = generate_map_connections_text(map_data); @@ -498,6 +532,7 @@ string generate_layout_headers_text(Json layouts_data) { text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/layouts/layouts.json\n@\n\n"; for (auto &layout : layouts_data["layouts"].array_items()) { + if (layout == Json::object()) continue; string layoutName = json_to_string(layout, "name"); string border_label = layoutName + "_Border"; string blockdata_label = layoutName + "_Blockdata"; @@ -512,7 +547,13 @@ string generate_layout_headers_text(Json layouts_data) { << "\t.4byte " << border_label << "\n" << "\t.4byte " << blockdata_label << "\n" << "\t.4byte " << json_to_string(layout, "primary_tileset") << "\n" - << "\t.4byte " << json_to_string(layout, "secondary_tileset") << "\n\n"; + << "\t.4byte " << json_to_string(layout, "secondary_tileset") << "\n"; + if (version == "firered") { + text << "\t.byte " << json_to_string(layout, "border_width") << "\n" + << "\t.byte " << json_to_string(layout, "border_height") << "\n" + << "\t.2byte 0\n"; + } + text << "\n"; } return text.str(); @@ -526,8 +567,11 @@ string generate_layouts_table_text(Json layouts_data) { text << "\t.align 2\n" << json_to_string(layouts_data, "layouts_table_label") << "::\n"; - for (auto &layout : layouts_data["layouts"].array_items()) - text << "\t.4byte " << json_to_string(layout, "name") << "\n"; + for (auto &layout : layouts_data["layouts"].array_items()) { + string layout_name = json_to_string(layout, "name", true); + if (layout_name.empty()) layout_name = "NULL"; + text << "\t.4byte " << layout_name << "\n"; + } return text.str(); } @@ -540,9 +584,12 @@ string generate_layouts_constants_text(Json layouts_data) { text << "//\n// DO NOT MODIFY THIS FILE! It is auto-generated from data/layouts/layouts.json\n//\n\n"; - int i = 0; - for (auto &layout : layouts_data["layouts"].array_items()) - text << "#define " << json_to_string(layout, "id") << " " << ++i << "\n"; + int i = 1; + for (auto &layout : layouts_data["layouts"].array_items()) { + if (layout != Json::object()) + text << "#define " << json_to_string(layout, "id") << " " << i << "\n"; + i++; + } text << "\n#endif // GUARD_CONSTANTS_LAYOUTS_H\n"; @@ -573,9 +620,9 @@ int main(int argc, char *argv[]) { FATAL_ERROR("USAGE: mapjson [options]\n"); char *version_arg = argv[2]; - string version(version_arg); - if (version != "emerald" && version != "ruby") - FATAL_ERROR("ERROR: must be 'emerald' or 'ruby'.\n"); + version = string(version_arg); + if (version != "emerald" && version != "ruby" && version != "firered") + FATAL_ERROR("ERROR: must be 'emerald', 'firered', or 'ruby'.\n"); char *mode_arg = argv[1]; string mode(mode_arg); @@ -589,7 +636,7 @@ int main(int argc, char *argv[]) { string filepath(argv[3]); string layouts_filepath(argv[4]); - process_map(filepath, layouts_filepath, version); + process_map(filepath, layouts_filepath); } else if (mode == "groups") { if (argc != 4) diff --git a/tools/mgba-rom-test-hydra/main.c b/tools/mgba-rom-test-hydra/main.c index 5dfc995176..8705225b85 100644 --- a/tools/mgba-rom-test-hydra/main.c +++ b/tools/mgba-rom-test-hydra/main.c @@ -9,7 +9,11 @@ * COMMANDS * N: Sets the test name to the remainder of the line. * R: Sets the result to the remainder of the line, and flushes any - * output buffered since the previous R. */ + * output buffered since the previous R. + * P/K/F/A: Sets the result to the remaining of the line, flushes any + * output since the previous P/K/F/A and increment the number of + * passes/known fails/assumption fails/fails. + */ #include #include #include @@ -38,6 +42,12 @@ struct Runner size_t output_buffer_size; size_t output_buffer_capacity; char *output_buffer; + int passes; + int knownFails; + int todos; + int assumptionFails; + int fails; + int results; }; static unsigned nrunners = 0; @@ -72,7 +82,22 @@ static void handle_read(struct Runner *runner) runner->test_name[eol - soc - 1] = '\0'; break; - case 'R': + case 'P': + runner->passes++; + goto add_to_results; + case 'K': + runner->knownFails++; + goto add_to_results; + case 'T': + runner->todos++; + goto add_to_results; + case 'A': + runner->assumptionFails++; + goto add_to_results; + case 'F': + runner->fails++; +add_to_results: + runner->results++; soc += 2; fprintf(stdout, "%s: ", runner->test_name); fwrite(soc, 1, eol - soc, stdout); @@ -404,6 +429,12 @@ int main(int argc, char *argv[]) // Reap test runners and collate exit codes. int exit_code = 0; + int passes = 0; + int knownFails = 0; + int todos = 0; + int assumptionFails = 0; + int fails = 0; + int results = 0; for (int i = 0; i < nrunners; i++) { int wstatus; @@ -412,8 +443,37 @@ int main(int argc, char *argv[]) perror("waitpid runners[i] failed"); exit(2); } + if (runners[i].output_buffer_size > 0) + fwrite(runners[i].output_buffer, 1, runners[i].output_buffer_size, stdout); if (WIFEXITED(wstatus) && WEXITSTATUS(wstatus) > exit_code) exit_code = WEXITSTATUS(wstatus); + passes += runners[i].passes; + knownFails += runners[i].knownFails; + todos += runners[i].todos; + assumptionFails += runners[i].assumptionFails; + fails += runners[i].fails; + results += runners[i].results; } + + if (results == 0) + { + fprintf(stdout, "\nNo tests found.\n"); + } + else + { + fprintf(stdout, "\n- Tests TOTAL: %d\n", results); + fprintf(stdout, "- Tests \e[32mPASSED\e[0m: %d\n", passes); + if (knownFails > 0) + fprintf(stdout, "- Tests \e[33mKNOWN_FAILING\e[0m: %d\n", knownFails); + if (todos > 0) + fprintf(stdout, "- Tests \e[33mTO_DO\e[0m: %d\n", todos); + if (fails > 0) + fprintf(stdout, "- Tests \e[31mFAILED\e[0m : %d\n", fails); + if (assumptionFails > 0) + fprintf(stdout, "- \e[33mASSUMPTIONS_FAILED\e[0m: %d\n", assumptionFails); + } + fprintf(stdout, "\n"); + + fflush(stdout); return exit_code; } diff --git a/tools/preproc/asm_file.cpp b/tools/preproc/asm_file.cpp index af16e232d3..04a7410e00 100644 --- a/tools/preproc/asm_file.cpp +++ b/tools/preproc/asm_file.cpp @@ -41,6 +41,8 @@ AsmFile::AsmFile(std::string filename) : m_filename(filename) if (m_size < 0) FATAL_ERROR("File size of \"%s\" is less than zero.\n", filename.c_str()); + else if (m_size == 0) + return; // Empty file m_buffer = new char[m_size + 1]; @@ -73,7 +75,7 @@ AsmFile::AsmFile(AsmFile&& other) : m_filename(std::move(other.m_filename)) AsmFile::~AsmFile() { - delete[] m_buffer; + if (m_size > 0) delete[] m_buffer; } // Removes comments to simplify further processing. diff --git a/tools/scaninc/asm_file.cpp b/tools/scaninc/asm_file.cpp index 109e604a22..d2cc624ee5 100644 --- a/tools/scaninc/asm_file.cpp +++ b/tools/scaninc/asm_file.cpp @@ -36,6 +36,11 @@ AsmFile::AsmFile(std::string path) m_size = std::ftell(fp); + if (m_size < 0) + FATAL_ERROR("File size of \"%s\" is less than zero.\n", path.c_str()); + else if (m_size == 0) + return; // Empty file + m_buffer = new char[m_size]; std::rewind(fp); @@ -51,7 +56,7 @@ AsmFile::AsmFile(std::string path) AsmFile::~AsmFile() { - delete[] m_buffer; + if (m_size > 0) delete[] m_buffer; } IncDirectiveType AsmFile::ReadUntilIncDirective(std::string &path)