Merge branch 'master' into clear_battle_files
This commit is contained in:
@@ -3134,7 +3134,7 @@ _081639FC:
|
||||
bl __umodsi3
|
||||
cmp r0, 0
|
||||
bne _08163A78
|
||||
bl sub_81DA57C
|
||||
bl UpdateGymLeaderRematch
|
||||
b _08163A78
|
||||
.pool
|
||||
_08163A2C:
|
||||
|
||||
@@ -1,206 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_81DA57C
|
||||
sub_81DA57C: @ 81DA57C
|
||||
push {lr}
|
||||
ldr r0, =0x00000864
|
||||
bl FlagGet
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081DA5CA
|
||||
bl Random
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
movs r1, 0x64
|
||||
bl __umodsi3
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
cmp r0, 0x1E
|
||||
bhi _081DA5CA
|
||||
movs r0, 0x5B
|
||||
bl FlagGet
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081DA5C0
|
||||
ldr r0, =gUnknown_0862AD34
|
||||
movs r1, 0x8
|
||||
movs r2, 0x5
|
||||
bl sub_81DA5D4
|
||||
b _081DA5CA
|
||||
.pool
|
||||
_081DA5C0:
|
||||
ldr r0, =gUnknown_0862AD44
|
||||
movs r1, 0x7
|
||||
movs r2, 0x1
|
||||
bl sub_81DA5D4
|
||||
_081DA5CA:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DA57C
|
||||
|
||||
thumb_func_start sub_81DA5D4
|
||||
sub_81DA5D4: @ 81DA5D4
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x8
|
||||
mov r9, r0
|
||||
adds r7, r1, 0
|
||||
mov r10, r2
|
||||
movs r6, 0
|
||||
movs r0, 0x5
|
||||
mov r8, r0
|
||||
movs r5, 0
|
||||
cmp r5, r7
|
||||
bcs _081DA61C
|
||||
mov r4, r9
|
||||
_081DA5F4:
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldrh r1, [r4]
|
||||
ldr r2, =0x000009ca
|
||||
adds r0, r2
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _081DA614
|
||||
adds r0, r1, 0
|
||||
bl sub_81DA6CC
|
||||
cmp r8, r0
|
||||
ble _081DA612
|
||||
mov r8, r0
|
||||
_081DA612:
|
||||
adds r6, 0x1
|
||||
_081DA614:
|
||||
adds r4, 0x2
|
||||
adds r5, 0x1
|
||||
cmp r5, r7
|
||||
bcc _081DA5F4
|
||||
_081DA61C:
|
||||
cmp r6, 0
|
||||
beq _081DA6BA
|
||||
cmp r8, r10
|
||||
bhi _081DA6BA
|
||||
movs r6, 0
|
||||
movs r5, 0
|
||||
cmp r5, r7
|
||||
bcs _081DA654
|
||||
mov r4, r9
|
||||
_081DA62E:
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldrh r1, [r4]
|
||||
ldr r2, =0x000009ca
|
||||
adds r0, r2
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _081DA64C
|
||||
adds r0, r1, 0
|
||||
bl sub_81DA6CC
|
||||
cmp r0, r8
|
||||
bne _081DA64C
|
||||
adds r6, 0x1
|
||||
_081DA64C:
|
||||
adds r4, 0x2
|
||||
adds r5, 0x1
|
||||
cmp r5, r7
|
||||
bcc _081DA62E
|
||||
_081DA654:
|
||||
cmp r6, 0
|
||||
beq _081DA6BA
|
||||
bl Random
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
adds r1, r6, 0
|
||||
bl __modsi3
|
||||
adds r6, r0, 0
|
||||
movs r5, 0
|
||||
cmp r5, r7
|
||||
bcs _081DA6BA
|
||||
ldr r2, =gSaveBlock1Ptr
|
||||
ldr r3, =0x000009ca
|
||||
mov r4, r9
|
||||
_081DA674:
|
||||
ldr r0, [r2]
|
||||
ldrh r1, [r4]
|
||||
adds r0, r3
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _081DA6B2
|
||||
adds r0, r1, 0
|
||||
str r2, [sp]
|
||||
str r3, [sp, 0x4]
|
||||
bl sub_81DA6CC
|
||||
ldr r2, [sp]
|
||||
ldr r3, [sp, 0x4]
|
||||
cmp r0, r8
|
||||
bne _081DA6B2
|
||||
cmp r6, 0
|
||||
bne _081DA6B0
|
||||
ldr r0, [r2]
|
||||
adds r0, r3
|
||||
ldrh r4, [r4]
|
||||
adds r0, r4
|
||||
mov r1, r8
|
||||
strb r1, [r0]
|
||||
b _081DA6BA
|
||||
.pool
|
||||
_081DA6B0:
|
||||
subs r6, 0x1
|
||||
_081DA6B2:
|
||||
adds r4, 0x2
|
||||
adds r5, 0x1
|
||||
cmp r5, r7
|
||||
bcc _081DA674
|
||||
_081DA6BA:
|
||||
add sp, 0x8
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81DA5D4
|
||||
|
||||
thumb_func_start sub_81DA6CC
|
||||
sub_81DA6CC: @ 81DA6CC
|
||||
push {r4-r6,lr}
|
||||
adds r5, r0, 0
|
||||
movs r4, 0
|
||||
ldr r6, =gRematchTable
|
||||
_081DA6D4:
|
||||
lsls r0, r4, 1
|
||||
lsls r1, r5, 4
|
||||
adds r0, r1
|
||||
adds r0, r6
|
||||
ldrh r0, [r0]
|
||||
bl HasTrainerBeenFought
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081DA6F0
|
||||
adds r0, r4, 0
|
||||
b _081DA6F8
|
||||
.pool
|
||||
_081DA6F0:
|
||||
adds r4, 0x1
|
||||
cmp r4, 0x4
|
||||
ble _081DA6D4
|
||||
movs r0, 0x5
|
||||
_081DA6F8:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DA6CC
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
||||
@@ -1,15 +0,0 @@
|
||||
.set TARGET_SELECTED_POKEMON, 0
|
||||
|
||||
.set F_TARGET_SPECIAL, 1 << 0
|
||||
.set F_TARGET_RANDOM, 1 << 2
|
||||
.set F_TARGET_BOTH_ENEMIES, 1 << 3
|
||||
.set F_TARGET_USER, 1 << 4
|
||||
.set F_TARGET_ALL_EXCEPT_USER, 1 << 5
|
||||
.set F_TARGET_ENEMY_SIDE, 1 << 6
|
||||
|
||||
.set F_MAKES_CONTACT, 1 << 0
|
||||
.set F_AFFECTED_BY_PROTECT, 1 << 1
|
||||
.set F_AFFECTED_BY_MAGIC_COAT, 1 << 2
|
||||
.set F_AFFECTED_BY_SNATCH, 1 << 3
|
||||
.set F_MIRROR_MOVE_COMPATIBLE, 1 << 4
|
||||
.set F_AFFECTED_BY_KINGS_ROCK, 1 << 5
|
||||
@@ -3,7 +3,6 @@
|
||||
.include "constants/contest_constants.inc"
|
||||
.include "constants/pokemon_data_constants.inc"
|
||||
.include "constants/item_data_constants.inc"
|
||||
.include "constants/battle_move_constants.inc"
|
||||
.include "constants/battle_frontier_constants.inc"
|
||||
.include "constants/map_constants.inc"
|
||||
.include "constants/berry_constants.inc"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4866,21 +4866,3 @@ gUnknown_0831ACDC:: @ 831ACDC
|
||||
.align 2
|
||||
gUnknown_0831ACE0:: @ 831ACE0
|
||||
.byte 0xe0, 0xf0, 0xf0, 0xe0, 0xe0, 0x00, 0x00, 0x00
|
||||
|
||||
@ 831ACE8
|
||||
.include "data/type_effectiveness.inc"
|
||||
|
||||
@ 831AE38
|
||||
.include "data/text/type_names.inc"
|
||||
|
||||
@ 831AEB8
|
||||
.include "data/trainer_money.inc"
|
||||
|
||||
@ 831AF98
|
||||
.include "data/text/ability_descriptions.inc"
|
||||
|
||||
@ 831B6DB
|
||||
.include "data/text/ability_names.inc"
|
||||
|
||||
@ 831BAD4
|
||||
.include "data/text/ability_description_pointers.inc"
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#include "constants/abilities.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/pokemon.h"
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 2
|
||||
|
||||
@ 831C898
|
||||
.include "data/battle_moves.inc"
|
||||
|
||||
@ 0x31d93c
|
||||
@ unreferenced unknown data
|
||||
.byte 0x34, 0x00, 0x10, 0x00, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00
|
||||
@@ -1161,7 +1161,7 @@ EventScript_2715DE:: @ 82715DE
|
||||
setflag FLAG_0x376
|
||||
setflag FLAG_0x374
|
||||
setflag FLAG_0x375
|
||||
setflag FLAG_0x3C1
|
||||
setflag FLAG_SPRITEVIS_SLATEPORT_MUSEUM_POPULATION
|
||||
setflag FLAG_0x378
|
||||
setflag FLAG_0x2F0
|
||||
setflag FLAG_0x2F5
|
||||
@@ -1177,7 +1177,7 @@ EventScript_2715DE:: @ 82715DE
|
||||
setflag FLAG_0x38F
|
||||
setflag FLAG_0x393
|
||||
setflag FLAG_0x358
|
||||
setflag FLAG_0x390
|
||||
setflag FLAG_SPRITEVIS_MAUVILLE_CITY_WATTSON
|
||||
setflag FLAG_0x2FD
|
||||
setflag FLAG_0x398
|
||||
setflag FLAG_0x399
|
||||
|
||||
@@ -5,18 +5,18 @@ MauvilleCity_MapScripts:: @ 81DF385
|
||||
MauvilleCity_MapScript1_1DF38B: @ 81DF38B
|
||||
setflag FLAG_VISITED_MAUVILLE_CITY
|
||||
clearflag FLAG_0x09D
|
||||
clearflag FLAG_0x3C1
|
||||
clearflag FLAG_SPRITEVIS_SLATEPORT_MUSEUM_POPULATION
|
||||
setflag FLAG_SYS_TV_START
|
||||
clearflag FLAG_0x063
|
||||
setvar VAR_0x4093, 0
|
||||
checkflag FLAG_0x0D1
|
||||
checkflag FLAG_GOT_TM24_FROM_WATTSON
|
||||
call_if 1, MauvilleCity_EventScript_1DF3A9
|
||||
end
|
||||
|
||||
MauvilleCity_EventScript_1DF3A9:: @ 81DF3A9
|
||||
clearflag FLAG_0x391
|
||||
setflag FLAG_0x390
|
||||
setflag FLAG_0x05B
|
||||
clearflag FLAG_SPRITEVIS_MAUVILLE_GYM_WATTSON
|
||||
setflag FLAG_SPRITEVIS_MAUVILLE_CITY_WATTSON
|
||||
setflag FLAG_WATTSON_REMATCH_AVAILABLE
|
||||
return
|
||||
|
||||
MauvilleCity_EventScript_1DF3B3:: @ 81DF3B3
|
||||
@@ -424,15 +424,15 @@ MauvilleCity_Movement_1DF72F: @ 81DF72F
|
||||
MauvilleCity_EventScript_1DF73A:: @ 81DF73A
|
||||
lock
|
||||
faceplayer
|
||||
checkflag FLAG_0x0D1
|
||||
checkflag FLAG_GOT_TM24_FROM_WATTSON
|
||||
goto_eq MauvilleCity_EventScript_1DF7B0
|
||||
compare VAR_0x40BA, 2
|
||||
goto_eq MauvilleCity_EventScript_1DF784
|
||||
checkflag FLAG_0x0D0
|
||||
checkflag FLAG_GOT_BASEMENT_KEY_FROM_WATTSON
|
||||
goto_eq MauvilleCity_EventScript_1DF77A
|
||||
msgbox MauvilleCity_Text_1DFFE4, 4
|
||||
giveitem_std ITEM_BASEMENT_KEY
|
||||
setflag FLAG_0x0D0
|
||||
setflag FLAG_GOT_BASEMENT_KEY_FROM_WATTSON
|
||||
msgbox MauvilleCity_Text_1E0154, 4
|
||||
release
|
||||
end
|
||||
@@ -447,7 +447,7 @@ MauvilleCity_EventScript_1DF784:: @ 81DF784
|
||||
giveitem_std ITEM_TM24
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_EventScript_272054
|
||||
setflag FLAG_0x0D1
|
||||
setflag FLAG_GOT_TM24_FROM_WATTSON
|
||||
msgbox MauvilleCity_Text_1E02AA, 4
|
||||
release
|
||||
end
|
||||
|
||||
@@ -423,8 +423,8 @@ PetalburgCity_Gym_EventScript_204E3B:: @ 8204E3B
|
||||
setflag FLAG_BADGE05_GET
|
||||
special sub_813B9A0
|
||||
call PetalburgCity_Gym_EventScript_2721F8
|
||||
setflag FLAG_0x391
|
||||
clearflag FLAG_0x390
|
||||
setflag FLAG_SPRITEVIS_MAUVILLE_GYM_WATTSON
|
||||
clearflag FLAG_SPRITEVIS_MAUVILLE_CITY_WATTSON
|
||||
setvar VAR_0x8008, 5
|
||||
call PetalburgCity_Gym_EventScript_271F43
|
||||
clearflag FLAG_0x3AC
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
.align 2
|
||||
gAbilityDescriptionPointers:: @ 831BAD4
|
||||
.4byte gNoneAbilityDescription
|
||||
.4byte gStenchAbilityDescription
|
||||
.4byte gDrizzleAbilityDescription
|
||||
.4byte gSpeedBoostAbilityDescription
|
||||
.4byte gBattleArmorAbilityDescription
|
||||
.4byte gSturdyAbilityDescription
|
||||
.4byte gDampAbilityDescription
|
||||
.4byte gLimberAbilityDescription
|
||||
.4byte gSandVeilAbilityDescription
|
||||
.4byte gStaticAbilityDescription
|
||||
.4byte gVoltAbsorbAbilityDescription
|
||||
.4byte gWaterAbsorbAbilityDescription
|
||||
.4byte gObliviousAbilityDescription
|
||||
.4byte gCloudNineAbilityDescription
|
||||
.4byte gCompoundEyesAbilityDescription
|
||||
.4byte gInsomniaAbilityDescription
|
||||
.4byte gColorChangeAbilityDescription
|
||||
.4byte gImmunityAbilityDescription
|
||||
.4byte gFlashFireAbilityDescription
|
||||
.4byte gShieldDustAbilityDescription
|
||||
.4byte gOwnTempoAbilityDescription
|
||||
.4byte gSuctionCupsAbilityDescription
|
||||
.4byte gIntimidateAbilityDescription
|
||||
.4byte gShadowTagAbilityDescription
|
||||
.4byte gRoughSkinAbilityDescription
|
||||
.4byte gWonderGuardAbilityDescription
|
||||
.4byte gLevitateAbilityDescription
|
||||
.4byte gEffectSporeAbilityDescription
|
||||
.4byte gSynchronizeAbilityDescription
|
||||
.4byte gClearBodyAbilityDescription
|
||||
.4byte gNaturalCureAbilityDescription
|
||||
.4byte gLightningRodAbilityDescription
|
||||
.4byte gSereneGraceAbilityDescription
|
||||
.4byte gSwiftSwimAbilityDescription
|
||||
.4byte gChlorophyllAbilityDescription
|
||||
.4byte gIlluminateAbilityDescription
|
||||
.4byte gTraceAbilityDescription
|
||||
.4byte gHugePowerAbilityDescription
|
||||
.4byte gPoisonPointAbilityDescription
|
||||
.4byte gInnerFocusAbilityDescription
|
||||
.4byte gMagmaArmorAbilityDescription
|
||||
.4byte gWaterVeilAbilityDescription
|
||||
.4byte gMagnetPullAbilityDescription
|
||||
.4byte gSoundproofAbilityDescription
|
||||
.4byte gRainDishAbilityDescription
|
||||
.4byte gSandStreamAbilityDescription
|
||||
.4byte gPressureAbilityDescription
|
||||
.4byte gThickFatAbilityDescription
|
||||
.4byte gEarlyBirdAbilityDescription
|
||||
.4byte gFlameBodyAbilityDescription
|
||||
.4byte gRunAwayAbilityDescription
|
||||
.4byte gKeenEyeAbilityDescription
|
||||
.4byte gHyperCutterAbilityDescription
|
||||
.4byte gPickupAbilityDescription
|
||||
.4byte gTruantAbilityDescription
|
||||
.4byte gHustleAbilityDescription
|
||||
.4byte gCuteCharmAbilityDescription
|
||||
.4byte gPlusAbilityDescription
|
||||
.4byte gMinusAbilityDescription
|
||||
.4byte gForecastAbilityDescription
|
||||
.4byte gStickyHoldAbilityDescription
|
||||
.4byte gShedSkinAbilityDescription
|
||||
.4byte gGutsAbilityDescription
|
||||
.4byte gMarvelScaleAbilityDescription
|
||||
.4byte gLiquidOozeAbilityDescription
|
||||
.4byte gOvergrowAbilityDescription
|
||||
.4byte gBlazeAbilityDescription
|
||||
.4byte gTorrentAbilityDescription
|
||||
.4byte gSwarmAbilityDescription
|
||||
.4byte gRockHeadAbilityDescription
|
||||
.4byte gDroughtAbilityDescription
|
||||
.4byte gArenaTrapAbilityDescription
|
||||
.4byte gVitalSpiritAbilityDescription
|
||||
.4byte gWhiteSmokeAbilityDescription
|
||||
.4byte gPurePowerAbilityDescription
|
||||
.4byte gShellArmorAbilityDescription
|
||||
.4byte gCacophonyAbilityDescription
|
||||
.4byte gAirLockAbilityDescription
|
||||
@@ -1,233 +0,0 @@
|
||||
gNoneAbilityDescription:: @ 831AF98
|
||||
.string "No special ability.$"
|
||||
|
||||
gStenchAbilityDescription:: @ 831AFAC
|
||||
.string "Helps repel wild POKéMON.$"
|
||||
|
||||
gDrizzleAbilityDescription:: @ 831AFC6
|
||||
.string "Summons rain in battle.$"
|
||||
|
||||
gSpeedBoostAbilityDescription:: @ 831AFDE
|
||||
.string "Gradually boosts SPEED.$"
|
||||
|
||||
gBattleArmorAbilityDescription:: @ 831AFF6
|
||||
.string "Blocks critical hits.$"
|
||||
|
||||
gSturdyAbilityDescription:: @ 831B00C
|
||||
.string "Negates 1-hit KO attacks.$"
|
||||
|
||||
gDampAbilityDescription:: @ 831B026
|
||||
.string "Prevents self-destruction.$"
|
||||
|
||||
gLimberAbilityDescription:: @ 831B041
|
||||
.string "Prevents paralysis.$"
|
||||
|
||||
gSandVeilAbilityDescription:: @ 831B055
|
||||
.string "Ups evasion in a sandstorm.$"
|
||||
|
||||
gStaticAbilityDescription:: @ 831B071
|
||||
.string "Paralyzes on contact.$"
|
||||
|
||||
gVoltAbsorbAbilityDescription:: @ 831B087
|
||||
.string "Turns electricity into HP.$"
|
||||
|
||||
gWaterAbsorbAbilityDescription:: @ 831B0A2
|
||||
.string "Changes water into HP.$"
|
||||
|
||||
gObliviousAbilityDescription:: @ 831B0B9
|
||||
.string "Prevents attraction.$"
|
||||
|
||||
gCloudNineAbilityDescription:: @ 831B0CE
|
||||
.string "Negates weather effects.$"
|
||||
|
||||
gCompoundEyesAbilityDescription:: @ 831B0E7
|
||||
.string "Raises accuracy.$"
|
||||
|
||||
gInsomniaAbilityDescription:: @ 831B0F8
|
||||
.string "Prevents sleep.$"
|
||||
|
||||
gColorChangeAbilityDescription:: @ 831B108
|
||||
.string "Changes type to foe’s move.$"
|
||||
|
||||
gImmunityAbilityDescription:: @ 831B124
|
||||
.string "Prevents poisoning.$"
|
||||
|
||||
gFlashFireAbilityDescription:: @ 831B138
|
||||
.string "Powers up if hit by fire.$"
|
||||
|
||||
gShieldDustAbilityDescription:: @ 831B152
|
||||
.string "Prevents added effects.$"
|
||||
|
||||
gOwnTempoAbilityDescription:: @ 831B16A
|
||||
.string "Prevents confusion.$"
|
||||
|
||||
gSuctionCupsAbilityDescription:: @ 831B17E
|
||||
.string "Firmly anchors the body.$"
|
||||
|
||||
gIntimidateAbilityDescription:: @ 831B197
|
||||
.string "Lowers the foe’s ATTACK.$"
|
||||
|
||||
gShadowTagAbilityDescription:: @ 831B1B0
|
||||
.string "Prevents the foe’s escape.$"
|
||||
|
||||
gRoughSkinAbilityDescription:: @ 831B1CB
|
||||
.string "Hurts to touch.$"
|
||||
|
||||
gWonderGuardAbilityDescription:: @ 831B1DB
|
||||
.string "“Super effective” hits.$"
|
||||
|
||||
gLevitateAbilityDescription:: @ 831B1F3
|
||||
.string "Not hit by GROUND attacks.$"
|
||||
|
||||
gEffectSporeAbilityDescription:: @ 831B20E
|
||||
.string "Leaves spores on contact.$"
|
||||
|
||||
gSynchronizeAbilityDescription:: @ 831B228
|
||||
.string "Passes on status problems.$"
|
||||
|
||||
gClearBodyAbilityDescription:: @ 831B243
|
||||
.string "Prevents ability reduction.$"
|
||||
|
||||
gNaturalCureAbilityDescription:: @ 831B25F
|
||||
.string "Heals upon switching out.$"
|
||||
|
||||
gLightningRodAbilityDescription:: @ 831B279
|
||||
.string "Draws electrical moves.$"
|
||||
|
||||
gSereneGraceAbilityDescription:: @ 831B291
|
||||
.string "Promotes added effects.$"
|
||||
|
||||
gSwiftSwimAbilityDescription:: @ 831B2A9
|
||||
.string "Raises SPEED in rain.$"
|
||||
|
||||
gChlorophyllAbilityDescription:: @ 831B2BF
|
||||
.string "Raises SPEED in sunshine.$"
|
||||
|
||||
gIlluminateAbilityDescription:: @ 831B2D9
|
||||
.string "Encounter rate increases.$"
|
||||
|
||||
gTraceAbilityDescription:: @ 831B2F3
|
||||
.string "Copies special ability.$"
|
||||
|
||||
gHugePowerAbilityDescription:: @ 831B30B
|
||||
.string "Raises ATTACK.$"
|
||||
|
||||
gPoisonPointAbilityDescription:: @ 831B31A
|
||||
.string "Poisons foe on contact.$"
|
||||
|
||||
gInnerFocusAbilityDescription:: @ 831B332
|
||||
.string "Prevents flinching.$"
|
||||
|
||||
gMagmaArmorAbilityDescription:: @ 831B346
|
||||
.string "Prevents freezing.$"
|
||||
|
||||
gWaterVeilAbilityDescription:: @ 831B359
|
||||
.string "Prevents burns.$"
|
||||
|
||||
gMagnetPullAbilityDescription:: @ 831B369
|
||||
.string "Traps STEEL-type POKéMON.$"
|
||||
|
||||
gSoundproofAbilityDescription:: @ 831B383
|
||||
.string "Avoids sound-based moves.$"
|
||||
|
||||
gRainDishAbilityDescription:: @ 831B39D
|
||||
.string "Slight HP recovery in rain.$"
|
||||
|
||||
gSandStreamAbilityDescription:: @ 831B3B9
|
||||
.string "Summons a sandstorm.$"
|
||||
|
||||
gPressureAbilityDescription:: @ 831B3CE
|
||||
.string "Raises foe’s PP usage.$"
|
||||
|
||||
gThickFatAbilityDescription:: @ 831B3E5
|
||||
.string "Heat-and-cold protection.$"
|
||||
|
||||
gEarlyBirdAbilityDescription:: @ 831B3FF
|
||||
.string "Awakens quickly from sleep.$"
|
||||
|
||||
gFlameBodyAbilityDescription:: @ 831B41B
|
||||
.string "Burns the foe on contact.$"
|
||||
|
||||
gRunAwayAbilityDescription:: @ 831B435
|
||||
.string "Makes escaping easier.$"
|
||||
|
||||
gKeenEyeAbilityDescription:: @ 831B44C
|
||||
.string "Prevents loss of accuracy.$"
|
||||
|
||||
gHyperCutterAbilityDescription:: @ 831B467
|
||||
.string "Prevents ATTACK reduction.$"
|
||||
|
||||
gPickupAbilityDescription:: @ 831B482
|
||||
.string "May pick up items.$"
|
||||
|
||||
gTruantAbilityDescription:: @ 831B495
|
||||
.string "Moves only every two turns.$"
|
||||
|
||||
gHustleAbilityDescription:: @ 831B4B1
|
||||
.string "Trades accuracy for power.$"
|
||||
|
||||
gCuteCharmAbilityDescription:: @ 831B4CC
|
||||
.string "Infatuates on contact.$"
|
||||
|
||||
gPlusAbilityDescription:: @ 831B4E3
|
||||
.string "Powers up with MINUS.$"
|
||||
|
||||
gMinusAbilityDescription:: @ 831B4F9
|
||||
.string "Powers up with PLUS.$"
|
||||
|
||||
gForecastAbilityDescription:: @ 831B50E
|
||||
.string "Changes with the weather.$"
|
||||
|
||||
gStickyHoldAbilityDescription:: @ 831B528
|
||||
.string "Prevents item theft.$"
|
||||
|
||||
gShedSkinAbilityDescription:: @ 831B53D
|
||||
.string "Heals the body by shedding.$"
|
||||
|
||||
gGutsAbilityDescription:: @ 831B559
|
||||
.string "Ups ATTACK if suffering.$"
|
||||
|
||||
gMarvelScaleAbilityDescription:: @ 831B572
|
||||
.string "Ups DEFENSE if suffering.$"
|
||||
|
||||
gLiquidOozeAbilityDescription:: @ 831B58C
|
||||
.string "Draining causes injury.$"
|
||||
|
||||
gOvergrowAbilityDescription:: @ 831B5A4
|
||||
.string "Ups GRASS moves in a pinch.$"
|
||||
|
||||
gBlazeAbilityDescription:: @ 831B5C0
|
||||
.string "Ups FIRE moves in a pinch.$"
|
||||
|
||||
gTorrentAbilityDescription:: @ 831B5DB
|
||||
.string "Ups WATER moves in a pinch.$"
|
||||
|
||||
gSwarmAbilityDescription:: @ 831B5F7
|
||||
.string "Ups BUG moves in a pinch.$"
|
||||
|
||||
gRockHeadAbilityDescription:: @ 831B611
|
||||
.string "Prevents recoil damage.$"
|
||||
|
||||
gDroughtAbilityDescription:: @ 831B629
|
||||
.string "Summons sunlight in battle.$"
|
||||
|
||||
gArenaTrapAbilityDescription:: @ 831B645
|
||||
.string "Prevents fleeing.$"
|
||||
|
||||
gVitalSpiritAbilityDescription:: @ 831B657
|
||||
.string "Prevents sleep.$"
|
||||
|
||||
gWhiteSmokeAbilityDescription:: @ 831B667
|
||||
.string "Prevents ability reduction.$"
|
||||
|
||||
gPurePowerAbilityDescription:: @ 831B683
|
||||
.string "Raises ATTACK.$"
|
||||
|
||||
gShellArmorAbilityDescription:: @ 831B692
|
||||
.string "Blocks critical hits.$"
|
||||
|
||||
gCacophonyAbilityDescription:: @ 831B6A8
|
||||
.string "Avoids sound-based moves.$"
|
||||
|
||||
gAirLockAbilityDescription:: @ 831B6C2
|
||||
.string "Negates weather effects.$"
|
||||
@@ -1,79 +0,0 @@
|
||||
gAbilityNames:: @ 831B6DB
|
||||
.string "-------$", 13
|
||||
.string "STENCH$", 13
|
||||
.string "DRIZZLE$", 13
|
||||
.string "SPEED BOOST$", 13
|
||||
.string "BATTLE ARMOR$", 13
|
||||
.string "STURDY$", 13
|
||||
.string "DAMP$", 13
|
||||
.string "LIMBER$", 13
|
||||
.string "SAND VEIL$", 13
|
||||
.string "STATIC$", 13
|
||||
.string "VOLT ABSORB$", 13
|
||||
.string "WATER ABSORB$", 13
|
||||
.string "OBLIVIOUS$", 13
|
||||
.string "CLOUD NINE$", 13
|
||||
.string "COMPOUNDEYES$", 13
|
||||
.string "INSOMNIA$", 13
|
||||
.string "COLOR CHANGE$", 13
|
||||
.string "IMMUNITY$", 13
|
||||
.string "FLASH FIRE$", 13
|
||||
.string "SHIELD DUST$", 13
|
||||
.string "OWN TEMPO$", 13
|
||||
.string "SUCTION CUPS$", 13
|
||||
.string "INTIMIDATE$", 13
|
||||
.string "SHADOW TAG$", 13
|
||||
.string "ROUGH SKIN$", 13
|
||||
.string "WONDER GUARD$", 13
|
||||
.string "LEVITATE$", 13
|
||||
.string "EFFECT SPORE$", 13
|
||||
.string "SYNCHRONIZE$", 13
|
||||
.string "CLEAR BODY$", 13
|
||||
.string "NATURAL CURE$", 13
|
||||
.string "LIGHTNINGROD$", 13
|
||||
.string "SERENE GRACE$", 13
|
||||
.string "SWIFT SWIM$", 13
|
||||
.string "CHLOROPHYLL$", 13
|
||||
.string "ILLUMINATE$", 13
|
||||
.string "TRACE$", 13
|
||||
.string "HUGE POWER$", 13
|
||||
.string "POISON POINT$", 13
|
||||
.string "INNER FOCUS$", 13
|
||||
.string "MAGMA ARMOR$", 13
|
||||
.string "WATER VEIL$", 13
|
||||
.string "MAGNET PULL$", 13
|
||||
.string "SOUNDPROOF$", 13
|
||||
.string "RAIN DISH$", 13
|
||||
.string "SAND STREAM$", 13
|
||||
.string "PRESSURE$", 13
|
||||
.string "THICK FAT$", 13
|
||||
.string "EARLY BIRD$", 13
|
||||
.string "FLAME BODY$", 13
|
||||
.string "RUN AWAY$", 13
|
||||
.string "KEEN EYE$", 13
|
||||
.string "HYPER CUTTER$", 13
|
||||
.string "PICKUP$", 13
|
||||
.string "TRUANT$", 13
|
||||
.string "HUSTLE$", 13
|
||||
.string "CUTE CHARM$", 13
|
||||
.string "PLUS$", 13
|
||||
.string "MINUS$", 13
|
||||
.string "FORECAST$", 13
|
||||
.string "STICKY HOLD$", 13
|
||||
.string "SHED SKIN$", 13
|
||||
.string "GUTS$", 13
|
||||
.string "MARVEL SCALE$", 13
|
||||
.string "LIQUID OOZE$", 13
|
||||
.string "OVERGROW$", 13
|
||||
.string "BLAZE$", 13
|
||||
.string "TORRENT$", 13
|
||||
.string "SWARM$", 13
|
||||
.string "ROCK HEAD$", 13
|
||||
.string "DROUGHT$", 13
|
||||
.string "ARENA TRAP$", 13
|
||||
.string "VITAL SPIRIT$", 13
|
||||
.string "WHITE SMOKE$", 13
|
||||
.string "PURE POWER$", 13
|
||||
.string "SHELL ARMOR$", 13
|
||||
.string "CACOPHONY$", 13
|
||||
.string "AIR LOCK$", 13
|
||||
@@ -1,19 +0,0 @@
|
||||
gTypeNames:: @ 831AE38
|
||||
.string "NORMAL$", 7
|
||||
.string "FIGHT$", 7
|
||||
.string "FLYING$", 7
|
||||
.string "POISON$", 7
|
||||
.string "GROUND$", 7
|
||||
.string "ROCK$", 7
|
||||
.string "BUG$", 7
|
||||
.string "GHOST$", 7
|
||||
.string "STEEL$", 7
|
||||
.string "???$", 7
|
||||
.string "FIRE$", 7
|
||||
.string "WATER$", 7
|
||||
.string "GRASS$", 7
|
||||
.string "ELECTR$", 7
|
||||
.string "PSYCHC$", 7
|
||||
.string "ICE$", 7
|
||||
.string "DRAGON$", 7
|
||||
.string "DARK$", 7
|
||||
@@ -1,59 +0,0 @@
|
||||
@ This is a factor in how much money you get for beating a trainer.
|
||||
.align 2
|
||||
gTrainerMoneyTable:: @ 831AEB8
|
||||
.byte TRAINER_CLASS_TEAM_AQUA, 5, 0, 0
|
||||
.byte TRAINER_CLASS_AQUA_ADMIN, 10, 0, 0
|
||||
.byte TRAINER_CLASS_AQUA_LEADER, 20, 0, 0
|
||||
.byte TRAINER_CLASS_AROMA_LADY, 10, 0, 0
|
||||
.byte TRAINER_CLASS_RUIN_MANIAC, 15, 0, 0
|
||||
.byte TRAINER_CLASS_INTERVIEWER, 12, 0, 0
|
||||
.byte TRAINER_CLASS_TUBER_1, 1, 0, 0
|
||||
.byte TRAINER_CLASS_TUBER_2, 1, 0, 0
|
||||
.byte TRAINER_CLASS_SIS_AND_BRO, 3, 0, 0
|
||||
.byte TRAINER_CLASS_COOLTRAINER_1, 12, 0, 0
|
||||
.byte TRAINER_CLASS_HEX_MANIAC, 6, 0, 0
|
||||
.byte TRAINER_CLASS_LADY, 50, 0, 0
|
||||
.byte TRAINER_CLASS_BEAUTY, 20, 0, 0
|
||||
.byte TRAINER_CLASS_RICH_BOY, 50, 0, 0
|
||||
.byte TRAINER_CLASS_POKEMANIAC, 15, 0, 0
|
||||
.byte TRAINER_CLASS_SWIMMER_M, 2, 0, 0
|
||||
.byte TRAINER_CLASS_BLACK_BELT, 8, 0, 0
|
||||
.byte TRAINER_CLASS_GUITARIST, 8, 0, 0
|
||||
.byte TRAINER_CLASS_KINDLER, 8, 0, 0
|
||||
.byte TRAINER_CLASS_CAMPER, 4, 0, 0
|
||||
.byte TRAINER_CLASS_OLD_COUPLE, 10, 0, 0
|
||||
.byte TRAINER_CLASS_BUG_MANIAC, 15, 0, 0
|
||||
.byte TRAINER_CLASS_PSYCHIC, 6, 0, 0
|
||||
.byte TRAINER_CLASS_GENTLEMAN, 20, 0, 0
|
||||
.byte TRAINER_CLASS_ELITE_FOUR, 25, 0, 0
|
||||
.byte TRAINER_CLASS_LEADER, 25, 0, 0
|
||||
.byte TRAINER_CLASS_SCHOOL_KID, 5, 0, 0
|
||||
.byte TRAINER_CLASS_SR_AND_JR, 4, 0, 0
|
||||
.byte TRAINER_CLASS_POKEFAN, 20, 0, 0
|
||||
.byte TRAINER_CLASS_EXPERT, 10, 0, 0
|
||||
.byte TRAINER_CLASS_YOUNGSTER, 4, 0, 0
|
||||
.byte TRAINER_CLASS_CHAMPION, 50, 0, 0
|
||||
.byte TRAINER_CLASS_FISHERMAN, 10, 0, 0
|
||||
.byte TRAINER_CLASS_TRIATHLETE, 10, 0, 0
|
||||
.byte TRAINER_CLASS_DRAGON_TAMER, 12, 0, 0
|
||||
.byte TRAINER_CLASS_BIRD_KEEPER, 8, 0, 0
|
||||
.byte TRAINER_CLASS_NINJA_BOY, 3, 0, 0
|
||||
.byte TRAINER_CLASS_BATTLE_GIRL, 6, 0, 0
|
||||
.byte TRAINER_CLASS_PARASOL_LADY, 10, 0, 0
|
||||
.byte TRAINER_CLASS_SWIMMER_F, 2, 0, 0
|
||||
.byte TRAINER_CLASS_PICNICKER, 4, 0, 0
|
||||
.byte TRAINER_CLASS_TWINS, 3, 0, 0
|
||||
.byte TRAINER_CLASS_SAILOR, 8, 0, 0
|
||||
.byte TRAINER_CLASS_COLLECTOR, 15, 0, 0
|
||||
.byte TRAINER_CLASS_PKMN_TRAINER_3, 15, 0, 0
|
||||
.byte TRAINER_CLASS_PKMN_BREEDER, 10, 0, 0
|
||||
.byte TRAINER_CLASS_PKMN_RANGER, 12, 0, 0
|
||||
.byte TRAINER_CLASS_TEAM_MAGMA, 5, 0, 0
|
||||
.byte TRAINER_CLASS_MAGMA_ADMIN, 10, 0, 0
|
||||
.byte TRAINER_CLASS_MAGMA_LEADER, 20, 0, 0
|
||||
.byte TRAINER_CLASS_LASS, 4, 0, 0
|
||||
.byte TRAINER_CLASS_BUG_CATCHER, 4, 0, 0
|
||||
.byte TRAINER_CLASS_HIKER, 10, 0, 0
|
||||
.byte TRAINER_CLASS_YOUNG_COUPLE, 8, 0, 0
|
||||
.byte TRAINER_CLASS_WINSTRATE, 10, 0, 0
|
||||
.byte -1, 5, 0, 0
|
||||
@@ -1,10 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
gUnknown_0862AD34:: @ 862AD34
|
||||
.2byte 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048
|
||||
|
||||
gUnknown_0862AD44:: @ 862AD44
|
||||
.2byte 0x0041, 0x0042, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0000
|
||||
@@ -1,119 +0,0 @@
|
||||
@ format: attacking type, defending type, damage multiplier
|
||||
@ the multiplier is a (decimal) fixed-point number:
|
||||
@ 20 is ×2.0
|
||||
@ 05 is ×0.5
|
||||
@ 00 is ×0
|
||||
|
||||
gTypeEffectiveness:: @ 831ACE8
|
||||
.byte TYPE_NORMAL, TYPE_ROCK, 5
|
||||
.byte TYPE_NORMAL, TYPE_STEEL, 5
|
||||
.byte TYPE_FIRE, TYPE_FIRE, 5
|
||||
.byte TYPE_FIRE, TYPE_WATER, 5
|
||||
.byte TYPE_FIRE, TYPE_GRASS, 20
|
||||
.byte TYPE_FIRE, TYPE_ICE, 20
|
||||
.byte TYPE_FIRE, TYPE_BUG, 20
|
||||
.byte TYPE_FIRE, TYPE_ROCK, 5
|
||||
.byte TYPE_FIRE, TYPE_DRAGON, 5
|
||||
.byte TYPE_FIRE, TYPE_STEEL, 20
|
||||
.byte TYPE_WATER, TYPE_FIRE, 20
|
||||
.byte TYPE_WATER, TYPE_WATER, 5
|
||||
.byte TYPE_WATER, TYPE_GRASS, 5
|
||||
.byte TYPE_WATER, TYPE_GROUND, 20
|
||||
.byte TYPE_WATER, TYPE_ROCK, 20
|
||||
.byte TYPE_WATER, TYPE_DRAGON, 5
|
||||
.byte TYPE_ELECTRIC, TYPE_WATER, 20
|
||||
.byte TYPE_ELECTRIC, TYPE_ELECTRIC, 5
|
||||
.byte TYPE_ELECTRIC, TYPE_GRASS, 5
|
||||
.byte TYPE_ELECTRIC, TYPE_GROUND, 0
|
||||
.byte TYPE_ELECTRIC, TYPE_FLYING, 20
|
||||
.byte TYPE_ELECTRIC, TYPE_DRAGON, 5
|
||||
.byte TYPE_GRASS, TYPE_FIRE, 5
|
||||
.byte TYPE_GRASS, TYPE_WATER, 20
|
||||
.byte TYPE_GRASS, TYPE_GRASS, 5
|
||||
.byte TYPE_GRASS, TYPE_POISON, 5
|
||||
.byte TYPE_GRASS, TYPE_GROUND, 20
|
||||
.byte TYPE_GRASS, TYPE_FLYING, 5
|
||||
.byte TYPE_GRASS, TYPE_BUG, 5
|
||||
.byte TYPE_GRASS, TYPE_ROCK, 20
|
||||
.byte TYPE_GRASS, TYPE_DRAGON, 5
|
||||
.byte TYPE_GRASS, TYPE_STEEL, 5
|
||||
.byte TYPE_ICE, TYPE_WATER, 5
|
||||
.byte TYPE_ICE, TYPE_GRASS, 20
|
||||
.byte TYPE_ICE, TYPE_ICE, 5
|
||||
.byte TYPE_ICE, TYPE_GROUND, 20
|
||||
.byte TYPE_ICE, TYPE_FLYING, 20
|
||||
.byte TYPE_ICE, TYPE_DRAGON, 20
|
||||
.byte TYPE_ICE, TYPE_STEEL, 5
|
||||
.byte TYPE_ICE, TYPE_FIRE, 5
|
||||
.byte TYPE_FIGHTING, TYPE_NORMAL, 20
|
||||
.byte TYPE_FIGHTING, TYPE_ICE, 20
|
||||
.byte TYPE_FIGHTING, TYPE_POISON, 5
|
||||
.byte TYPE_FIGHTING, TYPE_FLYING, 5
|
||||
.byte TYPE_FIGHTING, TYPE_PSYCHIC, 5
|
||||
.byte TYPE_FIGHTING, TYPE_BUG, 5
|
||||
.byte TYPE_FIGHTING, TYPE_ROCK, 20
|
||||
.byte TYPE_FIGHTING, TYPE_DARK, 20
|
||||
.byte TYPE_FIGHTING, TYPE_STEEL, 20
|
||||
.byte TYPE_POISON, TYPE_GRASS, 20
|
||||
.byte TYPE_POISON, TYPE_POISON, 5
|
||||
.byte TYPE_POISON, TYPE_GROUND, 5
|
||||
.byte TYPE_POISON, TYPE_ROCK, 5
|
||||
.byte TYPE_POISON, TYPE_GHOST, 5
|
||||
.byte TYPE_POISON, TYPE_STEEL, 0
|
||||
.byte TYPE_GROUND, TYPE_FIRE, 20
|
||||
.byte TYPE_GROUND, TYPE_ELECTRIC, 20
|
||||
.byte TYPE_GROUND, TYPE_GRASS, 5
|
||||
.byte TYPE_GROUND, TYPE_POISON, 20
|
||||
.byte TYPE_GROUND, TYPE_FLYING, 0
|
||||
.byte TYPE_GROUND, TYPE_BUG, 5
|
||||
.byte TYPE_GROUND, TYPE_ROCK, 20
|
||||
.byte TYPE_GROUND, TYPE_STEEL, 20
|
||||
.byte TYPE_FLYING, TYPE_ELECTRIC, 5
|
||||
.byte TYPE_FLYING, TYPE_GRASS, 20
|
||||
.byte TYPE_FLYING, TYPE_FIGHTING, 20
|
||||
.byte TYPE_FLYING, TYPE_BUG, 20
|
||||
.byte TYPE_FLYING, TYPE_ROCK, 5
|
||||
.byte TYPE_FLYING, TYPE_STEEL, 5
|
||||
.byte TYPE_PSYCHIC, TYPE_FIGHTING, 20
|
||||
.byte TYPE_PSYCHIC, TYPE_POISON, 20
|
||||
.byte TYPE_PSYCHIC, TYPE_PSYCHIC, 5
|
||||
.byte TYPE_PSYCHIC, TYPE_DARK, 0
|
||||
.byte TYPE_PSYCHIC, TYPE_STEEL, 5
|
||||
.byte TYPE_BUG, TYPE_FIRE, 5
|
||||
.byte TYPE_BUG, TYPE_GRASS, 20
|
||||
.byte TYPE_BUG, TYPE_FIGHTING, 5
|
||||
.byte TYPE_BUG, TYPE_POISON, 5
|
||||
.byte TYPE_BUG, TYPE_FLYING, 5
|
||||
.byte TYPE_BUG, TYPE_PSYCHIC, 20
|
||||
.byte TYPE_BUG, TYPE_GHOST, 5
|
||||
.byte TYPE_BUG, TYPE_DARK, 20
|
||||
.byte TYPE_BUG, TYPE_STEEL, 5
|
||||
.byte TYPE_ROCK, TYPE_FIRE, 20
|
||||
.byte TYPE_ROCK, TYPE_ICE, 20
|
||||
.byte TYPE_ROCK, TYPE_FIGHTING, 5
|
||||
.byte TYPE_ROCK, TYPE_GROUND, 5
|
||||
.byte TYPE_ROCK, TYPE_FLYING, 20
|
||||
.byte TYPE_ROCK, TYPE_BUG, 20
|
||||
.byte TYPE_ROCK, TYPE_STEEL, 5
|
||||
.byte TYPE_GHOST, TYPE_NORMAL, 0
|
||||
.byte TYPE_GHOST, TYPE_PSYCHIC, 20
|
||||
.byte TYPE_GHOST, TYPE_DARK, 5
|
||||
.byte TYPE_GHOST, TYPE_STEEL, 5
|
||||
.byte TYPE_GHOST, TYPE_GHOST, 20
|
||||
.byte TYPE_DRAGON, TYPE_DRAGON, 20
|
||||
.byte TYPE_DRAGON, TYPE_STEEL, 5
|
||||
.byte TYPE_DARK, TYPE_FIGHTING, 5
|
||||
.byte TYPE_DARK, TYPE_PSYCHIC, 20
|
||||
.byte TYPE_DARK, TYPE_GHOST, 20
|
||||
.byte TYPE_DARK, TYPE_DARK, 5
|
||||
.byte TYPE_DARK, TYPE_STEEL, 5
|
||||
.byte TYPE_STEEL, TYPE_FIRE, 5
|
||||
.byte TYPE_STEEL, TYPE_WATER, 5
|
||||
.byte TYPE_STEEL, TYPE_ELECTRIC, 5
|
||||
.byte TYPE_STEEL, TYPE_ICE, 20
|
||||
.byte TYPE_STEEL, TYPE_ROCK, 20
|
||||
.byte TYPE_STEEL, TYPE_STEEL, 5
|
||||
.byte 0xFE, 0xFE, 0
|
||||
.byte TYPE_NORMAL, TYPE_GHOST, 0
|
||||
.byte TYPE_FIGHTING, TYPE_GHOST, 0
|
||||
.byte 0xFF, 0xFF, 0
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 2, 0
|
||||
gUnknown_0862AD54:: @ 862AD54
|
||||
.incbin "graphics/battle_transitions/frontier_transition.4bpp.lz"
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
// should they be included here or included individually by every file?
|
||||
#include "constants/battle.h"
|
||||
#include "battle_main.h"
|
||||
#include "battle_util.h"
|
||||
#include "battle_script_commands.h"
|
||||
#include "battle_main.h"
|
||||
#include "battle_ai_switch_items.h"
|
||||
#include "battle_gfx_sfx_util.h"
|
||||
#include "battle_util2.h"
|
||||
@@ -66,29 +66,14 @@
|
||||
#define MSG_DISPLAY 0x7
|
||||
#define BATTLE_COMMUNICATION_ENTRIES_COUNT 0x8
|
||||
|
||||
#define MOVE_TARGET_SELECTED 0x0
|
||||
#define MOVE_TARGET_DEPENDS 0x1
|
||||
#define MOVE_TARGET_USER 0x2
|
||||
#define MOVE_TARGET_RANDOM 0x4
|
||||
#define MOVE_TARGET_x10 0x10
|
||||
#define MOVE_TARGET_BOTH 0x8
|
||||
#define MOVE_TARGET_FOES_AND_ALLY 0x20
|
||||
#define MOVE_TARGET_OPPONENTS_FIELD 0x40
|
||||
|
||||
// defines for the u8 array gTypeEffectiveness
|
||||
#define TYPE_EFFECT_ATK_TYPE(i)((gTypeEffectiveness[i + 0]))
|
||||
#define TYPE_EFFECT_DEF_TYPE(i)((gTypeEffectiveness[i + 1]))
|
||||
#define TYPE_EFFECT_MULTIPLIER(i)((gTypeEffectiveness[i + 2]))
|
||||
|
||||
// defines for the gTypeEffectiveness multipliers
|
||||
#define TYPE_MUL_NO_EFFECT 0
|
||||
#define TYPE_MUL_NOT_EFFECTIVE 5
|
||||
#define TYPE_MUL_NORMAL 10
|
||||
#define TYPE_MUL_SUPER_EFFECTIVE 20
|
||||
|
||||
// special type table Ids
|
||||
#define TYPE_FORESIGHT 0xFE
|
||||
#define TYPE_ENDTABLE 0xFF
|
||||
#define MOVE_TARGET_SELECTED 0x0
|
||||
#define MOVE_TARGET_DEPENDS 0x1
|
||||
#define MOVE_TARGET_USER_OR_SELECTED 0x2
|
||||
#define MOVE_TARGET_RANDOM 0x4
|
||||
#define MOVE_TARGET_BOTH 0x8
|
||||
#define MOVE_TARGET_USER 0x10
|
||||
#define MOVE_TARGET_FOES_AND_ALLY 0x20
|
||||
#define MOVE_TARGET_OPPONENTS_FIELD 0x40
|
||||
|
||||
#define BATTLE_BUFFER_LINK_SIZE 0x1000
|
||||
|
||||
|
||||
@@ -1,6 +1,30 @@
|
||||
#ifndef GUARD_BATTLE_MAIN_H
|
||||
#define GUARD_BATTLE_MAIN_H
|
||||
|
||||
struct TrainerMoney
|
||||
{
|
||||
u8 classId;
|
||||
u8 value;
|
||||
};
|
||||
|
||||
#define TYPE_NAME_LENGTH 6
|
||||
#define ABILITY_NAME_LENGTH 12
|
||||
|
||||
// defines for the u8 array gTypeEffectiveness
|
||||
#define TYPE_EFFECT_ATK_TYPE(i)((gTypeEffectiveness[i + 0]))
|
||||
#define TYPE_EFFECT_DEF_TYPE(i)((gTypeEffectiveness[i + 1]))
|
||||
#define TYPE_EFFECT_MULTIPLIER(i)((gTypeEffectiveness[i + 2]))
|
||||
|
||||
// defines for the gTypeEffectiveness multipliers
|
||||
#define TYPE_MUL_NO_EFFECT 0
|
||||
#define TYPE_MUL_NOT_EFFECTIVE 5
|
||||
#define TYPE_MUL_NORMAL 10
|
||||
#define TYPE_MUL_SUPER_EFFECTIVE 20
|
||||
|
||||
// special type table Ids
|
||||
#define TYPE_FORESIGHT 0xFE
|
||||
#define TYPE_ENDTABLE 0xFF
|
||||
|
||||
void CB2_InitBattle(void);
|
||||
void BattleMainCB2(void);
|
||||
void CB2_QuitRecordedBattle(void);
|
||||
@@ -42,6 +66,12 @@ void RunBattleScriptCommands_PopCallbacksStack(void);
|
||||
void RunBattleScriptCommands(void);
|
||||
bool8 TryRunFromBattle(u8 battlerId);
|
||||
|
||||
extern const u8 gTypeEffectiveness[336];
|
||||
extern const u8 gTypeNames[][TYPE_NAME_LENGTH + 1];
|
||||
extern const struct TrainerMoney gTrainerMoneyTable[];
|
||||
extern const u8 gAbilityNames[][ABILITY_NAME_LENGTH + 1];
|
||||
extern const u8 *const gAbilityDescriptionPointers[];
|
||||
|
||||
extern const u8 gStatusConditionString_PoisonJpn[8];
|
||||
extern const u8 gStatusConditionString_SleepJpn[8];
|
||||
extern const u8 gStatusConditionString_ParalysisJpn[8];
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
#define EFFECT_EARTHQUAKE 147
|
||||
#define EFFECT_FUTURE_SIGHT 148
|
||||
#define EFFECT_GUST 149
|
||||
#define EFFECT_FLINCH_HIT_2 150 // STOMP ASTONISH EXTRASENSORY NEEDLE_ARM
|
||||
#define EFFECT_FLINCH_MINIMIZE_HIT 150 // STOMP ASTONISH EXTRASENSORY NEEDLE_ARM
|
||||
#define EFFECT_SOLARBEAM 151
|
||||
#define EFFECT_THUNDER 152
|
||||
#define EFFECT_TELEPORT 153
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
#define FLAG_0x058 0x58
|
||||
#define FLAG_0x059 0x59
|
||||
#define FLAG_0x05A 0x5A
|
||||
#define FLAG_0x05B 0x5B
|
||||
#define FLAG_WATTSON_REMATCH_AVAILABLE 0x5B
|
||||
#define FLAG_0x05C 0x5C
|
||||
#define FLAG_0x05D 0x5D
|
||||
#define FLAG_0x05E 0x5E
|
||||
@@ -208,8 +208,8 @@
|
||||
#define FLAG_0x0CD 0xCD
|
||||
#define FLAG_0x0CE 0xCE
|
||||
#define FLAG_0x0CF 0xCF
|
||||
#define FLAG_0x0D0 0xD0
|
||||
#define FLAG_0x0D1 0xD1
|
||||
#define FLAG_GOT_BASEMENT_KEY_FROM_WATTSON 0xD0
|
||||
#define FLAG_GOT_TM24_FROM_WATTSON 0xD1
|
||||
#define FLAG_0x0D2 0xD2
|
||||
#define FLAG_0x0D3 0xD3
|
||||
#define FLAG_0x0D4 0xD4
|
||||
@@ -912,8 +912,8 @@
|
||||
#define FLAG_0x38D 0x38D
|
||||
#define FLAG_0x38E 0x38E
|
||||
#define FLAG_0x38F 0x38F
|
||||
#define FLAG_0x390 0x390
|
||||
#define FLAG_0x391 0x391
|
||||
#define FLAG_SPRITEVIS_MAUVILLE_CITY_WATTSON 0x390
|
||||
#define FLAG_SPRITEVIS_MAUVILLE_GYM_WATTSON 0x391
|
||||
#define FLAG_0x392 0x392
|
||||
#define FLAG_0x393 0x393
|
||||
#define FLAG_0x394 0x394
|
||||
@@ -961,7 +961,7 @@
|
||||
#define FLAG_0x3BE 0x3BE
|
||||
#define FLAG_0x3BF 0x3BF
|
||||
#define FLAG_0x3C0 0x3C0
|
||||
#define FLAG_0x3C1 0x3C1
|
||||
#define FLAG_SPRITEVIS_SLATEPORT_MUSEUM_POPULATION 0x3C1
|
||||
#define FLAG_0x3C2 0x3C2
|
||||
#define FLAG_0x3C3 0x3C3
|
||||
#define FLAG_0x3C4 0x3C4
|
||||
|
||||
3913
include/data/battle_moves.h
Normal file
3913
include/data/battle_moves.h
Normal file
File diff suppressed because it is too large
Load Diff
247
include/data/text/abilities.h
Normal file
247
include/data/text/abilities.h
Normal file
@@ -0,0 +1,247 @@
|
||||
#ifndef POKEEMERALD_DATA_TEXT_ABILITIES_H
|
||||
#define POKEEMERALD_DATA_TEXT_ABILITIES_H
|
||||
|
||||
static const u8 gNoneAbilityDescription[] = _("No special ability.");
|
||||
static const u8 gStenchAbilityDescription[] = _("Helps repel wild POKéMON.");
|
||||
static const u8 gDrizzleAbilityDescription[] = _("Summons rain in battle.");
|
||||
static const u8 gSpeedBoostAbilityDescription[] = _("Gradually boosts SPEED.");
|
||||
static const u8 gBattleArmorAbilityDescription[] = _("Blocks critical hits.");
|
||||
static const u8 gSturdyAbilityDescription[] = _("Negates 1-hit KO attacks.");
|
||||
static const u8 gDampAbilityDescription[] = _("Prevents self-destruction.");
|
||||
static const u8 gLimberAbilityDescription[] = _("Prevents paralysis.");
|
||||
static const u8 gSandVeilAbilityDescription[] = _("Ups evasion in a sandstorm.");
|
||||
static const u8 gStaticAbilityDescription[] = _("Paralyzes on contact.");
|
||||
static const u8 gVoltAbsorbAbilityDescription[] = _("Turns electricity into HP.");
|
||||
static const u8 gWaterAbsorbAbilityDescription[] = _("Changes water into HP.");
|
||||
static const u8 gObliviousAbilityDescription[] = _("Prevents attraction.");
|
||||
static const u8 gCloudNineAbilityDescription[] = _("Negates weather effects.");
|
||||
static const u8 gCompoundEyesAbilityDescription[] = _("Raises accuracy.");
|
||||
static const u8 gInsomniaAbilityDescription[] = _("Prevents sleep.");
|
||||
static const u8 gColorChangeAbilityDescription[] = _("Changes type to foe’s move.");
|
||||
static const u8 gImmunityAbilityDescription[] = _("Prevents poisoning.");
|
||||
static const u8 gFlashFireAbilityDescription[] = _("Powers up if hit by fire.");
|
||||
static const u8 gShieldDustAbilityDescription[] = _("Prevents added effects.");
|
||||
static const u8 gOwnTempoAbilityDescription[] = _("Prevents confusion.");
|
||||
static const u8 gSuctionCupsAbilityDescription[] = _("Firmly anchors the body.");
|
||||
static const u8 gIntimidateAbilityDescription[] = _("Lowers the foe’s ATTACK.");
|
||||
static const u8 gShadowTagAbilityDescription[] = _("Prevents the foe’s escape.");
|
||||
static const u8 gRoughSkinAbilityDescription[] = _("Hurts to touch.");
|
||||
static const u8 gWonderGuardAbilityDescription[] = _("“Super effective” hits.");
|
||||
static const u8 gLevitateAbilityDescription[] = _("Not hit by GROUND attacks.");
|
||||
static const u8 gEffectSporeAbilityDescription[] = _("Leaves spores on contact.");
|
||||
static const u8 gSynchronizeAbilityDescription[] = _("Passes on status problems.");
|
||||
static const u8 gClearBodyAbilityDescription[] = _("Prevents ability reduction.");
|
||||
static const u8 gNaturalCureAbilityDescription[] = _("Heals upon switching out.");
|
||||
static const u8 gLightningRodAbilityDescription[] = _("Draws electrical moves.");
|
||||
static const u8 gSereneGraceAbilityDescription[] = _("Promotes added effects.");
|
||||
static const u8 gSwiftSwimAbilityDescription[] = _("Raises SPEED in rain.");
|
||||
static const u8 gChlorophyllAbilityDescription[] = _("Raises SPEED in sunshine.");
|
||||
static const u8 gIlluminateAbilityDescription[] = _("Encounter rate increases.");
|
||||
static const u8 gTraceAbilityDescription[] = _("Copies special ability.");
|
||||
static const u8 gHugePowerAbilityDescription[] = _("Raises ATTACK.");
|
||||
static const u8 gPoisonPointAbilityDescription[] = _("Poisons foe on contact.");
|
||||
static const u8 gInnerFocusAbilityDescription[] = _("Prevents flinching.");
|
||||
static const u8 gMagmaArmorAbilityDescription[] = _("Prevents freezing.");
|
||||
static const u8 gWaterVeilAbilityDescription[] = _("Prevents burns.");
|
||||
static const u8 gMagnetPullAbilityDescription[] = _("Traps STEEL-type POKéMON.");
|
||||
static const u8 gSoundproofAbilityDescription[] = _("Avoids sound-based moves.");
|
||||
static const u8 gRainDishAbilityDescription[] = _("Slight HP recovery in rain.");
|
||||
static const u8 gSandStreamAbilityDescription[] = _("Summons a sandstorm.");
|
||||
static const u8 gPressureAbilityDescription[] = _("Raises foe’s PP usage.");
|
||||
static const u8 gThickFatAbilityDescription[] = _("Heat-and-cold protection.");
|
||||
static const u8 gEarlyBirdAbilityDescription[] = _("Awakens quickly from sleep.");
|
||||
static const u8 gFlameBodyAbilityDescription[] = _("Burns the foe on contact.");
|
||||
static const u8 gRunAwayAbilityDescription[] = _("Makes escaping easier.");
|
||||
static const u8 gKeenEyeAbilityDescription[] = _("Prevents loss of accuracy.");
|
||||
static const u8 gHyperCutterAbilityDescription[] = _("Prevents ATTACK reduction.");
|
||||
static const u8 gPickupAbilityDescription[] = _("May pick up items.");
|
||||
static const u8 gTruantAbilityDescription[] = _("Moves only every two turns.");
|
||||
static const u8 gHustleAbilityDescription[] = _("Trades accuracy for power.");
|
||||
static const u8 gCuteCharmAbilityDescription[] = _("Infatuates on contact.");
|
||||
static const u8 gPlusAbilityDescription[] = _("Powers up with MINUS.");
|
||||
static const u8 gMinusAbilityDescription[] = _("Powers up with PLUS.");
|
||||
static const u8 gForecastAbilityDescription[] = _("Changes with the weather.");
|
||||
static const u8 gStickyHoldAbilityDescription[] = _("Prevents item theft.");
|
||||
static const u8 gShedSkinAbilityDescription[] = _("Heals the body by shedding.");
|
||||
static const u8 gGutsAbilityDescription[] = _("Ups ATTACK if suffering.");
|
||||
static const u8 gMarvelScaleAbilityDescription[] = _("Ups DEFENSE if suffering.");
|
||||
static const u8 gLiquidOozeAbilityDescription[] = _("Draining causes injury.");
|
||||
static const u8 gOvergrowAbilityDescription[] = _("Ups GRASS moves in a pinch.");
|
||||
static const u8 gBlazeAbilityDescription[] = _("Ups FIRE moves in a pinch.");
|
||||
static const u8 gTorrentAbilityDescription[] = _("Ups WATER moves in a pinch.");
|
||||
static const u8 gSwarmAbilityDescription[] = _("Ups BUG moves in a pinch.");
|
||||
static const u8 gRockHeadAbilityDescription[] = _("Prevents recoil damage.");
|
||||
static const u8 gDroughtAbilityDescription[] = _("Summons sunlight in battle.");
|
||||
static const u8 gArenaTrapAbilityDescription[] = _("Prevents fleeing.");
|
||||
static const u8 gVitalSpiritAbilityDescription[] = _("Prevents sleep.");
|
||||
static const u8 gWhiteSmokeAbilityDescription[] = _("Prevents ability reduction.");
|
||||
static const u8 gPurePowerAbilityDescription[] = _("Raises ATTACK.");
|
||||
static const u8 gShellArmorAbilityDescription[] = _("Blocks critical hits.");
|
||||
static const u8 gCacophonyAbilityDescription[] = _("Avoids sound-based moves.");
|
||||
static const u8 gAirLockAbilityDescription[] = _("Negates weather effects.");
|
||||
|
||||
const u8 gAbilityNames[][ABILITY_NAME_LENGTH + 1] =
|
||||
{
|
||||
_("-------"),
|
||||
_("STENCH"),
|
||||
_("DRIZZLE"),
|
||||
_("SPEED BOOST"),
|
||||
_("BATTLE ARMOR"),
|
||||
_("STURDY"),
|
||||
_("DAMP"),
|
||||
_("LIMBER"),
|
||||
_("SAND VEIL"),
|
||||
_("STATIC"),
|
||||
_("VOLT ABSORB"),
|
||||
_("WATER ABSORB"),
|
||||
_("OBLIVIOUS"),
|
||||
_("CLOUD NINE"),
|
||||
_("COMPOUNDEYES"),
|
||||
_("INSOMNIA"),
|
||||
_("COLOR CHANGE"),
|
||||
_("IMMUNITY"),
|
||||
_("FLASH FIRE"),
|
||||
_("SHIELD DUST"),
|
||||
_("OWN TEMPO"),
|
||||
_("SUCTION CUPS"),
|
||||
_("INTIMIDATE"),
|
||||
_("SHADOW TAG"),
|
||||
_("ROUGH SKIN"),
|
||||
_("WONDER GUARD"),
|
||||
_("LEVITATE"),
|
||||
_("EFFECT SPORE"),
|
||||
_("SYNCHRONIZE"),
|
||||
_("CLEAR BODY"),
|
||||
_("NATURAL CURE"),
|
||||
_("LIGHTNINGROD"),
|
||||
_("SERENE GRACE"),
|
||||
_("SWIFT SWIM"),
|
||||
_("CHLOROPHYLL"),
|
||||
_("ILLUMINATE"),
|
||||
_("TRACE"),
|
||||
_("HUGE POWER"),
|
||||
_("POISON POINT"),
|
||||
_("INNER FOCUS"),
|
||||
_("MAGMA ARMOR"),
|
||||
_("WATER VEIL"),
|
||||
_("MAGNET PULL"),
|
||||
_("SOUNDPROOF"),
|
||||
_("RAIN DISH"),
|
||||
_("SAND STREAM"),
|
||||
_("PRESSURE"),
|
||||
_("THICK FAT"),
|
||||
_("EARLY BIRD"),
|
||||
_("FLAME BODY"),
|
||||
_("RUN AWAY"),
|
||||
_("KEEN EYE"),
|
||||
_("HYPER CUTTER"),
|
||||
_("PICKUP"),
|
||||
_("TRUANT"),
|
||||
_("HUSTLE"),
|
||||
_("CUTE CHARM"),
|
||||
_("PLUS"),
|
||||
_("MINUS"),
|
||||
_("FORECAST"),
|
||||
_("STICKY HOLD"),
|
||||
_("SHED SKIN"),
|
||||
_("GUTS"),
|
||||
_("MARVEL SCALE"),
|
||||
_("LIQUID OOZE"),
|
||||
_("OVERGROW"),
|
||||
_("BLAZE"),
|
||||
_("TORRENT"),
|
||||
_("SWARM"),
|
||||
_("ROCK HEAD"),
|
||||
_("DROUGHT"),
|
||||
_("ARENA TRAP"),
|
||||
_("VITAL SPIRIT"),
|
||||
_("WHITE SMOKE"),
|
||||
_("PURE POWER"),
|
||||
_("SHELL ARMOR"),
|
||||
_("CACOPHONY"),
|
||||
_("AIR LOCK"),
|
||||
};
|
||||
|
||||
const u8 *const gAbilityDescriptionPointers[] =
|
||||
{
|
||||
gNoneAbilityDescription,
|
||||
gStenchAbilityDescription,
|
||||
gDrizzleAbilityDescription,
|
||||
gSpeedBoostAbilityDescription,
|
||||
gBattleArmorAbilityDescription,
|
||||
gSturdyAbilityDescription,
|
||||
gDampAbilityDescription,
|
||||
gLimberAbilityDescription,
|
||||
gSandVeilAbilityDescription,
|
||||
gStaticAbilityDescription,
|
||||
gVoltAbsorbAbilityDescription,
|
||||
gWaterAbsorbAbilityDescription,
|
||||
gObliviousAbilityDescription,
|
||||
gCloudNineAbilityDescription,
|
||||
gCompoundEyesAbilityDescription,
|
||||
gInsomniaAbilityDescription,
|
||||
gColorChangeAbilityDescription,
|
||||
gImmunityAbilityDescription,
|
||||
gFlashFireAbilityDescription,
|
||||
gShieldDustAbilityDescription,
|
||||
gOwnTempoAbilityDescription,
|
||||
gSuctionCupsAbilityDescription,
|
||||
gIntimidateAbilityDescription,
|
||||
gShadowTagAbilityDescription,
|
||||
gRoughSkinAbilityDescription,
|
||||
gWonderGuardAbilityDescription,
|
||||
gLevitateAbilityDescription,
|
||||
gEffectSporeAbilityDescription,
|
||||
gSynchronizeAbilityDescription,
|
||||
gClearBodyAbilityDescription,
|
||||
gNaturalCureAbilityDescription,
|
||||
gLightningRodAbilityDescription,
|
||||
gSereneGraceAbilityDescription,
|
||||
gSwiftSwimAbilityDescription,
|
||||
gChlorophyllAbilityDescription,
|
||||
gIlluminateAbilityDescription,
|
||||
gTraceAbilityDescription,
|
||||
gHugePowerAbilityDescription,
|
||||
gPoisonPointAbilityDescription,
|
||||
gInnerFocusAbilityDescription,
|
||||
gMagmaArmorAbilityDescription,
|
||||
gWaterVeilAbilityDescription,
|
||||
gMagnetPullAbilityDescription,
|
||||
gSoundproofAbilityDescription,
|
||||
gRainDishAbilityDescription,
|
||||
gSandStreamAbilityDescription,
|
||||
gPressureAbilityDescription,
|
||||
gThickFatAbilityDescription,
|
||||
gEarlyBirdAbilityDescription,
|
||||
gFlameBodyAbilityDescription,
|
||||
gRunAwayAbilityDescription,
|
||||
gKeenEyeAbilityDescription,
|
||||
gHyperCutterAbilityDescription,
|
||||
gPickupAbilityDescription,
|
||||
gTruantAbilityDescription,
|
||||
gHustleAbilityDescription,
|
||||
gCuteCharmAbilityDescription,
|
||||
gPlusAbilityDescription,
|
||||
gMinusAbilityDescription,
|
||||
gForecastAbilityDescription,
|
||||
gStickyHoldAbilityDescription,
|
||||
gShedSkinAbilityDescription,
|
||||
gGutsAbilityDescription,
|
||||
gMarvelScaleAbilityDescription,
|
||||
gLiquidOozeAbilityDescription,
|
||||
gOvergrowAbilityDescription,
|
||||
gBlazeAbilityDescription,
|
||||
gTorrentAbilityDescription,
|
||||
gSwarmAbilityDescription,
|
||||
gRockHeadAbilityDescription,
|
||||
gDroughtAbilityDescription,
|
||||
gArenaTrapAbilityDescription,
|
||||
gVitalSpiritAbilityDescription,
|
||||
gWhiteSmokeAbilityDescription,
|
||||
gPurePowerAbilityDescription,
|
||||
gShellArmorAbilityDescription,
|
||||
gCacophonyAbilityDescription,
|
||||
gAirLockAbilityDescription,
|
||||
};
|
||||
|
||||
#endif // POKEEMERALD_DATA_TEXT_ABILITIES_H
|
||||
@@ -14,8 +14,6 @@ extern struct MonCoords gTrainerFrontPicCoords[];
|
||||
|
||||
extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1];
|
||||
extern const u8 gMoveNames[][13];
|
||||
extern const u8 gAbilityNames[][13];
|
||||
extern const u8 gTypeNames[][7];
|
||||
extern struct CompressedSpriteSheet gUnknown_0831C620;
|
||||
extern struct CompressedSpritePalette gUnknown_0831C628;
|
||||
extern const struct SpriteTemplate gUnknown_0831C688;
|
||||
|
||||
87
include/gym_leader_rematch.h
Normal file
87
include/gym_leader_rematch.h
Normal file
@@ -0,0 +1,87 @@
|
||||
#ifndef GUARD_TRAINER_REMATCH_H
|
||||
#define GUARD_TRAINER_REMATCH_H
|
||||
|
||||
enum {
|
||||
REMATCH_ROSE,
|
||||
REMATCH_ANDRES,
|
||||
REMATCH_DUSTY,
|
||||
REMATCH_LOLA,
|
||||
REMATCH_RICKY,
|
||||
REMATCH_LILA_AND_ROY,
|
||||
REMATCH_CRISTIN,
|
||||
REMATCH_BROOKE,
|
||||
REMATCH_WILTON,
|
||||
REMATCH_VALERIE,
|
||||
REMATCH_CINDY,
|
||||
REMATCH_THALIA,
|
||||
REMATCH_JESSICA,
|
||||
REMATCH_WINSTON,
|
||||
REMATCH_STEVE,
|
||||
REMATCH_TONY,
|
||||
REMATCH_NOB,
|
||||
REMATCH_KOJI,
|
||||
REMATCH_FERNANDO,
|
||||
REMATCH_DALTON,
|
||||
REMATCH_BERNIE,
|
||||
REMATCH_ETHAN,
|
||||
REMATCH_JOHN_AND_JAY,
|
||||
REMATCH_JEFFREY,
|
||||
REMATCH_CAMERON,
|
||||
REMATCH_JACKI,
|
||||
REMATCH_WALTER,
|
||||
REMATCH_KAREN,
|
||||
REMATCH_JERRY,
|
||||
REMATCH_ANNA_AND_MEG,
|
||||
REMATCH_ISABEL,
|
||||
REMATCH_MIGUEL,
|
||||
REMATCH_TIMOTHY,
|
||||
REMATCH_SHELBY,
|
||||
REMATCH_CALVIN,
|
||||
REMATCH_ELLIOT,
|
||||
REMATCH_ISAIAH,
|
||||
REMATCH_MARIA,
|
||||
REMATCH_ABIGAIL,
|
||||
REMATCH_DYLAN,
|
||||
REMATCH_KATELYN,
|
||||
REMATCH_BENJAMIN,
|
||||
REMATCH_PABLO,
|
||||
REMATCH_NICOLAS,
|
||||
REMATCH_ROBERT,
|
||||
REMATCH_LAO,
|
||||
REMATCH_CYNDY,
|
||||
REMATCH_MADELINE,
|
||||
REMATCH_JENNY,
|
||||
REMATCH_DIANA,
|
||||
REMATCH_AMY_AND_LIV,
|
||||
REMATCH_ERNEST,
|
||||
REMATCH_CORY,
|
||||
REMATCH_EDWIN,
|
||||
REMATCH_LYDIA,
|
||||
REMATCH_ISAAC,
|
||||
REMATCH_GABRIELLE,
|
||||
REMATCH_CATHERINE,
|
||||
REMATCH_JACKSON,
|
||||
REMATCH_HALEY,
|
||||
REMATCH_JAMES,
|
||||
REMATCH_TRENT,
|
||||
REMATCH_SAWYER,
|
||||
REMATCH_KIRA_AND_DAN,
|
||||
REMATCH_WALLY_3,
|
||||
REMATCH_ROXANNE,
|
||||
REMATCH_BRAWLY,
|
||||
REMATCH_WATTSON,
|
||||
REMATCH_FLANNERY,
|
||||
REMATCH_NORMAN,
|
||||
REMATCH_WINONA,
|
||||
REMATCH_TATE_AND_LIZA,
|
||||
REMATCH_JUAN,
|
||||
REMATCH_SIDNEY,
|
||||
REMATCH_PHOEBE,
|
||||
REMATCH_GLACIA,
|
||||
REMATCH_DRAKE,
|
||||
REMATCH_WALLACE
|
||||
};
|
||||
|
||||
void UpdateGymLeaderRematch(void);
|
||||
|
||||
#endif //GUARD_TRAINER_REMATCH_H
|
||||
@@ -468,6 +468,7 @@ extern struct Pokemon gEnemyParty[PARTY_SIZE];
|
||||
extern struct SpriteTemplate gUnknown_0202499C;
|
||||
extern struct PokemonStorage* gPokemonStoragePtr;
|
||||
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
extern const u8 gFacilityClassToPicIndex[];
|
||||
extern const u8 gFacilityClassToTrainerClass[];
|
||||
extern const struct BaseStats gBaseStats[];
|
||||
|
||||
@@ -267,7 +267,7 @@ SECTIONS {
|
||||
src/rayquaza_scene.o(.text);
|
||||
src/walda_phrase.o(.text);
|
||||
asm/contest_link_81D9DE4.o(.text);
|
||||
asm/trainer_rematch.o(.text);
|
||||
src/gym_leader_rematch.o(.text);
|
||||
src/unk_transition.o(.text);
|
||||
src/international_string_util.o(.text);
|
||||
asm/international_string_util.o(.text);
|
||||
@@ -381,7 +381,6 @@ SECTIONS {
|
||||
data/smokescreen.o(.rodata);
|
||||
src/battle_controller_opponent.o(.rodata);
|
||||
src/battle_controller_link_opponent.o(.rodata);
|
||||
data/data2c.o(.rodata);
|
||||
src/pokemon.o(.rodata);
|
||||
src/trig.o(.rodata);
|
||||
src/util.o(.rodata);
|
||||
@@ -536,7 +535,7 @@ SECTIONS {
|
||||
data/pokenav.o(.rodata);
|
||||
src/rayquaza_scene.o(.rodata);
|
||||
src/walda_phrase.o(.rodata);
|
||||
data/trainer_rematch.o(.rodata);
|
||||
src/gym_leader_rematch.o(.rodata);
|
||||
data/unk_transition.o(.rodata);
|
||||
src/unk_transition.o(.rodata);
|
||||
data/text_input_strings.o(.rodata);
|
||||
|
||||
@@ -45,7 +45,6 @@ in order to read the next command correctly. refer to battle_ai_scripts.s for th
|
||||
AI scripts.
|
||||
*/
|
||||
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
extern const u8 * const gBattleAI_ScriptsTable[];
|
||||
|
||||
extern u32 GetAiScriptsInRecordedBattle();
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
#include "util.h"
|
||||
#include "constants/items.h"
|
||||
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
extern const u8 gTypeEffectiveness[];
|
||||
extern const u8 * const gItemEffectTable[]; // todo: fix once struct is declared
|
||||
|
||||
// this file's functions
|
||||
|
||||
@@ -32,7 +32,6 @@ extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
extern struct UnusedControllerStruct gUnknown_02022D0C;
|
||||
|
||||
extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
|
||||
extern void sub_8172EF0(u8 bank, struct Pokemon *mon);
|
||||
extern void sub_806A068(u16, u8);
|
||||
|
||||
@@ -31,7 +31,6 @@ extern struct UnusedControllerStruct gUnknown_02022D0C;
|
||||
|
||||
extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
|
||||
extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[];
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
|
||||
extern void sub_8172EF0(u8 bank, struct Pokemon *mon);
|
||||
extern void sub_806A068(u16, u8);
|
||||
|
||||
@@ -35,7 +35,6 @@ extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
extern struct UnusedControllerStruct gUnknown_02022D0C;
|
||||
|
||||
extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
|
||||
extern void sub_8172EF0(u8 bank, struct Pokemon *mon);
|
||||
extern void sub_806A068(u16, u8);
|
||||
@@ -1563,7 +1562,7 @@ static void OpponentHandleChooseMove(void)
|
||||
BtlController_EmitTwoReturnValues(1, 15, gBattlerTarget);
|
||||
break;
|
||||
default:
|
||||
if (gBattleMoves[moveInfo->moves[chosenMoveId]].target & (MOVE_TARGET_USER | MOVE_TARGET_x10))
|
||||
if (gBattleMoves[moveInfo->moves[chosenMoveId]].target & (MOVE_TARGET_USER_OR_SELECTED | MOVE_TARGET_USER))
|
||||
gBattlerTarget = gActiveBattler;
|
||||
if (gBattleMoves[moveInfo->moves[chosenMoveId]].target & MOVE_TARGET_BOTH)
|
||||
{
|
||||
@@ -1585,7 +1584,7 @@ static void OpponentHandleChooseMove(void)
|
||||
move = moveInfo->moves[chosenMoveId];
|
||||
} while (move == MOVE_NONE);
|
||||
|
||||
if (gBattleMoves[move].target & (MOVE_TARGET_USER | MOVE_TARGET_x10))
|
||||
if (gBattleMoves[move].target & (MOVE_TARGET_USER_OR_SELECTED | MOVE_TARGET_USER))
|
||||
BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (gActiveBattler << 8));
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||
BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (GetBattlerAtPosition(Random() & 2) << 8));
|
||||
|
||||
@@ -42,8 +42,6 @@ extern struct SpriteTemplate gUnknown_0202499C;
|
||||
|
||||
extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
|
||||
extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[];
|
||||
extern const u8 gTypeNames[][7];
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
|
||||
extern void sub_8172EF0(u8 bank, struct Pokemon *mon);
|
||||
extern void sub_81B89AC(u8 arg0);
|
||||
@@ -424,7 +422,7 @@ static void HandleInputChooseTarget(void)
|
||||
case B_POSITION_PLAYER_RIGHT:
|
||||
if (gActiveBattler != gMultiUsePlayerCursor)
|
||||
i++;
|
||||
else if (gBattleMoves[GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MOVE1 + gMoveSelectionCursor[gActiveBattler])].target & MOVE_TARGET_USER)
|
||||
else if (gBattleMoves[GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MOVE1 + gMoveSelectionCursor[gActiveBattler])].target & MOVE_TARGET_USER_OR_SELECTED)
|
||||
i++;
|
||||
break;
|
||||
case B_POSITION_OPPONENT_LEFT:
|
||||
@@ -466,7 +464,7 @@ static void HandleInputChooseTarget(void)
|
||||
case B_POSITION_PLAYER_RIGHT:
|
||||
if (gActiveBattler != gMultiUsePlayerCursor)
|
||||
i++;
|
||||
else if (gBattleMoves[GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MOVE1 + gMoveSelectionCursor[gActiveBattler])].target & MOVE_TARGET_USER)
|
||||
else if (gBattleMoves[GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MOVE1 + gMoveSelectionCursor[gActiveBattler])].target & MOVE_TARGET_USER_OR_SELECTED)
|
||||
i++;
|
||||
break;
|
||||
case B_POSITION_OPPONENT_LEFT:
|
||||
@@ -500,7 +498,7 @@ static void HandleInputChooseMove(void)
|
||||
if (moveInfo->moves[gMoveSelectionCursor[gActiveBattler]] == MOVE_CURSE)
|
||||
{
|
||||
if (moveInfo->monType1 != TYPE_GHOST && moveInfo->monType2 != TYPE_GHOST)
|
||||
moveTarget = MOVE_TARGET_x10;
|
||||
moveTarget = MOVE_TARGET_USER;
|
||||
else
|
||||
moveTarget = MOVE_TARGET_SELECTED;
|
||||
}
|
||||
@@ -509,26 +507,26 @@ static void HandleInputChooseMove(void)
|
||||
moveTarget = gBattleMoves[moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]].target;
|
||||
}
|
||||
|
||||
if (moveTarget & MOVE_TARGET_x10)
|
||||
if (moveTarget & MOVE_TARGET_USER)
|
||||
gMultiUsePlayerCursor = gActiveBattler;
|
||||
else
|
||||
gMultiUsePlayerCursor = GetBattlerAtPosition((GetBattlerPosition(gActiveBattler) & BIT_SIDE) ^ BIT_SIDE);
|
||||
|
||||
if (!gBattleBufferA[gActiveBattler][1]) // not a double battle
|
||||
{
|
||||
if (moveTarget & MOVE_TARGET_USER && !gBattleBufferA[gActiveBattler][2])
|
||||
if (moveTarget & MOVE_TARGET_USER_OR_SELECTED && !gBattleBufferA[gActiveBattler][2])
|
||||
canSelectTarget++;
|
||||
}
|
||||
else // double battle
|
||||
{
|
||||
if (!(moveTarget & (MOVE_TARGET_RANDOM | MOVE_TARGET_BOTH | MOVE_TARGET_DEPENDS | MOVE_TARGET_FOES_AND_ALLY | MOVE_TARGET_OPPONENTS_FIELD | MOVE_TARGET_x10)))
|
||||
if (!(moveTarget & (MOVE_TARGET_RANDOM | MOVE_TARGET_BOTH | MOVE_TARGET_DEPENDS | MOVE_TARGET_FOES_AND_ALLY | MOVE_TARGET_OPPONENTS_FIELD | MOVE_TARGET_USER)))
|
||||
canSelectTarget++; // either selected or user
|
||||
|
||||
if (moveInfo->currentPp[gMoveSelectionCursor[gActiveBattler]] == 0)
|
||||
{
|
||||
canSelectTarget = FALSE;
|
||||
}
|
||||
else if (!(moveTarget & (MOVE_TARGET_x10 | MOVE_TARGET_USER)) && CountAliveMonsInBattle(BATTLE_ALIVE_EXCEPT_ACTIVE) <= 1)
|
||||
else if (!(moveTarget & (MOVE_TARGET_USER | MOVE_TARGET_USER_OR_SELECTED)) && CountAliveMonsInBattle(BATTLE_ALIVE_EXCEPT_ACTIVE) <= 1)
|
||||
{
|
||||
gMultiUsePlayerCursor = GetDefaultMoveTarget(gActiveBattler);
|
||||
canSelectTarget = FALSE;
|
||||
@@ -544,7 +542,7 @@ static void HandleInputChooseMove(void)
|
||||
{
|
||||
gBattlerControllerFuncs[gActiveBattler] = HandleInputChooseTarget;
|
||||
|
||||
if (moveTarget & (MOVE_TARGET_x10 | MOVE_TARGET_USER))
|
||||
if (moveTarget & (MOVE_TARGET_USER | MOVE_TARGET_USER_OR_SELECTED))
|
||||
gMultiUsePlayerCursor = gActiveBattler;
|
||||
else if (gAbsentBattlerFlags & gBitTable[GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT)])
|
||||
gMultiUsePlayerCursor = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT);
|
||||
|
||||
@@ -31,7 +31,6 @@ extern struct UnusedControllerStruct gUnknown_02022D0C;
|
||||
|
||||
extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
|
||||
extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[];
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
|
||||
extern void sub_81358F4(void);
|
||||
extern void sub_8172EF0(u8 bank, struct Pokemon *mon);
|
||||
@@ -1521,7 +1520,7 @@ static void PlayerPartnerHandleChooseMove(void)
|
||||
BattleAI_SetupAIData(0xF);
|
||||
chosenMoveId = BattleAI_ChooseMoveOrAction();
|
||||
|
||||
if (gBattleMoves[moveInfo->moves[chosenMoveId]].target & (MOVE_TARGET_x10 | MOVE_TARGET_USER))
|
||||
if (gBattleMoves[moveInfo->moves[chosenMoveId]].target & (MOVE_TARGET_USER | MOVE_TARGET_USER_OR_SELECTED))
|
||||
gBattlerTarget = gActiveBattler;
|
||||
if (gBattleMoves[moveInfo->moves[chosenMoveId]].target & MOVE_TARGET_BOTH)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,6 @@ extern struct UnusedControllerStruct gUnknown_02022D0C;
|
||||
|
||||
extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
|
||||
extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[];
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
|
||||
extern void sub_8172EF0(u8 bank, struct Pokemon *mon);
|
||||
extern void sub_806A068(u16, u8);
|
||||
|
||||
@@ -18,7 +18,6 @@ extern u8 gUnknown_02022D0A;
|
||||
|
||||
static EWRAM_DATA u8 sBattleBuffersTransferData[0x100] = {};
|
||||
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
|
||||
extern void task00_08081A90(u8 taskId); // cable_club
|
||||
extern void sub_81B8D64(u8 bank, u8 arg1); // party_menu
|
||||
|
||||
@@ -28,7 +28,6 @@ extern struct MusicPlayerInfo gMPlayInfo_SE1;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE2;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
extern const u8 gUnknown_0831C604[];
|
||||
extern const u8 * const gBattleAnims_VariousTable[];
|
||||
extern const u8 * const gBattleAnims_Special[];
|
||||
@@ -237,7 +236,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void)
|
||||
if (moveInfo->moves[chosenMoveId] == MOVE_CURSE)
|
||||
{
|
||||
if (moveInfo->monType1 != TYPE_GHOST && moveInfo->monType2 != TYPE_GHOST)
|
||||
var1 = MOVE_TARGET_x10;
|
||||
var1 = MOVE_TARGET_USER;
|
||||
else
|
||||
var1 = MOVE_TARGET_SELECTED;
|
||||
}
|
||||
@@ -246,7 +245,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void)
|
||||
var1 = gBattleMoves[moveInfo->moves[chosenMoveId]].target;
|
||||
}
|
||||
|
||||
if (var1 & MOVE_TARGET_x10)
|
||||
if (var1 & MOVE_TARGET_USER)
|
||||
chosenMoveId |= (gActiveBattler << 8);
|
||||
else if (var1 == MOVE_TARGET_SELECTED)
|
||||
chosenMoveId |= (BattlePalaceGetTargetRetValue());
|
||||
@@ -261,7 +260,7 @@ static u8 sub_805D4A8(u16 move)
|
||||
switch (gBattleMoves[move].target)
|
||||
{
|
||||
case MOVE_TARGET_SELECTED:
|
||||
case MOVE_TARGET_USER:
|
||||
case MOVE_TARGET_USER_OR_SELECTED:
|
||||
case MOVE_TARGET_RANDOM:
|
||||
case MOVE_TARGET_BOTH:
|
||||
case MOVE_TARGET_FOES_AND_ALLY:
|
||||
@@ -273,7 +272,7 @@ static u8 sub_805D4A8(u16 move)
|
||||
case MOVE_TARGET_DEPENDS:
|
||||
case MOVE_TARGET_OPPONENTS_FIELD:
|
||||
return 2;
|
||||
case MOVE_TARGET_x10:
|
||||
case MOVE_TARGET_USER:
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
|
||||
@@ -81,7 +81,6 @@ extern struct MusicPlayerInfo gMPlayInfo_SE1;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE2;
|
||||
extern u8 gUnknown_0203CF00[];
|
||||
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
extern const u16 gBattleTextboxPalette[]; // battle textbox palette
|
||||
extern const struct BgTemplate gUnknown_0831AA08[];
|
||||
extern const struct WindowTemplate * const gUnknown_0831ABA0[];
|
||||
@@ -297,6 +296,214 @@ u8 gNumberOfMovesToChoose;
|
||||
u8 gUnknown_03005D7C[MAX_BATTLERS_COUNT];
|
||||
|
||||
// rom const data
|
||||
|
||||
// format: attacking type, defending type, damage multiplier
|
||||
// the multiplier is a (decimal) fixed-point number:
|
||||
// 20 is ×2.0 TYPE_MUL_SUPER_EFFECTIVE
|
||||
// 10 is ×1.0 TYPE_MUL_NORMAL
|
||||
// 05 is ×0.5 TYPE_MUL_NOT_EFFECTIVE
|
||||
// 00 is ×0.0 TYPE_MUL_NO_EFFECT
|
||||
const u8 gTypeEffectiveness[336] =
|
||||
{
|
||||
TYPE_NORMAL, TYPE_ROCK, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_NORMAL, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_FIRE, TYPE_FIRE, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_FIRE, TYPE_WATER, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_FIRE, TYPE_GRASS, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_FIRE, TYPE_ICE, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_FIRE, TYPE_BUG, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_FIRE, TYPE_ROCK, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_FIRE, TYPE_DRAGON, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_FIRE, TYPE_STEEL, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_WATER, TYPE_FIRE, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_WATER, TYPE_WATER, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_WATER, TYPE_GRASS, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_WATER, TYPE_GROUND, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_WATER, TYPE_ROCK, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_WATER, TYPE_DRAGON, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_ELECTRIC, TYPE_WATER, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_ELECTRIC, TYPE_ELECTRIC, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_ELECTRIC, TYPE_GRASS, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_ELECTRIC, TYPE_GROUND, TYPE_MUL_NO_EFFECT,
|
||||
TYPE_ELECTRIC, TYPE_FLYING, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_ELECTRIC, TYPE_DRAGON, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_GRASS, TYPE_FIRE, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_GRASS, TYPE_WATER, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_GRASS, TYPE_GRASS, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_GRASS, TYPE_POISON, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_GRASS, TYPE_GROUND, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_GRASS, TYPE_FLYING, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_GRASS, TYPE_BUG, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_GRASS, TYPE_ROCK, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_GRASS, TYPE_DRAGON, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_GRASS, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_ICE, TYPE_WATER, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_ICE, TYPE_GRASS, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_ICE, TYPE_ICE, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_ICE, TYPE_GROUND, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_ICE, TYPE_FLYING, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_ICE, TYPE_DRAGON, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_ICE, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_ICE, TYPE_FIRE, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_FIGHTING, TYPE_NORMAL, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_FIGHTING, TYPE_ICE, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_FIGHTING, TYPE_POISON, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_FIGHTING, TYPE_FLYING, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_FIGHTING, TYPE_PSYCHIC, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_FIGHTING, TYPE_BUG, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_FIGHTING, TYPE_ROCK, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_FIGHTING, TYPE_DARK, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_FIGHTING, TYPE_STEEL, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_POISON, TYPE_GRASS, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_POISON, TYPE_POISON, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_POISON, TYPE_GROUND, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_POISON, TYPE_ROCK, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_POISON, TYPE_GHOST, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_POISON, TYPE_STEEL, TYPE_MUL_NO_EFFECT,
|
||||
TYPE_GROUND, TYPE_FIRE, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_GROUND, TYPE_ELECTRIC, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_GROUND, TYPE_GRASS, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_GROUND, TYPE_POISON, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_GROUND, TYPE_FLYING, TYPE_MUL_NO_EFFECT,
|
||||
TYPE_GROUND, TYPE_BUG, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_GROUND, TYPE_ROCK, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_GROUND, TYPE_STEEL, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_FLYING, TYPE_ELECTRIC, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_FLYING, TYPE_GRASS, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_FLYING, TYPE_FIGHTING, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_FLYING, TYPE_BUG, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_FLYING, TYPE_ROCK, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_FLYING, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_PSYCHIC, TYPE_FIGHTING, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_PSYCHIC, TYPE_POISON, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_PSYCHIC, TYPE_PSYCHIC, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_PSYCHIC, TYPE_DARK, TYPE_MUL_NO_EFFECT,
|
||||
TYPE_PSYCHIC, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_BUG, TYPE_FIRE, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_BUG, TYPE_GRASS, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_BUG, TYPE_FIGHTING, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_BUG, TYPE_POISON, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_BUG, TYPE_FLYING, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_BUG, TYPE_PSYCHIC, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_BUG, TYPE_GHOST, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_BUG, TYPE_DARK, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_BUG, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_ROCK, TYPE_FIRE, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_ROCK, TYPE_ICE, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_ROCK, TYPE_FIGHTING, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_ROCK, TYPE_GROUND, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_ROCK, TYPE_FLYING, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_ROCK, TYPE_BUG, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_ROCK, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_GHOST, TYPE_NORMAL, TYPE_MUL_NO_EFFECT,
|
||||
TYPE_GHOST, TYPE_PSYCHIC, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_GHOST, TYPE_DARK, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_GHOST, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_GHOST, TYPE_GHOST, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_DRAGON, TYPE_DRAGON, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_DRAGON, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_DARK, TYPE_FIGHTING, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_DARK, TYPE_PSYCHIC, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_DARK, TYPE_GHOST, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_DARK, TYPE_DARK, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_DARK, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_STEEL, TYPE_FIRE, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_STEEL, TYPE_WATER, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_STEEL, TYPE_ELECTRIC, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_STEEL, TYPE_ICE, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_STEEL, TYPE_ROCK, TYPE_MUL_SUPER_EFFECTIVE,
|
||||
TYPE_STEEL, TYPE_STEEL, TYPE_MUL_NOT_EFFECTIVE,
|
||||
TYPE_FORESIGHT, TYPE_FORESIGHT, TYPE_MUL_NO_EFFECT,
|
||||
TYPE_NORMAL, TYPE_GHOST, TYPE_MUL_NO_EFFECT,
|
||||
TYPE_FIGHTING, TYPE_GHOST, TYPE_MUL_NO_EFFECT,
|
||||
TYPE_ENDTABLE, TYPE_ENDTABLE, TYPE_MUL_NO_EFFECT
|
||||
};
|
||||
|
||||
const u8 gTypeNames[][TYPE_NAME_LENGTH + 1] =
|
||||
{
|
||||
_("NORMAL"),
|
||||
_("FIGHT"),
|
||||
_("FLYING"),
|
||||
_("POISON"),
|
||||
_("GROUND"),
|
||||
_("ROCK"),
|
||||
_("BUG"),
|
||||
_("GHOST"),
|
||||
_("STEEL"),
|
||||
_("???"),
|
||||
_("FIRE"),
|
||||
_("WATER"),
|
||||
_("GRASS"),
|
||||
_("ELECTR"),
|
||||
_("PSYCHC"),
|
||||
_("ICE"),
|
||||
_("DRAGON"),
|
||||
_("DARK"),
|
||||
};
|
||||
|
||||
// This is a factor in how much money you get for beating a trainer.
|
||||
const struct TrainerMoney gTrainerMoneyTable[] =
|
||||
{
|
||||
{TRAINER_CLASS_TEAM_AQUA, 5},
|
||||
{TRAINER_CLASS_AQUA_ADMIN, 10},
|
||||
{TRAINER_CLASS_AQUA_LEADER, 20},
|
||||
{TRAINER_CLASS_AROMA_LADY, 10},
|
||||
{TRAINER_CLASS_RUIN_MANIAC, 15},
|
||||
{TRAINER_CLASS_INTERVIEWER, 12},
|
||||
{TRAINER_CLASS_TUBER_1, 1},
|
||||
{TRAINER_CLASS_TUBER_2, 1},
|
||||
{TRAINER_CLASS_SIS_AND_BRO, 3},
|
||||
{TRAINER_CLASS_COOLTRAINER_1, 12},
|
||||
{TRAINER_CLASS_HEX_MANIAC, 6},
|
||||
{TRAINER_CLASS_LADY, 50},
|
||||
{TRAINER_CLASS_BEAUTY, 20},
|
||||
{TRAINER_CLASS_RICH_BOY, 50},
|
||||
{TRAINER_CLASS_POKEMANIAC, 15},
|
||||
{TRAINER_CLASS_SWIMMER_M, 2},
|
||||
{TRAINER_CLASS_BLACK_BELT, 8},
|
||||
{TRAINER_CLASS_GUITARIST, 8},
|
||||
{TRAINER_CLASS_KINDLER, 8},
|
||||
{TRAINER_CLASS_CAMPER, 4},
|
||||
{TRAINER_CLASS_OLD_COUPLE, 10},
|
||||
{TRAINER_CLASS_BUG_MANIAC, 15},
|
||||
{TRAINER_CLASS_PSYCHIC, 6},
|
||||
{TRAINER_CLASS_GENTLEMAN, 20},
|
||||
{TRAINER_CLASS_ELITE_FOUR, 25},
|
||||
{TRAINER_CLASS_LEADER, 25},
|
||||
{TRAINER_CLASS_SCHOOL_KID, 5},
|
||||
{TRAINER_CLASS_SR_AND_JR, 4},
|
||||
{TRAINER_CLASS_POKEFAN, 20},
|
||||
{TRAINER_CLASS_EXPERT, 10},
|
||||
{TRAINER_CLASS_YOUNGSTER, 4},
|
||||
{TRAINER_CLASS_CHAMPION, 50},
|
||||
{TRAINER_CLASS_FISHERMAN, 10},
|
||||
{TRAINER_CLASS_TRIATHLETE, 10},
|
||||
{TRAINER_CLASS_DRAGON_TAMER, 12},
|
||||
{TRAINER_CLASS_BIRD_KEEPER, 8},
|
||||
{TRAINER_CLASS_NINJA_BOY, 3},
|
||||
{TRAINER_CLASS_BATTLE_GIRL, 6},
|
||||
{TRAINER_CLASS_PARASOL_LADY, 10},
|
||||
{TRAINER_CLASS_SWIMMER_F, 2},
|
||||
{TRAINER_CLASS_PICNICKER, 4},
|
||||
{TRAINER_CLASS_TWINS, 3},
|
||||
{TRAINER_CLASS_SAILOR, 8},
|
||||
{TRAINER_CLASS_COLLECTOR, 15},
|
||||
{TRAINER_CLASS_PKMN_TRAINER_3, 15},
|
||||
{TRAINER_CLASS_PKMN_BREEDER, 10},
|
||||
{TRAINER_CLASS_PKMN_RANGER, 12},
|
||||
{TRAINER_CLASS_TEAM_MAGMA, 5},
|
||||
{TRAINER_CLASS_MAGMA_ADMIN, 10},
|
||||
{TRAINER_CLASS_MAGMA_LEADER, 20},
|
||||
{TRAINER_CLASS_LASS, 4},
|
||||
{TRAINER_CLASS_BUG_CATCHER, 4},
|
||||
{TRAINER_CLASS_HIKER, 10},
|
||||
{TRAINER_CLASS_YOUNG_COUPLE, 8},
|
||||
{TRAINER_CLASS_WINSTRATE, 10},
|
||||
{0xFF, 5},
|
||||
};
|
||||
|
||||
#include "data/text/abilities.h"
|
||||
|
||||
static void (* const sTurnActionsFuncsTable[])(void) =
|
||||
{
|
||||
HandleAction_UseMove, // B_ACTION_USE_MOVE
|
||||
@@ -5129,7 +5336,7 @@ static void HandleAction_UseMove(void)
|
||||
else if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||
&& gSideTimers[side].followmeTimer == 0
|
||||
&& (gBattleMoves[gCurrentMove].power != 0
|
||||
|| gBattleMoves[gCurrentMove].target != MOVE_TARGET_x10)
|
||||
|| gBattleMoves[gCurrentMove].target != MOVE_TARGET_USER)
|
||||
&& gBattleMons[*(gBattleStruct->moveTarget + gBattlerAttacker)].ability != ABILITY_LIGHTNING_ROD
|
||||
&& gBattleMoves[gCurrentMove].type == TYPE_ELECTRIC)
|
||||
{
|
||||
|
||||
@@ -22,9 +22,7 @@ extern u8 gUnknown_0203C7B4;
|
||||
extern struct StringInfoBattle *gStringInfo;
|
||||
|
||||
extern const u8 gMoveNames[LAST_MOVE_INDEX + 1][13];
|
||||
extern const u8 gAbilityNames[][13];
|
||||
extern const u8 gTrainerClassNames[][13];
|
||||
extern const u8 gTypeNames[][7];
|
||||
extern const u16 gUnknown_08D85620[];
|
||||
|
||||
// strings
|
||||
|
||||
@@ -48,15 +48,6 @@ extern u16 gBattle_BG2_Y;
|
||||
extern u16 gBattle_BG3_X;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
struct TrainerMoney
|
||||
{
|
||||
u8 classId;
|
||||
u8 value;
|
||||
};
|
||||
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
extern const u8 gTypeEffectiveness[336];
|
||||
extern const struct TrainerMoney gTrainerMoneyTable[];
|
||||
extern const u8* const gBattleScriptsForMoveEffects[];
|
||||
|
||||
// functions
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "string_util.h"
|
||||
#include "overworld.h"
|
||||
#include "field_weather.h"
|
||||
#include "gym_leader_rematch.h"
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -66,7 +67,6 @@ extern void Overworld_ClearSavedMusic(void);
|
||||
extern void CB2_WhiteOut(void);
|
||||
extern void sub_80AF6F0(void);
|
||||
extern void PlayBattleBGM(void);
|
||||
extern void sub_81DA57C(void);
|
||||
extern u8 Overworld_GetFlashLevel(void);
|
||||
extern u16 sub_81A9AA8(u8 localId);
|
||||
extern u16 sub_81D6180(u8 localId);
|
||||
@@ -252,84 +252,84 @@ static const struct TrainerBattleParameter sTrainerBContinueScriptBattleParams[]
|
||||
|
||||
const struct RematchTrainer gRematchTable[REMATCH_TABLE_ENTRIES] =
|
||||
{
|
||||
{{0x0025, 0x0028, 0x0029, 0x002a, 0x002b}, 0x0000, 0x0021},
|
||||
{{0x02e1, 0x032c, 0x032d, 0x032e, 0x032f}, 0x0000, 0x0014},
|
||||
{{0x002c, 0x002f, 0x0030, 0x0031, 0x0032}, 0x0000, 0x001a},
|
||||
{{0x0039, 0x003c, 0x003d, 0x003e, 0x003f}, 0x0000, 0x0018},
|
||||
{{0x0040, 0x0043, 0x0044, 0x0045, 0x0046}, 0x0000, 0x0018},
|
||||
{{0x02af, 0x02b0, 0x02b1, 0x02b2, 0x02b3}, 0x0000, 0x0027},
|
||||
{{0x02ff, 0x033c, 0x033d, 0x033e, 0x033f}, 0x0000, 0x0024},
|
||||
{{0x005e, 0x0065, 0x0066, 0x0067, 0x0068}, 0x0000, 0x001a},
|
||||
{{0x004e, 0x0054, 0x0055, 0x0056, 0x0057}, 0x0000, 0x001a},
|
||||
{{0x006c, 0x006e, 0x006f, 0x0070, 0x0071}, 0x0018, 0x0014},
|
||||
{{0x0072, 0x0078, 0x0079, 0x007a, 0x007b}, 0x0000, 0x0013},
|
||||
{{0x0090, 0x034c, 0x034d, 0x034e, 0x034f}, 0x0018, 0x0038},
|
||||
{{0x007f, 0x0084, 0x0085, 0x0086, 0x0087}, 0x0000, 0x0024},
|
||||
{{0x0088, 0x008b, 0x008c, 0x008d, 0x008e}, 0x0000, 0x0013},
|
||||
{{0x008f, 0x0093, 0x0094, 0x0095, 0x0096}, 0x0000, 0x001d},
|
||||
{{0x009b, 0x00af, 0x00b0, 0x00b1, 0x00b2}, 0x0000, 0x0016},
|
||||
{{0x00b7, 0x00b8, 0x00b9, 0x00ba, 0x00bb}, 0x0000, 0x001e},
|
||||
{{0x02a0, 0x0338, 0x0339, 0x033a, 0x033b}, 0x0000, 0x002a},
|
||||
{{0x00c3, 0x0340, 0x0341, 0x0342, 0x0343}, 0x0000, 0x0026},
|
||||
{{0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8}, 0x0000, 0x0021},
|
||||
{{0x00ce, 0x00cf, 0x00d0, 0x00d1, 0x00d2}, 0x0000, 0x001d},
|
||||
{{0x00d8, 0x00db, 0x00dc, 0x00dd, 0x00de}, 0x0018, 0x000d},
|
||||
{{0x02a9, 0x02aa, 0x02ab, 0x02ac, 0x02ad}, 0x0018, 0x0001},
|
||||
{{0x00e2, 0x00e4, 0x00e5, 0x00e6, 0x00e7}, 0x0000, 0x0023},
|
||||
{{0x00ee, 0x00ef, 0x00f0, 0x00f1, 0x00f2}, 0x0000, 0x0026},
|
||||
{{0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd}, 0x0000, 0x0026},
|
||||
{{0x00fe, 0x0101, 0x0102, 0x0103, 0x0104}, 0x0000, 0x0024},
|
||||
{{0x0118, 0x011a, 0x011b, 0x011c, 0x011d}, 0x0000, 0x001f},
|
||||
{{0x0111, 0x0114, 0x0115, 0x0116, 0x0117}, 0x0000, 0x001f},
|
||||
{{0x011f, 0x0120, 0x0121, 0x0122, 0x0123}, 0x0000, 0x0020},
|
||||
{{0x012e, 0x012f, 0x0130, 0x0131, 0x0132}, 0x0000, 0x0019},
|
||||
{{0x0125, 0x0127, 0x0128, 0x0129, 0x012a}, 0x0000, 0x0012},
|
||||
{{0x0133, 0x0134, 0x0135, 0x0136, 0x0137}, 0x0000, 0x001e},
|
||||
{{0x0139, 0x013a, 0x013b, 0x013c, 0x013d}, 0x0018, 0x000c},
|
||||
{{0x013e, 0x0148, 0x0149, 0x014a, 0x014b}, 0x0000, 0x0011},
|
||||
{{0x0153, 0x015a, 0x015b, 0x015c, 0x015d}, 0x0000, 0x0015},
|
||||
{{0x0178, 0x017b, 0x017c, 0x017d, 0x017e}, 0x0000, 0x002b},
|
||||
{{0x0171, 0x0172, 0x0173, 0x0174, 0x0175}, 0x0000, 0x0020},
|
||||
{{0x0166, 0x0168, 0x0169, 0x016a, 0x016b}, 0x0000, 0x0019},
|
||||
{{0x016c, 0x016d, 0x016e, 0x016f, 0x0170}, 0x0000, 0x0020},
|
||||
{{0x0182, 0x0184, 0x0185, 0x0186, 0x0187}, 0x0000, 0x002b},
|
||||
{{0x0161, 0x0162, 0x0163, 0x0164, 0x0165}, 0x0000, 0x0019},
|
||||
{{0x0179, 0x0334, 0x0335, 0x0336, 0x0337}, 0x0000, 0x0029},
|
||||
{{0x0188, 0x0189, 0x018a, 0x018b, 0x018c}, 0x0018, 0x0001},
|
||||
{{0x0196, 0x0199, 0x019a, 0x019b, 0x019c}, 0x0000, 0x0023},
|
||||
{{0x01a3, 0x01a5, 0x01a6, 0x01a7, 0x01a8}, 0x0000, 0x001c},
|
||||
{{0x01ab, 0x01ae, 0x01af, 0x01b0, 0x01b1}, 0x0000, 0x001e},
|
||||
{{0x01b2, 0x01b5, 0x01b6, 0x01b7, 0x01b8}, 0x0000, 0x001c},
|
||||
{{0x01c1, 0x01d1, 0x01d2, 0x01d3, 0x01d4}, 0x0000, 0x0027},
|
||||
{{0x01da, 0x01dd, 0x01de, 0x01df, 0x01e0}, 0x0018, 0x000d},
|
||||
{{0x01e1, 0x01e2, 0x01e7, 0x01e8, 0x01e9}, 0x0000, 0x0012},
|
||||
{{0x01ec, 0x01f1, 0x01f2, 0x01f3, 0x01f4}, 0x0000, 0x0028},
|
||||
{{0x02e4, 0x0330, 0x0331, 0x0332, 0x0333}, 0x0000, 0x0017},
|
||||
{{0x0200, 0x0203, 0x0204, 0x0205, 0x0206}, 0x0000, 0x0019},
|
||||
{{0x0221, 0x0224, 0x0225, 0x0226, 0x0227}, 0x0000, 0x0020},
|
||||
{{0x021a, 0x021d, 0x021e, 0x021f, 0x0220}, 0x0000, 0x0020},
|
||||
{{0x0009, 0x0348, 0x0349, 0x034a, 0x034b}, 0x0018, 0x0011},
|
||||
{{0x022f, 0x0232, 0x0233, 0x0234, 0x0235}, 0x0000, 0x0022},
|
||||
{{0x0228, 0x022b, 0x022c, 0x022d, 0x022e}, 0x0000, 0x0022},
|
||||
{{0x025c, 0x025f, 0x0260, 0x0261, 0x0262}, 0x0000, 0x0013},
|
||||
{{0x026d, 0x026e, 0x026f, 0x0270, 0x0271}, 0x0018, 0x000b},
|
||||
{{0x0273, 0x027c, 0x027d, 0x027e, 0x027f}, 0x0000, 0x001b},
|
||||
{{0x0001, 0x0344, 0x0345, 0x0346, 0x0347}, 0x0018, 0x000c},
|
||||
{{0x0282, 0x0283, 0x0284, 0x0285, 0x0286}, 0x0018, 0x003e},
|
||||
{{0x0291, 0x0292, 0x0293, 0x0294, 0x0294}, 0x0018, 0x002b},
|
||||
{{0x0109, 0x0302, 0x0303, 0x0304, 0x0305}, 0x0000, 0x0003},
|
||||
{{0x010a, 0x0306, 0x0307, 0x0308, 0x0309}, 0x0000, 0x000b},
|
||||
{{0x010b, 0x030a, 0x030b, 0x030c, 0x030d}, 0x0000, 0x0002},
|
||||
{{0x010c, 0x030e, 0x030f, 0x0310, 0x0311}, 0x0000, 0x000c},
|
||||
{{0x010d, 0x0312, 0x0313, 0x0314, 0x0315}, 0x0000, 0x0000},
|
||||
{{0x010e, 0x0316, 0x0317, 0x0318, 0x0319}, 0x0000, 0x0004},
|
||||
{{0x010f, 0x031a, 0x031b, 0x031c, 0x031d}, 0x0000, 0x0006},
|
||||
{{0x0110, 0x031e, 0x031f, 0x0320, 0x0321}, 0x0000, 0x0007},
|
||||
{{0x0105, 0x0105, 0x0105, 0x0105, 0x0105}, 0x0000, 0x0008},
|
||||
{{0x0106, 0x0106, 0x0106, 0x0106, 0x0106}, 0x0000, 0x0008},
|
||||
{{0x0107, 0x0107, 0x0107, 0x0107, 0x0107}, 0x0000, 0x0008},
|
||||
{{0x0108, 0x0108, 0x0108, 0x0108, 0x0108}, 0x0000, 0x0008},
|
||||
{{0x014f, 0x014f, 0x014f, 0x014f, 0x014f}, 0x0000, 0x0008},
|
||||
{{TRAINER_ROSE_1, TRAINER_ROSE_2, TRAINER_ROSE_3, TRAINER_ROSE_4, TRAINER_ROSE_5}, 0x0, 0x21},
|
||||
{{TRAINER_ANDRES_1, TRAINER_ANDRES_2, TRAINER_ANDRES_3, TRAINER_ANDRES_4, TRAINER_ANDRES_5}, 0x0, 0x14},
|
||||
{{TRAINER_DUSTY_1, TRAINER_DUSTY_2, TRAINER_DUSTY_3, TRAINER_DUSTY_4, TRAINER_DUSTY_5}, 0x0, 0x1a},
|
||||
{{TRAINER_LOLA_1, TRAINER_LOLA_2, TRAINER_LOLA_3, TRAINER_LOLA_4, TRAINER_LOLA_5}, 0x0, 0x18},
|
||||
{{TRAINER_RICKY_1, TRAINER_RICKY_2, TRAINER_RICKY_3, TRAINER_RICKY_4, TRAINER_RICKY_5}, 0x0, 0x18},
|
||||
{{TRAINER_LILA_AND_ROY_1, TRAINER_LILA_AND_ROY_2, TRAINER_LILA_AND_ROY_3, TRAINER_LILA_AND_ROY_4, TRAINER_LILA_AND_ROY_5}, 0x0, 0x27},
|
||||
{{TRAINER_CRISTIN_1, TRAINER_CRISTIN_2, TRAINER_CRISTIN_3, TRAINER_CRISTIN_4, TRAINER_CRISTIN_5}, 0x0, 0x24},
|
||||
{{TRAINER_BROOKE_1, TRAINER_BROOKE_2, TRAINER_BROOKE_3, TRAINER_BROOKE_4, TRAINER_BROOKE_5}, 0x0, 0x1a},
|
||||
{{TRAINER_WILTON_1, TRAINER_WILTON_2, TRAINER_WILTON_3, TRAINER_WILTON_4, TRAINER_WILTON_5}, 0x0, 0x1a},
|
||||
{{TRAINER_VALERIE_1, TRAINER_VALERIE_2, TRAINER_VALERIE_3, TRAINER_VALERIE_4, TRAINER_VALERIE_5}, 0x18, 0x14},
|
||||
{{TRAINER_CINDY_1, TRAINER_CINDY_3, TRAINER_CINDY_4, TRAINER_CINDY_5, TRAINER_CINDY_6}, 0x0, 0x13},
|
||||
{{TRAINER_THALIA_1, TRAINER_THALIA_2, TRAINER_THALIA_3, TRAINER_THALIA_4, TRAINER_THALIA_5}, 0x18, 0x38},
|
||||
{{TRAINER_JESSICA_1, TRAINER_JESSICA_2, TRAINER_JESSICA_3, TRAINER_JESSICA_4, TRAINER_JESSICA_5}, 0x0, 0x24},
|
||||
{{TRAINER_WINSTON_1, TRAINER_WINSTON_2, TRAINER_WINSTON_3, TRAINER_WINSTON_4, TRAINER_WINSTON_5}, 0x0, 0x13},
|
||||
{{TRAINER_STEVE_1, TRAINER_STEVE_2, TRAINER_STEVE_3, TRAINER_STEVE_4, TRAINER_STEVE_5}, 0x0, 0x1d},
|
||||
{{TRAINER_TONY_1, TRAINER_TONY_2, TRAINER_TONY_3, TRAINER_TONY_4, TRAINER_TONY_5}, 0x0, 0x16},
|
||||
{{TRAINER_NOB_1, TRAINER_NOB_2, TRAINER_NOB_3, TRAINER_NOB_4, TRAINER_NOB_5}, 0x0, 0x1e},
|
||||
{{TRAINER_KOJI_1, TRAINER_KOJI_2, TRAINER_KOJI_3, TRAINER_KOJI_4, TRAINER_KOJI_5}, 0x0, 0x2a},
|
||||
{{TRAINER_FERNANDO_1, TRAINER_FERNANDO_2, TRAINER_FERNANDO_3, TRAINER_FERNANDO_4, TRAINER_FERNANDO_5}, 0x0, 0x26},
|
||||
{{TRAINER_DALTON_1, TRAINER_DALTON_2, TRAINER_DALTON_3, TRAINER_DALTON_4, TRAINER_DALTON_5}, 0x0, 0x21},
|
||||
{{TRAINER_BERNIE_1, TRAINER_BERNIE_2, TRAINER_BERNIE_3, TRAINER_BERNIE_4, TRAINER_BERNIE_5}, 0x0, 0x1d},
|
||||
{{TRAINER_ETHAN_1, TRAINER_ETHAN_2, TRAINER_ETHAN_3, TRAINER_ETHAN_4, TRAINER_ETHAN_5}, 0x18, 0xd},
|
||||
{{TRAINER_JOHN_AND_JAY_1, TRAINER_JOHN_AND_JAY_2, TRAINER_JOHN_AND_JAY_3, TRAINER_JOHN_AND_JAY_4, TRAINER_JOHN_AND_JAY_5}, 0x18, 0x1},
|
||||
{{TRAINER_JEFFREY_1, TRAINER_JEFFREY_2, TRAINER_JEFFREY_3, TRAINER_JEFFREY_4, TRAINER_JEFFREY_5}, 0x0, 0x23},
|
||||
{{TRAINER_CAMERON_1, TRAINER_CAMERON_2, TRAINER_CAMERON_3, TRAINER_CAMERON_4, TRAINER_CAMERON_5}, 0x0, 0x26},
|
||||
{{TRAINER_JACKI_1, TRAINER_JACKI_2, TRAINER_JACKI_3, TRAINER_JACKI_4, TRAINER_JACKI_5}, 0x0, 0x26},
|
||||
{{TRAINER_WALTER_1, TRAINER_WALTER_2, TRAINER_WALTER_3, TRAINER_WALTER_4, TRAINER_WALTER_5}, 0x0, 0x24},
|
||||
{{TRAINER_KAREN_1, TRAINER_KAREN_2, TRAINER_KAREN_3, TRAINER_KAREN_4, TRAINER_KAREN_5}, 0x0, 0x1f},
|
||||
{{TRAINER_JERRY_1, TRAINER_JERRY_2, TRAINER_JERRY_3, TRAINER_JERRY_4, TRAINER_JERRY_5}, 0x0, 0x1f},
|
||||
{{TRAINER_ANNA_AND_MEG_1, TRAINER_ANNA_AND_MEG_2, TRAINER_ANNA_AND_MEG_3, TRAINER_ANNA_AND_MEG_4, TRAINER_ANNA_AND_MEG_5}, 0x0, 0x20},
|
||||
{{TRAINER_ISABEL_1, TRAINER_ISABEL_2, TRAINER_ISABEL_3, TRAINER_ISABEL_4, TRAINER_ISABEL_5}, 0x0, 0x19},
|
||||
{{TRAINER_MIGUEL_1, TRAINER_MIGUEL_2, TRAINER_MIGUEL_3, TRAINER_MIGUEL_4, TRAINER_MIGUEL_5}, 0x0, 0x12},
|
||||
{{TRAINER_TIMOTHY_1, TRAINER_TIMOTHY_2, TRAINER_TIMOTHY_3, TRAINER_TIMOTHY_4, TRAINER_TIMOTHY_5}, 0x0, 0x1e},
|
||||
{{TRAINER_SHELBY_1, TRAINER_SHELBY_2, TRAINER_SHELBY_3, TRAINER_SHELBY_4, TRAINER_SHELBY_5}, 0x18, 0xc},
|
||||
{{TRAINER_CALVIN_1, TRAINER_CALVIN_2, TRAINER_CALVIN_3, TRAINER_CALVIN_4, TRAINER_CALVIN_5}, 0x0, 0x11},
|
||||
{{TRAINER_ELLIOT_1, TRAINER_ELLIOT_2, TRAINER_ELLIOT_3, TRAINER_ELLIOT_4, TRAINER_ELLIOT_5}, 0x0, 0x15},
|
||||
{{TRAINER_ISAIAH_1, TRAINER_ISAIAH_2, TRAINER_ISAIAH_3, TRAINER_ISAIAH_4, TRAINER_ISAIAH_5}, 0x0, 0x2b},
|
||||
{{TRAINER_MARIA_1, TRAINER_MARIA_2, TRAINER_MARIA_3, TRAINER_MARIA_4, TRAINER_MARIA_5}, 0x0, 0x20},
|
||||
{{TRAINER_ABIGAIL_1, TRAINER_ABIGAIL_2, TRAINER_ABIGAIL_3, TRAINER_ABIGAIL_4, TRAINER_ABIGAIL_5}, 0x0, 0x19},
|
||||
{{TRAINER_DYLAN_1, TRAINER_DYLAN_2, TRAINER_DYLAN_3, TRAINER_DYLAN_4, TRAINER_DYLAN_5}, 0x0, 0x20},
|
||||
{{TRAINER_KATELYN_1, TRAINER_KATELYN_2, TRAINER_KATELYN_3, TRAINER_KATELYN_4, TRAINER_KATELYN_5}, 0x0, 0x2b},
|
||||
{{TRAINER_BENJAMIN_1, TRAINER_BENJAMIN_2, TRAINER_BENJAMIN_3, TRAINER_BENJAMIN_4, TRAINER_BENJAMIN_5}, 0x0, 0x19},
|
||||
{{TRAINER_PABLO_1, TRAINER_PABLO_2, TRAINER_PABLO_3, TRAINER_PABLO_4, TRAINER_PABLO_5}, 0x0, 0x29},
|
||||
{{TRAINER_NICOLAS_1, TRAINER_NICOLAS_2, TRAINER_NICOLAS_3, TRAINER_NICOLAS_4, TRAINER_NICOLAS_5}, 0x18, 0x1},
|
||||
{{TRAINER_ROBERT_1, TRAINER_ROBERT_2, TRAINER_ROBERT_3, TRAINER_ROBERT_4, TRAINER_ROBERT_5}, 0x0, 0x23},
|
||||
{{TRAINER_LAO_1, TRAINER_LAO_2, TRAINER_LAO_3, TRAINER_LAO_4, TRAINER_LAO_5}, 0x0, 0x1c},
|
||||
{{TRAINER_CYNDY_1, TRAINER_CYNDY_2, TRAINER_CYNDY_3, TRAINER_CYNDY_4, TRAINER_CYNDY_5}, 0x0, 0x1e},
|
||||
{{TRAINER_MADELINE_1, TRAINER_MADELINE_2, TRAINER_MADELINE_3, TRAINER_MADELINE_4, TRAINER_MADELINE_5}, 0x0, 0x1c},
|
||||
{{TRAINER_JENNY_1, TRAINER_JENNY_2, TRAINER_JENNY_3, TRAINER_JENNY_4, TRAINER_JENNY_5}, 0x0, 0x27},
|
||||
{{TRAINER_DIANA_1, TRAINER_DIANA_2, TRAINER_DIANA_3, TRAINER_DIANA_4, TRAINER_DIANA_5}, 0x18, 0xd},
|
||||
{{TRAINER_AMY_AND_LIV_1, TRAINER_AMY_AND_LIV_2, TRAINER_AMY_AND_LIV_4, TRAINER_AMY_AND_LIV_5, TRAINER_AMY_AND_LIV_6}, 0x0, 0x12},
|
||||
{{TRAINER_ERNEST_1, TRAINER_ERNEST_2, TRAINER_ERNEST_3, TRAINER_ERNEST_4, TRAINER_ERNEST_5}, 0x0, 0x28},
|
||||
{{TRAINER_CORY_1, TRAINER_CORY_2, TRAINER_CORY_3, TRAINER_CORY_4, TRAINER_CORY_5}, 0x0, 0x17},
|
||||
{{TRAINER_EDWIN_1, TRAINER_EDWIN_2, TRAINER_EDWIN_3, TRAINER_EDWIN_4, TRAINER_EDWIN_5}, 0x0, 0x19},
|
||||
{{TRAINER_LYDIA_1, TRAINER_LYDIA_2, TRAINER_LYDIA_3, TRAINER_LYDIA_4, TRAINER_LYDIA_5}, 0x0, 0x20},
|
||||
{{TRAINER_ISAAC_1, TRAINER_ISAAC_2, TRAINER_ISAAC_3, TRAINER_ISAAC_4, TRAINER_ISAAC_5}, 0x0, 0x20},
|
||||
{{TRAINER_GABRIELLE_1, TRAINER_GABRIELLE_2, TRAINER_GABRIELLE_3, TRAINER_GABRIELLE_4, TRAINER_GABRIELLE_5}, 0x18, 0x11},
|
||||
{{TRAINER_CATHERINE_1, TRAINER_CATHERINE_2, TRAINER_CATHERINE_3, TRAINER_CATHERINE_4, TRAINER_CATHERINE_5}, 0x0, 0x22},
|
||||
{{TRAINER_JACKSON_1, TRAINER_JACKSON_2, TRAINER_JACKSON_3, TRAINER_JACKSON_4, TRAINER_JACKSON_5}, 0x0, 0x22},
|
||||
{{TRAINER_HALEY_1, TRAINER_HALEY_2, TRAINER_HALEY_3, TRAINER_HALEY_4, TRAINER_HALEY_5}, 0x0, 0x13},
|
||||
{{TRAINER_JAMES_1, TRAINER_JAMES_2, TRAINER_JAMES_3, TRAINER_JAMES_4, TRAINER_JAMES_5}, 0x18, 0xb},
|
||||
{{TRAINER_TRENT_1, TRAINER_TRENT_2, TRAINER_TRENT_3, TRAINER_TRENT_4, TRAINER_TRENT_5}, 0x0, 0x1b},
|
||||
{{TRAINER_SAWYER_1, TRAINER_SAWYER_2, TRAINER_SAWYER_3, TRAINER_SAWYER_4, TRAINER_SAWYER_5}, 0x18, 0xc},
|
||||
{{TRAINER_KIRA_AND_DAN_1, TRAINER_KIRA_AND_DAN_2, TRAINER_KIRA_AND_DAN_3, TRAINER_KIRA_AND_DAN_4, TRAINER_KIRA_AND_DAN_5}, 0x18, 0x3e},
|
||||
{{TRAINER_WALLY_3, 0x292, 0x293, 0x294, 0x294}, 0x18, 0x2b},
|
||||
{{TRAINER_ROXANNE_1, TRAINER_ROXANNE_2, TRAINER_ROXANNE_3, TRAINER_ROXANNE_4, TRAINER_ROXANNE_5}, 0x0, 0x3},
|
||||
{{TRAINER_BRAWLY_1, TRAINER_BRAWLY_2, TRAINER_BRAWLY_3, TRAINER_BRAWLY_4, TRAINER_BRAWLY_5}, 0x0, 0xb},
|
||||
{{TRAINER_WATTSON_1, TRAINER_WATTSON_2, TRAINER_WATTSON_3, TRAINER_WATTSON_4, TRAINER_WATTSON_5}, 0x0, 0x2},
|
||||
{{TRAINER_FLANNERY_1, TRAINER_FLANNERY_2, TRAINER_FLANNERY_3, TRAINER_FLANNERY_4, TRAINER_FLANNERY_5}, 0x0, 0xc},
|
||||
{{TRAINER_NORMAN_1, TRAINER_NORMAN_2, TRAINER_NORMAN_3, TRAINER_NORMAN_4, TRAINER_NORMAN_5}, 0x0, 0x0},
|
||||
{{TRAINER_WINONA_1, TRAINER_WINONA_2, TRAINER_WINONA_3, TRAINER_WINONA_4, TRAINER_WINONA_5}, 0x0, 0x4},
|
||||
{{TRAINER_TATE_AND_LIZA_1, TRAINER_TATE_AND_LIZA_2, TRAINER_TATE_AND_LIZA_3, TRAINER_TATE_AND_LIZA_4, TRAINER_TATE_AND_LIZA_5}, 0x0, 0x6},
|
||||
{{TRAINER_JUAN_1, TRAINER_JUAN_2, TRAINER_JUAN_3, TRAINER_JUAN_4, TRAINER_JUAN_5}, 0x0, 0x7},
|
||||
{{TRAINER_SIDNEY, TRAINER_SIDNEY, TRAINER_SIDNEY, TRAINER_SIDNEY, TRAINER_SIDNEY}, 0x0, 0x8},
|
||||
{{TRAINER_PHOEBE, TRAINER_PHOEBE, TRAINER_PHOEBE, TRAINER_PHOEBE, TRAINER_PHOEBE}, 0x0, 0x8},
|
||||
{{TRAINER_GLACIA, TRAINER_GLACIA, TRAINER_GLACIA, TRAINER_GLACIA, TRAINER_GLACIA}, 0x0, 0x8},
|
||||
{{TRAINER_DRAKE, TRAINER_DRAKE, TRAINER_DRAKE, TRAINER_DRAKE, TRAINER_DRAKE}, 0x0, 0x8},
|
||||
{{TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE}, 0x0, 0x8},
|
||||
};
|
||||
|
||||
static const u16 sBadgeFlags[8] =
|
||||
@@ -945,13 +945,13 @@ static void CB2_EndFirstBattle(void)
|
||||
static void sub_80B1218(void)
|
||||
{
|
||||
if (GetGameStat(GAME_STAT_WILD_BATTLES) % 60 == 0)
|
||||
sub_81DA57C();
|
||||
UpdateGymLeaderRematch();
|
||||
}
|
||||
|
||||
static void sub_80B1234(void)
|
||||
{
|
||||
if (GetGameStat(GAME_STAT_TRAINER_BATTLES) % 20 == 0)
|
||||
sub_81DA57C();
|
||||
UpdateGymLeaderRematch();
|
||||
}
|
||||
|
||||
// why not just use the macros? maybe its because they didnt want to uncast const every time?
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "link.h"
|
||||
#include "berry.h"
|
||||
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
|
||||
extern u8 weather_get_current(void);
|
||||
|
||||
@@ -3255,8 +3254,8 @@ u8 GetMoveTarget(u16 move, u8 useMoveTarget)
|
||||
else
|
||||
targetBank = GetBattlerAtPosition((GetBattlerPosition(gBattlerAttacker) & BIT_SIDE) ^ BIT_SIDE);
|
||||
break;
|
||||
case MOVE_TARGET_USER_OR_SELECTED:
|
||||
case MOVE_TARGET_USER:
|
||||
case MOVE_TARGET_x10:
|
||||
targetBank = gBattlerAttacker;
|
||||
break;
|
||||
}
|
||||
|
||||
106
src/gym_leader_rematch.c
Normal file
106
src/gym_leader_rematch.c
Normal file
@@ -0,0 +1,106 @@
|
||||
#include "global.h"
|
||||
#include "constants/flags.h"
|
||||
#include "random.h"
|
||||
#include "event_data.h"
|
||||
#include "battle_setup.h"
|
||||
#include "gym_leader_rematch.h"
|
||||
|
||||
static void UpdateGymLeaderRematchFromArray(const u16 *data, size_t size, u32 maxRematch);
|
||||
static s32 GetRematchIndex(u32 trainerIdx);
|
||||
|
||||
static const u16 GymLeaderRematches_AfterNewMauville[] = {
|
||||
REMATCH_ROXANNE,
|
||||
REMATCH_BRAWLY,
|
||||
REMATCH_WATTSON,
|
||||
REMATCH_FLANNERY,
|
||||
REMATCH_NORMAN,
|
||||
REMATCH_WINONA,
|
||||
REMATCH_TATE_AND_LIZA,
|
||||
REMATCH_JUAN
|
||||
};
|
||||
|
||||
static const u16 GymLeaderRematches_BeforeNewMauville[] = {
|
||||
REMATCH_ROXANNE,
|
||||
REMATCH_BRAWLY,
|
||||
// Wattson isn't available at this time
|
||||
REMATCH_FLANNERY,
|
||||
REMATCH_NORMAN,
|
||||
REMATCH_WINONA,
|
||||
REMATCH_TATE_AND_LIZA,
|
||||
REMATCH_JUAN
|
||||
};
|
||||
|
||||
void UpdateGymLeaderRematch(void)
|
||||
{
|
||||
if (FlagGet(FLAG_SYS_GAME_CLEAR) && (Random() % 100) <= 30)
|
||||
{
|
||||
if (FlagGet(FLAG_WATTSON_REMATCH_AVAILABLE))
|
||||
UpdateGymLeaderRematchFromArray(GymLeaderRematches_AfterNewMauville, ARRAY_COUNT(GymLeaderRematches_AfterNewMauville), 5);
|
||||
else
|
||||
UpdateGymLeaderRematchFromArray(GymLeaderRematches_BeforeNewMauville, ARRAY_COUNT(GymLeaderRematches_BeforeNewMauville), 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void UpdateGymLeaderRematchFromArray(const u16 *data, size_t size, u32 maxRematch)
|
||||
{
|
||||
s32 whichLeader = 0;
|
||||
s32 lowestRematchIndex = 5;
|
||||
u32 i;
|
||||
s32 rematchIndex;
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
if (!gSaveBlock1Ptr->trainerRematches[data[i]])
|
||||
{
|
||||
rematchIndex = GetRematchIndex(data[i]);
|
||||
if (lowestRematchIndex > rematchIndex)
|
||||
lowestRematchIndex = rematchIndex;
|
||||
whichLeader++;
|
||||
}
|
||||
}
|
||||
if (whichLeader != 0 && lowestRematchIndex <= maxRematch)
|
||||
{
|
||||
whichLeader = 0;
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
if (!gSaveBlock1Ptr->trainerRematches[data[i]])
|
||||
{
|
||||
rematchIndex = GetRematchIndex(data[i]);
|
||||
if (rematchIndex == lowestRematchIndex)
|
||||
whichLeader++;
|
||||
}
|
||||
}
|
||||
if (whichLeader != 0)
|
||||
{
|
||||
whichLeader = Random() % whichLeader;
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
if (!gSaveBlock1Ptr->trainerRematches[data[i]])
|
||||
{
|
||||
rematchIndex = GetRematchIndex(data[i]);
|
||||
if (rematchIndex == lowestRematchIndex)
|
||||
{
|
||||
if (whichLeader == 0)
|
||||
{
|
||||
gSaveBlock1Ptr->trainerRematches[data[i]] = lowestRematchIndex;
|
||||
break;
|
||||
}
|
||||
whichLeader--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static s32 GetRematchIndex(u32 trainerIdx)
|
||||
{
|
||||
s32 i;
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
if (!HasTrainerBeenFought(gRematchTable[trainerIdx].trainerIds[i]))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return 5;
|
||||
}
|
||||
@@ -328,7 +328,6 @@ extern u8* gReturnToXStringsTable[];
|
||||
extern u32 gUnknown_0203CE5E[];
|
||||
extern u8 EventScript_2736B3[];
|
||||
extern const u16 gUnknown_0860F074[];
|
||||
extern struct BattleMove gBattleMoves[];
|
||||
|
||||
void ResetBagScrollPositions(void)
|
||||
{
|
||||
|
||||
@@ -67,7 +67,6 @@ extern const union AnimCmd *gUnknown_082FF70C[];
|
||||
extern const union AnimCmd *const *const gMonAnimationsSpriteAnimsPtrTable[];
|
||||
extern const union AnimCmd *const *const gUnknown_08305D0C[];
|
||||
extern const union AnimCmd *const *const gUnknown_0830536C[];
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1];
|
||||
extern const struct UnknownPokemonStruct3 gUnknown_08610970[];
|
||||
extern const struct CompressedSpritePalette gMonPaletteTable[];
|
||||
@@ -110,6 +109,9 @@ EWRAM_DATA struct SpriteTemplate gUnknown_0202499C = {0};
|
||||
EWRAM_DATA struct Unknown_806F160_Struct *gUnknown_020249B4[2] = {NULL};
|
||||
|
||||
// const rom data
|
||||
#include "data/battle_moves.h"
|
||||
static const u8 sUnreferencedData[] = {0x34, 0x00, 0x10, 0x00, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00};
|
||||
|
||||
const u16 gSpeciesToHoennPokedexNum[] = {203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 156, 157, 112, 113, 227, 228, 229, 230, 231, 232, 233, 234, 153, 154, 138, 139, 63, 64, 88, 89, 90, 235, 236, 237, 238, 239, 240, 241, 242, 158, 159, 243, 244, 245, 246, 247, 248, 249, 39, 40, 41, 73, 74, 75, 250, 251, 252, 66, 67, 57, 58, 59, 253, 254, 255, 256, 82, 83, 257, 92, 93, 258, 259, 106, 107, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 84, 85, 270, 271, 272, 273, 274, 275, 276, 108, 109, 169, 170, 277, 278, 279, 184, 185, 50, 51, 143, 144, 280, 281, 282, 283, 284, 167, 285, 52, 53, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 65, 181, 182, 155, 324, 137, 325, 326, 162, 163, 327, 328, 329, 91, 55, 56, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 161, 164, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 168, 357, 358, 359, 103, 104, 360, 361, 180, 362, 363, 364, 365, 115, 366, 367, 186, 165, 166, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 42, 43, 44, 25, 26, 34, 35, 114, 27, 28, 32, 33, 99, 100, 61, 62, 145, 131, 132, 60, 105, 68, 127, 128, 183, 129, 130, 140, 141, 97, 98, 116, 117, 118, 48, 49, 78, 79, 101, 102, 173, 174, 175, 119, 120, 171, 172, 125, 126, 54, 110, 111, 80, 81, 69, 76, 77, 121, 122, 160, 148, 149, 94, 36, 37, 38, 95, 96, 150, 45, 46, 47, 176, 177, 178, 152, 146, 147, 124, 123, 179, 70, 71, 72, 142, 86, 87, 133, 134, 135, 136, 29, 30, 31, 187, 188, 189, 190, 191, 192, 193, 194, 195, 198, 199, 200, 196, 197, 201, 202, 151};
|
||||
const u16 gSpeciesToNationalPokedexNum[] = {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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 290, 291, 292, 276, 277, 285, 286, 327, 278, 279, 283, 284, 320, 321, 300, 301, 352, 343, 344, 299, 324, 302, 339, 340, 370, 341, 342, 349, 350, 318, 319, 328, 329, 330, 296, 297, 309, 310, 322, 323, 363, 364, 365, 331, 332, 361, 362, 337, 338, 298, 325, 326, 311, 312, 303, 307, 308, 333, 334, 360, 355, 356, 315, 287, 288, 289, 316, 317, 357, 293, 294, 295, 366, 367, 368, 359, 353, 354, 336, 335, 369, 304, 305, 306, 351, 313, 314, 345, 346, 347, 348, 280, 281, 282, 371, 372, 373, 374, 375, 376, 377, 378, 379, 382, 383, 384, 380, 381, 385, 386, 358};
|
||||
const u16 gHoennToNationalOrder[] = {252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 63, 64, 65, 290, 291, 292, 293, 294, 295, 296, 297, 118, 119, 129, 130, 298, 183, 184, 74, 75, 76, 299, 300, 301, 41, 42, 169, 72, 73, 302, 303, 304, 305, 306, 66, 67, 68, 307, 308, 309, 310, 311, 312, 81, 82, 100, 101, 313, 314, 43, 44, 45, 182, 84, 85, 315, 316, 317, 318, 319, 320, 321, 322, 323, 218, 219, 324, 88, 89, 109, 110, 325, 326, 27, 28, 327, 227, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 174, 39, 40, 349, 350, 351, 120, 121, 352, 353, 354, 355, 356, 357, 358, 359, 37, 38, 172, 25, 26, 54, 55, 360, 202, 177, 178, 203, 231, 232, 127, 214, 111, 112, 361, 362, 363, 364, 365, 366, 367, 368, 369, 222, 170, 171, 370, 116, 117, 230, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 29, 30, 31, 32, 33, 34, 35, 36, 46, 47, 48, 49, 50, 51, 52, 53, 56, 57, 58, 59, 60, 61, 62, 69, 70, 71, 77, 78, 79, 80, 83, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 102, 103, 104, 105, 106, 107, 108, 113, 114, 115, 122, 123, 124, 125, 126, 128, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 173, 175, 176, 179, 180, 181, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 215, 216, 217, 220, 221, 223, 224, 225, 226, 228, 229, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411};
|
||||
|
||||
@@ -115,8 +115,6 @@ extern u8 gText_Appeal[];
|
||||
extern u8 gText_Jam[];
|
||||
extern u8 gText_OTSlash[];
|
||||
extern u8 gText_UnkCtrlF907F908[];
|
||||
extern u8 gAbilityNames[][13];
|
||||
extern u8 *gAbilityDescriptionPointers[];
|
||||
extern u8 gText_XNature[];
|
||||
extern u8 gText_XNatureHatchedAtYZ[];
|
||||
extern u8 gText_XNatureHatchedSomewhereAt[];
|
||||
@@ -146,7 +144,6 @@ extern u8 gText_OneDash[];
|
||||
extern u8 gText_TwoDashes[];
|
||||
extern u8 gText_ThreeDashes[];
|
||||
extern u8 gUnknown_0861CE97[];
|
||||
extern struct BattleMove gBattleMoves[];
|
||||
|
||||
extern void sub_8199C30(u8 a, u8 b, u8 c, u8 d, u8 e, u8 f);
|
||||
extern bool8 sub_81A6BF4();
|
||||
@@ -2539,7 +2536,7 @@ void sub_81C2554()
|
||||
gUnknown_0203CF1C->unk40CB[i] |= 0xFF;
|
||||
}
|
||||
|
||||
void sub_81C25A4(u8 a, u8 *b, u8 c, u8 d, u8 e, u8 f)
|
||||
void sub_81C25A4(u8 a, const u8 *b, u8 c, u8 d, u8 e, u8 f)
|
||||
{
|
||||
AddTextPrinterParameterized2(a, 1, c, d, 0, e, gUnknown_0861CD2C[f], 0, b);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user