Merge branch 'battle_engine' of https://github.com/rh-hideout/pokeemerald-expansion into be_config

This commit is contained in:
Evan 2020-12-23 10:27:54 -07:00
commit 59813c9ce7
8 changed files with 280 additions and 50 deletions

View File

@ -3,6 +3,7 @@
#include "constants/rgb.h" #include "constants/rgb.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/moves.h" #include "constants/moves.h"
#include "constants/pokemon.h"
.include "asm/macros.inc" .include "asm/macros.inc"
.include "asm/macros/battle_anim_script.inc" .include "asm/macros/battle_anim_script.inc"
.include "constants/constants.inc" .include "constants/constants.inc"
@ -767,7 +768,15 @@ gBattleAnims_Moves::
.4byte Move_JUNGLE_HEALING .4byte Move_JUNGLE_HEALING
.4byte Move_WICKED_BLOW .4byte Move_WICKED_BLOW
.4byte Move_SURGING_STRIKES .4byte Move_SURGING_STRIKES
.4byte Move_COUNT @ cannot be reached, because last move is Surging Strikes .4byte Move_THUNDER_CAGE
.4byte Move_DRAGON_ENERGY
.4byte Move_FREEZING_GLARE
.4byte Move_FIERY_WRATH
.4byte Move_THUNDEROUS_KICK
.4byte Move_GLACIAL_LANCE
.4byte Move_ASTRAL_BARRAGE
.4byte Move_EERIE_SPELL
.4byte Move_COUNT @ cannot be reached, because last move is Eerie Spell
.align 2 .align 2
gBattleAnims_StatusConditions:: gBattleAnims_StatusConditions::
@ -2799,28 +2808,42 @@ Move_FIRE_FANG:
end end
Move_SHADOW_SNEAK: Move_SHADOW_SNEAK:
loadspritegfx ANIM_TAG_LICK loadspritegfx ANIM_TAG_IMPACT
setalpha 0, 16 loadspritegfx ANIM_TAG_WHITE_SHADOW @Destiny Bond
delay 1 loadspritegfx ANIM_TAG_QUICK_GUARD_HAND @Black Colour
createvisualtask AnimTask_InitMementoShadow, 2 loadspritegfx ANIM_TAG_POISON_BUBBLE @Poison
delay 1 loadspritegfx ANIM_TAG_HANDS_AND_FEET
createvisualtask AnimTask_MoveAttackerMementoShadow, 5 monbg ANIM_ATTACKER
playsewithpan SE_M_PSYBEAM, SOUND_PAN_ATTACKER launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x0 0x7 0x0000
delay 48
playsewithpan SE_M_PSYBEAM2, SOUND_PAN_ATTACKER
waitforvisualfinish waitforvisualfinish
createvisualtask sub_8114470, 2 playsewithpan SE_M_FAINT_ATTACK, SOUND_PAN_ATTACKER
setalpha 0, 16 launchtask AnimTask_TranslateMonEllipticalRespectSide 0x2 0x5 0x0 0x12 0x6 0x1 0x3
delay 1 launchtask AnimTask_AttackerFadeToInvisible 0x2 0x1 0x1
playsewithpan SE_M_LICK, SOUND_PAN_TARGET waitforvisualfinish
createsprite gLickSpriteTemplate, ANIM_TARGET, 2, 0, 0 clearmonbg ANIM_ATTACKER
createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 1, 0, 16, 1 invisible ANIM_ATTACKER
delay 0x1
launchtask AnimTask_DestinyBondWhiteShadow 0x5 0x2 0x0 0x30
delay 0x30
launchtask AnimTask_BlendColorCycle 0x2 0x6 ANIM_PAL_DEF 0x2 0x2 0x0 0xF 0x0
createsprite gShadowSneakImpactSpriteTemplate, ANIM_TARGET, 2, 0xfff6, 0xfff6, 0x0
call ShadowSneakMovement
createsprite gShadowSneakImpactSpriteTemplate, ANIM_TARGET, 2, 0xa, 0x14, 0x0
call ShadowSneakMovement
createsprite gShadowSneakImpactSpriteTemplate, ANIM_TARGET, 2, 0xfffb, 0xa, 0x0
call ShadowSneakMovement
createsprite gShadowSneakImpactSpriteTemplate, ANIM_TARGET, 2, 0x11, 0xfff4, 0x0
call ShadowSneakMovement
waitforvisualfinish
visible ANIM_ATTACKER
launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0x7 0x0 0x0000
waitforvisualfinish waitforvisualfinish
clearmonbg_23 ANIM_TARGET
delay 1
blendoff
delay 1
end end
ShadowSneakMovement:
playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET
launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 0x6 0x1
delay 0x4
return
Move_MUD_BOMB: Move_MUD_BOMB:
loadspritegfx ANIM_TAG_MUD_SAND loadspritegfx ANIM_TAG_MUD_SAND
@ -6745,10 +6768,10 @@ Move_SEARING_SHOT:
Move_TECHNO_BLAST: Move_TECHNO_BLAST:
launchtask AnimTask_TechnoBlast 0x5 0x0 launchtask AnimTask_TechnoBlast 0x5 0x0
jumpargeq 0x0, 10, TechnoBlastFire jumpargeq 0x0, TYPE_FIRE, TechnoBlastFire
jumpargeq 0x0, 11, TechnoBlastWater jumpargeq 0x0, TYPE_WATER, TechnoBlastWater
jumpargeq 0x0, 13, TechnoBlastElectric jumpargeq 0x0, TYPE_ELECTRIC, TechnoBlastElectric
jumpargeq 0x0, 15, TechnoBlastIce jumpargeq 0x0, TYPE_ICE, TechnoBlastIce
TechnoBlastNormal: TechnoBlastNormal:
loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @charge animation loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @charge animation
loadspritegfx ANIM_TAG_ORBS @circles loadspritegfx ANIM_TAG_ORBS @circles
@ -6884,7 +6907,7 @@ TechnoBlastElectric:
launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0 launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0
launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1 launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1
launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0 launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0
launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e SOUND_PAN_ATTACKER 0x28 0x2 launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x2
launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0 launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0
launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1 launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1
launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0 launchtemplate gTechnoBlastYellowSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0
@ -6893,20 +6916,20 @@ TechnoBlastElectric:
playsewithpan SE_M_EMBER, SOUND_PAN_ATTACKER playsewithpan SE_M_EMBER, SOUND_PAN_ATTACKER
launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x5 0x1 launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x5 0x1
launchtemplate gTechnoBlastYellowSmokeTemplate 0x82, 0x4, 0x8 0x8 0x1 0x0 launchtemplate gTechnoBlastYellowSmokeTemplate 0x82, 0x4, 0x8 0x8 0x1 0x0
launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0x5 0x0 0x5 0x0, ANIM_TARGET launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0x5 0x0 0x5 0x0
launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xfffb 0xa 0x5 0x1, ANIM_TARGET launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xfffb 0xa 0x5 0x1
delay 0x2 delay 0x2
launchtemplate gTechnoBlastYellowSmokeTemplate 0x82, 0x4, 0xfff8 0xfff8 0x1 0x0 launchtemplate gTechnoBlastYellowSmokeTemplate 0x82, 0x4, 0xfff8 0xfff8 0x1 0x0
launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xf 0x14 0x5 0x2, ANIM_TARGET launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xf 0x14 0x5 0x2
launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xfff1 0xfff6 0x5 0x0, ANIM_TARGET launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xfff1 0xfff6 0x5 0x0
delay 0x2 delay 0x2
launchtemplate gTechnoBlastYellowSmokeTemplate 0x82, 0x4, 0x8 0xfff8 0x1 0x0 launchtemplate gTechnoBlastYellowSmokeTemplate 0x82, 0x4, 0x8 0xfff8 0x1 0x0
launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0x19 0x0 0x5 0x1, ANIM_TARGET launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0x19 0x0 0x5 0x1
launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xfff8 0x8 0x5 0x2, ANIM_TARGET launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xfff8 0x8 0x5 0x2
delay 0x2 delay 0x2
launchtemplate gTechnoBlastYellowSmokeTemplate 0x82, 0x4, 0xfff8 0x8 0x1 0x0 launchtemplate gTechnoBlastYellowSmokeTemplate 0x82, 0x4, 0xfff8 0x8 0x1 0x0
launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0x2 0xfff8 0x5 0x0, ANIM_TARGET launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0x2 0xfff8 0x5 0x0
launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xffec 0xf 0x5 0x1, ANIM_TARGET launchtemplate gElectricitySpriteTemplate 0x82, 0x4, 0xffec 0xf 0x5 0x1
waitforvisualfinish waitforvisualfinish
launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0 launchtask AnimTask_BlendBattleAnimPal 0xa 0x5 ANIM_PAL_BG 0x1 0xC 0x0 0x0
waitforvisualfinish waitforvisualfinish
@ -7018,7 +7041,7 @@ TechnoBlastWater:
launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0 launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0
launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1 launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1
launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0 launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0
launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e SOUND_PAN_ATTACKER 0x28 0x2 launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x2
launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0 launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0
launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1 launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1
launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0 launchtemplate gTechnoBlastBlueSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0
@ -7071,7 +7094,7 @@ TechnoBlastFire:
launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0 launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0
launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1 launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1
launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0 launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0
launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e SOUND_PAN_ATTACKER 0x28 0x2 launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x2
launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0 launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0
launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1 launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1
launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0 launchtemplate gTechnoBlastRedSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0
@ -7080,13 +7103,13 @@ TechnoBlastFire:
playsewithpan SE_M_EMBER, SOUND_PAN_ATTACKER playsewithpan SE_M_EMBER, SOUND_PAN_ATTACKER
launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x5 0x1 launchtask AnimTask_ShakeMon2 0x2 0x5 0x1 0x4 0x0 0x5 0x1
launchtemplate gTechnoBlastRedSmokeTemplate 0x82, 0x4, 0x8 0x8 0x1 0x0 launchtemplate gTechnoBlastRedSmokeTemplate 0x82, 0x4, 0x8 0x8 0x1 0x0
launchtemplate gFireSpreadSpriteTemplate 0x81 0x5 0x0 0xa SOUND_PAN_ATTACKER 0xb0 0x28 createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, 192, 176, 40
launchtemplate gFireSpreadSpriteTemplate 0x81 0x5 0x0 0xa 0xff40 0xf0 0x28 createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, -192, 240, 40
launchtemplate gFireSpreadSpriteTemplate 0x81 0x5 0x0 0xa SOUND_PAN_ATTACKER 0xff60 0x28 createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, 192, -160, 40
launchtemplate gFireSpreadSpriteTemplate 0x81 0x5 0x0 0xa 0xff40 0xff90 0x28 createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, -192, -112, 40
launchtemplate gFireSpreadSpriteTemplate 0x81 0x5 0x0 0xa 0xa0 0x30 0x28 createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, 160, 48, 40
launchtemplate gFireSpreadSpriteTemplate 0x81 0x5 0x0 0xa 0xff20 0xffe0 0x28 createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, -224, -32, 40
launchtemplate gFireSpreadSpriteTemplate 0x81 0x5 0x0 0xa 0x70 0xff80 0x28 createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, 112, -128, 40
delay 0x2 delay 0x2
launchtemplate gTechnoBlastRedSmokeTemplate 0x82, 0x4, 0xfff8 0xfff8 0x1 0x0 launchtemplate gTechnoBlastRedSmokeTemplate 0x82, 0x4, 0xfff8 0xfff8 0x1 0x0
delay 0x2 delay 0x2
@ -7155,7 +7178,7 @@ TechnoBlastIce:
launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0 launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x0
launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1 launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x40 0x28 0x1
launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0 launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x80 0x28 0x0
launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e SOUND_PAN_ATTACKER 0x28 0x2 launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x10 0x1e 0x0 0x28 0x2
launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0 launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x20 0x28 0x0
launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1 launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0x60 0x28 0x1
launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0 launchtemplate gTechnoBlastIceSparkTemplate 0x84 0x7 0xa 0x0 0x8 0x1e 0xa0 0x28 0x0
@ -14006,6 +14029,30 @@ Move_WICKED_BLOW::
Move_SURGING_STRIKES:: Move_SURGING_STRIKES::
end @to do: end @to do:
Move_THUNDER_CAGE::
end @to do:
Move_DRAGON_ENERGY::
end @to do:
Move_FREEZING_GLARE::
end @to do:
Move_FIERY_WRATH::
end @to do:
Move_THUNDEROUS_KICK::
end @to do:
Move_GLACIAL_LANCE::
end @to do:
Move_ASTRAL_BARRAGE::
end @to do:
Move_EERIE_SPELL::
end @to do:
@@@@@@@@@@@@@@@@@@@@@@@ GEN 1-3 @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@ GEN 1-3 @@@@@@@@@@@@@@@@@@@@@@@
Move_NONE: Move_NONE:
Move_MIRROR_MOVE: Move_MIRROR_MOVE:
@ -24428,4 +24475,3 @@ Special_CriticalCaptureBallThrow:
createvisualtask AnimTask_IsBallBlockedByTrainer, 2 createvisualtask AnimTask_IsBallBlockedByTrainer, 2
jumpreteq -1, BallThrowTrainerBlock jumpreteq -1, BallThrowTrainerBlock
goto BallThrowEnd goto BallThrowEnd

