fix conflicts

This commit is contained in:
Evan 2020-12-14 08:50:41 -07:00
commit b85dacce9d
10 changed files with 68 additions and 31 deletions

View File

@ -1756,6 +1756,10 @@
.4byte \ptr .4byte \ptr
.endm .endm
.macro destroyabilitypopup
various BS_ABILITY_BATTLER, VARIOUS_DESTROY_ABILITY_POPUP
.endm
.macro gettotemboost ptr:req .macro gettotemboost ptr:req
various BS_ATTACKER, VARIOUS_TOTEM_BOOST various BS_ATTACKER, VARIOUS_TOTEM_BOOST
.4byte \ptr .4byte \ptr

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"
@ -6746,10 +6747,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
@ -6885,7 +6886,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
@ -6894,20 +6895,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
@ -7019,7 +7020,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
@ -7072,7 +7073,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
@ -7081,13 +7082,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
@ -7156,7 +7157,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
@ -24459,4 +24460,3 @@ Special_CriticalCaptureBallThrow:
createvisualtask AnimTask_IsBallBlockedByTrainer, 2 createvisualtask AnimTask_IsBallBlockedByTrainer, 2
jumpreteq -1, BallThrowTrainerBlock jumpreteq -1, BallThrowTrainerBlock
goto BallThrowEnd goto BallThrowEnd

View File

@ -520,6 +520,7 @@ struct BattleStruct
u8 savedBattlerTarget; u8 savedBattlerTarget;
bool8 ateBoost[MAX_BATTLERS_COUNT]; bool8 ateBoost[MAX_BATTLERS_COUNT];
u8 activeAbilityPopUps; // as bits for each battler u8 activeAbilityPopUps; // as bits for each battler
u8 abilityPopUpSpriteIds[MAX_BATTLERS_COUNT][2]; // two per battler
bool8 throwingPokeBall; bool8 throwingPokeBall;
struct MegaEvolutionData mega; struct MegaEvolutionData mega;
const u8 *trainerSlideMsg; const u8 *trainerSlideMsg;
@ -611,6 +612,7 @@ struct BattleScripting
u16 moveEffect; u16 moveEffect;
u16 multihitMoveEffect; u16 multihitMoveEffect;
u8 illusionNickHack; // To properly display nick in STRINGID_ENEMYABOUTTOSWITCHPKMN. u8 illusionNickHack; // To properly display nick in STRINGID_ENEMYABOUTTOSWITCHPKMN.
bool8 fixedPopup; // force ability popup to stick until manually called back
}; };
// rom_80A5C6C // rom_80A5C6C

View File

@ -92,5 +92,6 @@ s32 MoveBattleBar(u8 battler, u8 healthboxSpriteId, u8 whichBar, u8 arg3);
u8 GetScaledHPFraction(s16 hp, s16 maxhp, u8 scale); u8 GetScaledHPFraction(s16 hp, s16 maxhp, u8 scale);
u8 GetHPBarLevel(s16 hp, s16 maxhp); u8 GetHPBarLevel(s16 hp, s16 maxhp);
void CreateAbilityPopUp(u8 battlerId, u32 ability, bool32 isDoubleBattle); void CreateAbilityPopUp(u8 battlerId, u32 ability, bool32 isDoubleBattle);
void DestroyAbilityPopUp(u8 battlerId);
#endif // GUARD_BATTLE_INTERFACE_H #endif // GUARD_BATTLE_INTERFACE_H

View File

@ -109,11 +109,13 @@
#define B_DISABLE_TURNS GEN_6 // Disable's turns. See Cmd_disablelastusedattack. #define B_DISABLE_TURNS GEN_6 // Disable's turns. See Cmd_disablelastusedattack.
#define B_INCINERATE_GEMS GEN_6 // In Gen6+, Incinerate can destroy Gems. #define B_INCINERATE_GEMS GEN_6 // In Gen6+, Incinerate can destroy Gems.
#define B_MINIMIZE_DMG_ACC GEN_6 // In Gen6+, moves that causes double damage to minimized Pokémon will also skip accuracy checks. #define B_MINIMIZE_DMG_ACC GEN_6 // In Gen6+, moves that causes double damage to minimized Pokémon will also skip accuracy checks.
#define B_PP_REDUCED_BY_SPITE GEN_6 // In Gen4+, Spite reduces the foe's last move's PP by 4, instead of 2 to 5.
#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 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_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+, Aegislash's form change does not happen, if the Pokémon cannot use a move, because of confusion, paralysis, etc. In gen6, the form change occurs despite not being able to move. #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.
#define B_MOODY_ACC_EVASION GEN_6 // In Gen8+, Moody CANNOT raise Accuray and Evasion any more. #define B_MOODY_ACC_EVASION GEN_6 // In Gen8+, Moody CANNOT raise Accuray and Evasion any more.
#define B_FLASH_FIRE_FROZEN GEN_6 // In Gen5+, Flash Fire can trigger even when frozen, when it couldn't before. #define B_FLASH_FIRE_FROZEN GEN_6 // In Gen5+, Flash Fire can trigger even when frozen, when it couldn't before.

View File

@ -35,6 +35,7 @@
#define sMOVE_EFFECT gBattleScripting + 0x2E #define sMOVE_EFFECT gBattleScripting + 0x2E
#define sMULTIHIT_EFFECT gBattleScripting + 0x30 #define sMULTIHIT_EFFECT gBattleScripting + 0x30
#define sILLUSION_NICK_HACK gBattleScripting + 0x32 #define sILLUSION_NICK_HACK gBattleScripting + 0x32
#define sFIXED_ABILITY_POPUP gBattleScripting + 0x33
#define cMULTISTRING_CHOOSER gBattleCommunication + 5 #define cMULTISTRING_CHOOSER gBattleCommunication + 5
@ -165,7 +166,8 @@
#define VARIOUS_SET_LAST_USED_ITEM 99 #define VARIOUS_SET_LAST_USED_ITEM 99
#define VARIOUS_PARALYZE_TYPE_IMMUNITY 100 #define VARIOUS_PARALYZE_TYPE_IMMUNITY 100
#define VARIOUS_JUMP_IF_ABSENT 101 #define VARIOUS_JUMP_IF_ABSENT 101
#define VARIOUS_TOTEM_BOOST 102 #define VARIOUS_DESTROY_ABILITY_POPUP 102
#define VARIOUS_TOTEM_BOOST 103
// Cmd_manipulatedamage // Cmd_manipulatedamage
#define DMG_CHANGE_SIGN 0 #define DMG_CHANGE_SIGN 0

View File

@ -14,6 +14,7 @@
#include "battle_scripts.h" #include "battle_scripts.h"
#include "battle_controllers.h" #include "battle_controllers.h"
#include "constants/moves.h" #include "constants/moves.h"
#include "constants/hold_effects.h"
//// function declarations //// function declarations
static void SpriteCB_SpriteToCentreOfSide(struct Sprite* sprite); static void SpriteCB_SpriteToCentreOfSide(struct Sprite* sprite);
@ -5001,8 +5002,9 @@ void AnimTask_PurpleFlamesOnTarget(u8 taskId)
void AnimTask_TechnoBlast(u8 taskId) void AnimTask_TechnoBlast(u8 taskId)
{ {
//gBattleAnimArgs[0] = gItems[GetBattlerPartyData(gBattleAnimAttacker).item].holdEffectParam; if (ItemId_GetHoldEffect(gBattleMons[gBattleAnimAttacker].item) == HOLD_EFFECT_DRIVE)
gBattleAnimArgs[0] = ItemId_GetHoldEffectParam(gBattleMons[gBattleAnimAttacker].item); gBattleAnimArgs[0] = ItemId_GetSecondaryId(gBattleMons[gBattleAnimAttacker].item);
else
gBattleAnimArgs[0] = 0;
DestroyAnimVisualTask(taskId); DestroyAnimVisualTask(taskId);
} }

