Add Pollen Puff effect

This commit is contained in:
DizzyEggg 2018-09-29 14:10:53 +02:00
parent 2ebffb9912
commit 597299136f
6 changed files with 27 additions and 9 deletions

View File

@ -1512,6 +1512,11 @@
.4byte \ptr
.endm
.macro jumpiftargetally ptr
various BS_ATTACKER, VARIOUS_JUMP_IF_TARGET_ALLY
.4byte \ptr
.endm
@ helpful macros
.macro setstatchanger stat, stages, down
setbyte sSTATCHANGER \stat | \stages << 4 | \down << 7

View File

@ -318,6 +318,11 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
.4byte BattleScript_EffectAutonomize
.4byte BattleScript_EffectCopycat
.4byte BattleScript_EffectDefog
.4byte BattleScript_EffectHitEnemyHealAlly
BattleScript_EffectHitEnemyHealAlly:
jumpiftargetally BattleScript_EffectHealPulse
goto BattleScript_EffectHit
BattleScript_EffectDefog:
setstatchanger STAT_EVASION, 1, TRUE

View File

@ -307,5 +307,6 @@
#define EFFECT_AUTONOMIZE 301
#define EFFECT_COPYCAT 302
#define EFFECT_DEFOG 303
#define EFFECT_HIT_ENEMY_HEAL_ALLY 304 // Pollen Puff
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H

View File

@ -109,6 +109,7 @@
#define VARIOUS_TRY_COPYCAT 56
#define VARIOUS_ABILITY_POPUP 57
#define VARIOUS_DEFOG 58
#define VARIOUS_JUMP_IF_TARGET_ALLY 59
// atk80, dmg manipulation
#define ATK80_DMG_CHANGE_SIGN 0

View File

@ -6838,6 +6838,12 @@ static void atk76_various(void)
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 4);
}
return;
case VARIOUS_JUMP_IF_TARGET_ALLY:
if (GetBattlerSide(gBattlerAttacker) != GetBattlerSide(gBattlerTarget))
gBattlescriptCurrInstr += 7;
else
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
return;
}
gBattlescriptCurrInstr += 3;

View File

@ -7680,7 +7680,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.split = SPLIT_PHYSICAL,
},
{ // MOVE_POLLEN_PUFF
.effect = EFFECT_PLACEHOLDER,
.effect = EFFECT_HIT_ENEMY_HEAL_ALLY,
.power = 90,
.type = TYPE_BUG,
.accuracy = 100,
@ -7721,7 +7721,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.type = TYPE_BUG,
.accuracy = 100,
.pp = 15,
.secondaryEffectChance = 0,
.secondaryEffectChance = 100,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
@ -7733,7 +7733,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.type = TYPE_FIRE,
.accuracy = 100,
.pp = 15,
.secondaryEffectChance = 0,
.secondaryEffectChance = 100,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
@ -7829,7 +7829,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.type = TYPE_GRASS,
.accuracy = 100,
.pp = 15,
.secondaryEffectChance = 0,
.secondaryEffectChance = 100,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
@ -7865,7 +7865,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.type = TYPE_DRAGON,
.accuracy = 100,
.pp = 5,
.secondaryEffectChance = 0,
.secondaryEffectChance = 100,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND,
@ -7925,7 +7925,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.type = TYPE_FAIRY,
.accuracy = 90,
.pp = 5,
.secondaryEffectChance = 0,
.secondaryEffectChance = 100,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED,
@ -7961,7 +7961,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.type = TYPE_GHOST,
.accuracy = 100,
.pp = 10,
.secondaryEffectChance = 0,
.secondaryEffectChance = 20,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
@ -7985,7 +7985,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.type = TYPE_WATER,
.accuracy = 100,
.pp = 10,
.secondaryEffectChance = 0,
.secondaryEffectChance = 20,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
@ -8057,7 +8057,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.type = TYPE_ELECTRIC,
.accuracy = 100,
.pp = 10,
.secondaryEffectChance = 0,
.secondaryEffectChance = 30,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED,