Adds Move Psychic Noise (#4005)
* Adds Move Psychic Noise * changes psychic noise from effect to move_effect * remove leftover --------- Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
This commit is contained in:
parent
cdf7190d15
commit
8f99ef16be
6 changed files with 85 additions and 2 deletions
|
@ -371,6 +371,11 @@ gBattleScriptsForMoveEffects::
|
|||
.4byte BattleScript_EffectHit @ EFFECT_BLIZZARD
|
||||
.4byte BattleScript_EffectHit @ EFFECT_RAIN_ALWAYS_HIT
|
||||
|
||||
BattleScript_EffectPsychicNoise::
|
||||
printstring STRINGID_PKMNPREVENTEDFROMHEALING
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
return
|
||||
|
||||
BattleScript_EffectFilletAway:
|
||||
attackcanceler
|
||||
attackstring
|
||||
|
|
|
@ -490,6 +490,8 @@ extern const u8 BattleScript_TheRainbowDisappeared[];
|
|||
extern const u8 BattleScript_HurtByTheSeaOfFire[];
|
||||
extern const u8 BattleScript_TheSeaOfFireDisappeared[];
|
||||
extern const u8 BattleScript_TheSwampDisappeared[];
|
||||
extern const u8 BattleScript_EffectPsychicNoise[];
|
||||
extern const u8 BattleScript_AromaVeilProtectsRet[];
|
||||
|
||||
// zmoves
|
||||
extern const u8 BattleScript_ZMoveActivateDamaging[];
|
||||
|
|
|
@ -396,8 +396,9 @@
|
|||
#define MOVE_EFFECT_SYRUP_BOMB 76
|
||||
#define MOVE_EFFECT_FLORAL_HEALING 77
|
||||
#define MOVE_EFFECT_SECRET_POWER 78
|
||||
#define MOVE_EFFECT_PSYCHIC_NOISE 79
|
||||
|
||||
#define NUM_MOVE_EFFECTS 79
|
||||
#define NUM_MOVE_EFFECTS 80
|
||||
|
||||
#define MOVE_EFFECT_AFFECTS_USER 0x2000
|
||||
#define MOVE_EFFECT_CERTAIN 0x4000
|
||||
|
|
|
@ -3793,6 +3793,21 @@ void SetMoveEffect(bool32 primary, bool32 certain)
|
|||
}
|
||||
SetMoveEffect(primary, certain);
|
||||
break;
|
||||
case MOVE_EFFECT_PSYCHIC_NOISE:
|
||||
if (GetBattlerAbility(gEffectBattler) == ABILITY_AROMA_VEIL || GetBattlerAbility(BATTLE_PARTNER(gEffectBattler)) == ABILITY_AROMA_VEIL)
|
||||
{
|
||||
gBattlerAbility = gEffectBattler;
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_AromaVeilProtectsRet;
|
||||
}
|
||||
else if (!(gStatuses3[gEffectBattler] & STATUS3_HEAL_BLOCK))
|
||||
{
|
||||
gStatuses3[gEffectBattler] |= STATUS3_HEAL_BLOCK;
|
||||
gDisableStructs[gEffectBattler].healBlockTimer = 2;
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_EffectPsychicNoise;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13556,7 +13556,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
|
|||
|
||||
[MOVE_PSYCHIC_NOISE] =
|
||||
{
|
||||
.effect = EFFECT_PLACEHOLDER, //EFFECT_PSYCHIC_NOISE
|
||||
.effect = EFFECT_HIT,
|
||||
.power = 75,
|
||||
.type = TYPE_PSYCHIC,
|
||||
.accuracy = 100,
|
||||
|
@ -13566,6 +13566,10 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
|
|||
.category = BATTLE_CATEGORY_SPECIAL,
|
||||
.soundMove = TRUE,
|
||||
.ignoresSubstitute = TRUE,
|
||||
.additionalEffects = ADDITIONAL_EFFECTS({
|
||||
.moveEffect = MOVE_EFFECT_PSYCHIC_NOISE,
|
||||
.chance = 100,
|
||||
}),
|
||||
},
|
||||
|
||||
[MOVE_UPPER_HAND] =
|
||||
|
|
56
test/battle/move_effect/psychic_noise.c
Normal file
56
test/battle/move_effect/psychic_noise.c
Normal file
|
@ -0,0 +1,56 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(MoveHasMoveEffect(MOVE_PSYCHIC_NOISE, MOVE_EFFECT_PSYCHIC_NOISE));
|
||||
ASSUME(gBattleMoves[MOVE_RECOVER].effect == EFFECT_RESTORE_HP);
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Psychic Noise blocks healing moves for 2 turns")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_PSYCHIC_NOISE); MOVE(opponent, MOVE_RECOVER); }
|
||||
TURN { MOVE(opponent, MOVE_RECOVER, allowed: FALSE); }
|
||||
TURN { MOVE(opponent, MOVE_RECOVER); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_PSYCHIC_NOISE, player);
|
||||
MESSAGE("Foe Wobbuffet was prevented from healing!");
|
||||
MESSAGE("Foe Wobbuffet was prevented from healing!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_STRUGGLE, opponent);
|
||||
MESSAGE("Foe Wobbuffet's Heal Block wore off!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_RECOVER, opponent);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Psychic Noise is blocked by Soundproof")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_VOLTORB) { HP(1); Ability(ABILITY_SOUNDPROOF); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_PSYCHIC_NOISE); MOVE(opponent, MOVE_RECOVER); }
|
||||
} SCENE {
|
||||
ABILITY_POPUP(opponent, ABILITY_SOUNDPROOF);
|
||||
MESSAGE("Foe Voltorb's Soundproof blocks PsychicNoise!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_RECOVER, opponent);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Psychic Noise heal block effect is blocked by Aroma Veil")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_MILCERY) { Ability(ABILITY_AROMA_VEIL); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_PSYCHIC_NOISE); MOVE(opponent, MOVE_RECOVER); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_PSYCHIC_NOISE, player);
|
||||
ABILITY_POPUP(opponent, ABILITY_AROMA_VEIL);
|
||||
MESSAGE("Foe Milcery is protected by an aromatic veil!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_RECOVER, opponent);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue