Merge remote-tracking branch 'upstream/upcoming' into move-prediction
1
.github/workflows/labels.yml
vendored
@ -15,6 +15,7 @@ jobs:
|
||||
count: 1
|
||||
labels: |
|
||||
General
|
||||
General Merge
|
||||
category: ability
|
||||
category: battle-ai
|
||||
category: battle-mechanic
|
||||
|
||||
23
Makefile
@ -162,8 +162,16 @@ MAPJSON := $(TOOLS_DIR)/mapjson/mapjson$(EXE)
|
||||
JSONPROC := $(TOOLS_DIR)/jsonproc/jsonproc$(EXE)
|
||||
TRAINERPROC := $(TOOLS_DIR)/trainerproc/trainerproc$(EXE)
|
||||
PATCHELF := $(TOOLS_DIR)/patchelf/patchelf$(EXE)
|
||||
ROMTEST ?= $(shell { command -v mgba-rom-test || command -v $(TOOLS_DIR)/mgba/mgba-rom-test$(EXE); } 2>/dev/null)
|
||||
ROMTESTHYDRA := $(TOOLS_DIR)/mgba-rom-test-hydra/mgba-rom-test-hydra$(EXE)
|
||||
ifeq ($(shell uname),Darwin)
|
||||
ROMTEST ?= $(shell command -v mgba-rom-test-mac 2>/dev/null || echo $(TOOLS_DIR)/mgba/mgba-rom-test-mac)
|
||||
ROMTESTHYDRA := $(shell command -v mgba-rom-test-hydra 2>/dev/null || echo $(TOOLS_DIR)/mgba-rom-test-hydra/mgba-rom-test-hydra)
|
||||
else ifeq ($(shell uname),Linux)
|
||||
ROMTEST ?= $(shell command -v mgba-rom-test 2>/dev/null || echo $(TOOLS_DIR)/mgba/mgba-rom-test)
|
||||
ROMTESTHYDRA := $(shell command -v mgba-rom-test-hydra 2>/dev/null || echo $(TOOLS_DIR)/mgba-rom-test-hydra/mgba-rom-test-hydra)
|
||||
else
|
||||
ROMTEST ?= $(TOOLS_DIR)/mgba/mgba-rom-test$(EXE)
|
||||
ROMTESTHYDRA := $(TOOLS_DIR)/mgba-rom-test-hydra/mgba-rom-test-hydra$(EXE)
|
||||
endif
|
||||
|
||||
# Learnset helper is a Python script
|
||||
LEARNSET_HELPERS_DIR := $(TOOLS_DIR)/learnset_helpers
|
||||
@ -171,6 +179,15 @@ LEARNSET_HELPERS_DATA_DIR := $(LEARNSET_HELPERS_DIR)/porymoves_files
|
||||
LEARNSET_HELPERS_BUILD_DIR := $(LEARNSET_HELPERS_DIR)/build
|
||||
ALL_LEARNABLES_JSON := $(LEARNSET_HELPERS_BUILD_DIR)/all_learnables.json
|
||||
|
||||
# wild_encounters.h is generated by a Python script
|
||||
WILD_ENCOUNTERS_TOOL_DIR := $(TOOLS_DIR)/wild_encounters
|
||||
AUTO_GEN_TARGETS += $(DATA_SRC_SUBDIR)/wild_encounters.h
|
||||
|
||||
$(DATA_SRC_SUBDIR)/wild_encounters.h: $(DATA_SRC_SUBDIR)/wild_encounters.json $(WILD_ENCOUNTERS_TOOL_DIR)/wild_encounters_to_header.py $(INCLUDE_DIRS)/config/overworld.h
|
||||
python3 $(WILD_ENCOUNTERS_TOOL_DIR)/wild_encounters_to_header.py > $@
|
||||
|
||||
$(C_BUILDDIR)/wild_encounter.o: c_dep += $(DATA_SRC_SUBDIR)/wild_encounters.h
|
||||
|
||||
PERL := perl
|
||||
SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c
|
||||
|
||||
@ -434,7 +451,7 @@ $(OBJ_DIR)/sym_common.ld: sym_common.txt $(C_OBJS) $(wildcard common_syms/*.txt)
|
||||
$(OBJ_DIR)/sym_ewram.ld: sym_ewram.txt
|
||||
$(RAMSCRGEN) ewram_data $< ENGLISH > $@
|
||||
|
||||
TEACHABLE_DEPS := $(ALL_LEARNABLES_JSON) $(shell find data/ -type f -name '*.inc') $(INCLUDE_DIRS)/constants/tms_hms.h $(C_SUBDIR)/pokemon.c
|
||||
TEACHABLE_DEPS := $(ALL_LEARNABLES_JSON) $(shell find data/ -type f -name '*.inc') $(INCLUDE_DIRS)/constants/tms_hms.h $(INCLUDE_DIRS)/config/pokemon.h $(C_SUBDIR)/pokemon.c
|
||||
|
||||
$(LEARNSET_HELPERS_BUILD_DIR):
|
||||
@mkdir -p $@
|
||||
|
||||
@ -829,7 +829,7 @@
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro damagetohalftargethp
|
||||
.macro unused_0x94
|
||||
.byte 0x94
|
||||
.endm
|
||||
|
||||
@ -877,11 +877,11 @@
|
||||
.byte 0x9e
|
||||
.endm
|
||||
|
||||
.macro dmgtolevel
|
||||
.macro unused_0x9f
|
||||
.byte 0x9f
|
||||
.endm
|
||||
|
||||
.macro psywavedamageeffect
|
||||
.macro unused_0xA0
|
||||
.byte 0xa0
|
||||
.endm
|
||||
|
||||
@ -1007,7 +1007,7 @@
|
||||
.4byte \jumpInstr
|
||||
.endm
|
||||
|
||||
.macro unused_bb
|
||||
.macro tryhealingitem
|
||||
.byte 0xbb
|
||||
.endm
|
||||
|
||||
@ -1140,9 +1140,8 @@
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro trywish turnNumber:req, failInstr:req
|
||||
.macro trywish failInstr:req
|
||||
.byte 0xd4
|
||||
.byte \turnNumber
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
@ -1331,7 +1330,7 @@
|
||||
.byte \stat
|
||||
.endm
|
||||
|
||||
.macro jumpifoppositegenders jumpInstr:req
|
||||
.macro jumpifcaptivateaffected jumpInstr:req
|
||||
.byte 0xfc
|
||||
.4byte \jumpInstr
|
||||
.endm
|
||||
@ -1367,6 +1366,10 @@
|
||||
callnative BS_RestoreAttacker
|
||||
.endm
|
||||
|
||||
.macro jumpifintimidateabilityprevented
|
||||
callnative BS_JumpIfIntimidateAbilityPrevented
|
||||
.endm
|
||||
|
||||
.macro metalburstdamagecalculator failInstr:req
|
||||
callnative BS_CalcMetalBurstDmg
|
||||
.4byte \failInstr
|
||||
@ -1383,6 +1386,10 @@
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
.macro tryintimidatejectpack
|
||||
callnative BS_TryIntimidatEjectpack
|
||||
.endm
|
||||
|
||||
.macro allyswitchswapbattlers
|
||||
callnative BS_AllySwitchSwapBattler
|
||||
.endm
|
||||
@ -1509,12 +1516,6 @@
|
||||
.4byte \jumpInstr
|
||||
.endm
|
||||
|
||||
.macro jumpifemergencyexited battler:req, jumpInstr:req
|
||||
callnative BS_JumpIfEmergencyExited
|
||||
.byte \battler
|
||||
.4byte \jumpInstr
|
||||
.endm
|
||||
|
||||
.macro jumpifelectricabilityaffected battler:req, ability:req, jumpInstr:req
|
||||
callnative BS_JumpIfElectricAbilityAffected
|
||||
.byte \battler
|
||||
@ -1743,10 +1744,6 @@
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
.macro hitswitchtargetfailed
|
||||
callnative BS_HitSwitchTargetFailed
|
||||
.endm
|
||||
|
||||
.macro tryrevivalblessing, failInstr:req
|
||||
callnative BS_TryRevivalBlessing
|
||||
.4byte \failInstr
|
||||
@ -2034,10 +2031,6 @@
|
||||
.4byte \jumpInstr
|
||||
.endm
|
||||
|
||||
.macro setargtobattledamage
|
||||
various BS_ATTACKER, VARIOUS_SET_ARG_TO_BATTLE_DAMAGE
|
||||
.endm
|
||||
|
||||
.macro tryautotomize battler:req, failInstr:req
|
||||
various \battler, VARIOUS_TRY_AUTOTOMIZE
|
||||
.4byte \failInstr
|
||||
|
||||
@ -338,6 +338,12 @@
|
||||
.byte SCR_OP_GETTIME
|
||||
.endm
|
||||
|
||||
@ Sets the values of variable VAR_0x8000 to the time of day according to those found in rtc.h.
|
||||
@ 0 = MORNING, 1 = DAY, 2 = EVENING, 3 = NIGHT
|
||||
.macro gettimeofday
|
||||
callnative ScrCmd_gettimeofday
|
||||
.endm
|
||||
|
||||
@ Plays the specified sound. Only one sound may play at a time, with newer ones interrupting older ones.
|
||||
.macro playse song:req
|
||||
.byte SCR_OP_PLAYSE
|
||||
@ -1790,11 +1796,14 @@
|
||||
.4byte \text
|
||||
.endm
|
||||
|
||||
@ Equivalent to fadescreen but copies gPlttBufferUnfaded to an allocated buffer on the fade out
|
||||
@ and the reverse on the fade in, in effect saving gPlttBufferUnfaded to restore it.
|
||||
.macro fadescreenswapbuffers mode:req
|
||||
@ Equivalent to fadescreen but uses a hardware fade and darken/lighten blend modes,
|
||||
@ to avoid modifying palettes at all.
|
||||
@ Useful for fade-out/fade-in without leaving the overworld or entering a new scene.
|
||||
@ If nowait set, doesn't wait for the fade to complete
|
||||
.macro fadescreenswapbuffers mode:req, nowait=0
|
||||
.byte SCR_OP_FADESCREENSWAPBUFFERS
|
||||
.byte \mode
|
||||
.byte \nowait
|
||||
.endm
|
||||
|
||||
@ Buffers the specified trainer's class name to the given string var.
|
||||
@ -2444,7 +2453,7 @@
|
||||
callnative Script_SetDifficulty, requests_effects=1
|
||||
.byte \difficulty
|
||||
.endm
|
||||
|
||||
|
||||
.macro forcesave
|
||||
callnative Script_ForceSaveGame
|
||||
waitstate
|
||||
@ -2510,3 +2519,67 @@
|
||||
compare \a, \b
|
||||
cant_see_if 5
|
||||
.endm
|
||||
|
||||
@ Follower NPCs
|
||||
|
||||
@ Sets an NPC up to follow the player.
|
||||
@ Follower flags are defined in include/constants/follower_npc.h
|
||||
@ If you want to specify a battle partner without specifying a custom script, you can set the script parameter to 0.
|
||||
.macro setfollower localId:req, flags:req, script=0, battlePartner=0
|
||||
checkfollower
|
||||
goto_if_eq VAR_RESULT, TRUE, 1f
|
||||
hidefollower
|
||||
delay 16
|
||||
callnative ScriptSetFollowerNPC
|
||||
.if \script == 0
|
||||
.set setScript, FALSE
|
||||
.else
|
||||
.set setScript, TRUE
|
||||
.endif
|
||||
.byte \localId
|
||||
.2byte \flags
|
||||
.byte setScript
|
||||
.2byte \battlePartner
|
||||
.4byte \script
|
||||
updatefollowingmon
|
||||
1:
|
||||
.endm
|
||||
|
||||
@ Remove the follower NPC (assumes there will only ever be one).
|
||||
.macro destroyfollower
|
||||
callnative ScriptDestroyFollowerNPC
|
||||
.endm
|
||||
|
||||
@ Makes the player and follower NPC face one another.
|
||||
.macro facefollower
|
||||
callnative ScriptFaceFollowerNPC
|
||||
.endm
|
||||
|
||||
@ Makes the follower NPC walk into the player and get hidden.
|
||||
@ Optionally, you can set the walk speed for the movement:
|
||||
@ 0 = Slow
|
||||
@ 1 = Normal (default)
|
||||
@ 2 = Fast
|
||||
@ 3 = Faster
|
||||
.macro hidefollowernpc speed=1
|
||||
callnative ScriptHideNPCFollower
|
||||
.byte \speed
|
||||
waitmovement OBJ_EVENT_ID_NPC_FOLLOWER
|
||||
callnative HideNPCFollower
|
||||
.endm
|
||||
|
||||
@ Checks if you have a follower NPC. Returns the result to VAR_RESULT.
|
||||
.macro checkfollower
|
||||
callnative ScriptCheckFollowerNPC
|
||||
.endm
|
||||
|
||||
@ Updates Pokemon follower.
|
||||
.macro updatefollowingmon
|
||||
callnative ScriptUpdateFollowingMon
|
||||
.endm
|
||||
|
||||
@ Changes the battle partner of the existing follower NPC.
|
||||
.macro changefollowerbattler battlePartner:req
|
||||
callnative ScriptChangeFollowerNPCBattlePartner
|
||||
.2byte \battlePartner
|
||||
.endm
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
#include "constants/field_weather.h"
|
||||
@ The first .byte argument of each macro below is an index into gFieldEffectScriptFuncs
|
||||
|
||||
.macro field_eff_loadtiles address:req
|
||||
@ -5,9 +6,10 @@
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro field_eff_loadfadedpal address:req
|
||||
.macro field_eff_loadfadedpal address:req, color_map_type=COLOR_MAP_DARK_CONTRAST
|
||||
.byte 1
|
||||
.4byte \address
|
||||
.byte \color_map_type
|
||||
.endm
|
||||
|
||||
.macro field_eff_loadpal address:req
|
||||
@ -24,10 +26,11 @@
|
||||
.byte 4
|
||||
.endm
|
||||
|
||||
.macro field_eff_loadgfx_callnative tiles_address:req, palette_address:req, function_address:req
|
||||
.macro field_eff_loadgfx_callnative tiles_address:req, palette_address:req, function_address:req, color_map_type=COLOR_MAP_DARK_CONTRAST
|
||||
.byte 5
|
||||
.4byte \tiles_address
|
||||
.4byte \palette_address
|
||||
.byte \color_map_type
|
||||
.4byte \function_address
|
||||
.endm
|
||||
|
||||
@ -37,8 +40,9 @@
|
||||
.4byte \function_address
|
||||
.endm
|
||||
|
||||
.macro field_eff_loadfadedpal_callnative palette_address:req, function_address:req
|
||||
.macro field_eff_loadfadedpal_callnative palette_address:req, function_address:req, color_map_type=COLOR_MAP_DARK_CONTRAST
|
||||
.byte 7
|
||||
.4byte \palette_address
|
||||
.byte \color_map_type
|
||||
.4byte \function_address
|
||||
.endm
|
||||
|
||||
@ -1064,6 +1064,7 @@ ROUND_RIGHT_PAREN = F9 14
|
||||
CIRCLE_DOT = F9 15
|
||||
TRIANGLE = F9 16
|
||||
BIG_MULT_X = F9 17
|
||||
CIRCLE_HOLLOW = F9 18
|
||||
|
||||
EMOJI_UNDERSCORE = F9 D0
|
||||
EMOJI_PIPE = F9 D1
|
||||
|
||||
@ -200,7 +200,7 @@ gBattleAnimMove_NaturalGift::
|
||||
createvisualtask AnimTask_DragonDanceWaver, 5
|
||||
playsewithpan SE_M_TELEPORT, -64
|
||||
delay 8
|
||||
createvisualtask AnimTask_BlendPalInAndOutByTag, 5, 10249, 19456, 14, 0, 3
|
||||
createvisualtask AnimTask_BlendPalInAndOutByTag, 5, ANIM_TAG_HOLLOW_ORB, 19456, 14, 0, 3
|
||||
createsprite gDragonDanceOrbSpriteTemplate, ANIM_ATTACKER, 2, 0
|
||||
createsprite gDragonDanceOrbSpriteTemplate, ANIM_ATTACKER, 2, 43
|
||||
createsprite gDragonDanceOrbSpriteTemplate, ANIM_ATTACKER, 2, 85
|
||||
@ -824,7 +824,7 @@ gBattleAnimMove_Punishment::
|
||||
monbg ANIM_TARGET
|
||||
setalpha 12, 8
|
||||
playsewithpan 155, SOUND_PAN_TARGET
|
||||
createsprite gPunishmentSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1, 0
|
||||
createsprite gPunishmentSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 0
|
||||
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_TARGET
|
||||
@ -844,7 +844,7 @@ gBattleAnimMove_Punishment::
|
||||
gBattleAnimMove_LastResort::
|
||||
fadetobg BG_COSMIC
|
||||
waitbgfadeout
|
||||
createvisualtask AnimTask_StartSlidingBg, 2, 4, 0, 128, 0, -1
|
||||
createvisualtask AnimTask_StartSlidingBg, 2, 0, 128, 0, -1
|
||||
waitbgfadein
|
||||
loadspritegfx ANIM_TAG_IMPACT
|
||||
playsewithpan SE_M_SWIFT, SOUND_PAN_ATTACKER
|
||||
@ -855,19 +855,19 @@ gBattleAnimMove_LastResort::
|
||||
waitplaysewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER, 8
|
||||
createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, ANIM_ATTACKER, 18, 6, 2, 4
|
||||
waitforvisualfinish
|
||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_TARGET, 2, 1, 0, 16, 16, RGB_WHITE
|
||||
createsprite gSlideMonToOffsetSpriteTemplate, ANIM_TARGET, 2, 0, 20, 0, 0, 4
|
||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 16, 16, RGB_WHITE
|
||||
createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 20, 0, 0, 4
|
||||
delay 3
|
||||
waitforvisualfinish
|
||||
playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 132, -10, 0, 1, 0
|
||||
createsprite gSlideMonToOffsetSpriteTemplate, ANIM_TARGET, 2, 1, -32, 0, 0, 3
|
||||
waitforvisualfinish
|
||||
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, ANIM_ATTACKER, 0
|
||||
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, ANIM_TARGET, 0
|
||||
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, ANIM_ATTACKER, 1
|
||||
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, ANIM_TARGET, 1
|
||||
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 4, 0, 12, 1
|
||||
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 4, 0, 12, 1
|
||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_TARGET, 2, 1, 2, 16, 0, RGB_WHITE
|
||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 16, 0, RGB_WHITE
|
||||
waitforvisualfinish
|
||||
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, ANIM_ATTACKER, 1
|
||||
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, ANIM_TARGET, 1
|
||||
@ -897,9 +897,9 @@ gBattleAnimMove_SuckerPunch::
|
||||
loadspritegfx ANIM_TAG_POISON_JAB
|
||||
loadspritegfx ANIM_TAG_IMPACT
|
||||
createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 20, 0, 0, 4
|
||||
createsprite gSuckerPunchSpriteTemplate, ANIM_TARGET, 130, -18, 5, 40, 8, 160, 0
|
||||
createsprite gSuckerPunchSpriteTemplate, ANIM_TARGET, 2, -18, 5, 40, 8, 160, 0
|
||||
delay 4
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 130, -8, 8, 1, 2
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -8, 8, 1, 2
|
||||
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 6, 384, ANIM_TARGET, 2
|
||||
playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET
|
||||
waitforvisualfinish
|
||||
@ -1003,11 +1003,11 @@ gBattleAnimGeneral_AquaRingHeal::
|
||||
createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 12, 0, 25, 0
|
||||
setalpha 8, 8
|
||||
playsewithpan SE_M_MILK_DRINK, SOUND_PAN_ATTACKER
|
||||
createsprite gGuardRingSpriteTemplate, 2, 0
|
||||
createsprite gGuardRingSpriteTemplate, ANIM_ATTACKER, 0
|
||||
delay 4
|
||||
createsprite gGuardRingSpriteTemplate, 2, 0
|
||||
createsprite gGuardRingSpriteTemplate, ANIM_ATTACKER, 0
|
||||
delay 4
|
||||
createsprite gGuardRingSpriteTemplate, 2, 0
|
||||
createsprite gGuardRingSpriteTemplate, ANIM_ATTACKER, 0
|
||||
waitforvisualfinish
|
||||
playsewithpan SE_SHINY, SOUND_PAN_ATTACKER
|
||||
createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_ATK_SIDE, 0, 2, 0, 10, RGB_WHITE
|
||||
@ -1090,33 +1090,33 @@ gBattleAnimMove_FlareBlitz::
|
||||
createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 22, 1
|
||||
createvisualtask AnimTask_BlendMonInAndOut, 3, ANIM_TARGET, RGB_RED, 12, 1, 1
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 0
|
||||
createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 129, 0, 10, 192, 176, 40
|
||||
createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, 192, 176, 40
|
||||
playsewithpan SE_M_COMET_PUNCH, +63
|
||||
delay 5
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 24, 8, 1, 0
|
||||
createvisualtask AnimTask_BlendMonInAndOut, 3, ANIM_TARGET, RGB_RED, 12, 1, 1
|
||||
createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 129, 0, 10, -192, 240, 40
|
||||
createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, -192, 240, 40
|
||||
playsewithpan SE_M_COMET_PUNCH, +63
|
||||
delay 5
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -24, -16, 1, 0
|
||||
createvisualtask AnimTask_BlendMonInAndOut, 3, ANIM_TARGET, RGB_RED, 12, 1, 1
|
||||
createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 129, 0, 10, 192, -160, 40
|
||||
createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, 192, -160, 40
|
||||
playsewithpan SE_M_COMET_PUNCH, +63
|
||||
delay 5
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 8, 4, 1, 0
|
||||
createvisualtask AnimTask_BlendMonInAndOut, 3, ANIM_TARGET, RGB_RED, 12, 1, 1
|
||||
createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 129, 0, 10, -192, -112, 40
|
||||
createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, -192, -112, 40
|
||||
playsewithpan SE_M_COMET_PUNCH, +63
|
||||
delay 5
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -16, 19, 1, 0
|
||||
createvisualtask AnimTask_BlendMonInAndOut, 3, ANIM_TARGET, RGB_RED, 12, 1, 1
|
||||
createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 129, 0, 10, 160, 48, 40
|
||||
createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, 160, 48, 40
|
||||
playsewithpan SE_M_COMET_PUNCH, +63
|
||||
delay 5
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 18, -18, 1, 0
|
||||
createvisualtask AnimTask_BlendMonInAndOut, 3, ANIM_TARGET, RGB_RED, 12, 1, 1
|
||||
createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 129, 0, 10, -224, -32, 40
|
||||
createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 129, 0, 10, 112, -128, 40
|
||||
createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, -224, -32, 40
|
||||
createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, 112, -128, 40
|
||||
playsewithpan SE_M_COMET_PUNCH, +63
|
||||
createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 0, RGB_BLACK
|
||||
playsewithpan SE_M_COMET_PUNCH, +63
|
||||
@ -1138,10 +1138,10 @@ gBattleAnimMove_ForcePalm::
|
||||
splitbgprio ANIM_TARGET
|
||||
setalpha 12, 8
|
||||
playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_TARGET
|
||||
createsprite gKarateChopSpriteTemplate, ANIM_TARGET, 2, -16, 0, 0, 0, 10, 1, 3, 0
|
||||
createsprite gKarateChopSpriteTemplate, ANIM_ATTACKER, 2, -16, 0, 0, 0, 10, 1, 3, 0
|
||||
waitforvisualfinish
|
||||
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
|
||||
createsprite gForcePalmSpriteTemplate, ANIM_TARGET 3, 0, 0, 1, 2
|
||||
createsprite gForcePalmSpriteTemplate, ANIM_ATTACKER 3, 0, 0, 1, 2
|
||||
createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 4, 0, 6, 1
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_DEF_PARTNER
|
||||
@ -1379,17 +1379,17 @@ gBattleAnimMove_AquaTail::
|
||||
createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 6
|
||||
delay 4
|
||||
playsewithpan SE_M_VITAL_THROW, SOUND_PAN_TARGET
|
||||
createsprite gAquaTailKnockOffSpriteTemplate, ANIM_ATTACKER, 130, -16, -16
|
||||
createsprite gAquaTailKnockOffSpriteTemplate, ANIM_ATTACKER, 2, -16, -16
|
||||
delay 8
|
||||
createsprite gComplexPaletteBlendSpriteTemplate, ANIM_TARGET, 2, 31, 5, 1, RGB_WHITE, 10, 0, 0
|
||||
createsprite gAquaTailHitSpriteTemplate, ANIM_TARGET, 131, 0, 0, 1, 2
|
||||
createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 5, 1, RGB_WHITE, 10, 0, 0
|
||||
createsprite gAquaTailHitSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 2
|
||||
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
|
||||
createsprite gSlideMonToOffsetSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, -12, 10, 0, 3
|
||||
createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, -12, 10, 0, 3
|
||||
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0, 5
|
||||
delay 3
|
||||
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 0, 3, 6, 1
|
||||
delay 5
|
||||
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0, 6
|
||||
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0, 6
|
||||
delay 10
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_DEF_PARTNER
|
||||
@ -1532,7 +1532,7 @@ gBattleAnimMove_DragonPulse::
|
||||
clearmonbg ANIM_TARGET
|
||||
end
|
||||
DragonPulseParticle:
|
||||
createsprite gDragonPulseSpriteTemplate, ANIM_ATTACKER, 130, 16, 0, 0, 0, 13, 0
|
||||
createsprite gDragonPulseSpriteTemplate, ANIM_TARGET, 2, 16, 0, 0, 0, 13, 0
|
||||
delay 4
|
||||
return
|
||||
|
||||
@ -1544,21 +1544,21 @@ gBattleAnimMove_DragonRush::
|
||||
createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 6
|
||||
delay 4
|
||||
playsewithpan SE_M_VITAL_THROW, SOUND_PAN_TARGET
|
||||
createsprite gDragonRushSpriteTemplate, ANIM_ATTACKER, 131, -16, -16
|
||||
createsprite gDragonRushSpriteTemplate, ANIM_ATTACKER, 3, -16, -16
|
||||
delay 8
|
||||
createsprite gComplexPaletteBlendSpriteTemplate, ANIM_TARGET, 2, 31, 5, 1, RGB_WHITE, 10, 0, 0
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1
|
||||
createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 5, 1, RGB_WHITE, 10, 0, 0
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 1
|
||||
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 5, 1
|
||||
waitforvisualfinish
|
||||
playsewithpan 131, SOUND_PAN_TARGET
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_TARGET, 2, 0, 0, 20, 24, 14, 2
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_TARGET, 2, 5, 0, -20, 24, 14, 1
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_TARGET, 2, 0, 5, 20, -24, 14, 2
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_TARGET, 2, -5, 0, 20, 24, 14, 2
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_TARGET, 2, 0, -5, 30, 18, 8, 2
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, -18, 8, 2
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_TARGET, 2, 0, 0, -30, 18, 8, 2
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_TARGET, 2, 0, 0, -30, -18, 8, 2
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 20, 24, 14, 2
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, 5, 0, -20, 24, 14, 1
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, 0, 5, 20, -24, 14, 2
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, -5, 0, 20, 24, 14, 2
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, 0, -5, 30, 18, 8, 2
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 30, -18, 8, 2
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, -30, 18, 8, 2
|
||||
createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, -30, -18, 8, 2
|
||||
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 3, 7, 1
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_DEF_PARTNER
|
||||
@ -1704,29 +1704,28 @@ gBattleAnimMove_BraveBird::
|
||||
gBattleAnimMove_EarthPower::
|
||||
loadspritegfx ANIM_TAG_SMALL_EMBER
|
||||
loadspritegfx ANIM_TAG_FIRE_PLUME
|
||||
createvisualtask AnimTask_HorizontalShake, 3, ANIM_DEF_PARTNER, 10, 50
|
||||
createvisualtask AnimTask_HorizontalShake, 3, ANIM_TARGET, 10, 50
|
||||
playsewithpan SE_M_EARTHQUAKE, SOUND_PAN_TARGET
|
||||
delay 40
|
||||
loopsewithpan 145, SOUND_PAN_TARGET 11, 3
|
||||
createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 3, 25, 1
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 194, 1, 5, 0
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 66, 1, 5, 0
|
||||
delay 1
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 194, 1, -10, -15
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 66, 1, -10, -15
|
||||
delay 1
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 130, 1, 0, 25
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 2, 1, 0, 25
|
||||
delay 1
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 194, 1, 15, 5
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 66, 1, 15, 5
|
||||
delay 1
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 194, 1, -25, 0
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 66, 1, -25, 0
|
||||
delay 1
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 130, 1, 30, 30
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 2, 1, 30, 30
|
||||
delay 1
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 130, 1, -27, 25
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 2, 1, -27, 25
|
||||
delay 1
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 194, 1, 0, 8
|
||||
createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 66, 1, 0, 8
|
||||
waitforvisualfinish
|
||||
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_TARGET, 194, 0, 0, 4
|
||||
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_TARGET, 66, 0, 0, 4
|
||||
waitforvisualfinish
|
||||
end
|
||||
|
||||
@ -1790,7 +1789,7 @@ GigaImpactContinuity:
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, -10, 0, 1, 0
|
||||
playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET
|
||||
delay 1
|
||||
createsprite gSlideMonToOffsetSpriteTemplate, ANIM_TARGET, 2, 1, -16, 0, 0, 4
|
||||
createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -16, 0, 0, 4
|
||||
waitforvisualfinish
|
||||
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 4, 0, 12, 1
|
||||
waitforvisualfinish
|
||||
@ -1879,17 +1878,17 @@ gBattleAnimMove_Avalanche::
|
||||
loadspritegfx ANIM_TAG_ROCKS
|
||||
loadspritegfx ANIM_TAG_ICE_CHUNK
|
||||
monbg ANIM_DEF_PARTNER
|
||||
createsprite gShakeMonOrTerrainSpriteTemplate, ANIM_TARGET, 2, 7, 1, 11, 1
|
||||
createsprite gAvalancheSpriteTemplate, ANIM_TARGET, 130, -5, 1, -5, 1
|
||||
createsprite gShakeMonOrTerrainSpriteTemplate, ANIM_ATTACKER, 2, 7, 1, 11, 1
|
||||
createsprite gAvalancheSpriteTemplate, ANIM_TARGET, 2, -5, 1, -5, 1
|
||||
playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET
|
||||
delay 2
|
||||
createsprite gAvalancheSpriteTemplate, ANIM_TARGET, 130, 5, 0, 6, 1
|
||||
createsprite gAvalancheSpriteTemplate, ANIM_TARGET, 2, 5, 0, 6, 1
|
||||
playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET
|
||||
delay 2
|
||||
createsprite gAvalancheSpriteTemplate, ANIM_TARGET, 130, 19, 1, 10, 1
|
||||
createsprite gAvalancheSpriteTemplate, ANIM_TARGET, 2, 19, 1, 10, 1
|
||||
playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET
|
||||
delay 2
|
||||
createsprite gAvalancheSpriteTemplate ANIM_TARGET, 130, -17, 2, -20, 1
|
||||
createsprite gAvalancheSpriteTemplate ANIM_TARGET, 2, -17, 2, -20, 1
|
||||
playsewithpan SE_M_ROCK_THROW, SOUND_PAN_TARGET
|
||||
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 5, 50, 1
|
||||
createvisualtask AnimTask_ShakeMon, 2, ANIM_DEF_PARTNER, 0, 5, 50, 1
|
||||
@ -2212,7 +2211,7 @@ gBattleAnimMove_ZenHeadbutt::
|
||||
setalpha 12, 8
|
||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 4, 0
|
||||
waitforvisualfinish
|
||||
createsprite gZenHeadbuttSpriteTemplate, ANIM_ATTACKER, 66, 0
|
||||
createsprite gZenHeadbuttSpriteTemplate, ANIM_ATTACKER, 2, 0
|
||||
delay 18
|
||||
playsewithpan SE_M_MORNING_SUN, SOUND_PAN_ATTACKER
|
||||
waitforvisualfinish
|
||||
@ -2228,7 +2227,7 @@ gBattleAnimMove_ZenHeadbutt::
|
||||
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 2, 0, 4, 1
|
||||
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 6, 1
|
||||
createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 1, 2
|
||||
createsprite gAquaTailHitSpriteTemplate, ANIM_TARGET, 131, 0, 0, 1, 1
|
||||
createsprite gAquaTailHitSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1
|
||||
playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET
|
||||
waitforvisualfinish
|
||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 4, 4, 0, 0
|
||||
@ -2246,22 +2245,22 @@ gBattleAnimMove_MirrorShot::
|
||||
createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 0, 10, RGB_WHITEALPHA
|
||||
createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_IMPACT, 0, 12, 12, RGB(21, 21, 21)
|
||||
waitforvisualfinish
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 131, 1, 2
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2
|
||||
createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_VITAL_THROW2, SOUND_PAN_TARGET
|
||||
delay 3
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 131, 1, 2
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2
|
||||
createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_VITAL_THROW2, SOUND_PAN_TARGET
|
||||
delay 3
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 131, 1, 2
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2
|
||||
createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_VITAL_THROW2, SOUND_PAN_TARGET
|
||||
delay 3
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 131, 1, 2
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2
|
||||
createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_VITAL_THROW2, SOUND_PAN_TARGET
|
||||
delay 3
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 131, 1, 2
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2
|
||||
createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_VITAL_THROW2, SOUND_PAN_TARGET
|
||||
delay 3
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 131, 1, 2
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2
|
||||
createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_VITAL_THROW2, SOUND_PAN_TARGET
|
||||
waitforvisualfinish
|
||||
createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 10, 0, RGB_WHITEALPHA
|
||||
@ -2318,27 +2317,27 @@ gBattleAnimMove_RockClimb::
|
||||
monbg ANIM_DEF_PARTNER
|
||||
splitbgprio ANIM_TARGET
|
||||
setalpha 12, 8
|
||||
createvisualtask AnimTask_Rollout, 2, 0
|
||||
createvisualtask AnimTask_Rollout, 2, 1
|
||||
waitforvisualfinish
|
||||
createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 2, 0, 1, 30, 1, RGB(0, 16, 1)
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 131, -15, 8, 1, 1
|
||||
createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 2, 0, 1, 30, 1, 0
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -15, 8, 1, 1
|
||||
playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET
|
||||
delay 1
|
||||
playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 131, -5, -12, 1, 1
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -5, -12, 1, 1
|
||||
delay 1
|
||||
playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 131, 0, -32, 1, 1
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, -32, 1, 1
|
||||
delay 1
|
||||
playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 131, 5, -52, 1, 1
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 5, -52, 1, 1
|
||||
createsprite gSlideMonToOffsetSpriteTemplate, ANIM_TARGET, 2, 1, -25, 16, 1, 4
|
||||
delay 4
|
||||
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 0, 3, 6, 1
|
||||
delay 30
|
||||
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 6
|
||||
delay 4
|
||||
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_TARGET, 2, 1, 0, 6
|
||||
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 6
|
||||
clearmonbg ANIM_DEF_PARTNER
|
||||
blendoff
|
||||
end
|
||||
@ -2435,32 +2434,32 @@ gBattleAnimMove_DracoMeteor::
|
||||
blendoff
|
||||
end
|
||||
DracoMeteor1:
|
||||
createsprite gDracoMeteorRocksSpriteTemplate, ANIM_ATTACKER, 131, -48, -64, 40, 32, 25
|
||||
createsprite gDracoMeteorRocksSpriteTemplate, ANIM_ATTACKER, 3, -48, -64, 40, 32, 25
|
||||
delay 2
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 131, -48, -64, 40, 32, 25
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 3, -48, -64, 40, 32, 25
|
||||
delay 2
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 131, -48, -64, 40, 32, 25
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 3, -48, -64, 40, 32, 25
|
||||
return
|
||||
DracoMeteor2:
|
||||
createsprite gDracoMeteorRocksSpriteTemplate, ANIM_ATTACKER, 131, -112, -64, -8, 32, 25
|
||||
createsprite gDracoMeteorRocksSpriteTemplate, ANIM_ATTACKER, 3, -112, -64, -8, 32, 25
|
||||
delay 2
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 131, -112, -64, -8, 32, 25
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 3, -112, -64, -8, 32, 25
|
||||
delay 2
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 131, -112, -64, -8, 32, 25
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 3, -112, -64, -8, 32, 25
|
||||
return
|
||||
DracoMeteor3:
|
||||
createsprite gDracoMeteorRocksSpriteTemplate, ANIM_ATTACKER, 131, -80, -64, 24, 32, 25
|
||||
createsprite gDracoMeteorRocksSpriteTemplate, ANIM_ATTACKER, 3, -80, -64, 24, 32, 25
|
||||
delay 2
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 131, -80, -64, 24, 32, 25
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 3, -80, -64, 24, 32, 25
|
||||
delay 2
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 131, -80, -64, 24, 32, 25
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 3, -80, -64, 24, 32, 25
|
||||
return
|
||||
DracoMeteor4:
|
||||
createsprite gDracoMeteorRocksSpriteTemplate, ANIM_ATTACKER, 131, -80, -64, -8, 32, 25
|
||||
createsprite gDracoMeteorRocksSpriteTemplate, ANIM_ATTACKER, 3, -80, -64, -8, 32, 25
|
||||
delay 2
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 131, -80, -64, -8, 32, 25
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 3, -80, -64, -8, 32, 25
|
||||
delay 2
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 131, -80, -64, -8, 32, 25
|
||||
createsprite gDracoMeteorTailSpriteTemplate, ANIM_ATTACKER, 3, -80, -64, -8, 32, 25
|
||||
return
|
||||
|
||||
gBattleAnimMove_Discharge::
|
||||
@ -2576,14 +2575,14 @@ gBattleAnimMove_LavaPlume::
|
||||
createvisualtask AnimTask_ShakeMon2, 2, ANIM_DEF_PARTNER, 1, 0, 32, 1
|
||||
createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATK_PARTNER, 1, 0, 32, 1
|
||||
waitforvisualfinish
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 130, 0
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 130, 32
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 130, 64
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 130, 96
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 130, 128
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 130, 160
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 130, 192
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 130, 224
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 2, 32
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 2, 64
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 2, 96
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 2, 128
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 2, 160
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 2, 192
|
||||
createsprite gLavaPlumeSpriteTemplate, ANIM_ATTACKER, 2, 224
|
||||
playsewithpan SE_M_SACRED_FIRE, SOUND_PAN_ATTACKER
|
||||
waitforvisualfinish
|
||||
end
|
||||
@ -2729,7 +2728,7 @@ RockWrecker_1:
|
||||
createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 6
|
||||
delay 3
|
||||
playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER
|
||||
createsprite gRockBlastRockSpriteTemplate, ANIM_ATTACKER, 130, 16, 0, 0, 0, 25, 257
|
||||
createsprite gRockBlastRockSpriteTemplate, ANIM_ATTACKER, 130, 16, 0, 0, 0, 25, (1 << 8) | 1
|
||||
waitforvisualfinish
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 131, 0, 0, 1, 1
|
||||
playsewithpan SE_M_ROCK_THROW SOUND_PAN_TARGET
|
||||
@ -2747,15 +2746,15 @@ RockWrecker_2:
|
||||
createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 6
|
||||
delay 3
|
||||
playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER
|
||||
createsprite gRockBlastRockSpriteTemplate, ANIM_ATTACKER, 130, 16, 0, 0, 0, 25, 257
|
||||
createsprite gRockBlastRockSpriteTemplate, ANIM_ATTACKER, 2, 16, 0, 0, 0, 25, 257
|
||||
waitforvisualfinish
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 131, 0, 0, 1, 1
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1
|
||||
playsewithpan SE_M_ROCK_THROW SOUND_PAN_TARGET
|
||||
createsprite gRockFragmentSpriteTemplate ANIM_TARGET, 130, 0, 0, 20, 24, 14, 2
|
||||
createsprite gRockFragmentSpriteTemplate ANIM_TARGET, 2, 0, 0, 20, 24, 14, 2
|
||||
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 5, 1
|
||||
createsprite gRockFragmentSpriteTemplate ANIM_ATTACKER, 130, 5, 0, -20, 24, 14, 1
|
||||
createsprite gRockFragmentSpriteTemplate ANIM_ATTACKER, 130, 0, 5, 20, -18, 14, 2
|
||||
createsprite gRockFragmentSpriteTemplate ANIM_ATTACKER, 130, -5, 0, -20, -18, 14, 2
|
||||
createsprite gRockFragmentSpriteTemplate ANIM_ATTACKER, 2, 5, 0, -20, 24, 14, 1
|
||||
createsprite gRockFragmentSpriteTemplate ANIM_ATTACKER, 2, 0, 5, 20, -18, 14, 2
|
||||
createsprite gRockFragmentSpriteTemplate ANIM_ATTACKER, 2, -5, 0, -20, -18, 14, 2
|
||||
waitforvisualfinish
|
||||
call UnsetPsychicBg
|
||||
end
|
||||
@ -2788,7 +2787,7 @@ gBattleAnimMove_GunkShot::
|
||||
createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 0, 2, 40, 1
|
||||
delay 6
|
||||
panse SE_M_HYDRO_PUMP, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 2, 0
|
||||
createvisualtask AnimTask_StartSinAnimTimer, 5, 1, 100
|
||||
createvisualtask AnimTask_StartSinAnimTimer, 5, 100
|
||||
call GunkShotParticles
|
||||
call GunkShotParticles
|
||||
call GunkShotParticles
|
||||
@ -2860,7 +2859,7 @@ gBattleAnimMove_MagnetBomb::
|
||||
loadspritegfx ANIM_TAG_SPARK_2
|
||||
delay 0
|
||||
playsewithpan 119, 192
|
||||
createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 32, 24, 190, 12, 0, 1, 0
|
||||
createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 32, 24, 190, 12, 0, 1, 0
|
||||
delay 0
|
||||
createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 80, 24, 22, 12, 0, 1, 0
|
||||
createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 156, 24, 121, 13, 0, 1, 1
|
||||
@ -2901,22 +2900,22 @@ gBattleAnimMove_MagnetBomb::
|
||||
loadspritegfx ANIM_TAG_GRAY_SMOKE
|
||||
loadspritegfx ANIM_TAG_BLACK_BALL
|
||||
playsewithpan 177, 63
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 130, 8, 8, 1, 0
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 2, 8, 8, 1, 0
|
||||
delay 2
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 130, -8, -8, 1, 0
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 2, -8, -8, 1, 0
|
||||
delay 2
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 130, 8, -8, 1, 0
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 2, 8, -8, 1, 0
|
||||
delay 2
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 130, -8, 8, 1, 0
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 2, -8, 8, 1, 0
|
||||
waitforvisualfinish
|
||||
playsewithpan 177, 63
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 130, 8, 8, 1, 0
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 2, 8, 8, 1, 0
|
||||
delay 2
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 130, -8, -8, 1, 0
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 2, -8, -8, 1, 0
|
||||
delay 2
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 130, 8, -8, 1, 0
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 2, 8, -8, 1, 0
|
||||
delay 2
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 130, -8, 8, 1, 0
|
||||
createsprite gOctazookaSmokeSpriteTemplate, ANIM_TARGET, 2, -8, 8, 1, 0
|
||||
waitforvisualfinish
|
||||
end
|
||||
|
||||
@ -2924,55 +2923,54 @@ gBattleAnimMove_StoneEdge::
|
||||
loadspritegfx ANIM_TAG_STONE_EDGE
|
||||
loadspritegfx ANIM_TAG_IMPACT
|
||||
playsewithpan SE_M_ROCK_THROW SOUND_PAN_TARGET
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 28, 528, 30, 13, 50, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 28, 528, 30, 13, 50, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 32, 480, 20, 16, -46, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 32, 480, 20, 16, -46, 1
|
||||
delay 2
|
||||
loopsewithpan 131, SOUND_PAN_TARGET 24, 3
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 33, 576, 20, 8, 42, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 33, 576, 20, 8, 42, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 31, 400, 25, 11, -42, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 31, 400, 25, 11, -42, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 28, 512, 25, 16, 46, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 28, 512, 25, 16, 46, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 33, 464, 30, 15, 49, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 33, 464, 30, 15, 49, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 28, 528, 30, 13, 50, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 28, 528, 30, 13, 50, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 32, 480, 20, 16, -46, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 32, 480, 20, 16, -46, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 33, 576, 20, 8, 42, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 33, 576, 20, 8, 42, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 31, 400, 25, 11, -42, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 31, 400, 25, 11, -42, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 28, 512, 25, 16, 46, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 28, 512, 25, 16, 46, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 33, 464, 30, 15, 49, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 33, 464, 30, 15, 49, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 28, 528, 30, 13, 50, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 28, 528, 30, 13, 50, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 32, 480, 20, 16, -46, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 32, 480, 20, 16, -46, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 33, 576, 20, 8, 42, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 33, 576, 20, 8, 42, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 31, 400, 25, 11, -42, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 31, 400, 25, 11, -42, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 28, 512, 25, 16, 46, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 28, 512, 25, 16, 46, 1
|
||||
delay 2
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 130, 0, 33, 464, 30, 15, 49, 1
|
||||
createsprite gStoneEdgeSpriteTemplate, ANIM_TARGET, 2, 0, 33, 464, 30, 15, 49, 1
|
||||
delay 2
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 131, -32, -16, 1, 3
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -32, -16, 1, 3
|
||||
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
|
||||
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 3, 0, 12, 1
|
||||
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_DEF_PARTNER, 3, 0, 12, 1
|
||||
delay 4
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 131, 1, 3
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 3
|
||||
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
|
||||
delay 4
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 131, 1, 3
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 3
|
||||
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
|
||||
delay 4
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 131, 32, 20, 1, 3
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 32, 20, 1, 3
|
||||
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_DEF_PARTNER
|
||||
@ -3016,9 +3014,9 @@ gBattleAnimMove_GrassKnot::
|
||||
loadspritegfx ANIM_TAG_RAZOR_LEAF
|
||||
loadspritegfx ANIM_TAG_IMPACT
|
||||
createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 20, 0, 0, 4
|
||||
createsprite gGrassKnotSpriteTemplate, ANIM_TARGET, 130, -18, 19, 40, 8, 160, 0
|
||||
createsprite gGrassKnotSpriteTemplate, ANIM_TARGET, 2, -18, 19, 40, 8, 160, 0
|
||||
delay 4
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 130, -8, 8, 1, 2
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -8, 8, 1, 2
|
||||
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 6, 384, ANIM_TARGET, 2
|
||||
playsewithpan SE_M_VITAL_THROW2 SOUND_PAN_TARGET
|
||||
waitforvisualfinish
|
||||
@ -3287,6 +3285,7 @@ gBattleAnimMove_AquaJet::
|
||||
loadspritegfx ANIM_TAG_SPARKLE_6
|
||||
loadspritegfx ANIM_TAG_ROUND_SHADOW
|
||||
loadspritegfx ANIM_TAG_SPLASH
|
||||
loadspritegfx ANIM_TAG_SWEAT_BEAD
|
||||
playsewithpan SE_M_HEADBUTT, SOUND_PAN_ATTACKER
|
||||
createsprite gDiveBallSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 13, 336
|
||||
waitforvisualfinish
|
||||
@ -3302,7 +3301,7 @@ gBattleAnimMove_AquaJet::
|
||||
monbg ANIM_DEF_PARTNER
|
||||
setalpha 12, 8
|
||||
playsewithpan SE_M_EXPLOSION, SOUND_PAN_TARGET
|
||||
createsprite gDiveWaterSplashSpriteTemplate, ANIM_TARGET, 131, 1
|
||||
createsprite gDiveWaterSplashSpriteTemplate, ANIM_TARGET, 3, 1
|
||||
call DiveAttackWaterDroplets
|
||||
call DiveAttackWaterDroplets
|
||||
call DiveAttackWaterDroplets
|
||||
@ -3323,39 +3322,39 @@ gBattleAnimMove_AttackOrder::
|
||||
monbg ANIM_DEF_PARTNER
|
||||
splitbgprio ANIM_TARGET
|
||||
playsewithpan SE_M_SWEET_SCENT, SOUND_PAN_TARGET
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 120, 70, 5, 70, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 120, 70, 5, 70, 30
|
||||
delay 1
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 120, 55, 6, 60, 25
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 120, 55, 6, 60, 25
|
||||
delay 1
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 120, 60, 7, 60, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 120, 55, 10, 60, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 120, 60, 7, 60, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 120, 55, 10, 60, 30
|
||||
delay 3
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 100, 50, 4, 50, 26
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 100, 50, 4, 50, 26
|
||||
delay 1
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 105, 25, 8, 60, 20
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 105, 25, 8, 60, 20
|
||||
delay 1
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 120, 40, 10, 48, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 120, 40, 10, 48, 30
|
||||
delay 3
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 120, 30, 6, 45, 25
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 120, 35, 10, 60, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 120, 30, 6, 45, 25
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 120, 35, 10, 60, 30
|
||||
delay 3
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 105, 20, 8, 40, 0
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 105, 20, 8, 40, 0
|
||||
delay 3
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 20, 255, 15, 32, 0
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 5, 110, 10, 8, 32, 20
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 20, 255, 15, 32, 0
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 110, 10, 8, 32, 20
|
||||
waitforvisualfinish
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 131, -32, -16, 1, 3
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -32, -16, 1, 3
|
||||
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
|
||||
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 3, 0, 12, 1
|
||||
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 3, 0, 12, 1
|
||||
delay 4
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 131, 1, 3
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 3
|
||||
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
|
||||
delay 4
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 131, 1, 3
|
||||
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 3
|
||||
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
|
||||
delay 4
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 131, 32, 20, 1, 3
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 32, 20, 1, 3
|
||||
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_DEF_PARTNER
|
||||
@ -3369,30 +3368,30 @@ gBattleAnimMove_DefendOrder::
|
||||
monbg ANIM_DEF_PARTNER
|
||||
splitbgprio ANIM_TARGET
|
||||
playsewithpan SE_M_SWEET_SCENT, SOUND_PAN_TARGET
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 120, 70, 5, 70, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 120, 70, 5, 70, 30
|
||||
delay 1
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 115, 55, 6, 60, 25
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 115, 55, 6, 60, 25
|
||||
delay 1
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 115, 60, 7, 60, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 115, 55, 10, 60, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 115, 60, 7, 60, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 115, 55, 10, 60, 30
|
||||
delay 3
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 100, 50, 4, 50, 26
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 100, 50, 4, 50, 26
|
||||
delay 1
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 105, 25, 8, 60, 20
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 105, 25, 8, 60, 20
|
||||
delay 1
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 115, 40, 10, 48, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 115, 40, 10, 48, 30
|
||||
delay 3
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 120, 30, 6, 45, 25
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 115, 35, 10, 60, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 120, 30, 6, 45, 25
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 115, 35, 10, 60, 30
|
||||
delay 3
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 105, 20, 8, 40, 0
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 105, 20, 8, 40, 0
|
||||
delay 3
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 20, 255, 15, 32, 0
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 110, 10, 8, 32, 20
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 20, 255, 15, 32, 0
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_TARGET, 2, 110, 10, 8, 32, 20
|
||||
waitforvisualfinish
|
||||
loadspritegfx ANIM_TAG_BLUE_STAR
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_ATK_PARTNER
|
||||
clearmonbg ANIM_DEF_PARTNER
|
||||
blendoff
|
||||
delay 1
|
||||
call BideSetUp
|
||||
@ -3406,30 +3405,30 @@ gBattleAnimMove_HealOrder::
|
||||
monbg ANIM_DEF_PARTNER
|
||||
splitbgprio ANIM_TARGET
|
||||
playsewithpan SE_M_SWEET_SCENT, SOUND_PAN_TARGET
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 120, 70, 5, 70, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 2, 120, 70, 5, 70, 30
|
||||
delay 1
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 115, 55, 6, 60, 25
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 2, 115, 55, 6, 60, 25
|
||||
delay 1
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 115, 60, 7, 60, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 115, 55, 10, 60, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 2, 115, 60, 7, 60, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 2, 115, 55, 10, 60, 30
|
||||
delay 3
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 100, 50, 4, 50, 26
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 2, 100, 50, 4, 50, 26
|
||||
delay 1
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 105, 25, 8, 60, 20
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 2, 105, 25, 8, 60, 20
|
||||
delay 1
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 115, 40, 10, 48, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 2, 115, 40, 10, 48, 30
|
||||
delay 3
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 120, 30, 6, 45, 25
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 115, 35, 10, 60, 30
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 2, 120, 30, 6, 45, 25
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 2, 115, 35, 10, 60, 30
|
||||
delay 3
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 105, 20, 8, 40, 0
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 2, 105, 20, 8, 40, 0
|
||||
delay 3
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 20, 255, 15, 32, 0
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 130, 110, 10, 8, 32, 20
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 2, 20, 255, 15, 32, 0
|
||||
createsprite gAttackOrderParticleSpriteTemplate, ANIM_ATTACKER, 2, 110, 10, 8, 32, 20
|
||||
waitforvisualfinish
|
||||
loadspritegfx ANIM_TAG_BLUE_STAR
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_ATK_PARTNER
|
||||
clearmonbg ANIM_DEF_PARTNER
|
||||
blendoff
|
||||
delay 1
|
||||
call HealingEffect
|
||||
@ -3469,6 +3468,10 @@ gBattleAnimMove_DoubleHit::
|
||||
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
|
||||
delay 8
|
||||
waitforvisualfinish
|
||||
@ why does the anim hit twice?
|
||||
@ that just means the anim plays 4 times
|
||||
@ which doesn't make sense
|
||||
@ I don't know, but I'm not gonna argue with it
|
||||
createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 4
|
||||
delay 6
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1, 2
|
||||
@ -3560,7 +3563,7 @@ gBattleAnimMove_LunarDance::
|
||||
loadspritegfx ANIM_TAG_GREEN_SPARKLE
|
||||
loadspritegfx ANIM_TAG_HOLLOW_ORB
|
||||
setalpha 0, 16
|
||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 16, 0
|
||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 16, RGB_BLACK
|
||||
waitforvisualfinish
|
||||
createsprite gMoonSpriteTemplate, ANIM_ATTACKER, 2, 120, 56
|
||||
createvisualtask AnimTask_AlphaFadeIn, 3, 0, 16, 16, 0, 1
|
||||
@ -3576,8 +3579,8 @@ gBattleAnimMove_LunarDance::
|
||||
delay 30
|
||||
createsprite gMoonlightSparkleSpriteTemplate, ANIM_ATTACKER, 40, 10, 0
|
||||
delay 20
|
||||
createvisualtask AnimTask_MoonlightEndFade, 2, 0
|
||||
createvisualtask AnimTask_DragonDanceWaver, 5, 0
|
||||
createvisualtask AnimTask_MoonlightEndFade, 2
|
||||
createvisualtask AnimTask_DragonDanceWaver, 5
|
||||
playsewithpan 203, SOUND_PAN_ATTACKER
|
||||
delay 8
|
||||
createvisualtask AnimTask_BlendPalInAndOutByTag, 5, ANIM_TAG_HOLLOW_ORB, RGB(0, 0, 19), 14, 0, 3
|
||||
@ -3592,7 +3595,6 @@ gBattleAnimMove_LunarDance::
|
||||
delay 30
|
||||
playsewithpan 203, SOUND_PAN_ATTACKER
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_ATTACKER
|
||||
delay 1
|
||||
end
|
||||
|
||||
@ -3769,7 +3771,7 @@ gBattleAnimMove_OminousWind::
|
||||
delay 0
|
||||
createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, 1, 0, 0, 0, 0
|
||||
delay 0
|
||||
createvisualtask AnimTask_GetAttackerSide, 2, 0
|
||||
createvisualtask AnimTask_GetAttackerSide, 2
|
||||
jumpargeq 7, 1, OminousWindFadeToBg
|
||||
fadetobg BG_GHOST
|
||||
waitbgfadeout
|
||||
@ -12324,8 +12326,6 @@ gBattleAnimMove_NaturesMadness::
|
||||
loadspritegfx ANIM_TAG_SPARKLE_2 @stars PinkStarsTemplate
|
||||
loadspritegfx ANIM_TAG_PINK_PETAL @pink PinkRingTemplate, PinkStarsTemplate
|
||||
loadspritegfx ANIM_TAG_ICE_CHUNK @blue green CrystalsTemplate
|
||||
loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @charge
|
||||
loadspritegfx ANIM_TAG_TEAL_ALERT @charge particles
|
||||
monbg ANIM_ATTACKER
|
||||
setalpha 14, 8
|
||||
delay 0x1
|
||||
@ -12372,6 +12372,8 @@ gBattleAnimMove_NaturesMadness::
|
||||
createsprite gNaturesMadnessGrayRingTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x1, 0x0
|
||||
playsewithpan SE_M_HEAL_BELL, SOUND_PAN_ATTACKER
|
||||
waitforvisualfinish
|
||||
unloadspritegfx ANIM_TAG_ECLIPSING_ORB
|
||||
loadspritegfx ANIM_TAG_SPARKLE_2
|
||||
playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER
|
||||
createsprite gNaturesMadnessPinkRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x0, 0x1F, 0x8
|
||||
createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x1
|
||||
@ -16166,7 +16168,6 @@ SandsearStormFireSpin:
|
||||
gBattleAnimMove_LunarBlessing::
|
||||
loadspritegfx ANIM_TAG_BLUE_STAR
|
||||
loadspritegfx ANIM_TAG_MOON
|
||||
loadspritegfx ANIM_TAG_SPARKLE_2
|
||||
loadspritegfx ANIM_TAG_GUARD_RING
|
||||
loadspritegfx ANIM_TAG_SMALL_EMBER @Yellow colour for ring
|
||||
monbg ANIM_ATK_PARTNER
|
||||
@ -21118,7 +21119,7 @@ gBattleAnimMove_Rollout::
|
||||
monbg ANIM_DEF_PARTNER
|
||||
splitbgprio ANIM_TARGET
|
||||
setalpha 12, 8
|
||||
createvisualtask AnimTask_Rollout, 2
|
||||
createvisualtask AnimTask_Rollout, 2, 0
|
||||
waitforvisualfinish
|
||||
createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 2, FALSE, 1, 30, 1, 0
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, ANIM_TARGET, 2
|
||||
@ -31485,13 +31486,15 @@ gBattleAnimMove_BlackHoleEclipse::
|
||||
delay 0x8
|
||||
createsprite gBlackHoleEclipseHoleShrinkSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, ANIM_TARGET, 0x0
|
||||
waitforvisualfinish
|
||||
unloadspritegfx ANIM_TAG_THIN_RING
|
||||
unloadspritegfx ANIM_TAG_ICE_CHUNK
|
||||
loadspritegfx ANIM_TAG_SPARKLE_4 @detect
|
||||
createsprite gTargetTwinkleSpriteTemplate, ANIM_ATTACKER, 13, 0x0, 0x0, ANIM_TARGET @detect star
|
||||
delay 0x2
|
||||
unloadspritegfx ANIM_TAG_VERTICAL_HEX @red
|
||||
unloadspritegfx ANIM_TAG_SHADOW_BALL
|
||||
unloadspritegfx ANIM_TAG_THIN_RING
|
||||
unloadspritegfx ANIM_TAG_ICE_CHUNK
|
||||
unloadspritegfx ANIM_TAG_BLACK_BALL_2
|
||||
unloadspritegfx ANIM_TAG_FOCUS_ENERGY
|
||||
loadspritegfx ANIM_TAG_EXPLOSION_2
|
||||
call BlackHoleEclipseExplosion
|
||||
createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x1, 0x0, 0x10, 0x7fff @ bg to white pal
|
||||
|
||||
@ -308,13 +308,17 @@ BattleScript_CheckPrimalWeather:
|
||||
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_STRONG_WINDS, BattleScript_MysteriousAirCurrentBlowsOn
|
||||
return
|
||||
|
||||
BattleScript_MoveSwitchPursuit:
|
||||
BattleScript_MoveSwitchPursuitEnd:
|
||||
call BattleScript_MoveSwitchPursuitRet
|
||||
end
|
||||
|
||||
BattleScript_MoveSwitchPursuitRet:
|
||||
jumpifbattletype BATTLE_TYPE_ARENA, BattleScript_MoveSwitchEnd
|
||||
jumpifcantswitch SWITCH_IGNORE_ESCAPE_PREVENTION | BS_ATTACKER, BattleScript_MoveSwitchEnd
|
||||
printstring STRINGID_PKMNWENTBACK
|
||||
waitmessage B_WAIT_TIME_SHORT
|
||||
jumpifnopursuitswitchdmg BattleScript_MoveSwitchOpenPartyScreen
|
||||
end
|
||||
return
|
||||
|
||||
BattleScript_MoveSwitch:
|
||||
jumpifbattletype BATTLE_TYPE_ARENA, BattleScript_MoveSwitchEnd
|
||||
@ -414,12 +418,12 @@ BattleScript_MoveEffectSaltCure::
|
||||
return
|
||||
|
||||
BattleScript_SaltCureExtraDamage::
|
||||
playanimation BS_TARGET, B_ANIM_SALT_CURE_DAMAGE, NULL
|
||||
playanimation BS_ATTACKER, B_ANIM_SALT_CURE_DAMAGE, NULL
|
||||
waitanimation
|
||||
call BattleScript_HurtTarget_NoString
|
||||
printstring STRINGID_TARGETISHURTBYSALTCURE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
tryfaintmon BS_TARGET
|
||||
tryfaintmon BS_ATTACKER
|
||||
end2
|
||||
|
||||
BattleScript_HurtTarget_NoString:
|
||||
@ -1344,7 +1348,7 @@ BattleScript_EffectPartingShotTrySpAtk:
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_EffectPartingShotSwitch:
|
||||
moveendall
|
||||
goto BattleScript_MoveSwitchPursuit
|
||||
goto BattleScript_MoveSwitchPursuitEnd
|
||||
|
||||
BattleScript_EffectPowder::
|
||||
attackcanceler
|
||||
@ -1824,7 +1828,6 @@ BattleScript_HitSwitchTargetDynamaxed::
|
||||
printstring STRINGID_MOVEBLOCKEDBYDYNAMAX
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_HitSwitchTargetForceRandomSwitchFailed:
|
||||
hitswitchtargetfailed
|
||||
setbyte sSWITCH_CASE, B_SWITCH_NORMAL
|
||||
return
|
||||
|
||||
@ -2222,13 +2225,13 @@ BattleScript_AttackAccUpDoMoveAnim::
|
||||
attackanimation
|
||||
waitanimation
|
||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||
playstatchangeanimation BS_ATTACKER, BIT_SPATK | BIT_SPDEF, 0
|
||||
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_ACC, 0
|
||||
setstatchanger STAT_ATK, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AttackAccUpTrySpDef
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AttackAccUpTrySpDef
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AttackAccUpTryAcc
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AttackAccUpTryAcc
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_AttackAccUpTrySpDef::
|
||||
BattleScript_AttackAccUpTryAcc::
|
||||
setstatchanger STAT_ACC, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AttackAccUpEnd
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AttackAccUpEnd
|
||||
@ -2714,6 +2717,7 @@ BattleScript_EffectGravity::
|
||||
attackstring
|
||||
ppreduce
|
||||
setgravity BattleScript_ButItFailed
|
||||
savetarget
|
||||
attackanimation
|
||||
waitanimation
|
||||
BattleScript_EffectGravitySuccess::
|
||||
@ -2731,6 +2735,7 @@ BattleScript_GravityLoopDrop:
|
||||
BattleScript_GravityLoopEnd:
|
||||
moveendcase MOVEEND_TARGET_VISIBLE
|
||||
jumpifnexttargetvalid BattleScript_GravityLoop
|
||||
restoretarget
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectRoost::
|
||||
@ -2744,11 +2749,13 @@ BattleScript_EffectRoost::
|
||||
BattleScript_EffectCaptivate::
|
||||
setstatchanger STAT_SPATK, 2, TRUE
|
||||
attackcanceler
|
||||
jumpifsubstituteblocks BattleScript_FailedFromAtkString
|
||||
jumpifoppositegenders BattleScript_CaptivateCheckAcc
|
||||
goto BattleScript_FailedFromAtkString
|
||||
attackstring
|
||||
ppreduce
|
||||
jumpifsubstituteblocks BattleScript_ButItFailed
|
||||
jumpifcaptivateaffected BattleScript_CaptivateCheckAcc
|
||||
goto BattleScript_ButItFailed
|
||||
BattleScript_CaptivateCheckAcc:
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
accuracycheck BattleScript_MoveMissedPause, ACC_CURR_MOVE
|
||||
goto BattleScript_StatDownFromAttackString
|
||||
|
||||
BattleScript_EffectHealBlock::
|
||||
@ -2765,21 +2772,12 @@ BattleScript_EffectHealBlock::
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectHitEscape::
|
||||
call BattleScript_EffectHit_Ret
|
||||
jumpifmovehadnoeffect BattleScript_MoveEnd
|
||||
tryfaintmon BS_TARGET
|
||||
moveendto MOVEEND_ATTACKER_VISIBLE
|
||||
moveendfrom MOVEEND_TARGET_VISIBLE
|
||||
jumpifbattleend BattleScript_HitEscapeEnd
|
||||
jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_HitEscapeEnd
|
||||
jumpifemergencyexited BS_TARGET, BattleScript_HitEscapeEnd
|
||||
jumpiffainted BS_TARGET, FALSE, BattleScript_HitEscapeSwitch
|
||||
setbyte sGIVEEXP_STATE, 0
|
||||
getexp BS_TARGET
|
||||
BattleScript_HitEscapeSwitch:
|
||||
goto BattleScript_MoveSwitchPursuit
|
||||
BattleScript_HitEscapeEnd:
|
||||
end
|
||||
call BattleScript_MoveSwitchPursuitRet
|
||||
return
|
||||
|
||||
BattleScript_EffectPlaceholder::
|
||||
attackcanceler
|
||||
@ -3199,7 +3197,7 @@ BattleScript_StatDownEnd::
|
||||
BattleScript_MirrorArmorReflect::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
call BattleScript_AbilityPopUp
|
||||
jumpifsubstituteblocks BattleScript_AbilityNoSpecificStatLoss
|
||||
jumpifstatus2 BS_ATTACKER, STATUS2_SUBSTITUTE, BattleScript_MirrorArmorDoesntAffect
|
||||
BattleScript_MirrorArmorReflectStatLoss:
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_MIRROR_ARMOR | STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_MirrorArmorReflectEnd
|
||||
jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_MirrorArmorReflectAnim
|
||||
@ -3213,6 +3211,13 @@ BattleScript_MirrorArmorReflectPrintString:
|
||||
BattleScript_MirrorArmorReflectEnd:
|
||||
return
|
||||
|
||||
BattleScript_MirrorArmorDoesntAffect:
|
||||
swapattackerwithtarget
|
||||
printstring STRINGID_ITDOESNTAFFECT
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
swapattackerwithtarget
|
||||
return
|
||||
|
||||
BattleScript_MirrorArmorReflectWontFall:
|
||||
copybyte gBattlerTarget, gBattlerAttacker @ STRINGID_STATSWONTDECREASE uses target
|
||||
goto BattleScript_MirrorArmorReflectPrintString
|
||||
@ -3419,16 +3424,6 @@ BattleScript_KOFail::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectSuperFang::
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
attackstring
|
||||
ppreduce
|
||||
typecalc
|
||||
clearmoveresultflags MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
|
||||
damagetohalftargethp
|
||||
goto BattleScript_HitFromAtkAnimation
|
||||
|
||||
BattleScript_RecoilIfMiss::
|
||||
printstring STRINGID_PKMNCRASHED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
@ -3874,28 +3869,6 @@ BattleScript_EffectDisable::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectLevelDamage::
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
attackstring
|
||||
ppreduce
|
||||
typecalc
|
||||
clearmoveresultflags MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
|
||||
dmgtolevel
|
||||
adjustdamage
|
||||
goto BattleScript_HitFromAtkAnimation
|
||||
|
||||
BattleScript_EffectPsywave::
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
attackstring
|
||||
ppreduce
|
||||
typecalc
|
||||
clearmoveresultflags MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
|
||||
psywavedamageeffect
|
||||
adjustdamage
|
||||
goto BattleScript_HitFromAtkAnimation
|
||||
|
||||
BattleScript_EffectCounter::
|
||||
attackcanceler
|
||||
counterdamagecalculator BattleScript_FailedFromAtkString
|
||||
@ -4212,6 +4185,7 @@ BattleScript_EffectPerishSong::
|
||||
attackstring
|
||||
ppreduce
|
||||
trysetperishsong BattleScript_ButItFailed
|
||||
savetarget
|
||||
attackanimation
|
||||
waitanimation
|
||||
printstring STRINGID_FAINTINTHREE
|
||||
@ -4223,6 +4197,7 @@ BattleScript_PerishSongLoop::
|
||||
BattleScript_PerishSongLoopIncrement::
|
||||
addbyte gBattlerTarget, 1
|
||||
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_PerishSongLoop
|
||||
restoretarget
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_PerishSongBlocked::
|
||||
@ -4381,17 +4356,6 @@ BattleScript_EffectBatonPass::
|
||||
switchineffects BS_ATTACKER
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectFixedDamageArg::
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
attackstring
|
||||
ppreduce
|
||||
typecalc
|
||||
clearmoveresultflags MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
|
||||
setargtobattledamage
|
||||
adjustdamage
|
||||
goto BattleScript_HitFromAtkAnimation
|
||||
|
||||
BattleScript_EffectMorningSun::
|
||||
BattleScript_EffectSynthesis::
|
||||
BattleScript_EffectMoonlight::
|
||||
@ -4731,7 +4695,7 @@ BattleScript_MoveEffectStockpileWoreOff::
|
||||
return
|
||||
|
||||
BattleScript_StockpileStatChangeDown:
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER, BattleScript_StockpileStatChangeDown_Ret
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN, BattleScript_StockpileStatChangeDown_Ret
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
printfromtable gStatDownStringIds
|
||||
@ -4833,6 +4797,7 @@ BattleScript_EffectWillOWisp::
|
||||
jumpifability BS_TARGET, ABILITY_WATER_BUBBLE, BattleScript_WaterVeilPrevents
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_AbilityProtectsDoesntAffect
|
||||
jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_AbilityProtectsDoesntAffect
|
||||
jumpifability BS_TARGET, ABILITY_THERMAL_EXCHANGE, BattleScript_AbilityProtectsDoesntAffect
|
||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||
jumpifleafguardprotected BS_TARGET, BattleScript_AbilityProtectsDoesntAffect
|
||||
jumpifshieldsdown BS_TARGET, BattleScript_AbilityProtectsDoesntAffect
|
||||
@ -5020,7 +4985,7 @@ BattleScript_EffectWish::
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
trywish 0, BattleScript_ButItFailed
|
||||
trywish BattleScript_ButItFailed
|
||||
attackanimation
|
||||
waitanimation
|
||||
goto BattleScript_MoveEnd
|
||||
@ -5813,13 +5778,13 @@ BattleScript_FogEnded_Ret::
|
||||
return
|
||||
|
||||
BattleScript_IceBodyHeal::
|
||||
call BattleScript_AbilityPopUpScripting
|
||||
playanimation BS_SCRIPTING, B_ANIM_SIMPLE_HEAL
|
||||
healthbarupdate BS_SCRIPTING
|
||||
datahpupdate BS_SCRIPTING
|
||||
call BattleScript_AbilityPopUp
|
||||
playanimation BS_ATTACKER, B_ANIM_SIMPLE_HEAL
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
printstring STRINGID_ICEBODYHPGAIN
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end2
|
||||
end3
|
||||
|
||||
BattleScript_OverworldStatusStarts::
|
||||
printfromtable gStartingStatusStringIds
|
||||
@ -5880,12 +5845,14 @@ BattleScript_WonderRoomEnds::
|
||||
BattleScript_MagicRoomEnds::
|
||||
printstring STRINGID_MAGICROOMENDS
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
setbyte gBattlerTarget, 0
|
||||
BattleScript_MagicRoomHealingItemsLoop:
|
||||
copyarraywithindex gBattlerAttacker, gBattlerByTurnOrder, gBattlerTarget, 1
|
||||
tryhealingitem
|
||||
addbyte gBattlerTarget, 1
|
||||
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_MagicRoomHealingItemsLoop
|
||||
end2
|
||||
|
||||
BattleScript_GrassyTerrainEnds::
|
||||
call BattleScript_GrassyTerrainHeals_Ret
|
||||
goto BattleScript_TerrainEnds
|
||||
|
||||
BattleScript_TerrainEnds_Ret::
|
||||
printfromtable gTerrainStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
@ -6006,7 +5973,6 @@ BattleScript_RoarSuccessSwitch_Ret:
|
||||
swapattackerwithtarget @ continuation of RedCardActivates
|
||||
restoretarget
|
||||
restoreattacker
|
||||
restoresavedmove
|
||||
setbyte sSWITCH_CASE, B_SWITCH_NORMAL
|
||||
return
|
||||
|
||||
@ -6651,7 +6617,6 @@ BattleScript_SelectingNotAllowedCurrentMoveInPalace::
|
||||
goto BattleScript_SelectingUnusableMoveInPalace
|
||||
|
||||
BattleScript_WishComesTrue::
|
||||
trywish 1, BattleScript_WishButFullHp
|
||||
playanimation BS_TARGET, B_ANIM_WISH_HEAL
|
||||
printstring STRINGID_PKMNWISHCAMETRUE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
@ -6970,7 +6935,7 @@ BattleScript_CudChewActivates::
|
||||
pause B_WAIT_TIME_SHORTEST
|
||||
call BattleScript_AbilityPopUp
|
||||
setbyte sBERRY_OVERRIDE, 1 @ override the requirements for eating berries
|
||||
consumeberry BS_SCRIPTING, FALSE
|
||||
consumeberry BS_ATTACKER, FALSE
|
||||
setbyte sBERRY_OVERRIDE, 0
|
||||
end3
|
||||
|
||||
@ -7026,9 +6991,9 @@ BattleScript_BattlerFormChangeWithStringEnd3::
|
||||
|
||||
BattleScript_IllusionOff::
|
||||
spriteignore0hp TRUE
|
||||
playanimation BS_TARGET, B_ANIM_ILLUSION_OFF
|
||||
playanimation BS_SCRIPTING, B_ANIM_ILLUSION_OFF
|
||||
waitanimation
|
||||
updatenick BS_TARGET
|
||||
updatenick BS_SCRIPTING
|
||||
waitstate
|
||||
spriteignore0hp FALSE
|
||||
printstring STRINGID_ILLUSIONWOREOFF
|
||||
@ -7099,7 +7064,6 @@ BattleScript_MoveUsedIsAsleep::
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_MoveUsedWokeUp::
|
||||
bicword gHitMarker, HITMARKER_WAKE_UP_CLEAR
|
||||
printfromtable gWokeUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
updatestatusicon BS_ATTACKER
|
||||
@ -7122,6 +7086,7 @@ BattleScript_DoTurnDmg:
|
||||
datahpupdate BS_ATTACKER
|
||||
tryfaintmon BS_ATTACKER
|
||||
checkteamslost BattleScript_DoTurnDmgEnd
|
||||
tryhealingitem
|
||||
BattleScript_DoTurnDmgEnd:
|
||||
end2
|
||||
|
||||
@ -7369,6 +7334,7 @@ BattleScript_YawnEnd:
|
||||
BattleScript_EmbargoEndTurn::
|
||||
printstring STRINGID_EMBARGOENDS
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
tryhealingitem
|
||||
end2
|
||||
|
||||
BattleScript_TelekinesisEndTurn::
|
||||
@ -7587,6 +7553,37 @@ BattleScript_EmergencyExitWild::
|
||||
finishaction
|
||||
return
|
||||
|
||||
BattleScript_EmergencyExitEnd2::
|
||||
pause 5
|
||||
call BattleScript_AbilityPopUp
|
||||
pause B_WAIT_TIME_LONG
|
||||
playanimation BS_ATTACKER, B_ANIM_SLIDE_OFFSCREEN
|
||||
waitanimation
|
||||
openpartyscreen BS_ATTACKER, BattleScript_EmergencyExitRetEnd2
|
||||
switchoutabilities BS_ATTACKER
|
||||
waitstate
|
||||
switchhandleorder BS_ATTACKER, 2
|
||||
returntoball BS_TARGET, FALSE
|
||||
getswitchedmondata BS_ATTACKER
|
||||
switchindataupdate BS_ATTACKER
|
||||
hpthresholds BS_ATTACKER
|
||||
printstring STRINGID_SWITCHINMON
|
||||
switchinanim BS_ATTACKER, FALSE, TRUE
|
||||
waitstate
|
||||
switchineffects BS_ATTACKER
|
||||
BattleScript_EmergencyExitRetEnd2:
|
||||
end2
|
||||
|
||||
BattleScript_EmergencyExitWildEnd2::
|
||||
pause 5
|
||||
call BattleScript_AbilityPopUp
|
||||
pause B_WAIT_TIME_LONG
|
||||
playanimation BS_ATTACKER, B_ANIM_SLIDE_OFFSCREEN
|
||||
waitanimation
|
||||
setoutcomeonteleport BS_ATTACKER
|
||||
finishaction
|
||||
end2
|
||||
|
||||
BattleScript_TraceActivates::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
call BattleScript_AbilityPopUpScripting
|
||||
@ -7629,6 +7626,7 @@ BattleScript_PickupActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_XFOUNDONEY
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
tryhealingitem
|
||||
BattleScript_PickupActivatesEnd:
|
||||
end3
|
||||
|
||||
@ -7638,6 +7636,7 @@ BattleScript_HarvestActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_HARVESTBERRY
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
tryhealingitem
|
||||
BattleScript_HarvestActivatesEnd:
|
||||
end3
|
||||
|
||||
@ -7727,13 +7726,7 @@ BattleScript_IntimidateLoop:
|
||||
jumpiftargetally BattleScript_IntimidateLoopIncrement
|
||||
jumpifabsent BS_TARGET, BattleScript_IntimidateLoopIncrement
|
||||
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_IntimidateLoopIncrement
|
||||
.if B_UPDATED_INTIMIDATE >= GEN_8 @These abilties specifically prevent just intimidate, without blocking stat decreases
|
||||
jumpifability BS_TARGET, ABILITY_INNER_FOCUS, BattleScript_IntimidatePrevented
|
||||
jumpifability BS_TARGET, ABILITY_SCRAPPY, BattleScript_IntimidatePrevented
|
||||
jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_IntimidatePrevented
|
||||
jumpifability BS_TARGET, ABILITY_OBLIVIOUS, BattleScript_IntimidatePrevented
|
||||
.endif
|
||||
jumpifability BS_TARGET, ABILITY_GUARD_DOG, BattleScript_IntimidateInReverse
|
||||
jumpifintimidateabilityprevented
|
||||
BattleScript_IntimidateEffect:
|
||||
copybyte sBATTLER, gBattlerAttacker
|
||||
setstatchanger STAT_ATK, 1, TRUE
|
||||
@ -7758,9 +7751,10 @@ BattleScript_IntimidateLoopIncrement:
|
||||
destroyabilitypopup
|
||||
restoretarget
|
||||
pause B_WAIT_TIME_MED
|
||||
tryintimidatejectpack
|
||||
end3
|
||||
|
||||
BattleScript_IntimidatePrevented:
|
||||
BattleScript_IntimidatePrevented::
|
||||
copybyte sBATTLER, gBattlerTarget
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_PKMNPREVENTSSTATLOSSWITH
|
||||
@ -7780,7 +7774,7 @@ BattleScript_IntimidateContrary_WontIncrease:
|
||||
printstring STRINGID_TARGETSTATWONTGOHIGHER
|
||||
goto BattleScript_IntimidateEffect_WaitString
|
||||
|
||||
BattleScript_IntimidateInReverse:
|
||||
BattleScript_IntimidateInReverse::
|
||||
copybyte sBATTLER, gBattlerTarget
|
||||
call BattleScript_AbilityPopUpTarget
|
||||
pause B_WAIT_TIME_SHORT
|
||||
@ -8272,25 +8266,13 @@ BattleScript_MoveUsedPsychicTerrainPrevents::
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_GrassyTerrainHeals::
|
||||
call BattleScript_GrassyTerrainHeals_Ret
|
||||
end2
|
||||
|
||||
BattleScript_GrassyTerrainHeals_Ret::
|
||||
setbyte gBattleCommunication, 0
|
||||
BattleScript_GrassyTerrainLoop:
|
||||
copyarraywithindex gBattlerAttacker, gBattlerByTurnOrder, gBattleCommunication, 1
|
||||
checkgrassyterrainheal BS_ATTACKER, BattleScript_GrassyTerrainLoopIncrement
|
||||
printstring STRINGID_GRASSYTERRAINHEALS
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_IGNORE_BIDE | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
BattleScript_GrassyTerrainLoopIncrement::
|
||||
addbyte gBattleCommunication, 1
|
||||
jumpifbytenotequal gBattleCommunication, gBattlersCount, BattleScript_GrassyTerrainLoop
|
||||
bicword gHitMarker, HITMARKER_IGNORE_BIDE | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
BattleScript_GrassyTerrainHealEnd:
|
||||
return
|
||||
end2
|
||||
|
||||
BattleScript_AbilityNoSpecificStatLoss::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
@ -9510,7 +9492,6 @@ BattleScript_RedCardActivationNoSwitch::
|
||||
removeitem BS_SCRIPTING
|
||||
restoretarget
|
||||
restoreattacker
|
||||
restoresavedmove
|
||||
return
|
||||
|
||||
BattleScript_RedCardActivates::
|
||||
@ -9533,6 +9514,7 @@ BattleScript_RedCardIngrainContinue:
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
removeitem BS_SCRIPTING
|
||||
restoretarget
|
||||
restoreattacker
|
||||
return
|
||||
BattleScript_RedCardSuctionCups:
|
||||
printstring STRINGID_PKMNANCHORSITSELFWITH
|
||||
@ -9547,7 +9529,7 @@ BattleScript_EjectButtonActivates::
|
||||
printstring STRINGID_EJECTBUTTONACTIVATE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
removeitem BS_SCRIPTING
|
||||
undodynamax BS_SCRIPTING
|
||||
undodynamax BS_SCRIPTING
|
||||
makeinvisible BS_SCRIPTING
|
||||
openpartyscreen BS_SCRIPTING, BattleScript_EjectButtonEnd
|
||||
copybyte sSAVED_BATTLER, sBATTLER
|
||||
@ -9768,7 +9750,7 @@ BattleScript_DamageNonTypesContinues::
|
||||
printfromtable gDamageNonTypesDmgStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
effectivenesssound
|
||||
hitanimation BS_SCRIPTING
|
||||
hitanimation BS_ATTACKER
|
||||
goto BattleScript_DoTurnDmg
|
||||
|
||||
BattleScript_EffectTryReducePP::
|
||||
@ -10029,9 +10011,12 @@ BattleScript_DynamaxEnds::
|
||||
|
||||
BattleScript_DynamaxEnds_Ret::
|
||||
flushtextbox
|
||||
spriteignore0hp TRUE
|
||||
updatedynamax
|
||||
playanimation BS_SCRIPTING, B_ANIM_FORM_CHANGE
|
||||
waitanimation
|
||||
spriteignore0hp FALSE
|
||||
pause B_WAIT_TIME_SHORT
|
||||
return
|
||||
|
||||
BattleScript_MoveBlockedByDynamax::
|
||||
@ -10120,3 +10105,15 @@ BattleScript_SleepClausePreventsEnd::
|
||||
printstring STRINGID_BLOCKEDBYSLEEPCLAUSE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end2
|
||||
|
||||
BattleScript_QuestionForfeitBattle::
|
||||
printselectionstring STRINGID_QUESTIONFORFEITBATTLE
|
||||
forfeityesnobox BS_ATTACKER
|
||||
endselectionscript
|
||||
|
||||
BattleScript_ForfeitBattleGaveMoney::
|
||||
getmoneyreward
|
||||
printstring STRINGID_FORFEITBATTLEGAVEMONEY
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end2
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
#include "constants/field_tasks.h"
|
||||
#include "constants/field_weather.h"
|
||||
#include "constants/flags.h"
|
||||
#include "constants/follower_npc.h"
|
||||
#include "constants/frontier_util.h"
|
||||
#include "constants/game_stat.h"
|
||||
#include "constants/item.h"
|
||||
@ -760,12 +761,12 @@ Common_EventScript_PlayGymBadgeFanfare::
|
||||
return
|
||||
|
||||
Common_EventScript_OutOfCenterPartyHeal::
|
||||
fadescreen FADE_TO_BLACK
|
||||
fadescreenswapbuffers FADE_TO_BLACK
|
||||
playfanfare MUS_HEAL
|
||||
waitfanfare
|
||||
special HealPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
fadescreen FADE_FROM_BLACK
|
||||
fadescreenswapbuffers FADE_FROM_BLACK
|
||||
return
|
||||
|
||||
EventScript_RegionMap::
|
||||
|
||||
@ -80,6 +80,7 @@ gFieldEffectScriptPointers::
|
||||
.4byte gFieldEffectScript_TracksBug @ FLDEFF_TRACKS_BUG
|
||||
.4byte gFieldEffectScript_TracksSpot @ FLDEFF_TRACKS_SPOT
|
||||
.4byte gFieldEffectScript_CaveDust @ FLDEFF_CAVE_DUST
|
||||
.4byte gFieldEffectScript_Defog @ FLDEFF_DEFOG
|
||||
|
||||
gFieldEffectScript_ExclamationMarkIcon1::
|
||||
field_eff_callnative FldEff_ExclamationMarkIcon
|
||||
@ -379,3 +380,7 @@ gFieldEffectScript_TracksSlither::
|
||||
gFieldEffectScript_CaveDust::
|
||||
field_eff_loadfadedpal_callnative gSpritePalette_CaveDust FldEff_CaveDust
|
||||
field_eff_end
|
||||
|
||||
gFieldEffectScript_Defog::
|
||||
field_eff_callnative FldEff_Defog
|
||||
field_eff_end
|
||||
|
||||
@ -476,6 +476,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_SetUpObjects::
|
||||
call BattleFrontier_EventScript_SetBrainObjectGfx
|
||||
setobjectxyperm LOCALID_OPPONENT, 13, 9
|
||||
removeobject LOCALID_OPPONENT
|
||||
delay 1
|
||||
addobject LOCALID_OPPONENT
|
||||
applymovement LOCALID_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_SetInvisibleFacingUp
|
||||
BattleFrontier_BattleDomeBattleRoom_EventScript_EndSetUpObjects::
|
||||
|
||||
@ -54,13 +54,13 @@ MtChimney_EventScript_Maxie::
|
||||
msgbox MtChimney_Text_MaxieYouHaventSeenLastOfMagma, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
delay 30
|
||||
fadescreen FADE_TO_BLACK
|
||||
fadescreenswapbuffers FADE_TO_BLACK
|
||||
removeobject LOCALID_MAXIE
|
||||
removeobject LOCALID_MAGMA_GRUNT_1
|
||||
removeobject LOCALID_TABITHA
|
||||
removeobject LOCALID_MAGMA_GRUNT_2
|
||||
setflag FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA
|
||||
fadescreen FADE_FROM_BLACK
|
||||
fadescreenswapbuffers FADE_FROM_BLACK
|
||||
setobjectxyperm LOCALID_ARCHIE, 10, 12
|
||||
addobject LOCALID_ARCHIE
|
||||
call_if_eq VAR_FACING, DIR_EAST, MtChimney_EventScript_ArchieApproachPlayerEast
|
||||
|
||||
@ -49,7 +49,7 @@ MtPyre_Summit_EventScript_TeamAquaExits::
|
||||
call_if_eq VAR_0x8008, 2, MtPyre_Summit_EventScript_ArchieFacePlayer2
|
||||
msgbox MtPyre_Summit_Text_ArchieWeGotTheOrbLetsGo, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
fadescreen FADE_TO_BLACK
|
||||
fadescreenswapbuffers FADE_TO_BLACK
|
||||
removeobject LOCALID_ARCHIE
|
||||
removeobject LOCALID_GRUNT_1
|
||||
removeobject LOCALID_GRUNT_2
|
||||
@ -58,7 +58,7 @@ MtPyre_Summit_EventScript_TeamAquaExits::
|
||||
setflag FLAG_HIDE_MT_PYRE_SUMMIT_ARCHIE
|
||||
setflag FLAG_HIDE_MT_PYRE_SUMMIT_TEAM_AQUA
|
||||
fadedefaultbgm
|
||||
fadescreen FADE_FROM_BLACK
|
||||
fadescreenswapbuffers FADE_FROM_BLACK
|
||||
delay 20
|
||||
setvar VAR_MT_PYRE_STATE, 1
|
||||
call_if_eq VAR_0x8008, 0, MtPyre_Summit_EventScript_OldLadyApproachPlayer0
|
||||
|
||||
@ -48,6 +48,7 @@ SlateportCity_BattleTentBattleRoom_EventScript_EnterRoom::
|
||||
factory_setopponentgfx
|
||||
setobjectxyperm LOCALID_OPPONENT, 5, 1
|
||||
removeobject LOCALID_OPPONENT
|
||||
delay 1
|
||||
addobject LOCALID_OPPONENT
|
||||
applymovement LOCALID_OPPONENT, SlateportCity_BattleTentBattleRoom_Movement_OpponentEnter
|
||||
waitmovement 0
|
||||
|
||||
@ -584,3 +584,34 @@ Debug_EventScript_FontTest::
|
||||
@Debug_EventScript_InflictStatus1_Close:
|
||||
@ releaseall
|
||||
@ end
|
||||
|
||||
Debug_EventScript_TellTheTime::
|
||||
callnative DebugMenu_CalculateTime
|
||||
msgbox Debug_EventScript_TellTheTime_Text_0, MSGBOX_DEFAULT
|
||||
waitmessage
|
||||
closemessage
|
||||
end
|
||||
|
||||
Debug_EventScript_PrintTimeOfDay::
|
||||
callnative DebugMenu_CalculateTimeOfDay
|
||||
msgbox DebugEventScript_PrintWeekday_Text_0, MSGBOX_DEFAULT
|
||||
waitmessage
|
||||
closemessage
|
||||
end
|
||||
|
||||
Debug_EventScript_FakeRTCNotEnabled::
|
||||
msgbox Debug_EventScript_FakeRTCNotEnabled_Text_0, MSGBOX_DEFAULT
|
||||
waitmessage
|
||||
closemessage
|
||||
return
|
||||
|
||||
Debug_EventScript_FakeRTCNotEnabled_Text_0:
|
||||
.string "You currently do not have Fake RTC\nenabled. Please enable it in include/\lconfig/overworld.h$"
|
||||
|
||||
|
||||
Debug_EventScript_TellTheTime_Text_0:
|
||||
.string "Time and date:\n"
|
||||
.string "{STR_VAR_1}, {STR_VAR_2}:{STR_VAR_3}$"
|
||||
|
||||
DebugEventScript_PrintWeekday_Text_0:
|
||||
.string "Time of day: {STR_VAR_1}$"
|
||||
|
||||
@ -293,7 +293,9 @@ EventScript_UseWaterfall::
|
||||
msgbox Text_WantToWaterfall, MSGBOX_YESNO
|
||||
goto_if_eq VAR_RESULT, NO, EventScript_EndWaterfall
|
||||
msgbox Text_MonUsedWaterfall, MSGBOX_DEFAULT
|
||||
hidefollowernpc
|
||||
dofieldeffect FLDEFF_USE_WATERFALL
|
||||
callnative FollowerNPC_WarpSetEnd
|
||||
goto EventScript_EndWaterfall
|
||||
|
||||
EventScript_CannotUseWaterfall::
|
||||
@ -321,12 +323,16 @@ EventScript_UseDive::
|
||||
lockall
|
||||
checkpartymove MOVE_DIVE
|
||||
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantDive
|
||||
copyvar 0x8004 VAR_RESULT
|
||||
bufferpartymonnick STR_VAR_1, VAR_RESULT
|
||||
setfieldeffectargument 0, VAR_RESULT
|
||||
setfieldeffectargument 1, 1
|
||||
msgbox Text_WantToDive, MSGBOX_YESNO
|
||||
goto_if_eq VAR_RESULT, NO, EventScript_EndDive
|
||||
msgbox Text_MonUsedDive, MSGBOX_DEFAULT
|
||||
hidefollowernpc
|
||||
setfieldeffectargument 0, VAR_0x8004
|
||||
setfieldeffectargument 1, 1
|
||||
dofieldeffect FLDEFF_USE_DIVE
|
||||
goto EventScript_EndDive
|
||||
end
|
||||
@ -350,6 +356,7 @@ EventScript_UseDiveUnderwater::
|
||||
msgbox Text_WantToSurface, MSGBOX_YESNO
|
||||
goto_if_eq VAR_RESULT, NO, EventScript_EndSurface
|
||||
msgbox Text_MonUsedDive, MSGBOX_DEFAULT
|
||||
hidefollowernpc
|
||||
dofieldeffect FLDEFF_USE_DIVE
|
||||
goto EventScript_EndSurface
|
||||
end
|
||||
@ -361,6 +368,7 @@ EventScript_CantSurface::
|
||||
end
|
||||
|
||||
EventScript_EndSurface::
|
||||
callnative SetFollowerNPCSurfSpriteAfterDive
|
||||
releaseall
|
||||
end
|
||||
|
||||
@ -418,3 +426,20 @@ EventScript_FailSweetScent::
|
||||
|
||||
Text_FailSweetScent:
|
||||
.string "Looks like there's nothing here…$"
|
||||
|
||||
EventScript_UseDefog::
|
||||
lockall
|
||||
bufferpartymonnick STR_VAR_1, VAR_RESULT
|
||||
buffermovename STR_VAR_2, MOVE_DEFOG
|
||||
msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
isfollowerfieldmoveuser VAR_0x8004
|
||||
setfieldeffectargument 3, VAR_0x8004 @ skip pose if so
|
||||
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||
call_if_eq VAR_0x8004, TRUE, EventScript_FollowerFieldMove
|
||||
waitmovement 0
|
||||
setfieldeffectargument 0, VAR_RESULT
|
||||
dofieldeffect FLDEFF_DEFOG
|
||||
waitstate
|
||||
releaseall
|
||||
end
|
||||
|
||||
@ -43,19 +43,19 @@ Common_Movement_WalkInPlaceFasterDown:
|
||||
walk_in_place_faster_down
|
||||
step_end
|
||||
|
||||
Common_Movement_FaceRight:
|
||||
Common_Movement_FaceRight::
|
||||
face_right
|
||||
step_end
|
||||
|
||||
Common_Movement_FaceLeft:
|
||||
Common_Movement_FaceLeft::
|
||||
face_left
|
||||
step_end
|
||||
|
||||
Common_Movement_FaceDown:
|
||||
Common_Movement_FaceDown::
|
||||
face_down
|
||||
step_end
|
||||
|
||||
Common_Movement_FaceUp:
|
||||
Common_Movement_FaceUp::
|
||||
face_up
|
||||
step_end
|
||||
|
||||
@ -96,7 +96,7 @@ Common_Movement_Delay32:
|
||||
delay_16
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkUp:
|
||||
Common_Movement_WalkUp::
|
||||
walk_up
|
||||
step_end
|
||||
|
||||
@ -105,3 +105,64 @@ Common_Movement_WalkUp2::
|
||||
walk_up
|
||||
walk_up
|
||||
step_end
|
||||
|
||||
@ Follower NPC
|
||||
Common_Movement_WalkUpSlow::
|
||||
walk_slow_up
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkDownSlow::
|
||||
walk_slow_down
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkRightSlow::
|
||||
walk_slow_right
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkLeftSlow::
|
||||
walk_slow_left
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkDown::
|
||||
walk_down
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkRight::
|
||||
walk_right
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkLeft::
|
||||
walk_left
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkUpFast::
|
||||
walk_fast_up
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkDownFast::
|
||||
walk_fast_down
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkRightFast::
|
||||
walk_fast_right
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkLeftFast::
|
||||
walk_fast_left
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkUpFaster::
|
||||
walk_faster_up
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkDownFaster::
|
||||
walk_faster_down
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkRightFaster::
|
||||
walk_faster_right
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkLeftFaster::
|
||||
walk_faster_left
|
||||
step_end
|
||||
|
||||
@ -13,14 +13,11 @@
|
||||
- [How to add new battle script commands/macros](tutorials/how_to_battle_script_command_macro.md)
|
||||
- [How to add a new move](tutorials/how_to_new_move.md)
|
||||
- [How to add a new trainer class](tutorials/how_to_trainer_class.md)
|
||||
- [How to add a new Pokémon]()
|
||||
- [v1.10.x](tutorials/how_to_new_pokemon_1_10_0.md)
|
||||
- [v1.9.x](tutorials/how_to_new_pokemon_1_9_0.md)
|
||||
- [v1.8.x](tutorials/how_to_new_pokemon_1_8_0.md)
|
||||
- [v1.7.x](tutorials/how_to_new_pokemon_1_7_0.md)
|
||||
- [v1.6.x](tutorials/how_to_new_pokemon_1_6_0.md)
|
||||
- [How to add a new Pokémon](tutorials/how_to_new_pokemon.md)
|
||||
- [v1.6.x and earlier](tutorials/how_to_new_pokemon_1_6_0.md)
|
||||
- [How to use the Testing System](tutorials/how_to_testing_system.md)
|
||||
- [How to add new Trainer Slides](tutorials/how_to_new_trainer_slide.md)
|
||||
- [Day/Night System FAQ](tutorials/dns.md)
|
||||
- [Changelog](./CHANGELOG.md)
|
||||
- [1.11.x]()
|
||||
- [Version 1.11.1](changelogs/1.11.x/1.11.1.md)
|
||||
|
||||
@ -10,6 +10,18 @@
|
||||
- If devkitARM is **not installed**, then go to [Installing devkitARM (macOS)](#installing-devkitarm-macos).
|
||||
- Otherwise, **open the Terminal** and go to [Choosing where to store pokeemerald-expansion (macOS)](#choosing-where-to-store-pokeemerald-expansion-macos)
|
||||
|
||||
3. **Optional: To run tests**, if the homebrew environment is not installed, install the package manager using [this reference](https://brew.sh). Open your terminal and run the following commands:
|
||||
|
||||
```bash
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
brew install coreutils
|
||||
```
|
||||
|
||||
4. **Optional: To run tests via Rosetta**
|
||||
- You probably don't want to do this as it's much slower. Most users can use native tools, but some may have other reasons to use this setup such as working with Intel-only custom tooling.
|
||||
- You will need an Intel-compatible homebrew installation. Understanding how to get one can be found [here](https://github.com/Homebrew/brew/issues/9173#issuecomment-729206868).
|
||||
- Install `coreutils` like in step 3, but using your Intel-compatible installation of homebrew.
|
||||
|
||||
### Installing libpng (macOS)
|
||||
<details>
|
||||
<summary><i>Note for advanced users...</i></summary>
|
||||
|
||||
@ -37,18 +37,18 @@ If you're not sure if something CAN be tested, start a discussion. Some contribu
|
||||
|
||||
If any new tests are `KNOWN_FAILING`, issues should be opened describing each of the `KNOWN_FAILING` tests and our understanding of why they fail.
|
||||
|
||||
## Does the branch meet our [config philosophy](docs/styleguide#config-philosophy)?
|
||||
## Does the branch meet our [config philosophy](/docs/STYLEGUIDE.md#config-philosophy)?
|
||||
|
||||
## Does the branch meet our [saves philosophy](docs/styleguide#saves-philosophy)?
|
||||
## Does the branch meet our [saves philosophy](/docs/STYLEGUIDE.md#saves-philosophy)?
|
||||
|
||||
## Does the submitted code follow the [styleguide](docs/styleguide)?
|
||||
## Does the submitted code follow the [styleguide](/docs/STYLEGUIDE.md)?
|
||||
This applies to code that comes from other branches or games.
|
||||
|
||||
## Is the pull request appropriately labeled?
|
||||
Without labels, the CHANGELOG will not be properly formatted. For specifically the `bugfix` label, an additional label, detailing what area the bug exists in is required.
|
||||
|
||||
## Is `pokeemerald-expansion` free from a merge freeze?
|
||||
Our [release schedule](docs/team_procedures/schedule.md) prevents us from merging Big Features and non-bugfixes within certain dates close to a release. Please use `/release` in the RHH Discord to clarify when these are occuring.
|
||||
Our [release schedule](/docs/team_procedures/schedule.md) prevents us from merging Big Features and non-bugfixes within certain dates close to a release. Please use `/release` in the RHH Discord to clarify when these are occuring.
|
||||
|
||||
# Merging
|
||||
|
||||
|
||||
25
docs/tutorials/dns.md
Normal file
@ -0,0 +1,25 @@
|
||||
## Day/Night system FAQ
|
||||
|
||||
### Q: How do I disable DNS?
|
||||
A: Set `OW_ENABLE_DNS` to `FALSE` in `include/config/overworld.h`.
|
||||
|
||||
### Q: How do I mark certain colors in a palette as light-blended?
|
||||
A: Create a `.pla` file in the same folder as the `.pal` with the same name.
|
||||
|
||||
In this file you can enter color indices [0,15]
|
||||
on separate lines to mark those colors as being light-blended, i.e:
|
||||
|
||||
`06.pla:`
|
||||
```
|
||||
# A comment
|
||||
0 # if color 0 is listed, uses it to blend with instead of the default!
|
||||
1
|
||||
9
|
||||
10
|
||||
```
|
||||
|
||||
### Q: How do I return to using regular shadows?
|
||||
A: Set `OW_OBJECT_VANILLA_SHADOWS` to `TRUE` in `include/config/overworld.h`.
|
||||
|
||||
### Q: How do I disable shadows for certain locations?
|
||||
A: Shadows can be disabled for certain locations by modifying the `CurrentMapHasShadows` function in `src/overworld.c`.
|
||||
@ -1,14 +1,10 @@
|
||||
<!--1.10.x-->
|
||||
This is a modified version of [the original tutorial about adding new Pokémon species available in Pokeemerald's wiki](https://github.com/pret/pokeemerald/wiki/How-to-add-a-new-Pokémon-species).
|
||||
|
||||
Despite the persistent rumors about an incredibly strong third form of Mew hiding somewhere, it actually wasn't possible to catch it... OR WAS IT?
|
||||
In this tutorial, we will add a new Pokémon species to the game.
|
||||
|
||||
## IMPORTANT: This tutorial applies to 1.10.x versions.
|
||||
- [Version 1.9.x](how_to_new_pokemon_1_9_0.md)
|
||||
- [Version 1.8.x](how_to_new_pokemon_1_8_0.md)
|
||||
- [Version 1.7.x](how_to_new_pokemon_1_7_0.md)
|
||||
- [Version 1.6.x](how_to_new_pokemon_1_6_0.md)
|
||||
## IMPORTANT: This tutorial applies to 1.7.x versions onward.
|
||||
- [v1.6.x and earlier](how_to_new_pokemon_1_6_0.md)
|
||||
|
||||
# Changes compared to vanilla
|
||||
The main things that the Expansion changes are listed here.
|
||||
@ -40,13 +36,13 @@ The main things that the Expansion changes are listed here.
|
||||
* [1. Form tables](#1-form-tables)
|
||||
* [2. Form change tables](#2-form-change-tables)
|
||||
* [3. Gender differences](#3-gender-differences)
|
||||
* [4. Overworld Data](#4-overworld-data)
|
||||
* [4. Overworld Data (v1.9 onwards)](#4-overworld-data-v19-onwards)
|
||||
* [5. In-battle shadows (v1.10 onwards)](#5-in-battle-shadows-v110-onwards)
|
||||
|
||||
# Useful resources
|
||||
You can open a sprite debug menu by pressing `Select` in a Pokémon's summary screen outside of battle.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
# The Data - Part 1
|
||||
|
||||
@ -77,7 +73,7 @@ We add this at the end so that no existing species change Id and so that we don'
|
||||
|
||||
Now, let's see how it looks in-game!
|
||||
|
||||

|
||||

|
||||
|
||||
Hmmm, something's not right...
|
||||
|
||||
@ -87,7 +83,7 @@ Now, let's see what needs to be done.
|
||||
|
||||
## 2. `SpeciesInfo`'s structure
|
||||
Now, to better understand Mewthree, we also need to understand Mew. Let's look at its data.
|
||||
```diff
|
||||
```c
|
||||
[SPECIES_MEW] =
|
||||
{
|
||||
.baseHP = 100,
|
||||
@ -133,7 +129,11 @@ Now, to better understand Mewthree, we also need to understand Mew. Let's look a
|
||||
.frontPic = gMonFrontPic_Mew,
|
||||
.frontPicSize = P_GBA_STYLE_SPECIES_GFX ? MON_COORDS_SIZE(40, 40) : MON_COORDS_SIZE(64, 48),
|
||||
.frontPicYOffset = P_GBA_STYLE_SPECIES_GFX ? 13 : 9,
|
||||
.frontAnimFrames = sAnims_Mew,
|
||||
.frontAnimFrames = ANIM_FRAMES(
|
||||
ANIMCMD_FRAME(1, 50),
|
||||
ANIMCMD_FRAME(1, 40),
|
||||
ANIMCMD_FRAME(0, 10),
|
||||
),
|
||||
.frontAnimId = P_GBA_STYLE_SPECIES_GFX ? ANIM_SWING_CONVEX : ANIM_ZIGZAG_SLOW,
|
||||
.enemyMonElevation = P_GBA_STYLE_SPECIES_GFX ? 8 : 11,
|
||||
.backPic = gMonBackPic_Mew,
|
||||
@ -151,6 +151,7 @@ Now, to better understand Mewthree, we also need to understand Mew. Let's look a
|
||||
SIZE_32x32,
|
||||
SHADOW_SIZE_M,
|
||||
TRACKS_NONE,
|
||||
sAnimTable_Following,
|
||||
gOverworldPalette_Mew,
|
||||
gShinyOverworldPalette_Mew
|
||||
)
|
||||
@ -165,6 +166,10 @@ Now, to better understand Mewthree, we also need to understand Mew. Let's look a
|
||||
That's a lot of stuff! But don't worry, we'll go through it step by step throughout the tutorial
|
||||
(and it's miles better than having this same data through 20+ files like it used to be).
|
||||
|
||||
Across the species files you'll see preprocessor instructions such as `#if/endif P_FAMILY_MEW`. These are used by expansion in order to allow users to disable species via config. Since we're making a new species from scratch, you DON'T need to add them as part of the process.
|
||||
|
||||
You can also ignore switch cases for `P_GBA_STYLE_SPECIES_GFX`, as those are only used to switching to GBA-styled sprites.
|
||||
|
||||
We'll start by adding the self-explanatory data that's also present in pret's vanilla structure:
|
||||
|
||||
## 3. Define its basic species information
|
||||
@ -215,6 +220,13 @@ The `.` is the structure reference operator in C to refer to the member object o
|
||||
- `baseHP`, `baseAttack`, `baseDefense`, `baseSpeed`, `baseSpAttack` and `baseSpDefense` are the base stats. They can't go higher than 255.
|
||||
- `types` is using the macro `MON_TYPES` as a helper function for formatting so that only one type has to be input for species with a single type.
|
||||
- To add a species with 2 types, use the format `MON_TYPES(TYPE_PSYCHIC, TYPE_NORMAL)`.
|
||||
- ***1.9 and earlier:*** The format for setting types is the following:
|
||||
```c
|
||||
// Mono-type
|
||||
.types = { TYPE_PSYCHIC, TYPE_PSYCHIC },
|
||||
// Dual-type
|
||||
.types = { TYPE_PSYCHIC, TYPE_DARK },
|
||||
```
|
||||
- `catchRate` is how likely it is to catch a Pokémon, the lower the value, the harder it is to catch. Legendaries generally have a catch rate of 3, so we put that here.
|
||||
- `expYield` is the base amount of experience that a Pokémon gives when defeated/caught. In vanilla, this value caps at 255, but we've increased it to a maximum of 65535 accomodate later gen's higher experience yields. (The highest official value is Blissey's with 608, so going beyond this point may cause exponential gains that could break the system 😱)
|
||||
- If you noticed, Mew's had some `#if`s, `#elif`s and `#endif` around it. This is because its yield has changed over time, and we let you choose which ones you want. This is not relevant to our Mewthree however, so we can just put a single `.expYield = 255,` line here.
|
||||
@ -237,6 +249,13 @@ The `.` is the structure reference operator in C to refer to the member object o
|
||||
- This should be consistent across evolution lines, otherwise levels could change upon evolution.
|
||||
- `eggGroups` are used for breed compatibility. Most Legendaries and Mythicals have the `EGG_GROUP_NO_EGGS_DISCOVERED` group, and so does our Mewthree. Go [here](https://bulbapedia.bulbagarden.net/wiki/Egg_Group) for more info.
|
||||
- This is using the helper macro `MON_EGG_GROUPS`.
|
||||
- ***1.9 and earlier:*** The format for setting egg groups is the following:
|
||||
```c
|
||||
// Mono-group
|
||||
.eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MONSTER },
|
||||
// Dual-group
|
||||
.eggGroups = { EGG_GROUP_MONSTER, EGG_GROUP_MINERAL },
|
||||
```
|
||||
- `abilities` determines the potential abilites of our species. Notice how I also set the ability to `ABILITY_INSOMNIA`, so our little monster doesn't even need to sleep anymore. You can find the abilities for example here [include/constants/abilities.h](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/include/constants/abilities.h).
|
||||
- When both slot 1 and 2 are defined as not being `ABILITY_NONE`, their starting ability will be decided on a coin flip using their personality. They can later be changed using an Ability Capsule.
|
||||
- Certain Pokémon such as Zygarde and Rockruff have different forms to add additional abilities. As such, they cannot be changed using an Ability Capsule (though the Zygarde Cube can change Zygarde's ability by changing them to their corresponding form)
|
||||
@ -424,7 +443,7 @@ Now we can add the number and entry to our Mewthree:
|
||||
},
|
||||
};
|
||||
```
|
||||

|
||||

|
||||
|
||||
The values `pokemonScale`, `pokemonOffset`, `trainerScale` and `trainerOffset` are used for the height comparison figure in the Pokédex.
|
||||
|
||||
@ -475,7 +494,7 @@ Edit [src/data/pokemon/pokedex_orders.h](https://github.com/rh-hideout/pokeemera
|
||||
...
|
||||
};
|
||||
```
|
||||

|
||||

|
||||
|
||||
|
||||
# The Graphics
|
||||
@ -539,6 +558,10 @@ Please note that Pecharunt, the Pokémon that should be above your insertion for
|
||||
|
||||
You can define the animation order, in which the sprites will be shown. The first number is the sprite index (so 0 or 1) and the second number is the number of frames the sprite will be visible.
|
||||
|
||||
### Version 1.11.0 or later
|
||||
We add this data directly to the entry, so go to section 4.
|
||||
|
||||
### Version 1.10.3 or earlier
|
||||
Edit [src/data/pokemon_graphics/front_pic_anims.h](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/src/data/pokemon_graphics/front_pic_anims.h):
|
||||
|
||||
```diff
|
||||
@ -597,7 +620,9 @@ Now that we have all the external data ready, we just need to add it to `gSpecie
|
||||
+ .frontPic = gMonFrontPic_Mewthree,
|
||||
+ .frontPicSize = MON_COORDS_SIZE(64, 64),
|
||||
+ .frontPicYOffset = 0,
|
||||
+ .frontAnimFrames = sAnims_Mewthree,
|
||||
+ .frontAnimFrames = ANIM_FRAMES(
|
||||
+ ANIMCMD_FRAME(0, 1),
|
||||
+ ),
|
||||
+ .frontAnimId = ANIM_GROW_VIBRATE,
|
||||
+ .frontAnimDelay = 15,
|
||||
+ .enemyMonElevation = 6,
|
||||
@ -621,7 +646,10 @@ Let's explain each of these:
|
||||
- `frontPicYOffset`:
|
||||
- Used to define what Y position the sprite sits at. This is used to set where they'd be "grounded". For the shadow, see `enemyMonElevation`.
|
||||
- `frontAnimFrames`:
|
||||
- We link our animation frame animations that we defined earlier here.
|
||||
- We define our animation frame animations directly here. In version `1.10.3 and earlier`, we add the reference to the table that we defined earlier here like this instead:
|
||||
```diff
|
||||
+ .frontAnimFrames = sAnims_Mewthree,
|
||||
```
|
||||
- `frontAnimId`:
|
||||
- Because you are limited to two frames, there are already [predefined front sprite animations](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/include/pokemon_animation.h), describing translations, rotations, scalings or color changes.
|
||||
- `frontAnimDelay`:
|
||||
@ -655,6 +683,12 @@ Let's explain each of these:
|
||||
#endif
|
||||
```
|
||||
|
||||
***NOTE:** In v1.7.x only, there were macros that set multiple of these fields. However, they were considered clunky to use, so they were removed in v1.8.
|
||||
- `FRONT_PIC`: For `frontPic` and `frontPicSize`.
|
||||
- `BACK_PIC`: For `backPic` and `backPicSize`.
|
||||
- `PALETTES`: For `palette` and `shinyPalette`.
|
||||
- `ICON`: For `iconSprite` and `iconPalIndex`.
|
||||
|
||||
# The Data - Part 2
|
||||
|
||||
We're almost there just a bit left!
|
||||
@ -676,19 +710,26 @@ We're almost there just a bit left!
|
||||
};
|
||||
```
|
||||
Each species flag provides properties to the species:
|
||||
- `perfectIVCount` ***(1.10 onwards)***:
|
||||
- Guarantees that the number of IVs specified here will be perfect.
|
||||
- `isLegendary`:
|
||||
- Does nothing.
|
||||
- ***1.10 onwards:*** Does nothing.
|
||||
- ***1.9 and earlier:*** Guaranteed 3 perfect IVs for the species.
|
||||
- `isMythical`:
|
||||
- Is skipped during Pokédex evaluations.
|
||||
- Unless it also has the `dexForceRequired` flag.
|
||||
- Cannot obtain Gigantamax factor via `ToggleGigantamaxFactor`.
|
||||
- ***1.9 and earlier:*** Guaranteed 3 perfect IVs for the species.
|
||||
- `isUltraBeast`:
|
||||
- Beast Ball's multiplier is set to x5 for this species.
|
||||
- All other ball multipliers are set to x0.1.
|
||||
- `isParadox` (previously `isParadoxForm`):
|
||||
- Makes it so that Booster Energy cannot be knocked off.
|
||||
- ***1.9 and earlier:*** Guaranteed 3 perfect IVs for the species.
|
||||
- `isParadox` (`isParadoxForm` previous to 1.9):
|
||||
- ***1.10 onwards:*** Makes it so that Booster Energy cannot be knocked off.
|
||||
- ***1.9 and earlier:*** Does nothing.
|
||||
- `isTotem`:
|
||||
- Does nothing.
|
||||
- ***1.10 onwards:*** Does nothing.
|
||||
- ***1.9 and earlier:*** Guaranteed 3 perfect IVs for the species.
|
||||
- `isMegaEvolution`:
|
||||
- A Mega indicator is added to the battle box indicating that they're Mega Evolved.
|
||||
- The species doesn't receive affection benefits.
|
||||
@ -702,14 +743,13 @@ Each species flag provides properties to the species:
|
||||
- Used to determine if Gigantamax forms should have their GMax moves or not.
|
||||
- Required when adding new Gigantamax forms.
|
||||
- `isAlolanForm`, `isGalarianForm`, `isHisuianForm`, `isPaldeanForm`:
|
||||
- In the future, these will be used to determine breeding offspring from different based on their region.
|
||||
- **1.10.3 onwards:** Used to determine breeding offspring from different parents based on their region.
|
||||
- **1.10.2 and earlier:** Does nothing.
|
||||
- `cannotBeTraded`:
|
||||
- This species cannot be traded away (like Black/White Kyurem).
|
||||
- `perfectIVCount`:
|
||||
- Guarantees that the number of IVs specified here will be perfect.
|
||||
- `tmIlliterate`:
|
||||
- This species will be unable to learn the universal moves.
|
||||
- `isFrontierBanned`:
|
||||
- This species will be unable to learn the universal TM or Tutor moves.
|
||||
- `isFrontierBanned` ***(1.9 onwards)***:
|
||||
- This species will be unable to enter Battle Frontier facilities. Replaces `gFrontierBannedSpecies`.
|
||||
|
||||
## 2. Delimit the moveset
|
||||
@ -864,7 +904,7 @@ _NOTE: At the top of this file, you will probably see this warning:_
|
||||
// DO NOT MODIFY THIS FILE! It is auto-generated from tools/learnset_helpers/teachable.py`
|
||||
//
|
||||
```
|
||||
The expansion includes a tool called the learnset helper, which aims to automate the generation of valid teachable moves. At the time of writing, this tool only supports generating TM and Tutor learnsets. However, in the future it may be expanded to deal with level up learnsets and egg moves.
|
||||
From version 1.9 onwards, pokeemerald-expansion includes a tool called the learnset helper, which aims to automate the generation of valid teachable moves. At the time of writing, this tool only supports generating TM and Tutor learnsets. However, in the future it may be expanded to deal with level up learnsets and egg moves.
|
||||
|
||||
Ignore the warning shown above the first time you're adding your teachable moves (as otherwise the compiler will complain about the array not existing), but in the future (if you're using the learnset helper) simply edit what teachable moves your Pokémon can learn in one of the JSON files found in `tools/learnset_helpers/porymoves_files`. It doesn't really matter which one you add your new Pokémon to, as the tool pulls from all of the files in this folder.
|
||||
|
||||
@ -990,7 +1030,7 @@ static const u16 sPikachuFormSpeciesIdTable[] = {
|
||||
};
|
||||
#endif //P_FAMILY_PIKACHU
|
||||
```
|
||||
We register the table each form entry in `gSpeciesInfo`.
|
||||
We register the table for each form in `gSpeciesInfo`.
|
||||
|
||||
```diff
|
||||
[SPECIES_PIKACHU] =
|
||||
@ -1015,7 +1055,7 @@ What this allows us to do is to be able to get all forms of a Pokémon in our co
|
||||
|
||||
For example, in the HGSS dex, it lets us browse between the entries of every form available.:
|
||||
|
||||
 
|
||||
 
|
||||
|
||||
In addition, we have the `GET_BASE_SPECIES_ID` macro, which returns the first entry of the table (or return the species itself if it doesn't have a table registered). With this, you can check if a Pokémon is any form of a species. For example, making it so that the Light Ball affects all Pikachu forms:
|
||||
```c
|
||||
@ -1046,7 +1086,7 @@ The second value is the target form, to which the Pokémon will change into.
|
||||
Values after that are referred as arguments, and needs to be put there depends on the type of form change, detailed in `include/constants/form_change_types.h`.
|
||||
|
||||
## 3. Gender differences
|
||||

|
||||

|
||||
|
||||
You may have seen that there's a couple of duplicate fields with a "Female" suffix.
|
||||
```diff
|
||||
@ -1054,26 +1094,33 @@ You may have seen that there's a couple of duplicate fields with a "Female" suff
|
||||
{
|
||||
...
|
||||
.frontPic = gMonFrontPic_Frillish,
|
||||
+ .frontPicFemale = gMonFrontPic_FrillishF,
|
||||
.frontPicSize = MON_COORDS_SIZE(56, 56),
|
||||
+ .frontPicSizeFemale = MON_COORDS_SIZE(56, 56),
|
||||
.frontPicYOffset = 5,
|
||||
.frontAnimFrames = sAnims_Frillish,
|
||||
.frontAnimFrames = ANIM_FRAMES(
|
||||
ANIMCMD_FRAME(1, 30),
|
||||
ANIMCMD_FRAME(0, 30),
|
||||
ANIMCMD_FRAME(1, 30),
|
||||
ANIMCMD_FRAME(0, 30),
|
||||
),
|
||||
.frontAnimId = ANIM_RISING_WOBBLE,
|
||||
.backPic = gMonBackPic_Frillish,
|
||||
+ .backPicFemale = gMonBackPic_FrillishF,
|
||||
.backPicSize = MON_COORDS_SIZE(40, 56),
|
||||
+ .backPicSizeFemale = MON_COORDS_SIZE(40, 56),
|
||||
.backPicYOffset = 7,
|
||||
.backAnimId = BACK_ANIM_CONVEX_DOUBLE_ARC,
|
||||
.palette = gMonPalette_Frillish,
|
||||
+ .paletteFemale = gMonPalette_FrillishF,
|
||||
.shinyPalette = gMonShinyPalette_Frillish,
|
||||
+ .shinyPaletteFemale = gMonShinyPalette_FrillishF,
|
||||
.iconSprite = gMonIcon_Frillish,
|
||||
+ .iconSpriteFemale = gMonIcon_FrillishF,
|
||||
.iconPalIndex = 0,
|
||||
+#if P_GENDER_DIFFERENCES
|
||||
+ .frontPicFemale = gMonFrontPic_FrillishF,
|
||||
+ .frontPicSizeFemale = MON_COORDS_SIZE(56, 56),
|
||||
+ .backPicFemale = gMonBackPic_FrillishF,
|
||||
+ .backPicSizeFemale = MON_COORDS_SIZE(40, 56),
|
||||
+ .paletteFemale = gMonPalette_FrillishF,
|
||||
+ .shinyPaletteFemale = gMonShinyPalette_FrillishF,
|
||||
+ .iconSpriteFemale = gMonIcon_FrillishF,
|
||||
+ .iconPalIndexFemale = 1,
|
||||
+#endif //P_GENDER_DIFFERENCES
|
||||
FOOTPRINT(Frillish)
|
||||
.levelUpLearnset = sFrillishLevelUpLearnset,
|
||||
.teachableLearnset = sFrillishTeachableLearnset,
|
||||
@ -1084,10 +1131,8 @@ These are used to change the graphics of the Pokémon if they're female. If they
|
||||
|
||||
However, `iconPalIndexFemale` is a special case, where it's *doesn't* read the male icon palette if its `iconSpriteFemale` is set, so if you're setting a female icon, be sure to set their palette index as well.
|
||||
|
||||
## 4. Overworld Data
|
||||

|
||||
|
||||
If you have `OW_POKEMON_OBJECT_EVENTS` in your hack, you can add Overworld of your new species by following these steps:
|
||||
## 4. Overworld Data (v1.9 onwards)
|
||||
If you have `OW_POKEMON_OBJECT_EVENTS` in your hack, you can add Overworld sprite data of your new species. Naturally, these can also be used for followers.
|
||||
|
||||
First, since you copied the contents from Mew's folder previously, you should also have copied its overworld sprites. Edit those to your liking, as we have done before, making sure to update the palettes
|
||||
|
||||
@ -1105,13 +1150,13 @@ Thirdly, in [spritesheet_rules.mk](https://github.com/rh-hideout/pokeemerald-exp
|
||||
|
||||
```diff
|
||||
$(POKEMONGFXDIR)/mewtwo/overworld.4bpp: %.4bpp: %.png
|
||||
$(GFX) $< $@ -mwidth 4 -mheight 4
|
||||
$(GFX) $< $@ -mwidth 4 -mheight 4
|
||||
|
||||
+$(POKEMONGFXDIR)/mewthree/overworld.4bpp: %.4bpp: %.png
|
||||
+ $(GFX) $< $@ -mwidth 4 -mheight 4
|
||||
|
||||
$(POKEMONGFXDIR)/mew/overworld.4bpp: %.4bpp: %.png
|
||||
$(GFX) $< $@ -mwidth 4 -mheight 4
|
||||
$(GFX) $< $@ -mwidth 4 -mheight 4
|
||||
```
|
||||
|
||||
Fourthly, in [src/data/object_events/object_event_pic_tables_followers.h](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/src/data/object_events/object_event_pic_tables_followers.h):
|
||||
@ -1142,6 +1187,7 @@ And finally, in `gSpeciesInfo`:
|
||||
+ SIZE_32x32,
|
||||
+ SHADOW_SIZE_M,
|
||||
+ TRACKS_FOOT,
|
||||
+ sAnimTable_Following,
|
||||
+ gOverworldPalette_Mewthree,
|
||||
+ gShinyOverworldPalette_Mewthree
|
||||
+ )
|
||||
@ -1150,6 +1196,7 @@ And finally, in `gSpeciesInfo`:
|
||||
},
|
||||
};
|
||||
```
|
||||
**Note: In versions previous to 1.11, `sAnimTable_Following` is not added here.**
|
||||
|
||||
### Sprite Size
|
||||
Depending on your species, you might want to use different sizes for it. For example, certain species known for being big like Steelix use sprites that fit a 64x64 frame instead of 32x32, and as such have `SIZE_64x64` in their data instead of `SIZE_32x32` to accomodate for them.
|
||||
@ -1157,25 +1204,100 @@ Depending on your species, you might want to use different sizes for it. For exa
|
||||
Also, in `spritesheet_rules.mk`, `-mwidth` and `-mheight` need to be set to 8 instead of 4 for such cases.
|
||||
|
||||
### Shadows
|
||||
Gen 4 style shadows are defined by the `SHADOW` macro which takes the following arguments:
|
||||
- X offset
|
||||
- Y offset
|
||||
- Shadow size
|
||||
You have 4 options for their shadow, between Small, Medium, Large and Extra Large:
|
||||
- `SHADOW_SIZE_S`
|
||||
- `SHADOW_SIZE_M`
|
||||
- `SHADOW_SIZE_L`
|
||||
- `SHADOW_SIZE_XL_BATTLE_ONLY`
|
||||
To make the Pokémon have no shadow, use the `NO_SHADOW` macro instead of `SHADOW`.
|
||||
You have 4 options for their shadow, between Small, Medium, Large and None:
|
||||
- `SHADOW_SIZE_NONE`
|
||||
- `SHADOW_SIZE_S` 
|
||||
- `SHADOW_SIZE_M` 
|
||||
- `SHADOW_SIZE_L` 
|
||||
|
||||
### Tracks
|
||||
You have 4 options for the tracks that your species will leave behind on sand.
|
||||
- `TRACKS_NONE`
|
||||
- `TRACKS_FOOT` 
|
||||
- `TRACKS_SLITHER` 
|
||||
- `TRACKS_SPOT` 
|
||||
- `TRACKS_BUG` 
|
||||
- `TRACKS_FOOT` 
|
||||
- `TRACKS_SLITHER` 
|
||||
- `TRACKS_SPOT` 
|
||||
- `TRACKS_BUG` 
|
||||
|
||||
...though technically you can also use `TRACKS_BIKE_TIRE` if you wish to.
|
||||
|
||||

|
||||

|
||||
|
||||
### Asymmetric sprites (Version 1.10.0 onwards)
|
||||
|
||||

|
||||
|
||||
You can set up an east-west asymetric overworld sprite by adding the East frames at the end of the sheet and changing the following:
|
||||
|
||||
#### Version 1.11.0 onwards
|
||||
```diff
|
||||
OVERWORLD(
|
||||
sPicTable_Mewthree,
|
||||
SIZE_32x32,
|
||||
SHADOW_SIZE_M,
|
||||
TRACKS_FOOT,
|
||||
- sAnimTable_Following,
|
||||
+ sAnimTable_Following_Asym,
|
||||
gOverworldPalette_Mewthree,
|
||||
gShinyOverworldPalette_Mewthree
|
||||
)
|
||||
```
|
||||
#### Version 1.10.x
|
||||
```diff
|
||||
- OVERWORLD(
|
||||
+ OVERWORLD_SET_ANIM(
|
||||
sPicTable_Mewthree,
|
||||
SIZE_32x32,
|
||||
SHADOW_SIZE_M,
|
||||
TRACKS_FOOT,
|
||||
+ sAnimTable_Following_Asym,
|
||||
gOverworldPalette_Mewthree,
|
||||
gShinyOverworldPalette_Mewthree
|
||||
)
|
||||
```
|
||||
|
||||
Either way, you may also create custom animation tables and use them here appropiately.
|
||||
|
||||
### How to add the Pokémon Object Events to map
|
||||
In Porymap, select the object you want to set the sprite to. Then, change the field "Sprite" to use `OBJ_EVENT_GFX_SPECIES(SPECIES)`, replacing SPECIES with the name of the species you want to use. If you get a compiler error, it's because it used the species define as part of the macro, so it needs to match how you defined it all the way back in [Declare a species constant](#1-Declare-a-species-constant).
|
||||

|
||||

|
||||
|
||||
If you want to use their shiny and/or female versions, use one of the following macros:
|
||||
- `OBJ_EVENT_GFX_SPECIES_SHINY(name)`
|
||||
- `OBJ_EVENT_GFX_SPECIES_FEMALE(name)`
|
||||
- `OBJ_EVENT_GFX_SPECIES_SHINY_FEMALE(name)`
|
||||
|
||||
## 5. In-battle shadows (v1.10 onwards)
|
||||
Gen 4-style shadows are defined by the `SHADOW` macro which takes the following arguments:
|
||||
- X offset
|
||||
- Y offset
|
||||
- Shadow size: you have 4 options for their shadow, between Small, Medium, Large and Extra Large:
|
||||
- `SHADOW_SIZE_S`
|
||||
- `SHADOW_SIZE_M`
|
||||
- `SHADOW_SIZE_L`
|
||||
- `SHADOW_SIZE_XL_BATTLE_ONLY`
|
||||
|
||||
To make the Pokémon have no shadow, use the `NO_SHADOW` macro instead of `SHADOW`.
|
||||
|
||||
## 6. Limiting species allowed as followers
|
||||
You may use the following configs in `include/config/overworld.h`
|
||||
```c
|
||||
#define OW_FOLLOWERS_ALLOWED_SPECIES (0)
|
||||
#define OW_FOLLOWERS_ALLOWED_MET_LVL (0)
|
||||
#define OW_FOLLOWERS_ALLOWED_MET_LOC (0)
|
||||
```
|
||||
Examples:
|
||||
```c
|
||||
// Yellow Pikachu:
|
||||
#define OW_FOLLOWERS_ALLOWED_SPECIES (SPECIES_PIKACHU)
|
||||
#define OW_FOLLOWERS_ALLOWED_MET_LVL (0)
|
||||
#define OW_FOLLOWERS_ALLOWED_MET_LOC (MAPSEC_PALLET_TOWN)
|
||||
// Hoenn Starter:
|
||||
#define OW_FOLLOWERS_ALLOWED_SPECIES (0)
|
||||
#define OW_FOLLOWERS_ALLOWED_MET_LVL (5)
|
||||
#define OW_FOLLOWERS_ALLOWED_MET_LOC (MAPSEC_ROUTE_101)
|
||||
// Species set in VAR_XXXX:
|
||||
#define OW_FOLLOWERS_ALLOWED_SPECIES (VAR_XXXX)
|
||||
#define OW_FOLLOWERS_ALLOWED_MET_LVL (0)
|
||||
#define OW_FOLLOWERS_ALLOWED_MET_LOC (0)
|
||||
```
|
||||
@ -4,9 +4,7 @@ Despite the persistent rumors about an incredibly strong third form of Mew hidin
|
||||
In this tutorial, we will add a new Pokémon species to the game.
|
||||
|
||||
## IMPORTANT: This tutorial applies to Version 1.6.2 and lower.
|
||||
- [Version 1.9.x](how_to_new_pokemon_1_9_0.md)
|
||||
- [Version 1.8.x](how_to_new_pokemon_1_8_0.md)
|
||||
- [Version 1.7.x](how_to_new_pokemon_1_7_0.md)
|
||||
- [Version 1.7.x onwards](how_to_new_pokemon.md)
|
||||
|
||||
# Changes compared to vanilla
|
||||
The main things that the Expansion changes are listed here.
|
||||
|
||||
813
docs/tutorials/how_to_time_of_day_encounters.md
Normal file
@ -0,0 +1,813 @@
|
||||
# Time-Based Encounters Tutorial
|
||||
|
||||
## Table of Contents:
|
||||
- [What is the Time-Based Encounters feature?](#what-is-the-time-based-encounters-feature)
|
||||
- [Sounds rad, how do I add it to my romhack?](#sounds-rad-how-do-i-add-it-to-my-romhack)
|
||||
- [I've never added one by hand, but I want to!](#ive-never-added-one-by-hand-but-i-want-to)
|
||||
- [What are "supported suffixes?"](#what-are-supported-suffixes)
|
||||
- [That's a lot of manual editing.](#thats-a-lot-of-manual-editing)
|
||||
- [That's *still* a lot of editing.](#thats-still-a-lot-of-editing)
|
||||
- [So what are the `#define` options in `overworld.h`?](#so-what-are-the-define-options-in-overworldh)
|
||||
- [Examples](#examples)
|
||||
|
||||
## What is the Time-Based Encounters feature?
|
||||
Time-Based Encounters lets you pick which Pokémon appear based on the in-game clock, per route!
|
||||
Gen 2 had this feature, and Gen 4 brought it back- for instance, in Sinnoh's Route 201 you have a higher chance of catching a Bidoof than a Starly at night.
|
||||
|
||||
|
||||
### Sounds rad, how do I add it to my romhack?
|
||||
There are a couple of ways! The system is built to handle your unchanged [`wild_encounters.json`](../../src/data/wild_encounters.json) file by default, so the most basic solution is to add an encounter group by editing that (by hand or [with Porymap](https://huderlem.github.io/porymap/manual/editing-wild-encounters.html)), and then add a [supported suffix](#what-are-supported-suffixes) to the end of whatever name you give it.
|
||||
|
||||
|
||||
> **NOTE**: if you haven't specified or added any encounters, or have the option turned off, Expansion puts them into the `TIME_MORNING` (or whatever your first time enum is set to in the `TimeOfDay` `enum` in [`rtc.h`](../../include/rtc.h)) slot to keep vanilla behavior. This means any map `"base_label"` without a [supported suffix](#what-are-supported-suffixes) is automatically set to the first time slot when `OW_TIME_OF_DAY_ENCOUNTERS` is `TRUE`. When `OW_TIME_OF_DAY_ENCOUNTERS` is `FALSE`, everything regardless of any extant suffixes gets the first time slot suffix (ie `_Morning` for `TIME_MORNING`) so it matches with the 0th index of the [`encounterTypes` array](../../include/wild_encounter.h) in `struct WildMonHeader`.
|
||||
|
||||
|
||||
### I've never added one by hand, but I want to!
|
||||
Great attitude bestie! It's very simple- all you need is to find your [`wild_encounters.json`](../../src/data/wild_encounters.json) file and open it up in your text/code editor of choice; I recommend VSCodium, but any will work.
|
||||
|
||||
To get started, we'll use Route 101 as an example:
|
||||
```json
|
||||
{
|
||||
"map": "MAP_ROUTE101",
|
||||
"base_label": "gRoute101",
|
||||
"land_mons": {
|
||||
"encounter_rate": 20,
|
||||
"mons": [
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
```
|
||||
That's it! That's the entire encounter group for Route 101. In other Routes or maps, you'll likely see other encounters listed; here we have only have `land_mons`, but vanilla emerald supports three more types of encounters, for a total of four:
|
||||
- `land_mons`, your standard grass or cave or sand encounter.
|
||||
- `water_mons`, used for surfing
|
||||
- `rock_smash_mons`, for when you get jumpscared by a Geodude in Route 111 after using Rock Smash.
|
||||
- `fishing_mons`, for fishing
|
||||
|
||||
|
||||
> **NOTE**: You can also have more of these encounter types- in fact, expansion has a fifth type of encounter for the Dexnav feature called `hidden_mons`, and some people have entries for `honey_mons` and `headbutt_mons` in their personal hacks as well! This system supports those too, you just need to make sure to update your [`WildEncounters` struct](../../include/wild_encounter.h) definition. You need to keep the order consistent, so as a standard, any custom encounter types should go before `hidden_mons` but after `fishing_mons`. To use the earlier examples:
|
||||
|
||||
```c
|
||||
struct WildEncounterTypes
|
||||
{
|
||||
const struct WildPokemonInfo *landMonsInfo;
|
||||
const struct WildPokemonInfo *waterMonsInfo;
|
||||
const struct WildPokemonInfo *rockSmashMonsInfo;
|
||||
const struct WildPokemonInfo *fishingMonsInfo;
|
||||
const struct WildPokemonInfo *honeyMonsInfo;
|
||||
const struct WildPokemonInfo *headbuttMonsInfo;
|
||||
const struct WildPokemonInfo *hiddenMonsInfo;
|
||||
};
|
||||
```
|
||||
> You can see that the two new entries, `honeyMonsInfo` and `headbuttMonsInfo` (corresponding with `honey_mons` and `headbutt_mons`) are slotted in between `fishingMonsInfo` and `hiddenMonsInfo`. Structs in the C programming language rely on consistent placement with their members, so this is the order that every other instance of these encounter types should maintain. In my ~~expert~~ opinion, the easiest way to add these is again [with Porymap](https://huderlem.github.io/porymap/manual/editing-wild-encounters.html). Okay, take a breath, stretch, and we'll get back to the tutorial!
|
||||
|
||||
|
||||
For the sake of simplicity, I'll show you how to add another encounter group here and pop a supported prefix on it. I want my new encounter group to:
|
||||
- have a fishing table (I'm adding a fishin hole to Route 101)
|
||||
- let you catch Spiky Eared Pichu, my favorite mon (not really)
|
||||
- have some rock smash encounters to up the spook factor
|
||||
- only occur at night
|
||||
|
||||
With all of these things in mind, let's craft an encounter! We'll start off by copying the one we have, called `gRoute101`.
|
||||
```json
|
||||
{
|
||||
"map": "MAP_ROUTE101",
|
||||
"base_label": "gRoute101",
|
||||
"land_mons": {
|
||||
"encounter_rate": 20,
|
||||
"mons": [
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"map": "MAP_ROUTE101",
|
||||
"base_label": "gRoute101_Night",
|
||||
"land_mons": {
|
||||
"encounter_rate": 20,
|
||||
"mons": [
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
```
|
||||
Okay, we have it duplicated. We leave the value for "map": the same as the original so the game knows that both of these encounters are for Route 101. You can see I changed the name of the copy to `gRoute101_Night`; that's one bullet point down! If we enable `OW_TIME_BASED_ENCOUNTERS` in [`overworld.h`](../../include/config/overworld.h), the game will recognize this encounter group goes in the `Night` slot and will switch which group is used to generate the encounters when the in-game clock changes to `TIME_NIGHT`. Next, let's add Spiky Eared Pichu and our two new encounter tables (`fishing_mons` and `rock_smash_mons`).
|
||||
|
||||
```json
|
||||
{
|
||||
"map": "MAP_ROUTE101",
|
||||
"base_label": "gRoute101_Night",
|
||||
"land_mons": {
|
||||
"encounter_rate": 20,
|
||||
"mons": [
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_PICHU_SPIKY_EARED"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
}
|
||||
]
|
||||
},
|
||||
"fishing_mons": {
|
||||
"encounter_rate": 30,
|
||||
"mons": [
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_MAGIKARP"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_MARILL"
|
||||
}
|
||||
]
|
||||
},
|
||||
"rock_smash_mons": {
|
||||
"encounter_rate": 20,
|
||||
"mons": [
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_GEODUDE"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
```
|
||||
And there we go! It has the `_Night` suffix, has Spiky Eared Pichu right up at the top of the list, has a couple of fishing encounters, and will jumpscare us with about a 20% chance every time we break a rock with rock smash. That's what the `encounter_rate` line means, by the way- the overall percentage you have of encountering *any* of the Pokémon listed.
|
||||
Congrats! You've just created a brand new encounter group, set its time, and adjusted the encounters! I'd highly recommend doing this [with Porymap](https://huderlem.github.io/porymap/manual/editing-wild-encounters.html)- the interface is very useful for editing maps, including wild encounters!
|
||||
|
||||
### What are "supported suffixes?"
|
||||
Vanilla Pokémon games usually work with 4 different times of day:
|
||||
- `TIME_MORNING`
|
||||
- `TIME_DAY`
|
||||
- `TIME_EVENING`
|
||||
- `TIME_NIGHT`
|
||||
|
||||
So, the "supported suffixes" are just:
|
||||
- `_Morning`
|
||||
- `_Day`
|
||||
- `_Evening`
|
||||
- `_Night`
|
||||
|
||||
|
||||
> **NOTE**: You can add more than just these by changing the `TimeOfDay` `enum` in [`rtc.h`](../../include/rtc.h). If you'd like to do this, I'd recommend making a backup of your [`wild_encounters.json`](../../src/data/wild_encounters.json) somewhere outside your project folder, just so you can have a baseline to return to if something goes wrong. The [migration script](../../migration_scripts/add_time_based_encounters.py) makes a backup of the file ***each time it runs***, so it's essentially a one step undo button- if you plan on or think you might make lots of edits to [`wild_encounters.json`](../../src/data/wild_encounters.json), ***it is a very good idea to make a baseline backup***.
|
||||
|
||||
|
||||
### That's a lot of manual editing.
|
||||
You're so right bestie! Luckily for you, there's a python script that can help you out!
|
||||
The script is at [`migration_scripts/add_time_based_encounters.py`](../../migration_scripts/add_time_based_encounters.py). It, in order:
|
||||
1. Checks to make sure you're running it from the [root folder](../../) of your expansion project (specifically, wherever the project's [`Makefile`](../../Makefile) is)
|
||||
2. Makes a backup of your [`wild_encounters.json`](../../src/data/wild_encounters.json) file called `wild_encounters.json.bak`
|
||||
3. Runs through `wild_encounters.json` and adds dummy encounter groups for each time denomination to each group
|
||||
- ie, `gRoute101` becomes `gRoute101_Morning`, `gRoute101_Day`, `gRoute101_Evening`, and `gRoute101_Night`
|
||||
|
||||
This script works kind of like a "template" feature- when you open it up to edit either in Porymap or a text editor, you will see the encounter groups, but they won't be filled out with encounters. This lets you add Pokémon with your own encounter rates however you want.
|
||||
|
||||
### That's *still* a lot of editing.
|
||||
You're *still* so right bestie! Luckily for you, there's an optional argument you can add when you run the script: `--copy`.
|
||||
This duplicates the encounter group's encounters as well as their labels/map group values. When you open [`wild_encounters.json`](../../src/data/wild_encounters.json) for editing either in Porymap or a text editor, you'll notice that each group (`gRoute101_Morning`, `gRoute101_Day`, `gRoute101_Evening`, and `gRoute101_Night`) now all have the same encounters as `gRoute101` did. If you only want to add a couple of Pokémon here and there for each time of day, this is probably the easier option.
|
||||
|
||||
|
||||
> **NOTE**: the `--copy` option will use up at least an additional 9kb of ROM space. Obviously that's not much even for a GBA ROM, but it's something to keep in mind.
|
||||
|
||||
|
||||
## So what are the `#define` options in [`overworld.h`](../../include/config/overworld.h)?
|
||||
Great questie bestie!
|
||||
|
||||
Here's a rundown, with more information than what's in the comments at [`overworld.h`](../../include/config/overworld.h) and their default values:
|
||||
```
|
||||
OW_TIME_OF_DAY_ENCOUNTERS FALSE
|
||||
```
|
||||
- **Acceptable values**: `TRUE` or `FALSE`
|
||||
- this option enables or disables the feature. You'll notice your used ROM space changing when this is enabled or disabled, as the [json->C header conversion file](../../tools/wild_encounters/wild_encounters_to_header.py) will generate the `encounterTypes` array in [`wild_encounter.h`](../../include/wild_encounter.h) with different sizes based on whether this value is `TRUE` or `FALSE`.
|
||||
```
|
||||
OW_TIME_OF_DAY_DISABLE_FALLBACK FALSE
|
||||
```
|
||||
- **Acceptable values**: `TRUE` or `FALSE`
|
||||
- this option controls the behavior of the game when an encounter table isn't populated. If this is set to `TRUE`, whenever the game detects that you're in a time of day (Morning/Day/Evening/Night) on a map without any encounters for that time, you won't encounter any mons. If this is set to `FALSE`, the game will look for encounters at the time specified in the `OW_TIME_OF_DAY_FALLBACK` option below.
|
||||
```
|
||||
OW_TIME_OF_DAY_FALLBACK TIME_MORNING
|
||||
```
|
||||
- **Acceptable values**: any value from the [`TimesOfDay`](../../include/rtc.h) enum, so by default `TIME_MORNING`, `TIME_DAY`, `TIME_EVENING`, and `TIME_NIGHT`.
|
||||
- this option controls which time is used when `OW_TIME_OF_DAY_DISABLE_FALLBACK` is `FALSE`. Keep in mind that if you enable `OW_TIME_OF_DAY_ENCOUNTERS` and set this to something other than `TIME_MORNING`, you should make sure that time has encounters, or you won't encounter anything.
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
### Running the [migration script](../../migration_scripts/add_time_based_encounters.py) without the `--copy` option
|
||||
**Make sure you run this from the [root folder](../../) of your project!**
|
||||
|
||||
```
|
||||
python3 migration_scripts/add_time_based_encounters.py
|
||||
```
|
||||
|
||||
#### Result:
|
||||
```json
|
||||
"encounters": [
|
||||
{
|
||||
"map": "MAP_ROUTE101",
|
||||
"base_label": "gRoute101_Morning",
|
||||
"land_mons": {
|
||||
"encounter_rate": 20,
|
||||
"mons": [
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"map": "MAP_ROUTE101",
|
||||
"base_label": "gRoute101_Day"
|
||||
},
|
||||
{
|
||||
"map": "MAP_ROUTE101",
|
||||
"base_label": "gRoute101_Evening"
|
||||
},
|
||||
{
|
||||
"map": "MAP_ROUTE101",
|
||||
"base_label": "gRoute101_Night"
|
||||
},
|
||||
]
|
||||
```
|
||||
As you can see, the names change, but the encounters aren't touched, so you're free to add your own, piecemeal style. If you don't have any encounters for a map and time, the game will use `OW_TIME_OF_DAY_FALLBACK` *if* `OW_TIME_OF_DAY_DISABLE_FALLBACK` is `FALSE`; otherwise, you won't encounter anything.
|
||||
|
||||
### Running the [migration script](../../migration_scripts/add_time_based_encounters.py) with the `--copy` option
|
||||
**Make sure you run this from the [root folder](../../) of your project!**
|
||||
|
||||
```
|
||||
python3 migration_scripts/add_time_based_encounters.py --copy
|
||||
```
|
||||
|
||||
#### Result:
|
||||
```json
|
||||
"encounters": [
|
||||
{
|
||||
"map": "MAP_ROUTE101",
|
||||
"base_label": "gRoute101_Morning",
|
||||
"land_mons": {
|
||||
"encounter_rate": 20,
|
||||
"mons": [
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"map": "MAP_ROUTE101",
|
||||
"base_label": "gRoute101_Day",
|
||||
"land_mons": {
|
||||
"encounter_rate": 20,
|
||||
"mons": [
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"map": "MAP_ROUTE101",
|
||||
"base_label": "gRoute101_Evening",
|
||||
"land_mons": {
|
||||
"encounter_rate": 20,
|
||||
"mons": [
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"map": "MAP_ROUTE101",
|
||||
"base_label": "gRoute101_Night",
|
||||
"land_mons": {
|
||||
"encounter_rate": 20,
|
||||
"mons": [
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_WURMPLE"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_POOCHYENA"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 2,
|
||||
"max_level": 2,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
},
|
||||
{
|
||||
"min_level": 3,
|
||||
"max_level": 3,
|
||||
"species": "SPECIES_ZIGZAGOON"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
]
|
||||
```
|
||||
As you can see, the group `gRoute101` and all its encounters were copied into groups that correspond with the four vanilla times of day (Morning/Day/Evening/Night).
|
||||
BIN
docs/tutorials/img/add_pokemon/charizard.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
docs/tutorials/img/add_pokemon/dex1.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
docs/tutorials/img/add_pokemon/dex2.gif
Normal file
|
After Width: | Height: | Size: 143 KiB |
BIN
docs/tutorials/img/add_pokemon/gender_diffs.gif
Normal file
|
After Width: | Height: | Size: 132 KiB |
BIN
docs/tutorials/img/add_pokemon/hgssdex1.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
docs/tutorials/img/add_pokemon/hgssdex2.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
docs/tutorials/img/add_pokemon/overworld_data.gif
Normal file
|
After Width: | Height: | Size: 319 KiB |
BIN
docs/tutorials/img/add_pokemon/visualizer1.gif
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
docs/tutorials/img/add_pokemon/visualizer2.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.3 KiB |
19
graphics/object_events/palettes/light.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
110 198 165
|
||||
64 61 42
|
||||
77 73 50
|
||||
85 81 58
|
||||
100 94 66
|
||||
111 105 75
|
||||
119 112 77
|
||||
140 131 92
|
||||
154 145 103
|
||||
171 159 111
|
||||
186 174 123
|
||||
197 183 128
|
||||
209 195 139
|
||||
224 209 146
|
||||
234 219 155
|
||||
249 232 161
|
||||
19
graphics/object_events/palettes/light2.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
106 202 166
|
||||
58 54 31
|
||||
67 62 33
|
||||
96 89 53
|
||||
110 102 57
|
||||
121 111 67
|
||||
128 119 66
|
||||
156 143 82
|
||||
166 155 96
|
||||
185 169 100
|
||||
199 183 112
|
||||
211 192 113
|
||||
223 203 123
|
||||
237 218 129
|
||||
247 227 137
|
||||
255 237 147
|
||||
19
graphics/object_events/palettes/neon_light.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
104 203 168
|
||||
19 48 64
|
||||
35 87 115
|
||||
58 132 140
|
||||
69 156 166
|
||||
77 193 254
|
||||
106 239 254
|
||||
27 68 89
|
||||
64 22 19
|
||||
115 39 34
|
||||
166 57 49
|
||||
191 66 57
|
||||
222 77 67
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 6.1 KiB |
BIN
graphics/object_events/pics/misc/mart_light.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
graphics/object_events/pics/misc/poke_center_light.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
@ -85,12 +85,12 @@ struct DisableStruct
|
||||
s8 stockpileBeforeSpDef;
|
||||
u8 substituteHP;
|
||||
u8 encoredMovePos;
|
||||
u8 disableTimer:4;
|
||||
u8 encoreTimer:4;
|
||||
u8 perishSongTimer:4;
|
||||
u8 rolloutTimer:4;
|
||||
u8 rolloutTimerStartValue:4;
|
||||
u8 tauntTimer:4;
|
||||
u16 disableTimer;
|
||||
u16 encoreTimer;
|
||||
u16 perishSongTimer;
|
||||
u16 rolloutTimer;
|
||||
u16 rolloutTimerStartValue;
|
||||
u16 tauntTimer;
|
||||
u8 furyCutterCounter;
|
||||
u8 battlerPreventingEscape;
|
||||
u8 battlerWithSureHit;
|
||||
@ -99,16 +99,16 @@ struct DisableStruct
|
||||
u8 chargeTimer:4;
|
||||
u8 rechargeTimer;
|
||||
u8 autotomizeCount;
|
||||
u8 slowStartTimer;
|
||||
u8 embargoTimer;
|
||||
u8 magnetRiseTimer;
|
||||
u8 telekinesisTimer;
|
||||
u8 healBlockTimer;
|
||||
u8 laserFocusTimer;
|
||||
u8 throatChopTimer;
|
||||
u16 slowStartTimer;
|
||||
u16 embargoTimer;
|
||||
u16 magnetRiseTimer;
|
||||
u16 telekinesisTimer;
|
||||
u16 healBlockTimer;
|
||||
u16 laserFocusTimer;
|
||||
u16 throatChopTimer;
|
||||
u8 wrapTurns;
|
||||
u8 syrupBombTimer;
|
||||
u8 tormentTimer:4; // used for G-Max Meltdown
|
||||
u16 syrupBombTimer;
|
||||
u16 tormentTimer; // used for G-Max Meltdown
|
||||
u8 usedMoves:4;
|
||||
u8 truantCounter:1;
|
||||
u8 truantSwitchInHack:1;
|
||||
@ -146,7 +146,7 @@ struct ProtectStruct
|
||||
u32 stealMove:1;
|
||||
u32 prlzImmobility:1;
|
||||
u32 confusionSelfDmg:1;
|
||||
u32 targetAffected:1;
|
||||
u32 touchedProtectLike:1;
|
||||
u32 chargingTurn:1;
|
||||
u32 fleeType:2; // 0: Normal, 1: FLEE_ITEM, 2: FLEE_ABILITY
|
||||
u32 usedImprisonedMove:1;
|
||||
@ -164,7 +164,6 @@ struct ProtectStruct
|
||||
u32 statRaised:1;
|
||||
u32 usedCustapBerry:1; // also quick claw
|
||||
// End of 32-bit bitfield
|
||||
u16 touchedProtectLike:1;
|
||||
u16 disableEjectPack:1;
|
||||
u16 statFell:1;
|
||||
u16 pranksterElevated:1;
|
||||
@ -175,6 +174,7 @@ struct ProtectStruct
|
||||
u16 eatMirrorHerb:1;
|
||||
u16 activateOpportunist:2; // 2 - to copy stats. 1 - stats copied (do not repeat). 0 - no stats to copy
|
||||
u16 usedAllySwitch:1;
|
||||
u16 lashOutAffected:1;
|
||||
u16 padding:4;
|
||||
// End of 16-bit bitfield
|
||||
u16 physicalDmg;
|
||||
@ -193,7 +193,7 @@ struct SpecialStatus
|
||||
u8 lightningRodRedirected:1;
|
||||
u8 restoredBattlerSprite: 1;
|
||||
u8 faintedHasReplacement:1;
|
||||
u8 emergencyExited:1;
|
||||
u8 preventLifeOrbDamage:1; // So that Life Orb doesn't activate various effects.
|
||||
u8 afterYou:1;
|
||||
u8 enduredDamage:1;
|
||||
u8 stormDrainRedirected:1;
|
||||
@ -217,8 +217,7 @@ struct SpecialStatus
|
||||
// End of byte
|
||||
u8 dancerUsedMove:1;
|
||||
u8 dancerOriginalTarget:3;
|
||||
u8 preventLifeOrbDamage:1; // So that Life Orb doesn't activate various effects.
|
||||
u8 unused:3;
|
||||
u8 unused:4;
|
||||
// End of byte
|
||||
};
|
||||
|
||||
@ -271,7 +270,7 @@ struct FieldTimer
|
||||
|
||||
struct WishFutureKnock
|
||||
{
|
||||
u8 futureSightCounter[MAX_BATTLERS_COUNT];
|
||||
u16 futureSightCounter[MAX_BATTLERS_COUNT];
|
||||
u8 futureSightBattlerIndex[MAX_BATTLERS_COUNT];
|
||||
u8 futureSightPartyIndex[MAX_BATTLERS_COUNT];
|
||||
u16 futureSightMove[MAX_BATTLERS_COUNT];
|
||||
@ -398,6 +397,7 @@ struct BattleCallbacksStack
|
||||
struct StatsArray
|
||||
{
|
||||
u16 stats[NUM_STATS];
|
||||
u16 level;
|
||||
};
|
||||
|
||||
struct BattleResources
|
||||
@ -559,7 +559,7 @@ struct ZMoveData
|
||||
|
||||
struct DynamaxData
|
||||
{
|
||||
u8 dynamaxTurns[MAX_BATTLERS_COUNT];
|
||||
u16 dynamaxTurns[MAX_BATTLERS_COUNT];
|
||||
u16 baseMoves[MAX_BATTLERS_COUNT]; // base move of Max Move
|
||||
u16 lastUsedBaseMove;
|
||||
};
|
||||
@ -636,9 +636,9 @@ struct BattlerState
|
||||
struct BattleStruct
|
||||
{
|
||||
struct BattlerState battlerState[MAX_BATTLERS_COUNT];
|
||||
u8 turnEffectsTracker;
|
||||
u8 eventBlockCounter;
|
||||
u8 turnEffectsBattlerId;
|
||||
u8 turnCountersTracker;
|
||||
u8 endTurnEventsCounter;
|
||||
u16 wrappedMove[MAX_BATTLERS_COUNT];
|
||||
u16 moveTarget[MAX_BATTLERS_COUNT];
|
||||
u32 expShareExpValue;
|
||||
@ -709,8 +709,6 @@ struct BattleStruct
|
||||
struct LinkBattlerHeader linkBattlerHeader;
|
||||
struct BattleVideo battleVideo;
|
||||
} multiBuffer;
|
||||
u8 wishPerishSongState;
|
||||
u8 wishPerishSongBattlerId;
|
||||
u8 startingStatus:6; // status to apply at battle start. defined in constants/battle.h
|
||||
u8 startingStatusDone:1;
|
||||
u8 terrainDone:1;
|
||||
@ -720,7 +718,7 @@ struct BattleStruct
|
||||
u8 friskedAbility:1; // If identifies two mons, show the ability pop-up only once.
|
||||
u8 fickleBeamBoosted:1;
|
||||
u8 poisonPuppeteerConfusion:1;
|
||||
u8 startingStatusTimer;
|
||||
u16 startingStatusTimer;
|
||||
u8 atkCancellerTracker;
|
||||
struct BattleTvMovePoints tvMovePoints;
|
||||
struct BattleTv tv;
|
||||
@ -773,17 +771,17 @@ struct BattleStruct
|
||||
// When using a move which hits multiple opponents which is then bounced by a target, we need to make sure, the move hits both opponents, the one with bounce, and the one without.
|
||||
u8 attackerBeforeBounce:2;
|
||||
u8 beatUpSlot:3;
|
||||
u8 hitSwitchTargetFailed:1;
|
||||
u8 pledgeMove:1;
|
||||
u8 effectsBeforeUsingMoveDone:1; // Mega Evo and Focus Punch/Shell Trap effects.
|
||||
u8 spriteIgnore0Hp:1;
|
||||
u8 battleBondBoost[NUM_BATTLE_SIDES]; // Bitfield for each party.
|
||||
u8 bonusCritStages[MAX_BATTLERS_COUNT]; // G-Max Chi Strike boosts crit stages of allies.
|
||||
u8 itemPartyIndex[MAX_BATTLERS_COUNT];
|
||||
u8 itemMoveIndex[MAX_BATTLERS_COUNT];
|
||||
u8 pledgeMove:1;
|
||||
u8 isSkyBattle:1;
|
||||
u32 aiDelayTimer; // Counts number of frames AI takes to choose an action.
|
||||
u32 aiDelayFrames; // Number of frames it took to choose an action.
|
||||
s32 aiDelayTimer; // Counts number of frames AI takes to choose an action.
|
||||
s32 aiDelayFrames; // Number of frames it took to choose an action.
|
||||
s32 aiDelayCycles; // Number of cycles it took to choose an action.
|
||||
u8 timesGotHit[NUM_BATTLE_SIDES][PARTY_SIZE];
|
||||
u8 transformZeroToHero[NUM_BATTLE_SIDES];
|
||||
u8 stickySyrupdBy[MAX_BATTLERS_COUNT];
|
||||
@ -819,8 +817,6 @@ struct BattleStruct
|
||||
u8 usedMicleBerry;
|
||||
struct MessageStatus slideMessageStatus;
|
||||
u8 trainerSlideSpriteIds[MAX_BATTLERS_COUNT];
|
||||
u8 embodyAspectBoost[NUM_BATTLE_SIDES];
|
||||
u16 savedMove; // backup current move for mid-turn switching, e.g. Red Card
|
||||
u16 opponentMonCanTera:6;
|
||||
u16 opponentMonCanDynamax:6;
|
||||
u16 padding:4;
|
||||
@ -1279,4 +1275,3 @@ static inline bool32 IsBattlerInvalidForSpreadMove(u32 battlerAtk, u32 battlerDe
|
||||
}
|
||||
|
||||
#endif // GUARD_BATTLE_H
|
||||
|
||||
|
||||
@ -16,31 +16,35 @@ typedef s32 (*AiScoreFunc)(u32, u32, u32, s32);
|
||||
#define AI_IS_SLOWER -1
|
||||
|
||||
// for stat increasing / decreasing scores
|
||||
#define STAT_CHANGE_ATK 0
|
||||
#define STAT_CHANGE_DEF 1
|
||||
#define STAT_CHANGE_SPEED 2
|
||||
#define STAT_CHANGE_SPATK 3
|
||||
#define STAT_CHANGE_SPDEF 4
|
||||
|
||||
#define STAT_CHANGE_ATK_2 5
|
||||
#define STAT_CHANGE_DEF_2 6
|
||||
#define STAT_CHANGE_SPEED_2 7
|
||||
#define STAT_CHANGE_SPATK_2 8
|
||||
#define STAT_CHANGE_SPDEF_2 9
|
||||
|
||||
#define STAT_CHANGE_ACC 10
|
||||
#define STAT_CHANGE_EVASION 11
|
||||
enum StatChange
|
||||
{
|
||||
STAT_CHANGE_ATK,
|
||||
STAT_CHANGE_DEF,
|
||||
STAT_CHANGE_SPEED,
|
||||
STAT_CHANGE_SPATK,
|
||||
STAT_CHANGE_SPDEF,
|
||||
STAT_CHANGE_ATK_2,
|
||||
STAT_CHANGE_DEF_2,
|
||||
STAT_CHANGE_SPEED_2,
|
||||
STAT_CHANGE_SPATK_2,
|
||||
STAT_CHANGE_SPDEF_2,
|
||||
STAT_CHANGE_ACC,
|
||||
STAT_CHANGE_EVASION
|
||||
};
|
||||
|
||||
#define BEST_DAMAGE_MOVE 1 // Move with the most amount of hits with the best accuracy/effect
|
||||
#define POWERFUL_STATUS_MOVE 10 // Moves with this score will be chosen over a move that faints target
|
||||
#define NO_DAMAGE_OR_FAILS -20 // Move fails or does no damage
|
||||
|
||||
// Scores given in AI_CalcMoveEffectScore and AI_CalcHoldEffectMoveScore
|
||||
#define NO_INCREASE 0
|
||||
#define WEAK_EFFECT 1
|
||||
#define DECENT_EFFECT 2
|
||||
#define GOOD_EFFECT 3
|
||||
#define BEST_EFFECT 4
|
||||
enum AIScore
|
||||
{
|
||||
NO_INCREASE = 0,
|
||||
WEAK_EFFECT = 1,
|
||||
DECENT_EFFECT = 2,
|
||||
GOOD_EFFECT = 3,
|
||||
BEST_EFFECT = 4
|
||||
};
|
||||
|
||||
// AI_TryToFaint
|
||||
#define FAST_KILL 6 // AI is faster and faints target
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
#ifndef GUARD_BATTLE_AI_UTIL_H
|
||||
#define GUARD_BATTLE_AI_UTIL_H
|
||||
|
||||
#include "battle_ai_main.h"
|
||||
|
||||
#define FOE(battler) ((BATTLE_OPPOSITE(battler)) & BIT_SIDE)
|
||||
|
||||
// Roll boundaries used by AI when scoring. Doesn't affect actual damage dealt.
|
||||
@ -69,7 +71,7 @@ u32 GetBestDmgFromBattler(u32 battler, u32 battlerTarget, enum DamageCalcContext
|
||||
bool32 CanTargetMoveFaintAi(u32 move, u32 battlerDef, u32 battlerAtk, u32 nHits);
|
||||
bool32 CanTargetFaintAiWithMod(u32 battlerDef, u32 battlerAtk, s32 hpMod, s32 dmgMod);
|
||||
s32 AI_DecideKnownAbilityForTurn(u32 battlerId);
|
||||
u32 AI_DecideHoldEffectForTurn(u32 battlerId);
|
||||
enum ItemHoldEffect AI_DecideHoldEffectForTurn(u32 battlerId);
|
||||
bool32 DoesBattlerIgnoreAbilityChecks(u32 battlerAtk, u32 atkAbility, u32 move);
|
||||
u32 AI_GetWeather(void);
|
||||
bool32 CanAIFaintTarget(u32 battlerAtk, u32 battlerDef, u32 numHits);
|
||||
@ -85,7 +87,7 @@ bool32 ShouldUseRecoilMove(u32 battlerAtk, u32 battlerDef, u32 recoilDmg, u32 mo
|
||||
u32 GetBattlerSideSpeedAverage(u32 battler);
|
||||
bool32 ShouldAbsorb(u32 battlerAtk, u32 battlerDef, u32 move, s32 damage);
|
||||
bool32 ShouldRecover(u32 battlerAtk, u32 battlerDef, u32 move, u32 healPercent, enum DamageCalcContext calcContext);
|
||||
bool32 ShouldSetScreen(u32 battlerAtk, u32 battlerDef, u32 moveEffect);
|
||||
bool32 ShouldSetScreen(u32 battlerAtk, u32 battlerDef, enum BattleMoveEffects moveEffect);
|
||||
enum AIPivot ShouldPivot(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 move, u32 moveIndex);
|
||||
bool32 IsRecycleEncouragedItem(u32 item);
|
||||
bool32 ShouldRestoreHpBerry(u32 battlerAtk, u32 item);
|
||||
@ -93,7 +95,7 @@ bool32 IsStatBoostingBerry(u32 item);
|
||||
bool32 CanKnockOffItem(u32 battler, u32 item);
|
||||
bool32 IsAbilityOfRating(u32 ability, s8 rating);
|
||||
bool32 AI_IsAbilityOnSide(u32 battlerId, u32 ability);
|
||||
bool32 AI_MoveMakesContact(u32 ability, u32 holdEffect, u32 move);
|
||||
bool32 AI_MoveMakesContact(u32 ability, enum ItemHoldEffect holdEffect, u32 move);
|
||||
bool32 ShouldUseZMove(u32 battlerAtk, u32 battlerDef, u32 chosenMove);
|
||||
u32 AI_GetBattlerAbility(u32 battler);
|
||||
|
||||
@ -113,7 +115,7 @@ bool32 ShouldLowerAccuracy(u32 battlerAtk, u32 battlerDef, u32 defAbility);
|
||||
bool32 ShouldLowerEvasion(u32 battlerAtk, u32 battlerDef, u32 defAbility);
|
||||
|
||||
// move checks
|
||||
bool32 IsAffectedByPowder(u32 battler, u32 ability, u32 holdEffect);
|
||||
bool32 IsAffectedByPowder(u32 battler, u32 ability, enum ItemHoldEffect holdEffect);
|
||||
bool32 MovesWithCategoryUnusable(u32 attacker, u32 target, u32 category);
|
||||
s32 AI_WhichMoveBetter(u32 move1, u32 move2, u32 battlerAtk, u32 battlerDef, s32 noOfHitsToKo);
|
||||
struct SimulatedDamage AI_CalcDamageSaveBattlers(u32 move, u32 battlerAtk, u32 battlerDef, uq4_12_t *typeEffectiveness, bool32 considerZPower);
|
||||
@ -125,31 +127,31 @@ u32 GetNoOfHitsToKOBattler(u32 battlerAtk, u32 battlerDef, u32 moveIndex, enum D
|
||||
u32 GetCurrDamageHpPercent(u32 battlerAtk, u32 battlerDef, enum DamageCalcContext calcContext);
|
||||
uq4_12_t AI_GetMoveEffectiveness(u32 move, u32 battlerAtk, u32 battlerDef);
|
||||
u16 *GetMovesArray(u32 battler);
|
||||
bool32 IsConfusionMoveEffect(u32 moveEffect);
|
||||
bool32 IsConfusionMoveEffect(enum BattleMoveEffects moveEffect);
|
||||
bool32 HasMove(u32 battlerId, u32 move);
|
||||
bool32 HasOnlyMovesWithCategory(u32 battlerId, u32 category, bool32 onlyOffensive);
|
||||
bool32 HasMoveWithCategory(u32 battler, u32 category);
|
||||
bool32 HasMoveWithType(u32 battler, u32 type);
|
||||
bool32 HasMoveEffect(u32 battlerId, u32 moveEffect);
|
||||
bool32 IsPowerBasedOnStatus(u32 battlerId, u32 effect, u32 argument);
|
||||
bool32 HasMoveEffect(u32 battlerId, enum BattleMoveEffects moveEffect);
|
||||
bool32 IsPowerBasedOnStatus(u32 battlerId, enum BattleMoveEffects effect, u32 argument);
|
||||
bool32 HasMoveWithAdditionalEffect(u32 battlerId, u32 moveEffect);
|
||||
bool32 HasMoveWithCriticalHitChance(u32 battlerId);
|
||||
bool32 HasMoveWithMoveEffectExcept(u32 battlerId, u32 moveEffect, u32 exception);
|
||||
bool32 HasMoveWithMoveEffectExcept(u32 battlerId, u32 moveEffect, enum BattleMoveEffects exception);
|
||||
bool32 HasMoveThatLowersOwnStats(u32 battlerId);
|
||||
bool32 HasMoveWithLowAccuracy(u32 battlerAtk, u32 battlerDef, u32 accCheck, bool32 ignoreStatus, u32 atkAbility, u32 defAbility, u32 atkHoldEffect, u32 defHoldEffect);
|
||||
bool32 HasAnyKnownMove(u32 battlerId);
|
||||
bool32 IsAromaVeilProtectedEffect(u32 moveEffect);
|
||||
bool32 IsNonVolatileStatusMoveEffect(u32 moveEffect);
|
||||
bool32 IsAromaVeilProtectedEffect(enum BattleMoveEffects moveEffect);
|
||||
bool32 IsNonVolatileStatusMoveEffect(enum BattleMoveEffects moveEffect);
|
||||
bool32 IsMoveRedirectionPrevented(u32 battlerAtk, u32 move, u32 atkAbility);
|
||||
bool32 IsMoveEncouragedToHit(u32 battlerAtk, u32 battlerDef, u32 move);
|
||||
bool32 IsHazardMove(u32 move);
|
||||
bool32 IsTwoTurnNotSemiInvulnerableMove(u32 battlerAtk, u32 move);
|
||||
void ProtectChecks(u32 battlerAtk, u32 battlerDef, u32 move, u32 predictedMove, s32 *score);
|
||||
bool32 ShouldSetSandstorm(u32 battler, u32 ability, u32 holdEffect);
|
||||
bool32 ShouldSetHail(u32 battler, u32 ability, u32 holdEffect);
|
||||
bool32 ShouldSetSnow(u32 battler, u32 ability, u32 holdEffect);
|
||||
bool32 ShouldSetRain(u32 battlerAtk, u32 ability, u32 holdEffect);
|
||||
bool32 ShouldSetSun(u32 battlerAtk, u32 atkAbility, u32 holdEffect);
|
||||
bool32 ShouldSetSandstorm(u32 battler, u32 ability, enum ItemHoldEffect holdEffect);
|
||||
bool32 ShouldSetHail(u32 battler, u32 ability, enum ItemHoldEffect holdEffect);
|
||||
bool32 ShouldSetSnow(u32 battler, u32 ability, enum ItemHoldEffect holdEffect);
|
||||
bool32 ShouldSetRain(u32 battlerAtk, u32 ability, enum ItemHoldEffect holdEffect);
|
||||
bool32 ShouldSetSun(u32 battlerAtk, u32 atkAbility, enum ItemHoldEffect holdEffect);
|
||||
bool32 HasSleepMoveWithLowAccuracy(u32 battlerAtk, u32 battlerDef);
|
||||
bool32 IsHealingMove(u32 move);
|
||||
bool32 HasHealingEffect(u32 battler);
|
||||
@ -157,31 +159,33 @@ bool32 IsTrappingMove(u32 move);
|
||||
bool32 HasTrappingMoveEffect(u32 battler);
|
||||
bool32 ShouldFakeOut(u32 battlerAtk, u32 battlerDef, u32 move);
|
||||
bool32 HasThawingMove(u32 battler);
|
||||
bool32 IsStatRaisingEffect(u32 effect);
|
||||
bool32 IsStatLoweringEffect(u32 effect);
|
||||
bool32 IsSelfStatLoweringEffect(u32 effect);
|
||||
bool32 IsSwitchOutEffect(u32 effect);
|
||||
bool32 IsChaseEffect(u32 effect);
|
||||
bool32 IsAttackBoostMoveEffect(u32 effect);
|
||||
bool32 IsUngroundingEffect(u32 effect);
|
||||
bool32 IsStatRaisingEffect(enum BattleMoveEffects effect);
|
||||
bool32 IsStatLoweringEffect(enum BattleMoveEffects effect);
|
||||
bool32 IsSelfStatLoweringEffect(enum BattleMoveEffects effect);
|
||||
bool32 IsSwitchOutEffect(enum BattleMoveEffects effect);
|
||||
bool32 IsChaseEffect(enum BattleMoveEffects effect);
|
||||
bool32 IsAttackBoostMoveEffect(enum BattleMoveEffects effect);
|
||||
bool32 IsUngroundingEffect(enum BattleMoveEffects effect);
|
||||
bool32 IsSemiInvulnerable(u32 battlerDef, u32 move);
|
||||
bool32 HasSubstituteIgnoringMove(u32 battler);
|
||||
bool32 HasHighCritRatioMove(u32 battler);
|
||||
bool32 HasMagicCoatAffectedMove(u32 battler);
|
||||
bool32 HasSnatchAffectedMove(u32 battler);
|
||||
bool32 IsHazardClearingMove(u32 move);
|
||||
bool32 IsSubstituteEffect(u32 effect);
|
||||
bool32 IsSubstituteEffect(enum BattleMoveEffects effect);
|
||||
|
||||
// status checks
|
||||
bool32 AI_CanGetFrostbite(u32 battler, u32 ability);
|
||||
bool32 AI_CanBeConfused(u32 battlerAtk, u32 battlerDef, u32 move, u32 ability);
|
||||
bool32 IsBattlerIncapacitated(u32 battler, u32 ability);
|
||||
bool32 AI_CanPutToSleep(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 move, u32 partnerMove);
|
||||
bool32 ShouldPoisonSelf(u32 battler, u32 ability);
|
||||
bool32 ShouldPoison(u32 battlerAtk, u32 battlerDef);
|
||||
bool32 AI_CanPoison(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 move, u32 partnerMove);
|
||||
bool32 AI_CanParalyze(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 move, u32 partnerMove);
|
||||
bool32 AI_CanConfuse(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 battlerAtkPartner, u32 move, u32 partnerMove);
|
||||
bool32 ShouldBurnSelf(u32 battler, u32 ability);
|
||||
bool32 ShouldBurn(u32 battlerAtk, u32 battlerDef);
|
||||
bool32 ShouldFreezeOrFrostbite(u32 battlerAtk, u32 battlerDef);
|
||||
bool32 ShouldParalyze(u32 battlerAtk, u32 battlerDef);
|
||||
bool32 AI_CanBurn(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 battlerAtkPartner, u32 move, u32 partnerMove);
|
||||
bool32 AI_CanGiveFrostbite(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 battlerAtkPartner, u32 move, u32 partnerMove);
|
||||
bool32 AI_CanBeInfatuated(u32 battlerAtk, u32 battlerDef, u32 defAbility);
|
||||
@ -200,7 +204,7 @@ bool32 PartnerHasSameMoveEffectWithoutTarget(u32 battlerAtkPartner, u32 move, u3
|
||||
bool32 PartnerMoveEffectIsStatusSameTarget(u32 battlerAtkPartner, u32 battlerDef, u32 partnerMove);
|
||||
bool32 IsMoveEffectWeather(u32 move);
|
||||
bool32 PartnerMoveEffectIsTerrain(u32 battlerAtkPartner, u32 partnerMove);
|
||||
bool32 PartnerMoveEffectIs(u32 battlerAtkPartner, u32 partnerMove, u32 effectCheck);
|
||||
bool32 PartnerMoveEffectIs(u32 battlerAtkPartner, u32 partnerMove, enum BattleMoveEffects effectCheck);
|
||||
bool32 PartnerMoveIs(u32 battlerAtkPartner, u32 partnerMove, u32 moveCheck);
|
||||
bool32 PartnerMoveIsSameAsAttacker(u32 battlerAtkPartner, u32 battlerDef, u32 move, u32 partnerMove);
|
||||
bool32 PartnerMoveIsSameNoTarget(u32 battlerAtkPartner, u32 move, u32 partnerMove);
|
||||
@ -216,8 +220,8 @@ bool32 PartyHasMoveCategory(u32 battlerId, u32 category);
|
||||
bool32 SideHasMoveCategory(u32 battlerId, u32 category);
|
||||
|
||||
// score increases
|
||||
u32 IncreaseStatUpScore(u32 battlerAtk, u32 battlerDef, u32 statId);
|
||||
u32 IncreaseStatUpScoreContrary(u32 battlerAtk, u32 battlerDef, u32 statId);
|
||||
u32 IncreaseStatUpScore(u32 battlerAtk, u32 battlerDef, enum StatChange statId);
|
||||
u32 IncreaseStatUpScoreContrary(u32 battlerAtk, u32 battlerDef, enum StatChange statId);
|
||||
void IncreasePoisonScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
|
||||
void IncreaseBurnScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
|
||||
void IncreaseParalyzeScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
|
||||
|
||||
@ -38,7 +38,7 @@ struct BattleAnimBgData
|
||||
struct BattleAnimBackground
|
||||
{
|
||||
const u32 *image;
|
||||
const u32 *palette;
|
||||
const u16 *palette;
|
||||
const u32 *tilemap;
|
||||
};
|
||||
|
||||
@ -240,7 +240,7 @@ bool32 IsCriticalCapture(void);
|
||||
|
||||
// battle_anim_utility_funcs.c
|
||||
void InitStatsChangeAnimation(u8);
|
||||
void StartMonScrollingBgMask(u8 taskId, int unused, u16 scrollSpeed, u8 battler, bool8 includePartner, u8 numFadeSteps, u8 fadeStepDelay, u8 duration, const u32 *gfx, const u32 *tilemap, const u32 *palette);
|
||||
void StartMonScrollingBgMask(u8 taskId, int unused, u16 scrollSpeed, u8 battler, bool8 includePartner, u8 numFadeSteps, u8 fadeStepDelay, u8 duration, const u32 *gfx, const u32 *tilemap, const u16 *palette);
|
||||
|
||||
// battle_anim_effects_1.c
|
||||
void AnimFalseSwipeSlice_Step3(struct Sprite *);
|
||||
@ -434,7 +434,7 @@ extern const struct OamData gOamData_AffineOff_ObjBlend_16x32;
|
||||
extern const struct OamData gOamData_AffineDouble_ObjBlend_32x8;
|
||||
|
||||
extern const struct CompressedSpriteSheet gBattleAnimPicTable[];
|
||||
extern const struct CompressedSpritePalette gBattleAnimPaletteTable[];
|
||||
extern const struct SpritePalette gBattleAnimPaletteTable[];
|
||||
|
||||
extern const struct SpriteTemplate gWaterHitSplatSpriteTemplate;
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state);
|
||||
void BattleArena_InitPoints(void);
|
||||
void BattleArena_AddMindPoints(u8 battler);
|
||||
void BattleArena_AddSkillPoints(u8 battler);
|
||||
void BattleArena_DeductSkillPoints(u8 battler, u16 stringId);
|
||||
void BattleArena_DeductSkillPoints(u8 battler, enum StringID stringId);
|
||||
void DrawArenaRefereeTextBox(void);
|
||||
void EraseArenaRefereeTextBox(void);
|
||||
|
||||
|
||||
@ -214,8 +214,8 @@ void BtlController_EmitTrainerSlideBack(u32 battler, u32 bufferId);
|
||||
void BtlController_EmitFaintAnimation(u32 battler, u32 bufferId);
|
||||
void BtlController_EmitBallThrowAnim(u32 battler, u32 bufferId, u8 caseId);
|
||||
void BtlController_EmitMoveAnimation(u32 battler, u32 bufferId, u16 move, u8 turnOfMove, u16 movePower, s32 dmg, u8 friendship, struct DisableStruct *disableStructPtr, u8 multihit);
|
||||
void BtlController_EmitPrintString(u32 battler, u32 bufferId, u16 stringId);
|
||||
void BtlController_EmitPrintSelectionString(u32 battler, u32 bufferId, u16 stringId);
|
||||
void BtlController_EmitPrintString(u32 battler, u32 bufferId, enum StringID stringId);
|
||||
void BtlController_EmitPrintSelectionString(u32 battler, u32 bufferId, enum StringID stringId);
|
||||
void BtlController_EmitChooseAction(u32 battler, u32 bufferId, u8 action, u16 itemId);
|
||||
void BtlController_EmitYesNoBox(u32 battler, u32 bufferId);
|
||||
void BtlController_EmitChooseMove(u32 battler, u32 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct *movePpData);
|
||||
@ -287,7 +287,7 @@ void BtlController_HandleIntroSlide(u32 battler);
|
||||
void BtlController_HandleSpriteInvisibility(u32 battler);
|
||||
bool32 TwoPlayerIntroMons(u32 battlerId); // Double battle with both player pokemon active.
|
||||
bool32 TwoOpponentIntroMons(u32 battlerId); // Double battle with both opponent pokemon active.
|
||||
void BtlController_HandleIntroTrainerBallThrow(u32 battler, u16 tagTrainerPal, const u32 *trainerPal, s16 framesToWait, void (*controllerCallback)(u32 battler));
|
||||
void BtlController_HandleIntroTrainerBallThrow(u32 battler, u16 tagTrainerPal, const u16 *trainerPal, s16 framesToWait, void (*controllerCallback)(u32 battler));
|
||||
void BtlController_HandleDrawPartyStatusSummary(u32 battler, u32 side, bool32 considerDelay);
|
||||
void BtlController_HandleHidePartyStatusSummary(u32 battler);
|
||||
void BtlController_HandleBattleAnimation(u32 battler, bool32 ignoreSE, bool32 updateTvData);
|
||||
|
||||
7
include/battle_end_turn.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef GUARD_BATTLE_END_TURN
|
||||
#define GUARD_BATTLE_END_TURN
|
||||
|
||||
u32 DoEndTurnEffects(void);
|
||||
|
||||
#endif // GUARD_BATTLE_END_TURN
|
||||
|
||||
@ -17,8 +17,8 @@ struct GimmickInfo
|
||||
const struct SpritePalette *triggerPal; // trigger gfx data
|
||||
const struct SpriteSheet *triggerSheet;
|
||||
const struct SpriteTemplate *triggerTemplate;
|
||||
const struct SpritePalette *indicatorPal; // indicator gfx data
|
||||
const struct SpriteSheet *indicatorSheet;
|
||||
const u32 indicatorPalTag;
|
||||
const u8 *indicatorData;
|
||||
bool32 (*CanActivate)(u32 battler);
|
||||
void (*ActivateGimmick)(u32 battler);
|
||||
};
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
#include "pokemon.h"
|
||||
#include "data.h"
|
||||
#include "constants/hold_effects.h"
|
||||
|
||||
// For displaying a multi battle partner's Pokémon in the party menu
|
||||
struct MultiPartnerMenuPokemon
|
||||
@ -69,12 +70,12 @@ u8 IsRunningFromBattleImpossible(u32 battler);
|
||||
void SwitchTwoBattlersInParty(u32 battler, u32 battler2);
|
||||
void SwitchPartyOrder(u32 battlerId);
|
||||
void SwapTurnOrder(u8 id1, u8 id2);
|
||||
u32 GetBattlerTotalSpeedStatArgs(u32 battler, u32 ability, u32 holdEffect);
|
||||
u32 GetBattlerTotalSpeedStatArgs(u32 battler, u32 ability, enum ItemHoldEffect holdEffect);
|
||||
u32 GetBattlerTotalSpeedStat(u32 battler);
|
||||
s8 GetChosenMovePriority(u32 battlerId);
|
||||
s8 GetBattleMovePriority(u32 battlerId, u16 move);
|
||||
s32 GetChosenMovePriority(u32 battler, u32 ability);
|
||||
s32 GetBattleMovePriority(u32 battler, u32 ability, u32 move);
|
||||
s32 GetWhichBattlerFasterArgs(u32 battler1, u32 battler2, bool32 ignoreChosenMoves, u32 ability1, u32 ability2,
|
||||
u32 holdEffectBattler1, u32 holdEffectBattler2, u32 speedBattler1, u32 speedBattler2, s32 priority1, s32 priority2);
|
||||
enum ItemHoldEffect holdEffectBattler1, enum ItemHoldEffect holdEffectBattler2, u32 speedBattler1, u32 speedBattler2, s32 priority1, s32 priority2);
|
||||
s32 GetWhichBattlerFasterOrTies(u32 battler1, u32 battler2, bool32 ignoreChosenMoves);
|
||||
s32 GetWhichBattlerFaster(u32 battler1, u32 battler2, bool32 ignoreChosenMoves);
|
||||
void RunBattleScriptCommands_PopCallbacksStack(void);
|
||||
@ -87,6 +88,8 @@ u8 CreateNPCTrainerPartyFromTrainer(struct Pokemon *party, const struct Trainer
|
||||
void ModifyPersonalityForNature(u32 *personality, u32 newNature);
|
||||
u32 GeneratePersonalityForGender(u32 gender, u32 species);
|
||||
void CustomTrainerPartyAssignMoves(struct Pokemon *mon, const struct TrainerMon *partyEntry);
|
||||
bool32 CanPlayerForfeitNormalTrainerBattle(void);
|
||||
bool32 DidPlayerForfeitNormalTrainerBattle(void);
|
||||
|
||||
extern struct MultiPartnerMenuPokemon gMultiPartnerParty[MULTI_PARTY_SIZE];
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define GUARD_BATTLE_MESSAGE_H
|
||||
|
||||
#include "constants/battle.h"
|
||||
#include "constants/battle_string_ids.h"
|
||||
|
||||
// This buffer can hold many different things. Some of the things it can hold
|
||||
// that have explicit sizes are listed below to ensure it can contain them.
|
||||
@ -247,7 +248,7 @@ struct BattleMsgData
|
||||
u8 textBuffs[3][TEXT_BUFF_ARRAY_COUNT];
|
||||
};
|
||||
|
||||
void BufferStringBattle(u16 stringID, u32 battler);
|
||||
void BufferStringBattle(enum StringID stringID, u32 battler);
|
||||
u32 BattleStringExpandPlaceholdersToDisplayedString(const u8 *src);
|
||||
u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst, u32 dstSize);
|
||||
void BattlePutTextOnWindow(const u8 *text, u8 windowId);
|
||||
|
||||
@ -22,11 +22,12 @@ struct PickupItem
|
||||
u8 percentage[10];
|
||||
};
|
||||
|
||||
s32 CalcCritChanceStage(u32 battlerAtk, u32 battlerDef, u32 move, bool32 recordAbility, u32 abilityAtk, u32 abilityDef, u32 holdEffectAtk);
|
||||
s32 CalcCritChanceStageGen1(u32 battlerAtk, u32 battlerDef, u32 move, bool32 recordAbility, u32 abilityAtk, u32 abilityDef, u32 holdEffectAtk);
|
||||
s32 CalcCritChanceStage(u32 battlerAtk, u32 battlerDef, u32 move, bool32 recordAbility, u32 abilityAtk, u32 abilityDef, enum ItemHoldEffect holdEffectAtk);
|
||||
s32 CalcCritChanceStageGen1(u32 battlerAtk, u32 battlerDef, u32 move, bool32 recordAbility, u32 abilityAtk, u32 abilityDef, enum ItemHoldEffect holdEffectAtk);
|
||||
s32 GetCritHitOdds(s32 critChanceIndex);
|
||||
u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, u32 atkAbility, u32 defAbility, u32 atkHoldEffect, u32 defHoldEffect);
|
||||
u8 GetBattlerTurnOrderNum(u8 battlerId);
|
||||
bool32 NoAliveMonsForBattlerSide(u32 battler);
|
||||
bool32 NoAliveMonsForPlayer(void);
|
||||
bool32 NoAliveMonsForEitherParty(void);
|
||||
void SetMoveEffect(bool32 primary, bool32 certain);
|
||||
|
||||
@ -101,6 +101,7 @@ extern const u8 BattleScript_SelectingTormentedMoveInPalace[];
|
||||
extern const u8 BattleScript_SelectingNotAllowedMoveTaunt[];
|
||||
extern const u8 BattleScript_MoveUsedIsTaunted[];
|
||||
extern const u8 BattleScript_SelectingNotAllowedMoveTauntInPalace[];
|
||||
extern const u8 BattleScript_WishButFullHp[];
|
||||
extern const u8 BattleScript_WishComesTrue[];
|
||||
extern const u8 BattleScript_IngrainTurnHeal[];
|
||||
extern const u8 BattleScript_AtkDefDown[];
|
||||
@ -170,6 +171,8 @@ extern const u8 BattleScript_RainDishActivates[];
|
||||
extern const u8 BattleScript_SandstreamActivates[];
|
||||
extern const u8 BattleScript_ShedSkinActivates[];
|
||||
extern const u8 BattleScript_IntimidateActivates[];
|
||||
extern const u8 BattleScript_IntimidatePrevented[];
|
||||
extern const u8 BattleScript_IntimidateInReverse[];
|
||||
extern const u8 BattleScript_DroughtActivates[];
|
||||
extern const u8 BattleScript_TookAttack[];
|
||||
extern const u8 BattleScript_SturdyPreventsOHKO[];
|
||||
@ -269,7 +272,6 @@ extern const u8 BattleScript_WonderRoomEnds[];
|
||||
extern const u8 BattleScript_MagicRoomEnds[];
|
||||
extern const u8 BattleScript_TerrainEnds[];
|
||||
extern const u8 BattleScript_TerrainEnds_Ret[];
|
||||
extern const u8 BattleScript_GrassyTerrainEnds[];
|
||||
extern const u8 BattleScript_MudSportEnds[];
|
||||
extern const u8 BattleScript_WaterSportEnds[];
|
||||
extern const u8 BattleScript_SturdiedMsg[];
|
||||
@ -385,6 +387,8 @@ extern const u8 BattleScript_FriskMsgWithPopup[];
|
||||
extern const u8 BattleScript_MoodyActivates[];
|
||||
extern const u8 BattleScript_EmergencyExit[];
|
||||
extern const u8 BattleScript_EmergencyExitWild[];
|
||||
extern const u8 BattleScript_EmergencyExitEnd2[];
|
||||
extern const u8 BattleScript_EmergencyExitWildEnd2[];
|
||||
extern const u8 BattleScript_CheekPouchActivates[];
|
||||
extern const u8 BattleScript_TotemVar[];
|
||||
extern const u8 BattleScript_TotemFlaredToLife[];
|
||||
@ -592,8 +596,6 @@ extern const u8 BattleScript_EffectToxic[];
|
||||
extern const u8 BattleScript_EffectLightScreen[];
|
||||
extern const u8 BattleScript_EffectRest[];
|
||||
extern const u8 BattleScript_EffectOHKO[];
|
||||
extern const u8 BattleScript_EffectSuperFang[];
|
||||
extern const u8 BattleScript_EffectFixedDamageArg[];
|
||||
extern const u8 BattleScript_EffectHealBlock[];
|
||||
extern const u8 BattleScript_RecoilIfMiss[];
|
||||
extern const u8 BattleScript_EffectMist[];
|
||||
@ -628,8 +630,6 @@ extern const u8 BattleScript_EffectHoldHands[];
|
||||
extern const u8 BattleScript_EffectCelebrate[];
|
||||
extern const u8 BattleScript_EffectHappyHour[];
|
||||
extern const u8 BattleScript_EffectDisable[];
|
||||
extern const u8 BattleScript_EffectLevelDamage[];
|
||||
extern const u8 BattleScript_EffectPsywave[];
|
||||
extern const u8 BattleScript_EffectCounter[];
|
||||
extern const u8 BattleScript_EffectEncore[];
|
||||
extern const u8 BattleScript_EffectPainSplit[];
|
||||
@ -856,5 +856,7 @@ extern const u8 BattleScript_EffectSpicyExtract[];
|
||||
extern const u8 BattleScript_DamageToQuarterTargetHP[];
|
||||
extern const u8 BattleScript_EffectFickleBeam[];
|
||||
extern const u8 BattleScript_FickleBeamDoubled[];
|
||||
extern const u8 BattleScript_QuestionForfeitBattle[];
|
||||
extern const u8 BattleScript_ForfeitBattleGaveMoney[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||
|
||||
@ -77,5 +77,6 @@ u16 FacilityClassToGraphicsId(u8 facilityClass);
|
||||
bool32 ValidateBattleTowerRecord(u8 recordId); // unused
|
||||
void TrySetLinkBattleTowerEnemyPartyLevel(void);
|
||||
void CreateFacilityMon(const struct TrainerMon *fmon, u16 level, u8 fixedIV, u32 otID, u32 flags, struct Pokemon *dst);
|
||||
void FillPartnerParty(u16 trainerId);
|
||||
|
||||
#endif //GUARD_BATTLE_TOWER_H
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef GUARD_BATTLE_TV_H
|
||||
#define GUARD_BATTLE_TV_H
|
||||
|
||||
void BattleTv_SetDataBasedOnString(u16 stringId);
|
||||
void BattleTv_SetDataBasedOnString(enum StringID stringId);
|
||||
void BattleTv_SetDataBasedOnMove(u16 move, u16 weatherFlags, struct DisableStruct *disableStructPtr);
|
||||
void BattleTv_SetDataBasedOnAnimation(u8 animationId);
|
||||
void TryPutLinkBattleTvShowOnAir(void);
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define GUARD_BATTLE_UTIL_H
|
||||
|
||||
#include "move.h"
|
||||
#include "constants/battle_string_ids.h"
|
||||
|
||||
#define MOVE_LIMITATION_ZEROMOVE (1 << 0)
|
||||
#define MOVE_LIMITATION_PP (1 << 1)
|
||||
@ -25,6 +26,7 @@
|
||||
enum AbilityEffectOptions
|
||||
{
|
||||
ABILITY_CHECK_TRIGGER,
|
||||
ABILITY_CHECK_TRIGGER_AI,
|
||||
ABILITY_RUN_SCRIPT,
|
||||
};
|
||||
|
||||
@ -39,10 +41,6 @@ enum MoveAbsorbed
|
||||
enum {
|
||||
ABILITYEFFECT_ON_SWITCHIN,
|
||||
ABILITYEFFECT_ENDTURN,
|
||||
ABILITYEFFECT_MOVES_BLOCK,
|
||||
ABILITYEFFECT_WOULD_BLOCK, // Checks immunity without triggering a script
|
||||
ABILITYEFFECT_ABSORBING,
|
||||
ABILITYEFFECT_WOULD_ABSORB, // Checks immunity without triggering a script
|
||||
ABILITYEFFECT_MOVE_END_ATTACKER,
|
||||
ABILITYEFFECT_MOVE_END,
|
||||
ABILITYEFFECT_IMMUNITY,
|
||||
@ -70,6 +68,7 @@ enum ItemCaseId
|
||||
ITEMEFFECT_ON_SWITCH_IN,
|
||||
ITEMEFFECT_ON_SWITCH_IN_FIRST_TURN,
|
||||
ITEMEFFECT_NORMAL,
|
||||
ITEMEFFECT_TRY_HEALING,
|
||||
ITEMEFFECT_MOVE_END,
|
||||
ITEMEFFECT_KINGSROCK,
|
||||
ITEMEFFECT_TARGET,
|
||||
@ -173,7 +172,22 @@ enum SleepClauseBlock
|
||||
BLOCKED_BY_SLEEP_CLAUSE,
|
||||
};
|
||||
|
||||
enum SkyDropState
|
||||
{
|
||||
SKY_DROP_IGNORE,
|
||||
SKY_DROP_ATTACKCANCELLER_CHECK,
|
||||
SKY_DROP_GRAVITY_ON_AIRBORNE,
|
||||
SKY_DROP_CANCEL_MULTI_TURN_MOVES,
|
||||
SKY_DROP_STATUS_YAWN,
|
||||
SKY_DROP_STATUS_FREEZE_SLEEP,
|
||||
};
|
||||
|
||||
#define SKY_DROP_NO_TARGET 0xFF
|
||||
#define SKY_DROP_RELEASED_TARGET 0xFE
|
||||
|
||||
void HandleAction_ThrowBall(void);
|
||||
u32 GetCurrentBattleWeather(void);
|
||||
bool32 EndOrContinueWeather(void);
|
||||
bool32 IsAffectedByFollowMe(u32 battlerAtk, u32 defSide, u32 move);
|
||||
bool32 HandleMoveTargetRedirection(void);
|
||||
void HandleAction_UseMove(void);
|
||||
@ -194,9 +208,9 @@ u8 GetBattlerForBattleScript(u8 caseId);
|
||||
bool32 IsBattlerMarkedForControllerExec(u32 battler);
|
||||
void MarkBattlerForControllerExec(u32 battler);
|
||||
void MarkBattlerReceivedLinkData(u32 battler);
|
||||
const u8* CancelMultiTurnMoves(u32 battler);
|
||||
const u8 *CancelMultiTurnMoves(u32 battler, enum SkyDropState skyDropState);
|
||||
bool32 WasUnableToUseMove(u32 battler);
|
||||
void PrepareStringBattle(u16 stringId, u32 battler);
|
||||
void PrepareStringBattle(enum StringID stringId, u32 battler);
|
||||
void ResetSentPokesToOpponentValue(void);
|
||||
void OpponentSwitchInResetSentPokesToOpponentValue(u32 battler);
|
||||
void UpdateSentPokesToOpponentValue(u32 battler);
|
||||
@ -207,18 +221,16 @@ u32 TrySetCantSelectMoveBattleScript(u32 battler);
|
||||
u8 CheckMoveLimitations(u32 battler, u8 unusableMoves, u16 check);
|
||||
bool32 AreAllMovesUnusable(u32 battler);
|
||||
u8 GetImprisonedMovesCount(u32 battler, u16 move);
|
||||
u8 DoFieldEndTurnEffects(void);
|
||||
s32 GetDrainedBigRootHp(u32 battler, s32 hp);
|
||||
bool32 IsMagicGuardProtected(u32 battler, u32 ability);
|
||||
u8 DoBattlerEndTurnEffects(void);
|
||||
bool32 HandleWishPerishSongOnTurnEnd(void);
|
||||
u32 DoEndTurnEffects(void);
|
||||
bool32 HandleFaintedMonActions(void);
|
||||
void TryClearRageAndFuryCutter(void);
|
||||
u32 AtkCanceller_MoveSuccessOrder(void);
|
||||
void SetAtkCancellerForCalledMove(void);
|
||||
bool32 HasNoMonsToSwitch(u32 battler, u8 r1, u8 r2);
|
||||
bool32 TryChangeBattleWeather(u32 battler, u32 battleWeatherId, bool32 viaAbility);
|
||||
bool32 CanAbilityBlockMove(u32 battlerAtk, u32 battlerDef, u32 move, u32 abilityDef, enum AbilityEffectOptions option);
|
||||
bool32 CanAbilityBlockMove(u32 battlerAtk, u32 battlerDef, u32 abilityAtk, u32 abilityDef, u32 move, enum AbilityEffectOptions option);
|
||||
bool32 CanAbilityAbsorbMove(u32 battlerAtk, u32 battlerDef, u32 abilityDef, u32 move, u32 moveType, enum AbilityEffectOptions option);
|
||||
u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32 moveArg);
|
||||
bool32 TryPrimalReversion(u32 battler);
|
||||
@ -241,9 +253,9 @@ void HandleAction_RunBattleScript(void);
|
||||
u32 SetRandomTarget(u32 battler);
|
||||
u32 GetBattleMoveTarget(u16 move, u8 setTarget);
|
||||
u8 GetAttackerObedienceForAction();
|
||||
u32 GetBattlerHoldEffect(u32 battler, bool32 checkNegating);
|
||||
u32 GetBattlerHoldEffectIgnoreAbility(u32 battler, bool32 checkNegating);
|
||||
u32 GetBattlerHoldEffectInternal(u32 battler, bool32 checkNegating, bool32 checkAbility);
|
||||
enum ItemHoldEffect GetBattlerHoldEffect(u32 battler, bool32 checkNegating);
|
||||
enum ItemHoldEffect GetBattlerHoldEffectIgnoreAbility(u32 battler, bool32 checkNegating);
|
||||
enum ItemHoldEffect GetBattlerHoldEffectInternal(u32 battler, bool32 checkNegating, bool32 checkAbility);
|
||||
u32 GetBattlerHoldEffectParam(u32 battler);
|
||||
bool32 IsMoveMakingContact(u32 move, u32 battlerAtk);
|
||||
bool32 IsBattlerGrounded(u32 battler);
|
||||
@ -253,8 +265,8 @@ u32 CalcRolloutBasePower(u32 battlerAtk, u32 basePower, u32 rolloutTimer);
|
||||
u32 CalcFuryCutterBasePower(u32 basePower, u32 furyCutterCounter);
|
||||
s32 CalculateMoveDamage(struct DamageCalculationData *damageCalcData, u32 fixedBasePower);
|
||||
s32 CalculateMoveDamageVars(struct DamageCalculationData *damageCalcData, u32 fixedBasePower, uq4_12_t typeEffectivenessModifier,
|
||||
u32 weather, u32 holdEffectAtk, u32 holdEffectDef, u32 abilityAtk, u32 abilityDef);
|
||||
s32 ApplyModifiersAfterDmgRoll(s32 dmg, struct DamageCalculationData *damageCalcData, uq4_12_t typeEffectivenessModifier, u32 abilityAtk, u32 abilityDef, u32 holdEffectAtk, u32 holdEffectDef);
|
||||
u32 weather, enum ItemHoldEffect holdEffectAtk, enum ItemHoldEffect holdEffectDef, u32 abilityAtk, u32 abilityDef);
|
||||
s32 ApplyModifiersAfterDmgRoll(s32 dmg, struct DamageCalculationData *damageCalcData, uq4_12_t typeEffectivenessModifier, u32 abilityAtk, u32 abilityDef, enum ItemHoldEffect holdEffectAtk, enum ItemHoldEffect holdEffectDef);
|
||||
uq4_12_t CalcTypeEffectivenessMultiplier(u32 move, u32 moveType, u32 battlerAtk, u32 battlerDef, u32 defAbility, bool32 recordAbilities);
|
||||
uq4_12_t CalcPartyMonTypeEffectivenessMultiplier(u16 move, u16 speciesDef, u16 abilityDef);
|
||||
uq4_12_t GetTypeModifier(u32 atkType, u32 defType);
|
||||
@ -269,8 +281,8 @@ void ActivateUltraBurst(u32 battler);
|
||||
bool32 IsBattlerMegaEvolved(u32 battler);
|
||||
bool32 IsBattlerPrimalReverted(u32 battler);
|
||||
bool32 IsBattlerUltraBursted(u32 battler);
|
||||
u16 GetBattleFormChangeTargetSpecies(u32 battler, u16 method);
|
||||
bool32 TryBattleFormChange(u32 battler, u32 method);
|
||||
u16 GetBattleFormChangeTargetSpecies(u32 battler, enum FormChanges method);
|
||||
bool32 TryBattleFormChange(u32 battler, enum FormChanges method);
|
||||
bool32 DoBattlersShareType(u32 battler1, u32 battler2);
|
||||
bool32 CanBattlerGetOrLoseItem(u32 battler, u16 itemId);
|
||||
u32 GetIllusionMonSpecies(u32 battler);
|
||||
@ -299,7 +311,7 @@ bool32 IsBattlerAffectedByHazards(u32 battler, bool32 toxicSpikes);
|
||||
void SortBattlersBySpeed(u8 *battlers, bool32 slowToFast);
|
||||
bool32 CompareStat(u32 battler, u8 statId, u8 cmpTo, u8 cmpKind);
|
||||
bool32 TryRoomService(u32 battler);
|
||||
void BufferStatChange(u32 battler, u8 statId, u8 stringId);
|
||||
void BufferStatChange(u32 battler, u8 statId, enum StringID stringId);
|
||||
bool32 BlocksPrankster(u16 move, u32 battlerPrankster, u32 battlerDef, bool32 checkTarget);
|
||||
u16 GetUsedHeldItem(u32 battler);
|
||||
bool32 PickupHasValidTarget(u32 battler);
|
||||
@ -329,6 +341,7 @@ bool32 CanBeConfused(u32 battler);
|
||||
bool32 IsBattlerTerrainAffected(u32 battler, u32 terrainFlag);
|
||||
u32 GetBattlerAffectionHearts(u32 battler);
|
||||
void TryToRevertMimicryAndFlags(void);
|
||||
bool32 BattleArenaTurnEnd(void);
|
||||
u32 CountBattlerStatIncreases(u32 battler, bool32 countEvasionAcc);
|
||||
bool32 ChangeTypeBasedOnTerrain(u32 battler);
|
||||
void RemoveConfusionStatus(u32 battler);
|
||||
@ -355,6 +368,7 @@ void ClearPursuitValuesIfSet(u32 battler);
|
||||
void ClearPursuitValues(void);
|
||||
bool32 HasWeatherEffect(void);
|
||||
u32 RestoreWhiteHerbStats(u32 battler);
|
||||
bool32 IsFutureSightAttackerInParty(u32 battlerAtk, u32 battlerDef);
|
||||
bool32 HadMoreThanHalfHpNowDoesnt(u32 battler);
|
||||
|
||||
#endif // GUARD_BATTLE_UTIL_H
|
||||
|
||||
@ -5,5 +5,6 @@
|
||||
|
||||
void InitTimeBasedEvents(void);
|
||||
void DoTimeBasedEvents(void);
|
||||
void FormChangeTimeUpdate();
|
||||
|
||||
#endif // GUARD_CLOCK_H
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
#define B_SPLIT_EXP GEN_LATEST // In Gen6+, all participating mon get full experience.
|
||||
#define B_SCALED_EXP GEN_LATEST // In Gen5 and Gen7+, experience is weighted by level difference.
|
||||
#define B_UNEVOLVED_EXP_MULTIPLIER GEN_LATEST // In Gen6+, if the Pokémon is at or past the level where it would be able to evolve, but it has not, it gets a ~1.2 multiplier to EXP gain. Only applies to Pokémon with EVO_LEVEL method.
|
||||
#define B_LEVEL_UP_NOTIFICATION GEN_LATEST // In Gen9+, if the Pokémon gets enough experience to level up multiple times, the message is only displayed once.
|
||||
|
||||
// Stat settings
|
||||
#define B_BADGE_BOOST GEN_LATEST // In Gen4+, Gym Badges no longer boost a Pokémon's stats.
|
||||
@ -158,6 +159,7 @@
|
||||
#define B_PICKUP_WILD GEN_LATEST // In Gen9+, Pickup allows its user to pickup its own used item at the end of the turn in wild battles.
|
||||
#define B_MAGIC_GUARD GEN_LATEST // In Gen4 only, Magic Guard ignores immobilization caused by paralysis
|
||||
#define B_BATTLE_BOND GEN_LATEST // In Gen9+, Battle Bond increases Atk, SpAtk and Speed by one stage, once per battle
|
||||
#define B_ATE_MULTIPLIER GEN_LATEST // In Gen7+, -ate abilities (Aerilate, Galvanize, Normalize, Pixilate, Refrigerate) multiply damage by 1.2. Otherwise, it's 1.3, except Normalize which has no multiplier.
|
||||
|
||||
// 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.
|
||||
@ -256,6 +258,7 @@
|
||||
#define B_HIDE_HEALTHBOX_IN_ANIMS TRUE // If set to TRUE, hides healthboxes during move animations.
|
||||
#define B_WAIT_TIME_MULTIPLIER 16 // This determines how long text pauses in battle last. Vanilla is 16. Lower values result in faster battles.
|
||||
#define B_QUICK_MOVE_CURSOR_TO_RUN FALSE // If set to TRUE, pushing B in the battle options against a wild encounter will move the cursor to the run option
|
||||
#define B_RUN_TRAINER_BATTLE TRUE // If set to TRUE, players can run from Trainer battles. This is treated as a whiteout.
|
||||
#define B_MOVE_DESCRIPTION_BUTTON L_BUTTON // If set to a button other than B_LAST_USED_BALL_BUTTON, pressing this button will open the move description menu
|
||||
#define B_SHOW_USELESS_Z_MOVE_INFO FALSE // If set to TRUE, Z-moves without additional effects like newer gen status moves will say "no additional effect"
|
||||
#define B_ANIMATE_MON_AFTER_KO TRUE // If set to TRUE, if a Pokémon on the opposite site faints, the non-fainted Pokemon will display a victory animation.
|
||||
@ -316,10 +319,17 @@
|
||||
#define B_ENEMY_THROW_BALLS_SOUND GEN_LATEST // In GEN_5+, enemy Trainer's Poké Balls make a sound when thrown to send out a Pokémon. This can only be used when B_ENEMY_THROW_BALLS is set to GEN_6 or later.
|
||||
#define B_PLAYER_THROW_BALLS_SOUND GEN_LATEST // In GEN_5+, the player's Poké Balls make a sound when thrown to send out a Pokémon.
|
||||
|
||||
#define SHOW_TYPES_NEVER 0
|
||||
#define SHOW_TYPES_ALWAYS 1
|
||||
#define SHOW_TYPES_CAUGHT 2
|
||||
#define B_SHOW_TYPES SHOW_TYPES_NEVER // When defined as SHOW_TYPES_ALWAYS, after selecting "Fight" in battle, the types of all Pokemon are revealed. Whe defined as SHOW_TYPES_OWN, types are only revealed if the player owns the mon in question.
|
||||
#define SHOW_TYPES_NEVER 0 // Never shows types in battle
|
||||
#define SHOW_TYPES_ALWAYS 1 // Always show types in battle
|
||||
#define SHOW_TYPES_CAUGHT 2 // Only show types if you've caught a species of the mon.
|
||||
#define SHOW_TYPES_SEEN 3 // Only show types if you've seen a species of the mon.
|
||||
#define B_SHOW_TYPES SHOW_TYPES_NEVER // When to show type indicators next to Pokémon health bars in battle, while choosing a move after selecting a target Pokémon.
|
||||
|
||||
#define SHOW_EFFECTIVENESS_NEVER 0 // Never show effectiveness when selecting moves.
|
||||
#define SHOW_EFFECTIVENESS_ALWAYS 1 // Always show effectiveness when selecting moves.
|
||||
#define SHOW_EFFECTIVENESS_CAUGHT 2 // Only show effectiveness if you've caught a species of the mon.
|
||||
#define SHOW_EFFECTIVENESS_SEEN 3 // Only show effectiveness if you've seen a species of the mon.
|
||||
#define B_SHOW_EFFECTIVENESS SHOW_EFFECTIVENESS_SEEN // If not SHOW_EFFECTIVENESS_NEVER, the PP string is replaced by a type effectiveness indicator based off the moves and the opposing side.
|
||||
|
||||
// Pokémon battle sprite settings
|
||||
#define B_ENEMY_MON_SHADOW_STYLE GEN_LATEST // In Gen4+, all enemy Pokemon will have a shadow drawn beneath them.
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
#define DEXNAV_CHAIN_MAX 100 // maximum chain value
|
||||
|
||||
// hidden pokemon options - an approximation of values to due to lack of available data
|
||||
// hidden pokemon options - an approximation of values due to lack of available data
|
||||
#define HIDDEN_MON_STEP_COUNT 100 // Look for hidden pokemon every x steps
|
||||
#define HIDDEN_MON_SEARCH_RATE 25 // x% chance of finding hidden pokemon every x steps
|
||||
#define HIDDEN_MON_PROBABILTY 15 // x% chance of finding hidden mon compared to regular encounter data
|
||||
|
||||
13
include/config/follower_npc.h
Normal file
@ -0,0 +1,13 @@
|
||||
#ifndef GUARD_FOLLOWER_NPC_OVERWORLD_H
|
||||
#define GUARD_FOLLOWER_NPC_OVERWORLD_H
|
||||
|
||||
// NPC Followers
|
||||
#define FNPC_ENABLE_NPC_FOLLOWERS FALSE // Enables the use of script macros to designate NPCs to follow behind the player, DPP style. Slightly increases the size of the saveblock (SaveBlock3).
|
||||
#define FNPC_FLAG_HEAL_AFTER_FOLLOWER_BATTLE 0 // Replace the 0 with a flag in order to use that flag to toggle whether the Player's party will be automatically healed after every follower partner battle. If you want this to always be active without using a flag, replace 0 with FNPC_ALWAYS.
|
||||
#define FNPC_FLAG_PARTNER_WILD_BATTLES 0 // Replace the 0 with a flag in order to use that flag to toggle whether the follower partner will join you for wild battles. If you want this to always be active without using a flag, replace 0 with FNPC_ALWAYS.
|
||||
#define FNPC_NPC_FOLLOWER_WILD_BATTLE_VS_2 TRUE // If set to TRUE, two wild Pokemon will show up to the partner battle instead of just one.
|
||||
#define FNPC_NPC_FOLLOWER_PARTY_PREVIEW TRUE // If set to TRUE, a preview of the player's and partner's teams will be shown before every trainer battle.
|
||||
#define FNPC_FACE_NPC_FOLLOWER_ON_DOOR_EXIT TRUE // If set to TRUE, the player will turn to face the follower when they exit a doorway.
|
||||
#define FNPC_NPC_FOLLOWER_SHOW_AFTER_LEAVE_ROUTE TRUE // If set to TRUE, the follower will reappear and walk out of the player after using Fly, Escape Rope, or Teleport.
|
||||
|
||||
#endif // GUARD_FOLLOWER_NPC_OVERWORLD_H
|
||||
@ -68,14 +68,12 @@
|
||||
|
||||
// General settings
|
||||
#define EXPANSION_INTRO TRUE // If TRUE, a custom RHH intro will play after the vanilla copyright screen.
|
||||
#define POKEDEX_PLUS_HGSS FALSE // If TRUE, enables the custom HGSS style Pokedex.
|
||||
#define SUMMARY_SCREEN_NATURE_COLORS TRUE // If TRUE, nature-based stat boosts and reductions will be red and blue in the summary screen.
|
||||
#define HQ_RANDOM TRUE // If TRUE, replaces the default RNG with an implementation of SFC32 RNG. May break code that relies on RNG.
|
||||
#define COMPETITIVE_PARTY_SYNTAX TRUE // If TRUE, parties are defined in "competitive syntax".
|
||||
#define AUTO_SCROLL_TEXT FALSE // If TRUE, text will automatically scroll to the next line after NUM_FRAMES_AUTO_SCROLL_DELAY. Players can still press A_BUTTON or B_BUTTON to scroll on their own.
|
||||
#define NUM_FRAMES_AUTO_SCROLL_DELAY 49
|
||||
|
||||
|
||||
// Measurement system constants to be used for UNITS
|
||||
#define UNITS_IMPERIAL 0 // Inches, feet, pounds
|
||||
#define UNITS_METRIC 1 // meters, kilograms
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
#define OW_DOUBLE_APPROACH_WITH_ONE_MON FALSE // If enabled, you can be spotted by two trainers at the same time even if you only have one eligible Pokémon in your party.
|
||||
#define OW_HIDE_REPEAT_MAP_POPUP FALSE // If enabled, map popups will not appear if entering a map with the same Map Section Id as the last.
|
||||
#define OW_FRLG_WHITEOUT FALSE // If enabled, shows an additional whiteout message and post whiteout event script with healing NPC.
|
||||
#define OW_DEFOG_FIELD_MOVE FALSE // If enabled, Defog can be used as a Field Move as seen in DPPt.
|
||||
|
||||
// Item Obtain Description Box
|
||||
#define OW_ITEM_DESCRIPTIONS_OFF 0 // never show descriptions
|
||||
@ -61,31 +62,13 @@
|
||||
#define OW_FOLLOWERS_COPY_WILD_PKMN FALSE // If TRUE, follower Pokémon that know Transform or have Illusion/Imposter will copy wild Pokémon at random.
|
||||
#define OW_BATTLE_ONLY_FORMS TRUE // If TRUE, loads overworld sprites for battle-only forms like Mega Evos. Requires OW_POKEMON_OBJECT_EVENTS.
|
||||
#define B_FLAG_FOLLOWERS_DISABLED 0 // Enables / Disables followers by using a flag. Helpful to disable followers for a period of time.
|
||||
|
||||
|
||||
#define OW_FOLLOWERS_SCRIPT_MOVEMENT TRUE // TRUE: Script collisions hide follower, FLAG_SAFE_FOLLOWER_MOVEMENT on by default
|
||||
// FALSE: Script collisions unhandled, FLAG_SAFE_FOLLOWER_MOVEMENT off by default
|
||||
|
||||
// If set, the only pokemon allowed to follow you
|
||||
// will be those matching species, met location,
|
||||
// and/or met level;
|
||||
// These accept vars, too: VAR_TEMP_1, etc
|
||||
#define OW_MON_ALLOWED_SPECIES (0)
|
||||
#define OW_MON_ALLOWED_MET_LVL (0)
|
||||
#define OW_MON_ALLOWED_MET_LOC (0)
|
||||
// Examples:
|
||||
// Yellow Pikachu:
|
||||
// #define OW_MON_ALLOWED_SPECIES (SPECIES_PIKACHU)
|
||||
// #define OW_MON_ALLOWED_MET_LVL (0)
|
||||
// #define OW_MON_ALLOWED_MET_LOC (MAPSEC_PALLET_TOWN)
|
||||
// Hoenn Starter:
|
||||
// #define OW_MON_ALLOWED_SPECIES (0)
|
||||
// #define OW_MON_ALLOWED_MET_LVL (5)
|
||||
// #define OW_MON_ALLOWED_MET_LOC (MAPSEC_ROUTE_101)
|
||||
// Species set in VAR_XXXX:
|
||||
// #define OW_MON_ALLOWED_SPECIES (VAR_XXXX)
|
||||
// #define OW_MON_ALLOWED_MET_LVL (0)
|
||||
// #define OW_MON_ALLOWED_MET_LOC (0)
|
||||
#define OW_FOLLOWERS_SCRIPT_MOVEMENT TRUE // If TRUE, follower Pokémon only go back to their Poké Ball if a non-player collides with them by setting the FLAG_SAFE_FOLLOWER_MOVEMENT flag by default.
|
||||
// Follower Pokémon Restrictions
|
||||
// If set, the only pokemon allowed to follow you will be those matching species, met location, and/or met level; These accept vars, too: VAR_TEMP_1, etc
|
||||
// For examples, see "docs/tutorials/how_to_new_pokemon.md"
|
||||
#define OW_FOLLOWERS_ALLOWED_SPECIES (0)
|
||||
#define OW_FOLLOWERS_ALLOWED_MET_LVL (0)
|
||||
#define OW_FOLLOWERS_ALLOWED_MET_LOC (0)
|
||||
|
||||
// Out-of-battle Ability effects
|
||||
#define OW_SYNCHRONIZE_NATURE GEN_LATEST // In Gen8+, if a Pokémon with Synchronize leads the party, wild Pokémon will always have their same Nature as opposed to the 50% chance in previous games. Gift Pokémon excluded.
|
||||
@ -98,13 +81,25 @@
|
||||
#define OW_STORM_DRAIN GEN_LATEST // In Gen8+, if a Pokémon with Storm Drain is leading the party, there is a 50% chance to encounter a Water-type Pokémon.
|
||||
#define OW_FLASH_FIRE GEN_LATEST // In Gen8+, if a Pokémon with Flash Fire is leading the party, there is a 50% chance to encounter a Fire-type Pokémon.
|
||||
|
||||
// These generational defines only make a distinction for OW_ALTERED_TIME_RATIO
|
||||
// These defines only make a distinction for OW_ALTERED_TIME_RATIO
|
||||
#define GEN_8_PLA GEN_LATEST + 2
|
||||
#define TIME_DEBUG GEN_LATEST + 3
|
||||
|
||||
//Time
|
||||
#define OW_TIMES_OF_DAY GEN_LATEST // Different generations have the times of day change at different times.
|
||||
#define OW_USE_FAKE_RTC FALSE // When TRUE, seconds on the in-game clock will only advance once every 60 playTimeVBlanks (every 60 frames).
|
||||
#define OW_ALTERED_TIME_RATIO GEN_LATEST // In GEN_8_PLA, the time in game moves forward 60 seconds for every second in the RTC. In GEN_9, it is 20 seconds. This has no effect if OW_USE_FAKE_RTC is FALSE.
|
||||
#define OW_TIMES_OF_DAY GEN_LATEST // Different generations have the times of day change at different times.
|
||||
#define OW_USE_FAKE_RTC FALSE // When TRUE, seconds on the in-game clock will only advance once every 60 playTimeVBlanks (every 60 frames).
|
||||
#define OW_ALTERED_TIME_RATIO GEN_LATEST // In GEN_8_PLA, the time in game moves forward 60 seconds for every second in the RTC. In GEN_9, it is 20 seconds. TIME_DEBUG is 1:1, and meant for debugging purposes. This has no effect if OW_USE_FAKE_RTC is FALSE.
|
||||
#define OW_TIME_OF_DAY_ENCOUNTERS FALSE // If TRUE, will allow the user to define and use different encounter tables based on the time of day.
|
||||
#define OW_TIME_OF_DAY_DISABLE_FALLBACK FALSE // If TRUE, if the encounter table for a specific map and time is empty, the area will have no encounters instead of falling back to the vanilla map and time.
|
||||
#define OW_TIME_OF_DAY_FALLBACK TIME_MORNING // The time of day that encounter tables fall back to.
|
||||
|
||||
// Lighting
|
||||
#define OW_SHADOW_INTENSITY 4 // Ranges from 0 to 16, where 0 is fully transparent and 16 is black.
|
||||
#define OW_OBJECT_SUBPRIORITY 148 // The higher the value, the farther back compared to other sprites. Shadows should be behind object events.
|
||||
#define OW_ENABLE_DNS TRUE // If set to TRUE, the overworld will be tinted depending on time of day.
|
||||
|
||||
// Object Event Shadows
|
||||
#define OW_OBJECT_VANILLA_SHADOWS FALSE // In vanilla shadows in the overworld are only shown when jumping.
|
||||
|
||||
// Overworld flags
|
||||
// To use the following features in scripting, replace the 0s with the flag ID you're assigning it to.
|
||||
|
||||
11
include/config/pokedex_plus_hgss.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef GUARD_CONFIG_POKEDEX_PLUS_HGSS_H
|
||||
#define GUARD_CONFIG_POKEDEX_PLUS_HGSS_H
|
||||
|
||||
#define POKEDEX_PLUS_HGSS FALSE // If TRUE, enables the custom HGSS style Pokedex.
|
||||
#define HGSS_DECAPPED FALSE // If TRUE, uses decapped gfx and strings.
|
||||
#define HGSS_DARK_MODE FALSE // If TRUE, enables dark mode.
|
||||
#define HGSS_HIDE_UNSEEN_EVOLUTION_NAMES FALSE // If TRUE, hides evolution mon names.
|
||||
#define HGSS_SORT_TMS_BY_NUM FALSE // If TRUE, sorts the TMS in HGSS Dex by TM number, rather than alphabetically.
|
||||
#define HGSS_SHOW_EGG_MOVES_FOR_EVOS FALSE // If TRUE, shows Egg Moves for evolved Pokémon too.
|
||||
|
||||
#endif // GUARD_CONFIG_POKEDEX_PLUS_HGSS_H
|
||||
@ -62,7 +62,8 @@
|
||||
#define P_SHOW_DYNAMIC_TYPES FALSE // If TRUE, all moves with dynamic type changes will be reflected as their current type in battle/summary screens instead of just select ones like in vanilla.
|
||||
|
||||
// Learnset helper toggles
|
||||
#define P_LEARNSET_HELPER_TEACHABLE TRUE // If TRUE, teachable_learnsets.h will be populated by tools/learnset_helpers/teachable.py using the included JSON files based on available TMs and tutors.
|
||||
#define P_LEARNSET_HELPER_TEACHABLE TRUE // If TRUE, teachable_learnsets.h will be populated by tools/learnset_helpers/make_teachables.py using the included JSON files based on available TMs and tutors.
|
||||
#define P_TUTOR_MOVES_ARRAY FALSE // If TRUE, generates a gTutorMoves array automatically using make_teachables.py. (generally not needed, but the HGSS Pokedex has an optional use for it)
|
||||
|
||||
// Flag settings
|
||||
// To use the following features in scripting, replace the 0s with the flag ID you're assigning it to.
|
||||
|
||||
@ -1140,8 +1140,4 @@
|
||||
// Move animation testing
|
||||
#define T_SHOULD_RUN_MOVE_ANIM FALSE // If TRUE, enables the move animation tests, these are very computationally heavy and takes a long time to run.
|
||||
|
||||
#define ANIM_TEST_START_MOVE 1 // First move to test
|
||||
#define ANIM_TEST_END_MOVE MOVES_COUNT-1 // Last move to test
|
||||
|
||||
|
||||
#endif // GUARD_CONFIG_TEST_H
|
||||
|
||||
@ -172,10 +172,10 @@
|
||||
#define STATUS3_GASTRO_ACID (1 << 16)
|
||||
#define STATUS3_EMBARGO (1 << 17)
|
||||
#define STATUS3_UNDERWATER (1 << 18)
|
||||
#define STATUS3_INTIMIDATE_POKES (1 << 19)
|
||||
#define STATUS3_TRACE (1 << 20)
|
||||
#define STATUS3_UNUSED_19 (1 << 19)
|
||||
#define STATUS3_UNUSED_20 (1 << 20)
|
||||
#define STATUS3_SMACKED_DOWN (1 << 21)
|
||||
#define STATUS3_ME_FIRST (1 << 22)
|
||||
#define STATUS3_UNUSED_22 (1 << 22)
|
||||
#define STATUS3_TELEKINESIS (1 << 23)
|
||||
#define STATUS3_PHANTOM_FORCE (1 << 24)
|
||||
#define STATUS3_MIRACLE_EYED (1 << 25)
|
||||
@ -196,7 +196,7 @@
|
||||
#define STATUS4_SYRUP_BOMB (1 << 5)
|
||||
#define STATUS4_GLAIVE_RUSH (1 << 6)
|
||||
|
||||
#define HITMARKER_WAKE_UP_CLEAR (1 << 4) // Cleared when waking up. Never set or checked.
|
||||
#define HITMARKER_UNUSED_1 (1 << 4)
|
||||
#define HITMARKER_IGNORE_BIDE (1 << 5)
|
||||
#define HITMARKER_DESTINYBOND (1 << 6)
|
||||
#define HITMARKER_NO_ANIMATIONS (1 << 7) // set from battleSceneOff. Never changed during battle
|
||||
@ -204,21 +204,21 @@
|
||||
#define HITMARKER_NO_ATTACKSTRING (1 << 9)
|
||||
#define HITMARKER_ATTACKSTRING_PRINTED (1 << 10)
|
||||
#define HITMARKER_NO_PPDEDUCT (1 << 11)
|
||||
#define HITMARKER_SWAP_ATTACKER_TARGET (1 << 12)
|
||||
#define HITMARKER_UNUSED_2 (1 << 12)
|
||||
#define HITMARKER_STATUS_ABILITY_EFFECT (1 << 13)
|
||||
#define HITMARKER_SYNCHRONISE_EFFECT (1 << 14)
|
||||
#define HITMARKER_RUN (1 << 15)
|
||||
#define HITMARKER_IGNORE_DISGUISE (1 << 16)
|
||||
#define HITMARKER_DISABLE_ANIMATION (1 << 17) // disable animations during battle scripts, e.g. for Bug Bite
|
||||
// 3 free spots because of change in handling of UNDERGROUND/UNDERWATER/ON AIR
|
||||
#define HITMARKER_UNUSED_3 (1 << 18)
|
||||
#define HITMARKER_UNABLE_TO_USE_MOVE (1 << 19)
|
||||
#define HITMARKER_PASSIVE_DAMAGE (1 << 20)
|
||||
#define HITMARKER_DISOBEDIENT_MOVE (1 << 21)
|
||||
#define HITMARKER_UNUSED_4 (1 << 21)
|
||||
#define HITMARKER_PLAYER_FAINTED (1 << 22)
|
||||
#define HITMARKER_ALLOW_NO_PP (1 << 23)
|
||||
#define HITMARKER_GRUDGE (1 << 24)
|
||||
#define HITMARKER_OBEYS (1 << 25)
|
||||
#define HITMARKER_NEVER_SET (1 << 26) // Cleared as part of a large group. Never set or checked
|
||||
#define HITMARKER_UNUSED_5 (1 << 26)
|
||||
#define HITMARKER_CHARGING (1 << 27)
|
||||
#define HITMARKER_FAINTED(battler) (1u << (battler + 28))
|
||||
#define HITMARKER_FAINTED2(battler) HITMARKER_FAINTED(battler)
|
||||
|
||||
@ -1,19 +1,6 @@
|
||||
#ifndef GUARD_CONSTANTS_BATTLE_AI_H
|
||||
#define GUARD_CONSTANTS_BATTLE_AI_H
|
||||
|
||||
// battlers
|
||||
#define AI_TARGET 0
|
||||
#define AI_USER 1
|
||||
#define AI_TARGET_PARTNER 2
|
||||
#define AI_USER_PARTNER 3
|
||||
|
||||
// get_type command
|
||||
#define AI_TYPE1_TARGET 0
|
||||
#define AI_TYPE1_USER 1
|
||||
#define AI_TYPE2_TARGET 2
|
||||
#define AI_TYPE2_USER 3
|
||||
#define AI_TYPE_MOVE 4
|
||||
|
||||
// AI Flags. Most run specific functions to update score, new flags are used for internal logic in other scripts
|
||||
// See docs/ai_flags.md for more details.
|
||||
#define AI_FLAG_CHECK_BAD_MOVE (1 << 0) // AI will avoid using moves that are likely to fail or be ineffective in the current situation.
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
#ifndef GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
#define GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
||||
enum {
|
||||
enum BattleMoveEffects
|
||||
{
|
||||
EFFECT_PLACEHOLDER,
|
||||
EFFECT_HIT,
|
||||
EFFECT_SLEEP,
|
||||
|
||||
@ -134,7 +134,6 @@ enum CmdVarious
|
||||
VARIOUS_TRY_ELECTRIFY,
|
||||
VARIOUS_TRY_SOAK,
|
||||
VARIOUS_TRY_LAST_RESORT,
|
||||
VARIOUS_SET_ARG_TO_BATTLE_DAMAGE,
|
||||
VARIOUS_TRY_AUTOTOMIZE,
|
||||
VARIOUS_ABILITY_POPUP,
|
||||
VARIOUS_JUMP_IF_TARGET_ALLY,
|
||||
@ -287,6 +286,7 @@ enum MoveEndEffects
|
||||
MOVEEND_LIFEORB_SHELLBELL, // Includes shell bell, throat spray, etc
|
||||
MOVEEND_EMERGENCY_EXIT,
|
||||
MOVEEND_EJECT_PACK,
|
||||
MOVEEND_HIT_ESCAPE,
|
||||
MOVEEND_OPPORTUNIST, // Occurs after other stat change items/abilities to try and copy the boosts
|
||||
MOVEEND_PICKPOCKET,
|
||||
MOVEEND_WHITE_HERB,
|
||||
|
||||
@ -255,6 +255,10 @@
|
||||
#define MOVEMENT_ACTION_WALK_SLOW_STAIRS_UP 0xA7
|
||||
#define MOVEMENT_ACTION_WALK_SLOW_STAIRS_LEFT 0xA8
|
||||
#define MOVEMENT_ACTION_WALK_SLOW_STAIRS_RIGHT 0xA9
|
||||
#define MOVEMENT_ACTION_SURF_STILL_DOWN 0xAA
|
||||
#define MOVEMENT_ACTION_SURF_STILL_UP 0xAB
|
||||
#define MOVEMENT_ACTION_SURF_STILL_LEFT 0xAC
|
||||
#define MOVEMENT_ACTION_SURF_STILL_RIGHT 0xAD
|
||||
|
||||
#define MOVEMENT_ACTION_STEP_END 0xFE
|
||||
#define MOVEMENT_ACTION_NONE 0xFF
|
||||
|
||||
@ -242,11 +242,12 @@
|
||||
#define OBJ_EVENT_GFX_HOOH 238
|
||||
#define OBJ_EVENT_GFX_POKE_BALL 239
|
||||
#define OBJ_EVENT_GFX_OW_MON 240
|
||||
#define OBJ_EVENT_GFX_LIGHT_SPRITE 241
|
||||
|
||||
// NOTE: The maximum amount of object events has been expanded from 255 to 65535.
|
||||
// Since dynamic graphics ids still require at least 16 free values, the actual limit
|
||||
// is 65519, but even considering follower Pokémon, this should be more than enough :)
|
||||
#define NUM_OBJ_EVENT_GFX 241
|
||||
#define NUM_OBJ_EVENT_GFX 242
|
||||
|
||||
|
||||
// These are dynamic object gfx ids.
|
||||
@ -270,6 +271,7 @@
|
||||
#define OBJ_EVENT_GFX_VAR_E (OBJ_EVENT_GFX_VARS + 0xE)
|
||||
#define OBJ_EVENT_GFX_VAR_F (OBJ_EVENT_GFX_VARS + 0xF)
|
||||
|
||||
// Don't use (1u << 15) to avoid conflict with BLEND_IMMUNE_FLAG.
|
||||
#define OBJ_EVENT_MON (1u << 14)
|
||||
#define OBJ_EVENT_MON_SHINY (1u << 13)
|
||||
#define OBJ_EVENT_MON_FEMALE (1u << 12)
|
||||
@ -305,15 +307,23 @@
|
||||
#define TRACKS_SPOT 4
|
||||
#define TRACKS_BUG 5
|
||||
|
||||
#define LIGHT_TYPE_BALL 0
|
||||
#define LIGHT_TYPE_PKMN_CENTER_SIGN 1
|
||||
#define LIGHT_TYPE_POKE_MART_SIGN 2
|
||||
|
||||
#define FIRST_DECORATION_SPRITE_GFX OBJ_EVENT_GFX_PICHU_DOLL
|
||||
|
||||
#define OBJ_KIND_NORMAL 0
|
||||
#define OBJ_KIND_CLONE 255 // Exclusive to FRLG
|
||||
|
||||
// Special object event local ids
|
||||
// Used for link player OWs in CreateLinkPlayerSprite
|
||||
#define OBJ_EVENT_ID_DYNAMIC_BASE 0xF0
|
||||
|
||||
#define OBJ_EVENT_ID_PLAYER 0xFF
|
||||
#define OBJ_EVENT_ID_CAMERA 0x7F
|
||||
#define OBJ_EVENT_ID_FOLLOWER 0xFE
|
||||
#define OBJ_EVENT_ID_NPC_FOLLOWER 0xFD
|
||||
|
||||
// Object event local ids referenced in C files
|
||||
#define LOCALID_ROUTE111_PLAYER_FALLING 45
|
||||
@ -421,7 +431,10 @@
|
||||
#endif //OW_FOLLOWERS_POKEBALLS
|
||||
// Used as a placeholder follower graphic
|
||||
#define OBJ_EVENT_PAL_TAG_SUBSTITUTE 0x7611
|
||||
#define OBJ_EVENT_PAL_TAG_EMOTES 0x8002
|
||||
#define OBJ_EVENT_PAL_TAG_LIGHT 0x8001
|
||||
#define OBJ_EVENT_PAL_TAG_LIGHT_2 0x8002
|
||||
#define OBJ_EVENT_PAL_TAG_EMOTES 0x8003
|
||||
#define OBJ_EVENT_PAL_TAG_NEON_LIGHT 0x8004
|
||||
// Not a real OW palette tag; used for the white flash applied to followers
|
||||
#define OBJ_EVENT_PAL_TAG_WHITE (OBJ_EVENT_PAL_TAG_NONE - 1)
|
||||
#define OBJ_EVENT_PAL_TAG_NONE 0x11FF
|
||||
|
||||
@ -76,6 +76,7 @@
|
||||
#define FLDEFF_TRACKS_SPOT 71
|
||||
#define FLDEFF_TRACKS_BUG 72
|
||||
#define FLDEFF_CAVE_DUST 73
|
||||
#define FLDEFF_DEFOG 74
|
||||
|
||||
#define FLDEFFOBJ_SHADOW_S 0
|
||||
#define FLDEFFOBJ_SHADOW_M 1
|
||||
@ -132,5 +133,12 @@
|
||||
#define FLDEFF_PAL_TAG_HOF_MONITOR 0x1010
|
||||
#define FLDEFF_PAL_TAG_UNKNOWN 0x1011
|
||||
#define FLDEFF_PAL_TAG_CAVE_DUST 0x1012
|
||||
#define FLDEFF_PAL_TAG_FIELD_MOVE_MON 0x8400
|
||||
|
||||
// tile tags, for field effects that may have many copies on screen at once
|
||||
#define FLDEFF_TILE_TAG_SHADOW_SMALL 0x1400
|
||||
#define FLDEFF_TILE_TAG_SHADOW_MEDIUM 0x1401
|
||||
#define FLDEFF_TILE_TAG_SHADOW_LARGE 0x1402
|
||||
#define FLDEFF_TILE_TAG_SHADOW_EXTRA_LARGE 0x1403
|
||||
|
||||
#endif // GUARD_FIELD_EFFECT_CONSTANTS_H
|
||||
|
||||
@ -1,6 +1,16 @@
|
||||
#ifndef GUARD_CONSTANTS_FIELD_WEATHER_H
|
||||
#define GUARD_CONSTANTS_FIELD_WEATHER_H
|
||||
|
||||
#include "config/overworld.h"
|
||||
|
||||
// sPaletteColorMapTypes & field_effect_scripts
|
||||
enum ColorMapType
|
||||
{
|
||||
COLOR_MAP_NONE,
|
||||
COLOR_MAP_DARK_CONTRAST,
|
||||
COLOR_MAP_CONTRAST,
|
||||
};
|
||||
|
||||
#define MAX_RAIN_SPRITES 24
|
||||
#define NUM_CLOUD_SPRITES 3
|
||||
#define NUM_FOG_HORIZONTAL_SPRITES 20
|
||||
@ -22,4 +32,8 @@
|
||||
#define FADE_FROM_WHITE 2
|
||||
#define FADE_TO_WHITE 3
|
||||
|
||||
// Shadows values
|
||||
#define BASE_SHADOW_INTENSITY (16 - OW_SHADOW_INTENSITY)
|
||||
#define SHADOW_COLOR_INDEX 9 // Within the weather palette, shadow sprites' color index
|
||||
|
||||
#endif // GUARD_CONSTANTS_FIELD_WEATHER_H
|
||||
|
||||
34
include/constants/follower_npc.h
Normal file
@ -0,0 +1,34 @@
|
||||
#ifndef GUARD_CONSTANTS_FOLLOWER_NPC_H
|
||||
#define GUARD_CONSTANTS_FOLLOWER_NPC_H
|
||||
|
||||
// NPC Follower Flags
|
||||
#define FOLLOWER_NPC_FLAG_HAS_RUNNING_FRAMES 0x1 // Only use this if the NPC has running anim frames. Part of FOLLOWER_NPC_FLAG_ALL_LAND.
|
||||
#define FOLLOWER_NPC_FLAG_CAN_BIKE 0x2 // Player is allowed to use the Bike. Part of FOLLOWER_NPC_FLAG_ALL_LAND.
|
||||
#define FOLLOWER_NPC_FLAG_CAN_LEAVE_ROUTE 0x4 // Player is allowed to use Fly/Teleport/EscapeRope/etc. Part of FOLLOWER_NPC_FLAG_ALL_LAND.
|
||||
#define FOLLOWER_NPC_FLAG_CAN_SURF 0x8 // Player is allowed to Surf. Part of FOLLOWER_NPC_FLAG_ALL_WATER.
|
||||
#define FOLLOWER_NPC_FLAG_CAN_WATERFALL 0x10 // Player is allowed to use Waterfall. Part of FOLLOWER_NPC_FLAG_ALL_WATER.
|
||||
#define FOLLOWER_NPC_FLAG_CAN_DIVE 0x20 // Player is allowed to use Dive. Part of FOLLOWER_NPC_FLAG_ALL_WATER.
|
||||
#define FOLLOWER_NPC_FLAG_CLEAR_ON_WHITE_OUT 0x80 // The NPC follower will be destroyed if the player whites out.
|
||||
|
||||
#define FOLLOWER_NPC_FLAG_ALL_LAND FOLLOWER_NPC_FLAG_HAS_RUNNING_FRAMES | FOLLOWER_NPC_FLAG_CAN_BIKE | FOLLOWER_NPC_FLAG_CAN_LEAVE_ROUTE
|
||||
#define FOLLOWER_NPC_FLAG_ALL_WATER FOLLOWER_NPC_FLAG_CAN_SURF | FOLLOWER_NPC_FLAG_CAN_WATERFALL | FOLLOWER_NPC_FLAG_CAN_DIVE
|
||||
#define FOLLOWER_NPC_FLAG_ALL FOLLOWER_NPC_FLAG_ALL_LAND | FOLLOWER_NPC_FLAG_ALL_WATER | FOLLOWER_NPC_FLAG_CLEAR_ON_WHITE_OUT
|
||||
|
||||
// Shorter flag names for ease of use in setfollower script macro
|
||||
#define FNPC_RUNNING FOLLOWER_NPC_FLAG_HAS_RUNNING_FRAMES
|
||||
#define FNPC_BIKE FOLLOWER_NPC_FLAG_CAN_BIKE
|
||||
#define FNPC_LEAVE_ROUTE FOLLOWER_NPC_FLAG_CAN_LEAVE_ROUTE
|
||||
#define FNPC_SURF FOLLOWER_NPC_FLAG_CAN_SURF
|
||||
#define FNPC_WATERFALL FOLLOWER_NPC_FLAG_CAN_WATERFALL
|
||||
#define FNPC_DIVE FOLLOWER_NPC_FLAG_CAN_DIVE
|
||||
#define FNPC_WHITE_OUT FOLLOWER_NPC_FLAG_CLEAR_ON_WHITE_OUT
|
||||
|
||||
#define FNPC_ALL_LAND FOLLOWER_NPC_FLAG_ALL_LAND
|
||||
#define FNPC_ALL_WATER FOLLOWER_NPC_FLAG_ALL_WATER
|
||||
#define FNPC_ALL FOLLOWER_NPC_FLAG_ALL
|
||||
|
||||
|
||||
#define FNPC_NONE 0
|
||||
#define FNPC_ALWAYS 2
|
||||
|
||||
#endif // GUARD_CONSTANTS_FOLLOWER_NPC_H
|
||||
@ -2,153 +2,139 @@
|
||||
#define GUARD_CONSTANTS_FORM_CHANGE_TYPES_H
|
||||
|
||||
// FORM_CHANGE_BATTLE_HP_PERCENT param2 arguments
|
||||
#define HP_HIGHER_THAN 1
|
||||
#define HP_LOWER_EQ_THAN 2
|
||||
enum FormChangeBattleHPPercentArguments
|
||||
{
|
||||
HP_HIGHER_THAN = 1,
|
||||
HP_LOWER_EQ_THAN,
|
||||
};
|
||||
// FORM_CHANGE_MOVE param2 Arguments
|
||||
#define WHEN_LEARNED 0
|
||||
#define WHEN_FORGOTTEN 1
|
||||
enum FormChangeMoveArguments
|
||||
{
|
||||
WHEN_LEARNED,
|
||||
WHEN_FORGOTTEN,
|
||||
};
|
||||
// FORM_CHANGE_ITEM_USE param2 Arguments
|
||||
#define DAY 1
|
||||
#define NIGHT 2
|
||||
enum FormChangeItemUseArguments
|
||||
{
|
||||
DAY = 1,
|
||||
NIGHT,
|
||||
};
|
||||
|
||||
#define FUSION_TERMINATOR 0xFF
|
||||
#define FORM_CHANGE_TERMINATOR 0
|
||||
|
||||
// Form change that activates when the specified item is given to or taken from the selected Pokémon.
|
||||
// param1: item to hold.
|
||||
// param2: ability to check for, optional.
|
||||
#define FORM_CHANGE_ITEM_HOLD 1
|
||||
|
||||
// Form change that activates when the item is used on the selected Pokémon.
|
||||
// param1: item to use
|
||||
// param2: time of day to check, optional.
|
||||
// - DAY if Form change that activates in the daytime.
|
||||
// - NIGHT if Form change that activates at nighttime.
|
||||
// - 0 if irrelevant, but param3 is necessary.
|
||||
// param3: illegal statuses to have, optional.
|
||||
#define FORM_CHANGE_ITEM_USE 2
|
||||
|
||||
// TODO: Form change that activates when the Pokémon learns or forgets the move.
|
||||
// param1: move to check for
|
||||
// param2:
|
||||
// - WHEN_LEARNED if Form change that activates when move is forgotten
|
||||
// - WHEN_FORGOTTEN if Form change that activates when move is learned
|
||||
#define FORM_CHANGE_MOVE 3
|
||||
|
||||
// Form change that activates when the Pokémon is withdrawn from the PC or Daycare.
|
||||
// Daycare withdraw done, PC withdraw TODO.
|
||||
// - No parameters.
|
||||
#define FORM_CHANGE_WITHDRAW 4
|
||||
|
||||
// Form change that activates when the Pokémon faints, either in battle or in the overworld by poison.
|
||||
// If species is not specified and it's on the player's side, it will try to use the value
|
||||
// saved in gBattleStruct->changedSpecies from a previous form change.
|
||||
// - No parameters.
|
||||
#define FORM_CHANGE_FAINT 5
|
||||
|
||||
// Form change that activates when the Pokémon is sent out at the beginning of a battle
|
||||
// param1: item to hold, optional
|
||||
// param2: a move that will be replaced, optional
|
||||
// param3: a new move to replace it with, optional
|
||||
#define FORM_CHANGE_BEGIN_BATTLE 6
|
||||
|
||||
// Form change that activates at the end of a battle. If species is not specified and it's on the player's side, it will try to use the value saved in gBattleStruct->changedSpecies from a previous form change.
|
||||
// param1: item to hold, optional
|
||||
// param2: a move that will be replaced, optional
|
||||
// param3: a new move to replace it with, optional
|
||||
#define FORM_CHANGE_END_BATTLE 7
|
||||
|
||||
// Form change that activates at the end of a battle based on the terrain if it participated in the battle and hasn't fainted. Takes priority over FORM_CHANGE_END_BATTLE.
|
||||
// param1: battle terrain to check.
|
||||
#define FORM_CHANGE_END_BATTLE_TERRAIN 8
|
||||
|
||||
// Form change that activates when the Pokémon is switched out in battle.
|
||||
// param1: ability to check, optional
|
||||
#define FORM_CHANGE_BATTLE_SWITCH 9
|
||||
|
||||
// Form change that activates when the Pokémon's HP % passes a certain threshold.
|
||||
// param1: Ability to check.
|
||||
// param2: HP comparer
|
||||
// - HP_HIGHER_THAN if the form triggers when the current HP is higher than the specified threshold.
|
||||
// - HP_LOWER_EQ_THAN if the form triggers when the current HP is lower or equal than the specified threshold.
|
||||
// param3: HP percentage threshold.
|
||||
#define FORM_CHANGE_BATTLE_HP_PERCENT 10
|
||||
|
||||
// Form change that activates when the mon has the defined item.
|
||||
// If it's on the player's side, it also requires ITEM_MEGA_RING in the user's bag and for the player to trigger it by pressing START before selecting a move.
|
||||
// param1: item to hold.
|
||||
#define FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM 11
|
||||
|
||||
// Form change that activates when the mon has the defined move.
|
||||
// If it's on the player's side, it also requires ITEM_MEGA_RING in the user's bag and for the player to trigger it by pressing START before selecting a move.
|
||||
// param1: move to have.
|
||||
#define FORM_CHANGE_BATTLE_MEGA_EVOLUTION_MOVE 12
|
||||
|
||||
// Form change that activates automatically when entering battle with the specified item.
|
||||
// If the item is a Red Orb, it uses the Omega Symbol for the animation and icon. Otherwise, it defaults to the Alpha symbol.
|
||||
// The battle indicator icon is based on the species, with Primal Groudon's as Omega and otherwise being Alpha.
|
||||
// param1: item to hold.
|
||||
#define FORM_CHANGE_BATTLE_PRIMAL_REVERSION 13
|
||||
|
||||
// Form change that activates when a specific weather is set during battle.
|
||||
// param1: weather to check
|
||||
// param2: (optional) revert if specified ability is lost
|
||||
#define FORM_CHANGE_BATTLE_WEATHER 14
|
||||
|
||||
// Form change that activates automatically when the turn ends.
|
||||
// param1: ability to check.
|
||||
#define FORM_CHANGE_BATTLE_TURN_END 15
|
||||
|
||||
// Form change that activates when the mon has the defined item.
|
||||
// If it's on the player's side, it also requires for the player to trigger it by pressing START before selecting a move.
|
||||
// param1: item to hold.
|
||||
#define FORM_CHANGE_BATTLE_ULTRA_BURST 16
|
||||
|
||||
// Form change that activates when the mon Dynamaxes (TODO: with Gigantamax factor).
|
||||
// - No parameters
|
||||
#define FORM_CHANGE_BATTLE_GIGANTAMAX 17
|
||||
|
||||
// Form change that activates at a certain time of day in the overworld automatically.
|
||||
// param1: time of day to check.
|
||||
// - DAY if Form change that activates in the daytime.
|
||||
// - NIGHT if Form change that activates at nighttime.
|
||||
#define FORM_CHANGE_TIME_OF_DAY 18
|
||||
|
||||
// Form change that depends on a multichoice (e.g. Rotom Catalog).
|
||||
// param1: multichoice list (starting at 0).
|
||||
#define FORM_CHANGE_ITEM_USE_MULTICHOICE 19
|
||||
|
||||
// Form change that activates when inflicted with a specific status
|
||||
// param1: status
|
||||
#define FORM_CHANGE_STATUS 20
|
||||
|
||||
// Form change that activates after move is used. Currently only used for activating Gulp Missile.
|
||||
#define FORM_CHANGE_HIT_BY_MOVE 21
|
||||
|
||||
// Form change that activates when terastallized as as a specific type
|
||||
// param1: tera type
|
||||
#define FORM_CHANGE_BATTLE_TERASTALLIZATION 22
|
||||
|
||||
// Form change that activates at midnight after a certain amount of days has passed.
|
||||
// Adding this form change will automatically make the countdown start as soon the Pokémon changes into a species other than the one specified for this form change.
|
||||
// param1: amount of days
|
||||
#define FORM_CHANGE_DAYS_PASSED 23
|
||||
|
||||
// Form change that activates before using a move.
|
||||
// param1: move to check
|
||||
// param2: ability to check, optional
|
||||
#define FORM_CHANGE_BATTLE_BEFORE_MOVE 24
|
||||
|
||||
// Form change that activates before using a specific move category.
|
||||
// param1: move category to check
|
||||
// param2: ability to check, optional
|
||||
#define FORM_CHANGE_BATTLE_BEFORE_MOVE_CATEGORY 25
|
||||
|
||||
// Form change that activates when overworld weather changes.
|
||||
// param1: weather to check.
|
||||
#define FORM_CHANGE_OVERWORLD_WEATHER 26
|
||||
|
||||
// Form change that activates when the Pokémon is deposited into the PC or Daycare.
|
||||
#define FORM_CHANGE_DEPOSIT 27
|
||||
enum FormChanges
|
||||
{
|
||||
FORM_CHANGE_TERMINATOR,
|
||||
// Form change that activates when the specified item is given to or taken from the selected Pokémon.
|
||||
// param1: item to hold.
|
||||
// param2: ability to check for, optional.
|
||||
FORM_CHANGE_ITEM_HOLD,
|
||||
// Form change that activates when the item is used on the selected Pokémon.
|
||||
// param1: item to use
|
||||
// param2: time of day to check, optional.
|
||||
// - DAY if Form change that activates in the daytime.
|
||||
// - NIGHT if Form change that activates at nighttime.
|
||||
// - 0 if irrelevant, but param3 is necessary.
|
||||
// param3: illegal statuses to have, optional.
|
||||
FORM_CHANGE_ITEM_USE,
|
||||
// TODO: Form change that activates when the Pokémon learns or forgets the move.
|
||||
// param1: move to check for
|
||||
// param2:
|
||||
// - WHEN_LEARNED if Form change that activates when move is forgotten
|
||||
// - WHEN_FORGOTTEN if Form change that activates when move is learned
|
||||
FORM_CHANGE_MOVE,
|
||||
// Form change that activates when the Pokémon is withdrawn from the PC or Daycare.
|
||||
// Daycare withdraw done, PC withdraw TODO.
|
||||
// - No parameters.
|
||||
FORM_CHANGE_WITHDRAW,
|
||||
// Form change that activates when the Pokémon faints, either in battle or in the overworld by poison.
|
||||
// If species is not specified and it's on the player's side, it will try to use the value
|
||||
// saved in gBattleStruct->changedSpecies from a previous form change.
|
||||
// - No parameters.
|
||||
FORM_CHANGE_FAINT,
|
||||
// Form change that activates when the Pokémon is sent out at the beginning of a battle
|
||||
// param1: item to hold, optional
|
||||
// param2: a move that will be replaced, optional
|
||||
// param3: a new move to replace it with, optional
|
||||
FORM_CHANGE_BEGIN_BATTLE,
|
||||
// Form change that activates at the end of a battle. If species is not specified and it's on the player's side, it will try to use the value saved in gBattleStruct->changedSpecies from a previous form change.
|
||||
// param1: item to hold, optional
|
||||
// param2: a move that will be replaced, optional
|
||||
// param3: a new move to replace it with, optional
|
||||
FORM_CHANGE_END_BATTLE,
|
||||
// Form change that activates at the end of a battle based on the terrain if it participated in the battle and hasn't fainted. Takes priority over FORM_CHANGE_END_BATTLE.
|
||||
// param1: battle terrain to check.
|
||||
FORM_CHANGE_END_BATTLE_TERRAIN,
|
||||
// Form change that activates when the Pokémon is switched out in battle.
|
||||
// param1: ability to check, optional
|
||||
FORM_CHANGE_BATTLE_SWITCH,
|
||||
// Form change that activates when the Pokémon's HP % passes a certain threshold.
|
||||
// param1: Ability to check.
|
||||
// param2: HP comparer
|
||||
// - HP_HIGHER_THAN if the form triggers when the current HP is higher than the specified threshold.
|
||||
// - HP_LOWER_EQ_THAN if the form triggers when the current HP is lower or equal than the specified threshold.
|
||||
// param3: HP percentage threshold.
|
||||
FORM_CHANGE_BATTLE_HP_PERCENT,
|
||||
// Form change that activates when the mon has the defined item.
|
||||
// If it's on the player's side, it also requires ITEM_MEGA_RING in the user's bag and for the player to trigger it by pressing START before selecting a move.
|
||||
// param1: item to hold.
|
||||
FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM,
|
||||
// Form change that activates when the mon has the defined move.
|
||||
// If it's on the player's side, it also requires ITEM_MEGA_RING in the user's bag and for the player to trigger it by pressing START before selecting a move.
|
||||
// param1: move to have.
|
||||
FORM_CHANGE_BATTLE_MEGA_EVOLUTION_MOVE,
|
||||
// Form change that activates automatically when entering battle with the specified item.
|
||||
// If the item is a Red Orb, it uses the Omega Symbol for the animation and icon. Otherwise, it defaults to the Alpha symbol.
|
||||
// The battle indicator icon is based on the species, with Primal Groudon's as Omega and otherwise being Alpha.
|
||||
// param1: item to hold.
|
||||
FORM_CHANGE_BATTLE_PRIMAL_REVERSION,
|
||||
// Form change that activates when a specific weather is set during battle.
|
||||
// param1: weather to check
|
||||
// param2: (optional) revert if specified ability is lost
|
||||
FORM_CHANGE_BATTLE_WEATHER,
|
||||
// Form change that activates automatically when the turn ends.
|
||||
// param1: ability to check.
|
||||
FORM_CHANGE_BATTLE_TURN_END,
|
||||
// Form change that activates when the mon has the defined item.
|
||||
// If it's on the player's side, it also requires for the player to trigger it by pressing START before selecting a move.
|
||||
// param1: item to hold.
|
||||
FORM_CHANGE_BATTLE_ULTRA_BURST,
|
||||
// Form change that activates when the mon Dynamaxes.
|
||||
// - No parameters
|
||||
FORM_CHANGE_BATTLE_GIGANTAMAX,
|
||||
// Form change that activates at a certain time of day in the overworld automatically.
|
||||
// param1: time of day to check.
|
||||
// - DAY if Form change that activates in the daytime.
|
||||
// - NIGHT if Form change that activates at nighttime.
|
||||
FORM_CHANGE_TIME_OF_DAY,
|
||||
// Form change that depends on a multichoice (e.g. Rotom Catalog).
|
||||
// param1: multichoice list (starting at 0).
|
||||
FORM_CHANGE_ITEM_USE_MULTICHOICE,
|
||||
// Form change that activates when inflicted with a specific status
|
||||
// param1: status
|
||||
FORM_CHANGE_STATUS,
|
||||
// Form change that activates after move is used. Currently only used for activating Gulp Missile.
|
||||
FORM_CHANGE_HIT_BY_MOVE,
|
||||
// Form change that activates when terastallized as as a specific type
|
||||
// param1: tera type
|
||||
FORM_CHANGE_BATTLE_TERASTALLIZATION,
|
||||
// Form change that activates at midnight after a certain amount of days has passed.
|
||||
// Adding this form change will automatically make the countdown start as soon the Pokémon changes into a species other than the one specified for this form change.
|
||||
// param1: amount of days
|
||||
FORM_CHANGE_DAYS_PASSED,
|
||||
// Form change that activates before using a move.
|
||||
// param1: move to check
|
||||
// param2: ability to check, optional
|
||||
FORM_CHANGE_BATTLE_BEFORE_MOVE,
|
||||
// Form change that activates before using a specific move category.
|
||||
// param1: move category to check
|
||||
// param2: ability to check, optional
|
||||
FORM_CHANGE_BATTLE_BEFORE_MOVE_CATEGORY,
|
||||
// Form change that activates when overworld weather changes.
|
||||
// param1: weather to check.
|
||||
FORM_CHANGE_OVERWORLD_WEATHER,
|
||||
// Form change that activates when the Pokémon is deposited into the PC or Daycare.
|
||||
FORM_CHANGE_DEPOSIT,
|
||||
};
|
||||
|
||||
#endif // GUARD_CONSTANTS_FORM_CHANGE_TYPES_H
|
||||
|
||||
@ -13,6 +13,7 @@ enum GenConfigTag
|
||||
GEN_CONFIG_HEAL_BELL_SOUNDPROOF,
|
||||
GEN_CONFIG_TELEPORT_BEHAVIOR,
|
||||
GEN_CONFIG_BATTLE_BOND,
|
||||
GEN_CONFIG_ATE_MULTIPLIER,
|
||||
GEN_CONFIG_COUNT
|
||||
};
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
#include "config/dexnav.h"
|
||||
#include "config/summary_screen.h"
|
||||
#include "config/ai.h"
|
||||
#include "config/follower_npc.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.
|
||||
|
||||
@ -246,65 +246,68 @@
|
||||
|
||||
#define EVOLUTIONS_END 0xFFFF // Not an actual evolution, used to mark the end of an evolution array.
|
||||
|
||||
enum EvolutionConditions {
|
||||
// Gen 2
|
||||
IF_GENDER, // The Pokémon is of specific gender.
|
||||
IF_TIME, // It is currently the specific time of day.
|
||||
IF_NOT_TIME, // It is NOT currently the specific time of day.
|
||||
IF_MIN_FRIENDSHIP, // The Pokémon has the defined amount of Friendship.
|
||||
IF_ATK_GT_DEF, // The Pokémon's Attack is greater than its Defense stat.
|
||||
IF_ATK_EQ_DEF, // The Pokémon's Attack is equal to its Defense stat.
|
||||
IF_ATK_LT_DEF, // The Pokémon's Attack is lower than its Defense stat.
|
||||
IF_HOLD_ITEM, // The Pokémon is holding a specific item.
|
||||
// Gen 3
|
||||
IF_PID_UPPER_MODULO_10_GT, // The Pokémon's upper personality value's modulo by 10 is greater than the defined value.
|
||||
IF_PID_UPPER_MODULO_10_EQ, // The Pokémon's upper personality value's modulo by 10 is equal to the defined value.
|
||||
IF_PID_UPPER_MODULO_10_LT, // The Pokémon's upper personality value's modulo by 10 is lower or equal than the defined value.
|
||||
IF_MIN_BEAUTY, // The Pokémon has the defined amount of Beauty.
|
||||
IF_MIN_COOLNESS, // The Pokémon has the defined amount of Coolness.
|
||||
IF_MIN_SMARTNESS, // The Pokémon has the defined amount of Smartness. (aka Cleverness in Gen6+)
|
||||
IF_MIN_TOUGHNESS, // The Pokémon has the defined amount of Toughness.
|
||||
IF_MIN_CUTENESS, // The Pokémon has the defined amount of Cuteness.
|
||||
// Gen 4
|
||||
IF_SPECIES_IN_PARTY, // The party contains a Pokémon of the specified species.
|
||||
IF_IN_MAP, // The player is currently in the specific map.
|
||||
IF_IN_MAPSEC, // The player is currently in the specific map sector.
|
||||
IF_KNOWS_MOVE, // The Pokémon knows specific move.
|
||||
// Gen 5
|
||||
IF_TRADE_PARTNER_SPECIES, // The Pokémon is traded for a specific species.
|
||||
// Gen 6
|
||||
IF_TYPE_IN_PARTY, // The party contains a Pokémon of the specified type.
|
||||
IF_WEATHER, // It is currently the specific weather in the current map.
|
||||
IF_KNOWS_MOVE_TYPE, // The Pokémon knows a move with a specific type.
|
||||
// Gen 8
|
||||
IF_NATURE, // The Pokémon has a specific nature.
|
||||
IF_AMPED_NATURE, // The Pokémon has one of the following natures: Hardy, Brave, Adamant, Naughty, Docile, Impish, Lax, Hasty, Jolly, Naive, Rash, Sassy, or Quirky.
|
||||
IF_LOW_KEY_NATURE, // The Pokémon has one of the following natures: Lonely, Bold, Relaxed, Timid, Serious, Modest, Mild, Quiet, Bashful, Calm, Gentle, or Careful.
|
||||
IF_RECOIL_DAMAGE_GE, // The Pokémon suffered at least certain amount of non-fainting recoil damage.
|
||||
IF_CURRENT_DAMAGE_GE, // The Pokémon has the specified difference of HP from its Max HP.
|
||||
IF_CRITICAL_HITS_GE, // The Pokémon performed the specified number of critical hits in one battle at least.
|
||||
IF_USED_MOVE_X_TIMES, // The Pokémon has used a move for at least X amount of times.
|
||||
// Gen 9
|
||||
IF_DEFEAT_X_WITH_ITEMS, // The Pokémon defeated X amount of Pokémon of the specified species that are holding the specified item.
|
||||
IF_PID_MODULO_100_GT, // The Pokémon's personality value's modulo by 100 is greater than the defined value.
|
||||
IF_PID_MODULO_100_EQ, // The Pokémon's personality value's modulo by 100 is equal than the defined value.
|
||||
IF_PID_MODULO_100_LT, // The Pokémon's personality value's modulo by 100 is lower than the defined value.
|
||||
IF_MIN_OVERWORLD_STEPS, // The Player has taken a specific amount of steps in the overworld with the Pokémon following them or in the first slot of the party.
|
||||
IF_BAG_ITEM_COUNT, // The Player has the specific amount of an item in the bag. It then removes those items.
|
||||
CONDITIONS_END
|
||||
};
|
||||
|
||||
enum EvolutionMethods {
|
||||
EVO_NONE, // Not an actual evolution, used to generate offspring that can't evolve into the specified species, like regional forms.
|
||||
EVO_FRIENDSHIP, // Pokémon levels up with friendship ≥ 220
|
||||
EVO_FRIENDSHIP_DAY, // Pokémon levels up during the day with friendship ≥ 220
|
||||
EVO_FRIENDSHIP_NIGHT, // Pokémon levels up at night with friendship ≥ 220
|
||||
EVO_LEVEL, // Pokémon reaches the specified level
|
||||
EVO_TRADE, // Pokémon is traded
|
||||
EVO_TRADE_ITEM, // Pokémon is traded while it's holding the specified item
|
||||
EVO_ITEM, // specified item is used on Pokémon
|
||||
EVO_LEVEL_ATK_GT_DEF, // Pokémon reaches the specified level with attack > defense
|
||||
EVO_LEVEL_ATK_EQ_DEF, // Pokémon reaches the specified level with attack = defense
|
||||
EVO_LEVEL_ATK_LT_DEF, // Pokémon reaches the specified level with attack < defense
|
||||
EVO_LEVEL_SILCOON, // Pokémon reaches the specified level with a Silcoon personality value
|
||||
EVO_LEVEL_CASCOON, // Pokémon reaches the specified level with a Cascoon personality value
|
||||
EVO_LEVEL_NINJASK, // Pokémon reaches the specified level (special value for Ninjask)
|
||||
EVO_LEVEL_SHEDINJA, // Pokémon reaches the specified level (special value for Shedinja)
|
||||
EVO_BEAUTY, // Pokémon levels up with beauty ≥ specified value
|
||||
EVO_LEVEL_FEMALE, // Pokémon reaches the specified level, is female
|
||||
EVO_LEVEL_MALE, // Pokémon reaches the specified level, is male
|
||||
EVO_LEVEL_NIGHT, // Pokémon reaches the specified level, is night
|
||||
EVO_LEVEL_DAY, // Pokémon reaches the specified level, is day
|
||||
EVO_LEVEL_DUSK, // Pokémon reaches the specified level, is dusk (5-6 P.M)
|
||||
EVO_ITEM_HOLD_DAY, // Pokémon levels up, holds specified item at day
|
||||
EVO_ITEM_HOLD_NIGHT, // Pokémon levels up, holds specified item at night
|
||||
EVO_MOVE, // Pokémon levels up, knows specified move
|
||||
EVO_FRIENDSHIP_MOVE_TYPE, // Pokémon levels up with friendship ≥ 220, knows move with specified type
|
||||
EVO_MAPSEC, // Pokémon levels up on specified mapsec
|
||||
EVO_ITEM_MALE, // specified item is used on a male Pokémon
|
||||
EVO_ITEM_FEMALE, // specified item is used on a female Pokémon
|
||||
EVO_LEVEL_RAIN, // Pokémon reaches the specified level during rain in the overworld
|
||||
EVO_SPECIFIC_MON_IN_PARTY, // Pokémon levels up with a specified Pokémon in party
|
||||
EVO_LEVEL_DARK_TYPE_MON_IN_PARTY, // Pokémon reaches the specified level with a Dark Type Pokémon in party
|
||||
EVO_TRADE_SPECIFIC_MON, // Pokémon is traded for a specified Pokémon
|
||||
EVO_SPECIFIC_MAP, // Pokémon levels up on specified map
|
||||
EVO_LEVEL_NATURE_AMPED, // Pokémon reaches the specified level, it has a Hardy, Brave, Adamant, Naughty, Docile, Impish, Lax, Hasty, Jolly, Naive, Rash, Sassy, or Quirky nature.
|
||||
EVO_LEVEL_NATURE_LOW_KEY, // Pokémon reaches the specified level, it has a Lonely, Bold, Relaxed, Timid, Serious, Modest, Mild, Quiet, Bashful, Calm, Gentle, or Careful nature.
|
||||
EVO_CRITICAL_HITS, // Pokémon performs specified number of critical hits in one battle
|
||||
EVO_SCRIPT_TRIGGER_DMG, // Pokémon has specified HP below max, then player interacts trigger
|
||||
EVO_DARK_SCROLL, // interacts with Scroll of Darkness
|
||||
EVO_WATER_SCROLL, // interacts with Scroll of Waters
|
||||
EVO_ITEM_NIGHT, // specified item is used on Pokémon, is night
|
||||
EVO_ITEM_DAY, // specified item is used on Pokémon, is day
|
||||
EVO_ITEM_HOLD, // Pokémon levels up, holds specified item
|
||||
EVO_LEVEL_FOG, // Pokémon reaches the specified level during fog in the overworld
|
||||
EVO_MOVE_TWO_SEGMENT, // Pokémon levels up, knows specified move, has a personality value with a modulus of 0
|
||||
EVO_MOVE_THREE_SEGMENT, // Pokémon levels up, knows specified move, has a personality value with a modulus of 1-99
|
||||
EVO_LEVEL_FAMILY_OF_THREE, // Pokémon reaches the specified level in battle with a personality value with a modulus of 0
|
||||
EVO_LEVEL_FAMILY_OF_FOUR, // Pokémon reaches the specified level in battle with a personality value with a modulus of 1-99
|
||||
EVO_USE_MOVE_TWENTY_TIMES, // Pokémon levels up after having used a move for at least 20 times
|
||||
EVO_RECOIL_DAMAGE_MALE, // Pokémon levels up after having suffered specified amount of non-fainting recoil damage as a male
|
||||
EVO_RECOIL_DAMAGE_FEMALE, // Pokémon levels up after having suffered specified amount of non-fainting recoil damage as a female
|
||||
EVO_ITEM_COUNT_999, // Pokémon levels up after trainer has collected 999 of a specific item
|
||||
EVO_DEFEAT_THREE_WITH_ITEM, // Pokémon levels up after having defeat 3 Pokémon of the same species holding the specified item
|
||||
EVO_OVERWORLD_STEPS, // Pokémon levels up after having taken a specific amount of steps in the overworld
|
||||
EVO_NONE, // Not an actual evolution, used to generate offspring that can't evolve into the specified species, like regional forms.
|
||||
EVO_LEVEL, // Pokémon reaches the specified level
|
||||
EVO_TRADE, // Pokémon is traded
|
||||
EVO_ITEM, // specified item is used on Pokémon
|
||||
EVO_SPLIT_FROM_EVO, // A clone is generated and evolved when another evolution happens
|
||||
EVO_SCRIPT_TRIGGER, // Player interacts with an overworld trigger
|
||||
EVO_LEVEL_BATTLE_ONLY, // Pokémon reaches the specified level, in battle only
|
||||
EVO_BATTLE_END, // Battle ends, doesn't need to level up
|
||||
EVO_SPIN // The player spins in the overworld
|
||||
};
|
||||
|
||||
enum EvolutionMode {
|
||||
EVO_MODE_NORMAL,
|
||||
EVO_MODE_CANT_STOP,
|
||||
EVO_MODE_TRADE,
|
||||
EVO_MODE_ITEM_USE,
|
||||
EVO_MODE_ITEM_CHECK, // If an Everstone is being held, still want to show that the stone *could* be used on that Pokémon to evolve
|
||||
@ -313,14 +316,27 @@ enum EvolutionMode {
|
||||
EVO_MODE_BATTLE_ONLY, // This mode is only used in battles to support Tandemaus' unique requirement
|
||||
};
|
||||
|
||||
// used to determine whether an evolution is happening or not, so we know if items should be removed
|
||||
enum EvoState {
|
||||
CHECK_EVO,
|
||||
DO_EVO,
|
||||
};
|
||||
|
||||
enum PokemonJumpType{
|
||||
PKMN_JUMP_TYPE_NONE, // Not allowed in Pokémon Jump
|
||||
enum PokemonJumpType {
|
||||
PKMN_JUMP_TYPE_NONE, // Not allowed in Pokémon Jump
|
||||
PKMN_JUMP_TYPE_NORMAL,
|
||||
PKMN_JUMP_TYPE_FAST,
|
||||
PKMN_JUMP_TYPE_SLOW,
|
||||
};
|
||||
|
||||
enum EvoSpinDirections {
|
||||
SPIN_CW_SHORT, // Player spins clockwise
|
||||
SPIN_CW_LONG, // Player spins clockwise
|
||||
SPIN_CCW_SHORT, // Player spins counter-clockwise
|
||||
SPIN_CCW_LONG, // Player spins counter-clockwise
|
||||
SPIN_EITHER, // Player spins either clockwise or counter-clockwise
|
||||
};
|
||||
|
||||
#define MON_PIC_WIDTH 64
|
||||
#define MON_PIC_HEIGHT 64
|
||||
#define MON_PIC_SIZE (MON_PIC_WIDTH * MON_PIC_HEIGHT / 2)
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
#define RGB_BLACK RGB(0, 0, 0)
|
||||
#define RGB_WHITE RGB(31, 31, 31)
|
||||
#define RGB_GRAY RGB(15, 15, 15)
|
||||
#define RGB_RED RGB(31, 0, 0)
|
||||
#define RGB_GREEN RGB(0, 31, 0)
|
||||
#define RGB_BLUE RGB(0, 0, 31)
|
||||
|
||||
@ -19,7 +19,8 @@
|
||||
#define WEATHER_ABNORMAL 15 // The alternating weather during Groudon/Kyogre conflict
|
||||
#define WEATHER_ROUTE119_CYCLE 20
|
||||
#define WEATHER_ROUTE123_CYCLE 21
|
||||
#define WEATHER_COUNT 22
|
||||
#define WEATHER_FOG 22 // Aggregate of WEATHER_FOG_HORIZONTAL and WEATHER_FOG_DIAGONAL
|
||||
#define WEATHER_COUNT 23
|
||||
|
||||
// These are used in maps' coord_weather_event entries.
|
||||
// They are not a one-to-one mapping with the engine's
|
||||
|
||||
@ -33,7 +33,7 @@ struct TrainerSprite
|
||||
{
|
||||
u8 y_offset;
|
||||
struct CompressedSpriteSheet frontPic;
|
||||
struct CompressedSpritePalette palette;
|
||||
struct SpritePalette palette;
|
||||
const union AnimCmd *const *const animation;
|
||||
const struct Coords16 mugshotCoords;
|
||||
s16 mugshotRotation;
|
||||
@ -43,7 +43,7 @@ struct TrainerBacksprite
|
||||
{
|
||||
struct MonCoords coordinates;
|
||||
struct CompressedSpriteSheet backPic;
|
||||
struct CompressedSpritePalette palette;
|
||||
struct SpritePalette palette;
|
||||
const union AnimCmd *const *const animation;
|
||||
};
|
||||
|
||||
@ -121,7 +121,7 @@ struct TypeInfo
|
||||
u16 isSpecialCaseType:1;
|
||||
u16 isHiddenPowerType:1; // Changing this for any type will change the distribution of all Hidden Power types from vanilla.
|
||||
u16 padding:11;
|
||||
const u32 *const paletteTMHM;
|
||||
const u16 *const paletteTMHM;
|
||||
//u16 enhanceItem;
|
||||
//u16 berry;
|
||||
//u16 gem;
|
||||
@ -171,6 +171,7 @@ extern const union AnimCmd *const gAnims_MonPic[];
|
||||
extern const union AnimCmd *const gAnims_Trainer[];
|
||||
extern const struct TrainerSprite gTrainerSprites[];
|
||||
extern const struct TrainerBacksprite gTrainerBacksprites[];
|
||||
extern const u16 gTrainerPicToTrainerBackPic[];
|
||||
|
||||
extern const struct Trainer gTrainers[DIFFICULTY_COUNT][TRAINERS_COUNT];
|
||||
extern const struct Trainer gBattlePartners[DIFFICULTY_COUNT][PARTNER_COUNT];
|
||||
@ -239,6 +240,10 @@ static inline const u8 GetTrainerPicFromId(u16 trainerId)
|
||||
{
|
||||
u32 sanitizedTrainerId = SanitizeTrainerId(trainerId);
|
||||
enum DifficultyLevel difficulty = GetTrainerDifficultyLevel(sanitizedTrainerId);
|
||||
enum DifficultyLevel partnerDifficulty = GetBattlePartnerDifficultyLevel(trainerId);
|
||||
|
||||
if (trainerId > TRAINER_PARTNER(PARTNER_NONE))
|
||||
return gBattlePartners[partnerDifficulty][trainerId - TRAINER_PARTNER(PARTNER_NONE)].trainerPic;
|
||||
|
||||
return gTrainers[difficulty][sanitizedTrainerId].trainerPic;
|
||||
}
|
||||
|
||||
28
include/datetime.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef GUARD_DATETIME_H
|
||||
#define GUARD_DATETIME_H
|
||||
|
||||
#include "global.h"
|
||||
#include "siirtc.h"
|
||||
|
||||
struct DateTime
|
||||
{
|
||||
u16 year;
|
||||
enum Month month;
|
||||
u8 day;
|
||||
enum Weekday dayOfWeek;
|
||||
u8 hour;
|
||||
u8 minute;
|
||||
u8 second;
|
||||
};
|
||||
|
||||
extern const struct DateTime gGen3Epoch;
|
||||
|
||||
void ConvertTimeToDateTime(struct DateTime *result, struct Time *timeSinceEpoch);
|
||||
void DateTime_AddDays(struct DateTime *dateTime, u32 days);
|
||||
void DateTime_AddHours(struct DateTime *dateTime, u32 hours);
|
||||
void DateTime_AddMinutes(struct DateTime *dateTime, u32 minutes);
|
||||
void DateTime_AddSeconds(struct DateTime *dateTime, u32 seconds);
|
||||
void ConvertDateTimeToRtc(struct SiiRtcInfo *result, struct DateTime *dateTime);
|
||||
void ConvertRtcToDateTime(struct DateTime *result, struct SiiRtcInfo *rtc);
|
||||
|
||||
#endif // GUARD_DATETIME_H
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
void Debug_ShowMainMenu(void);
|
||||
extern const u8 Debug_FlagsAndVarNotSetBattleConfigMessage[];
|
||||
const u8 *GetWeatherName(u32 weatherId);
|
||||
|
||||
extern EWRAM_DATA bool8 gIsDebugBattle;
|
||||
extern EWRAM_DATA u32 gDebugAIFlags;
|
||||
|
||||
@ -15,11 +15,6 @@ u32 LoadCompressedSpriteSheetByTemplate(const struct SpriteTemplate *template, s
|
||||
u32 LoadCompressedSpriteSheetOverrideBuffer(const struct CompressedSpriteSheet *src, void *buffer);
|
||||
bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet *src);
|
||||
|
||||
u32 LoadCompressedSpritePalette(const struct CompressedSpritePalette *src);
|
||||
u32 LoadCompressedSpritePaletteWithTag(const u32 *pal, u16 tag);
|
||||
void LoadCompressedSpritePaletteOverrideBuffer(const struct CompressedSpritePalette *src, void *buffer);
|
||||
bool8 LoadCompressedSpritePaletteUsingHeap(const struct CompressedSpritePalette *src);
|
||||
|
||||
void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void *buffer);
|
||||
|
||||
void HandleLoadSpecialPokePic(bool32 isFrontPic, void *dest, s32 species, u32 personality);
|
||||
|
||||
@ -4,11 +4,14 @@
|
||||
#include "config/dexnav.h"
|
||||
|
||||
// GUI Info
|
||||
#define ROW_WATER 0
|
||||
#define ROW_LAND_TOP 1
|
||||
#define ROW_LAND_BOT 2
|
||||
#define ROW_HIDDEN 3
|
||||
#define ROWS_COUNT 4
|
||||
enum RowGUIInfo
|
||||
{
|
||||
ROW_WATER,
|
||||
ROW_LAND_TOP,
|
||||
ROW_LAND_BOT,
|
||||
ROW_HIDDEN,
|
||||
ROWS_COUNT
|
||||
};
|
||||
|
||||
#define ROW_WATER_ICON_X 30
|
||||
#define ROW_WATER_ICON_Y 35
|
||||
@ -20,9 +23,12 @@
|
||||
#define ROW_HIDDEN_ICON_X 52
|
||||
#define ROW_HIDDEN_ICON_Y 138
|
||||
|
||||
#define ENCOUNTER_TYPE_LAND 0
|
||||
#define ENCOUNTER_TYPE_WATER 1
|
||||
#define ENCOUNTER_TYPE_HIDDEN 2 // Get from species
|
||||
enum EncounterType
|
||||
{
|
||||
ENCOUNTER_TYPE_LAND,
|
||||
ENCOUNTER_TYPE_WATER,
|
||||
ENCOUNTER_TYPE_HIDDEN // Get from species
|
||||
};
|
||||
|
||||
#define COL_WATER_COUNT 5
|
||||
#define COL_LAND_COUNT 6
|
||||
|
||||
@ -128,6 +128,7 @@ u8 GetObjectEventIdByXY(s16 x, s16 y);
|
||||
void SetObjectEventDirection(struct ObjectEvent *objectEvent, u8 direction);
|
||||
u8 GetFirstInactiveObjectEventId(void);
|
||||
u8 GetObjectEventIdByLocalId(u8);
|
||||
void RemoveObjectEvent(struct ObjectEvent *objectEvent);
|
||||
void RemoveObjectEventByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup);
|
||||
void LoadSpecialObjectReflectionPalette(u16 tag, u8 slot);
|
||||
void TryMoveObjectEventToMapCoords(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y);
|
||||
@ -145,13 +146,17 @@ u16 GetOverworldWeatherSpecies(u16 species);
|
||||
void UpdateFollowingPokemon(void);
|
||||
void RemoveFollowingPokemon(void);
|
||||
struct ObjectEvent *GetFollowerObject(void);
|
||||
u8 GetDirectionToFace(s16, s16, s16, s16);
|
||||
void UpdateLightSprite(struct Sprite *);
|
||||
void TrySpawnObjectEvents(s16 cameraX, s16 cameraY);
|
||||
u8 CreateObjectGraphicsSpriteWithTag(u16 graphicsId, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u16 paletteTag);
|
||||
u8 CreateObjectGraphicsSprite(u16, void (*)(struct Sprite *), s16 x, s16 y, u8 subpriority);
|
||||
u8 TrySpawnObjectEvent(u8 localId, u8 mapNum, u8 mapGroup);
|
||||
u8 SpawnSpecialObjectEventParameterized(u16 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 elevation);
|
||||
u8 SpawnSpecialObjectEvent(struct ObjectEventTemplate *);
|
||||
void SetSpritePosToMapCoords(s16 mapX, s16 mapY, s16 *destX, s16 *destY);
|
||||
void CameraObjectReset(void);
|
||||
u8 LoadObjectEventPalette(u16);
|
||||
u8 UpdateSpritePaletteByTemplate(const struct SpriteTemplate *, struct Sprite *);
|
||||
void ObjectEventSetGraphicsId(struct ObjectEvent *, u16 graphicsId);
|
||||
void ObjectEventTurn(struct ObjectEvent *, u8 direction);
|
||||
@ -249,6 +254,11 @@ void CameraObjectFreeze(void);
|
||||
u8 GetObjectEventBerryTreeId(u8 objectEventId);
|
||||
void SetBerryTreeJustPicked(u8 mapId, u8 mapNumber, u8 mapGroup);
|
||||
bool8 IsBerryTreeSparkling(u8 localId, u8 mapNum, u8 mapGroup);
|
||||
const struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup);
|
||||
u8 TrySpawnObjectEventTemplate(const struct ObjectEventTemplate *objectEventTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY);
|
||||
bool8 GetFollowerInfo(u32 *species, bool32 *shiny, bool32 *female);
|
||||
const struct ObjectEventGraphicsInfo *SpeciesToGraphicsInfo(u32 species, bool32 shiny, bool32 female);
|
||||
u16 GetObjectEventFlagIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup);
|
||||
|
||||
void MovementType_None(struct Sprite *);
|
||||
void MovementType_LookAround(struct Sprite *);
|
||||
@ -307,7 +317,6 @@ void MovementType_Invisible(struct Sprite *);
|
||||
void MovementType_WalkSlowlyInPlace(struct Sprite *);
|
||||
void MovementType_FollowPlayer(struct Sprite *);
|
||||
u8 GetSlideMovementAction(u32);
|
||||
u8 GetJumpMovementAction(u32);
|
||||
u8 GetJump2MovementAction(u32);
|
||||
u8 CopySprite(struct Sprite *sprite, s16 x, s16 y, u8 subpriority);
|
||||
u8 CreateCopySpriteAt(struct Sprite *sprite, s16 x, s16 y, u8 subpriority);
|
||||
@ -501,5 +510,6 @@ u8 GetSidewaysStairsCollision(struct ObjectEvent *objectEvent, u8 dir, u8 curren
|
||||
|
||||
bool8 MovementAction_EmoteX_Step0(struct ObjectEvent *, struct Sprite *);
|
||||
bool8 MovementAction_EmoteDoubleExclamationMark_Step0(struct ObjectEvent *, struct Sprite *);
|
||||
bool8 PlayerIsUnderWaterfall(struct ObjectEvent *objectEvent);
|
||||
|
||||
#endif //GUARD_EVENT_OBJECT_MOVEMENT_H
|
||||
|
||||
@ -407,6 +407,7 @@ extern const u8 EventScript_UseCut[];
|
||||
extern const u8 EventScript_UseRockSmash[];
|
||||
extern const u8 EventScript_UseDig[];
|
||||
extern const u8 EventScript_UseCutGrass[];
|
||||
extern const u8 EventScript_UseDefog[];
|
||||
|
||||
//player pc
|
||||
extern const u8 LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC[];
|
||||
@ -652,6 +653,27 @@ extern const u8 EventScript_VsSeekerChargingDone[];
|
||||
extern const u8 Common_Movement_FollowerSafeStart[];
|
||||
extern const u8 Common_Movement_FollowerSafeEnd[];
|
||||
|
||||
extern const u8 Common_Movement_WalkUpSlow[];
|
||||
extern const u8 Common_Movement_WalkDownSlow[];
|
||||
extern const u8 Common_Movement_WalkRightSlow[];
|
||||
extern const u8 Common_Movement_WalkLeftSlow[];
|
||||
extern const u8 Common_Movement_WalkUp[];
|
||||
extern const u8 Common_Movement_WalkDown[];
|
||||
extern const u8 Common_Movement_WalkRight[];
|
||||
extern const u8 Common_Movement_WalkLeft[];
|
||||
extern const u8 Common_Movement_WalkUpFast[];
|
||||
extern const u8 Common_Movement_WalkDownFast[];
|
||||
extern const u8 Common_Movement_WalkRightFast[];
|
||||
extern const u8 Common_Movement_WalkLeftFast[];
|
||||
extern const u8 Common_Movement_WalkUpFaster[];
|
||||
extern const u8 Common_Movement_WalkDownFaster[];
|
||||
extern const u8 Common_Movement_WalkRightFaster[];
|
||||
extern const u8 Common_Movement_WalkLeftFaster[];
|
||||
extern const u8 Common_Movement_FaceUp[];
|
||||
extern const u8 Common_Movement_FaceDown[];
|
||||
extern const u8 Common_Movement_FaceRight[];
|
||||
extern const u8 Common_Movement_FaceLeft[];
|
||||
|
||||
extern const u8 EventScript_CancelMessageBox[];
|
||||
extern const u8 Common_EventScript_ShowPokemonCenterSign[];
|
||||
extern const u8 Common_EventScript_ShowPokemartSign[];
|
||||
|
||||
@ -3,11 +3,16 @@
|
||||
|
||||
#include "siirtc.h"
|
||||
|
||||
struct Time* FakeRtc_GetCurrentTime(void);
|
||||
void FakeRtc_Reset(void);
|
||||
struct SiiRtcInfo* FakeRtc_GetCurrentTime(void);
|
||||
void FakeRtc_GetRawInfo(struct SiiRtcInfo *rtc);
|
||||
void FakeRtc_AdvanceTimeBy(u32 hours, u32 minutes, u32 seconds);
|
||||
void FakeRtc_ManuallySetTime(u32 hour, u32 minute, u32 second);
|
||||
void FakeRtc_AdvanceTimeBy(u32 days, u32 hours, u32 minutes, u32 seconds);
|
||||
void FakeRtc_ManuallySetTime(u32 day, u32 hour, u32 minute, u32 second);
|
||||
void FakeRtc_ForwardTimeTo(u32 hour, u32 minute, u32 second);
|
||||
void FakeRtc_TickTimeForward(void);
|
||||
u32 FakeRtc_GetSecondsRatio(void);
|
||||
void Script_PauseFakeRtc(void);
|
||||
void Script_ResumeFakeRtc(void);
|
||||
void Script_ToggleFakeRtc(void);
|
||||
|
||||
#endif // GUARD_FAKE_RTC_UTIL_H
|
||||
|
||||
@ -21,7 +21,7 @@ bool8 UpdateRevealDisguise(struct ObjectEvent *);
|
||||
void StartRevealDisguise(struct ObjectEvent *);
|
||||
void StartAshFieldEffect(s16, s16, u16, s16);
|
||||
void SetUpReflection(struct ObjectEvent *, struct Sprite *, u8);
|
||||
void SetUpShadow(struct ObjectEvent *, struct Sprite *);
|
||||
void SetUpShadow(struct ObjectEvent *);
|
||||
u32 StartFieldEffectForObjectEvent(u8, struct ObjectEvent *);
|
||||
u8 FindTallGrassFieldEffectSpriteId(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y);
|
||||
void UpdateRayquazaSpotlightEffect(struct Sprite *);
|
||||
|
||||