View File

@ -113,7 +113,7 @@
#define B_CAN_SPITE_FAIL GEN_6 // In Gen4+, Spite can no longer fail if the foe's last move only has 1 remaining PP. #define B_CAN_SPITE_FAIL GEN_6 // In Gen4+, Spite can no longer fail if the foe's last move only has 1 remaining PP.
// Ability settings // Ability settings
#define B_ABILITY_WEATHER GEN_6 // In Gen5+, weather caused by abilities lasts the same amount of turns as induced from a move. Before, they lasted till the battle's end or weather change by a move. #define B_ABILITY_WEATHER GEN_6 // In Gen6+, ability-induced weather lasts 5 turns. Before, it lasted until the battle ended or until it was changed by a move.
#define B_GALE_WINGS GEN_6 // In Gen7+ requires full HP to trigger. #define B_GALE_WINGS GEN_6 // In Gen7+ requires full HP to trigger.
#define B_STANCE_CHANGE_FAIL GEN_7 // In Gen7+, Stance Change fails if the Pokémon is unable to use a move because of confusion, paralysis, etc. In Gen6, it doesn't. #define B_STANCE_CHANGE_FAIL GEN_7 // In Gen7+, Stance Change fails if the Pokémon is unable to use a move because of confusion, paralysis, etc. In Gen6, it doesn't.
#define B_GHOSTS_ESCAPE GEN_6 // In Gen6+, ghosts can escape even when blocked by abilities such as Shadow Tag. #define B_GHOSTS_ESCAPE GEN_6 // In Gen6+, ghosts can escape even when blocked by abilities such as Shadow Tag.
@ -126,8 +126,9 @@
#define B_HP_BERRIES GEN_6 // In Gen4+, berries which restore hp activate immediately after hp drops to half. In gen3, the effect occurs at the end of the turn. #define B_HP_BERRIES GEN_6 // In Gen4+, berries which restore hp activate immediately after hp drops to half. In gen3, the effect occurs at the end of the turn.
#define B_BERRIES_INSTANT GEN_6 // In Gen4+, most berries activate on battle start/switch-in if applicable. In gen3, they only activate either at the move end or turn end. #define B_BERRIES_INSTANT GEN_6 // In Gen4+, most berries activate on battle start/switch-in if applicable. In gen3, they only activate either at the move end or turn end.
// Flag settings. // Flag settings
// To use the following features in scripting, replace the 0s with the flag ID you're assigning it to. Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag for toggling the feature. // To use the following features in scripting, replace the 0s with the flag ID you're assigning it to.
// Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature.
#define B_FLAG_INVERSE_BATTLE 0 // If this flag is set, the battle's type effectiveness are inversed. For example, fire is super effective against water. #define B_FLAG_INVERSE_BATTLE 0 // If this flag is set, the battle's type effectiveness are inversed. For example, fire is super effective against water.
#define B_FLAG_FORCE_DOUBLE_WILD 0 // If this flag is set, all land and surfing wild battles will be double battles. #define B_FLAG_FORCE_DOUBLE_WILD 0 // If this flag is set, all land and surfing wild battles will be double battles.

View File

@ -772,8 +772,17 @@
#define MOVE_JUNGLE_HEALING 744 #define MOVE_JUNGLE_HEALING 744
#define MOVE_WICKED_BLOW 745 #define MOVE_WICKED_BLOW 745
#define MOVE_SURGING_STRIKES 746 #define MOVE_SURGING_STRIKES 746
// Crown Tundra Moves
#define MOVE_THUNDER_CAGE 747
#define MOVE_DRAGON_ENERGY 748
#define MOVE_FREEZING_GLARE 749
#define MOVE_FIERY_WRATH 750
#define MOVE_THUNDEROUS_KICK 751
#define MOVE_GLACIAL_LANCE 752
#define MOVE_ASTRAL_BARRAGE 753
#define MOVE_EERIE_SPELL 754
#define MOVES_COUNT_GEN8 747 #define MOVES_COUNT_GEN8 755
#define MOVES_COUNT MOVES_COUNT_GEN8 #define MOVES_COUNT MOVES_COUNT_GEN8

View File

@ -67,6 +67,18 @@ static const union AffineAnimCmd sSquishTargetAffineAnimCmds[] =
}; };
//// GEN 4 //// GEN 4
// shadow sneak
const struct SpriteTemplate gShadowSneakImpactSpriteTemplate =
{
.tileTag = ANIM_TAG_IMPACT,
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
.oam = &gOamData_AffineNormal_ObjBlend_32x32,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gAffineAnims_IceCrystalHit,
.callback = AnimIceEffectParticle
};
// power trick // power trick
const struct SpriteTemplate gPowerTrickSpriteTemplate = const struct SpriteTemplate gPowerTrickSpriteTemplate =
{ {

View File

@ -1526,7 +1526,10 @@ static void PlayerPartnerHandleChooseMove(void)
gBattlerTarget = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT); gBattlerTarget = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT);
} }
BtlController_EmitTwoReturnValues(1, 10, chosenMoveId | (gBattlerTarget << 8)); if (CanMegaEvolve(gActiveBattler)) // If partner can mega evolve, do it.
BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (RET_MEGA_EVOLUTION) | (gBattlerTarget << 8));
else
BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (gBattlerTarget << 8));
PlayerPartnerBufferExecCompleted(); PlayerPartnerBufferExecCompleted();
} }

