Merge branch 'dev' into teleport
This commit is contained in:
commit
17c8842ad4
@ -106,7 +106,7 @@ cd /mnt/c/Users/<user>/Desktop/decomps
|
||||
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "/mnt/c/users/<user>/Desktop/decomp folder"`.
|
||||
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn't needed
|
||||
</details>
|
||||
|
||||
|
||||
If this works, then proceed to [Installation](#installation).
|
||||
|
||||
Otherwise, ask for help on Discord or IRC (see [README.md](README.md)), or continue reading below for [Windows instructions using msys2](#windows-msys2).
|
||||
@ -216,7 +216,7 @@ Note that the directory **must exist** in Windows. If you want to store pokeemer
|
||||
> Note 1: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "c:/users/<user>/Desktop/decomp folder"`.
|
||||
> Note 2: Windows path names are case-insensitive so adhering to capitalization isn't needed
|
||||
</details>
|
||||
|
||||
|
||||
If this works, then proceed to [Installation](#installation). Otherwise, ask for help on Discord or IRC (see [README.md](README.md)).
|
||||
|
||||
## macOS
|
||||
@ -539,7 +539,7 @@ devkitARM is now installed.
|
||||
devkitARM is now installed.
|
||||
|
||||
### Installing devkitARM on Arch Linux
|
||||
|
||||
|
||||
1. Follow [devkitPro's instructions](https://devkitpro.org/wiki/devkitPro_pacman#Customising_Existing_Pacman_Install) to configure `pacman` to download devkitPro packages.
|
||||
2. Install `gba-dev`: run the following command as root.
|
||||
|
||||
|
||||
4
Makefile
4
Makefile
@ -254,7 +254,7 @@ tidynonmodern:
|
||||
tidymodern:
|
||||
rm -f $(MODERN_ROM_NAME) $(MODERN_ELF_NAME) $(MODERN_MAP_NAME)
|
||||
rm -rf $(MODERN_OBJ_DIR_NAME)
|
||||
|
||||
|
||||
ifneq ($(MODERN),0)
|
||||
$(C_BUILDDIR)/berry_crush.o: override CFLAGS += -Wno-address-of-packed-member
|
||||
endif
|
||||
@ -412,7 +412,7 @@ LD_SCRIPT := ld_script.txt
|
||||
LD_SCRIPT_DEPS := $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_common.ld $(OBJ_DIR)/sym_ewram.ld
|
||||
else
|
||||
LD_SCRIPT := ld_script_modern.txt
|
||||
LD_SCRIPT_DEPS :=
|
||||
LD_SCRIPT_DEPS :=
|
||||
endif
|
||||
|
||||
$(OBJ_DIR)/ld_script.ld: $(LD_SCRIPT) $(LD_SCRIPT_DEPS)
|
||||
|
||||
@ -558,151 +558,151 @@
|
||||
.2byte \param1
|
||||
.4byte \param2
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_ally_chosen_move
|
||||
.byte 0x63
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_no_attacking_moves battler:req, param1:req
|
||||
.byte 0x64
|
||||
.byte \battler
|
||||
.4byte \param1
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_hazards_count battler:req, effect:req
|
||||
.byte 0x65
|
||||
.byte \battler
|
||||
.2byte \effect
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_doesnt_hold_berry battler:req, ptr:req
|
||||
.byte 0x66
|
||||
.byte \battler
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_share_type battler1:req, battler2:req, ptr:req
|
||||
.byte 0x67
|
||||
.byte \battler1
|
||||
.byte \battler2
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_cant_use_last_resort battler:req, ptr:req
|
||||
.byte 0x68
|
||||
.byte \battler
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_move_with_split battler:req, split:req, ptr:req
|
||||
.byte 0x69
|
||||
.byte \battler
|
||||
.byte \split
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_no_move_with_split battler:req, split:req, ptr:req
|
||||
.byte 0x6A
|
||||
.byte \battler
|
||||
.byte \split
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_physical_moves_unusable attacker:req, target:req, ptr:req
|
||||
.byte 0x6B
|
||||
.byte \attacker
|
||||
.byte \target
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_ai_can_go_down ptr:req
|
||||
.byte 0x6C
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_move_with_type battler:req, type:req, ptr:req
|
||||
.byte 0x6D
|
||||
.byte \battler
|
||||
.byte \type
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_no_move_used battler:req, ptr:req
|
||||
.byte 0x6E
|
||||
.byte \battler
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_move_with_flag battler:req, flag:req, ptr:req
|
||||
.byte 0x6F
|
||||
.byte \battler
|
||||
.4byte \flag
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_battler_absent battler:req, ptr:req
|
||||
.byte 0x70
|
||||
.byte \battler
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_grounded battler:req, ptr:req
|
||||
.byte 0x71
|
||||
.byte \battler
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_best_dmg_hp_percent
|
||||
.byte 0x72
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_curr_dmg_hp_percent
|
||||
.byte 0x73
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_move_split_from_result
|
||||
.byte 0x74
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_considered_move_split
|
||||
.byte 0x75
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_considered_move_target
|
||||
.byte 0x76
|
||||
.endm
|
||||
|
||||
|
||||
.macro compare_speeds battler1:req, battler2:req
|
||||
.byte 0x77
|
||||
.byte \battler1
|
||||
.byte \battler2
|
||||
.endm
|
||||
|
||||
|
||||
.macro is_wakeup_turn battler:req
|
||||
.byte 0x78
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_move_with_accuracy_lt battler:req, value:req, ptr:req
|
||||
.byte 0x79
|
||||
.byte \battler
|
||||
.byte \value
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
|
||||
@ useful script macros
|
||||
.macro if_has_physical_move battler:req, ptr:req
|
||||
if_has_move_with_split \battler, SPLIT_PHYSICAL, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_no_physical_move battler:req, ptr:req
|
||||
if_has_no_move_with_split \battler, SPLIT_PHYSICAL, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_special_move battler:req, ptr:req
|
||||
if_has_move_with_split \battler, SPLIT_SPECIAL, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_has_no_special_move battler:req, ptr:req
|
||||
if_has_no_move_with_split \battler, SPLIT_SPECIAL, \ptr
|
||||
.endm
|
||||
@ -714,33 +714,33 @@
|
||||
.macro get_curr_move_type
|
||||
get_type AI_TYPE_MOVE
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_user_type1
|
||||
get_type AI_TYPE1_USER
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_user_type2
|
||||
get_type AI_TYPE2_USER
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_target_type1
|
||||
get_type AI_TYPE1_TARGET
|
||||
.endm
|
||||
|
||||
|
||||
.macro get_target_type2
|
||||
get_type AI_TYPE2_TARGET
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_ability battler:req, ability:req, ptr:req
|
||||
check_ability \battler, \ability
|
||||
if_equal 1, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_no_ability battler:req, ability:req, ptr:req
|
||||
check_ability \battler, \ability
|
||||
if_equal 0, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_type battler:req, type:req, ptr:req
|
||||
is_of_type \battler, \type
|
||||
if_equal 1, \ptr
|
||||
@ -750,20 +750,20 @@
|
||||
is_of_type \battler, \type
|
||||
if_equal 0, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_target_faster ptr:req
|
||||
if_user_goes 1, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_user_faster ptr:req
|
||||
if_user_goes 0, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_double_battle ptr:req
|
||||
is_double_battle
|
||||
if_equal 1, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_not_double_battle ptr:req
|
||||
is_double_battle
|
||||
if_equal 0, \ptr
|
||||
@ -772,11 +772,11 @@
|
||||
.macro if_any_move_disabled battler:req, ptr:req
|
||||
if_any_move_disabled_or_encored \battler, 0, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro if_any_move_encored battler:req, ptr:req
|
||||
if_any_move_disabled_or_encored \battler, 1, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro call_if_always_hit ptr:req
|
||||
get_move_accuracy
|
||||
call_if_eq 0, \ptr
|
||||
|
||||
@ -270,20 +270,20 @@
|
||||
.macro stopsound
|
||||
.byte 0x2f
|
||||
.endm
|
||||
|
||||
|
||||
@ useful macros
|
||||
.macro jumpreteq value:req, ptr:req
|
||||
jumpargeq ARG_RET_ID, \value, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro jumprettrue ptr:req
|
||||
jumpreteq TRUE, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro jumpretfalse ptr:req
|
||||
jumpreteq FALSE, \ptr
|
||||
.endm
|
||||
|
||||
|
||||
.macro jumpifdoublebattle ptr:req
|
||||
createvisualtask AnimTask_IsDoubleBattle, 0
|
||||
jumprettrue \ptr
|
||||
@ -305,7 +305,7 @@
|
||||
.hword \launchtemplatearg7
|
||||
.hword \launchtemplatearg8
|
||||
.endm
|
||||
|
||||
|
||||
.macro launchtask launchtaskPtr launchtaskPriority launchtaskArgsNo launchtaskarg0 launchtaskarg1 launchtaskarg2 launchtaskarg3 launchtaskarg4 launchtaskarg5 launchtaskarg6 launchtaskarg7 launchtaskarg8
|
||||
.byte 0x3
|
||||
.word \launchtaskPtr
|
||||
@ -321,7 +321,7 @@
|
||||
.hword \launchtaskarg7
|
||||
.hword \launchtaskarg8
|
||||
.endm
|
||||
|
||||
|
||||
.macro setblends setblends_value
|
||||
.byte 0xC
|
||||
.hword \setblends_value
|
||||
|
||||
@ -89,15 +89,15 @@
|
||||
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SET_INTERVIEW_DATA
|
||||
special CallBattleTowerFunc
|
||||
.endm
|
||||
|
||||
|
||||
@Custom multi-battle commands
|
||||
|
||||
|
||||
.macro choose_mons
|
||||
fadescreen 1
|
||||
special ChooseHalfPartyForBattle @ choose 3 mons for battle
|
||||
waitstate
|
||||
.endm
|
||||
|
||||
|
||||
.macro multi_do type:req, partnerId:req, partnerPicId:req
|
||||
special ReducePlayerPartyToSelectedMons
|
||||
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SET_DATA
|
||||
@ -113,26 +113,26 @@
|
||||
special CallFrontierUtilFunc
|
||||
special LoadPlayerParty
|
||||
.endm
|
||||
|
||||
|
||||
.macro multi_2_vs_2 trainer1Id:req, trainer1LoseText:req, trainer2Id:req, trainer2LoseText:req, partnerId:req, partnerPicId:req
|
||||
special SavePlayerParty
|
||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_B, \trainer2Id, 0, NULL, \trainer2LoseText @ set second trainer mons
|
||||
multi_do MULTI_BATTLE_2_VS_2, \partnerId, \partnerPicId
|
||||
.endm
|
||||
|
||||
|
||||
.macro multi_2_vs_1 trainer1Id:req, trainer1LoseText:req, partnerId:req, partnerPicId:req
|
||||
special SavePlayerParty
|
||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
||||
multi_do MULTI_BATTLE_2_VS_1, \partnerId, \partnerPicId
|
||||
.endm
|
||||
|
||||
|
||||
@ Wild mons need to be assigned to gEnemyParty 0 and 3 slots, other slots need to be cleared out.
|
||||
.macro multi_wild partnerId:req, partnerPicId:req
|
||||
special SavePlayerParty
|
||||
multi_do MULTI_BATTLE_2_VS_WILD, \partnerId, \partnerPicId
|
||||
.endm
|
||||
|
||||
|
||||
.macro multi_do_fixed type:req, partnerId:req, partnerPicId:req
|
||||
setvar VAR_0x8004, SPECIAL_BATTLE_MULTI
|
||||
setvar VAR_0x8005, \type
|
||||
@ -144,20 +144,20 @@
|
||||
special CallFrontierUtilFunc
|
||||
special LoadPlayerParty
|
||||
.endm
|
||||
|
||||
|
||||
.macro multi_fixed_2_vs_2 trainer1Id:req, trainer1LoseText:req, trainer2Id:req, trainer2LoseText:req, partnerId:req, partnerPicId:req
|
||||
special SavePlayerParty
|
||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_B, \trainer2Id, 0, NULL, \trainer2LoseText @ set second trainer mons
|
||||
multi_do_fixed MULTI_BATTLE_2_VS_2, \partnerId, \partnerPicId
|
||||
.endm
|
||||
|
||||
|
||||
.macro multi_fixed_2_vs_1 trainer1Id:req, trainer1LoseText:req, partnerId:req, partnerPicId:req
|
||||
special SavePlayerParty
|
||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
||||
multi_do_fixed MULTI_BATTLE_2_VS_1, \partnerId, \partnerPicId
|
||||
.endm
|
||||
|
||||
|
||||
@ Wild mons need to be assigned to gEnemyParty 0 and 3 slots, other slots need to be cleared out.
|
||||
.macro multi_fixed_wild partnerId:req, partnerPicId:req
|
||||
special SavePlayerParty
|
||||
|
||||
@ -1186,11 +1186,11 @@
|
||||
.byte 0xe5
|
||||
.endm
|
||||
|
||||
.macro docastformchangeanimation
|
||||
.macro doweatherformchangeanimation
|
||||
.byte 0xe6
|
||||
.endm
|
||||
|
||||
.macro trycastformdatachange
|
||||
.macro tryweatherformdatachange
|
||||
.byte 0xe7
|
||||
.endm
|
||||
|
||||
@ -1788,7 +1788,7 @@
|
||||
.macro setzeffect
|
||||
various BS_ATTACKER, VARIOUS_SET_Z_EFFECT
|
||||
.endm
|
||||
|
||||
|
||||
.macro consumeberry battler:req, restoreItem=FALSE
|
||||
various \battler, VARIOUS_CONSUME_BERRY
|
||||
.byte \restoreItem
|
||||
@ -2140,3 +2140,8 @@
|
||||
.macro skydropyawn
|
||||
various 0, VARIOUS_SKY_DROP_YAWN
|
||||
.endm
|
||||
|
||||
@ Used by effects that may proc Symbiosis but do not call removeitem.
|
||||
.macro trysymbiosis
|
||||
various BS_ATTACKER, VARIOUS_TRY_SYMBIOSIS
|
||||
.endm
|
||||
|
||||
@ -276,7 +276,7 @@
|
||||
.2byte SPECIAL_\function
|
||||
.endm
|
||||
|
||||
@ Blocks script execution until a command or C code manually unblocks it. Generally used with specific
|
||||
@ Blocks script execution until a command or C code manually unblocks it. Generally used with specific
|
||||
@ commands and specials. Calling ScriptContext_Enable for instance will allow execution to continue.
|
||||
.macro waitstate
|
||||
.byte 0x27
|
||||
@ -985,7 +985,7 @@
|
||||
.endm
|
||||
|
||||
@ Gives the player a Pokémon of the specified species and level, holding the specified item. The trailing 0s are unused parameters.
|
||||
@ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome.
|
||||
@ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome.
|
||||
.macro givemon species:req, level:req, item=ITEM_NONE
|
||||
.byte 0x79
|
||||
.2byte \species
|
||||
@ -997,7 +997,7 @@
|
||||
.endm
|
||||
|
||||
@ Gives the player an Egg of the specified species.
|
||||
@ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome.
|
||||
@ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome.
|
||||
.macro giveegg species:req
|
||||
.byte 0x7a
|
||||
.2byte \species
|
||||
@ -1415,7 +1415,7 @@
|
||||
.2byte \out
|
||||
.endm
|
||||
|
||||
@ Gives 'count' coins to the player, up to a total of MAX_COINS.
|
||||
@ Gives 'count' coins to the player, up to a total of MAX_COINS.
|
||||
@ If the player already has MAX_COINS then VAR_RESULT is set to TRUE, otherwise it is set to FALSE.
|
||||
.macro addcoins count:req
|
||||
.byte 0xb4
|
||||
@ -1893,7 +1893,7 @@
|
||||
|
||||
@ Gives 'amount' of the specified 'item' to the player and prints a message with fanfare.
|
||||
@ If the player doesn't have space for all the items then as many are added as possible, the
|
||||
@ message indicates there is no room, and VAR_RESULT is set to FALSE.
|
||||
@ message indicates there is no room, and VAR_RESULT is set to FALSE.
|
||||
@ Otherwise VAR_RESULT is set to TRUE, and the message indicates they have received the item(s).
|
||||
.macro giveitem item:req, amount=1
|
||||
setorcopyvar VAR_0x8000, \item
|
||||
|
||||
@ -150,13 +150,13 @@
|
||||
.4byte \sample
|
||||
.byte 0xff, 0, 0xff, 0
|
||||
.endm
|
||||
|
||||
|
||||
.macro cry_uncomp sample @ not compressed
|
||||
.byte 0x0, 60, 0, 0
|
||||
.4byte \sample
|
||||
.byte 0xff, 0, 0xff, 0
|
||||
.endm
|
||||
|
||||
|
||||
.macro cry_reverse_uncomp sample @ not compressed
|
||||
.byte 0x10, 60, 0, 0
|
||||
.4byte \sample
|
||||
|
||||
@ -79,6 +79,7 @@ SUPER_RE = A0
|
||||
'?' = AC
|
||||
'.' = AD
|
||||
'-' = AE
|
||||
'_' = AE @ For autogenerating strings based on label names. Not using {UNDERSCORE} on purpose due to how bad it looks.
|
||||
'·' = AF
|
||||
'…' = B0
|
||||
'“' = B1
|
||||
|
||||
@ -859,7 +859,7 @@ gBattleAnims_StatusConditions::
|
||||
|
||||
.align 2
|
||||
gBattleAnims_General::
|
||||
.4byte General_CastformChange @ B_ANIM_CASTFORM_CHANGE
|
||||
.4byte General_WeatherFormChange @ B_ANIM_CASTFORM_CHANGE
|
||||
.4byte General_StatsChange @ B_ANIM_STATS_CHANGE
|
||||
.4byte General_SubstituteFade @ B_ANIM_SUBSTITUTE_FADE
|
||||
.4byte General_SubstituteAppear @ B_ANIM_SUBSTITUTE_APPEAR
|
||||
@ -1185,9 +1185,9 @@ Move_TAILWIND:
|
||||
end
|
||||
|
||||
Move_ACUPRESSURE:
|
||||
loadspritegfx ANIM_TAG_ACCUPRESSURE
|
||||
loadspritegfx ANIM_TAG_ACUPRESSURE
|
||||
loadspritegfx ANIM_TAG_SPARK_2
|
||||
createsprite gAccupressureSpriteTemplate, ANIM_ATTACKER, 40, 0, -40, 40
|
||||
createsprite gAcupressureSpriteTemplate, ANIM_ATTACKER, 40, 0, -40, 40
|
||||
waitforvisualfinish
|
||||
call ElectricityEffect
|
||||
end
|
||||
@ -4337,7 +4337,7 @@ Move_LUNAR_DANCE:
|
||||
|
||||
Move_CRUSH_GRIP:
|
||||
loadspritegfx ANIM_TAG_EXPLOSION
|
||||
loadspritegfx ANIM_TAG_ACCUPRESSURE
|
||||
loadspritegfx ANIM_TAG_ACUPRESSURE
|
||||
loadspritegfx ANIM_TAG_PURPLE_HAND_OUTLINE
|
||||
setalpha 15, 0
|
||||
createsprite gCrushGripHandTemplate, ANIM_TARGET, 2, 16, 0, 0, 0, 25, 0x101
|
||||
@ -14196,7 +14196,7 @@ TerrainPulseElectric:
|
||||
createvisualtask AnimTask_SwayMon, 5, 0, 4, 51200, 24, ANIM_TARGET
|
||||
createvisualtask AnimTask_BlendColorCycle, 2, 4, 2, 2, 0, 12, RGB(27, 27, 0)
|
||||
goto TerrainPulseEnd
|
||||
|
||||
|
||||
TerrainPulseGrass:
|
||||
createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_DRAGON_PULSE, 0, 12, 12, RGB(11, 26, 11)
|
||||
waitforvisualfinish
|
||||
@ -14218,7 +14218,7 @@ TerrainPulseFairy:
|
||||
createvisualtask AnimTask_SwayMon, 5, 0, 4, 51200, 24, ANIM_TARGET
|
||||
createvisualtask AnimTask_BlendColorCycle, 2, 4, 2, 2, 0, 12, RGB(31, 24, 31)
|
||||
goto TerrainPulseEnd
|
||||
|
||||
|
||||
TerrainPulsePsychic:
|
||||
createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_DRAGON_PULSE, 0, 12, 12, RGB(27, 0, 13)
|
||||
waitforvisualfinish
|
||||
@ -24247,11 +24247,11 @@ Status_Nightmare:
|
||||
Status_Powder:
|
||||
end
|
||||
|
||||
General_CastformChange:
|
||||
General_WeatherFormChange:
|
||||
createvisualtask AnimTask_IsMonInvisible, 2
|
||||
jumpreteq TRUE, CastformChangeSkipAnim
|
||||
goto CastformChangeContinue
|
||||
CastformChangeContinue:
|
||||
jumpreteq TRUE, WeatherFormChangeSkipAnim
|
||||
goto WeatherFormChangeContinue
|
||||
WeatherFormChangeContinue:
|
||||
monbg ANIM_ATTACKER
|
||||
playsewithpan SE_M_TELEPORT, SOUND_PAN_ATTACKER
|
||||
waitplaysewithpan SE_M_MINIMIZE, SOUND_PAN_ATTACKER, 48
|
||||
@ -24259,7 +24259,7 @@ CastformChangeContinue:
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_ATTACKER
|
||||
end
|
||||
CastformChangeSkipAnim:
|
||||
WeatherFormChangeSkipAnim:
|
||||
createvisualtask AnimTask_CastformGfxDataChange, 2, 1
|
||||
end
|
||||
|
||||
@ -24740,7 +24740,7 @@ General_RestoreBg:
|
||||
restorebg
|
||||
waitbgfadein
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
General_ZMoveActivate:
|
||||
@ -24839,15 +24839,15 @@ General_PrimalReversion::
|
||||
jumpargeq 0x1, ITEM_BLUE_ORB, General_PrimalReversion_Alpha
|
||||
General_PrimalReversion_Alpha:
|
||||
loadspritegfx ANIM_TAG_ALPHA_STONE
|
||||
loadspritegfx ANIM_TAG_PRIMAL_PARTICLES
|
||||
loadspritegfx ANIM_TAG_MEGA_PARTICLES
|
||||
loadspritegfx ANIM_TAG_ALPHA_SYMBOL
|
||||
monbg ANIM_ATTACKER
|
||||
setalpha 12, 8
|
||||
loopsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER, 13, 3
|
||||
createvisualtask AnimTask_BlendColorCycle, 2, 2, 0, 6, 0, 11, RGB(31, 31, 11)
|
||||
call PrimalReversionParticles
|
||||
call PrimalReversionParticles
|
||||
call PrimalReversionParticles
|
||||
call MegaEvolutionParticles
|
||||
call MegaEvolutionParticles
|
||||
call MegaEvolutionParticles
|
||||
waitforvisualfinish
|
||||
playsewithpan SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER
|
||||
createsprite gAlphaStoneSpriteTemplate, ANIM_ATTACKER, 41, 0, 0, 0, 0
|
||||
@ -24865,15 +24865,15 @@ General_PrimalReversion_Alpha:
|
||||
end
|
||||
General_PrimalReversion_Omega:
|
||||
loadspritegfx ANIM_TAG_OMEGA_STONE
|
||||
loadspritegfx ANIM_TAG_PRIMAL_PARTICLES
|
||||
loadspritegfx ANIM_TAG_MEGA_PARTICLES
|
||||
loadspritegfx ANIM_TAG_OMEGA_SYMBOL
|
||||
monbg ANIM_ATTACKER
|
||||
setalpha 12, 8
|
||||
loopsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER, 13, 3
|
||||
createvisualtask AnimTask_BlendColorCycle, 2, 2, 0, 6, 0, 11, RGB(31, 31, 11)
|
||||
call PrimalReversionParticles
|
||||
call PrimalReversionParticles
|
||||
call PrimalReversionParticles
|
||||
call MegaEvolutionParticles
|
||||
call MegaEvolutionParticles
|
||||
call MegaEvolutionParticles
|
||||
waitforvisualfinish
|
||||
playsewithpan SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER
|
||||
createsprite gOmegaStoneSpriteTemplate, ANIM_ATTACKER, 41, 0, 0, 0, 0
|
||||
@ -24889,22 +24889,6 @@ General_PrimalReversion_Omega:
|
||||
clearmonbg ANIM_ATK_PARTNER
|
||||
blendoff
|
||||
end
|
||||
PrimalReversionParticles:
|
||||
createsprite gPrimalParticlesSpriteTemplate, ANIM_ATTACKER, 2, 40, -10, 13
|
||||
delay 3
|
||||
createsprite gPrimalParticlesSpriteTemplate, ANIM_ATTACKER, 2, -35, -10, 13
|
||||
delay 3
|
||||
createsprite gPrimalParticlesSpriteTemplate, ANIM_ATTACKER, 2, 15, -40, 13
|
||||
delay 3
|
||||
createsprite gPrimalParticlesSpriteTemplate, ANIM_ATTACKER, 2, -10, -32, 13
|
||||
delay 3
|
||||
createsprite gPrimalParticlesSpriteTemplate, ANIM_ATTACKER, 2, 25, -20, 13
|
||||
delay 3
|
||||
createsprite gPrimalParticlesSpriteTemplate, ANIM_ATTACKER, 2, -40, -20, 13
|
||||
delay 3
|
||||
createsprite gPrimalParticlesSpriteTemplate, ANIM_ATTACKER, 2, 5, -40, 13
|
||||
delay 3
|
||||
return
|
||||
|
||||
General_AffectionHangedOn::
|
||||
loadspritegfx ANIM_TAG_RED_HEART
|
||||
@ -25263,8 +25247,8 @@ FinishSupersonicSkystrike:
|
||||
call UnsetPsychicBg
|
||||
waitforvisualfinish
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
Move_ACID_DOWNPOUR:
|
||||
loadspritegfx ANIM_TAG_BLUE_ORB @ reversal
|
||||
loadspritegfx ANIM_TAG_POISON_JAB @ poison jab
|
||||
@ -25951,7 +25935,7 @@ NeverendingNightmareGeyser:
|
||||
createsprite gNeverEndingNightmareGeyserHexSpriteTemplate ANIM_TARGET, 2, ANIM_TARGET, 0xfff0, 0x10
|
||||
return
|
||||
|
||||
|
||||
|
||||
Move_CORKSCREW_CRASH::
|
||||
loadspritegfx ANIM_TAG_SPIKES @metal bits
|
||||
loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @charge
|
||||
@ -26669,7 +26653,7 @@ HavocSpearSparkTarget:
|
||||
@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x20 0xc SOUND_PAN_ATTACKER 0x14 0x2 0x8000
|
||||
launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x10 0xc SOUND_PAN_ATTACKER 0x14 0x2 0x8000
|
||||
return
|
||||
|
||||
|
||||
|
||||
Move_SHATTERED_PSYCHE::
|
||||
loadspritegfx ANIM_TAG_IMPACT @hit
|
||||
@ -29127,7 +29111,7 @@ OceanicOperettaExplosion:
|
||||
launchtemplate gOceanOperaExplosionSpriteTemplate 0x33 0x4 0x10 0x10 ANIM_TARGET 0x1
|
||||
delay 0x6
|
||||
return
|
||||
|
||||
|
||||
|
||||
Move_SPLINTERED_STORMSHARDS::
|
||||
loadspritegfx ANIM_TAG_ROCKS @rock
|
||||
@ -29388,7 +29372,7 @@ SplinteredStormshardsFinishFadeReturn:
|
||||
return
|
||||
|
||||
|
||||
Move_LETS_SNUGGLE_FOREVER::
|
||||
Move_LETS_SNUGGLE_FOREVER::
|
||||
loadspritegfx ANIM_TAG_MAGENTA_HEART @sharm
|
||||
loadspritegfx ANIM_TAG_MUSIC_NOTES @music note
|
||||
loadspritegfx ANIM_TAG_SMALL_BUBBLES @fake tears
|
||||
@ -30467,11 +30451,11 @@ LightThatBurnsTheSkyGreenSparks:
|
||||
launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x30 0x2c 0x0 0x28 0x0 0x3
|
||||
launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x30 0x2c 0x40 0x28 0x1 0x3
|
||||
launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x30 0x2c 0x80 0x28 0x0 0x3
|
||||
launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x30 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3
|
||||
launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x30 0x2c 0x0 0x28 0x2 0x3
|
||||
launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x0 0x3
|
||||
launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x15 0x2c 0x40 0x28 0x1 0x3
|
||||
launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x15 0x2c 0x80 0x28 0x0 0x3
|
||||
launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x15 0x2c SOUND_PAN_ATTACKER 0x28 0x2 0x3
|
||||
launchtemplate gLightThatBurnsTheSkyGreenSparkSpriteTemplate 0x83 0x8 0x0 0x0 0x15 0x2c 0x0 0x28 0x2 0x3
|
||||
delay 0x10
|
||||
return
|
||||
|
||||
|
||||
@ -511,7 +511,7 @@ BattleScript_BeakBlastSetUp::
|
||||
setbeakblast BS_ATTACKER
|
||||
printstring STRINGID_EMPTYSTRING3
|
||||
waitmessage 1
|
||||
playanimation BS_ATTACKER, B_ANIM_BEAK_BLAST_SETUP, NULL
|
||||
playanimation BS_ATTACKER, B_ANIM_BEAK_BLAST_SETUP, NULL
|
||||
printstring STRINGID_HEATUPBEAK
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end2
|
||||
@ -601,7 +601,7 @@ BattleScript_ScaleShotEnd::
|
||||
moveendcase MOVEEND_SYNCHRONIZE_TARGET
|
||||
moveendfrom MOVEEND_STATUS_IMMUNITY_ABILITIES
|
||||
end
|
||||
|
||||
|
||||
BattleScript_EffectSkyDrop:
|
||||
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_SkyDropTurn2
|
||||
attackcanceler
|
||||
@ -706,6 +706,7 @@ BattleScript_EffectFlingConsumeBerry:
|
||||
restorebattleritem BS_TARGET
|
||||
BattleScript_FlingEnd:
|
||||
tryfaintmon BS_TARGET
|
||||
trysymbiosis
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_FlingFlameOrb:
|
||||
@ -1392,6 +1393,7 @@ BattleScript_MoveEffectBugBite::
|
||||
consumeberry BS_ATTACKER, TRUE @ consume the berry, then restore the item from changedItems
|
||||
bicword gHitMarker, HITMARKER_NO_ANIMATIONS
|
||||
setbyte sBERRY_OVERRIDE, FALSE
|
||||
trysymbiosis
|
||||
return
|
||||
|
||||
BattleScript_EffectCoreEnforcer:
|
||||
@ -1763,6 +1765,7 @@ BattleScript_EffectBestow:
|
||||
waitanimation
|
||||
printstring STRINGID_BESTOWITEMGIVING
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
trysymbiosis
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectAfterYou:
|
||||
@ -5678,7 +5681,7 @@ BattleScript_EffectRolePlay::
|
||||
pause 20
|
||||
destroyabilitypopup
|
||||
pause 40
|
||||
.endif
|
||||
.endif
|
||||
printstring STRINGID_PKMNCOPIEDFOE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
switchinabilities BS_ATTACKER
|
||||
@ -6597,11 +6600,9 @@ BattleScript_LearnMoveReturn::
|
||||
BattleScript_RainContinuesOrEnds::
|
||||
printfromtable gRainContinuesStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_RAIN_STOPPED, BattleScript_RainEnds
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_RAIN_STOPPED, BattleScript_RainContinuesOrEndsEnd
|
||||
playanimation BS_ATTACKER, B_ANIM_RAIN_CONTINUES
|
||||
end2
|
||||
BattleScript_RainEnds::
|
||||
call BattleScript_WeatherFormChanges
|
||||
BattleScript_RainContinuesOrEndsEnd::
|
||||
end2
|
||||
|
||||
BattleScript_DamagingWeatherContinues::
|
||||
@ -6640,7 +6641,6 @@ BattleScript_DamagingWeatherContinuesEnd::
|
||||
BattleScript_SandStormHailEnds::
|
||||
printfromtable gSandStormHailEndStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
call BattleScript_WeatherFormChanges
|
||||
end2
|
||||
|
||||
BattleScript_SunlightContinues::
|
||||
@ -6652,7 +6652,6 @@ BattleScript_SunlightContinues::
|
||||
BattleScript_SunlightFaded::
|
||||
printstring STRINGID_SUNLIGHTFADED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
call BattleScript_WeatherFormChanges
|
||||
end2
|
||||
|
||||
BattleScript_OverworldWeatherStarts::
|
||||
@ -8258,19 +8257,30 @@ BattleScript_ShedSkinActivates::
|
||||
BattleScript_WeatherFormChanges::
|
||||
setbyte sBATTLER, 0
|
||||
BattleScript_WeatherFormChangesLoop::
|
||||
trycastformdatachange
|
||||
tryweatherformdatachange
|
||||
addbyte sBATTLER, 1
|
||||
jumpifbytenotequal sBATTLER, gBattlersCount, BattleScript_WeatherFormChangesLoop
|
||||
return
|
||||
|
||||
BattleScript_CastformChange::
|
||||
call BattleScript_DoCastformChange
|
||||
BattleScript_WeatherFormChange::
|
||||
call BattleScript_DoWeatherFormChange
|
||||
end3
|
||||
|
||||
BattleScript_DoCastformChange::
|
||||
BattleScript_DoWeatherFormChange::
|
||||
copybyte gBattlerAbility, sBATTLER
|
||||
.if B_WEATHER_FORMS >= GEN_5
|
||||
jumpifspecies BS_SCRIPTING, SPECIES_CASTFORM, BattleScript_DoWeatherFormChange_ForecastCheck
|
||||
BattleScript_DoWeatherFormChange_FlowerGiftCheck:
|
||||
jumpifability BS_SCRIPTING, ABILITY_FLOWER_GIFT, BattleScript_DoWeatherFormChange_PopUp
|
||||
goto BattleScript_DoWeatherFormChange_AfterPopUp
|
||||
.endif
|
||||
BattleScript_DoWeatherFormChange_ForecastCheck:
|
||||
jumpifability BS_SCRIPTING, ABILITY_FORECAST, BattleScript_DoWeatherFormChange_PopUp
|
||||
goto BattleScript_DoWeatherFormChange_AfterPopUp
|
||||
BattleScript_DoWeatherFormChange_PopUp:
|
||||
call BattleScript_AbilityPopUp
|
||||
docastformchangeanimation
|
||||
BattleScript_DoWeatherFormChange_AfterPopUp:
|
||||
doweatherformchangeanimation
|
||||
waitstate
|
||||
printstring STRINGID_PKMNTRANSFORMED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
@ -9648,7 +9658,7 @@ BattleScript_StatUpZMove::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_StatUpZMoveEnd:
|
||||
return
|
||||
|
||||
|
||||
BattleScript_HealReplacementZMove::
|
||||
playanimation BS_SCRIPTING B_ANIM_WISH_HEAL 0x0
|
||||
printfromtable gZEffectStringIds
|
||||
@ -9859,8 +9869,14 @@ BattleScript_NeutralizingGasExitsLoop:
|
||||
jumpifbytenotequal gBattlerTarget, sByteFour, BattleScript_NeutralizingGasExitsLoop @ SOMEHOW, comparing to gBattlersCount is problematic.
|
||||
restoretarget
|
||||
return
|
||||
|
||||
|
||||
BattleScript_MagicianActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
call BattleScript_ItemSteal
|
||||
return
|
||||
|
||||
BattleScript_SymbiosisActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_SYMBIOSISITEMPASS
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
return
|
||||
|
||||
@ -577,6 +577,8 @@ gStdScripts_End::
|
||||
.include "data/scripts/new_game.inc"
|
||||
.include "data/scripts/hall_of_fame.inc"
|
||||
|
||||
.include "data/scripts/debug.inc"
|
||||
|
||||
EventScript_WhiteOut::
|
||||
call EverGrandeCity_HallOfFame_EventScript_ResetEliteFour
|
||||
goto EventScript_ResetMrBriney
|
||||
|
||||
@ -225,6 +225,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_CommentOnOpponentType::
|
||||
call_if_eq VAR_0x8005, TYPE_ICE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesIce
|
||||
call_if_eq VAR_0x8005, TYPE_DRAGON, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesDragon
|
||||
call_if_eq VAR_0x8005, TYPE_DARK, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesDark
|
||||
call_if_eq VAR_0x8005, TYPE_FAIRY, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFairy
|
||||
call_if_eq VAR_0x8005, NUMBER_OF_MON_TYPES, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentHasNoMostCommonType
|
||||
return
|
||||
|
||||
@ -296,6 +297,10 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesDark::
|
||||
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInDarkType, MSGBOX_DEFAULT
|
||||
return
|
||||
|
||||
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFairy::
|
||||
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInFairyType, MSGBOX_DEFAULT
|
||||
return
|
||||
|
||||
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentHasNoMostCommonType::
|
||||
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerHasNoClearFavorite, MSGBOX_DEFAULT
|
||||
return
|
||||
@ -559,6 +564,10 @@ BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInDarkType:
|
||||
.string "The TRAINER is apparently skilled\n"
|
||||
.string "in the handling of the DARK type.$"
|
||||
|
||||
BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInFairyType:
|
||||
.string "The TRAINER is apparently skilled\n"
|
||||
.string "in the handling of the FAIRY type.$"
|
||||
|
||||
BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInSteelType:
|
||||
.string "The TRAINER is apparently skilled\n"
|
||||
.string "in the handling of the STEEL type.$"
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
"x": 14,
|
||||
"y": 9,
|
||||
"elevation": 3,
|
||||
"var": "VAR_SKY_PILLAR_RAQUAZA_CRY_DONE",
|
||||
"var": "VAR_SKY_PILLAR_RAYQUAZA_CRY_DONE",
|
||||
"var_value": "0",
|
||||
"script": "SkyPillar_Top_EventScript_AwakenRayquaza"
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ SkyPillar_Top_EventScript_AwakenRayquaza::
|
||||
special RemoveCameraObject
|
||||
setvar VAR_SOOTOPOLIS_CITY_STATE, 5
|
||||
setvar VAR_SKY_PILLAR_STATE, 1
|
||||
setvar VAR_SKY_PILLAR_RAQUAZA_CRY_DONE, 1
|
||||
setvar VAR_SKY_PILLAR_RAYQUAZA_CRY_DONE, 1
|
||||
releaseall
|
||||
end
|
||||
|
||||
|
||||
79
data/scripts/debug.inc
Normal file
79
data/scripts/debug.inc
Normal file
@ -0,0 +1,79 @@
|
||||
Debug_ShowFieldMessageStringVar4::
|
||||
special ShowFieldMessageStringVar4
|
||||
waitmessage
|
||||
waitbuttonpress
|
||||
releaseall
|
||||
end
|
||||
|
||||
Debug_CheatStart::
|
||||
lockall
|
||||
setflag FLAG_SYS_POKEMON_GET
|
||||
setflag FLAG_RESCUED_BIRCH
|
||||
setflag FLAG_HIDE_ROUTE_101_BIRCH_ZIGZAGOON_BATTLE
|
||||
setflag FLAG_ADVENTURE_STARTED
|
||||
clearflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_BIRCH
|
||||
setflag FLAG_HIDE_ROUTE_101_BIRCH_STARTERS_BAG
|
||||
setvar VAR_BIRCH_LAB_STATE, 2
|
||||
setvar VAR_ROUTE101_STATE, 3
|
||||
givemon SPECIES_TREECKO, 20, ITEM_NONE
|
||||
givemon SPECIES_TORCHIC, 20, ITEM_NONE
|
||||
givemon SPECIES_MUDKIP, 20, ITEM_NONE
|
||||
setflag FLAG_SYS_POKEDEX_GET
|
||||
special SetUnlockedPokedexFlags
|
||||
setflag FLAG_RECEIVED_POKEDEX_FROM_BIRCH
|
||||
setvar VAR_CABLE_CLUB_TUTORIAL_STATE, 1
|
||||
setflag FLAG_SYS_NATIONAL_DEX
|
||||
special EnableNationalPokedex
|
||||
setflag FLAG_RECEIVED_RUNNING_SHOES
|
||||
setflag FLAG_SYS_B_DASH
|
||||
setvar VAR_LITTLEROOT_TOWN_STATE, 4 @ 4: Received Running Shoes
|
||||
setvar VAR_LITTLEROOT_INTRO_STATE, 7 @ 7: Told to go meet rival
|
||||
setvar VAR_LITTLEROOT_HOUSES_STATE_BRENDAN, 2 @ 2: Met Rival's Mom (and is corresponding gender)
|
||||
setvar VAR_LITTLEROOT_HOUSES_STATE_MAY, 2 @ 2: Met Rival's Mom (and is corresponding gender)
|
||||
setvar VAR_LITTLEROOT_RIVAL_STATE, 4 @ 4: Received Pokedex
|
||||
setflag FLAG_RECEIVED_BIKE
|
||||
additem ITEM_ACRO_BIKE
|
||||
setvar VAR_BRINEY_HOUSE_STATE, 1
|
||||
setvar VAR_ROUTE116_STATE, 2
|
||||
setflag FLAG_HIDE_ROUTE_116_MR_BRINEY
|
||||
clearflag FLAG_HIDE_BRINEYS_HOUSE_MR_BRINEY
|
||||
clearflag FLAG_HIDE_BRINEYS_HOUSE_PEEKO
|
||||
release
|
||||
end
|
||||
|
||||
Debug_FlagsNotSetMessage::
|
||||
lockall
|
||||
message Debug_FlagsNotSetMessage_Text
|
||||
waitmessage
|
||||
waitbuttonpress
|
||||
releaseall
|
||||
end
|
||||
|
||||
Debug_FlagsNotSetMessage_Text:
|
||||
.string "Feature unavailable!\n"
|
||||
.string "Please define a usable flag in:\l"
|
||||
.string "'include/constants/overworld{UNDERSCORE}config.h'!$"
|
||||
|
||||
Debug_Script_1::
|
||||
end
|
||||
|
||||
Debug_Script_2::
|
||||
end
|
||||
|
||||
Debug_Script_3::
|
||||
end
|
||||
|
||||
Debug_Script_4::
|
||||
end
|
||||
|
||||
Debug_Script_5::
|
||||
end
|
||||
|
||||
Debug_Script_6::
|
||||
end
|
||||
|
||||
Debug_Script_7::
|
||||
end
|
||||
|
||||
Debug_Script_8::
|
||||
end
|
||||
@ -38,7 +38,7 @@ EventScript_ResetAllBerries::
|
||||
setberrytree BERRY_TREE_ROUTE_117_WEPEAR_3, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree BERRY_TREE_ROUTE_117_WEPEAR_2, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree BERRY_TREE_ROUTE_117_WEPEAR_1, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
|
||||
@ Route 112
|
||||
setberrytree BERRY_TREE_ROUTE_112_RAWST_2, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree BERRY_TREE_ROUTE_112_PECHA_2, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ -22,7 +22,7 @@ Roulette_EventScript_Play::
|
||||
special PlayRoulette
|
||||
waitstate
|
||||
end
|
||||
|
||||
|
||||
Roulette_Text_PlayMinimumWagerIsX::
|
||||
.string "The minimum wager at this table\n"
|
||||
.string "is {STR_VAR_1}. Do you want to play?$"
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
cd /mnt/c/Users/<user>/Downloads
|
||||
```
|
||||
|
||||
> Note 1: The Windows C:\ drive is called /mnt/c/ in WSL.
|
||||
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "/mnt/c/users/<user>/Downloads folder"`.
|
||||
> Note 1: The Windows C:\ drive is called /mnt/c/ in WSL.
|
||||
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "/mnt/c/users/<user>/Downloads folder"`.
|
||||
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn't needed
|
||||
|
||||
4. Once the directory has been changed to the folder containing the devkitPro pacman package, run the following commands to install devkitARM.
|
||||
|
||||
@ -73,7 +73,7 @@ static const u8 sDarkDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow_alt
|
||||
static const u8 sUnusedFRLGBlankedDownArrow[] = INCBIN_U8("graphics/fonts/unused_frlg_blanked_down_arrow.4bpp");
|
||||
static const u8 sUnusedFRLGDownArrow[] = INCBIN_U8("graphics/fonts/unused_frlg_down_arrow.4bpp");
|
||||
static const u8 sDownArrowYCoords[] = { 0, 1, 2, 1 };
|
||||
static const u8 sWindowVerticalScrollSpeeds[] = {
|
||||
static const u8 sWindowVerticalScrollSpeeds[] = {
|
||||
[OPTIONS_TEXT_SPEED_SLOW] = 1,
|
||||
[OPTIONS_TEXT_SPEED_MID] = 2,
|
||||
[OPTIONS_TEXT_SPEED_FAST] = 4,
|
||||
@ -299,7 +299,7 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi
|
||||
else
|
||||
{
|
||||
sTempTextPrinter.textSpeed = 0;
|
||||
|
||||
|
||||
// Render all text (up to limit) at once
|
||||
for (j = 0; j < 0x400; ++j)
|
||||
{
|
||||
|
||||
@ -148,7 +148,6 @@ void RestoreTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor);
|
||||
void DecompressGlyphTile(const void *src_, void *dest_);
|
||||
void CopyGlyphToWindow(struct TextPrinter *x);
|
||||
void ClearTextSpan(struct TextPrinter *textPrinter, u32 width);
|
||||
u8 GetMenuCursorDimensionByFont(u8, u8);
|
||||
|
||||
void TextPrinterInitDownArrowCounters(struct TextPrinter *textPrinter);
|
||||
void TextPrinterDrawDownArrow(struct TextPrinter *textPrinter);
|
||||
|
||||
19
graphics/battle_anims/backgrounds/windstorm_brew.pal
Normal file
19
graphics/battle_anims/backgrounds/windstorm_brew.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
230 148 98
|
||||
255 255 222
|
||||
230 230 197
|
||||
213 205 172
|
||||
189 180 148
|
||||
172 156 123
|
||||
156 131 106
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
142 204 143
|
||||
123 180 122
|
||||
112 165 99
|
||||
89 130 87
|
||||
67 114 65
|
||||
55 91 56
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 358 B |
BIN
graphics/battle_anims/sprites/acupressure.png
Normal file
BIN
graphics/battle_anims/sprites/acupressure.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 310 B |
Binary file not shown.
|
Before Width: | Height: | Size: 298 B |
Binary file not shown.
|
Before Width: | Height: | Size: 510 B |
@ -112,35 +112,35 @@ $(TILESETGFXDIR)/secondary/sootopolis/tiles.4bpp: %.4bpp: %.png
|
||||
SOOTOPOLISANIMDIR := $(TILESETGFXDIR)/secondary/sootopolis/anim
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/0.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/0_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/0_groudon.4bpp
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/0_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/1.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/1_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/1_groudon.4bpp
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/1_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/2.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/2_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/2_groudon.4bpp
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/2_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/3.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/3_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/3_groudon.4bpp
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/3_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/4.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/4_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/4_groudon.4bpp
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/4_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/5.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/5_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/5_groudon.4bpp
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/5_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/6.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/6_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/6_groudon.4bpp
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/6_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/7.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/7_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/7_groudon.4bpp
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/7_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(TILESETGFXDIR)/secondary/battle_frontier_outside_west/tiles.4bpp: %.4bpp: %.png
|
||||
@ -690,7 +690,7 @@ $(OBJEVENTGFXDIR)/pics/effects/unknown_4F6D38/0.4bpp: %.4bpp: %.png
|
||||
|
||||
$(INTERFACEGFXDIR)/selector_outline.4bpp: %.4bpp: %.png
|
||||
$(GFX) $< $@ -num_tiles 8 -Wnum_tiles
|
||||
|
||||
|
||||
$(BATTRANSGFXDIR)/frontier_logo_center.4bpp: %.4bpp: %.png
|
||||
$(GFX) $< $@ -num_tiles 43 -Wnum_tiles
|
||||
|
||||
@ -718,7 +718,7 @@ $(PKNAVGFXDIR)/header.4bpp: %.4bpp: %.png
|
||||
|
||||
$(PKNAVGFXDIR)/device_outline.4bpp: %.4bpp: %.png
|
||||
$(GFX) $< $@ -num_tiles 53 -Wnum_tiles
|
||||
|
||||
|
||||
$(PKNAVGFXDIR)/match_call/ui.4bpp: %.4bpp: %.png
|
||||
$(GFX) $< $@ -num_tiles 13 -Wnum_tiles
|
||||
|
||||
|
||||
@ -246,6 +246,27 @@ struct AI_SavedBattleMon
|
||||
u16 species;
|
||||
};
|
||||
|
||||
struct AiPartyMon
|
||||
{
|
||||
u16 species;
|
||||
u16 item;
|
||||
u16 heldEffect;
|
||||
u16 ability;
|
||||
u16 gender;
|
||||
u16 level;
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
u32 status;
|
||||
bool8 isFainted;
|
||||
bool8 wasSentInBattle;
|
||||
u8 switchInCount; // Counts how many times this Pokemon has been sent out or switched into in a battle.
|
||||
};
|
||||
|
||||
struct AIPartyData // Opposing battlers - party mons.
|
||||
{
|
||||
struct AiPartyMon mons[2][PARTY_SIZE]; // 2 parties(player, opponent). Used to save information on opposing party.
|
||||
u8 count[2];
|
||||
};
|
||||
|
||||
struct AiLogicData
|
||||
{
|
||||
u16 abilities[MAX_BATTLERS_COUNT];
|
||||
@ -314,6 +335,7 @@ struct BattleResources
|
||||
struct StatsArray* beforeLvlUp;
|
||||
struct AI_ThinkingStruct *ai;
|
||||
struct AiLogicData *aiData;
|
||||
struct AIPartyData *aiParty;
|
||||
struct BattleHistory *battleHistory;
|
||||
u8 bufferA[MAX_BATTLERS_COUNT][0x200];
|
||||
u8 bufferB[MAX_BATTLERS_COUNT][0x200];
|
||||
@ -321,6 +343,7 @@ struct BattleResources
|
||||
|
||||
#define AI_THINKING_STRUCT ((struct AI_ThinkingStruct *)(gBattleResources->ai))
|
||||
#define AI_DATA ((struct AiLogicData *)(gBattleResources->aiData))
|
||||
#define AI_PARTY ((struct AIPartyData *)(gBattleResources->aiParty))
|
||||
#define BATTLE_HISTORY ((struct BattleHistory *)(gBattleResources->battleHistory))
|
||||
|
||||
struct BattleResults
|
||||
@ -623,6 +646,7 @@ struct BattleStruct
|
||||
// When using a move which hits multiple opponents which is then bounced by a target, we need to make sure, the move hits both opponents, the one with bounce, and the one without.
|
||||
u8 attackerBeforeBounce:2;
|
||||
u8 targetsDone[MAX_BATTLERS_COUNT]; // Each battler as a bit.
|
||||
u16 overwrittenAbilities[MAX_BATTLERS_COUNT]; // abilities overwritten during battle (keep separate from battle history in case of switching)
|
||||
};
|
||||
|
||||
#define F_DYNAMIC_TYPE_1 (1 << 6)
|
||||
|
||||
@ -24,6 +24,9 @@ void BattleAI_SetupItems(void);
|
||||
void BattleAI_SetupFlags(void);
|
||||
void BattleAI_SetupAIData(u8 defaultScoreMoves);
|
||||
u8 BattleAI_ChooseMoveOrAction(void);
|
||||
void Ai_InitPartyStruct(void);
|
||||
void Ai_UpdateSwitchInData(u32 battler);
|
||||
void Ai_UpdateFaintData(u32 battler);
|
||||
void GetAiLogicData(void);
|
||||
|
||||
extern u8 sBattler_AI;
|
||||
|
||||
@ -151,7 +151,7 @@ extern const u8 BattleScript_SandstreamActivates[];
|
||||
extern const u8 BattleScript_ShedSkinActivates[];
|
||||
extern const u8 BattleScript_WeatherFormChanges[];
|
||||
extern const u8 BattleScript_WeatherFormChangesLoop[];
|
||||
extern const u8 BattleScript_CastformChange[];
|
||||
extern const u8 BattleScript_WeatherFormChange[];
|
||||
extern const u8 BattleScript_IntimidateActivatesEnd3[];
|
||||
extern const u8 BattleScript_IntimidateActivates[];
|
||||
extern const u8 BattleScript_DroughtActivates[];
|
||||
@ -428,6 +428,7 @@ extern const u8 BattleScript_BeakBlastBurn[];
|
||||
extern const u8 BattleScript_DefDownSpeedUp[];
|
||||
extern const u8 BattleScript_AffectionBasedStatusHeal[];
|
||||
extern const u8 BattleScript_AffectionBasedEndurance[];
|
||||
extern const u8 BattleScript_SymbiosisActivates[];
|
||||
|
||||
// zmoves
|
||||
extern const u8 BattleScript_ZMoveActivateDamaging[];
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
#define ABILITYEFFECT_MOVE_END_ATTACKER 4
|
||||
#define ABILITYEFFECT_MOVE_END 5
|
||||
#define ABILITYEFFECT_IMMUNITY 6
|
||||
#define ABILITYEFFECT_FORECAST 7
|
||||
#define ABILITYEFFECT_WEATHER_FORM 7
|
||||
#define ABILITYEFFECT_SYNCHRONIZE 8
|
||||
#define ABILITYEFFECT_ATK_SYNCHRONIZE 9
|
||||
#define ABILITYEFFECT_INTIMIDATE1 10
|
||||
@ -114,6 +114,7 @@ bool8 HasNoMonsToSwitch(u8 battlerId, u8 r1, u8 r2);
|
||||
u8 TryWeatherFormChange(u8 battlerId);
|
||||
bool32 TryChangeBattleWeather(u8 battler, u32 weatherEnumId, bool32 viaAbility);
|
||||
u8 AbilityBattleEffects(u8 caseID, u8 battlerId, u16 ability, u8 special, u16 moveArg);
|
||||
bool32 IsNeutralizingGasOnField(void);
|
||||
u32 GetBattlerAbility(u8 battlerId);
|
||||
u32 IsAbilityOnSide(u32 battlerId, u32 ability);
|
||||
u32 IsAbilityOnOpposingSide(u32 battlerId, u32 ability);
|
||||
|
||||
@ -56,6 +56,7 @@
|
||||
#define AI_FLAG_STALL (1 << 13) // AI stalls battle and prefers secondary damage/trapping/etc. TODO not finished
|
||||
#define AI_FLAG_SCREENER (1 << 14) // AI prefers screening effects like reflect, mist, etc. TODO unfinished
|
||||
#define AI_FLAG_SMART_SWITCHING (1 << 15) // AI includes a lot more switching checks
|
||||
#define AI_FLAG_ACE_POKEMON (1 << 16) // AI has an Ace Pokemon. The last Pokemon in the party will not be used until it's the last one remaining.
|
||||
|
||||
// 'other' ai logic flags
|
||||
#define AI_FLAG_ROAMING (1 << 29)
|
||||
|
||||
@ -308,7 +308,7 @@
|
||||
#define ANIM_TAG_MEGA_PARTICLES (ANIM_SPRITES_START + 297)
|
||||
#define ANIM_TAG_TRUMP_CARD (ANIM_SPRITES_START + 298)
|
||||
#define ANIM_TAG_TRUMP_CARD_PARTICLES (ANIM_SPRITES_START + 299)
|
||||
#define ANIM_TAG_ACCUPRESSURE (ANIM_SPRITES_START + 300)
|
||||
#define ANIM_TAG_ACUPRESSURE (ANIM_SPRITES_START + 300)
|
||||
#define ANIM_TAG_WRING_OUT (ANIM_SPRITES_START + 301)
|
||||
#define ANIM_TAG_COLORED_ORBS (ANIM_SPRITES_START + 302)
|
||||
#define ANIM_TAG_WORRY_SEED (ANIM_SPRITES_START + 303)
|
||||
@ -334,68 +334,66 @@
|
||||
#define ANIM_TAG_BRINE (ANIM_SPRITES_START + 322)
|
||||
#define ANIM_TAG_GEAR (ANIM_SPRITES_START + 323)
|
||||
#define ANIM_TAG_ASSURANCE_HAND (ANIM_SPRITES_START + 324)
|
||||
#define ANIM_TAG_ACUPRESSURE_FINGER (ANIM_SPRITES_START + 325)
|
||||
#define ANIM_TAG_WISHIWASHI_FISH (ANIM_SPRITES_START + 326)
|
||||
#define ANIM_TAG_ZYGARDE_HEXES (ANIM_SPRITES_START + 327)
|
||||
#define ANIM_TAG_AURA_SPHERE (ANIM_SPRITES_START + 328)
|
||||
#define ANIM_TAG_OMEGA_STONE (ANIM_SPRITES_START + 329)
|
||||
#define ANIM_TAG_ALPHA_STONE (ANIM_SPRITES_START + 330)
|
||||
#define ANIM_TAG_BERRY_NORMAL (ANIM_SPRITES_START + 331)
|
||||
#define ANIM_TAG_BERRY_EATEN (ANIM_SPRITES_START + 332)
|
||||
#define ANIM_TAG_DRAGON_ASCENT (ANIM_SPRITES_START + 333)
|
||||
#define ANIM_TAG_PINK_DIAMOND (ANIM_SPRITES_START + 334)
|
||||
#define ANIM_TAG_STEAM_ERUPTION (ANIM_SPRITES_START + 335)
|
||||
#define ANIM_TAG_CONFIDE (ANIM_SPRITES_START + 336)
|
||||
#define ANIM_TAG_VERTICAL_HEX (ANIM_SPRITES_START + 337)
|
||||
#define ANIM_TAG_UNAVAILABLE_1 (ANIM_SPRITES_START + 338) //0x2862.. supposedly used elsewhere?
|
||||
#define ANIM_TAG_UNAVAILABLE_2 (ANIM_SPRITES_START + 339)
|
||||
#define ANIM_TAG_POWER_TRICK (ANIM_SPRITES_START + 340)
|
||||
#define ANIM_TAG_CHAIN_LINK (ANIM_SPRITES_START + 341)
|
||||
#define ANIM_TAG_ANCHOR (ANIM_SPRITES_START + 342)
|
||||
#define ANIM_TAG_HORSESHOE_SIDE_FIST (ANIM_SPRITES_START + 343)
|
||||
#define ANIM_TAG_DRAGON_ASCENT_FOE (ANIM_SPRITES_START + 344)
|
||||
#define ANIM_TAG_CRAFTY_SHIELD (ANIM_SPRITES_START + 345)
|
||||
#define ANIM_TAG_BLACEPHALON_HEAD (ANIM_SPRITES_START + 346)
|
||||
#define ANIM_TAG_FAIRY_LOCK_CHAINS (ANIM_SPRITES_START + 347)
|
||||
#define ANIM_TAG_IONS (ANIM_SPRITES_START + 348)
|
||||
#define ANIM_TAG_CHOP (ANIM_SPRITES_START + 349)
|
||||
#define ANIM_TAG_HEART_STAMP (ANIM_SPRITES_START + 350)
|
||||
#define ANIM_TAG_HORN_LEECH (ANIM_SPRITES_START + 351)
|
||||
#define ANIM_TAG_STEAMROLLER (ANIM_SPRITES_START + 352)
|
||||
#define ANIM_TAG_HOOPA_HAND (ANIM_SPRITES_START + 353)
|
||||
#define ANIM_TAG_HOOPA_RING (ANIM_SPRITES_START + 354)
|
||||
#define ANIM_TAG_METAL_BITS (ANIM_SPRITES_START + 355)
|
||||
#define ANIM_TAG_SMALL_ROCK (ANIM_SPRITES_START + 356)
|
||||
#define ANIM_TAG_SPIRIT_ARROW (ANIM_SPRITES_START + 357)
|
||||
#define ANIM_TAG_ULTRA_BURST_SYMBOL (ANIM_SPRITES_START + 358)
|
||||
#define ANIM_TAG_Z_MOVE_SYMBOL (ANIM_SPRITES_START + 359)
|
||||
#define ANIM_TAG_REALLY_BIG_ROCK (ANIM_SPRITES_START + 360)
|
||||
#define ANIM_TAG_COCOON (ANIM_SPRITES_START + 361)
|
||||
#define ANIM_TAG_CORKSCREW (ANIM_SPRITES_START + 362)
|
||||
#define ANIM_TAG_HAVOC_SPEAR (ANIM_SPRITES_START + 363)
|
||||
#define ANIM_TAG_PURPLE_DRAKE (ANIM_SPRITES_START + 364)
|
||||
#define ANIM_TAG_MUD_BOMB (ANIM_SPRITES_START + 365)
|
||||
#define ANIM_TAG_BRANCH (ANIM_SPRITES_START + 366)
|
||||
#define ANIM_TAG_APPLE (ANIM_SPRITES_START + 367)
|
||||
#define ANIM_TAG_OBSTRUCT_CROSS (ANIM_SPRITES_START + 368)
|
||||
#define ANIM_TAG_POISON_COLUMN (ANIM_SPRITES_START + 369)
|
||||
#define ANIM_TAG_GARBAGE_COLUMN (ANIM_SPRITES_START + 370)
|
||||
#define ANIM_TAG_LARGE_SPIKE (ANIM_SPRITES_START + 371)
|
||||
#define ANIM_TAG_DRAGON_PULSE_RING (ANIM_SPRITES_START + 372)
|
||||
#define ANIM_TAG_STONE_PILLAR (ANIM_SPRITES_START + 373)
|
||||
#define ANIM_TAG_MUSHROOM (ANIM_SPRITES_START + 374)
|
||||
#define ANIM_TAG_GOLDEN_APPLE (ANIM_SPRITES_START + 375)
|
||||
#define ANIM_TAG_ICE_ROCK (ANIM_SPRITES_START + 376)
|
||||
#define ANIM_TAG_TORNADO (ANIM_SPRITES_START + 377)
|
||||
#define ANIM_TAG_STRAIGHT_BEAM (ANIM_SPRITES_START + 378)
|
||||
#define ANIM_TAG_DREEPY (ANIM_SPRITES_START + 379)
|
||||
#define ANIM_TAG_ICE_ROCK_SINGLE (ANIM_SPRITES_START + 380)
|
||||
#define ANIM_TAG_STONE_PILLAR_MULTI (ANIM_SPRITES_START + 381)
|
||||
#define ANIM_TAG_ALPHA_SYMBOL (ANIM_SPRITES_START + 382)
|
||||
#define ANIM_TAG_OMEGA_SYMBOL (ANIM_SPRITES_START + 383)
|
||||
#define ANIM_TAG_PRIMAL_PARTICLES (ANIM_SPRITES_START + 384)
|
||||
#define ANIM_TAG_STEEL_BEAM (ANIM_SPRITES_START + 385)
|
||||
#define ANIM_TAG_POLTERGEIST (ANIM_SPRITES_START + 386)
|
||||
#define ANIM_TAG_WISHIWASHI_FISH (ANIM_SPRITES_START + 325)
|
||||
#define ANIM_TAG_ZYGARDE_HEXES (ANIM_SPRITES_START + 326)
|
||||
#define ANIM_TAG_AURA_SPHERE (ANIM_SPRITES_START + 327)
|
||||
#define ANIM_TAG_OMEGA_STONE (ANIM_SPRITES_START + 328)
|
||||
#define ANIM_TAG_ALPHA_STONE (ANIM_SPRITES_START + 329)
|
||||
#define ANIM_TAG_BERRY_NORMAL (ANIM_SPRITES_START + 330)
|
||||
#define ANIM_TAG_BERRY_EATEN (ANIM_SPRITES_START + 331)
|
||||
#define ANIM_TAG_DRAGON_ASCENT (ANIM_SPRITES_START + 332)
|
||||
#define ANIM_TAG_PINK_DIAMOND (ANIM_SPRITES_START + 333)
|
||||
#define ANIM_TAG_STEAM_ERUPTION (ANIM_SPRITES_START + 334)
|
||||
#define ANIM_TAG_CONFIDE (ANIM_SPRITES_START + 335)
|
||||
#define ANIM_TAG_VERTICAL_HEX (ANIM_SPRITES_START + 336)
|
||||
#define ANIM_TAG_UNAVAILABLE_1 (ANIM_SPRITES_START + 337) //0x2862.. supposedly used elsewhere?
|
||||
#define ANIM_TAG_UNAVAILABLE_2 (ANIM_SPRITES_START + 338)
|
||||
#define ANIM_TAG_POWER_TRICK (ANIM_SPRITES_START + 339)
|
||||
#define ANIM_TAG_CHAIN_LINK (ANIM_SPRITES_START + 340)
|
||||
#define ANIM_TAG_ANCHOR (ANIM_SPRITES_START + 341)
|
||||
#define ANIM_TAG_HORSESHOE_SIDE_FIST (ANIM_SPRITES_START + 342)
|
||||
#define ANIM_TAG_DRAGON_ASCENT_FOE (ANIM_SPRITES_START + 343)
|
||||
#define ANIM_TAG_CRAFTY_SHIELD (ANIM_SPRITES_START + 344)
|
||||
#define ANIM_TAG_BLACEPHALON_HEAD (ANIM_SPRITES_START + 345)
|
||||
#define ANIM_TAG_FAIRY_LOCK_CHAINS (ANIM_SPRITES_START + 346)
|
||||
#define ANIM_TAG_IONS (ANIM_SPRITES_START + 347)
|
||||
#define ANIM_TAG_CHOP (ANIM_SPRITES_START + 348)
|
||||
#define ANIM_TAG_HEART_STAMP (ANIM_SPRITES_START + 349)
|
||||
#define ANIM_TAG_HORN_LEECH (ANIM_SPRITES_START + 350)
|
||||
#define ANIM_TAG_STEAMROLLER (ANIM_SPRITES_START + 351)
|
||||
#define ANIM_TAG_HOOPA_HAND (ANIM_SPRITES_START + 352)
|
||||
#define ANIM_TAG_HOOPA_RING (ANIM_SPRITES_START + 353)
|
||||
#define ANIM_TAG_METAL_BITS (ANIM_SPRITES_START + 354)
|
||||
#define ANIM_TAG_SMALL_ROCK (ANIM_SPRITES_START + 355)
|
||||
#define ANIM_TAG_SPIRIT_ARROW (ANIM_SPRITES_START + 356)
|
||||
#define ANIM_TAG_ULTRA_BURST_SYMBOL (ANIM_SPRITES_START + 357)
|
||||
#define ANIM_TAG_Z_MOVE_SYMBOL (ANIM_SPRITES_START + 358)
|
||||
#define ANIM_TAG_REALLY_BIG_ROCK (ANIM_SPRITES_START + 359)
|
||||
#define ANIM_TAG_COCOON (ANIM_SPRITES_START + 360)
|
||||
#define ANIM_TAG_CORKSCREW (ANIM_SPRITES_START + 361)
|
||||
#define ANIM_TAG_HAVOC_SPEAR (ANIM_SPRITES_START + 362)
|
||||
#define ANIM_TAG_PURPLE_DRAKE (ANIM_SPRITES_START + 363)
|
||||
#define ANIM_TAG_MUD_BOMB (ANIM_SPRITES_START + 364)
|
||||
#define ANIM_TAG_BRANCH (ANIM_SPRITES_START + 365)
|
||||
#define ANIM_TAG_APPLE (ANIM_SPRITES_START + 366)
|
||||
#define ANIM_TAG_OBSTRUCT_CROSS (ANIM_SPRITES_START + 367)
|
||||
#define ANIM_TAG_POISON_COLUMN (ANIM_SPRITES_START + 368)
|
||||
#define ANIM_TAG_GARBAGE_COLUMN (ANIM_SPRITES_START + 369)
|
||||
#define ANIM_TAG_LARGE_SPIKE (ANIM_SPRITES_START + 370)
|
||||
#define ANIM_TAG_DRAGON_PULSE_RING (ANIM_SPRITES_START + 371)
|
||||
#define ANIM_TAG_STONE_PILLAR (ANIM_SPRITES_START + 372)
|
||||
#define ANIM_TAG_MUSHROOM (ANIM_SPRITES_START + 373)
|
||||
#define ANIM_TAG_GOLDEN_APPLE (ANIM_SPRITES_START + 374)
|
||||
#define ANIM_TAG_ICE_ROCK (ANIM_SPRITES_START + 375)
|
||||
#define ANIM_TAG_TORNADO (ANIM_SPRITES_START + 376)
|
||||
#define ANIM_TAG_STRAIGHT_BEAM (ANIM_SPRITES_START + 377)
|
||||
#define ANIM_TAG_DREEPY (ANIM_SPRITES_START + 378)
|
||||
#define ANIM_TAG_ICE_ROCK_SINGLE (ANIM_SPRITES_START + 379)
|
||||
#define ANIM_TAG_STONE_PILLAR_MULTI (ANIM_SPRITES_START + 380)
|
||||
#define ANIM_TAG_ALPHA_SYMBOL (ANIM_SPRITES_START + 381)
|
||||
#define ANIM_TAG_OMEGA_SYMBOL (ANIM_SPRITES_START + 382)
|
||||
#define ANIM_TAG_STEEL_BEAM (ANIM_SPRITES_START + 383)
|
||||
#define ANIM_TAG_POLTERGEIST (ANIM_SPRITES_START + 384)
|
||||
|
||||
// battlers
|
||||
#define ANIM_ATTACKER 0
|
||||
@ -462,7 +460,7 @@
|
||||
#define BG_WATER_2 41
|
||||
#define BG_POISON 42
|
||||
#define BG_AEROBLAST 43
|
||||
#define BG_HURRICANE 44
|
||||
#define BG_HURRICANE 44
|
||||
#define BG_ELECTRIC_TERRAIN 45
|
||||
#define BG_GRASSY_TERRAIN 46
|
||||
#define BG_MISTY_TERRAIN 47
|
||||
|
||||
@ -86,6 +86,7 @@
|
||||
#define B_HEAL_BLOCKING GEN_LATEST // In Gen5+, Heal Block prevents healing by Black Sludge, Leftovers, Shell Bell. Affected Pokémon will not consume held HP-restoring Berries or Berry Juice.
|
||||
// Draining abilities will not heal but will prevent damage. In Gen6+, Heal Block prevents the use of most HP-draining moves.
|
||||
#define B_ROOTED_GROUNDING GEN_LATEST // In Gen4+, Ingrain causes the affected Pokémon to become grounded.
|
||||
#define B_METRONOME_MOVES GEN_LATEST // This config will determine up to which generation will Metronome pull moves from.
|
||||
#define B_TELEPORT_BEHAVIOR GEN_LATEST // In Gen7+, starting with Pokémon LGPE, Teleport allows the user to swap out with another party member.
|
||||
|
||||
// Ability settings
|
||||
@ -102,6 +103,8 @@
|
||||
#define B_OBLIVIOUS_TAUNT GEN_LATEST // In Gen6+, Pokémon with Oblivious can't be taunted.
|
||||
#define B_STURDY GEN_LATEST // In Gen5+, Sturdy causes the Pokémon to have 1 HP remaining if another Pokémon's attack or confusion damage would have brought it from full health to 0 HP.
|
||||
#define B_PLUS_MINUS_INTERACTION GEN_LATEST // In Gen5+, Plus and Minus can be activated with themselves and the opposite ability. Before, only the opposing ability could activate it.
|
||||
#define B_WEATHER_FORMS GEN_LATEST // In Gen5+, Castform and Cherrim revert to their base form upon losing their respective ability. Cherrim needs Flower Gift to swap forms.
|
||||
#define B_SYMBIOSIS_GEMS GEN_LATEST // In Gen7+, Symbiosis passes an item after a gem-boosted attack. Previously, items are passed before the gem-boosted attack hits, making the item effect apply.
|
||||
|
||||
// Item settings
|
||||
#define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore hp activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn.
|
||||
@ -130,6 +133,8 @@
|
||||
#define B_FLAG_INVERSE_BATTLE 0 // If this flag is set, the battle's type effectiveness are inversed. For example, fire is super effective against water.
|
||||
#define B_FLAG_FORCE_DOUBLE_WILD 0 // If this flag is set, all land and surfing wild battles will be double battles.
|
||||
#define B_SMART_WILD_AI_FLAG 0 // If not 0, you can set this flag in a script to enable smart wild pokemon
|
||||
#define B_FLAG_NO_BAG_USE 0 // If this flag is set, the ability to use the bag in battle is disabled.
|
||||
#define B_FLAG_NO_CATCHING 0 // If this flag is set, the ability to catch wild Pokémon is disabled.
|
||||
|
||||
// Var Settings
|
||||
// To use the following features in scripting, replace the 0s with the var ID you're assigning it to.
|
||||
|
||||
@ -242,8 +242,9 @@
|
||||
#define VARIOUS_SET_BEAK_BLAST 151
|
||||
#define VARIOUS_SWAP_SIDE_STATUSES 152
|
||||
#define VARIOUS_SET_Z_EFFECT 153
|
||||
#define VARIOUS_CAN_TELEPORT 154
|
||||
#define VARIOUS_GET_BATTLER_SIDE 155
|
||||
#define VARIOUS_TRY_SYMBIOSIS 154
|
||||
#define VARIOUS_CAN_TELEPORT 155
|
||||
#define VARIOUS_GET_BATTLER_SIDE 156
|
||||
|
||||
// Cmd_manipulatedamage
|
||||
#define DMG_CHANGE_SIGN 0
|
||||
@ -313,8 +314,10 @@
|
||||
#define MOVEEND_PICKPOCKET 27
|
||||
#define MOVEEND_DANCER 28
|
||||
#define MOVEEND_EMERGENCY_EXIT 29
|
||||
#define MOVEEND_CLEAR_BITS 30
|
||||
#define MOVEEND_COUNT 31
|
||||
#define MOVEEND_WEATHER_FORM 30
|
||||
#define MOVEEND_SYMBIOSIS 31
|
||||
#define MOVEEND_CLEAR_BITS 32
|
||||
#define MOVEEND_COUNT 33
|
||||
|
||||
// switch cases
|
||||
#define B_SWITCH_NORMAL 0
|
||||
|
||||
@ -379,7 +379,7 @@
|
||||
#define STRINGID_PKMNBOXLANETTESPCFULL 378
|
||||
#define STRINGID_TRAINER1WINTEXT 379
|
||||
#define STRINGID_TRAINER2WINTEXT 380
|
||||
|
||||
|
||||
#define STRINGID_ENDUREDSTURDY 381
|
||||
#define STRINGID_POWERHERB 382
|
||||
#define STRINGID_HURTBYITEM 383
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define GUARD_CONSTANTS_GLOBAL_H
|
||||
|
||||
#include "constants/battle_config.h"
|
||||
#include "constants/overworld_config.h"
|
||||
|
||||
// Invalid Versions show as "----------" in Gen 4 and Gen 5's summary screen.
|
||||
// In Gens 6 and 7, invalid versions instead show "a distant land" in the summary screen.
|
||||
|
||||
18
include/constants/overworld_config.h
Normal file
18
include/constants/overworld_config.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef GUARD_CONSTANTS_OVERWORLD_CONFIG_H
|
||||
#define GUARD_CONSTANTS_OVERWORLD_CONFIG_H
|
||||
|
||||
// Overworld flags
|
||||
#define OW_FLAG_NO_ENCOUNTER 0 // If this flag is set, wild encounters will be disabled.
|
||||
#define OW_FLAG_NO_TRAINER_SEE 0 // If this flag is set, trainers will not battle the player unless they're talked to.
|
||||
|
||||
// Debug options
|
||||
#define DEBUG_SYSTEM_ENABLE TRUE // Enables a overworld debug menu for changing flags, variables, giving pokemon and more, accessed by holding R and pressing START while in the overworld by default.
|
||||
#define DEBUG_SYSTEM_HELD_KEYS (R_BUTTON) // The keys required to be held to open the debug menu.
|
||||
#define DEBUG_SYSTEM_TRIGGER_EVENT pressedStartButton // The event that opens the menu when holding the key(s) defined in DEBUG_SYSTEM_HELD_KEYS.
|
||||
#define DEBUG_SYSTEM_IN_MENU FALSE // Replaces the overworld debug menu button combination with a start menu entry (above Pokédex).
|
||||
|
||||
// Replace the used flags with others or disable with a 0
|
||||
#define DEBUG_FLAG_NO_COLLISION 0 // If this flag is set, the debug function in the Utility submenu to disable player collision can be used.
|
||||
#define DEBUG_FLAG_PC_FROM_DEBUG_MENU 0 // If this flag is set, the debug function in debug menu to access the player PC works.
|
||||
|
||||
#endif // GUARD_CONSTANTS_OVERWORLD_CONFIG_H
|
||||
@ -322,11 +322,8 @@
|
||||
#define FORM_ITEM_USE 2
|
||||
#define FORM_MOVE 3
|
||||
#define FORM_WITHDRAW 4
|
||||
#define FORM_ITEM_HOLD_ABILITY 5
|
||||
#define FORM_ITEM_USE_TIME 6
|
||||
|
||||
#define NUM_MALE_LINK_FACILITY_CLASSES 8
|
||||
#define NUM_FEMALE_LINK_FACILITY_CLASSES 8
|
||||
#define FORM_BATTLE_BEGIN 5
|
||||
#define FORM_BATTLE_END 6
|
||||
|
||||
#define MON_PIC_WIDTH 64
|
||||
#define MON_PIC_HEIGHT 64
|
||||
|
||||
@ -276,8 +276,10 @@
|
||||
#define SE_PIKE_CURTAIN_CLOSE 267 // SE_CURTAIN
|
||||
#define SE_PIKE_CURTAIN_OPEN 268 // SE_CURTAIN1
|
||||
#define SE_SUDOWOODO_SHAKE 269 // SE_USSOKI
|
||||
#define END_SE SE_SUDOWOODO_SHAKE
|
||||
|
||||
// Music
|
||||
#define START_MUS 350
|
||||
#define MUS_LITTLEROOT_TEST 350 // MUS_TETSUJI
|
||||
#define MUS_GSC_ROUTE38 351 // MUS_FIELD13
|
||||
#define MUS_CAUGHT 352 // MUS_KACHI22
|
||||
@ -488,6 +490,7 @@
|
||||
#define MUS_RG_TRAINER_TOWER 556 // MUS_RG_T_TOWER
|
||||
#define MUS_RG_SLOW_PALLET 557 // MUS_RG_SLOWMASARA
|
||||
#define MUS_RG_TEACHY_TV_MENU 558 // MUS_RG_TVNOIZE
|
||||
#define END_MUS MUS_RG_TEACHY_TV_MENU
|
||||
|
||||
#define PH_TRAP_BLEND 559
|
||||
#define PH_TRAP_HELD 560
|
||||
|
||||
@ -13,6 +13,10 @@
|
||||
|
||||
#define UNION_ROOM_MAX_LEVEL 30
|
||||
|
||||
// The number of possible trainer classes for a trainer of a given gender in the Union Room.
|
||||
// This value is necessarily a power of 2 because of the way it's treated in GetUnionRoomTrainerPic / GetUnionRoomTrainerClass
|
||||
#define NUM_UNION_ROOM_CLASSES (1 << 3) // 8
|
||||
|
||||
#define ACTIVITY_NONE 0
|
||||
#define ACTIVITY_BATTLE_SINGLE 1
|
||||
#define ACTIVITY_BATTLE_DOUBLE 2
|
||||
|
||||
@ -46,235 +46,235 @@
|
||||
#define VAR_OBJ_GFX_ID_F 0x401F
|
||||
|
||||
// general purpose vars
|
||||
#define VAR_RECYCLE_GOODS 0x4020
|
||||
#define VAR_REPEL_STEP_COUNT 0x4021
|
||||
#define VAR_ICE_STEP_COUNT 0x4022
|
||||
#define VAR_STARTER_MON 0x4023 // 0=Treecko, 1=Torchic, 2=Mudkip
|
||||
#define VAR_MIRAGE_RND_H 0x4024
|
||||
#define VAR_MIRAGE_RND_L 0x4025
|
||||
#define VAR_SECRET_BASE_MAP 0x4026
|
||||
#define VAR_CYCLING_ROAD_RECORD_COLLISIONS 0x4027
|
||||
#define VAR_CYCLING_ROAD_RECORD_TIME_L 0x4028
|
||||
#define VAR_CYCLING_ROAD_RECORD_TIME_H 0x4029
|
||||
#define VAR_FRIENDSHIP_STEP_COUNTER 0x402A
|
||||
#define VAR_POISON_STEP_COUNTER 0x402B
|
||||
#define VAR_RESET_RTC_ENABLE 0x402C
|
||||
#define VAR_ENIGMA_BERRY_AVAILABLE 0x402D
|
||||
#define VAR_WONDER_NEWS_COUNTER 0x402E
|
||||
#define VAR_RECYCLE_GOODS 0x4020
|
||||
#define VAR_REPEL_STEP_COUNT 0x4021
|
||||
#define VAR_ICE_STEP_COUNT 0x4022
|
||||
#define VAR_STARTER_MON 0x4023 // 0=Treecko, 1=Torchic, 2=Mudkip
|
||||
#define VAR_MIRAGE_RND_H 0x4024
|
||||
#define VAR_MIRAGE_RND_L 0x4025
|
||||
#define VAR_SECRET_BASE_MAP 0x4026
|
||||
#define VAR_CYCLING_ROAD_RECORD_COLLISIONS 0x4027
|
||||
#define VAR_CYCLING_ROAD_RECORD_TIME_L 0x4028
|
||||
#define VAR_CYCLING_ROAD_RECORD_TIME_H 0x4029
|
||||
#define VAR_FRIENDSHIP_STEP_COUNTER 0x402A
|
||||
#define VAR_POISON_STEP_COUNTER 0x402B
|
||||
#define VAR_RESET_RTC_ENABLE 0x402C
|
||||
#define VAR_ENIGMA_BERRY_AVAILABLE 0x402D
|
||||
#define VAR_WONDER_NEWS_COUNTER 0x402E
|
||||
|
||||
#define VAR_FRONTIER_MANIAC_FACILITY 0x402F
|
||||
#define VAR_FRONTIER_GAMBLER_CHALLENGE 0x4030
|
||||
#define VAR_FRONTIER_GAMBLER_SET_CHALLENGE 0x4031
|
||||
#define VAR_FRONTIER_GAMBLER_AMOUNT_BET 0x4032
|
||||
#define VAR_FRONTIER_GAMBLER_STATE 0x4033
|
||||
#define VAR_FRONTIER_MANIAC_FACILITY 0x402F
|
||||
#define VAR_FRONTIER_GAMBLER_CHALLENGE 0x4030
|
||||
#define VAR_FRONTIER_GAMBLER_SET_CHALLENGE 0x4031
|
||||
#define VAR_FRONTIER_GAMBLER_AMOUNT_BET 0x4032
|
||||
#define VAR_FRONTIER_GAMBLER_STATE 0x4033
|
||||
|
||||
#define VAR_DEOXYS_ROCK_STEP_COUNT 0x4034
|
||||
#define VAR_DEOXYS_ROCK_LEVEL 0x4035
|
||||
#define VAR_PC_BOX_TO_SEND_MON 0x4036
|
||||
#define VAR_ABNORMAL_WEATHER_LOCATION 0x4037
|
||||
#define VAR_ABNORMAL_WEATHER_STEP_COUNTER 0x4038
|
||||
#define VAR_SHOULD_END_ABNORMAL_WEATHER 0x4039
|
||||
#define VAR_FARAWAY_ISLAND_STEP_COUNTER 0x403A
|
||||
#define VAR_REGICE_STEPS_1 0x403B
|
||||
#define VAR_REGICE_STEPS_2 0x403C
|
||||
#define VAR_REGICE_STEPS_3 0x403D
|
||||
#define VAR_ALTERING_CAVE_WILD_SET 0x403E
|
||||
#define VAR_DISTRIBUTE_EON_TICKET 0x403F // This var is read and written, but is always zero. The only way to obtain the Eon Ticket in Emerald is via Record Mixing
|
||||
#define VAR_DAYS 0x4040
|
||||
#define VAR_FANCLUB_FAN_COUNTER 0x4041
|
||||
#define VAR_FANCLUB_LOSE_FAN_TIMER 0x4042
|
||||
#define VAR_DEPT_STORE_FLOOR 0x4043
|
||||
#define VAR_TRICK_HOUSE_LEVEL 0x4044
|
||||
#define VAR_POKELOT_PRIZE_ITEM 0x4045
|
||||
#define VAR_NATIONAL_DEX 0x4046
|
||||
#define VAR_SEEDOT_SIZE_RECORD 0x4047
|
||||
#define VAR_ASH_GATHER_COUNT 0x4048
|
||||
#define VAR_BIRCH_STATE 0x4049
|
||||
#define VAR_CRUISE_STEP_COUNT 0x404A
|
||||
#define VAR_POKELOT_RND1 0x404B
|
||||
#define VAR_POKELOT_RND2 0x404C
|
||||
#define VAR_POKELOT_PRIZE_PLACE 0x404D
|
||||
#define VAR_UNUSED_0x404E 0x404E // Unused Var
|
||||
#define VAR_LOTAD_SIZE_RECORD 0x404F
|
||||
#define VAR_LITTLEROOT_TOWN_STATE 0x4050
|
||||
#define VAR_OLDALE_TOWN_STATE 0x4051
|
||||
#define VAR_DEWFORD_TOWN_STATE 0x4052 // Unused Var
|
||||
#define VAR_LAVARIDGE_TOWN_STATE 0x4053
|
||||
#define VAR_CURRENT_SECRET_BASE 0x4054 // was probably allocated for VAR_FALLARBOR_TOWN_STATE at one point
|
||||
#define VAR_VERDANTURF_TOWN_STATE 0x4055 // Unused Var
|
||||
#define VAR_PACIFIDLOG_TOWN_STATE 0x4056 // Unused Var
|
||||
#define VAR_PETALBURG_CITY_STATE 0x4057
|
||||
#define VAR_SLATEPORT_CITY_STATE 0x4058
|
||||
#define VAR_MAUVILLE_CITY_STATE 0x4059 // Unused Var
|
||||
#define VAR_RUSTBORO_CITY_STATE 0x405A
|
||||
#define VAR_FORTREE_CITY_STATE 0x405B // Unused Var
|
||||
#define VAR_LILYCOVE_CITY_STATE 0x405C // Unused Var
|
||||
#define VAR_MOSSDEEP_CITY_STATE 0x405D
|
||||
#define VAR_SOOTOPOLIS_CITY_STATE 0x405E
|
||||
#define VAR_EVER_GRANDE_CITY_STATE 0x405F // Unused Var
|
||||
#define VAR_ROUTE101_STATE 0x4060
|
||||
#define VAR_ROUTE102_STATE 0x4061 // Unused Var
|
||||
#define VAR_ROUTE103_STATE 0x4062 // Unused Var
|
||||
#define VAR_ROUTE104_STATE 0x4063
|
||||
#define VAR_ROUTE105_STATE 0x4064 // Unused Var
|
||||
#define VAR_ROUTE106_STATE 0x4065 // Unused Var
|
||||
#define VAR_ROUTE107_STATE 0x4066 // Unused Var
|
||||
#define VAR_ROUTE108_STATE 0x4067 // Unused Var
|
||||
#define VAR_ROUTE109_STATE 0x4068 // Unused Var
|
||||
#define VAR_ROUTE110_STATE 0x4069
|
||||
#define VAR_ROUTE111_STATE 0x406A // Unused Var
|
||||
#define VAR_ROUTE112_STATE 0x406B // Unused Var
|
||||
#define VAR_ROUTE113_STATE 0x406C // Unused Var
|
||||
#define VAR_ROUTE114_STATE 0x406D // Unused Var
|
||||
#define VAR_ROUTE115_STATE 0x406E // Unused Var
|
||||
#define VAR_ROUTE116_STATE 0x406F
|
||||
#define VAR_ROUTE117_STATE 0x4070 // Unused Var
|
||||
#define VAR_ROUTE118_STATE 0x4071
|
||||
#define VAR_ROUTE119_STATE 0x4072
|
||||
#define VAR_ROUTE120_STATE 0x4073 // Unused Var
|
||||
#define VAR_ROUTE121_STATE 0x4074
|
||||
#define VAR_ROUTE122_STATE 0x4075 // Unused Var
|
||||
#define VAR_ROUTE123_STATE 0x4076 // Unused Var
|
||||
#define VAR_ROUTE124_STATE 0x4077 // Unused Var
|
||||
#define VAR_ROUTE125_STATE 0x4078 // Unused Var
|
||||
#define VAR_ROUTE126_STATE 0x4079 // Unused Var
|
||||
#define VAR_ROUTE127_STATE 0x407A // Unused Var
|
||||
#define VAR_ROUTE128_STATE 0x407B
|
||||
#define VAR_ROUTE129_STATE 0x407C // Unused Var
|
||||
#define VAR_ROUTE130_STATE 0x407D // Unused Var
|
||||
#define VAR_ROUTE131_STATE 0x407E // Unused Var
|
||||
#define VAR_ROUTE132_STATE 0x407F // Unused Var
|
||||
#define VAR_ROUTE133_STATE 0x4080 // Unused Var
|
||||
#define VAR_ROUTE134_STATE 0x4081 // Unused Var
|
||||
#define VAR_LITTLEROOT_HOUSES_STATE_MAY 0x4082
|
||||
#define VAR_UNUSED_0x4083 0x4083 // Unused Var
|
||||
#define VAR_BIRCH_LAB_STATE 0x4084
|
||||
#define VAR_PETALBURG_GYM_STATE 0x4085 // 0-1: Wally tutorial, 2-6: 0-4 badges, 7: Defeated Norman, 8: Rematch Norman
|
||||
#define VAR_CONTEST_HALL_STATE 0x4086
|
||||
#define VAR_CABLE_CLUB_STATE 0x4087
|
||||
#define VAR_CONTEST_TYPE 0x4088
|
||||
#define VAR_SECRET_BASE_INITIALIZED 0x4089
|
||||
#define VAR_CONTEST_PRIZE_PICKUP 0x408A
|
||||
#define VAR_UNUSED_0x408B 0x408B // Unused Var
|
||||
#define VAR_LITTLEROOT_HOUSES_STATE_BRENDAN 0x408C
|
||||
#define VAR_LITTLEROOT_RIVAL_STATE 0x408D
|
||||
#define VAR_BOARD_BRINEY_BOAT_STATE 0x408E
|
||||
#define VAR_DEVON_CORP_3F_STATE 0x408F
|
||||
#define VAR_BRINEY_HOUSE_STATE 0x4090
|
||||
#define VAR_UNUSED_0x4091 0x4091 // Unused Var
|
||||
#define VAR_LITTLEROOT_INTRO_STATE 0x4092
|
||||
#define VAR_MAUVILLE_GYM_STATE 0x4093
|
||||
#define VAR_LILYCOVE_MUSEUM_2F_STATE 0x4094
|
||||
#define VAR_LILYCOVE_FAN_CLUB_STATE 0x4095
|
||||
#define VAR_BRINEY_LOCATION 0x4096
|
||||
#define VAR_INIT_SECRET_BASE 0x4097
|
||||
#define VAR_PETALBURG_WOODS_STATE 0x4098
|
||||
#define VAR_LILYCOVE_CONTEST_LOBBY_STATE 0x4099
|
||||
#define VAR_RUSTURF_TUNNEL_STATE 0x409A
|
||||
#define VAR_UNUSED_0x409B 0x409B // Unused Var
|
||||
#define VAR_ELITE_4_STATE 0x409C
|
||||
#define VAR_UNUSED_0x409D 0x409D // Unused Var
|
||||
#define VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE 0x409E
|
||||
#define VAR_MOSSDEEP_SPACE_CENTER_STATE 0x409F
|
||||
#define VAR_SLATEPORT_HARBOR_STATE 0x40A0
|
||||
#define VAR_UNUSED_0x40A1 0x40A1 // Unused var
|
||||
#define VAR_SEAFLOOR_CAVERN_STATE 0x40A2
|
||||
#define VAR_CABLE_CAR_STATION_STATE 0x40A3
|
||||
#define VAR_SAFARI_ZONE_STATE 0x40A4 // 0: In or out of SZ, 1: Player exiting SZ, 2: Player entering SZ
|
||||
#define VAR_TRICK_HOUSE_BEING_WATCHED_STATE 0x40A5
|
||||
#define VAR_TRICK_HOUSE_FOUND_TRICK_MASTER 0x40A6
|
||||
#define VAR_TRICK_HOUSE_ENTRANCE_STATE 0x40A7
|
||||
#define VAR_UNUSED_0x40A8 0x40A8 // Unused Var
|
||||
#define VAR_CYCLING_CHALLENGE_STATE 0x40A9
|
||||
#define VAR_SLATEPORT_MUSEUM_1F_STATE 0x40AA
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_1_STATE 0x40AB
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_2_STATE 0x40AC
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_3_STATE 0x40AD
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_4_STATE 0x40AE
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_5_STATE 0x40AF
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_6_STATE 0x40B0
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_7_STATE 0x40B1
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_8_STATE 0x40B2
|
||||
#define VAR_WEATHER_INSTITUTE_STATE 0x40B3
|
||||
#define VAR_SS_TIDAL_STATE 0x40B4
|
||||
#define VAR_TRICK_HOUSE_ENTER_FROM_CORRIDOR 0x40B5
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_7_STATE_2 0x40B6 // Leftover from RS, never set
|
||||
#define VAR_SLATEPORT_FAN_CLUB_STATE 0x40B7
|
||||
#define VAR_UNUSED_0x40B8 0x40B8 // Unused Var
|
||||
#define VAR_MT_PYRE_STATE 0x40B9
|
||||
#define VAR_NEW_MAUVILLE_STATE 0x40BA
|
||||
#define VAR_UNUSED_0x40BB 0x40BB // Unused Var
|
||||
#define VAR_BRAVO_TRAINER_BATTLE_TOWER_ON 0x40BC
|
||||
#define VAR_JAGGED_PASS_ASH_WEATHER 0x40BD
|
||||
#define VAR_GLASS_WORKSHOP_STATE 0x40BE
|
||||
#define VAR_METEOR_FALLS_STATE 0x40BF
|
||||
#define VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE 0x40C0
|
||||
#define VAR_TRICK_HOUSE_PRIZE_PICKUP 0x40C1
|
||||
#define VAR_PACIFIDLOG_TM_RECEIVED_DAY 0x40C2
|
||||
#define VAR_VICTORY_ROAD_1F_STATE 0x40C3
|
||||
#define VAR_FOSSIL_RESURRECTION_STATE 0x40C4
|
||||
#define VAR_WHICH_FOSSIL_REVIVED 0x40C5
|
||||
#define VAR_STEVENS_HOUSE_STATE 0x40C6
|
||||
#define VAR_OLDALE_RIVAL_STATE 0x40C7
|
||||
#define VAR_JAGGED_PASS_STATE 0x40C8
|
||||
#define VAR_SCOTT_PETALBURG_ENCOUNTER 0x40C9
|
||||
#define VAR_SKY_PILLAR_STATE 0x40CA
|
||||
#define VAR_MIRAGE_TOWER_STATE 0x40CB
|
||||
#define VAR_FOSSIL_MANIAC_STATE 0x40CC
|
||||
#define VAR_CABLE_CLUB_TUTORIAL_STATE 0x40CD
|
||||
#define VAR_FRONTIER_BATTLE_MODE 0x40CE
|
||||
#define VAR_FRONTIER_FACILITY 0x40CF
|
||||
#define VAR_HAS_ENTERED_BATTLE_FRONTIER 0x40D0 // Var is used like a flag.
|
||||
#define VAR_SCOTT_STATE 0x40D1
|
||||
#define VAR_SLATEPORT_OUTSIDE_MUSEUM_STATE 0x40D2
|
||||
#define VAR_DEX_UPGRADE_JOHTO_STARTER_STATE 0x40D3
|
||||
#define VAR_SS_TIDAL_SCOTT_STATE 0x40D4 // Always equal to FLAG_MET_SCOTT_ON_SS_TIDAL
|
||||
#define VAR_ROAMER_POKEMON 0x40D5 // 0 = Latias, 1 = Latios
|
||||
#define VAR_TRAINER_HILL_IS_ACTIVE 0x40D6
|
||||
#define VAR_SKY_PILLAR_RAQUAZA_CRY_DONE 0x40D7
|
||||
#define VAR_SOOTOPOLIS_WALLACE_STATE 0x40D8
|
||||
#define VAR_DEOXYS_ROCK_STEP_COUNT 0x4034
|
||||
#define VAR_DEOXYS_ROCK_LEVEL 0x4035
|
||||
#define VAR_PC_BOX_TO_SEND_MON 0x4036
|
||||
#define VAR_ABNORMAL_WEATHER_LOCATION 0x4037
|
||||
#define VAR_ABNORMAL_WEATHER_STEP_COUNTER 0x4038
|
||||
#define VAR_SHOULD_END_ABNORMAL_WEATHER 0x4039
|
||||
#define VAR_FARAWAY_ISLAND_STEP_COUNTER 0x403A
|
||||
#define VAR_REGICE_STEPS_1 0x403B
|
||||
#define VAR_REGICE_STEPS_2 0x403C
|
||||
#define VAR_REGICE_STEPS_3 0x403D
|
||||
#define VAR_ALTERING_CAVE_WILD_SET 0x403E
|
||||
#define VAR_DISTRIBUTE_EON_TICKET 0x403F // This var is read and written, but is always zero. The only way to obtain the Eon Ticket in Emerald is via Record Mixing
|
||||
#define VAR_DAYS 0x4040
|
||||
#define VAR_FANCLUB_FAN_COUNTER 0x4041
|
||||
#define VAR_FANCLUB_LOSE_FAN_TIMER 0x4042
|
||||
#define VAR_DEPT_STORE_FLOOR 0x4043
|
||||
#define VAR_TRICK_HOUSE_LEVEL 0x4044
|
||||
#define VAR_POKELOT_PRIZE_ITEM 0x4045
|
||||
#define VAR_NATIONAL_DEX 0x4046
|
||||
#define VAR_SEEDOT_SIZE_RECORD 0x4047
|
||||
#define VAR_ASH_GATHER_COUNT 0x4048
|
||||
#define VAR_BIRCH_STATE 0x4049
|
||||
#define VAR_CRUISE_STEP_COUNT 0x404A
|
||||
#define VAR_POKELOT_RND1 0x404B
|
||||
#define VAR_POKELOT_RND2 0x404C
|
||||
#define VAR_POKELOT_PRIZE_PLACE 0x404D
|
||||
#define VAR_UNUSED_0x404E 0x404E // Unused Var
|
||||
#define VAR_LOTAD_SIZE_RECORD 0x404F
|
||||
#define VAR_LITTLEROOT_TOWN_STATE 0x4050
|
||||
#define VAR_OLDALE_TOWN_STATE 0x4051
|
||||
#define VAR_DEWFORD_TOWN_STATE 0x4052 // Unused Var
|
||||
#define VAR_LAVARIDGE_TOWN_STATE 0x4053
|
||||
#define VAR_CURRENT_SECRET_BASE 0x4054 // was probably allocated for VAR_FALLARBOR_TOWN_STATE at one point
|
||||
#define VAR_VERDANTURF_TOWN_STATE 0x4055 // Unused Var
|
||||
#define VAR_PACIFIDLOG_TOWN_STATE 0x4056 // Unused Var
|
||||
#define VAR_PETALBURG_CITY_STATE 0x4057
|
||||
#define VAR_SLATEPORT_CITY_STATE 0x4058
|
||||
#define VAR_MAUVILLE_CITY_STATE 0x4059 // Unused Var
|
||||
#define VAR_RUSTBORO_CITY_STATE 0x405A
|
||||
#define VAR_FORTREE_CITY_STATE 0x405B // Unused Var
|
||||
#define VAR_LILYCOVE_CITY_STATE 0x405C // Unused Var
|
||||
#define VAR_MOSSDEEP_CITY_STATE 0x405D
|
||||
#define VAR_SOOTOPOLIS_CITY_STATE 0x405E
|
||||
#define VAR_EVER_GRANDE_CITY_STATE 0x405F // Unused Var
|
||||
#define VAR_ROUTE101_STATE 0x4060
|
||||
#define VAR_ROUTE102_STATE 0x4061 // Unused Var
|
||||
#define VAR_ROUTE103_STATE 0x4062 // Unused Var
|
||||
#define VAR_ROUTE104_STATE 0x4063
|
||||
#define VAR_ROUTE105_STATE 0x4064 // Unused Var
|
||||
#define VAR_ROUTE106_STATE 0x4065 // Unused Var
|
||||
#define VAR_ROUTE107_STATE 0x4066 // Unused Var
|
||||
#define VAR_ROUTE108_STATE 0x4067 // Unused Var
|
||||
#define VAR_ROUTE109_STATE 0x4068 // Unused Var
|
||||
#define VAR_ROUTE110_STATE 0x4069
|
||||
#define VAR_ROUTE111_STATE 0x406A // Unused Var
|
||||
#define VAR_ROUTE112_STATE 0x406B // Unused Var
|
||||
#define VAR_ROUTE113_STATE 0x406C // Unused Var
|
||||
#define VAR_ROUTE114_STATE 0x406D // Unused Var
|
||||
#define VAR_ROUTE115_STATE 0x406E // Unused Var
|
||||
#define VAR_ROUTE116_STATE 0x406F
|
||||
#define VAR_ROUTE117_STATE 0x4070 // Unused Var
|
||||
#define VAR_ROUTE118_STATE 0x4071
|
||||
#define VAR_ROUTE119_STATE 0x4072
|
||||
#define VAR_ROUTE120_STATE 0x4073 // Unused Var
|
||||
#define VAR_ROUTE121_STATE 0x4074
|
||||
#define VAR_ROUTE122_STATE 0x4075 // Unused Var
|
||||
#define VAR_ROUTE123_STATE 0x4076 // Unused Var
|
||||
#define VAR_ROUTE124_STATE 0x4077 // Unused Var
|
||||
#define VAR_ROUTE125_STATE 0x4078 // Unused Var
|
||||
#define VAR_ROUTE126_STATE 0x4079 // Unused Var
|
||||
#define VAR_ROUTE127_STATE 0x407A // Unused Var
|
||||
#define VAR_ROUTE128_STATE 0x407B
|
||||
#define VAR_ROUTE129_STATE 0x407C // Unused Var
|
||||
#define VAR_ROUTE130_STATE 0x407D // Unused Var
|
||||
#define VAR_ROUTE131_STATE 0x407E // Unused Var
|
||||
#define VAR_ROUTE132_STATE 0x407F // Unused Var
|
||||
#define VAR_ROUTE133_STATE 0x4080 // Unused Var
|
||||
#define VAR_ROUTE134_STATE 0x4081 // Unused Var
|
||||
#define VAR_LITTLEROOT_HOUSES_STATE_MAY 0x4082
|
||||
#define VAR_UNUSED_0x4083 0x4083 // Unused Var
|
||||
#define VAR_BIRCH_LAB_STATE 0x4084
|
||||
#define VAR_PETALBURG_GYM_STATE 0x4085 // 0-1: Wally tutorial, 2-6: 0-4 badges, 7: Defeated Norman, 8: Rematch Norman
|
||||
#define VAR_CONTEST_HALL_STATE 0x4086
|
||||
#define VAR_CABLE_CLUB_STATE 0x4087
|
||||
#define VAR_CONTEST_TYPE 0x4088
|
||||
#define VAR_SECRET_BASE_INITIALIZED 0x4089
|
||||
#define VAR_CONTEST_PRIZE_PICKUP 0x408A
|
||||
#define VAR_UNUSED_0x408B 0x408B // Unused Var
|
||||
#define VAR_LITTLEROOT_HOUSES_STATE_BRENDAN 0x408C
|
||||
#define VAR_LITTLEROOT_RIVAL_STATE 0x408D
|
||||
#define VAR_BOARD_BRINEY_BOAT_STATE 0x408E
|
||||
#define VAR_DEVON_CORP_3F_STATE 0x408F
|
||||
#define VAR_BRINEY_HOUSE_STATE 0x4090
|
||||
#define VAR_UNUSED_0x4091 0x4091 // Unused Var
|
||||
#define VAR_LITTLEROOT_INTRO_STATE 0x4092
|
||||
#define VAR_MAUVILLE_GYM_STATE 0x4093
|
||||
#define VAR_LILYCOVE_MUSEUM_2F_STATE 0x4094
|
||||
#define VAR_LILYCOVE_FAN_CLUB_STATE 0x4095
|
||||
#define VAR_BRINEY_LOCATION 0x4096
|
||||
#define VAR_INIT_SECRET_BASE 0x4097
|
||||
#define VAR_PETALBURG_WOODS_STATE 0x4098
|
||||
#define VAR_LILYCOVE_CONTEST_LOBBY_STATE 0x4099
|
||||
#define VAR_RUSTURF_TUNNEL_STATE 0x409A
|
||||
#define VAR_UNUSED_0x409B 0x409B // Unused Var
|
||||
#define VAR_ELITE_4_STATE 0x409C
|
||||
#define VAR_UNUSED_0x409D 0x409D // Unused Var
|
||||
#define VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE 0x409E
|
||||
#define VAR_MOSSDEEP_SPACE_CENTER_STATE 0x409F
|
||||
#define VAR_SLATEPORT_HARBOR_STATE 0x40A0
|
||||
#define VAR_UNUSED_0x40A1 0x40A1 // Unused var
|
||||
#define VAR_SEAFLOOR_CAVERN_STATE 0x40A2
|
||||
#define VAR_CABLE_CAR_STATION_STATE 0x40A3
|
||||
#define VAR_SAFARI_ZONE_STATE 0x40A4 // 0: In or out of SZ, 1: Player exiting SZ, 2: Player entering SZ
|
||||
#define VAR_TRICK_HOUSE_BEING_WATCHED_STATE 0x40A5
|
||||
#define VAR_TRICK_HOUSE_FOUND_TRICK_MASTER 0x40A6
|
||||
#define VAR_TRICK_HOUSE_ENTRANCE_STATE 0x40A7
|
||||
#define VAR_UNUSED_0x40A8 0x40A8 // Unused Var
|
||||
#define VAR_CYCLING_CHALLENGE_STATE 0x40A9
|
||||
#define VAR_SLATEPORT_MUSEUM_1F_STATE 0x40AA
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_1_STATE 0x40AB
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_2_STATE 0x40AC
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_3_STATE 0x40AD
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_4_STATE 0x40AE
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_5_STATE 0x40AF
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_6_STATE 0x40B0
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_7_STATE 0x40B1
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_8_STATE 0x40B2
|
||||
#define VAR_WEATHER_INSTITUTE_STATE 0x40B3
|
||||
#define VAR_SS_TIDAL_STATE 0x40B4
|
||||
#define VAR_TRICK_HOUSE_ENTER_FROM_CORRIDOR 0x40B5
|
||||
#define VAR_TRICK_HOUSE_PUZZLE_7_STATE_2 0x40B6 // Leftover from RS, never set
|
||||
#define VAR_SLATEPORT_FAN_CLUB_STATE 0x40B7
|
||||
#define VAR_UNUSED_0x40B8 0x40B8 // Unused Var
|
||||
#define VAR_MT_PYRE_STATE 0x40B9
|
||||
#define VAR_NEW_MAUVILLE_STATE 0x40BA
|
||||
#define VAR_UNUSED_0x40BB 0x40BB // Unused Var
|
||||
#define VAR_BRAVO_TRAINER_BATTLE_TOWER_ON 0x40BC
|
||||
#define VAR_JAGGED_PASS_ASH_WEATHER 0x40BD
|
||||
#define VAR_GLASS_WORKSHOP_STATE 0x40BE
|
||||
#define VAR_METEOR_FALLS_STATE 0x40BF
|
||||
#define VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE 0x40C0
|
||||
#define VAR_TRICK_HOUSE_PRIZE_PICKUP 0x40C1
|
||||
#define VAR_PACIFIDLOG_TM_RECEIVED_DAY 0x40C2
|
||||
#define VAR_VICTORY_ROAD_1F_STATE 0x40C3
|
||||
#define VAR_FOSSIL_RESURRECTION_STATE 0x40C4
|
||||
#define VAR_WHICH_FOSSIL_REVIVED 0x40C5
|
||||
#define VAR_STEVENS_HOUSE_STATE 0x40C6
|
||||
#define VAR_OLDALE_RIVAL_STATE 0x40C7
|
||||
#define VAR_JAGGED_PASS_STATE 0x40C8
|
||||
#define VAR_SCOTT_PETALBURG_ENCOUNTER 0x40C9
|
||||
#define VAR_SKY_PILLAR_STATE 0x40CA
|
||||
#define VAR_MIRAGE_TOWER_STATE 0x40CB
|
||||
#define VAR_FOSSIL_MANIAC_STATE 0x40CC
|
||||
#define VAR_CABLE_CLUB_TUTORIAL_STATE 0x40CD
|
||||
#define VAR_FRONTIER_BATTLE_MODE 0x40CE
|
||||
#define VAR_FRONTIER_FACILITY 0x40CF
|
||||
#define VAR_HAS_ENTERED_BATTLE_FRONTIER 0x40D0 // Var is used like a flag.
|
||||
#define VAR_SCOTT_STATE 0x40D1
|
||||
#define VAR_SLATEPORT_OUTSIDE_MUSEUM_STATE 0x40D2
|
||||
#define VAR_DEX_UPGRADE_JOHTO_STARTER_STATE 0x40D3
|
||||
#define VAR_SS_TIDAL_SCOTT_STATE 0x40D4 // Always equal to FLAG_MET_SCOTT_ON_SS_TIDAL
|
||||
#define VAR_ROAMER_POKEMON 0x40D5 // 0 = Latias, 1 = Latios
|
||||
#define VAR_TRAINER_HILL_IS_ACTIVE 0x40D6
|
||||
#define VAR_SKY_PILLAR_RAYQUAZA_CRY_DONE 0x40D7
|
||||
#define VAR_SOOTOPOLIS_WALLACE_STATE 0x40D8
|
||||
#define VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT 0x40D9
|
||||
#define VAR_REGISTER_BIRCH_STATE 0x40DA
|
||||
#define VAR_UNUSED_0x40DB 0x40DB // Unused Var
|
||||
#define VAR_UNUSED_0x40DC 0x40DC // Unused Var
|
||||
#define VAR_GIFT_PICHU_SLOT 0x40DD
|
||||
#define VAR_GIFT_UNUSED_1 0x40DE // Var is written to, but never read
|
||||
#define VAR_GIFT_UNUSED_2 0x40DF // Var is written to, but never read
|
||||
#define VAR_GIFT_UNUSED_3 0x40E0 // Var is written to, but never read
|
||||
#define VAR_GIFT_UNUSED_4 0x40E1 // Var is written to, but never read
|
||||
#define VAR_GIFT_UNUSED_5 0x40E2 // Var is written to, but never read
|
||||
#define VAR_GIFT_UNUSED_6 0x40E3 // Var is written to, but never read
|
||||
#define VAR_GIFT_UNUSED_7 0x40E4 // var is written to, but never read
|
||||
#define VAR_UNUSED_0x40E5 0x40E5 // Unused Var
|
||||
#define VAR_DAILY_SLOTS 0x40E6
|
||||
#define VAR_DAILY_WILDS 0x40E7
|
||||
#define VAR_DAILY_BLENDER 0x40E8
|
||||
#define VAR_DAILY_PLANTED_BERRIES 0x40E9
|
||||
#define VAR_DAILY_PICKED_BERRIES 0x40EA
|
||||
#define VAR_DAILY_ROULETTE 0x40EB
|
||||
#define VAR_SECRET_BASE_STEP_COUNTER 0x40EC // Used by Secret Base TV programs
|
||||
#define VAR_SECRET_BASE_LAST_ITEM_USED 0x40ED // Used by Secret Base TV programs
|
||||
#define VAR_SECRET_BASE_LOW_TV_FLAGS 0x40EE // Used by Secret Base TV programs
|
||||
#define VAR_SECRET_BASE_HIGH_TV_FLAGS 0x40EF // Used by Secret Base TV programs
|
||||
#define VAR_SECRET_BASE_IS_NOT_LOCAL 0x40F0 // Set to TRUE while in another player's secret base.
|
||||
#define VAR_DAILY_BP 0x40F1
|
||||
#define VAR_WALLY_CALL_STEP_COUNTER 0x40F2
|
||||
#define VAR_SCOTT_FORTREE_CALL_STEP_COUNTER 0x40F3
|
||||
#define VAR_ROXANNE_CALL_STEP_COUNTER 0x40F4
|
||||
#define VAR_SCOTT_BF_CALL_STEP_COUNTER 0x40F5
|
||||
#define VAR_RIVAL_RAYQUAZA_CALL_STEP_COUNTER 0x40F6
|
||||
#define VAR_UNUSED_0x40F7 0x40F7 // Unused Var
|
||||
#define VAR_UNUSED_0x40F8 0x40F8 // Unused Var
|
||||
#define VAR_UNUSED_0x40F9 0x40F9 // Unused Var
|
||||
#define VAR_UNUSED_0x40FA 0x40FA // Unused Var
|
||||
#define VAR_UNUSED_0x40FB 0x40FB // Unused Var
|
||||
#define VAR_UNUSED_0x40FC 0x40FC // Unused Var
|
||||
#define VAR_UNUSED_0x40FD 0x40FD // Unused Var
|
||||
#define VAR_UNUSED_0x40FE 0x40FE // Unused Var
|
||||
#define VAR_UNUSED_0x40FF 0x40FF // Unused Var
|
||||
#define VAR_REGISTER_BIRCH_STATE 0x40DA
|
||||
#define VAR_UNUSED_0x40DB 0x40DB // Unused Var
|
||||
#define VAR_UNUSED_0x40DC 0x40DC // Unused Var
|
||||
#define VAR_GIFT_PICHU_SLOT 0x40DD
|
||||
#define VAR_GIFT_UNUSED_1 0x40DE // Var is written to, but never read
|
||||
#define VAR_GIFT_UNUSED_2 0x40DF // Var is written to, but never read
|
||||
#define VAR_GIFT_UNUSED_3 0x40E0 // Var is written to, but never read
|
||||
#define VAR_GIFT_UNUSED_4 0x40E1 // Var is written to, but never read
|
||||
#define VAR_GIFT_UNUSED_5 0x40E2 // Var is written to, but never read
|
||||
#define VAR_GIFT_UNUSED_6 0x40E3 // Var is written to, but never read
|
||||
#define VAR_GIFT_UNUSED_7 0x40E4 // var is written to, but never read
|
||||
#define VAR_UNUSED_0x40E5 0x40E5 // Unused Var
|
||||
#define VAR_DAILY_SLOTS 0x40E6
|
||||
#define VAR_DAILY_WILDS 0x40E7
|
||||
#define VAR_DAILY_BLENDER 0x40E8
|
||||
#define VAR_DAILY_PLANTED_BERRIES 0x40E9
|
||||
#define VAR_DAILY_PICKED_BERRIES 0x40EA
|
||||
#define VAR_DAILY_ROULETTE 0x40EB
|
||||
#define VAR_SECRET_BASE_STEP_COUNTER 0x40EC // Used by Secret Base TV programs
|
||||
#define VAR_SECRET_BASE_LAST_ITEM_USED 0x40ED // Used by Secret Base TV programs
|
||||
#define VAR_SECRET_BASE_LOW_TV_FLAGS 0x40EE // Used by Secret Base TV programs
|
||||
#define VAR_SECRET_BASE_HIGH_TV_FLAGS 0x40EF // Used by Secret Base TV programs
|
||||
#define VAR_SECRET_BASE_IS_NOT_LOCAL 0x40F0 // Set to TRUE while in another player's secret base.
|
||||
#define VAR_DAILY_BP 0x40F1
|
||||
#define VAR_WALLY_CALL_STEP_COUNTER 0x40F2
|
||||
#define VAR_SCOTT_FORTREE_CALL_STEP_COUNTER 0x40F3
|
||||
#define VAR_ROXANNE_CALL_STEP_COUNTER 0x40F4
|
||||
#define VAR_SCOTT_BF_CALL_STEP_COUNTER 0x40F5
|
||||
#define VAR_RIVAL_RAYQUAZA_CALL_STEP_COUNTER 0x40F6
|
||||
#define VAR_UNUSED_0x40F7 0x40F7 // Unused Var
|
||||
#define VAR_UNUSED_0x40F8 0x40F8 // Unused Var
|
||||
#define VAR_UNUSED_0x40F9 0x40F9 // Unused Var
|
||||
#define VAR_UNUSED_0x40FA 0x40FA // Unused Var
|
||||
#define VAR_UNUSED_0x40FB 0x40FB // Unused Var
|
||||
#define VAR_UNUSED_0x40FC 0x40FC // Unused Var
|
||||
#define VAR_UNUSED_0x40FD 0x40FD // Unused Var
|
||||
#define VAR_UNUSED_0x40FE 0x40FE // Unused Var
|
||||
#define VAR_UNUSED_0x40FF 0x40FF // Unused Var
|
||||
|
||||
#define VARS_END 0x40FF
|
||||
#define VARS_COUNT (VARS_END - VARS_START + 1)
|
||||
#define VARS_END 0x40FF
|
||||
#define VARS_COUNT (VARS_END - VARS_START + 1)
|
||||
|
||||
#define SPECIAL_VARS_START 0x8000
|
||||
// special vars
|
||||
|
||||
8
include/debug.h
Normal file
8
include/debug.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef GUARD_DEBUG_H
|
||||
#define GUARD_DEBUG_H
|
||||
|
||||
#include "constants/overworld_config.h"
|
||||
|
||||
void Debug_ShowMainMenu(void);
|
||||
|
||||
#endif // GUARD_DEBUG_H
|
||||
@ -20,10 +20,12 @@ void EnableResetRTC(void);
|
||||
bool32 CanResetRTC(void);
|
||||
u16 *GetVarPointer(u16 id);
|
||||
u16 VarGet(u16 id);
|
||||
u16 VarGetIfExist(u16 id);
|
||||
bool8 VarSet(u16 id, u16 value);
|
||||
u8 VarGetObjectEventGraphicsId(u8 id);
|
||||
u8 *GetFlagPointer(u16 id);
|
||||
u8 FlagSet(u16 id);
|
||||
u8 FlagToggle(u16 id);
|
||||
u8 FlagClear(u16 id);
|
||||
bool8 FlagGet(u16 id);
|
||||
|
||||
|
||||
@ -77,55 +77,55 @@ extern const struct SpriteFrameImage *const gBerryTreePicTablePointers[];
|
||||
extern const u8 *const gBerryTreePaletteSlotTablePointers[];
|
||||
|
||||
void ResetObjectEvents(void);
|
||||
u8 GetMoveDirectionAnimNum(u8);
|
||||
u8 GetObjectEventIdByLocalIdAndMap(u8, u8, u8);
|
||||
bool8 TryGetObjectEventIdByLocalIdAndMap(u8, u8, u8, u8 *);
|
||||
u8 GetObjectEventIdByXY(s16, s16);
|
||||
void SetObjectEventDirection(struct ObjectEvent *, u8);
|
||||
u8 GetMoveDirectionAnimNum(u8 direction);
|
||||
u8 GetObjectEventIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroupId);
|
||||
bool8 TryGetObjectEventIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroupId, u8 *objectEventId);
|
||||
u8 GetObjectEventIdByXY(s16 x, s16 y);
|
||||
void SetObjectEventDirection(struct ObjectEvent *objectEvent, u8 direction);
|
||||
u8 GetFirstInactiveObjectEventId(void);
|
||||
void RemoveObjectEventByLocalIdAndMap(u8, u8, u8);
|
||||
void LoadPlayerObjectReflectionPalette(u16, u8);
|
||||
void LoadSpecialObjectReflectionPalette(u16, u8);
|
||||
void TryMoveObjectEventToMapCoords(u8, u8, u8, s16, s16);
|
||||
void PatchObjectPalette(u16, u8);
|
||||
void SpawnObjectEventsOnReturnToField(s16, s16);
|
||||
void RemoveObjectEventByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup);
|
||||
void LoadPlayerObjectReflectionPalette(u16 tag, u8 slot);
|
||||
void LoadSpecialObjectReflectionPalette(u16 tag, u8 slot);
|
||||
void TryMoveObjectEventToMapCoords(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y);
|
||||
void PatchObjectPalette(u16 paletteTag, u8 paletteSlot);
|
||||
void SpawnObjectEventsOnReturnToField(s16 x, s16 y);
|
||||
void OverrideSecretBaseDecorationSpriteScript(u8 localId, u8 mapNum, u8 mapGroup, u8 decorCat);
|
||||
void GetMapCoordsFromSpritePos(s16, s16, s16 *, s16 *);
|
||||
u8 GetFaceDirectionAnimNum(u8);
|
||||
void SetSpritePosToOffsetMapCoords(s16 *, s16 *, s16, s16);
|
||||
void GetMapCoordsFromSpritePos(s16 x, s16 y, s16 *destX, s16 *destY);
|
||||
u8 GetFaceDirectionAnimNum(u8 direction);
|
||||
void SetSpritePosToOffsetMapCoords(s16 *x, s16 *y, s16 dx, s16 dy);
|
||||
void ObjectEventClearHeldMovement(struct ObjectEvent *);
|
||||
void ObjectEventClearHeldMovementIfActive(struct ObjectEvent *);
|
||||
void TrySpawnObjectEvents(s16, s16);
|
||||
void TrySpawnObjectEvents(s16 cameraX, s16 cameraY);
|
||||
u8 CreateObjectGraphicsSprite(u16, void (*)(struct Sprite *), s16 x, s16 y, u8 subpriority);
|
||||
u8 TrySpawnObjectEvent(u8, u8, u8);
|
||||
u8 TrySpawnObjectEvent(u8 localId, u8 mapNum, u8 mapGroup);
|
||||
u8 SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 elevation);
|
||||
u8 SpawnSpecialObjectEvent(struct ObjectEventTemplate *);
|
||||
void SetSpritePosToMapCoords(s16, s16, s16 *, s16 *);
|
||||
void SetSpritePosToMapCoords(s16 mapX, s16 mapY, s16 *destX, s16 *destY);
|
||||
void CameraObjectReset1(void);
|
||||
void ObjectEventSetGraphicsId(struct ObjectEvent *, u8 graphicsId);
|
||||
void ObjectEventTurn(struct ObjectEvent *, u8);
|
||||
void ObjectEventTurnByLocalIdAndMap(u8, u8, u8, u8);
|
||||
void ObjectEventTurn(struct ObjectEvent *, u8 direction);
|
||||
void ObjectEventTurnByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 direction);
|
||||
const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u8 graphicsId);
|
||||
void SetObjectInvisibility(u8, u8, u8, bool8);
|
||||
void SetObjectInvisibility(u8 localId, u8 mapNum, u8 mapGroup, bool8 invisible);
|
||||
void FreeAndReserveObjectSpritePalettes(void);
|
||||
void SetObjectEventSpritePosByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y);
|
||||
void ResetObjectSubpriority(u8, u8, u8);
|
||||
void SetObjectSubpriority(u8, u8, u8, u8);
|
||||
void AllowObjectAtPosTriggerGroundEffects(s16, s16);
|
||||
void ResetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup);
|
||||
void SetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority);
|
||||
void AllowObjectAtPosTriggerGroundEffects(s16 x, s16 y);
|
||||
void ObjectEventGetLocalIdAndMap(struct ObjectEvent *objectEvent, void *localId, void *mapNum, void *mapGroup);
|
||||
void ShiftObjectEventCoords(struct ObjectEvent *, s16, s16);
|
||||
void MoveObjectEventToMapCoords(struct ObjectEvent *, s16, s16);
|
||||
void TryOverrideObjectEventTemplateCoords(u8, u8, u8);
|
||||
void ShiftObjectEventCoords(struct ObjectEvent *, s16 x, s16 y);
|
||||
void MoveObjectEventToMapCoords(struct ObjectEvent *, s16 x, s16 y);
|
||||
void TryOverrideObjectEventTemplateCoords(u8 localId, u8 mapNum, u8 mapGroup);
|
||||
void InitObjectEventPalettes(u8 palSlot);
|
||||
void UpdateObjectEventCurrentMovement(struct ObjectEvent *, struct Sprite *, bool8(struct ObjectEvent *, struct Sprite *));
|
||||
u8 ObjectEventFaceOppositeDirection(struct ObjectEvent *, u8);
|
||||
u8 GetOppositeDirection(u8);
|
||||
u8 ObjectEventFaceOppositeDirection(struct ObjectEvent *, u8 direction);
|
||||
u8 GetOppositeDirection(u8 direction);
|
||||
u8 GetWalkInPlaceFasterMovementAction(u32);
|
||||
u8 GetWalkInPlaceFastMovementAction(u32);
|
||||
u8 GetWalkInPlaceNormalMovementAction(u32);
|
||||
u8 GetWalkInPlaceSlowMovementAction(u32);
|
||||
u8 GetCollisionAtCoords(struct ObjectEvent *, s16, s16, u32);
|
||||
void MoveCoords(u8, s16 *, s16 *);
|
||||
u8 GetCollisionAtCoords(struct ObjectEvent *, s16 x, s16 y, u32 dir);
|
||||
void MoveCoords(u8 direction, s16 *x, s16 *y);
|
||||
bool8 ObjectEventIsHeldMovementActive(struct ObjectEvent *);
|
||||
u8 ObjectEventClearHeldMovementIfFinished(struct ObjectEvent *);
|
||||
u8 GetObjectEventIdByPosition(u16 x, u16 y, u8 elevation);
|
||||
@ -168,22 +168,22 @@ u8 AddCameraObject(u8 linkedSpriteId);
|
||||
void UpdateObjectEventsForCameraUpdate(s16 x, s16 y);
|
||||
u8 GetWalkSlowMovementAction(u32);
|
||||
u8 GetJumpMovementAction(u32);
|
||||
u8 ElevationToPriority(u8);
|
||||
u8 ElevationToPriority(u8 elevation);
|
||||
void ObjectEventUpdateElevation(struct ObjectEvent *objEvent);
|
||||
void SetObjectSubpriorityByElevation(u8, struct Sprite *, u8);
|
||||
void SetObjectSubpriorityByElevation(u8 elevation, struct Sprite *, u8 subpriority);
|
||||
void UnfreezeObjectEvent(struct ObjectEvent *);
|
||||
u8 FindLockedObjectEventIndex(struct ObjectEvent *);
|
||||
void SetAndStartSpriteAnim(struct Sprite *, u8, u8);
|
||||
void SetAndStartSpriteAnim(struct Sprite *, u8 animNum, u8 animCmdIndex);
|
||||
bool8 SpriteAnimEnded(struct Sprite *);
|
||||
void UnfreezeObjectEvents(void);
|
||||
void FreezeObjectEventsExceptOne(u8 objectEventId);
|
||||
void FreezeObjectEventsExceptTwo(u8 objectEventId1, u8 objectEventId2);
|
||||
void FreezeObjectEvents(void);
|
||||
bool8 FreezeObjectEvent(struct ObjectEvent *objectEvent);
|
||||
u8 GetMoveDirectionFastAnimNum(u8);
|
||||
u8 GetMoveDirectionFasterAnimNum(u8);
|
||||
u8 GetMoveDirectionFastestAnimNum(u8);
|
||||
u8 GetLedgeJumpDirection(s16, s16, u8);
|
||||
u8 GetMoveDirectionFastAnimNum(u8 direction);
|
||||
u8 GetMoveDirectionFasterAnimNum(u8 direction);
|
||||
u8 GetMoveDirectionFastestAnimNum(u8 direction);
|
||||
u8 GetLedgeJumpDirection(s16 x, s16 y, u8 direction);
|
||||
void CameraObjectSetFollowedSpriteId(u8 objectId);
|
||||
u16 GetObjectPaletteTag(u8 palSlot);
|
||||
void UpdateObjectEventSpriteInvisibility(struct Sprite *sprite, bool8 invisible);
|
||||
@ -192,7 +192,7 @@ s16 GetFigure8YOffset(s16 idx);
|
||||
void CameraObjectReset2(void);
|
||||
u8 GetObjectEventBerryTreeId(u8 objectEventId);
|
||||
void SetBerryTreeJustPicked(u8 mapId, u8 mapNumber, u8 mapGroup);
|
||||
bool8 IsBerryTreeSparkling(u8, u8, u8);
|
||||
bool8 IsBerryTreeSparkling(u8 localId, u8 mapNum, u8 mapGroup);
|
||||
|
||||
void MovementType_None(struct Sprite *);
|
||||
void MovementType_LookAround(struct Sprite *);
|
||||
@ -250,7 +250,6 @@ void MovementType_RunInPlace(struct Sprite *);
|
||||
void MovementType_Invisible(struct Sprite *);
|
||||
void MovementType_WalkSlowlyInPlace(struct Sprite *);
|
||||
u8 GetSlideMovementAction(u32);
|
||||
u8 GetJumpInPlaceMovementAction(u32);
|
||||
u8 GetJumpMovementAction(u32);
|
||||
u8 GetJump2MovementAction(u32);
|
||||
u8 CreateCopySpriteAt(struct Sprite *sprite, s16 x, s16 y, u8 subpriority);
|
||||
@ -262,17 +261,17 @@ u8 MovementType_WanderAround_Step3(struct ObjectEvent *, struct Sprite *);
|
||||
u8 MovementType_WanderAround_Step4(struct ObjectEvent *, struct Sprite *);
|
||||
u8 MovementType_WanderAround_Step5(struct ObjectEvent *, struct Sprite *);
|
||||
u8 MovementType_WanderAround_Step6(struct ObjectEvent *, struct Sprite *);
|
||||
u8 GetVectorDirection(s16, s16, s16, s16);
|
||||
u8 GetLimitedVectorDirection_SouthNorth(s16, s16, s16, s16);
|
||||
u8 GetLimitedVectorDirection_WestEast(s16, s16, s16, s16);
|
||||
u8 GetLimitedVectorDirection_WestNorth(s16, s16, s16, s16);
|
||||
u8 GetLimitedVectorDirection_EastNorth(s16, s16, s16, s16);
|
||||
u8 GetLimitedVectorDirection_WestSouth(s16, s16, s16, s16);
|
||||
u8 GetLimitedVectorDirection_EastSouth(s16, s16, s16, s16);
|
||||
u8 GetLimitedVectorDirection_SouthNorthWest(s16, s16, s16, s16);
|
||||
u8 GetLimitedVectorDirection_SouthNorthEast(s16, s16, s16, s16);
|
||||
u8 GetLimitedVectorDirection_NorthWestEast(s16, s16, s16, s16);
|
||||
u8 GetLimitedVectorDirection_SouthWestEast(s16, s16, s16, s16);
|
||||
u8 GetVectorDirection(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_SouthNorth(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_WestEast(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_WestNorth(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_EastNorth(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_WestSouth(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_EastSouth(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_SouthNorthWest(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_SouthNorthEast(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_NorthWestEast(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 GetLimitedVectorDirection_SouthWestEast(s16 dx, s16 dy, s16 absdx, s16 absdy);
|
||||
u8 MovementType_LookAround_Step0(struct ObjectEvent *, struct Sprite *);
|
||||
u8 MovementType_LookAround_Step1(struct ObjectEvent *, struct Sprite *);
|
||||
u8 MovementType_LookAround_Step2(struct ObjectEvent *, struct Sprite *);
|
||||
|
||||
@ -18,7 +18,7 @@ void FieldEffectStop(struct Sprite *sprite, u8 id);
|
||||
u8 CreateTrainerSprite(u8 trainerSpriteID, s16 x, s16 y, u8 subpriority, u8 *buffer);
|
||||
void FldEff_TeleportWarpOut(void);
|
||||
void FieldEffectActiveListRemove(u8 id);
|
||||
void MultiplyInvertedPaletteRGBComponents(u16, u8, u8, u8);
|
||||
void MultiplyInvertedPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b);
|
||||
void FieldEffectActiveListAdd(u8 id);
|
||||
void FieldEffectScript_LoadTiles(u8 **script);
|
||||
void FieldEffectScript_LoadFadedPalette(u8 **script);
|
||||
|
||||
@ -38,7 +38,7 @@ void PlayerFreeze(void);
|
||||
void StopPlayerAvatar(void);
|
||||
void SetSpinStartFacingDir(u8);
|
||||
void GetXYCoordsOneStepInFrontOfPlayer(s16 *xPtr, s16 *yPtr);
|
||||
u8 GetRivalAvatarGraphicsIdByStateIdAndGender(u8, u8);
|
||||
u8 GetRivalAvatarGraphicsIdByStateIdAndGender(u8 state, u8 gender);
|
||||
void SetPlayerAvatarFieldMove(void);
|
||||
u8 GetPlayerAvatarGraphicsIdByCurrentState(void);
|
||||
void SetPlayerAvatarStateMask(u8 flags);
|
||||
|
||||
@ -47,7 +47,7 @@ void CopySecondaryTilesetToVramUsingHeap(struct MapLayout const *mapLayout);
|
||||
void CopyPrimaryTilesetToVram(const struct MapLayout *);
|
||||
void CopySecondaryTilesetToVram(const struct MapLayout *);
|
||||
struct MapHeader const *const GetMapHeaderFromConnection(struct MapConnection *connection);
|
||||
struct MapConnection *GetConnectionAtCoords(s16 x, s16 y);
|
||||
struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y);
|
||||
void MapGridSetMetatileImpassabilityAt(int x, int y, bool32 impassable);
|
||||
|
||||
// field_region_map.c
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
// Masks/shifts for blocks in the map grid
|
||||
// Map grid blocks consist of a 10 bit metatile id, a 2 bit collision value, and a 4 bit elevation value
|
||||
// This is the data stored in each data/layouts/*/map.bin file
|
||||
#define MAPGRID_METATILE_ID_MASK 0x03FF // Bits 1-10
|
||||
#define MAPGRID_COLLISION_MASK 0x0C00 // Bits 11-12
|
||||
#define MAPGRID_ELEVATION_MASK 0xF000 // Bits 13-16
|
||||
#define MAPGRID_METATILE_ID_MASK 0x03FF // Bits 0-9
|
||||
#define MAPGRID_COLLISION_MASK 0x0C00 // Bits 10-11
|
||||
#define MAPGRID_ELEVATION_MASK 0xF000 // Bits 12-15
|
||||
#define MAPGRID_COLLISION_SHIFT 10
|
||||
#define MAPGRID_ELEVATION_SHIFT 12
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
// Masks/shifts for metatile attributes
|
||||
// Metatile attributes consist of an 8 bit behavior value, 4 unused bits, and a 4 bit layer type value
|
||||
// This is the data stored in each data/tilesets/*/*/metatile_attributes.bin file
|
||||
#define METATILE_ATTR_BEHAVIOR_MASK 0x00FF // Bits 1-8
|
||||
#define METATILE_ATTR_LAYER_MASK 0xF000 // Bits 13-16
|
||||
#define METATILE_ATTR_BEHAVIOR_MASK 0x00FF // Bits 0-7
|
||||
#define METATILE_ATTR_LAYER_MASK 0xF000 // Bits 12-15
|
||||
#define METATILE_ATTR_LAYER_SHIFT 12
|
||||
|
||||
enum {
|
||||
|
||||
@ -881,7 +881,7 @@ struct MysteryGiftSave
|
||||
struct WonderCardMetadata cardMetadata;
|
||||
u16 questionnaireWords[NUM_QUESTIONNAIRE_WORDS];
|
||||
struct WonderNewsMetadata newsMetadata;
|
||||
u32 trainerIds[2][5]; // Saved ids for 10 trainers, 5 each for battles and trades
|
||||
u32 trainerIds[2][5]; // Saved ids for 10 trainers, 5 each for battles and trades
|
||||
}; // 0x36C 0x3598
|
||||
|
||||
// For external event data storage. The majority of these may have never been used.
|
||||
|
||||
@ -9304,7 +9304,7 @@ extern const u32 gBattleAnimSpriteGfx_Bird[];
|
||||
extern const u32 gBattleAnimSpriteGfx_CrossImpact[];
|
||||
extern const u32 gBattleAnimSpriteGfx_TrumpCard[];
|
||||
extern const u32 gBattleAnimSpriteGfx_TrumpCardParticles[];
|
||||
extern const u32 gBattleAnimSpriteGfx_Accupressure[];
|
||||
extern const u32 gBattleAnimSpriteGfx_Acupressure[];
|
||||
extern const u32 gBattleAnimSpriteGfx_WringOut[];
|
||||
extern const u32 gBattleAnimSpriteGfx_ColoredOrbs[];
|
||||
extern const u32 gBattleAnimSpriteGfx_WorrySeed[];
|
||||
@ -9606,7 +9606,7 @@ extern const u32 gBattleAnimSpritePal_WhipHit[];
|
||||
extern const u32 gBattleAnimSpritePal_BlueRing2[];
|
||||
extern const u32 gBattleAnimSpritePal_TrumpCard[];
|
||||
extern const u32 gBattleAnimSpritePal_TrumpCardParticles[];
|
||||
extern const u32 gBattleAnimSpritePal_Accupressure[];
|
||||
extern const u32 gBattleAnimSpritePal_Acupressure[];
|
||||
extern const u32 gBattleAnimSpritePal_WringOut[];
|
||||
extern const u32 gBattleAnimSpritePal_ColoredOrbs[];
|
||||
extern const u32 gBattleAnimSpritePal_WorrySeed[];
|
||||
@ -9631,8 +9631,6 @@ extern const u32 gBattleAnimSpriteGfx_MegaStone[];
|
||||
extern const u32 gBattleAnimSpritePal_MegaStone[];
|
||||
extern const u32 gBattleAnimSpriteGfx_MegaParticles[];
|
||||
extern const u32 gBattleAnimSpritePal_MegaParticles[];
|
||||
extern const u32 gBattleAnimSpriteGfx_PrimalParticles[];
|
||||
extern const u32 gBattleAnimSpritePal_PrimalParticles[];
|
||||
extern const u32 gBattleAnimSpriteGfx_MegaSymbol[];
|
||||
extern const u32 gBattleAnimSpritePal_MegaSymbol[];
|
||||
extern const u32 gBattleAnimSpriteGfx_FlashCannonBall[];
|
||||
@ -9645,8 +9643,6 @@ extern const u32 gBattleAnimSpriteGfx_QuickGuard[];
|
||||
extern const u32 gBattleAnimSpritePal_QuickGuard[];
|
||||
|
||||
// New Battle Anim Particles
|
||||
extern const u32 gBattleAnimSpriteGfx_AcupressureFinger[];
|
||||
extern const u32 gBattleAnimSpritePal_AcupressureFinger[];
|
||||
extern const u32 gBattleAnimSpriteGfx_AlphaStone[];
|
||||
extern const u32 gBattleAnimSpritePal_AlphaStone[];
|
||||
extern const u32 gBattleAnimSpriteGfx_AlphaSymbol[];
|
||||
@ -10087,9 +10083,6 @@ extern const u16 gSlotMachineReelTimePikachu_Pal[];
|
||||
extern const u32 gBattleAnimBgTilemap_Sandstorm[];
|
||||
extern const u32 gBattleAnimBgImage_Sandstorm[];
|
||||
|
||||
extern const u32 gBattleAnimBgTilemap_Windstorm[];
|
||||
extern const u32 gBattleAnimBgImage_Windstorm[];
|
||||
|
||||
// Pokedex Area Screen
|
||||
extern const u32 gPokedexAreaScreenAreaUnknown_Gfx[];
|
||||
extern const u16 gPokedexAreaScreenAreaUnknown_Pal[];
|
||||
|
||||
@ -43,6 +43,7 @@ enum {
|
||||
BALL_THROW_UNABLE_NO_ROOM,
|
||||
BALL_THROW_UNABLE_SEMI_INVULNERABLE,
|
||||
BALL_THROW_ABLE,
|
||||
BALL_THROW_UNABLE_DISABLED_FLAG,
|
||||
};
|
||||
|
||||
bool32 CanThrowBall(void);
|
||||
|
||||
@ -284,7 +284,7 @@ void SerialCB(void);
|
||||
bool32 InUnionRoom(void);
|
||||
void LoadWirelessStatusIndicatorSpriteGfx(void);
|
||||
bool8 IsLinkTaskFinished(void);
|
||||
void CreateWirelessStatusIndicatorSprite(u8, u8);
|
||||
void CreateWirelessStatusIndicatorSprite(u8 x, u8 y);
|
||||
void SetLinkStandbyCallback(void);
|
||||
void SetWirelessCommType1(void);
|
||||
void CheckShouldAdvanceLinkState(void);
|
||||
|
||||
@ -97,7 +97,7 @@ struct RfuGameCompatibilityData
|
||||
// wireless play (the kind the Pokémon games use) the gname data can be used for
|
||||
// anything the developers want. This struct is what GF decided to use it for.
|
||||
// It can be up to 13 bytes in size (RFU_GAME_NAME_LENGTH).
|
||||
// The player's name is sent separately as the username ("uname"), and does not
|
||||
// The player's name is sent separately as the username ("uname"), and does not
|
||||
// use a struct (gHostRfuUsername).
|
||||
struct __attribute__((packed, aligned(2))) RfuGameData
|
||||
{
|
||||
@ -118,7 +118,7 @@ struct __attribute__((packed, aligned(2))) RfuGameData
|
||||
// Bits 0-2 are a shortened trainerId
|
||||
// Bit 3 is the player's gender
|
||||
// Bits 4-6 are unknown/unused
|
||||
// Bit 7 is an 'active' flag
|
||||
// Bit 7 is an 'active' flag
|
||||
#define PINFO_TID_MASK 0x7
|
||||
#define PINFO_GENDER_SHIFT 3
|
||||
#define PINFO_ACTIVE_FLAG (1 << 7)
|
||||
|
||||
@ -10,24 +10,24 @@
|
||||
* toolchains. If this is not done, the ClearSav functions will end up erasing
|
||||
* the wrong memory leading to various glitches.
|
||||
*/
|
||||
struct SaveBlock2DMA {
|
||||
struct SaveBlock2ASLR {
|
||||
struct SaveBlock2 block;
|
||||
u8 dma[SAVEBLOCK_MOVE_RANGE];
|
||||
u8 aslr[SAVEBLOCK_MOVE_RANGE];
|
||||
};
|
||||
|
||||
struct SaveBlock1DMA {
|
||||
struct SaveBlock1ASLR {
|
||||
struct SaveBlock1 block;
|
||||
u8 dma[SAVEBLOCK_MOVE_RANGE];
|
||||
u8 aslr[SAVEBLOCK_MOVE_RANGE];
|
||||
};
|
||||
|
||||
struct PokemonStorageDMA {
|
||||
struct PokemonStorageASLR {
|
||||
struct PokemonStorage block;
|
||||
u8 dma[SAVEBLOCK_MOVE_RANGE];
|
||||
u8 aslr[SAVEBLOCK_MOVE_RANGE];
|
||||
};
|
||||
|
||||
extern struct SaveBlock1DMA gSaveblock1;
|
||||
extern struct SaveBlock2DMA gSaveblock2;
|
||||
extern struct PokemonStorageDMA gPokemonStorage;
|
||||
extern struct SaveBlock1ASLR gSaveblock1;
|
||||
extern struct SaveBlock2ASLR gSaveblock2;
|
||||
extern struct PokemonStorageASLR gPokemonStorage;
|
||||
|
||||
extern bool32 gFlashMemoryPresent;
|
||||
extern struct SaveBlock1 *gSaveBlock1Ptr;
|
||||
|
||||
@ -3,5 +3,6 @@
|
||||
|
||||
void CB2_InitMainMenu(void);
|
||||
void CreateYesNoMenuParameterized(u8 x, u8 y, u16 baseTileNum, u16 baseBlock, u8 yesNoPalNum, u8 winPalNum);
|
||||
void NewGameBirchSpeech_SetDefaultPlayerName(u8);
|
||||
|
||||
#endif // GUARD_MAIN_MENU_H
|
||||
|
||||
@ -92,7 +92,7 @@ void PrintMenuActionGrid(u8 windowId, u8 fontId, u8 left, u8 top, u8 optionWidth
|
||||
u8 InitMenuActionGrid(u8 windowId, u8 optionWidth, u8 columns, u8 rows, u8 initialCursorPos);
|
||||
u8 ChangeMenuGridCursorPosition(s8 deltaX, s8 deltaY);
|
||||
u8 GetStartMenuWindowId(void);
|
||||
void ListMenuLoadStdPalAt(u8, u8);
|
||||
void ListMenuLoadStdPalAt(u8 palOffset, u8 palId);
|
||||
u8 Menu_MoveCursor(s8 cursorDelta);
|
||||
u8 Menu_MoveCursorNoWrapAround(s8 cursorDelta);
|
||||
void DrawStdWindowFrame(u8 windowId, bool8 CopyToVram);
|
||||
|
||||
@ -52,22 +52,22 @@ extern u8 gPaletteDecompressionBuffer[];
|
||||
extern u16 gPlttBufferUnfaded[PLTT_BUFFER_SIZE];
|
||||
extern u16 gPlttBufferFaded[PLTT_BUFFER_SIZE];
|
||||
|
||||
void LoadCompressedPalette(const u32 *, u16, u16);
|
||||
void LoadPalette(const void *, u16, u16);
|
||||
void FillPalette(u16, u16, u16);
|
||||
void LoadCompressedPalette(const u32 *src, u16 offset, u16 size);
|
||||
void LoadPalette(const void *src, u16 offset, u16 size);
|
||||
void FillPalette(u16 value, u16 offset, u16 size);
|
||||
void TransferPlttBuffer(void);
|
||||
u8 UpdatePaletteFade(void);
|
||||
void ResetPaletteFade(void);
|
||||
bool8 BeginNormalPaletteFade(u32, s8, u8, u8, u16);
|
||||
void PaletteStruct_ResetById(u16);
|
||||
bool8 BeginNormalPaletteFade(u32 selectedPalettes, s8 delay, u8 startY, u8 targetY, u16 blendColor);
|
||||
void PaletteStruct_ResetById(u16 id);
|
||||
void ResetPaletteFadeControl(void);
|
||||
void InvertPlttBuffer(u32);
|
||||
void TintPlttBuffer(u32, s8, s8, s8);
|
||||
void UnfadePlttBuffer(u32);
|
||||
void BeginFastPaletteFade(u8);
|
||||
void BeginHardwarePaletteFade(u8, u8, u8, u8, u8);
|
||||
void InvertPlttBuffer(u32 selectedPalettes);
|
||||
void TintPlttBuffer(u32 selectedPalettes, s8 r, s8 g, s8 b);
|
||||
void UnfadePlttBuffer(u32 selectedPalettes);
|
||||
void BeginFastPaletteFade(u8 submode);
|
||||
void BeginHardwarePaletteFade(u8 blendCnt, u8 delay, u8 y, u8 targetY, u8 shouldResetBlendRegisters);
|
||||
void BlendPalettes(u32 selectedPalettes, u8 coeff, u16 color);
|
||||
void BlendPalettesUnfaded(u32, u8, u16);
|
||||
void BlendPalettesUnfaded(u32 selectedPalettes, u8 coeff, u16 color);
|
||||
void BlendPalettesGradually(u32 selectedPalettes, s8 delay, u8 coeff, u8 coeffTarget, u16 color, u8 priority, u8 id);
|
||||
void TintPalette_GrayScale(u16 *palette, u16 count);
|
||||
void TintPalette_GrayScale2(u16 *palette, u16 count);
|
||||
|
||||
@ -28,6 +28,7 @@ extern u8 gSelectedOrderFromParty[MAX_FRONTIER_PARTY_SIZE];
|
||||
extern u8 gBattlePartyCurrentOrder[PARTY_SIZE / 2];
|
||||
|
||||
extern void (*gItemUseCB)(u8, TaskFunc);
|
||||
extern const struct SpriteTemplate gSpriteTemplate_StatusIcons;
|
||||
|
||||
void AnimatePartySlot(u8 slot, u8 animNum);
|
||||
bool8 IsMultiBattle(void);
|
||||
@ -45,6 +46,7 @@ bool8 FieldCallback_PrepareFadeInFromMenu(void);
|
||||
void CB2_ReturnToPartyMenuFromFlyMap(void);
|
||||
void LoadHeldItemIcons(void);
|
||||
void DrawHeldItemIconsForTrade(u8 *partyCounts, u8 *partySpriteIds, u8 whichParty);
|
||||
void LoadPartyMenuAilmentGfx(void);
|
||||
void CB2_ShowPartyMenuForItemUse(void);
|
||||
void ItemUseCB_Medicine(u8 taskId, TaskFunc task);
|
||||
void ItemUseCB_AbilityCapsule(u8 taskId, TaskFunc task);
|
||||
@ -55,7 +57,7 @@ void ItemUseCB_PPUp(u8 taskId, TaskFunc task);
|
||||
u16 ItemIdToBattleMoveId(u16 item);
|
||||
bool8 IsMoveHm(u16 move);
|
||||
bool8 MonKnowsMove(struct Pokemon *mon, u16 move);
|
||||
bool8 BoxMonKnowsMove(struct BoxPokemon *mon, u16 move);
|
||||
bool8 BoxMonKnowsMove(struct BoxPokemon *boxMon, u16 move);
|
||||
void ItemUseCB_TMHM(u8 taskId, TaskFunc task);
|
||||
void ItemUseCB_RareCandy(u8 taskId, TaskFunc task);
|
||||
void ItemUseCB_SacredAsh(u8 taskId, TaskFunc task);
|
||||
|
||||
@ -367,11 +367,13 @@ struct Evolution
|
||||
u16 targetSpecies;
|
||||
};
|
||||
|
||||
struct FormChange {
|
||||
struct FormChange
|
||||
{
|
||||
u16 method;
|
||||
u16 targetSpecies;
|
||||
u16 param1;
|
||||
u16 param2;
|
||||
u16 param3;
|
||||
};
|
||||
|
||||
#define NUM_UNOWN_FORMS 28
|
||||
@ -383,7 +385,7 @@ struct FormChange {
|
||||
| (((personality) & 0x00000003) >> 0) \
|
||||
) % NUM_UNOWN_FORMS)
|
||||
|
||||
#define GET_SHINY_VALUE(otId, personality)HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality)
|
||||
#define GET_SHINY_VALUE(otId, personality) (HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality))
|
||||
|
||||
extern u8 gPlayerPartyCount;
|
||||
extern struct Pokemon gPlayerParty[PARTY_SIZE];
|
||||
@ -403,10 +405,11 @@ extern const u8 gPPUpGetMask[];
|
||||
extern const u8 gPPUpClearMask[];
|
||||
extern const u8 gPPUpAddValues[];
|
||||
extern const u8 gStatStageRatios[MAX_STAT_STAGE + 1][2];
|
||||
extern const u16 gLinkPlayerFacilityClasses[];
|
||||
extern const u16 gUnionRoomFacilityClasses[];
|
||||
extern const struct SpriteTemplate gBattlerSpriteTemplates[];
|
||||
extern const s8 gNatureStatTable[][5];
|
||||
extern const u16 *const gFormSpeciesIdTables[NUM_SPECIES];
|
||||
extern const u32 sExpCandyExperienceTable[];
|
||||
|
||||
void ZeroBoxMonData(struct BoxPokemon *boxMon);
|
||||
void ZeroMonData(struct Pokemon *mon);
|
||||
@ -464,6 +467,7 @@ void SetMonData(struct Pokemon *mon, s32 field, const void *dataArg);
|
||||
void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg);
|
||||
void CopyMon(void *dest, void *src, size_t size);
|
||||
u8 GiveMonToPlayer(struct Pokemon *mon);
|
||||
u8 SendMonToPC(struct Pokemon* mon);
|
||||
u8 CalculatePlayerPartyCount(void);
|
||||
u8 CalculateEnemyPartyCount(void);
|
||||
u8 GetMonsStateToDoubles(void);
|
||||
@ -560,5 +564,6 @@ u16 GetFormChangeTargetSpecies(struct Pokemon *mon, u16 method, u32 arg);
|
||||
u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg);
|
||||
u16 MonTryLearningNewMoveEvolution(struct Pokemon *mon, bool8 firstMove);
|
||||
bool32 ShouldShowFemaleDifferences(u16 species, u32 personality);
|
||||
void TryToSetBattleFormChangeMoves(struct Pokemon *mon);
|
||||
|
||||
#endif // GUARD_POKEMON_H
|
||||
|
||||
@ -72,4 +72,6 @@ u8 *GetWaldaPhrasePtr(void);
|
||||
void SetWaldaPhrase(const u8 *src);
|
||||
bool32 IsWaldaPhraseEmpty(void);
|
||||
|
||||
void EnterPokeStorage(u8 boxOption);
|
||||
|
||||
#endif // GUARD_POKEMON_STORAGE_SYSTEM_H
|
||||
|
||||
@ -116,7 +116,7 @@ enum
|
||||
#define POKENAV_MENU_IDS_START 100000
|
||||
enum
|
||||
{
|
||||
POKENAV_MAIN_MENU = POKENAV_MENU_IDS_START, // The main menu where the player selects Hoenn Map/Condition/Match Call/Ribbons
|
||||
POKENAV_MAIN_MENU = POKENAV_MENU_IDS_START, // The main menu where the player selects Hoenn Map/Condition/Match Call/Ribbons
|
||||
POKENAV_MAIN_MENU_CURSOR_ON_MAP,
|
||||
POKENAV_CONDITION_MENU, // The first Condition screen where the player selects Party or Search
|
||||
POKENAV_CONDITION_SEARCH_MENU, // The Condition search menu where the player selects a search parameter
|
||||
|
||||
@ -500,6 +500,7 @@ extern const u8 gText_StopLearningMove2[];
|
||||
extern const u8 gText_MoveNotLearned[];
|
||||
extern const u8 gText_PkmnElevatedToLvVar2[];
|
||||
extern const u8 gText_PkmnGainedExp[];
|
||||
extern const u8 gText_PkmnGainedExpAndElevatedToLvVar3[];
|
||||
extern const u8 gText_RemoveMailBeforeItem[];
|
||||
extern const u8 gText_PkmnHoldingItemCantHoldMail[];
|
||||
extern const u8 gText_MailTransferredFromMailbox[];
|
||||
@ -2154,9 +2155,7 @@ extern const u8 gText_Switch2[];
|
||||
extern const u8 gText_Item[];
|
||||
extern const u8 gText_NotPkmnOtherTrainerWants[];
|
||||
extern const u8 gText_ThatIsntAnEgg[];
|
||||
extern const u8 gText_PkmnCantBeTradedNow[];
|
||||
extern const u8 gText_OtherTrainersPkmnCantBeTraded[];
|
||||
extern const u8 gText_EggCantBeTradedNow[];
|
||||
extern const u8 gText_OtherTrainerCantAcceptPkmn[];
|
||||
extern const u8 gText_CantTradeWithTrainer[];
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ struct TrainerCard
|
||||
/*0x4C*/ bool8 shouldDrawStickers; // FRLG only
|
||||
/*0x4D*/ u8 unused;
|
||||
/*0x4E*/ u8 monIconTint; // FRLG only
|
||||
/*0x4F*/ u8 facilityClass;
|
||||
/*0x4F*/ u8 unionRoomClass;
|
||||
/*0x50*/ u8 stickers[TRAINER_CARD_STICKER_TYPES]; // FRLG only
|
||||
/*0x54*/ u16 monSpecies[PARTY_SIZE]; // FRLG only
|
||||
// Note: Link players use linkHasAllFrontierSymbols, not the field below,
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
// In the Union Room the player is only ever connected to ≤ 4 other players.
|
||||
// However, there can be up to MAX_UNION_ROOM_LEADERS (8) object events to
|
||||
// represent leaders of recently discovered link groups, and each of those groups
|
||||
// represent leaders of recently discovered link groups, and each of those groups
|
||||
// may have up to MAX_RFU_PLAYERS (5) players in it including the leader.
|
||||
// These players are represented on-screen by NPC sprites drawn around the leader.
|
||||
// Thus there can be 40 sprites of other players on-screen, in 8 groups of 5.
|
||||
@ -16,7 +16,7 @@
|
||||
// The maximum number of recently connected players that can be tracked.
|
||||
// Note that this is significantly less than NUM_UNION_ROOM_SPRITES, i.e. not
|
||||
// every player that can be shown in the Union Room can be tracked at once.
|
||||
// Information such as a group member's gender can instead be read from partnerInfo
|
||||
// Information such as a group member's gender can instead be read from partnerInfo
|
||||
// of the leader's RfuGameData by tracking at least all of the group leaders.
|
||||
#define MAX_RFU_PLAYER_LIST_SIZE 16
|
||||
|
||||
|
||||
@ -3978,7 +3978,7 @@ Cry_Spectrier::
|
||||
.align 2
|
||||
Cry_Calyrex::
|
||||
.incbin "sound/direct_sound_samples/cries/calyrex.bin"
|
||||
/*
|
||||
/*
|
||||
.align 2
|
||||
Cry_Wyrdeer::
|
||||
.incbin "sound/direct_sound_samples/cries/wyrdeer.bin"
|
||||
|
||||
@ -239,6 +239,87 @@ u8 ComputeBattleAiScores(u8 battler)
|
||||
return BattleAI_ChooseMoveOrAction();
|
||||
}
|
||||
|
||||
static void CopyBattlerDataToAIParty(u32 bPosition, u32 side)
|
||||
{
|
||||
u32 battler = GetBattlerAtPosition(bPosition);
|
||||
struct AiPartyMon *aiMon = &AI_PARTY->mons[side][gBattlerPartyIndexes[battler]];
|
||||
struct BattlePokemon *bMon = &gBattleMons[battler];
|
||||
|
||||
aiMon->species = bMon->species;
|
||||
aiMon->level = bMon->level;
|
||||
aiMon->status = bMon->status1;
|
||||
aiMon->gender = GetGenderFromSpeciesAndPersonality(bMon->species, bMon->personality);
|
||||
aiMon->isFainted = FALSE;
|
||||
aiMon->wasSentInBattle = TRUE;
|
||||
aiMon->switchInCount++;
|
||||
}
|
||||
|
||||
void Ai_InitPartyStruct(void)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
AI_PARTY->count[B_SIDE_PLAYER] = gPlayerPartyCount;
|
||||
AI_PARTY->count[B_SIDE_OPPONENT] = gEnemyPartyCount;
|
||||
|
||||
// Save first 2 or 4(in doubles) mons
|
||||
CopyBattlerDataToAIParty(B_POSITION_PLAYER_LEFT, B_SIDE_PLAYER);
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||
CopyBattlerDataToAIParty(B_POSITION_PLAYER_RIGHT, B_SIDE_PLAYER);
|
||||
|
||||
// If player's partner is AI, save opponent mons
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER)
|
||||
{
|
||||
CopyBattlerDataToAIParty(B_POSITION_OPPONENT_LEFT, B_SIDE_OPPONENT);
|
||||
CopyBattlerDataToAIParty(B_POSITION_OPPONENT_RIGHT, B_SIDE_OPPONENT);
|
||||
}
|
||||
|
||||
// Find fainted mons
|
||||
for (i = 0; i < AI_PARTY->count[B_SIDE_PLAYER]; i++)
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_HP) == 0)
|
||||
AI_PARTY->mons[B_SIDE_PLAYER][i].isFainted = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void Ai_UpdateSwitchInData(u32 battler)
|
||||
{
|
||||
u32 i;
|
||||
u32 side = GetBattlerSide(battler);
|
||||
struct AiPartyMon *aiMon = &AI_PARTY->mons[side][gBattlerPartyIndexes[battler]];
|
||||
|
||||
// See if the switched-in mon has been already in battle
|
||||
if (aiMon->wasSentInBattle)
|
||||
{
|
||||
if (aiMon->ability)
|
||||
BATTLE_HISTORY->abilities[battler] = aiMon->ability;
|
||||
if (aiMon->heldEffect)
|
||||
BATTLE_HISTORY->itemEffects[battler] = aiMon->heldEffect;
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
if (aiMon->moves[i])
|
||||
BATTLE_HISTORY->usedMoves[battler][i] = aiMon->moves[i];
|
||||
}
|
||||
aiMon->switchInCount++;
|
||||
aiMon->status = gBattleMons[battler].status1; // Copy status, because it could've been changed in battle.
|
||||
}
|
||||
else // If not, copy the newly switched-in mon in battle and clear battle history.
|
||||
{
|
||||
ClearBattlerMoveHistory(battler);
|
||||
ClearBattlerAbilityHistory(battler);
|
||||
ClearBattlerItemEffectHistory(battler);
|
||||
CopyBattlerDataToAIParty(GetBattlerPosition(battler), side);
|
||||
}
|
||||
}
|
||||
|
||||
void Ai_UpdateFaintData(u32 battler)
|
||||
{
|
||||
struct AiPartyMon *aiMon = &AI_PARTY->mons[GET_BATTLER_SIDE(battler)][gBattlerPartyIndexes[battler]];
|
||||
ClearBattlerMoveHistory(battler);
|
||||
ClearBattlerAbilityHistory(battler);
|
||||
ClearBattlerItemEffectHistory(battler);
|
||||
aiMon->isFainted = TRUE;
|
||||
}
|
||||
|
||||
static void SetBattlerAiData(u8 battlerId)
|
||||
{
|
||||
AI_DATA->abilities[battlerId] = AI_GetAbility(battlerId);
|
||||
@ -258,8 +339,7 @@ void GetAiLogicData(void)
|
||||
|
||||
memset(AI_DATA, 0, sizeof(struct AiLogicData));
|
||||
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_FIRST_BATTLE | BATTLE_TYPE_SAFARI | BATTLE_TYPE_ROAMER))
|
||||
&& !IsWildMonSmart())
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_HAS_AI) && !IsWildMonSmart())
|
||||
return;
|
||||
|
||||
// get/assume all battler data
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
#include "global.h"
|
||||
#include "battle.h"
|
||||
#include "constants/battle_ai.h"
|
||||
#include "battle_ai_main.h"
|
||||
#include "battle_ai_util.h"
|
||||
#include "battle_util.h"
|
||||
#include "battle_anim.h"
|
||||
#include "battle_controllers.h"
|
||||
#include "battle_main.h"
|
||||
#include "constants/hold_effects.h"
|
||||
#include "battle_setup.h"
|
||||
#include "data.h"
|
||||
#include "pokemon.h"
|
||||
@ -12,6 +15,7 @@
|
||||
#include "util.h"
|
||||
#include "constants/abilities.h"
|
||||
#include "constants/item_effects.h"
|
||||
#include "constants/battle_move_effects.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/moves.h"
|
||||
|
||||
@ -19,6 +23,7 @@
|
||||
static bool8 HasSuperEffectiveMoveAgainstOpponents(bool8 noRng);
|
||||
static bool8 FindMonWithFlagsAndSuperEffective(u16 flags, u8 moduloPercent);
|
||||
static bool8 ShouldUseItem(void);
|
||||
static bool32 AiExpectsToFaintPlayer(void);
|
||||
static bool32 AI_ShouldHeal(u32 healAmount);
|
||||
static bool32 AI_OpponentCanFaintAiWithMod(u32 healAmount);
|
||||
|
||||
@ -56,21 +61,6 @@ static bool8 ShouldSwitchIfAllBadMoves(void)
|
||||
}
|
||||
}
|
||||
|
||||
static bool8 ShouldSwitchIfPerishSong(void)
|
||||
{
|
||||
if (gStatuses3[gActiveBattler] & STATUS3_PERISH_SONG
|
||||
&& gDisableStructs[gActiveBattler].perishSongTimer == 0)
|
||||
{
|
||||
*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE;
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static bool8 ShouldSwitchIfWonderGuard(void)
|
||||
{
|
||||
u8 opposingPosition;
|
||||
@ -119,6 +109,9 @@ static bool8 ShouldSwitchIfWonderGuard(void)
|
||||
continue;
|
||||
if (i == gBattlerPartyIndexes[gActiveBattler])
|
||||
continue;
|
||||
if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON
|
||||
&& i == (CalculateEnemyPartyCount()-1))
|
||||
continue;
|
||||
|
||||
for (opposingBattler = GetBattlerAtPosition(opposingPosition), j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
@ -180,7 +173,7 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
if (AI_GetAbility(gActiveBattler) == absorbingTypeAbility)
|
||||
if (AI_DATA->abilities[gActiveBattler] == absorbingTypeAbility)
|
||||
return FALSE;
|
||||
|
||||
GetAIPartyIndexes(gActiveBattler, &firstId, &lastId);
|
||||
@ -209,6 +202,10 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
|
||||
continue;
|
||||
if (i == *(gBattleStruct->monToSwitchIntoId + battlerIn2))
|
||||
continue;
|
||||
if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON
|
||||
&& i == (CalculateEnemyPartyCount()-1))
|
||||
continue;
|
||||
|
||||
|
||||
species = GetMonData(&party[i], MON_DATA_SPECIES);
|
||||
if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0)
|
||||
@ -228,43 +225,230 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool8 ShouldSwitchIfNaturalCure(void)
|
||||
static bool8 ShouldSwitchIfGameStatePrompt(void)
|
||||
{
|
||||
if (!(gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP))
|
||||
return FALSE;
|
||||
if (AI_GetAbility(gActiveBattler) != ABILITY_NATURAL_CURE)
|
||||
return FALSE;
|
||||
if (gBattleMons[gActiveBattler].hp < gBattleMons[gActiveBattler].maxHP / 2)
|
||||
return FALSE;
|
||||
bool8 switchMon = FALSE;
|
||||
u16 monAbility = AI_DATA->abilities[gActiveBattler];
|
||||
u16 holdEffect = AI_DATA->holdEffects[gActiveBattler];
|
||||
u8 opposingPosition = BATTLE_OPPOSITE(GetBattlerPosition(gActiveBattler));
|
||||
u8 opposingBattler = GetBattlerAtPosition(opposingPosition);
|
||||
s32 moduloChance = 4; //25% Chance Default
|
||||
s32 chanceReducer = 1; //No Reduce default. Increase to reduce
|
||||
s32 firstId;
|
||||
s32 lastId;
|
||||
s32 i;
|
||||
struct Pokemon *party;
|
||||
|
||||
if ((gLastLandedMoves[gActiveBattler] == MOVE_NONE
|
||||
|| gLastLandedMoves[gActiveBattler] == MOVE_UNAVAILABLE)
|
||||
&& Random() & 1)
|
||||
|
||||
if (AnyStatIsRaised(gActiveBattler))
|
||||
chanceReducer = 5; // Reduce switchout probability by factor of 5 if setup
|
||||
|
||||
//Perish Song
|
||||
if (gStatuses3[gActiveBattler] & STATUS3_PERISH_SONG
|
||||
&& gDisableStructs[gActiveBattler].perishSongTimer == 0
|
||||
&& monAbility != ABILITY_SOUNDPROOF)
|
||||
switchMon = TRUE;
|
||||
|
||||
if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_SMART_SWITCHING)
|
||||
{
|
||||
//Yawn
|
||||
if (gStatuses3[gActiveBattler] & STATUS3_YAWN
|
||||
&& AI_CanSleep(gActiveBattler, monAbility)
|
||||
&& gBattleMons[gActiveBattler].hp > gBattleMons[gActiveBattler].maxHP / 3)
|
||||
{
|
||||
switchMon = TRUE;
|
||||
|
||||
//Double Battles
|
||||
//Check if partner can prevent sleep
|
||||
if (IsDoubleBattle())
|
||||
{
|
||||
if (IsBattlerAlive(BATTLE_PARTNER(gActiveBattler))
|
||||
&& (GetAIChosenMove(BATTLE_PARTNER(gActiveBattler)) == MOVE_UPROAR)
|
||||
)
|
||||
switchMon = FALSE;
|
||||
|
||||
if (IsBattlerAlive(BATTLE_PARTNER(gActiveBattler))
|
||||
&& (gBattleMoves[AI_DATA->partnerMove].effect == EFFECT_MISTY_TERRAIN
|
||||
|| gBattleMoves[AI_DATA->partnerMove].effect == EFFECT_ELECTRIC_TERRAIN)
|
||||
&& IsBattlerGrounded(gActiveBattler)
|
||||
)
|
||||
switchMon = FALSE;
|
||||
|
||||
if (*(gBattleStruct->AI_monToSwitchIntoId + BATTLE_PARTNER(gActiveBattler)) != PARTY_SIZE) //Partner is switching
|
||||
{
|
||||
GetAIPartyIndexes(gActiveBattler, &firstId, &lastId);
|
||||
|
||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER)
|
||||
party = gPlayerParty;
|
||||
|
||||
for (i = firstId; i < lastId; i++)
|
||||
{
|
||||
if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON
|
||||
&& i == (CalculateEnemyPartyCount()-1))
|
||||
break;
|
||||
|
||||
//Look for mon in party that is able to be switched into and has ability that sets terrain
|
||||
if (GetMonData(&party[i], MON_DATA_HP) != 0
|
||||
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
|
||||
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG
|
||||
&& i != gBattlerPartyIndexes[gActiveBattler]
|
||||
&& i != gBattlerPartyIndexes[BATTLE_PARTNER(gActiveBattler)]
|
||||
&& IsBattlerGrounded(gActiveBattler)
|
||||
&& (GetMonAbility(&party[i]) == ABILITY_MISTY_SURGE
|
||||
|| GetMonAbility(&party[i]) == ABILITY_ELECTRIC_SURGE)) //Ally has Misty or Electric Surge
|
||||
{
|
||||
*(gBattleStruct->AI_monToSwitchIntoId + BATTLE_PARTNER(gActiveBattler)) = i;
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0);
|
||||
switchMon = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Check if Active Pokemon can KO opponent instead of switching
|
||||
//Will still fall asleep, but take out opposing Pokemon first
|
||||
if (AiExpectsToFaintPlayer())
|
||||
switchMon = FALSE;
|
||||
|
||||
//Checks to see if active Pokemon can do something against sleep
|
||||
if ((monAbility == ABILITY_NATURAL_CURE
|
||||
|| monAbility == ABILITY_SHED_SKIN
|
||||
|| monAbility == ABILITY_EARLY_BIRD)
|
||||
|| holdEffect == (HOLD_EFFECT_CURE_SLP | HOLD_EFFECT_CURE_STATUS)
|
||||
|| HasMove(gActiveBattler, MOVE_SLEEP_TALK)
|
||||
|| (HasMoveEffect(gActiveBattler, MOVE_SNORE) && AI_GetTypeEffectiveness(MOVE_SNORE, gActiveBattler, opposingBattler) >= UQ_4_12(1.0))
|
||||
|| (IsBattlerGrounded(gActiveBattler)
|
||||
&& (HasMove(gActiveBattler, MOVE_MISTY_TERRAIN) || HasMove(gActiveBattler, MOVE_ELECTRIC_TERRAIN)))
|
||||
)
|
||||
switchMon = FALSE;
|
||||
|
||||
//Check if Active Pokemon evasion boosted and might be able to dodge until awake
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_EVASION] > (DEFAULT_STAT_STAGE + 3)
|
||||
&& AI_DATA->abilities[opposingBattler] != ABILITY_UNAWARE
|
||||
&& AI_DATA->abilities[opposingBattler] != ABILITY_KEEN_EYE
|
||||
&& !(gBattleMons[gActiveBattler].status2 & STATUS2_FORESIGHT)
|
||||
&& !(gStatuses3[gActiveBattler] & STATUS3_MIRACLE_EYED))
|
||||
switchMon = FALSE;
|
||||
|
||||
}
|
||||
|
||||
//Secondary Damage
|
||||
if (monAbility != ABILITY_MAGIC_GUARD
|
||||
&& !AiExpectsToFaintPlayer())
|
||||
{
|
||||
//Toxic
|
||||
moduloChance = 2; //50%
|
||||
if (((gBattleMons[gActiveBattler].status1 & STATUS1_TOXIC_COUNTER) >= STATUS1_TOXIC_TURN(2))
|
||||
&& gBattleMons[gActiveBattler].hp >= (gBattleMons[gActiveBattler].maxHP / 3)
|
||||
&& (Random() % (moduloChance*chanceReducer)) == 0)
|
||||
switchMon = TRUE;
|
||||
|
||||
//Cursed
|
||||
moduloChance = 2; //50%
|
||||
if (gBattleMons[gActiveBattler].status2 & STATUS2_CURSED
|
||||
&& (Random() % (moduloChance*chanceReducer)) == 0)
|
||||
switchMon = TRUE;
|
||||
|
||||
//Nightmare
|
||||
moduloChance = 3; //33.3%
|
||||
if (gBattleMons[gActiveBattler].status2 & STATUS2_NIGHTMARE
|
||||
&& (Random() % (moduloChance*chanceReducer)) == 0)
|
||||
switchMon = TRUE;
|
||||
|
||||
//Leech Seed
|
||||
moduloChance = 4; //25%
|
||||
if (gStatuses3[gActiveBattler] & STATUS3_LEECHSEED
|
||||
&& (Random() % (moduloChance*chanceReducer)) == 0)
|
||||
switchMon = TRUE;
|
||||
}
|
||||
|
||||
//Infatuation
|
||||
if (gBattleMons[gActiveBattler].status2 & STATUS2_INFATUATION
|
||||
&& !AiExpectsToFaintPlayer())
|
||||
switchMon = TRUE;
|
||||
|
||||
//Todo
|
||||
//Pass Wish Heal
|
||||
|
||||
//Semi-Invulnerable
|
||||
if (gStatuses3[opposingBattler] & STATUS3_SEMI_INVULNERABLE)
|
||||
{
|
||||
if (FindMonThatAbsorbsOpponentsMove()) //If find absorber default to switch
|
||||
switchMon = TRUE;
|
||||
if (!AI_OpponentCanFaintAiWithMod(0)
|
||||
&& AnyStatIsRaised(gActiveBattler))
|
||||
switchMon = FALSE;
|
||||
if (AiExpectsToFaintPlayer()
|
||||
&& !WillAIStrikeFirst()
|
||||
&& !AI_OpponentCanFaintAiWithMod(0))
|
||||
switchMon = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (switchMon)
|
||||
{
|
||||
*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE;
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0);
|
||||
return TRUE;
|
||||
}
|
||||
else if (IS_MOVE_STATUS(gLastLandedMoves[gActiveBattler]) && Random() & 1)
|
||||
else
|
||||
{
|
||||
*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE;
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0);
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static bool8 ShouldSwitchIfAbilityBenefit(void)
|
||||
{
|
||||
s32 monToSwitchId;
|
||||
s32 moduloChance = 4; //25% Chance Default
|
||||
s32 chanceReducer = 1; //No Reduce default. Increase to reduce
|
||||
u8 battlerId = GetBattlerPosition(gActiveBattler);
|
||||
|
||||
if (AnyStatIsRaised(battlerId))
|
||||
chanceReducer = 5; // Reduce switchout probability by factor of 5 if setup
|
||||
|
||||
//Check if ability is blocked
|
||||
if (gStatuses3[gActiveBattler] & STATUS3_GASTRO_ACID
|
||||
||IsNeutralizingGasOnField())
|
||||
return FALSE;
|
||||
|
||||
switch(AI_DATA->abilities[gActiveBattler]) {
|
||||
case ABILITY_NATURAL_CURE:
|
||||
moduloChance = 4; //25%
|
||||
//Attempt to cure bad ailment
|
||||
if (gBattleMons[gActiveBattler].status1 & (STATUS1_SLEEP | STATUS1_FREEZE | STATUS1_TOXIC_POISON)
|
||||
&& GetMostSuitableMonToSwitchInto() != PARTY_SIZE)
|
||||
break;
|
||||
//Attempt to cure lesser ailment
|
||||
if ((gBattleMons[gActiveBattler].status1 & STATUS1_ANY)
|
||||
&& (gBattleMons[gActiveBattler].hp >= gBattleMons[gActiveBattler].maxHP / 2)
|
||||
&& GetMostSuitableMonToSwitchInto() != PARTY_SIZE
|
||||
&& Random() % (moduloChance*chanceReducer) == 0)
|
||||
break;
|
||||
|
||||
return FALSE;
|
||||
|
||||
case ABILITY_REGENERATOR:
|
||||
moduloChance = 2; //50%
|
||||
//Don't switch if ailment
|
||||
if (gBattleMons[gActiveBattler].status1 & STATUS1_ANY)
|
||||
return FALSE;
|
||||
if ((gBattleMons[gActiveBattler].hp <= ((gBattleMons[gActiveBattler].maxHP * 2) / 3))
|
||||
&& GetMostSuitableMonToSwitchInto() != PARTY_SIZE
|
||||
&& Random() % (moduloChance*chanceReducer) == 0)
|
||||
break;
|
||||
|
||||
return FALSE;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (FindMonWithFlagsAndSuperEffective(MOVE_RESULT_DOESNT_AFFECT_FOE, 1))
|
||||
return TRUE;
|
||||
if (FindMonWithFlagsAndSuperEffective(MOVE_RESULT_NOT_VERY_EFFECTIVE, 1))
|
||||
return TRUE;
|
||||
*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE;
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0);
|
||||
|
||||
if (Random() & 1)
|
||||
{
|
||||
*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE;
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool8 HasSuperEffectiveMoveAgainstOpponents(bool8 noRng)
|
||||
@ -392,6 +576,10 @@ static bool8 FindMonWithFlagsAndSuperEffective(u16 flags, u8 moduloPercent)
|
||||
continue;
|
||||
if (i == *(gBattleStruct->monToSwitchIntoId + battlerIn2))
|
||||
continue;
|
||||
if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON
|
||||
&& i == (CalculateEnemyPartyCount()-1))
|
||||
continue;
|
||||
|
||||
|
||||
species = GetMonData(&party[i], MON_DATA_SPECIES);
|
||||
if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0)
|
||||
@ -480,26 +668,42 @@ bool32 ShouldSwitch(void)
|
||||
continue;
|
||||
if (i == *(gBattleStruct->monToSwitchIntoId + battlerIn2))
|
||||
continue;
|
||||
if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON
|
||||
&& i == (CalculateEnemyPartyCount()-1))
|
||||
continue;
|
||||
|
||||
availableToSwitch++;
|
||||
}
|
||||
|
||||
if (availableToSwitch == 0)
|
||||
return FALSE;
|
||||
if (ShouldSwitchIfAllBadMoves())
|
||||
return TRUE;
|
||||
if (ShouldSwitchIfPerishSong())
|
||||
return TRUE;
|
||||
|
||||
//NOTE: The sequence of the below functions matter! Do not change unless you have carefully considered the outcome.
|
||||
//Since the order is sequencial, and some of these functions prompt switch to specific party members.
|
||||
|
||||
//These Functions can prompt switch to specific party members
|
||||
if (ShouldSwitchIfWonderGuard())
|
||||
return TRUE;
|
||||
if (ShouldSwitchIfGameStatePrompt())
|
||||
return TRUE;
|
||||
if (FindMonThatAbsorbsOpponentsMove())
|
||||
return TRUE;
|
||||
if (ShouldSwitchIfNaturalCure())
|
||||
|
||||
//These Functions can prompt switch to generic pary members
|
||||
if (ShouldSwitchIfAllBadMoves())
|
||||
return TRUE;
|
||||
if (ShouldSwitchIfAbilityBenefit())
|
||||
return TRUE;
|
||||
|
||||
//Removing switch capabilites under specific conditions
|
||||
//These Functions prevent the "FindMonWithFlagsAndSuperEffective" from getting out of hand.
|
||||
if (HasSuperEffectiveMoveAgainstOpponents(FALSE))
|
||||
return FALSE;
|
||||
if (AreStatsRaised())
|
||||
return FALSE;
|
||||
|
||||
//Default Function
|
||||
//Can prompt switch if AI has a pokemon in party that resists current opponent & has super effective move
|
||||
if (FindMonWithFlagsAndSuperEffective(MOVE_RESULT_DOESNT_AFFECT_FOE, 2)
|
||||
|| FindMonWithFlagsAndSuperEffective(MOVE_RESULT_NOT_VERY_EFFECTIVE, 3))
|
||||
return TRUE;
|
||||
@ -542,7 +746,7 @@ void AI_TrySwitchOrUseItem(void)
|
||||
|
||||
GetAIPartyIndexes(gActiveBattler, &firstId, &lastId);
|
||||
|
||||
for (monToSwitchId = firstId; monToSwitchId < lastId; monToSwitchId++)
|
||||
for (monToSwitchId = (lastId-1); monToSwitchId >= firstId; monToSwitchId--)
|
||||
{
|
||||
if (GetMonData(&party[monToSwitchId], MON_DATA_HP) == 0)
|
||||
continue;
|
||||
@ -554,6 +758,9 @@ void AI_TrySwitchOrUseItem(void)
|
||||
continue;
|
||||
if (monToSwitchId == *(gBattleStruct->monToSwitchIntoId + battlerIn2))
|
||||
continue;
|
||||
if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON
|
||||
&& monToSwitchId == (CalculateEnemyPartyCount()-1))
|
||||
continue;
|
||||
|
||||
break;
|
||||
}
|
||||
@ -751,7 +958,9 @@ u8 GetMostSuitableMonToSwitchInto(void)
|
||||
|| gBattlerPartyIndexes[battlerIn2] == i
|
||||
|| i == *(gBattleStruct->monToSwitchIntoId + battlerIn1)
|
||||
|| i == *(gBattleStruct->monToSwitchIntoId + battlerIn2)
|
||||
|| (GetMonAbility(&party[i]) == ABILITY_TRUANT && IsTruantMonVulnerable(gActiveBattler, opposingBattler))) // While not really invalid per say, not really wise to switch into this mon.
|
||||
|| (GetMonAbility(&party[i]) == ABILITY_TRUANT && IsTruantMonVulnerable(gActiveBattler, opposingBattler)) // While not really invalid per say, not really wise to switch into this mon.
|
||||
|| ((AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON)
|
||||
&& i == (CalculateEnemyPartyCount() - 1))) //Save Ace Pokemon for last
|
||||
invalidMons |= gBitTable[i];
|
||||
else
|
||||
aliveCount++;
|
||||
@ -793,17 +1002,17 @@ static bool32 AiExpectsToFaintPlayer(void)
|
||||
bool32 canFaintPlayer;
|
||||
u32 i;
|
||||
u8 target = gBattleStruct->aiChosenTarget[gActiveBattler];
|
||||
|
||||
|
||||
if (gBattleStruct->aiMoveOrAction[gActiveBattler] > 3)
|
||||
return FALSE; // AI not planning to use move
|
||||
|
||||
|
||||
if (GetBattlerSide(target) != GetBattlerSide(gActiveBattler)
|
||||
&& CanIndexMoveFaintTarget(gActiveBattler, target, gBattleStruct->aiMoveOrAction[gActiveBattler], 0)
|
||||
&& AI_WhoStrikesFirst(gActiveBattler, target, GetAIChosenMove(gActiveBattler)) == AI_IS_FASTER) {
|
||||
// We expect to faint the target and move first -> dont use an item
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -818,10 +1027,10 @@ static bool8 ShouldUseItem(void)
|
||||
if ((gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_RIGHT)
|
||||
|| gStatuses3[gActiveBattler] & STATUS3_SKY_DROPPED)
|
||||
return FALSE;
|
||||
|
||||
|
||||
if (gStatuses3[gActiveBattler] & STATUS3_EMBARGO)
|
||||
return FALSE;
|
||||
|
||||
|
||||
if (AiExpectsToFaintPlayer())
|
||||
return FALSE;
|
||||
|
||||
@ -948,14 +1157,14 @@ static bool8 ShouldUseItem(void)
|
||||
static bool32 AI_ShouldHeal(u32 healAmount)
|
||||
{
|
||||
bool32 shouldHeal = FALSE;
|
||||
|
||||
|
||||
if (gBattleMons[gActiveBattler].hp < gBattleMons[gActiveBattler].maxHP / 4
|
||||
|| gBattleMons[gActiveBattler].hp == 0
|
||||
|| (healAmount != 0 && gBattleMons[gActiveBattler].maxHP - gBattleMons[gActiveBattler].hp > healAmount)) {
|
||||
// We have low enough HP to consider healing
|
||||
shouldHeal = !AI_OpponentCanFaintAiWithMod(healAmount); // if target can kill us even after we heal, why bother
|
||||
}
|
||||
|
||||
|
||||
return shouldHeal;
|
||||
}
|
||||
|
||||
|
||||
@ -499,6 +499,7 @@ void RecordKnownMove(u8 battlerId, u32 move)
|
||||
if (BATTLE_HISTORY->usedMoves[battlerId][i] == MOVE_NONE)
|
||||
{
|
||||
BATTLE_HISTORY->usedMoves[battlerId][i] = move;
|
||||
AI_PARTY->mons[GetBattlerSide(battlerId)][gBattlerPartyIndexes[battlerId]].moves[i] = move;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -507,6 +508,7 @@ void RecordKnownMove(u8 battlerId, u32 move)
|
||||
void RecordAbilityBattle(u8 battlerId, u16 abilityId)
|
||||
{
|
||||
BATTLE_HISTORY->abilities[battlerId] = abilityId;
|
||||
AI_PARTY->mons[GetBattlerSide(battlerId)][gBattlerPartyIndexes[battlerId]].ability = abilityId;
|
||||
}
|
||||
|
||||
void ClearBattlerAbilityHistory(u8 battlerId)
|
||||
@ -517,6 +519,7 @@ void ClearBattlerAbilityHistory(u8 battlerId)
|
||||
void RecordItemEffectBattle(u8 battlerId, u8 itemEffect)
|
||||
{
|
||||
BATTLE_HISTORY->itemEffects[battlerId] = itemEffect;
|
||||
AI_PARTY->mons[GetBattlerSide(battlerId)][gBattlerPartyIndexes[battlerId]].heldEffect = itemEffect;
|
||||
}
|
||||
|
||||
void ClearBattlerItemEffectHistory(u8 battlerId)
|
||||
@ -793,7 +796,7 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef, u8 *typeEffectiveness,
|
||||
dmg *= 2;
|
||||
else if (move == MOVE_SURGING_STRIKES || (move == MOVE_WATER_SHURIKEN && gBattleMons[battlerAtk].species == SPECIES_GRENINJA_ASH))
|
||||
dmg *= 3;
|
||||
|
||||
|
||||
if (dmg == 0)
|
||||
dmg = 1;
|
||||
}
|
||||
@ -804,7 +807,7 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef, u8 *typeEffectiveness,
|
||||
|
||||
RestoreBattlerData(battlerAtk);
|
||||
RestoreBattlerData(battlerDef);
|
||||
|
||||
|
||||
// convert multiper to AI_EFFECTIVENESS_xX
|
||||
*typeEffectiveness = AI_GetEffectiveness(effectivenessMultiplier);
|
||||
|
||||
@ -1159,11 +1162,15 @@ bool32 AI_IsAbilityOnSide(u32 battlerId, u32 ability)
|
||||
s32 AI_GetAbility(u32 battlerId)
|
||||
{
|
||||
u32 knownAbility = GetBattlerAbility(battlerId);
|
||||
|
||||
// We've had ability overwritten by e.g. Worry Seed. It is not part of AI_PARTY in case of switching
|
||||
if (gBattleStruct->overwrittenAbilities[battlerId])
|
||||
return gBattleStruct->overwrittenAbilities[battlerId];
|
||||
|
||||
// The AI knows its own ability.
|
||||
if (IsBattlerAIControlled(battlerId))
|
||||
return knownAbility;
|
||||
|
||||
|
||||
// Check neutralizing gas, gastro acid
|
||||
if (knownAbility == ABILITY_NONE)
|
||||
return knownAbility;
|
||||
@ -1183,10 +1190,10 @@ s32 AI_GetAbility(u32 battlerId)
|
||||
{
|
||||
abilityGuess = gBaseStats[gBattleMons[battlerId].species].abilities[Random() % NUM_ABILITY_SLOTS];
|
||||
}
|
||||
|
||||
|
||||
return abilityGuess;
|
||||
}
|
||||
|
||||
|
||||
return ABILITY_NONE; // Unknown.
|
||||
}
|
||||
|
||||
@ -2691,7 +2698,7 @@ static bool32 AI_CanPoisonType(u8 battlerAttacker, u8 battlerTarget)
|
||||
static bool32 AI_CanBePoisoned(u8 battlerAtk, u8 battlerDef)
|
||||
{
|
||||
u16 ability = AI_DATA->abilities[battlerDef];
|
||||
|
||||
|
||||
if (!(AI_CanPoisonType(battlerAtk, battlerDef))
|
||||
|| gSideStatuses[GetBattlerSide(battlerDef)] & SIDE_STATUS_SAFEGUARD
|
||||
|| gBattleMons[battlerDef].status1 & STATUS1_ANY
|
||||
@ -3042,7 +3049,7 @@ bool32 IsValidDoubleBattle(u8 battlerAtk)
|
||||
u16 GetAllyChosenMove(u8 battlerId)
|
||||
{
|
||||
u8 partnerBattler = BATTLE_PARTNER(battlerId);
|
||||
|
||||
|
||||
if (!IsBattlerAlive(partnerBattler) || !IsBattlerAIControlled(partnerBattler))
|
||||
return MOVE_NONE;
|
||||
else if (partnerBattler > battlerId) // Battler with the lower id chooses the move first.
|
||||
@ -3444,7 +3451,7 @@ void IncreaseStatUpScore(u8 battlerAtk, u8 battlerDef, u8 statId, s16 *score)
|
||||
|
||||
if (AI_DATA->hpPercents[battlerAtk] < 80 && AI_RandLessThan(128))
|
||||
return;
|
||||
|
||||
|
||||
if ((AI_THINKING_STRUCT->aiFlags & AI_FLAG_TRY_TO_FAINT) && CanAIFaintTarget(battlerAtk, battlerDef, 0))
|
||||
return; // Damaging moves would get a score boost from AI_TryToFaint or PreferStrongestMove so we don't consider them here
|
||||
|
||||
@ -3563,7 +3570,7 @@ void IncreaseParalyzeScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score)
|
||||
{
|
||||
if ((AI_THINKING_STRUCT->aiFlags & AI_FLAG_TRY_TO_FAINT) && CanAIFaintTarget(battlerAtk, battlerDef, 0))
|
||||
return;
|
||||
|
||||
|
||||
if (AI_CanParalyze(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef], move, AI_DATA->partnerMove))
|
||||
{
|
||||
u8 atkSpeed = GetBattlerTotalSpeedStat(battlerAtk);
|
||||
@ -3584,7 +3591,7 @@ void IncreaseSleepScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score)
|
||||
{
|
||||
if ((AI_THINKING_STRUCT->aiFlags & AI_FLAG_TRY_TO_FAINT) && CanAIFaintTarget(battlerAtk, battlerDef, 0))
|
||||
return;
|
||||
|
||||
|
||||
if (AI_CanPutToSleep(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef], move, AI_DATA->partnerMove))
|
||||
*score += 2;
|
||||
else
|
||||
@ -3602,7 +3609,7 @@ void IncreaseConfusionScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score)
|
||||
{
|
||||
if ((AI_THINKING_STRUCT->aiFlags & AI_FLAG_TRY_TO_FAINT) && CanAIFaintTarget(battlerAtk, battlerDef, 0))
|
||||
return;
|
||||
|
||||
|
||||
if (AI_CanConfuse(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef], BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove)
|
||||
&& AI_DATA->holdEffects[battlerDef] != HOLD_EFFECT_CURE_CONFUSION
|
||||
&& AI_DATA->holdEffects[battlerDef] != HOLD_EFFECT_CURE_STATUS)
|
||||
@ -3633,26 +3640,26 @@ bool32 ShouldUseZMove(u8 battlerAtk, u8 battlerDef, u16 chosenMove)
|
||||
return FALSE; //don't use z move on partner
|
||||
if (gBattleStruct->zmove.used[battlerAtk])
|
||||
return FALSE; //cant use z move twice
|
||||
|
||||
|
||||
if (IsViableZMove(battlerAtk, chosenMove))
|
||||
{
|
||||
u8 effectiveness;
|
||||
|
||||
|
||||
if (gBattleMons[battlerDef].ability == ABILITY_DISGUISE && gBattleMons[battlerDef].species == SPECIES_MIMIKYU)
|
||||
return FALSE; // Don't waste a Z-Move busting disguise
|
||||
if (gBattleMons[battlerDef].ability == ABILITY_ICE_FACE && gBattleMons[battlerDef].species == SPECIES_EISCUE && IS_MOVE_PHYSICAL(chosenMove))
|
||||
return FALSE; // Don't waste a Z-Move busting Ice Face
|
||||
|
||||
|
||||
if (IS_MOVE_STATUS(chosenMove) && !IS_MOVE_STATUS(gBattleStruct->zmove.chosenZMove))
|
||||
return FALSE;
|
||||
else if (!IS_MOVE_STATUS(chosenMove) && IS_MOVE_STATUS(gBattleStruct->zmove.chosenZMove))
|
||||
return FALSE;
|
||||
|
||||
|
||||
if (!IS_MOVE_STATUS(chosenMove) && AI_CalcDamage(chosenMove, battlerAtk, battlerDef, &effectiveness, FALSE) >= gBattleMons[battlerDef].hp)
|
||||
return FALSE; // don't waste damaging z move if can otherwise faint target
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -219,7 +219,7 @@ void LaunchBattleAnimation(const u8 *const animsTable[], u16 tableId, bool8 isMo
|
||||
{
|
||||
s32 i;
|
||||
bool32 hideHpBoxes = (tableId == MOVE_TRANSFORM) ? FALSE : TRUE;
|
||||
|
||||
|
||||
if (!isMoveAnim)
|
||||
{
|
||||
switch (tableId)
|
||||
|
||||
@ -354,10 +354,10 @@ const struct SpriteTemplate gSmallCloudTemplate =
|
||||
.callback = AnimMoveSmallCloud
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gAccupressureSpriteTemplate =
|
||||
const struct SpriteTemplate gAcupressureSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_ACCUPRESSURE,
|
||||
.paletteTag = ANIM_TAG_ACCUPRESSURE,
|
||||
.tileTag = ANIM_TAG_ACUPRESSURE,
|
||||
.paletteTag = ANIM_TAG_ACUPRESSURE,
|
||||
.oam = &gOamData_AffineDouble_ObjNormal_32x32,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
@ -6798,7 +6798,7 @@ static const union AffineAnimCmd sCompressTargetHorizontallyAffineAnimCmds[] =
|
||||
static void AnimTask_CompressTargetStep(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
|
||||
|
||||
if (!RunAffineAnimFromTaskData(task))
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
@ -1239,17 +1239,6 @@ const struct SpriteTemplate gOmegaStoneSpriteTemplate =
|
||||
.callback = AnimSpriteOnMonPos,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gPrimalParticlesSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_PRIMAL_PARTICLES,
|
||||
.paletteTag = ANIM_TAG_PRIMAL_PARTICLES,
|
||||
.oam = &gOamData_AffineNormal_ObjBlend_16x16,
|
||||
.anims = gPowerAbsorptionOrbAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gPowerAbsorptionOrbAffineAnimTable,
|
||||
.callback = AnimPowerAbsorptionOrb,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gAlphaSymbolSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_ALPHA_SYMBOL,
|
||||
|
||||
@ -1252,8 +1252,8 @@ void AnimTask_LoadWindstormBackground(u8 taskId)
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||
|
||||
GetBattleAnimBg1Data(&animBg);
|
||||
AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimBgImage_Windstorm, animBg.tilesOffset);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimBgTilemap_Windstorm, 0);
|
||||
AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimBgImage_Sandstorm, animBg.tilesOffset);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimBgTilemap_Sandstorm, 0);
|
||||
LoadCompressedPalette(gBattleAnimSpritePal_Windstorm, animBg.paletteId * 16, 32);
|
||||
|
||||
if (gBattleAnimArgs[0] && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
|
||||
@ -888,7 +888,7 @@ void AnimTask_DestinyBondWhiteShadow(u8 taskId)
|
||||
spriteId = CreateSprite(&gDarkVoidBlackHoleTemplate, baseX, baseY, 55); //dark void
|
||||
else
|
||||
spriteId = CreateSprite(&gDestinyBondWhiteShadowSpriteTemplate, baseX, baseY, 55); //destiny bond
|
||||
|
||||
|
||||
if (spriteId != MAX_SPRITES)
|
||||
{
|
||||
x = GetBattlerSpriteCoord(battler, BATTLER_COORD_X_2);
|
||||
@ -914,7 +914,7 @@ void AnimTask_DestinyBondWhiteShadow(u8 taskId)
|
||||
spriteId = CreateSprite(&gDarkVoidBlackHoleTemplate, baseX, baseY, 55); //dark void
|
||||
else
|
||||
spriteId = CreateSprite(&gDestinyBondWhiteShadowSpriteTemplate, baseX, baseY, 55); //destiny bond
|
||||
|
||||
|
||||
if (spriteId != MAX_SPRITES)
|
||||
{
|
||||
x = 48;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -331,7 +331,7 @@ static const union AffineAnimCmd* const sSpriteAffineAnimTable_CrushGripHand[] =
|
||||
const struct SpriteTemplate gCrushGripHandTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_PURPLE_HAND_OUTLINE,
|
||||
.paletteTag = ANIM_TAG_ACCUPRESSURE,
|
||||
.paletteTag = ANIM_TAG_ACUPRESSURE,
|
||||
.oam = &gOamData_AffineNormal_ObjNormal_32x32,
|
||||
.anims = sAnims_BasicRock,
|
||||
.images = NULL,
|
||||
|
||||
@ -388,13 +388,9 @@ static void CompleteOnHealthbarDone(void)
|
||||
SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]);
|
||||
|
||||
if (hpValue != -1)
|
||||
{
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP);
|
||||
}
|
||||
else
|
||||
{
|
||||
LinkOpponentBufferExecCompleted();
|
||||
}
|
||||
}
|
||||
|
||||
static void HideHealthboxAfterMonFaint(void)
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#include "battle.h"
|
||||
#include "battle_ai_main.h"
|
||||
#include "battle_ai_util.h"
|
||||
#include "constants/battle_ai.h"
|
||||
#include "battle_anim.h"
|
||||
#include "battle_arena.h"
|
||||
#include "battle_controllers.h"
|
||||
@ -94,6 +95,7 @@ static void OpponentHandleResetActionMoveSelection(void);
|
||||
static void OpponentHandleEndLinkBattle(void);
|
||||
static void OpponentHandleDebugMenu(void);
|
||||
static void OpponentCmdEnd(void);
|
||||
static u8 CountAIAliveNonEggMonsExcept(u8 slotToIgnore);
|
||||
|
||||
static void OpponentBufferRunCommand(void);
|
||||
static void OpponentBufferExecCompleted(void);
|
||||
@ -409,9 +411,7 @@ static void CompleteOnHealthbarDone(void)
|
||||
s16 hpValue = MoveBattleBar(gActiveBattler, gHealthboxSpriteIds[gActiveBattler], HEALTH_BAR, 0);
|
||||
SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]);
|
||||
if (hpValue != -1)
|
||||
{
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP);
|
||||
}
|
||||
else
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
@ -1670,6 +1670,7 @@ static void OpponentHandleChooseItem(void)
|
||||
static void OpponentHandleChoosePokemon(void)
|
||||
{
|
||||
s32 chosenMonId;
|
||||
s32 pokemonInBattle = 1;
|
||||
|
||||
if (*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) == PARTY_SIZE)
|
||||
{
|
||||
@ -1687,15 +1688,20 @@ static void OpponentHandleChoosePokemon(void)
|
||||
{
|
||||
battler1 = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT);
|
||||
battler2 = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT);
|
||||
pokemonInBattle = 2;
|
||||
|
||||
}
|
||||
|
||||
GetAIPartyIndexes(gActiveBattler, &firstId, &lastId);
|
||||
|
||||
for (chosenMonId = firstId; chosenMonId < lastId; chosenMonId++)
|
||||
for (chosenMonId = (lastId-1); chosenMonId >= firstId; chosenMonId--)
|
||||
{
|
||||
if (GetMonData(&gEnemyParty[chosenMonId], MON_DATA_HP) != 0
|
||||
&& chosenMonId != gBattlerPartyIndexes[battler1]
|
||||
&& chosenMonId != gBattlerPartyIndexes[battler2])
|
||||
&& chosenMonId != gBattlerPartyIndexes[battler2]
|
||||
&& (!(AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON)
|
||||
|| chosenMonId != CalculateEnemyPartyCount() - 1
|
||||
|| CountAIAliveNonEggMonsExcept(PARTY_SIZE) == pokemonInBattle))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -1714,6 +1720,24 @@ static void OpponentHandleChoosePokemon(void)
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
static u8 CountAIAliveNonEggMonsExcept(u8 slotToIgnore)
|
||||
{
|
||||
u16 i, count;
|
||||
|
||||
for (i = 0, count = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (i != slotToIgnore
|
||||
&& GetMonData(&gEnemyParty[i], MON_DATA_SPECIES) != SPECIES_NONE
|
||||
&& !GetMonData(&gEnemyParty[i], MON_DATA_IS_EGG)
|
||||
&& GetMonData(&gEnemyParty[i], MON_DATA_HP) != 0)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
static void OpponentHandleCmd23(void)
|
||||
{
|
||||
OpponentBufferExecCompleted();
|
||||
|
||||
@ -375,13 +375,9 @@ static void CompleteOnHealthbarDone(void)
|
||||
SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]);
|
||||
|
||||
if (hpValue != -1)
|
||||
{
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP);
|
||||
}
|
||||
else
|
||||
{
|
||||
RecordedOpponentBufferExecCompleted();
|
||||
}
|
||||
}
|
||||
|
||||
static void HideHealthboxAfterMonFaint(void)
|
||||
|
||||
@ -670,18 +670,12 @@ static void PrepareBufferDataTransfer(u8 bufferId, u8 *data, u16 size)
|
||||
switch (bufferId)
|
||||
{
|
||||
case BUFFER_A:
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
for (i = 0; i < size; data++, i++)
|
||||
gBattleResources->bufferA[gActiveBattler][i] = *data;
|
||||
data++;
|
||||
}
|
||||
break;
|
||||
case BUFFER_B:
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
for (i = 0; i < size; data++, i++)
|
||||
gBattleResources->bufferB[gActiveBattler][i] = *data;
|
||||
data++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -818,8 +812,7 @@ static void Task_HandleSendLinkBuffersData(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
gTasks[taskId].data[13]--;
|
||||
if (gTasks[taskId].data[13] == 0)
|
||||
if (--gTasks[taskId].data[13] == 0)
|
||||
{
|
||||
gTasks[taskId].data[13] = 1;
|
||||
gTasks[taskId].data[11] = 3;
|
||||
@ -834,7 +827,7 @@ void TryReceiveLinkBattleData(void)
|
||||
s32 j;
|
||||
u8 *recvBuffer;
|
||||
|
||||
if (gReceivedRemoteLinkPlayers != 0 && (gBattleTypeFlags & BATTLE_TYPE_LINK_IN_BATTLE))
|
||||
if (gReceivedRemoteLinkPlayers && (gBattleTypeFlags & BATTLE_TYPE_LINK_IN_BATTLE))
|
||||
{
|
||||
DestroyTask_RfuIdle();
|
||||
for (i = 0; i < GetLinkPlayerCount(); i++)
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#include "menu_helpers.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "palette.h"
|
||||
#include "party_menu.h"
|
||||
#include "pokemon_icon.h"
|
||||
#include "sprite.h"
|
||||
#include "item.h"
|
||||
@ -30,6 +31,7 @@
|
||||
#include "reset_rtc_screen.h"
|
||||
#include "reshow_battle_screen.h"
|
||||
#include "constants/abilities.h"
|
||||
#include "constants/party_menu.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/rgb.h"
|
||||
@ -43,8 +45,8 @@ struct BattleDebugModifyArrows
|
||||
u16 minValue;
|
||||
u16 maxValue;
|
||||
int currValue;
|
||||
u8 currentDigit;
|
||||
u8 maxDigits;
|
||||
u8 currentDigit:4;
|
||||
u8 maxDigits:4;
|
||||
u8 charDigits[MAX_MODIFY_DIGITS];
|
||||
void *modifiedValPtr;
|
||||
u8 typeOfVal;
|
||||
@ -52,7 +54,9 @@ struct BattleDebugModifyArrows
|
||||
|
||||
struct BattleDebugMenu
|
||||
{
|
||||
u8 battlerId;
|
||||
u8 battlerId:2;
|
||||
u8 aiBattlerId:2;
|
||||
|
||||
u8 battlerWindowId;
|
||||
|
||||
u8 mainListWindowId;
|
||||
@ -72,11 +76,16 @@ struct BattleDebugMenu
|
||||
const struct BitfieldInfo *bitfield;
|
||||
bool8 battlerWasChanged[MAX_BATTLERS_COUNT];
|
||||
|
||||
u8 aiBattlerId;
|
||||
u8 aiViewState;
|
||||
u8 aiIconSpriteIds[MAX_BATTLERS_COUNT];
|
||||
|
||||
u8 aiMonSpriteId;
|
||||
u8 aiMovesWindowId;
|
||||
|
||||
union
|
||||
{
|
||||
u8 aiIconSpriteIds[MAX_BATTLERS_COUNT];
|
||||
u8 aiPartyIcons[PARTY_SIZE];
|
||||
} spriteIds;
|
||||
};
|
||||
|
||||
struct __attribute__((__packed__)) BitfieldInfo
|
||||
@ -102,6 +111,7 @@ enum
|
||||
LIST_ITEM_AI,
|
||||
LIST_ITEM_AI_MOVES_PTS,
|
||||
LIST_ITEM_AI_INFO,
|
||||
LIST_ITEM_AI_PARTY,
|
||||
LIST_ITEM_VARIOUS,
|
||||
LIST_ITEM_COUNT
|
||||
};
|
||||
@ -234,6 +244,7 @@ static const u8 sText_Unknown[] = _("Unknown");
|
||||
static const u8 sText_InLove[] = _("In Love");
|
||||
static const u8 sText_AIMovePts[] = _("AI Pts/Dmg");
|
||||
static const u8 sText_AiKnowledge[] = _("AI Info");
|
||||
static const u8 sText_AiParty[] = _("AI Party");
|
||||
static const u8 sText_EffectOverride[] = _("Effect Override");
|
||||
|
||||
static const u8 sText_EmptyString[] = _("");
|
||||
@ -340,6 +351,7 @@ static const struct ListMenuItem sMainListItems[] =
|
||||
{sText_AI, LIST_ITEM_AI},
|
||||
{sText_AIMovePts, LIST_ITEM_AI_MOVES_PTS},
|
||||
{sText_AiKnowledge, LIST_ITEM_AI_INFO},
|
||||
{sText_AiParty, LIST_ITEM_AI_PARTY},
|
||||
{sText_Various, LIST_ITEM_VARIOUS},
|
||||
};
|
||||
|
||||
@ -610,6 +622,7 @@ static void UpdateMonData(struct BattleDebugMenu *data);
|
||||
static u8 *GetSideStatusValue(struct BattleDebugMenu *data, bool32 changeStatus, bool32 statusTrue);
|
||||
static bool32 TryMoveDigit(struct BattleDebugModifyArrows *modArrows, bool32 moveUp);
|
||||
static void SwitchToDebugView(u8 taskId);
|
||||
static void SwitchToDebugViewFromAiParty(u8 taskId);
|
||||
|
||||
// code
|
||||
static struct BattleDebugMenu *GetStructPtr(u8 taskId)
|
||||
@ -725,9 +738,9 @@ static void PutMovesPointsText(struct BattleDebugMenu *data)
|
||||
AddTextPrinterParameterized(data->aiMovesWindowId, 1, text, 0, i * 15, 0, NULL);
|
||||
for (count = 0, j = 0; j < MAX_BATTLERS_COUNT; j++)
|
||||
{
|
||||
if (data->aiIconSpriteIds[j] == 0xFF)
|
||||
if (data->spriteIds.aiIconSpriteIds[j] == 0xFF)
|
||||
continue;
|
||||
battlerDef = gSprites[data->aiIconSpriteIds[j]].data[0];
|
||||
battlerDef = gSprites[data->spriteIds.aiIconSpriteIds[j]].data[0];
|
||||
ConvertIntToDecimalStringN(text,
|
||||
gBattleStruct->aiFinalScore[data->aiBattlerId][battlerDef][i],
|
||||
STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
@ -771,15 +784,15 @@ static void Task_ShowAiPoints(u8 taskId)
|
||||
{
|
||||
if (i != data->aiBattlerId && IsBattlerAlive(i))
|
||||
{
|
||||
data->aiIconSpriteIds[i] = CreateMonIcon(gBattleMons[i].species,
|
||||
data->spriteIds.aiIconSpriteIds[i] = CreateMonIcon(gBattleMons[i].species,
|
||||
SpriteCallbackDummy,
|
||||
95 + (count * 60), 17, 0, 0);
|
||||
gSprites[data->aiIconSpriteIds[i]].data[0] = i; // battler id
|
||||
gSprites[data->spriteIds.aiIconSpriteIds[i]].data[0] = i; // battler id
|
||||
count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
data->aiIconSpriteIds[i] = 0xFF;
|
||||
data->spriteIds.aiIconSpriteIds[i] = 0xFF;
|
||||
}
|
||||
}
|
||||
data->aiMonSpriteId = CreateMonPicSprite(gBattleMons[data->aiBattlerId].species,
|
||||
@ -817,25 +830,26 @@ static void SwitchToAiPointsView(u8 taskId)
|
||||
GetStructPtr(taskId)->aiViewState = 0;
|
||||
}
|
||||
|
||||
static const u8 *const sAiInfoItemNames[] =
|
||||
static const u8 *const sAiInfoItemNames[] =
|
||||
{
|
||||
sText_Ability,
|
||||
sText_HeldItem,
|
||||
sText_HoldEffect,
|
||||
};
|
||||
|
||||
static void PutAiInfoText(struct BattleDebugMenu *data)
|
||||
{
|
||||
u32 i, j, count;
|
||||
u8 *text = malloc(0x50);
|
||||
|
||||
FillWindowPixelBuffer(data->aiMovesWindowId, 0x11);
|
||||
|
||||
|
||||
// item names
|
||||
for (i = 0; i < ARRAY_COUNT(sAiInfoItemNames); i++)
|
||||
{
|
||||
AddTextPrinterParameterized(data->aiMovesWindowId, 1, sAiInfoItemNames[i], 3, i * 15, 0, NULL);
|
||||
}
|
||||
|
||||
|
||||
// items info
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
@ -855,6 +869,53 @@ static void PutAiInfoText(struct BattleDebugMenu *data)
|
||||
free(text);
|
||||
}
|
||||
|
||||
static void PutAiPartyText(struct BattleDebugMenu *data)
|
||||
{
|
||||
u32 i, j, count;
|
||||
u8 *text = malloc(0x50), *txtPtr;
|
||||
struct AiPartyMon *aiMons = AI_PARTY->mons[GET_BATTLER_SIDE(data->aiBattlerId)];
|
||||
|
||||
FillWindowPixelBuffer(data->aiMovesWindowId, 0x11);
|
||||
count = AI_PARTY->count[GET_BATTLER_SIDE(data->aiBattlerId)];
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if (aiMons[i].wasSentInBattle)
|
||||
{
|
||||
text[0] = CHAR_LV;
|
||||
txtPtr = ConvertIntToDecimalStringN(text + 1, aiMons[i].level, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
*txtPtr++ = CHAR_SPACE;
|
||||
if (aiMons[i].gender == MON_MALE)
|
||||
*txtPtr++ = CHAR_MALE;
|
||||
else if (aiMons[i].gender == MON_FEMALE)
|
||||
*txtPtr++ = CHAR_FEMALE;
|
||||
*txtPtr = EOS;
|
||||
AddTextPrinterParameterized5(data->aiMovesWindowId, FONT_SMALL_NARROW, text, i * 41, 0, 0, NULL, 0, 0);
|
||||
}
|
||||
|
||||
txtPtr = StringCopyN(text, gAbilityNames[aiMons[i].ability], 7); // The screen is too small to fit the whole string, so we need to drop the last letters.
|
||||
*txtPtr = EOS;
|
||||
AddTextPrinterParameterized5(data->aiMovesWindowId, FONT_SMALL_NARROW, text, i * 41, 15, 0, NULL, 0, 0);
|
||||
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
txtPtr = StringCopyN(text, gMoveNames[aiMons[i].moves[j]], 8);
|
||||
*txtPtr = EOS;
|
||||
AddTextPrinterParameterized5(data->aiMovesWindowId, FONT_SMALL_NARROW, text, i * 41, 35 + j * 15, 0, NULL, 0, 0);
|
||||
}
|
||||
|
||||
txtPtr = StringCopyN(text, GetHoldEffectName(aiMons[i].heldEffect), 7);
|
||||
*txtPtr = EOS;
|
||||
AddTextPrinterParameterized5(data->aiMovesWindowId, FONT_SMALL_NARROW, text, i * 41, 35 + j * 15, 0, NULL, 0, 0);
|
||||
|
||||
txtPtr = ConvertIntToDecimalStringN(text, aiMons[i].switchInCount, STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||
*txtPtr = EOS;
|
||||
AddTextPrinterParameterized5(data->aiMovesWindowId, FONT_SMALL_NARROW, text, i * 41, 35 + (j + 1) * 15, 0, NULL, 0, 0);
|
||||
}
|
||||
|
||||
CopyWindowToVram(data->aiMovesWindowId, 3);
|
||||
free(text);
|
||||
}
|
||||
|
||||
static void Task_ShowAiKnowledge(u8 taskId)
|
||||
{
|
||||
u32 i, count;
|
||||
@ -880,15 +941,15 @@ static void Task_ShowAiKnowledge(u8 taskId)
|
||||
{
|
||||
if (GET_BATTLER_SIDE(i) == B_SIDE_PLAYER && IsBattlerAlive(i))
|
||||
{
|
||||
data->aiIconSpriteIds[i] = CreateMonIcon(gBattleMons[i].species,
|
||||
data->spriteIds.aiIconSpriteIds[i] = CreateMonIcon(gBattleMons[i].species,
|
||||
SpriteCallbackDummy,
|
||||
95 + (count * 80), 17, 0, 0);
|
||||
gSprites[data->aiIconSpriteIds[i]].data[0] = i; // battler id
|
||||
gSprites[data->spriteIds.aiIconSpriteIds[i]].data[0] = i; // battler id
|
||||
count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
data->aiIconSpriteIds[i] = 0xFF;
|
||||
data->spriteIds.aiIconSpriteIds[i] = 0xFF;
|
||||
}
|
||||
}
|
||||
data->aiMonSpriteId = CreateMonPicSprite(gBattleMons[data->aiBattlerId].species,
|
||||
@ -919,12 +980,102 @@ static void Task_ShowAiKnowledge(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
#define sConditionSpriteId data[1]
|
||||
|
||||
static void Task_ShowAiParty(u8 taskId)
|
||||
{
|
||||
u32 i, ailment;
|
||||
struct WindowTemplate winTemplate;
|
||||
struct AiPartyMon *aiMons;
|
||||
struct BattleDebugMenu *data = GetStructPtr(taskId);
|
||||
|
||||
switch (data->aiViewState)
|
||||
{
|
||||
case 0:
|
||||
HideBg(0);
|
||||
ShowBg(1);
|
||||
|
||||
LoadMonIconPalettes();
|
||||
LoadPartyMenuAilmentGfx();
|
||||
data->aiBattlerId = data->battlerId;
|
||||
aiMons = AI_PARTY->mons[GET_BATTLER_SIDE(data->aiBattlerId)];
|
||||
for (i = 0; i < AI_PARTY->count[GET_BATTLER_SIDE(data->aiBattlerId)]; i++)
|
||||
{
|
||||
u16 species = SPECIES_NONE; // Question mark
|
||||
if (aiMons[i].wasSentInBattle && aiMons[i].species)
|
||||
species = aiMons[i].species;
|
||||
data->spriteIds.aiPartyIcons[i] = CreateMonIcon(species, SpriteCallbackDummy, (i * 41) + 15, 7, 1, 0);
|
||||
gSprites[data->spriteIds.aiPartyIcons[i]].oam.priority = 0;
|
||||
|
||||
gSprites[data->spriteIds.aiPartyIcons[i]].sConditionSpriteId = CreateSprite(&gSpriteTemplate_StatusIcons, (i * 41) + 15, 7, 0);
|
||||
gSprites[gSprites[data->spriteIds.aiPartyIcons[i]].sConditionSpriteId].oam.priority = 0;
|
||||
if (aiMons[i].isFainted)
|
||||
ailment = AILMENT_FNT;
|
||||
else if (aiMons[i].status)
|
||||
ailment = GetAilmentFromStatus(aiMons[i].status);
|
||||
else
|
||||
ailment = AILMENT_FNT + 1; // blank
|
||||
StartSpriteAnim(&gSprites[gSprites[data->spriteIds.aiPartyIcons[i]].sConditionSpriteId], ailment - 1);
|
||||
}
|
||||
for (; i < PARTY_SIZE; i++)
|
||||
data->spriteIds.aiPartyIcons[i] = 0xFF;
|
||||
data->aiViewState++;
|
||||
break;
|
||||
// Put text
|
||||
case 1:
|
||||
winTemplate = CreateWindowTemplate(1, 0, 3, 29, 16, 15, 0x150);
|
||||
data->aiMovesWindowId = AddWindow(&winTemplate);
|
||||
PutWindowTilemap(data->aiMovesWindowId);
|
||||
PutAiPartyText(data);
|
||||
data->aiViewState++;
|
||||
break;
|
||||
// Input
|
||||
case 2:
|
||||
if (gMain.newKeys & (SELECT_BUTTON | B_BUTTON))
|
||||
{
|
||||
SwitchToDebugViewFromAiParty(taskId);
|
||||
HideBg(1);
|
||||
ShowBg(0);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void SwitchToAiInfoView(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].func = Task_ShowAiKnowledge;
|
||||
GetStructPtr(taskId)->aiViewState = 0;
|
||||
}
|
||||
|
||||
static void SwitchToAiPartyView(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].func = Task_ShowAiParty;
|
||||
GetStructPtr(taskId)->aiViewState = 0;
|
||||
}
|
||||
|
||||
static void SwitchToDebugViewFromAiParty(u8 taskId)
|
||||
{
|
||||
u32 i;
|
||||
struct BattleDebugMenu *data = GetStructPtr(taskId);
|
||||
|
||||
FreeMonIconPalettes();
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (data->spriteIds.aiPartyIcons[i] != 0xFF)
|
||||
{
|
||||
DestroySpriteAndFreeResources(&gSprites[gSprites[data->spriteIds.aiPartyIcons[i]].sConditionSpriteId]);
|
||||
FreeAndDestroyMonIconSprite(&gSprites[data->spriteIds.aiPartyIcons[i]]);
|
||||
}
|
||||
}
|
||||
ClearWindowTilemap(data->aiMovesWindowId);
|
||||
RemoveWindow(data->aiMovesWindowId);
|
||||
|
||||
gTasks[taskId].func = Task_DebugMenuProcessInput;
|
||||
}
|
||||
|
||||
#undef sConditionSpriteId
|
||||
|
||||
static void SwitchToDebugView(u8 taskId)
|
||||
{
|
||||
u32 i;
|
||||
@ -933,10 +1084,11 @@ static void SwitchToDebugView(u8 taskId)
|
||||
FreeMonIconPalettes();
|
||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
{
|
||||
if (data->aiIconSpriteIds[i] != 0xFF)
|
||||
FreeAndDestroyMonIconSprite(&gSprites[data->aiIconSpriteIds[i]]);
|
||||
if (data->spriteIds.aiIconSpriteIds[i] != 0xFF)
|
||||
FreeAndDestroyMonIconSprite(&gSprites[data->spriteIds.aiIconSpriteIds[i]]);
|
||||
}
|
||||
FreeAndDestroyMonPicSprite(data->aiMonSpriteId);
|
||||
ClearWindowTilemap(data->aiMovesWindowId);
|
||||
RemoveWindow(data->aiMovesWindowId);
|
||||
|
||||
gTasks[taskId].func = Task_DebugMenuProcessInput;
|
||||
@ -991,6 +1143,11 @@ static void Task_DebugMenuProcessInput(u8 taskId)
|
||||
SwitchToAiInfoView(taskId);
|
||||
return;
|
||||
}
|
||||
else if (listItemId == LIST_ITEM_AI_PARTY && gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
SwitchToAiPartyView(taskId);
|
||||
return;
|
||||
}
|
||||
data->currentMainListItemId = listItemId;
|
||||
|
||||
// Create the secondary menu list.
|
||||
@ -2004,7 +2161,7 @@ static const u8 sText_HoldEffectRoomService[] = _("Room Service");
|
||||
static const u8 sText_HoldEffectBlunderPolicy[] = _("Blunder Policy");
|
||||
static const u8 sText_HoldEffectHeavyDutyBoots[] = _("Heavy Duty Boots");
|
||||
static const u8 sText_HoldEffectThroatSpray[] = _("Throat Spray");
|
||||
static const u8 *const sHoldEffectNames[] =
|
||||
static const u8 *const sHoldEffectNames[] =
|
||||
{
|
||||
[HOLD_EFFECT_NONE] = sText_HoldEffectNone,
|
||||
[HOLD_EFFECT_RESTORE_HP] = sText_HoldEffectRestoreHp,
|
||||
|
||||
@ -3123,9 +3123,6 @@ void CreateAbilityPopUp(u8 battlerId, u32 ability, bool32 isDoubleBattle)
|
||||
const s16 (*coords)[2];
|
||||
u8 spriteId1, spriteId2, battlerPosition, taskId;
|
||||
|
||||
|
||||
return;
|
||||
|
||||
if (gBattleScripting.abilityPopupOverwrite != 0)
|
||||
ability = gBattleScripting.abilityPopupOverwrite;
|
||||
|
||||
|
||||
@ -481,6 +481,7 @@ void CB2_InitBattle(void)
|
||||
static void CB2_InitBattleInternal(void)
|
||||
{
|
||||
s32 i;
|
||||
u16 targetSpecies;
|
||||
|
||||
SetHBlankCallback(NULL);
|
||||
SetVBlankCallback(NULL);
|
||||
@ -571,6 +572,27 @@ static void CB2_InitBattleInternal(void)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
AdjustFriendship(&gPlayerParty[i], FRIENDSHIP_EVENT_LEAGUE_BATTLE);
|
||||
|
||||
// Apply party-wide start-of-battle form changes
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
// Player's side
|
||||
targetSpecies = GetFormChangeTargetSpecies(&gPlayerParty[i], FORM_BATTLE_BEGIN, 0);
|
||||
if (targetSpecies != SPECIES_NONE)
|
||||
{
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_SPECIES, &targetSpecies);
|
||||
CalculateMonStats(&gPlayerParty[i]);
|
||||
TryToSetBattleFormChangeMoves(&gPlayerParty[i]);
|
||||
}
|
||||
// Opponent's side
|
||||
targetSpecies = GetFormChangeTargetSpecies(&gEnemyParty[i], FORM_BATTLE_BEGIN, 0);
|
||||
if (targetSpecies != SPECIES_NONE)
|
||||
{
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_SPECIES, &targetSpecies);
|
||||
CalculateMonStats(&gEnemyParty[i]);
|
||||
TryToSetBattleFormChangeMoves(&gEnemyParty[i]);
|
||||
}
|
||||
}
|
||||
|
||||
gBattleCommunication[MULTIUSE_STATE] = 0;
|
||||
}
|
||||
|
||||
@ -846,7 +868,7 @@ static void CB2_HandleStartBattle(void)
|
||||
case 1:
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers != 0)
|
||||
if (gReceivedRemoteLinkPlayers)
|
||||
{
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
@ -1053,7 +1075,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
case 1:
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers != 0)
|
||||
if (gReceivedRemoteLinkPlayers)
|
||||
{
|
||||
u8 language;
|
||||
|
||||
@ -1320,7 +1342,7 @@ static void CB2_PreInitMultiBattle(void)
|
||||
switch (gBattleCommunication[MULTIUSE_STATE])
|
||||
{
|
||||
case 0:
|
||||
if (gReceivedRemoteLinkPlayers != 0 && IsLinkTaskFinished())
|
||||
if (gReceivedRemoteLinkPlayers && IsLinkTaskFinished())
|
||||
{
|
||||
sMultiPartnerPartyBuffer = Alloc(sizeof(gMultiPartnerParty));
|
||||
SetMultiPartnerMenuParty(0);
|
||||
@ -1456,7 +1478,7 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
case 1:
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers != 0)
|
||||
if (gReceivedRemoteLinkPlayers)
|
||||
{
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
@ -2918,6 +2940,7 @@ static void BattleStartClearSetData(void)
|
||||
gBattleStruct->lastTakenMoveFrom[i][3] = MOVE_NONE;
|
||||
gBattleStruct->AI_monToSwitchIntoId[i] = PARTY_SIZE;
|
||||
gBattleStruct->skyDropTargets[i] = 0xFF;
|
||||
gBattleStruct->overwrittenAbilities[i] = ABILITY_NONE;
|
||||
}
|
||||
|
||||
gLastUsedMove = 0;
|
||||
@ -3104,10 +3127,10 @@ void SwitchInClearSetData(void)
|
||||
// Reset damage to prevent things like red card activating if the switched-in mon is holding it
|
||||
gSpecialStatuses[gActiveBattler].physicalDmg = 0;
|
||||
gSpecialStatuses[gActiveBattler].specialDmg = 0;
|
||||
|
||||
gBattleStruct->overwrittenAbilities[gActiveBattler] = ABILITY_NONE;
|
||||
|
||||
ClearBattlerMoveHistory(gActiveBattler);
|
||||
ClearBattlerAbilityHistory(gActiveBattler);
|
||||
ClearBattlerItemEffectHistory(gActiveBattler);
|
||||
Ai_UpdateSwitchInData(gActiveBattler);
|
||||
}
|
||||
|
||||
void FaintClearSetData(void)
|
||||
@ -3203,13 +3226,13 @@ void FaintClearSetData(void)
|
||||
gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2;
|
||||
gBattleMons[gActiveBattler].type3 = TYPE_MYSTERY;
|
||||
|
||||
ClearBattlerMoveHistory(gActiveBattler);
|
||||
ClearBattlerAbilityHistory(gActiveBattler);
|
||||
ClearBattlerItemEffectHistory(gActiveBattler);
|
||||
Ai_UpdateFaintData(gActiveBattler);
|
||||
UndoFormChange(gBattlerPartyIndexes[gActiveBattler], GET_BATTLER_SIDE(gActiveBattler), FALSE);
|
||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER)
|
||||
UndoMegaEvolution(gBattlerPartyIndexes[gActiveBattler]);
|
||||
|
||||
gBattleStruct->overwrittenAbilities[gActiveBattler] = ABILITY_NONE;
|
||||
|
||||
// If the fainted mon was involved in a Sky Drop
|
||||
if (gBattleStruct->skyDropTargets[gActiveBattler] != 0xFF)
|
||||
{
|
||||
@ -3568,7 +3591,8 @@ static void DoBattleIntro(void)
|
||||
gBattleStruct->switchInAbilitiesCounter = 0;
|
||||
gBattleStruct->switchInItemsCounter = 0;
|
||||
gBattleStruct->overworldWeatherDone = FALSE;
|
||||
|
||||
GetAiLogicData(); // get assumed abilities, hold effects, etc of all battlers
|
||||
Ai_InitPartyStruct(); // Save mons party counts, and first 2/4 mons on the battlefield.
|
||||
gBattleMainFunc = TryDoEventsBeforeFirstTurn;
|
||||
}
|
||||
break;
|
||||
@ -4006,6 +4030,16 @@ static void HandleTurnActionSelectionState(void)
|
||||
}
|
||||
break;
|
||||
case B_ACTION_USE_ITEM:
|
||||
if (FlagGet(B_FLAG_NO_BAG_USE))
|
||||
{
|
||||
RecordedBattle_ClearBattlerAction(gActiveBattler, 1);
|
||||
gSelectionBattleScripts[gActiveBattler] = BattleScript_ActionSelectionItemsCantBeUsed;
|
||||
gBattleCommunication[gActiveBattler] = STATE_SELECTION_SCRIPT;
|
||||
*(gBattleStruct->selectionScriptFinished + gActiveBattler) = FALSE;
|
||||
*(gBattleStruct->stateIdAfterSelScript + gActiveBattler) = STATE_BEFORE_ACTION_CHOSEN;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((gBattleTypeFlags & (BATTLE_TYPE_LINK
|
||||
| BATTLE_TYPE_FRONTIER_NO_PYRAMID
|
||||
| BATTLE_TYPE_EREADER_TRAINER
|
||||
@ -5274,7 +5308,7 @@ static void ReturnFromBattleToOverworld(void)
|
||||
PartySpreadPokerus(gPlayerParty);
|
||||
}
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK && gReceivedRemoteLinkPlayers != 0)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK && gReceivedRemoteLinkPlayers)
|
||||
return;
|
||||
|
||||
gSpecialVar_Result = gBattleOutcome;
|
||||
|
||||
@ -607,7 +607,7 @@ static const u8 sText_HarvestBerry[] = _("{B_ATK_NAME_WITH_PREFIX} harvested\nit
|
||||
static const u8 sText_LastAbilityRaisedBuff1[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_LAST_ABILITY}\nraised its {B_BUFF1}!");
|
||||
static const u8 sText_MagicBounceActivates[] = _("The {B_DEF_NAME_WITH_PREFIX} bounced the\n{B_ATK_NAME_WITH_PREFIX} back!");
|
||||
static const u8 sText_ProteanTypeChange[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY} transformed\nit into the {B_BUFF1} type!");
|
||||
static const u8 sText_SymbiosisItemPass[] = _("{B_ATK_NAME_WITH_PREFIX} passed its {B_LAST_ITEM}\nto {B_SCR_ACTIVE_NAME_WITH_PREFIX} through {B_ATK_ABILITY}!");
|
||||
static const u8 sText_SymbiosisItemPass[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} passed its {B_LAST_ITEM}\nto {B_ATK_NAME_WITH_PREFIX} through {B_LAST_ABILITY}!");
|
||||
static const u8 sText_StealthRockDmg[] = _("Pointed stones dug into\n{B_SCR_ACTIVE_NAME_WITH_PREFIX}!");
|
||||
static const u8 sText_ToxicSpikesAbsorbed[] = _("The poison spikes disappeared\nfrom around the opposing team's feet!");
|
||||
static const u8 sText_ToxicSpikesPoisoned[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} was poisoned!");
|
||||
@ -1383,7 +1383,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
[STRINGID_TARGETTOOHEAVY - BATTLESTRINGS_TABLE_START] = sText_TargetTooHeavy,
|
||||
};
|
||||
|
||||
const u16 gZEffectStringIds[] =
|
||||
const u16 gZEffectStringIds[] =
|
||||
{
|
||||
[B_MSG_Z_RESET_STATS] = STRINGID_ZMOVERESETSSTATS,
|
||||
[B_MSG_Z_ALL_STATS_UP]= STRINGID_ZMOVEALLSTATSUP,
|
||||
@ -1394,7 +1394,7 @@ const u16 gZEffectStringIds[] =
|
||||
[B_MSG_Z_HP_TRAP] = STRINGID_ZMOVEHPTRAP,
|
||||
};
|
||||
|
||||
const u16 gMentalHerbCureStringIds[] =
|
||||
const u16 gMentalHerbCureStringIds[] =
|
||||
{
|
||||
[B_MSG_MENTALHERBCURE_INFATUATION] = STRINGID_ATKGOTOVERINFATUATION,
|
||||
[B_MSG_MENTALHERBCURE_TAUNT] = STRINGID_BUFFERENDS,
|
||||
@ -1409,7 +1409,7 @@ const u16 gTerrainStringIds[] =
|
||||
STRINGID_TERRAINBECOMESMISTY, STRINGID_TERRAINBECOMESGRASSY, STRINGID_TERRAINBECOMESELECTRIC, STRINGID_TERRAINBECOMESPSYCHIC, STRINGID_TERRAINREMOVED,
|
||||
};
|
||||
|
||||
const u16 gTerrainEndingStringIds[] =
|
||||
const u16 gTerrainEndingStringIds[] =
|
||||
{
|
||||
STRINGID_MISTYTERRAINENDS, STRINGID_GRASSYTERRAINENDS, STRINGID_ELECTRICTERRAINENDS, STRINGID_PSYCHICTERRAINENDS
|
||||
};
|
||||
|
||||
@ -317,6 +317,7 @@ static void PutMonIconOnLvlUpBanner(void);
|
||||
static void DrawLevelUpBannerText(void);
|
||||
static void SpriteCB_MonIconOnLvlUpBanner(struct Sprite *sprite);
|
||||
static bool32 CriticalCapture(u32 odds);
|
||||
static void BestowItem(u32 battlerAtk, u32 battlerDef);
|
||||
|
||||
static void Cmd_attackcanceler(void);
|
||||
static void Cmd_accuracycheck(void);
|
||||
@ -548,8 +549,8 @@ static void Cmd_switchoutabilities(void);
|
||||
static void Cmd_jumpifhasnohp(void);
|
||||
static void Cmd_getsecretpowereffect(void);
|
||||
static void Cmd_pickup(void);
|
||||
static void Cmd_docastformchangeanimation(void);
|
||||
static void Cmd_trycastformdatachange(void);
|
||||
static void Cmd_doweatherformchangeanimation(void);
|
||||
static void Cmd_tryweatherformdatachange(void);
|
||||
static void Cmd_settypebasedhalvers(void);
|
||||
static void Cmd_jumpifsubstituteblocks(void);
|
||||
static void Cmd_tryrecycleitem(void);
|
||||
@ -807,8 +808,8 @@ void (* const gBattleScriptingCommandsTable[])(void) =
|
||||
Cmd_jumpifhasnohp, //0xE3
|
||||
Cmd_getsecretpowereffect, //0xE4
|
||||
Cmd_pickup, //0xE5
|
||||
Cmd_docastformchangeanimation, //0xE6
|
||||
Cmd_trycastformdatachange, //0xE7
|
||||
Cmd_doweatherformchangeanimation, //0xE6
|
||||
Cmd_tryweatherformdatachange, //0xE7
|
||||
Cmd_settypebasedhalvers, //0xE8
|
||||
Cmd_jumpifsubstituteblocks, //0xE9
|
||||
Cmd_tryrecycleitem, //0xEA
|
||||
@ -5084,6 +5085,15 @@ static bool32 TryKnockOffBattleScript(u32 battlerDef)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#define SYMBIOSIS_CHECK(battler, ally) \
|
||||
GetBattlerAbility(ally) == ABILITY_SYMBIOSIS \
|
||||
&& gBattleMons[battler].item == ITEM_NONE \
|
||||
&& gBattleMons[ally].item != ITEM_NONE \
|
||||
&& CanBattlerGetOrLoseItem(battler, gBattleMons[ally].item) \
|
||||
&& CanBattlerGetOrLoseItem(ally, gBattleMons[ally].item) \
|
||||
&& gBattleMons[battler].hp != 0 \
|
||||
&& gBattleMons[ally].hp != 0
|
||||
|
||||
static u32 GetNextTarget(u32 moveTarget)
|
||||
{
|
||||
u32 i;
|
||||
@ -5742,6 +5752,48 @@ static void Cmd_moveend(void)
|
||||
}
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
case MOVEEND_WEATHER_FORM:
|
||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
{
|
||||
switch (gBattleMons[i].species)
|
||||
{
|
||||
case SPECIES_CASTFORM:
|
||||
case SPECIES_CASTFORM_RAINY:
|
||||
case SPECIES_CASTFORM_SNOWY:
|
||||
case SPECIES_CASTFORM_SUNNY:
|
||||
case SPECIES_CHERRIM:
|
||||
case SPECIES_CHERRIM_SUNSHINE:
|
||||
effect = TryWeatherFormChange(i);
|
||||
if (effect)
|
||||
{
|
||||
BattleScriptPushCursorAndCallback(BattleScript_WeatherFormChange);
|
||||
gBattleScripting.battler = i;
|
||||
gBattleStruct->formToChangeInto = effect - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
case MOVEEND_SYMBIOSIS:
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
if ((gSpecialStatuses[i].berryReduced
|
||||
#if B_SYMBIOSIS_GEMS >= GEN_7
|
||||
|| gSpecialStatuses[i].gemBoost
|
||||
#endif
|
||||
) && SYMBIOSIS_CHECK(i, BATTLE_PARTNER(i)))
|
||||
{
|
||||
BestowItem(BATTLE_PARTNER(i), i);
|
||||
gLastUsedAbility = gBattleMons[BATTLE_PARTNER(i)].ability;
|
||||
gBattleScripting.battler = gBattlerAbility = BATTLE_PARTNER(i);
|
||||
gBattlerAttacker = i;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_SymbiosisActivates;
|
||||
effect = TRUE;
|
||||
}
|
||||
}
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
case MOVEEND_CLEAR_BITS: // Clear/Set bits for things like using a move for all targets and all hits.
|
||||
if (gSpecialStatuses[gBattlerAttacker].instructedChosenTarget)
|
||||
*(gBattleStruct->moveTarget + gBattlerAttacker) = gSpecialStatuses[gBattlerAttacker].instructedChosenTarget & 0x3;
|
||||
@ -6571,7 +6623,7 @@ static void Cmd_switchineffects(void)
|
||||
|| ItemBattleEffects(ITEMEFFECT_ON_SWITCH_IN, gActiveBattler, FALSE)
|
||||
|| AbilityBattleEffects(ABILITYEFFECT_INTIMIDATE2, 0, 0, 0, 0)
|
||||
|| AbilityBattleEffects(ABILITYEFFECT_TRACE2, 0, 0, 0, 0)
|
||||
|| AbilityBattleEffects(ABILITYEFFECT_FORECAST, 0, 0, 0, 0))
|
||||
|| AbilityBattleEffects(ABILITYEFFECT_WEATHER_FORM, 0, 0, 0, 0))
|
||||
return;
|
||||
|
||||
gSideStatuses[GetBattlerSide(gActiveBattler)] &= ~(SIDE_STATUS_SPIKES_DAMAGED | SIDE_STATUS_TOXIC_SPIKES_DAMAGED | SIDE_STATUS_STEALTH_ROCK_DAMAGED | SIDE_STATUS_STICKY_WEB_DAMAGED);
|
||||
@ -7220,6 +7272,49 @@ static bool32 TryCheekPouch(u32 battlerId, u32 itemId)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Used by Bestow and Symbiosis to take an item from one battler and give to another.
|
||||
static void BestowItem(u32 battlerAtk, u32 battlerDef)
|
||||
{
|
||||
gLastUsedItem = gBattleMons[battlerAtk].item;
|
||||
|
||||
gActiveBattler = battlerAtk;
|
||||
gBattleMons[battlerAtk].item = ITEM_NONE;
|
||||
BtlController_EmitSetMonData(BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gBattleMons[battlerAtk].item), &gBattleMons[battlerAtk].item);
|
||||
MarkBattlerForControllerExec(battlerAtk);
|
||||
CheckSetUnburden(battlerAtk);
|
||||
|
||||
gActiveBattler = battlerDef;
|
||||
gBattleMons[battlerDef].item = gLastUsedItem;
|
||||
BtlController_EmitSetMonData(BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gBattleMons[battlerDef].item), &gBattleMons[battlerDef].item);
|
||||
MarkBattlerForControllerExec(battlerDef);
|
||||
gBattleResources->flags->flags[battlerDef] &= ~RESOURCE_FLAG_UNBURDEN;
|
||||
}
|
||||
|
||||
// Called by Cmd_removeitem. itemId represents the item that was removed, not being given.
|
||||
static bool32 TrySymbiosis(u32 battler, u32 itemId)
|
||||
{
|
||||
if (!gBattleStruct->itemStolen[gBattlerPartyIndexes[battler]].stolen
|
||||
&& gBattleStruct->changedItems[battler] == ITEM_NONE
|
||||
&& GetBattlerHoldEffect(battler, TRUE) != HOLD_EFFECT_EJECT_BUTTON
|
||||
&& GetBattlerHoldEffect(battler, TRUE) != HOLD_EFFECT_EJECT_PACK
|
||||
#if B_SYMBIOSIS_GEMS >= GEN_7
|
||||
&& !(gSpecialStatuses[battler].gemBoost)
|
||||
#endif
|
||||
&& gCurrentMove != MOVE_FLING //Fling and damage-reducing berries are handled separately.
|
||||
&& !gSpecialStatuses[battler].berryReduced
|
||||
&& SYMBIOSIS_CHECK(battler, BATTLE_PARTNER(battler)))
|
||||
{
|
||||
BestowItem(BATTLE_PARTNER(battler), battler);
|
||||
gLastUsedAbility = gBattleMons[BATTLE_PARTNER(battler)].ability;
|
||||
gBattleScripting.battler = gBattlerAbility = BATTLE_PARTNER(battler);
|
||||
gBattlerAttacker = battler;
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 2);
|
||||
gBattlescriptCurrInstr = BattleScript_SymbiosisActivates;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Cmd_removeitem(void)
|
||||
{
|
||||
u16 itemId = 0;
|
||||
@ -7238,7 +7333,7 @@ static void Cmd_removeitem(void)
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
|
||||
ClearBattlerItemEffectHistory(gActiveBattler);
|
||||
if (!TryCheekPouch(gActiveBattler, itemId))
|
||||
if (!TryCheekPouch(gActiveBattler, itemId) && !TrySymbiosis(gActiveBattler, itemId))
|
||||
gBattlescriptCurrInstr += 2;
|
||||
}
|
||||
|
||||
@ -8089,8 +8184,7 @@ static void Cmd_various(void)
|
||||
gBattlescriptCurrInstr += 8;
|
||||
return;
|
||||
case VARIOUS_TRACE_ABILITY:
|
||||
gBattleMons[gActiveBattler].ability = gBattleStruct->tracedAbility[gActiveBattler];
|
||||
RecordAbilityBattle(gActiveBattler, gBattleMons[gActiveBattler].ability);
|
||||
gBattleMons[gActiveBattler].ability = gBattleStruct->overwrittenAbilities[gActiveBattler] = gBattleStruct->tracedAbility[gActiveBattler];
|
||||
break;
|
||||
case VARIOUS_TRY_ILLUSION_OFF:
|
||||
if (GetIllusionMonPtr(gActiveBattler) != NULL)
|
||||
@ -8565,7 +8659,7 @@ static void Cmd_various(void)
|
||||
if (gBattleMons[gBattlerTarget].ability == ABILITY_NEUTRALIZING_GAS)
|
||||
gSpecialStatuses[gBattlerTarget].neutralizingGasRemoved = TRUE;
|
||||
|
||||
gBattleMons[gBattlerTarget].ability = ABILITY_SIMPLE;
|
||||
gBattleMons[gBattlerTarget].ability = gBattleStruct->overwrittenAbilities[gBattlerTarget] = ABILITY_SIMPLE;
|
||||
gBattlescriptCurrInstr += 7;
|
||||
}
|
||||
return;
|
||||
@ -8583,7 +8677,7 @@ static void Cmd_various(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleMons[gBattlerTarget].ability = gBattleMons[gBattlerAttacker].ability;
|
||||
gBattleMons[gBattlerTarget].ability = gBattleStruct->overwrittenAbilities[gBattlerTarget] = gBattleMons[gBattlerAttacker].ability;
|
||||
gBattlescriptCurrInstr += 7;
|
||||
}
|
||||
return;
|
||||
@ -9053,20 +9147,7 @@ static void Cmd_various(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
gLastUsedItem = gBattleMons[gBattlerAttacker].item;
|
||||
|
||||
gActiveBattler = gBattlerAttacker;
|
||||
gBattleMons[gActiveBattler].item = ITEM_NONE;
|
||||
BtlController_EmitSetMonData(BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].item), &gBattleMons[gActiveBattler].item);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
CheckSetUnburden(gBattlerAttacker);
|
||||
|
||||
gActiveBattler = gBattlerTarget;
|
||||
gBattleMons[gActiveBattler].item = gLastUsedItem;
|
||||
BtlController_EmitSetMonData(BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].item), &gBattleMons[gActiveBattler].item);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
gBattleResources->flags->flags[gBattlerTarget] &= ~RESOURCE_FLAG_UNBURDEN;
|
||||
|
||||
BestowItem(gBattlerAttacker, gBattlerTarget);
|
||||
gBattlescriptCurrInstr += 7;
|
||||
}
|
||||
return;
|
||||
@ -9796,6 +9877,18 @@ static void Cmd_various(void)
|
||||
case VARIOUS_SWAP_SIDE_STATUSES:
|
||||
CourtChangeSwapSideStatuses();
|
||||
break;
|
||||
case VARIOUS_TRY_SYMBIOSIS: //called by Bestow, Fling, and Bug Bite, which don't work with Cmd_removeitem.
|
||||
if (SYMBIOSIS_CHECK(gActiveBattler, BATTLE_PARTNER(gActiveBattler)))
|
||||
{
|
||||
BestowItem(BATTLE_PARTNER(gActiveBattler), gActiveBattler);
|
||||
gLastUsedAbility = gBattleMons[BATTLE_PARTNER(gActiveBattler)].ability;
|
||||
gBattleScripting.battler = gBattlerAbility = BATTLE_PARTNER(gActiveBattler);
|
||||
gBattlerAttacker = gActiveBattler;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_SymbiosisActivates;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case VARIOUS_CAN_TELEPORT:
|
||||
gBattleCommunication[0] = CanTeleport(gActiveBattler);
|
||||
break;
|
||||
@ -11405,7 +11498,8 @@ static void Cmd_transformdataexecution(void)
|
||||
|
||||
for (i = 0; i < offsetof(struct BattlePokemon, pp); i++)
|
||||
battleMonAttacker[i] = battleMonTarget[i];
|
||||
|
||||
|
||||
gBattleStruct->overwrittenAbilities[gBattlerAttacker] = GetBattlerAbility(gBattlerTarget);
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
if (gBattleMoves[gBattleMons[gBattlerAttacker].moves[i]].pp < 5)
|
||||
@ -11489,9 +11583,23 @@ static void Cmd_mimicattackcopy(void)
|
||||
|
||||
static void Cmd_metronome(void)
|
||||
{
|
||||
#if B_METRONOME_MOVES >= GEN_8
|
||||
u16 moveCount = MOVES_COUNT_GEN8;
|
||||
#elif B_METRONOME_MOVES >= GEN_7
|
||||
u16 moveCount = MOVES_COUNT_GEN7;
|
||||
#elif B_METRONOME_MOVES >= GEN_6
|
||||
u16 moveCount = MOVES_COUNT_GEN6;
|
||||
#elif B_METRONOME_MOVES >= GEN_5
|
||||
u16 moveCount = MOVES_COUNT_GEN5;
|
||||
#elif B_METRONOME_MOVES >= GEN_4
|
||||
u16 moveCount = MOVES_COUNT_GEN4;
|
||||
#elif B_METRONOME_MOVES >= GEN_3
|
||||
u16 moveCount = MOVES_COUNT_GEN3;
|
||||
#endif
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
gCurrentMove = (Random() % (MOVES_COUNT - 1)) + 1;
|
||||
gCurrentMove = (Random() % (moveCount - 1)) + 1;
|
||||
if (gBattleMoves[gCurrentMove].effect == EFFECT_PLACEHOLDER)
|
||||
continue;
|
||||
|
||||
@ -12915,7 +13023,7 @@ static void Cmd_trycopyability(void)
|
||||
else
|
||||
{
|
||||
gBattleScripting.abilityPopupOverwrite = gBattleMons[gBattlerAttacker].ability;
|
||||
gBattleMons[gBattlerAttacker].ability = defAbility;
|
||||
gBattleMons[gBattlerAttacker].ability = gBattleStruct->overwrittenAbilities[gBattlerAttacker] = defAbility;
|
||||
gLastUsedAbility = defAbility;
|
||||
gBattlescriptCurrInstr += 5;
|
||||
}
|
||||
@ -13081,8 +13189,8 @@ static void Cmd_tryswapabilities(void)
|
||||
else
|
||||
{
|
||||
u16 abilityAtk = gBattleMons[gBattlerAttacker].ability;
|
||||
gBattleMons[gBattlerAttacker].ability = gBattleMons[gBattlerTarget].ability;
|
||||
gBattleMons[gBattlerTarget].ability = abilityAtk;
|
||||
gBattleMons[gBattlerAttacker].ability = gBattleStruct->overwrittenAbilities[gBattlerAttacker] = gBattleMons[gBattlerTarget].ability;
|
||||
gBattleMons[gBattlerTarget].ability = gBattleStruct->overwrittenAbilities[gBattlerTarget] = abilityAtk;
|
||||
|
||||
gBattlescriptCurrInstr += 5;
|
||||
}
|
||||
@ -13507,7 +13615,7 @@ static void Cmd_pickup(void)
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
|
||||
static void Cmd_docastformchangeanimation(void)
|
||||
static void Cmd_doweatherformchangeanimation(void)
|
||||
{
|
||||
gActiveBattler = gBattleScripting.battler;
|
||||
|
||||
@ -13520,7 +13628,7 @@ static void Cmd_docastformchangeanimation(void)
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
|
||||
static void Cmd_trycastformdatachange(void)
|
||||
static void Cmd_tryweatherformdatachange(void)
|
||||
{
|
||||
u8 form;
|
||||
|
||||
@ -13528,7 +13636,7 @@ static void Cmd_trycastformdatachange(void)
|
||||
form = TryWeatherFormChange(gBattleScripting.battler);
|
||||
if (form)
|
||||
{
|
||||
BattleScriptPushCursorAndCallback(BattleScript_CastformChange);
|
||||
BattleScriptPushCursorAndCallback(BattleScript_WeatherFormChange);
|
||||
*(&gBattleStruct->formToChangeInto) = form - 1;
|
||||
}
|
||||
}
|
||||
@ -14460,7 +14568,7 @@ static void Cmd_tryworryseed(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleMons[gBattlerTarget].ability = ABILITY_INSOMNIA;
|
||||
gBattleMons[gBattlerTarget].ability = gBattleStruct->overwrittenAbilities[gBattlerTarget] = ABILITY_INSOMNIA;
|
||||
gBattlescriptCurrInstr += 5;
|
||||
}
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ static void GenerateOpponentMons(void)
|
||||
while (i != FRONTIER_PARTY_SIZE)
|
||||
{
|
||||
sRandMonId = monSet[Random() % numMons];
|
||||
|
||||
|
||||
// Ensure none of the opponent's pokemon are the same as the potential rental pokemon for the player
|
||||
for (j = 0; j < (int)ARRAY_COUNT(gSaveBlock2Ptr->frontier.rentalMons); j++)
|
||||
{
|
||||
|
||||
@ -2679,7 +2679,7 @@ static void LoadLinkMultiOpponentsData(void)
|
||||
gTrainerBattleOpponent_B = gSaveBlock2Ptr->frontier.trainerIds[battleNum * 2 + 1];
|
||||
SetBattleFacilityTrainerGfxId(gTrainerBattleOpponent_A, 0);
|
||||
SetBattleFacilityTrainerGfxId(gTrainerBattleOpponent_B, 1);
|
||||
if (gReceivedRemoteLinkPlayers != 0 && gWirelessCommType == 0)
|
||||
if (gReceivedRemoteLinkPlayers && gWirelessCommType == 0)
|
||||
gSpecialVar_Result = 4;
|
||||
else
|
||||
gSpecialVar_Result = 6;
|
||||
|
||||
@ -2434,7 +2434,7 @@ static bool8 Mugshot_WaitStartPlayerSlide(struct Task *task)
|
||||
{
|
||||
sTransitionData->BG0HOFS_Lower -= 8;
|
||||
sTransitionData->BG0HOFS_Upper += 8;
|
||||
|
||||
|
||||
// Start player's slide in once the opponent is finished
|
||||
if (IsTrainerPicSlideDone(task->tOpponentSpriteId))
|
||||
{
|
||||
@ -2770,7 +2770,7 @@ static bool8 Slice_Main(struct Task *task)
|
||||
{
|
||||
u16 *storeLoc1 = &gScanlineEffectRegBuffers[0][i];
|
||||
u16 *storeLoc2 = &gScanlineEffectRegBuffers[0][i + DISPLAY_HEIGHT];
|
||||
|
||||
|
||||
// Alternate rows
|
||||
if (i % 2)
|
||||
{
|
||||
@ -3251,7 +3251,7 @@ static bool8 RectangularSpiral_Main(struct Task *task)
|
||||
// The line moved to a new position, draw the tile.
|
||||
done = FALSE;
|
||||
position = sRectangularSpiralLines[j].position;
|
||||
|
||||
|
||||
// Invert position for the two lines that start at the bottom.
|
||||
if ((j % 2) == 1)
|
||||
position = 637 - position;
|
||||
@ -3281,7 +3281,7 @@ static bool8 RectangularSpiral_End(struct Task *task)
|
||||
static bool16 UpdateRectangularSpiralLine(const s16 * const *moveDataTable, struct RectangularSpiralLine *line)
|
||||
{
|
||||
const s16 *moveData = moveDataTable[line->state];
|
||||
|
||||
|
||||
// Has spiral finished?
|
||||
// Note that most move data arrays endsin SPIRAL_END but it is
|
||||
// only ever reached on the final array of spiraling outward.
|
||||
@ -3294,9 +3294,9 @@ static bool16 UpdateRectangularSpiralLine(const s16 * const *moveDataTable, stru
|
||||
sDebug_RectangularSpiralData = moveData[2];
|
||||
sDebug_RectangularSpiralData = moveData[3];
|
||||
|
||||
// Note that for the two lines originating at the bottom the
|
||||
// Note that for the two lines originating at the bottom the
|
||||
// position is inverted, so the directions are flipped.
|
||||
// i.e. position += 1 is right for the top lines and left
|
||||
// i.e. position += 1 is right for the top lines and left
|
||||
// for their inverted partners on the bottom.
|
||||
switch (moveData[0])
|
||||
{
|
||||
@ -4170,13 +4170,13 @@ static void InitBlackWipe(s16 *data, s16 startX, s16 startY, s16 endX, s16 endY,
|
||||
static bool8 UpdateBlackWipe(s16 *data, bool8 xExact, bool8 yExact)
|
||||
{
|
||||
u8 numFinished;
|
||||
|
||||
|
||||
if (tWipeXDist > tWipeYDist)
|
||||
{
|
||||
// X has further to move, move it first
|
||||
tWipeCurrX += tWipeXMove;
|
||||
|
||||
// If it has been far enough since Y's
|
||||
// If it has been far enough since Y's
|
||||
// last move then move it too
|
||||
tWipeTemp += tWipeYDist;
|
||||
if (tWipeTemp > tWipeXDist)
|
||||
@ -4190,7 +4190,7 @@ static bool8 UpdateBlackWipe(s16 *data, bool8 xExact, bool8 yExact)
|
||||
// Y has further to move, move it first
|
||||
tWipeCurrY += tWipeYMove;
|
||||
|
||||
// If it has been far enough since X's
|
||||
// If it has been far enough since X's
|
||||
// last move then move it too
|
||||
tWipeTemp += tWipeXDist;
|
||||
if (tWipeTemp > tWipeYDist)
|
||||
@ -4201,9 +4201,9 @@ static bool8 UpdateBlackWipe(s16 *data, bool8 xExact, bool8 yExact)
|
||||
}
|
||||
|
||||
numFinished = 0;
|
||||
|
||||
|
||||
// Has X coord reached end?
|
||||
if ((tWipeXMove > 0 && tWipeCurrX >= tWipeEndX)
|
||||
if ((tWipeXMove > 0 && tWipeCurrX >= tWipeEndX)
|
||||
|| (tWipeXMove < 0 && tWipeCurrX <= tWipeEndX))
|
||||
{
|
||||
numFinished++;
|
||||
@ -4212,7 +4212,7 @@ static bool8 UpdateBlackWipe(s16 *data, bool8 xExact, bool8 yExact)
|
||||
}
|
||||
|
||||
// Has Y coord reached end?
|
||||
if ((tWipeYMove > 0 && tWipeCurrY >= tWipeEndY)
|
||||
if ((tWipeYMove > 0 && tWipeCurrY >= tWipeEndY)
|
||||
|| (tWipeYMove < 0 && tWipeCurrY <= tWipeEndY))
|
||||
{
|
||||
numFinished++;
|
||||
|
||||
@ -2153,6 +2153,7 @@ enum
|
||||
ENDTURN_ION_DELUGE,
|
||||
ENDTURN_FAIRY_LOCK,
|
||||
ENDTURN_RETALIATE,
|
||||
ENDTURN_WEATHER_FORM,
|
||||
ENDTURN_STATUS_HEAL,
|
||||
ENDTURN_FIELD_COUNT,
|
||||
};
|
||||
@ -2601,6 +2602,10 @@ u8 DoFieldEndTurnEffects(void)
|
||||
gSideTimers[B_SIDE_OPPONENT].retaliateTimer--;
|
||||
gBattleStruct->turnCountersTracker++;
|
||||
break;
|
||||
case ENDTURN_WEATHER_FORM:
|
||||
AbilityBattleEffects(ABILITYEFFECT_WEATHER_FORM, 0, 0, 0, 0);
|
||||
gBattleStruct->turnCountersTracker++;
|
||||
break;
|
||||
case ENDTURN_STATUS_HEAL:
|
||||
for (gBattlerAttacker = 0; gBattlerAttacker < gBattlersCount; gBattlerAttacker++)
|
||||
{
|
||||
@ -4020,21 +4025,48 @@ u8 TryWeatherFormChange(u8 battler)
|
||||
bool32 weatherEffect = WEATHER_HAS_EFFECT;
|
||||
u16 holdEffect = GetBattlerHoldEffect(battler, TRUE);
|
||||
|
||||
if (gBattleMons[battler].species == SPECIES_CASTFORM)
|
||||
switch (gBattleMons[battler].species)
|
||||
{
|
||||
case SPECIES_CASTFORM:
|
||||
/* Placeholder
|
||||
case SPECIES_CASTFORM_RAINY:
|
||||
case SPECIES_CASTFORM_SNOWY:
|
||||
case SPECIES_CASTFORM_SUNNY:*/
|
||||
#if B_WEATHER_FORMS >= GEN_5
|
||||
if (gBattleMons[battler].hp == 0)
|
||||
{
|
||||
ret = 0; // No change
|
||||
}
|
||||
else if (GetBattlerAbility(battler) != ABILITY_FORECAST || !weatherEffect)
|
||||
{
|
||||
if (!IS_BATTLER_OF_TYPE(battler, TYPE_NORMAL))
|
||||
{
|
||||
SET_BATTLER_TYPE(battler, TYPE_NORMAL);
|
||||
ret = CASTFORM_NORMAL + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = 0; // No change
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (GetBattlerAbility(battler) != ABILITY_FORECAST || gBattleMons[battler].hp == 0)
|
||||
{
|
||||
ret = 0; // No change
|
||||
}
|
||||
else if (!weatherEffect && !IS_BATTLER_OF_TYPE(battler, TYPE_NORMAL))
|
||||
{
|
||||
SET_BATTLER_TYPE(battler, TYPE_NORMAL);
|
||||
ret = CASTFORM_NORMAL + 1;
|
||||
}
|
||||
else if (!weatherEffect)
|
||||
{
|
||||
ret = 0; // No change
|
||||
if (!IS_BATTLER_OF_TYPE(battler, TYPE_NORMAL))
|
||||
{
|
||||
SET_BATTLER_TYPE(battler, TYPE_NORMAL);
|
||||
ret = CASTFORM_NORMAL + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = 0; // No change
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else if (holdEffect == HOLD_EFFECT_UTILITY_UMBRELLA || (!(gBattleWeather & (B_WEATHER_RAIN | B_WEATHER_SUN | B_WEATHER_HAIL)) && !IS_BATTLER_OF_TYPE(battler, TYPE_NORMAL)))
|
||||
{
|
||||
SET_BATTLER_TYPE(battler, TYPE_NORMAL);
|
||||
@ -4055,15 +4087,23 @@ u8 TryWeatherFormChange(u8 battler)
|
||||
SET_BATTLER_TYPE(battler, TYPE_ICE);
|
||||
ret = CASTFORM_ICE + 1;
|
||||
}
|
||||
}
|
||||
else if (gBattleMons[battler].species == SPECIES_CHERRIM)
|
||||
{
|
||||
if (GetBattlerAbility(battler) != ABILITY_FLOWER_GIFT || gBattleMons[battler].hp == 0)
|
||||
break;
|
||||
case SPECIES_CHERRIM:
|
||||
// case SPECIES_CHERRIM_SUNSHINE:
|
||||
if (gBattleMons[battler].hp == 0)
|
||||
ret = 0; // No change
|
||||
#if B_WEATHER_FORMS >= GEN_5
|
||||
if (GetBattlerAbility(battler) != ABILITY_FLOWER_GIFT)
|
||||
if (gBattleMonForms[battler] != 0)
|
||||
ret = CHERRIM_OVERCAST + 1;
|
||||
else
|
||||
ret = 0; // No change
|
||||
#endif
|
||||
else if (gBattleMonForms[battler] == 0 && weatherEffect && holdEffect != HOLD_EFFECT_UTILITY_UMBRELLA && gBattleWeather & B_WEATHER_SUN)
|
||||
ret = CHERRIM_SUNSHINE + 1;
|
||||
else if (gBattleMonForms[battler] != 0 && (!weatherEffect || holdEffect == HOLD_EFFECT_UTILITY_UMBRELLA || !(gBattleWeather & B_WEATHER_SUN)))
|
||||
ret = CHERRIM_OVERCAST + 1;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
@ -4665,11 +4705,15 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
}
|
||||
break;
|
||||
case ABILITY_FORECAST:
|
||||
#if B_WEATHER_FORMS >= GEN_5
|
||||
case ABILITY_FLOWER_GIFT:
|
||||
#else
|
||||
TRY_WEATHER_FORM:
|
||||
#endif
|
||||
effect = TryWeatherFormChange(battler);
|
||||
if (effect != 0)
|
||||
{
|
||||
BattleScriptPushCursorAndCallback(BattleScript_CastformChange);
|
||||
BattleScriptPushCursorAndCallback(BattleScript_WeatherFormChange);
|
||||
*(&gBattleStruct->formToChangeInto) = effect - 1;
|
||||
}
|
||||
break;
|
||||
@ -4700,8 +4744,9 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
}
|
||||
break;
|
||||
case ABILITY_INTREPID_SWORD:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone && CompareStat(battler, STAT_ATK, MAX_STAT_STAGE, CMP_LESS_THAN))
|
||||
{
|
||||
gBattlerAttacker = battler;
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
SET_STATCHANGER(STAT_ATK, 1, FALSE);
|
||||
BattleScriptPushCursorAndCallback(BattleScript_BattlerAbilityStatRaiseOnSwitchIn);
|
||||
@ -4709,8 +4754,9 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
}
|
||||
break;
|
||||
case ABILITY_DAUNTLESS_SHIELD:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone && CompareStat(battler, STAT_DEF, MAX_STAT_STAGE, CMP_LESS_THAN))
|
||||
{
|
||||
gBattlerAttacker = battler;
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
SET_STATCHANGER(STAT_DEF, 1, FALSE);
|
||||
BattleScriptPushCursorAndCallback(BattleScript_BattlerAbilityStatRaiseOnSwitchIn);
|
||||
@ -4745,6 +4791,12 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
#if B_WEATHER_FORMS < GEN_5
|
||||
default:
|
||||
if (gBattleMons[battler].species == SPECIES_CHERRIM)
|
||||
goto TRY_WEATHER_FORM;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case ABILITYEFFECT_ENDTURN: // 1
|
||||
@ -5242,7 +5294,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
case ABILITY_STANCE_CHANGE:
|
||||
break;
|
||||
default:
|
||||
gLastUsedAbility = gBattleMons[gBattlerAttacker].ability = ABILITY_MUMMY;
|
||||
gLastUsedAbility = gBattleMons[gBattlerAttacker].ability = gBattleStruct->overwrittenAbilities[gBattlerAttacker] = ABILITY_MUMMY;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_MummyActivates;
|
||||
effect++;
|
||||
@ -5274,10 +5326,8 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
break;
|
||||
default:
|
||||
gLastUsedAbility = gBattleMons[gBattlerAttacker].ability;
|
||||
gBattleMons[gBattlerAttacker].ability = gBattleMons[gBattlerTarget].ability;
|
||||
gBattleMons[gBattlerTarget].ability = gLastUsedAbility;
|
||||
RecordAbilityBattle(gBattlerAttacker, gBattleMons[gBattlerAttacker].ability);
|
||||
RecordAbilityBattle(gBattlerTarget, gBattleMons[gBattlerTarget].ability);
|
||||
gBattleMons[gBattlerAttacker].ability = gBattleStruct->overwrittenAbilities[gBattlerAttacker] = gBattleMons[gBattlerTarget].ability;
|
||||
gBattleMons[gBattlerTarget].ability = gBattleStruct->overwrittenAbilities[gBattlerTarget] = gLastUsedAbility;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_WanderingSpiritActivates;
|
||||
effect++;
|
||||
@ -5757,20 +5807,28 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ABILITYEFFECT_FORECAST: // 6
|
||||
case ABILITYEFFECT_WEATHER_FORM: // 6
|
||||
for (battler = 0; battler < gBattlersCount; battler++)
|
||||
{
|
||||
u16 battlerAbility = GetBattlerAbility(battler);
|
||||
if (battlerAbility == ABILITY_FORECAST || battlerAbility == ABILITY_FLOWER_GIFT)
|
||||
switch (gBattleMons[battler].species)
|
||||
{
|
||||
case SPECIES_CASTFORM:
|
||||
case SPECIES_CHERRIM:
|
||||
#ifdef POKEMON_EXPANSION
|
||||
case SPECIES_CASTFORM_RAINY:
|
||||
case SPECIES_CASTFORM_SNOWY:
|
||||
case SPECIES_CASTFORM_SUNNY:
|
||||
case SPECIES_CHERRIM_SUNSHINE:
|
||||
#endif
|
||||
effect = TryWeatherFormChange(battler);
|
||||
if (effect != 0)
|
||||
{
|
||||
BattleScriptPushCursorAndCallback(BattleScript_CastformChange);
|
||||
BattleScriptPushCursorAndCallback(BattleScript_WeatherFormChange);
|
||||
gBattleScripting.battler = battler;
|
||||
gBattleStruct->formToChangeInto = effect - 1;
|
||||
return effect;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -9634,7 +9692,7 @@ void UndoMegaEvolution(u32 monId)
|
||||
|
||||
void UndoFormChange(u32 monId, u32 side, bool32 isSwitchingOut)
|
||||
{
|
||||
u32 i, currSpecies;
|
||||
u32 i, currSpecies, targetSpecies;
|
||||
struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty;
|
||||
static const u16 species[][3] =
|
||||
{
|
||||
@ -9668,6 +9726,16 @@ void UndoFormChange(u32 monId, u32 side, bool32 isSwitchingOut)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isSwitchingOut)
|
||||
{
|
||||
targetSpecies = GetFormChangeTargetSpecies(&party[monId], FORM_BATTLE_END, 0);
|
||||
if (targetSpecies != SPECIES_NONE)
|
||||
{
|
||||
SetMonData(&party[monId], MON_DATA_SPECIES, &targetSpecies);
|
||||
CalculateMonStats(&party[monId]);
|
||||
TryToSetBattleFormChangeMoves(&party[monId]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool32 DoBattlersShareType(u32 battler1, u32 battler2)
|
||||
|
||||
@ -27,6 +27,7 @@ void AllocateBattleResources(void)
|
||||
gBattleResources->beforeLvlUp = AllocZeroed(sizeof(*gBattleResources->beforeLvlUp));
|
||||
gBattleResources->ai = AllocZeroed(sizeof(*gBattleResources->ai));
|
||||
gBattleResources->aiData = AllocZeroed(sizeof(*gBattleResources->aiData));
|
||||
gBattleResources->aiParty = AllocZeroed(sizeof(*gBattleResources->aiParty));
|
||||
gBattleResources->battleHistory = AllocZeroed(sizeof(*gBattleResources->battleHistory));
|
||||
|
||||
gLinkBattleSendBuffer = AllocZeroed(BATTLE_BUFFER_LINK_SIZE);
|
||||
@ -59,6 +60,7 @@ void FreeBattleResources(void)
|
||||
FREE_AND_SET_NULL(gBattleResources->beforeLvlUp);
|
||||
FREE_AND_SET_NULL(gBattleResources->ai);
|
||||
FREE_AND_SET_NULL(gBattleResources->aiData);
|
||||
FREE_AND_SET_NULL(gBattleResources->aiParty);
|
||||
FREE_AND_SET_NULL(gBattleResources->battleHistory);
|
||||
FREE_AND_SET_NULL(gBattleResources);
|
||||
|
||||
|
||||
@ -54,6 +54,7 @@ static void ZMoveSelectionDisplayPower(u16 move, u16 zMove);
|
||||
static void ShowZMoveTriggerSprite(void);
|
||||
static bool32 AreStatsMaxed(u8 battlerId, u8 n);
|
||||
static u8 GetZMoveScore(u8 battlerAtk, u8 battlerDef, u16 baseMove, u16 zMove);
|
||||
static void ZMoveSelectionDisplayMoveType(u16 zMove);
|
||||
|
||||
// Const Data
|
||||
static const struct SignatureZMove sSignatureZMoves[] =
|
||||
@ -165,23 +166,21 @@ bool32 IsViableZMove(u8 battlerId, u16 move)
|
||||
u32 item;
|
||||
u16 holdEffect;
|
||||
u16 species;
|
||||
|
||||
|
||||
if (gBattleStruct->zmove.used[battlerId])
|
||||
return FALSE;
|
||||
|
||||
|
||||
species = gBattleMons[battlerId].species;
|
||||
item = gBattleMons[battlerId].item;
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_SAFARI | BATTLE_TYPE_WALLY_TUTORIAL | BATTLE_TYPE_FRONTIER))
|
||||
return FALSE;
|
||||
|
||||
#ifdef ITEM_Z_RING
|
||||
if ((GetBattlerPosition(battlerId) == B_POSITION_PLAYER_LEFT || (!(gBattleTypeFlags & BATTLE_TYPE_MULTI) && GetBattlerPosition(battlerId) == B_POSITION_PLAYER_RIGHT)) && !CheckBagHasItem(ITEM_Z_RING, 1))
|
||||
|
||||
if ((GetBattlerPosition(battlerId) == B_POSITION_PLAYER_LEFT || (!(gBattleTypeFlags & BATTLE_TYPE_MULTI) && GetBattlerPosition(battlerId) == B_POSITION_PLAYER_RIGHT)) && !CheckBagHasItem(ITEM_Z_POWER_RING, 1))
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
|
||||
if (mega->alreadyEvolved[battlerPosition])
|
||||
return FALSE; // Trainer has mega evolved
|
||||
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||
{
|
||||
if (IsPartnerMonFromSameTrainer(battlerId) && (mega->alreadyEvolved[partnerPosition] || (mega->toEvolve & gBitTable[BATTLE_PARTNER(battlerId)])))
|
||||
@ -194,10 +193,10 @@ bool32 IsViableZMove(u8 battlerId, u16 move)
|
||||
else
|
||||
#endif
|
||||
if (item == ITEM_ENIGMA_BERRY)
|
||||
return FALSE; // HoldEffect = gEnigmaBerries[battlerId].holdEffect;
|
||||
return FALSE; // HoldEffect = gEnigmaBerries[battlerId].holdEffect;
|
||||
else
|
||||
holdEffect = ItemId_GetHoldEffect(item);
|
||||
|
||||
|
||||
#ifdef ITEM_ULTRANECROZIUM_Z
|
||||
if (holdEffect == HOLD_EFFECT_Z_CRYSTAL || item == ITEM_ULTRANECROZIUM_Z)
|
||||
#else
|
||||
@ -210,18 +209,18 @@ bool32 IsViableZMove(u8 battlerId, u16 move)
|
||||
gBattleStruct->zmove.chosenZMove = zMove; // Signature z move exists
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (move != MOVE_NONE && zMove != MOVE_Z_STATUS && gBattleMoves[move].type == ItemId_GetSecondaryId(item))
|
||||
{
|
||||
if (IS_MOVE_STATUS(move))
|
||||
gBattleStruct->zmove.chosenZMove = move;
|
||||
else
|
||||
gBattleStruct->zmove.chosenZMove = GetTypeBasedZMove(move, battlerId);
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -248,7 +247,7 @@ bool32 IsZMoveUsable(u8 battlerId, u16 moveIndex)
|
||||
bool32 TryChangeZIndicator(u8 battlerId, u8 moveIndex)
|
||||
{
|
||||
bool32 viableZMove = IsZMoveUsable(battlerId, moveIndex);
|
||||
|
||||
|
||||
if (gBattleStruct->zmove.viable && !viableZMove)
|
||||
HideZMoveTriggerSprite(); // Was a viable z move, now is not -> slide out
|
||||
else if (!gBattleStruct->zmove.viable && viableZMove)
|
||||
@ -271,11 +270,11 @@ bool32 TryChangeZIndicator(u8 battlerId, u8 moveIndex)
|
||||
void CreateZMoveTriggerSprite(u8 battlerId, bool8 viable)
|
||||
{
|
||||
s16 x, y;
|
||||
|
||||
|
||||
LoadSpritePalette(&sSpritePalette_ZMoveTrigger);
|
||||
if (GetSpriteTileStartByTag(TAG_ZMOVE_TRIGGER_TILE) == 0xFFFF)
|
||||
LoadCompressedSpriteSheetUsingHeap(&sSpriteSheet_ZMoveTrigger);
|
||||
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||
{
|
||||
x = gSprites[gHealthboxSpriteIds[battlerId]].x - DOUBLES_Z_TRIGGER_POS_X_SLIDE;
|
||||
@ -286,10 +285,10 @@ void CreateZMoveTriggerSprite(u8 battlerId, bool8 viable)
|
||||
x = gSprites[gHealthboxSpriteIds[battlerId]].x - SINGLES_Z_TRIGGER_POS_X_SLIDE;
|
||||
y = gSprites[gHealthboxSpriteIds[battlerId]].y - SINGLES_Z_TRIGGER_POS_Y_DIFF, 0;
|
||||
}
|
||||
|
||||
|
||||
if (gBattleStruct->zmove.triggerSpriteId == 0xFF)
|
||||
gBattleStruct->zmove.triggerSpriteId = CreateSprite(&sSpriteTemplate_ZMoveTrigger, x, y, 0);
|
||||
|
||||
|
||||
gSprites[gBattleStruct->zmove.triggerSpriteId].tBattler = battlerId;
|
||||
gSprites[gBattleStruct->zmove.triggerSpriteId].tHide = (viable == TRUE) ? FALSE : TRUE;
|
||||
}
|
||||
@ -375,14 +374,14 @@ void DestroyZMoveTriggerSprite(void)
|
||||
FreeSpriteTilesByTag(TAG_ZMOVE_TRIGGER_TILE);
|
||||
if (gBattleStruct->zmove.triggerSpriteId != 0xFF)
|
||||
DestroySprite(&gSprites[gBattleStruct->zmove.triggerSpriteId]);
|
||||
|
||||
|
||||
gBattleStruct->zmove.triggerSpriteId = 0xFF;
|
||||
}
|
||||
|
||||
static u16 GetSignatureZMove(u16 move, u16 species, u16 item)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
|
||||
// Check signature z move
|
||||
for (i = 0; i < ARRAY_COUNT(sSignatureZMoves); ++i)
|
||||
{
|
||||
@ -396,7 +395,7 @@ static u16 GetSignatureZMove(u16 move, u16 species, u16 item)
|
||||
static u16 GetTypeBasedZMove(u16 move, u8 battler)
|
||||
{
|
||||
u8 moveType = gBattleMoves[move].type;
|
||||
|
||||
|
||||
// Get z move from type
|
||||
if (moveType < TYPE_FIRE)
|
||||
return MOVE_BREAKNECK_BLITZ + moveType;
|
||||
@ -411,7 +410,7 @@ bool32 MoveSelectionDisplayZMove(u16 zmove)
|
||||
u32 i;
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleResources->bufferA[gActiveBattler][4]);
|
||||
u16 move = moveInfo->moves[gMoveSelectionCursor[gActiveBattler]];
|
||||
|
||||
|
||||
PlaySE(SE_SELECT);
|
||||
gBattleStruct->zmove.viewing = TRUE;
|
||||
if (zmove != MOVE_NONE)
|
||||
@ -421,15 +420,15 @@ bool32 MoveSelectionDisplayZMove(u16 zmove)
|
||||
{
|
||||
MoveSelectionDestroyCursorAt(i);
|
||||
StringCopy(gDisplayedStringBattle, gText_EmptyString2);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, i + 3);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, i + 3);
|
||||
}
|
||||
|
||||
if (IS_MOVE_STATUS(move))
|
||||
{
|
||||
u8 zEffect = gBattleMoves[move].zMoveEffect;
|
||||
|
||||
|
||||
gDisplayedStringBattle[0] = EOS;
|
||||
|
||||
|
||||
if (zEffect == Z_EFFECT_CURSE)
|
||||
{
|
||||
if (moveInfo->monType1 == TYPE_GHOST || moveInfo->monType2 == TYPE_GHOST || moveInfo->monType3 == TYPE_GHOST)
|
||||
@ -437,7 +436,7 @@ bool32 MoveSelectionDisplayZMove(u16 zmove)
|
||||
else
|
||||
zEffect = Z_EFFECT_ATK_UP_1;
|
||||
}
|
||||
|
||||
|
||||
switch (zEffect)
|
||||
{
|
||||
case Z_EFFECT_RESET_STATS:
|
||||
@ -501,7 +500,7 @@ bool32 MoveSelectionDisplayZMove(u16 zmove)
|
||||
ExpandBattleTextBuffPlaceholders(gBattleTextBuff1, gDisplayedStringBattle + 4);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MOVE_NAME_3);
|
||||
gDisplayedStringBattle[0] = CHAR_Z;
|
||||
gDisplayedStringBattle[1] = CHAR_HYPHEN;
|
||||
@ -522,6 +521,7 @@ bool32 MoveSelectionDisplayZMove(u16 zmove)
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MOVE_NAME_1);
|
||||
|
||||
ZMoveSelectionDisplayPpNumber();
|
||||
ZMoveSelectionDisplayMoveType(zmove);
|
||||
MoveSelectionCreateCursorAt(0, 0);
|
||||
return TRUE;
|
||||
}
|
||||
@ -561,6 +561,23 @@ static void ZMoveSelectionDisplayPpNumber(void)
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_PP_REMAINING);
|
||||
}
|
||||
|
||||
static void ZMoveSelectionDisplayMoveType(u16 zMove)
|
||||
{
|
||||
u8 *txtPtr;
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleResources->bufferA[gActiveBattler][4]);
|
||||
u8 zMoveType;
|
||||
|
||||
GET_MOVE_TYPE(zMove, zMoveType);
|
||||
|
||||
txtPtr = StringCopy(gDisplayedStringBattle, gText_MoveInterfaceType);
|
||||
*(txtPtr)++ = EXT_CTRL_CODE_BEGIN;
|
||||
*(txtPtr)++ = EXT_CTRL_CODE_FONT;
|
||||
*(txtPtr)++ = FONT_NORMAL;
|
||||
|
||||
StringCopy(txtPtr, gTypeNames[zMoveType]);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MOVE_TYPE);
|
||||
}
|
||||
|
||||
const u8 *GetZMoveName(u16 move)
|
||||
{
|
||||
if (IsZMove(move))
|
||||
@ -584,11 +601,11 @@ void SetZEffect(void)
|
||||
else
|
||||
gBattleStruct->zmove.effect = Z_EFFECT_ATK_UP_1;
|
||||
}
|
||||
|
||||
|
||||
gBattleScripting.savedStatChanger = gBattleScripting.statChanger; // Save used move's stat changer (e.g. for Z-Growl)
|
||||
gBattleScripting.battler = gBattlerAttacker;
|
||||
|
||||
switch (gBattleStruct->zmove.effect)
|
||||
|
||||
switch (gBattleStruct->zmove.effect)
|
||||
{
|
||||
case Z_EFFECT_RESET_STATS:
|
||||
for (i = 0; i < NUM_BATTLE_STATS - 1; i++)
|
||||
@ -645,7 +662,7 @@ void SetZEffect(void)
|
||||
gBattlescriptCurrInstr = BattleScript_ZEffectPrintString;
|
||||
break;
|
||||
case Z_EFFECT_ATK_UP_1 ... Z_EFFECT_EVSN_UP_1:
|
||||
SET_STATCHANGER(gBattleStruct->zmove.effect - Z_EFFECT_ATK_UP_1 + 1, 1, FALSE);
|
||||
SET_STATCHANGER(gBattleStruct->zmove.effect - Z_EFFECT_ATK_UP_1 + 1, 1, FALSE);
|
||||
BattleScriptPush(gBattlescriptCurrInstr + Z_EFFECT_BS_LENGTH);
|
||||
gBattlescriptCurrInstr = BattleScript_StatUpZMove;
|
||||
break;
|
||||
@ -663,7 +680,7 @@ void SetZEffect(void)
|
||||
gBattlescriptCurrInstr += 3;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
gBattleStruct->zmove.zStatusActive = FALSE;
|
||||
}
|
||||
|
||||
|
||||
@ -3428,7 +3428,7 @@ static u32 Cmd_CloseLink(struct BerryCrushGame *game, u8 *args)
|
||||
SetCloseLinkCallback();
|
||||
break;
|
||||
case 2:
|
||||
if (gReceivedRemoteLinkPlayers != 0)
|
||||
if (gReceivedRemoteLinkPlayers)
|
||||
return 0;
|
||||
game->nextCmd = CMD_QUIT;
|
||||
RunOrScheduleCommand(CMD_HIDE_GAME, SCHEDULE_CMD, NULL);
|
||||
|
||||
@ -5,8 +5,7 @@
|
||||
.arm
|
||||
|
||||
.align 2, 0
|
||||
.global Init
|
||||
Init:
|
||||
Init::
|
||||
mov r0, #PSR_IRQ_MODE
|
||||
msr cpsr_cf, r0
|
||||
ldr sp, sp_irq
|
||||
@ -33,8 +32,7 @@ sp_irq: .word IWRAM_END - 0x60
|
||||
|
||||
.arm
|
||||
.align 2, 0
|
||||
.global IntrMain
|
||||
IntrMain:
|
||||
IntrMain::
|
||||
mov r3, #REG_BASE
|
||||
add r3, r3, #OFFSET_REG_IE
|
||||
ldr r2, [r3]
|
||||
|
||||
@ -1365,7 +1365,7 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] =
|
||||
{gBattleAnimSpriteGfx_MegaParticles, 0x0180, ANIM_TAG_MEGA_PARTICLES},
|
||||
{gBattleAnimSpriteGfx_TrumpCard, 0x0180, ANIM_TAG_TRUMP_CARD},
|
||||
{gBattleAnimSpriteGfx_TrumpCardParticles, 0x0060, ANIM_TAG_TRUMP_CARD_PARTICLES},
|
||||
{gBattleAnimSpriteGfx_Accupressure, 0x0200, ANIM_TAG_ACCUPRESSURE},
|
||||
{gBattleAnimSpriteGfx_Acupressure, 0x0200, ANIM_TAG_ACUPRESSURE},
|
||||
{gBattleAnimSpriteGfx_WringOut, 0x0200, ANIM_TAG_WRING_OUT},
|
||||
{gBattleAnimSpriteGfx_ColoredOrbs, 0x0300, ANIM_TAG_COLORED_ORBS},
|
||||
{gBattleAnimSpriteGfx_WorrySeed, 0x0080, ANIM_TAG_WORRY_SEED},
|
||||
@ -1390,7 +1390,6 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] =
|
||||
{gBattleAnimSpriteGfx_Brine, 0xc00, ANIM_TAG_BRINE},
|
||||
{gBattleAnimSpriteGfx_Gear, 0x200, ANIM_TAG_GEAR},
|
||||
{gBattleAnimSpriteGfx_AssuranceHand, 0x200, ANIM_TAG_ASSURANCE_HAND},
|
||||
{gBattleAnimSpriteGfx_AcupressureFinger, 0x200, ANIM_TAG_ACUPRESSURE_FINGER},
|
||||
{gBattleAnimSpriteGfx_Fishies, 0x480, ANIM_TAG_WISHIWASHI_FISH},
|
||||
{gBattleAnimSpriteGfx_ZygardeHexes, 0x480, ANIM_TAG_ZYGARDE_HEXES},
|
||||
{gBattleAnimSpriteGfx_AuraSphere, 0x200, ANIM_TAG_AURA_SPHERE},
|
||||
@ -1449,7 +1448,6 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] =
|
||||
{gBattleAnimSpriteGfx_StonePillar, 0x1800, ANIM_TAG_STONE_PILLAR_MULTI},
|
||||
{gBattleAnimSpriteGfx_AlphaSymbol, 0x0200, ANIM_TAG_ALPHA_SYMBOL},
|
||||
{gBattleAnimSpriteGfx_OmegaSymbol, 0x0200, ANIM_TAG_OMEGA_SYMBOL},
|
||||
{gBattleAnimSpriteGfx_PrimalParticles, 0x0180, ANIM_TAG_PRIMAL_PARTICLES},
|
||||
{gBattleAnimSpriteGfx_Orbs, 0x0180, ANIM_TAG_STEEL_BEAM},
|
||||
{gBattleAnimSpriteGfx_AuraSphere, 0x200, ANIM_TAG_POLTERGEIST},
|
||||
};
|
||||
@ -1817,7 +1815,7 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
||||
{gBattleAnimSpritePal_MegaParticles, ANIM_TAG_MEGA_PARTICLES},
|
||||
{gBattleAnimSpritePal_TrumpCard, ANIM_TAG_TRUMP_CARD},
|
||||
{gBattleAnimSpritePal_TrumpCardParticles, ANIM_TAG_TRUMP_CARD_PARTICLES},
|
||||
{gBattleAnimSpritePal_Accupressure, ANIM_TAG_ACCUPRESSURE},
|
||||
{gBattleAnimSpritePal_Acupressure, ANIM_TAG_ACUPRESSURE},
|
||||
{gBattleAnimSpritePal_WringOut, ANIM_TAG_WRING_OUT},
|
||||
{gBattleAnimSpritePal_ColoredOrbs, ANIM_TAG_COLORED_ORBS},
|
||||
{gBattleAnimSpritePal_WorrySeed, ANIM_TAG_WORRY_SEED},
|
||||
@ -1842,7 +1840,6 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
||||
{gBattleAnimSpritePal_Brine, ANIM_TAG_BRINE},
|
||||
{gBattleAnimSpritePal_Gear, ANIM_TAG_GEAR},
|
||||
{gBattleAnimSpritePal_AssuranceHand, ANIM_TAG_ASSURANCE_HAND},
|
||||
{gBattleAnimSpritePal_AcupressureFinger, ANIM_TAG_ACUPRESSURE_FINGER},
|
||||
{gBattleAnimSpritePal_Fishies, ANIM_TAG_WISHIWASHI_FISH},
|
||||
{gBattleAnimSpritePal_ZygardeHexes, ANIM_TAG_ZYGARDE_HEXES},
|
||||
{gBattleAnimSpritePal_AuraSphere, ANIM_TAG_AURA_SPHERE},
|
||||
@ -1901,7 +1898,6 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
||||
{gBattleAnimSpritePal_StonePillar, ANIM_TAG_STONE_PILLAR_MULTI},
|
||||
{gBattleAnimSpritePal_AlphaSymbol, ANIM_TAG_ALPHA_SYMBOL},
|
||||
{gBattleAnimSpritePal_OmegaSymbol, ANIM_TAG_OMEGA_SYMBOL},
|
||||
{gBattleAnimSpritePal_PrimalParticles, ANIM_TAG_PRIMAL_PARTICLES},
|
||||
{gBattleAnimSpritePal_SteelBeam, ANIM_TAG_STEEL_BEAM},
|
||||
{gBattleAnimSpritePal_Poltergeist, ANIM_TAG_POLTERGEIST},
|
||||
};
|
||||
|
||||
@ -1,67 +1,67 @@
|
||||
// Also used by early Pkmn Breeder, Collector, and Beauty trainers
|
||||
#define FRONTIER_MONS_YOUNGSTER_LASS_1 \
|
||||
FRONTIER_MON_SUNKERN, \
|
||||
FRONTIER_MON_AZURILL, \
|
||||
FRONTIER_MON_CATERPIE, \
|
||||
FRONTIER_MON_WEEDLE, \
|
||||
FRONTIER_MON_WURMPLE, \
|
||||
FRONTIER_MON_RALTS, \
|
||||
FRONTIER_MON_MAGIKARP, \
|
||||
FRONTIER_MON_FEEBAS, \
|
||||
FRONTIER_MON_PICHU, \
|
||||
FRONTIER_MON_IGGLYBUFF, \
|
||||
FRONTIER_MON_WOOPER, \
|
||||
FRONTIER_MON_TYROGUE, \
|
||||
FRONTIER_MON_SENTRET, \
|
||||
FRONTIER_MON_CLEFFA, \
|
||||
FRONTIER_MON_SEEDOT, \
|
||||
FRONTIER_MON_LOTAD, \
|
||||
FRONTIER_MON_POOCHYENA, \
|
||||
FRONTIER_MON_SHEDINJA, \
|
||||
FRONTIER_MON_MAKUHITA, \
|
||||
FRONTIER_MON_WHISMUR, \
|
||||
FRONTIER_MON_ZIGZAGOON, \
|
||||
FRONTIER_MON_ZUBAT, \
|
||||
FRONTIER_MON_TOGEPI, \
|
||||
FRONTIER_MON_SPINARAK, \
|
||||
FRONTIER_MON_MARILL, \
|
||||
FRONTIER_MON_HOPPIP, \
|
||||
FRONTIER_MON_SLUGMA, \
|
||||
FRONTIER_MON_SWINUB, \
|
||||
FRONTIER_MON_SMEARGLE, \
|
||||
FRONTIER_MON_PIDGEY, \
|
||||
FRONTIER_MON_RATTATA, \
|
||||
FRONTIER_MON_WYNAUT, \
|
||||
FRONTIER_MON_SKITTY, \
|
||||
FRONTIER_MON_SPEAROW, \
|
||||
FRONTIER_MON_HOOTHOOT, \
|
||||
FRONTIER_MON_DIGLETT, \
|
||||
FRONTIER_MON_LEDYBA, \
|
||||
FRONTIER_MON_NINCADA, \
|
||||
FRONTIER_MON_SURSKIT, \
|
||||
FRONTIER_MON_JIGGLYPUFF, \
|
||||
FRONTIER_MON_TAILLOW, \
|
||||
FRONTIER_MON_WINGULL, \
|
||||
FRONTIER_MON_NIDORAN_M, \
|
||||
FRONTIER_MON_NIDORAN_F, \
|
||||
FRONTIER_MON_KIRLIA, \
|
||||
FRONTIER_MON_MAREEP, \
|
||||
FRONTIER_MON_MEDITITE, \
|
||||
FRONTIER_MON_SLAKOTH, \
|
||||
FRONTIER_MON_PARAS, \
|
||||
FRONTIER_MON_EKANS, \
|
||||
FRONTIER_MON_DITTO, \
|
||||
FRONTIER_MON_BARBOACH, \
|
||||
FRONTIER_MON_MEOWTH, \
|
||||
FRONTIER_MON_PINECO, \
|
||||
FRONTIER_MON_TRAPINCH, \
|
||||
FRONTIER_MON_SPHEAL, \
|
||||
FRONTIER_MON_HORSEA, \
|
||||
FRONTIER_MON_SHROOMISH, \
|
||||
FRONTIER_MON_SHUPPET, \
|
||||
FRONTIER_MON_DUSKULL, \
|
||||
FRONTIER_MON_ELECTRIKE, \
|
||||
FRONTIER_MON_VULPIX, \
|
||||
FRONTIER_MON_SUNKERN, \
|
||||
FRONTIER_MON_AZURILL, \
|
||||
FRONTIER_MON_CATERPIE, \
|
||||
FRONTIER_MON_WEEDLE, \
|
||||
FRONTIER_MON_WURMPLE, \
|
||||
FRONTIER_MON_RALTS, \
|
||||
FRONTIER_MON_MAGIKARP, \
|
||||
FRONTIER_MON_FEEBAS, \
|
||||
FRONTIER_MON_PICHU, \
|
||||
FRONTIER_MON_IGGLYBUFF, \
|
||||
FRONTIER_MON_WOOPER, \
|
||||
FRONTIER_MON_TYROGUE, \
|
||||
FRONTIER_MON_SENTRET, \
|
||||
FRONTIER_MON_CLEFFA, \
|
||||
FRONTIER_MON_SEEDOT, \
|
||||
FRONTIER_MON_LOTAD, \
|
||||
FRONTIER_MON_POOCHYENA, \
|
||||
FRONTIER_MON_SHEDINJA, \
|
||||
FRONTIER_MON_MAKUHITA, \
|
||||
FRONTIER_MON_WHISMUR, \
|
||||
FRONTIER_MON_ZIGZAGOON, \
|
||||
FRONTIER_MON_ZUBAT, \
|
||||
FRONTIER_MON_TOGEPI, \
|
||||
FRONTIER_MON_SPINARAK, \
|
||||
FRONTIER_MON_MARILL, \
|
||||
FRONTIER_MON_HOPPIP, \
|
||||
FRONTIER_MON_SLUGMA, \
|
||||
FRONTIER_MON_SWINUB, \
|
||||
FRONTIER_MON_SMEARGLE, \
|
||||
FRONTIER_MON_PIDGEY, \
|
||||
FRONTIER_MON_RATTATA, \
|
||||
FRONTIER_MON_WYNAUT, \
|
||||
FRONTIER_MON_SKITTY, \
|
||||
FRONTIER_MON_SPEAROW, \
|
||||
FRONTIER_MON_HOOTHOOT, \
|
||||
FRONTIER_MON_DIGLETT, \
|
||||
FRONTIER_MON_LEDYBA, \
|
||||
FRONTIER_MON_NINCADA, \
|
||||
FRONTIER_MON_SURSKIT, \
|
||||
FRONTIER_MON_JIGGLYPUFF, \
|
||||
FRONTIER_MON_TAILLOW, \
|
||||
FRONTIER_MON_WINGULL, \
|
||||
FRONTIER_MON_NIDORAN_M, \
|
||||
FRONTIER_MON_NIDORAN_F, \
|
||||
FRONTIER_MON_KIRLIA, \
|
||||
FRONTIER_MON_MAREEP, \
|
||||
FRONTIER_MON_MEDITITE, \
|
||||
FRONTIER_MON_SLAKOTH, \
|
||||
FRONTIER_MON_PARAS, \
|
||||
FRONTIER_MON_EKANS, \
|
||||
FRONTIER_MON_DITTO, \
|
||||
FRONTIER_MON_BARBOACH, \
|
||||
FRONTIER_MON_MEOWTH, \
|
||||
FRONTIER_MON_PINECO, \
|
||||
FRONTIER_MON_TRAPINCH, \
|
||||
FRONTIER_MON_SPHEAL, \
|
||||
FRONTIER_MON_HORSEA, \
|
||||
FRONTIER_MON_SHROOMISH, \
|
||||
FRONTIER_MON_SHUPPET, \
|
||||
FRONTIER_MON_DUSKULL, \
|
||||
FRONTIER_MON_ELECTRIKE, \
|
||||
FRONTIER_MON_VULPIX, \
|
||||
-1
|
||||
|
||||
// Also used by early Pkmn Breeder, Collector, and Beauty trainers
|
||||
@ -113,43 +113,43 @@
|
||||
-1
|
||||
|
||||
#define FRONTIER_MONS_RICH_BOY_LADY_1 \
|
||||
FRONTIER_MON_RALTS, \
|
||||
FRONTIER_MON_POOCHYENA, \
|
||||
FRONTIER_MON_SHEDINJA, \
|
||||
FRONTIER_MON_ZUBAT, \
|
||||
FRONTIER_MON_SPINARAK, \
|
||||
FRONTIER_MON_WYNAUT, \
|
||||
FRONTIER_MON_NIDORAN_M, \
|
||||
FRONTIER_MON_NIDORAN_F, \
|
||||
FRONTIER_MON_KIRLIA, \
|
||||
FRONTIER_MON_MEDITITE, \
|
||||
FRONTIER_MON_EKANS, \
|
||||
FRONTIER_MON_SHUPPET, \
|
||||
FRONTIER_MON_DUSKULL, \
|
||||
FRONTIER_MON_BELLSPROUT, \
|
||||
FRONTIER_MON_BALTOY, \
|
||||
FRONTIER_MON_BELDUM, \
|
||||
FRONTIER_MON_GULPIN, \
|
||||
FRONTIER_MON_VENONAT, \
|
||||
FRONTIER_MON_SMOOCHUM, \
|
||||
FRONTIER_MON_ABRA, \
|
||||
FRONTIER_MON_GASTLY, \
|
||||
FRONTIER_MON_SLOWPOKE, \
|
||||
FRONTIER_MON_BULBASAUR, \
|
||||
FRONTIER_MON_ODDISH, \
|
||||
FRONTIER_MON_NATU, \
|
||||
FRONTIER_MON_GRIMER, \
|
||||
FRONTIER_MON_EXEGGCUTE, \
|
||||
FRONTIER_MON_DROWZEE, \
|
||||
FRONTIER_MON_HOUNDOUR, \
|
||||
FRONTIER_MON_SPOINK, \
|
||||
FRONTIER_MON_TENTACOOL, \
|
||||
FRONTIER_MON_KOFFING, \
|
||||
FRONTIER_MON_NIDORINA, \
|
||||
FRONTIER_MON_NIDORINO, \
|
||||
FRONTIER_MON_BEEDRILL, \
|
||||
FRONTIER_MON_DUSTOX, \
|
||||
FRONTIER_MON_ARIADOS, \
|
||||
FRONTIER_MON_RALTS, \
|
||||
FRONTIER_MON_POOCHYENA, \
|
||||
FRONTIER_MON_SHEDINJA, \
|
||||
FRONTIER_MON_ZUBAT, \
|
||||
FRONTIER_MON_SPINARAK, \
|
||||
FRONTIER_MON_WYNAUT, \
|
||||
FRONTIER_MON_NIDORAN_M, \
|
||||
FRONTIER_MON_NIDORAN_F, \
|
||||
FRONTIER_MON_KIRLIA, \
|
||||
FRONTIER_MON_MEDITITE, \
|
||||
FRONTIER_MON_EKANS, \
|
||||
FRONTIER_MON_SHUPPET, \
|
||||
FRONTIER_MON_DUSKULL, \
|
||||
FRONTIER_MON_BELLSPROUT, \
|
||||
FRONTIER_MON_BALTOY, \
|
||||
FRONTIER_MON_BELDUM, \
|
||||
FRONTIER_MON_GULPIN, \
|
||||
FRONTIER_MON_VENONAT, \
|
||||
FRONTIER_MON_SMOOCHUM, \
|
||||
FRONTIER_MON_ABRA, \
|
||||
FRONTIER_MON_GASTLY, \
|
||||
FRONTIER_MON_SLOWPOKE, \
|
||||
FRONTIER_MON_BULBASAUR, \
|
||||
FRONTIER_MON_ODDISH, \
|
||||
FRONTIER_MON_NATU, \
|
||||
FRONTIER_MON_GRIMER, \
|
||||
FRONTIER_MON_EXEGGCUTE, \
|
||||
FRONTIER_MON_DROWZEE, \
|
||||
FRONTIER_MON_HOUNDOUR, \
|
||||
FRONTIER_MON_SPOINK, \
|
||||
FRONTIER_MON_TENTACOOL, \
|
||||
FRONTIER_MON_KOFFING, \
|
||||
FRONTIER_MON_NIDORINA, \
|
||||
FRONTIER_MON_NIDORINO, \
|
||||
FRONTIER_MON_BEEDRILL, \
|
||||
FRONTIER_MON_DUSTOX, \
|
||||
FRONTIER_MON_ARIADOS, \
|
||||
-1
|
||||
|
||||
// Also used by early Pkmn Breeder, Collector, and Beauty trainers
|
||||
|
||||
@ -11881,7 +11881,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
|
||||
.zMovePower = 180,
|
||||
.zMoveEffect = Z_EFFECT_NONE,
|
||||
},
|
||||
|
||||
|
||||
[MOVE_ZIPPY_ZAP] =
|
||||
{
|
||||
#if B_UPDATED_MOVE_DATA >= GEN_8
|
||||
@ -12193,7 +12193,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
|
||||
.zMovePower = 120,
|
||||
.zMoveEffect = Z_EFFECT_NONE,
|
||||
},
|
||||
|
||||
|
||||
[MOVE_DYNAMAX_CANNON] =
|
||||
{
|
||||
.effect = EFFECT_DYNAMAX_DOUBLE_DMG,
|
||||
@ -13105,7 +13105,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
|
||||
.zMovePower = 100,
|
||||
.zMoveEffect = Z_EFFECT_NONE,
|
||||
},
|
||||
|
||||
|
||||
[MOVE_THUNDER_CAGE] =
|
||||
{
|
||||
.effect = EFFECT_TRAP,
|
||||
|
||||
@ -1,40 +1,40 @@
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowSmall;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowMedium;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowLarge;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowExtraLarge;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_TallGrass;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Ripple;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Ash;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_SurfBlob;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Arrow;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_GroundImpactDust;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_JumpTallGrass;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_SandFootprints;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_JumpBigSplash;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Splash;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_JumpSmallSplash;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_LongGrass;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_JumpLongGrass;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedGrass;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedGrass2;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedSand;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_WaterSurfacing;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_ReflectionDistortion;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Sparkle;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_DeepSandFootprints;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_TreeDisguise;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_MountainDisguise;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Bird;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_BikeTireTracks;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_SandDisguisePlaceholder;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_SandPile;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_ShortGrass;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_HotSpringsWater;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_AshPuff;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_AshLaunch;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Bubbles;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_SmallSparkle;
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Rayquaza;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowSmall;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowMedium;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowLarge;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowExtraLarge;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_TallGrass;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_Ripple;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_Ash;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_SurfBlob;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_Arrow;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_GroundImpactDust;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_JumpTallGrass;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_SandFootprints;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_JumpBigSplash;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_Splash;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_JumpSmallSplash;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_LongGrass;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_JumpLongGrass;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedGrass;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedGrass2;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedSand;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_WaterSurfacing;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_ReflectionDistortion;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_Sparkle;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_DeepSandFootprints;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_TreeDisguise;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_MountainDisguise;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_Bird;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_BikeTireTracks;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_SandDisguisePlaceholder;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_SandPile;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_ShortGrass;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_HotSpringsWater;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_AshPuff;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_AshLaunch;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_Bubbles;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_SmallSparkle;
|
||||
extern const struct SpriteTemplate gFieldEffectObjectTemplate_Rayquaza;
|
||||
|
||||
const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[] = {
|
||||
[FLDEFFOBJ_SHADOW_S] = &gFieldEffectObjectTemplate_ShadowSmall,
|
||||
|
||||
@ -1147,7 +1147,7 @@ static const union AnimCmd *const sAnimTable_AshPuff[] =
|
||||
sAnim_AshPuff,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_AshPuff =
|
||||
const struct SpriteTemplate gFieldEffectObjectTemplate_AshPuff =
|
||||
{
|
||||
.tileTag = TAG_NONE,
|
||||
.paletteTag = FLDEFF_PAL_TAG_ASH,
|
||||
|
||||
@ -1560,7 +1560,7 @@ const struct Item gItems[] =
|
||||
{
|
||||
.name = _("Lure"),
|
||||
.itemId = ITEM_LURE,
|
||||
.price = 350,
|
||||
.price = 400,
|
||||
.holdEffectParam = 100,
|
||||
.description = sLureDesc,
|
||||
.pocket = POCKET_ITEMS,
|
||||
@ -1574,7 +1574,7 @@ const struct Item gItems[] =
|
||||
{
|
||||
.name = _("Super Lure"),
|
||||
.itemId = ITEM_SUPER_LURE,
|
||||
.price = 500,
|
||||
.price = 700,
|
||||
.holdEffectParam = 200,
|
||||
.description = sSuperLureDesc,
|
||||
.pocket = POCKET_ITEMS,
|
||||
@ -1588,7 +1588,7 @@ const struct Item gItems[] =
|
||||
{
|
||||
.name = _("Max Lure"),
|
||||
.itemId = ITEM_MAX_LURE,
|
||||
.price = 700,
|
||||
.price = 900,
|
||||
.holdEffectParam = 250,
|
||||
.description = sMaxLureDesc,
|
||||
.pocket = POCKET_ITEMS,
|
||||
@ -9071,7 +9071,7 @@ const struct Item gItems[] =
|
||||
.pocket = POCKET_KEY_ITEMS,
|
||||
.type = ITEM_USE_PARTY_MENU,
|
||||
.fieldUseFunc = ItemUseOutOfBattle_FormChange,
|
||||
.secondaryId = FORM_ITEM_USE_TIME,
|
||||
.secondaryId = FORM_ITEM_USE,
|
||||
},
|
||||
|
||||
[ITEM_REVEAL_GLASS] =
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user