mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 19:54:21 +01:00
Mind blown (#302)
* Mind Blown Part 1 (Definition and self-damage) * Mind Blown Part 2 (Damp interaction)
This commit is contained in:
parent
51e1639513
commit
2b9eb00486
@ -1782,6 +1782,10 @@
|
||||
manipulatedamage DMG_CURR_ATTACKER_HP
|
||||
.endm
|
||||
|
||||
.macro dmg_1_2_attackerhp
|
||||
manipulatedamage DMG_1_2_ATTACKER_HP
|
||||
.endm
|
||||
|
||||
.macro jumpifflowerveil jumpptr:req
|
||||
jumpifnottype BS_TARGET, TYPE_GRASS, 1f
|
||||
jumpifability BS_TARGET_SIDE, ABILITY_FLOWER_VEIL, \jumpptr
|
||||
|
@ -356,6 +356,7 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
||||
.4byte BattleScript_EffectIncinerate
|
||||
.4byte BattleScript_EffectBugBite
|
||||
.4byte BattleScript_EffectStrengthSap
|
||||
.4byte BattleScript_EffectMindBlown
|
||||
|
||||
BattleScript_EffectStrengthSap:
|
||||
setstatchanger STAT_ATK, 1, TRUE
|
||||
@ -2227,6 +2228,19 @@ BattleScript_ExplosionMissed:
|
||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||
end
|
||||
|
||||
BattleScript_EffectMindBlown::
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
faintifabilitynotdamp
|
||||
dmg_1_2_attackerhp
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
waitstate
|
||||
jumpifbyte CMP_NO_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_MISSED, BattleScript_ExplosionDoAnimStartLoop
|
||||
call BattleScript_PreserveMissedBitDoMoveAnim
|
||||
goto BattleScript_ExplosionLoop
|
||||
|
||||
BattleScript_PreserveMissedBitDoMoveAnim:
|
||||
bichalfword gMoveResultFlags, MOVE_RESULT_MISSED
|
||||
attackanimation
|
||||
|
@ -344,5 +344,6 @@
|
||||
#define EFFECT_INCINERATE 338
|
||||
#define EFFECT_BUG_BITE 339
|
||||
#define EFFECT_STRENGTH_SAP 340
|
||||
#define EFFECT_MIND_BLOWN 341
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
@ -149,7 +149,7 @@
|
||||
#define VARIOUS_GET_STAT_VALUE 86
|
||||
#define VARIOUS_JUMP_IF_FULL_HP 87
|
||||
|
||||
// Cmd_manipulatedmg
|
||||
// Cmd_manipulatedamage
|
||||
#define DMG_CHANGE_SIGN 0
|
||||
#define DMG_RECOIL_FROM_MISS 1
|
||||
#define DMG_DOUBLED 2
|
||||
@ -157,6 +157,7 @@
|
||||
#define DMG_FULL_ATTACKER_HP 4
|
||||
#define DMG_CURR_ATTACKER_HP 5
|
||||
#define DMG_BIG_ROOT 6
|
||||
#define DMG_1_2_ATTACKER_HP 7
|
||||
|
||||
// Cmd_jumpifcantswitch
|
||||
#define SWITCH_IGNORE_ESCAPE_PREVENTION 0x80
|
||||
|
@ -690,8 +690,9 @@
|
||||
#define MOVE_ZING_ZAP 670
|
||||
#define MOVE_NATURES_MADNESS 671
|
||||
#define MOVE_MULTI_ATTACK 672
|
||||
#define MOVE_MIND_BLOWN 673
|
||||
|
||||
#define MOVES_COUNT_GEN7 673
|
||||
#define MOVES_COUNT_GEN7 674
|
||||
|
||||
#define MOVES_COUNT MOVES_COUNT_GEN7
|
||||
|
||||
|
@ -316,6 +316,7 @@ static const u16 sDiscouragedPowerfulMoveEffects[] =
|
||||
EFFECT_SUPERPOWER,
|
||||
EFFECT_ERUPTION,
|
||||
EFFECT_OVERHEAT,
|
||||
EFFECT_MIND_BLOWN,
|
||||
0xFFFF
|
||||
};
|
||||
|
||||
|
@ -8112,6 +8112,9 @@ static void Cmd_manipulatedamage(void)
|
||||
case DMG_BIG_ROOT:
|
||||
gBattleMoveDamage = GetDrainedBigRootHp(gBattlerAttacker, gBattleMoveDamage);
|
||||
break;
|
||||
case DMG_1_2_ATTACKER_HP:
|
||||
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 2;
|
||||
break;
|
||||
}
|
||||
|
||||
gBattlescriptCurrInstr += 2;
|
||||
|
@ -9443,4 +9443,18 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
|
||||
.split = SPLIT_PHYSICAL,
|
||||
},
|
||||
|
||||
[MOVE_MIND_BLOWN] =
|
||||
{
|
||||
.effect = EFFECT_MIND_BLOWN,
|
||||
.power = 150,
|
||||
.type = TYPE_FIRE,
|
||||
.accuracy = 100,
|
||||
.pp = 5,
|
||||
.secondaryEffectChance = 0,
|
||||
.target = MOVE_TARGET_FOES_AND_ALLY,
|
||||
.priority = 0,
|
||||
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
|
||||
.split = SPLIT_PHYSICAL,
|
||||
},
|
||||
};
|
||||
|
@ -2533,6 +2533,10 @@ static const u8 sMULTI_ATTACKDescription[] = _(
|
||||
"An attack that changes\n"
|
||||
"with Memories.");
|
||||
|
||||
static const u8 sMIND_BLOWNDescription[] = _(
|
||||
"It explodes the user's head\n"
|
||||
"to damage everything around.");
|
||||
|
||||
static const u8 sNotDoneYetDescription[] = _(
|
||||
"Not done yet.");
|
||||
|
||||
@ -3212,4 +3216,5 @@ const u8 *const gMoveDescriptionPointers[MOVES_COUNT - 1] =
|
||||
[MOVE_ZING_ZAP - 1] = sZING_ZAPDescription,
|
||||
[MOVE_NATURES_MADNESS - 1] = sNATURES_MADNESSDescription,
|
||||
[MOVE_MULTI_ATTACK - 1] = sMULTI_ATTACKDescription,
|
||||
[MOVE_MIND_BLOWN - 1] = sMIND_BLOWNDescription,
|
||||
};
|
||||
|
@ -673,4 +673,5 @@ const u8 gMoveNames[MOVES_COUNT][MOVE_NAME_LENGTH + 1] =
|
||||
[MOVE_ZING_ZAP] = _("Zing Zap"),
|
||||
[MOVE_NATURES_MADNESS] = _("Nature's Mad"),
|
||||
[MOVE_MULTI_ATTACK] = _("Multi-Attack"),
|
||||
[MOVE_MIND_BLOWN] = _("Mind Blown"),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user