View File

@ -3062,6 +3062,9 @@ void CreateAbilityPopUp(u8 battlerId, u32 ability, bool32 isDoubleBattle)
gSprites[spriteId1].tRightToLeft = FALSE; gSprites[spriteId1].tRightToLeft = FALSE;
gSprites[spriteId2].tRightToLeft = FALSE; gSprites[spriteId2].tRightToLeft = FALSE;
} }
gBattleStruct->abilityPopUpSpriteIds[gBattleAnimAttacker][0] = spriteId1;
gBattleStruct->abilityPopUpSpriteIds[gBattleAnimAttacker][1] = spriteId2;
taskId = CreateTask(Task_FreeAbilityPopUpGfx, 5); taskId = CreateTask(Task_FreeAbilityPopUpGfx, 5);
gTasks[taskId].tSpriteId1 = spriteId1; gTasks[taskId].tSpriteId1 = spriteId1;
@ -3110,11 +3113,19 @@ static void SpriteCb_AbilityPopUp(struct Sprite *sprite)
} }
else else
{ {
sprite->tFrames--; if (!gBattleScripting.fixedPopup)
sprite->tFrames--;
} }
} }
} }
void DestroyAbilityPopUp(u8 battlerId)
{
gSprites[gBattleStruct->abilityPopUpSpriteIds[battlerId][0]].tFrames = 0;
gSprites[gBattleStruct->abilityPopUpSpriteIds[battlerId][1]].tFrames = 0;
gBattleScripting.fixedPopup = FALSE;
}
static void Task_FreeAbilityPopUpGfx(u8 taskId) static void Task_FreeAbilityPopUpGfx(u8 taskId)
{ {
if (!gSprites[gTasks[taskId].tSpriteId1].inUse if (!gSprites[gTasks[taskId].tSpriteId1].inUse

View File

@ -8300,6 +8300,9 @@ static void Cmd_various(void)
gBattlescriptCurrInstr += 7; gBattlescriptCurrInstr += 7;
} }
return; return;
case VARIOUS_DESTROY_ABILITY_POPUP:
DestroyAbilityPopUp(gActiveBattler);
break;
case VARIOUS_TOTEM_BOOST: case VARIOUS_TOTEM_BOOST:
gActiveBattler = gBattlerAttacker; gActiveBattler = gBattlerAttacker;
if (gTotemBoosts[gActiveBattler].stats == 0) if (gTotemBoosts[gActiveBattler].stats == 0)
@ -10227,9 +10230,18 @@ static void Cmd_tryspiteppreduce(void)
break; break;
} }
#if B_CAN_SPITE_FAIL <= GEN_3
if (i != MAX_MON_MOVES && gBattleMons[gBattlerTarget].pp[i] > 1) if (i != MAX_MON_MOVES && gBattleMons[gBattlerTarget].pp[i] > 1)
#else
if (i != MAX_MON_MOVES && gBattleMons[gBattlerTarget].pp[i] != 0)
#endif
{ {
#if B_PP_REDUCED_BY_SPITE <= GEN_3
s32 ppToDeduct = (Random() & 3) + 2; s32 ppToDeduct = (Random() & 3) + 2;
#else
s32 ppToDeduct = 4;
#endif
if (gBattleMons[gBattlerTarget].pp[i] < ppToDeduct) if (gBattleMons[gBattlerTarget].pp[i] < ppToDeduct)
ppToDeduct = gBattleMons[gBattlerTarget].pp[i]; ppToDeduct = gBattleMons[gBattlerTarget].pp[i];

View File

@ -45,7 +45,8 @@ void FreeBattleResources(void)
{ {
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL) if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL)
FreeTrainerHillBattleStruct(); FreeTrainerHillBattleStruct();
gFieldStatuses = 0;
if (gBattleResources != NULL) if (gBattleResources != NULL)
{ {
FREE_AND_SET_NULL(gBattleStruct); FREE_AND_SET_NULL(gBattleStruct);