View File

@ -11386,4 +11386,116 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_IRON_FIST_BOOST, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_IRON_FIST_BOOST,
.split = SPLIT_PHYSICAL, .split = SPLIT_PHYSICAL,
}, },
[MOVE_THUNDER_CAGE] =
{
.effect = EFFECT_TRAP,
.power = 80,
.type = TYPE_ELECTRIC,
.accuracy = 90,
.pp = 15,
.secondaryEffectChance = 100,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
.split = SPLIT_SPECIAL,
},
[MOVE_DRAGON_ENERGY] =
{
.effect = EFFECT_ERUPTION,
.power = 150,
.type = TYPE_DRAGON,
.accuracy = 100,
.pp = 5,
.secondaryEffectChance = 0,
.target = MOVE_TARGET_BOTH,
.priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
.split = SPLIT_SPECIAL,
},
[MOVE_FREEZING_GLARE] =
{
.power = 90,
.effect = EFFECT_FREEZE_HIT,
.type = TYPE_PSYCHIC,
.accuracy = 100,
.pp = 10,
.secondaryEffectChance = 10,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
.split = SPLIT_SPECIAL,
},
[MOVE_FIERY_WRATH] =
{
.effect = EFFECT_FLINCH_HIT,
.power = 90,
.type = TYPE_DARK,
.accuracy = 100,
.pp = 10,
.secondaryEffectChance = 20,
.target = MOVE_TARGET_BOTH,
.priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED,
.split = SPLIT_SPECIAL,
},
[MOVE_THUNDEROUS_KICK] =
{
.effect = EFFECT_DEFENSE_DOWN_HIT,
.power = 90,
.type = TYPE_FIGHTING,
.accuracy = 100,
.pp = 10,
.secondaryEffectChance = 100,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
.split = SPLIT_PHYSICAL,
},
[MOVE_GLACIAL_LANCE] =
{
.effect = EFFECT_HIT,
.power = 130,
.type = TYPE_ICE,
.accuracy = 100,
.pp = 5,
.secondaryEffectChance = 0,
.target = MOVE_TARGET_BOTH,
.priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
.split = SPLIT_PHYSICAL,
},
[MOVE_ASTRAL_BARRAGE] =
{
.effect = EFFECT_HIT,
.power = 120,
.type = TYPE_GHOST,
.accuracy = 100,
.pp = 5,
.secondaryEffectChance = 0,
.target = MOVE_TARGET_BOTH,
.priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
.split = SPLIT_SPECIAL,
},
[MOVE_EERIE_SPELL] =
{
.effect = EFFECT_HIT, // To do. It's a copy of Spite that inflicts damage and reduced the target's last move's PP by 3 instead of 4.
.power = 80,
.type = TYPE_PSYCHIC,
.accuracy = 100,
.pp = 5,
.secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SOUND,
.split = SPLIT_SPECIAL,
},
}; };

View File

@ -2910,6 +2910,38 @@ static const u8 sSURGING_STRIKESDescription[] = _(
"Mastering the Water style,\n" "Mastering the Water style,\n"
"strikes with 3 critical hits."); "strikes with 3 critical hits.");
static const u8 sTHUNDER_CAGEDescription[] = _(
"Traps the foe in a cage of\n"
"electricity for 2 to 5 turns.");
static const u8 sDRAGON_ENERGYDescription[] = _(
"The higher the user's HP\n"
"the more damage caused.");
static const u8 sFREEZING_GLAREDescription[] = _(
"Shoots psychic power from\n"
"the eyes. May freeze the foe.");
static const u8 sFIERY_WRATHDescription[] = _(
"An attack fueled by your\n"
"wrath. May cause flinching.");
static const u8 sTHUNDEROUS_KICKDescription[] = _(
"Uses a lightning-like kick\n"
"to hit. Lowers foe's Defense.");
static const u8 sGLACIAL_LANCEDescription[] = _(
"Strikes by hurling a blizzard-\n"
"cloaked icicle lance at a foe.");
static const u8 sASTRAL_BARRAGEDescription[] = _(
"Strikes by sending a frightful\n"
"amount of ghosts at a foe.");
static const u8 sEERIE_SPELLDescription[] = _(
"Attacks with psychic power.\n"
"Foe's last move has 3 PP cut.");
static const u8 sNotDoneYetDescription[] = _( static const u8 sNotDoneYetDescription[] = _(
"Not done yet."); "Not done yet.");
@ -3664,5 +3696,12 @@ const u8 *const gMoveDescriptionPointers[MOVES_COUNT - 1] =
[MOVE_JUNGLE_HEALING - 1] = sJUNGLE_HEALINGDescription, [MOVE_JUNGLE_HEALING - 1] = sJUNGLE_HEALINGDescription,
[MOVE_WICKED_BLOW - 1] = sWICKED_BLOWDescription, [MOVE_WICKED_BLOW - 1] = sWICKED_BLOWDescription,
[MOVE_SURGING_STRIKES - 1] = sSURGING_STRIKESDescription, [MOVE_SURGING_STRIKES - 1] = sSURGING_STRIKESDescription,
[MOVE_THUNDER_CAGE - 1] = sTHUNDER_CAGEDescription,
[MOVE_DRAGON_ENERGY - 1] = sDRAGON_ENERGYDescription,
[MOVE_FREEZING_GLARE - 1] = sFREEZING_GLAREDescription,
[MOVE_FIERY_WRATH - 1] = sFIERY_WRATHDescription,
[MOVE_THUNDEROUS_KICK - 1] = sTHUNDEROUS_KICKDescription,
[MOVE_GLACIAL_LANCE - 1] = sGLACIAL_LANCEDescription,
[MOVE_ASTRAL_BARRAGE - 1] = sASTRAL_BARRAGEDescription,
[MOVE_EERIE_SPELL - 1] = sEERIE_SPELLDescription,
}; };

View File

@ -748,4 +748,12 @@ const u8 gMoveNames[MOVES_COUNT][MOVE_NAME_LENGTH + 1] =
[MOVE_JUNGLE_HEALING] = _("Jungle Heal"), [MOVE_JUNGLE_HEALING] = _("Jungle Heal"),
[MOVE_WICKED_BLOW] = _("Wicked Blow"), [MOVE_WICKED_BLOW] = _("Wicked Blow"),
[MOVE_SURGING_STRIKES] = _("SurgeStrikes"), [MOVE_SURGING_STRIKES] = _("SurgeStrikes"),
[MOVE_THUNDER_CAGE] = _("Thunder Cage"),
[MOVE_DRAGON_ENERGY] = _("DragonEnergy"),
[MOVE_FREEZING_GLARE] = _("FreezngGlare"),
[MOVE_FIERY_WRATH] = _("Fiery Wrath"),
[MOVE_THUNDEROUS_KICK] = _("ThnderusKick"),
[MOVE_GLACIAL_LANCE] = _("GlacialLance"),
[MOVE_ASTRAL_BARRAGE] = _("AstrlBarrage"),
[MOVE_EERIE_SPELL] = _("Eerie Spell"),
}; };