mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Implemented Plasma Fists
This commit is contained in:
parent
eda99fcf29
commit
a6315ffc75
@ -1844,6 +1844,10 @@
|
|||||||
various \battler, VARIOUS_TRY_ACTIVATE_BATTLE_BOND
|
various \battler, VARIOUS_TRY_ACTIVATE_BATTLE_BOND
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro applyplasmafists
|
||||||
|
various BS_ATTACKER, VARIOUS_APPLY_PLASMA_FISTS
|
||||||
|
.endm
|
||||||
|
|
||||||
@ helpful macros
|
@ helpful macros
|
||||||
.macro setstatchanger stat:req, stages:req, down:req
|
.macro setstatchanger stat:req, stages:req, down:req
|
||||||
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7
|
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7
|
||||||
|
@ -389,6 +389,33 @@ gBattleScriptsForMoveEffects::
|
|||||||
.4byte BattleScript_EffectSappySeed @ EFFECT_SAPPY_SEED
|
.4byte BattleScript_EffectSappySeed @ EFFECT_SAPPY_SEED
|
||||||
.4byte BattleScript_EffectFreezyFrost @ EFFECT_FREEZY_FROST
|
.4byte BattleScript_EffectFreezyFrost @ EFFECT_FREEZY_FROST
|
||||||
.4byte BattleScript_EffectSparklySwirl @ EFFECT_SPARKLY_SWIRL
|
.4byte BattleScript_EffectSparklySwirl @ EFFECT_SPARKLY_SWIRL
|
||||||
|
.4byte BattleScript_EffectPlasmaFists @ EFFECT_PLASMA_FISTS
|
||||||
|
|
||||||
|
BattleScript_EffectPlasmaFists:
|
||||||
|
attackcanceler
|
||||||
|
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||||
|
attackstring
|
||||||
|
ppreduce
|
||||||
|
critcalc
|
||||||
|
damagecalc
|
||||||
|
adjustdamage
|
||||||
|
attackanimation
|
||||||
|
waitanimation
|
||||||
|
effectivenesssound
|
||||||
|
hitanimation BS_TARGET
|
||||||
|
waitstate
|
||||||
|
healthbarupdate BS_TARGET
|
||||||
|
datahpupdate BS_TARGET
|
||||||
|
critmessage
|
||||||
|
waitmessage B_WAIT_TIME_LONG
|
||||||
|
resultmessage
|
||||||
|
waitmessage B_WAIT_TIME_LONG
|
||||||
|
seteffectwithchance
|
||||||
|
tryfaintmon BS_TARGET, FALSE, NULL
|
||||||
|
applyplasmafists
|
||||||
|
printstring STRINGID_IONDELUGEON
|
||||||
|
waitmessage B_WAIT_TIME_LONG
|
||||||
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
BattleScript_EffectSparklySwirl:
|
BattleScript_EffectSparklySwirl:
|
||||||
attackcanceler
|
attackcanceler
|
||||||
|
@ -173,6 +173,7 @@
|
|||||||
#define STATUS3_SEMI_INVULNERABLE (STATUS3_UNDERGROUND | STATUS3_ON_AIR | STATUS3_UNDERWATER | STATUS3_PHANTOM_FORCE)
|
#define STATUS3_SEMI_INVULNERABLE (STATUS3_UNDERGROUND | STATUS3_ON_AIR | STATUS3_UNDERWATER | STATUS3_PHANTOM_FORCE)
|
||||||
|
|
||||||
#define STATUS4_ELECTRIFIED (1 << 0)
|
#define STATUS4_ELECTRIFIED (1 << 0)
|
||||||
|
#define STATUS4_PLASMA_FISTS (1 << 1)
|
||||||
|
|
||||||
#define HITMARKER_x10 (1 << 4)
|
#define HITMARKER_x10 (1 << 4)
|
||||||
#define HITMARKER_x20 (1 << 5)
|
#define HITMARKER_x20 (1 << 5)
|
||||||
|
@ -373,7 +373,8 @@
|
|||||||
#define EFFECT_SAPPY_SEED 367
|
#define EFFECT_SAPPY_SEED 367
|
||||||
#define EFFECT_FREEZY_FROST 368
|
#define EFFECT_FREEZY_FROST 368
|
||||||
#define EFFECT_SPARKLY_SWIRL 369
|
#define EFFECT_SPARKLY_SWIRL 369
|
||||||
|
#define EFFECT_PLASMA_FISTS 370
|
||||||
|
|
||||||
#define NUM_BATTLE_MOVE_EFFECTS 370
|
#define NUM_BATTLE_MOVE_EFFECTS 371
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||||
|
@ -190,6 +190,7 @@
|
|||||||
#define VARIOUS_JUMP_IF_NOT_ROTOTILLER_AFFECTED 117
|
#define VARIOUS_JUMP_IF_NOT_ROTOTILLER_AFFECTED 117
|
||||||
#define VARIOUS_TRY_ACTIVATE_BATTLE_BOND 118
|
#define VARIOUS_TRY_ACTIVATE_BATTLE_BOND 118
|
||||||
#define VARIOUS_CONSUME_BERRY 119
|
#define VARIOUS_CONSUME_BERRY 119
|
||||||
|
#define VARIOUS_APPLY_PLASMA_FISTS 120
|
||||||
|
|
||||||
// Cmd_manipulatedamage
|
// Cmd_manipulatedamage
|
||||||
#define DMG_CHANGE_SIGN 0
|
#define DMG_CHANGE_SIGN 0
|
||||||
|
@ -5156,6 +5156,10 @@ void SetTypeBeforeUsingMove(u16 move, u8 battlerAtk)
|
|||||||
{
|
{
|
||||||
gBattleStruct->dynamicMoveType = 0x80 | TYPE_WATER;
|
gBattleStruct->dynamicMoveType = 0x80 | TYPE_WATER;
|
||||||
}
|
}
|
||||||
|
else if (gStatuses4[battlerAtk] & STATUS4_PLASMA_FISTS && moveType == TYPE_NORMAL)
|
||||||
|
{
|
||||||
|
gBattleStruct->dynamicMoveType = 0x80 | TYPE_ELECTRIC;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if a gem should activate.
|
// Check if a gem should activate.
|
||||||
GET_MOVE_TYPE(move, moveType);
|
GET_MOVE_TYPE(move, moveType);
|
||||||
|
@ -8910,6 +8910,10 @@ static void Cmd_various(void)
|
|||||||
|
|
||||||
gBattlescriptCurrInstr += 4;
|
gBattlescriptCurrInstr += 4;
|
||||||
return;
|
return;
|
||||||
|
case VARIOUS_APPLY_PLASMA_FISTS:
|
||||||
|
for (i = 0; i < gBattlersCount; i++)
|
||||||
|
gStatuses4[i] |= STATUS4_PLASMA_FISTS;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gBattlescriptCurrInstr += 3;
|
gBattlescriptCurrInstr += 3;
|
||||||
|
@ -2379,6 +2379,7 @@ enum
|
|||||||
ENDTURN_POWDER,
|
ENDTURN_POWDER,
|
||||||
ENDTURN_THROAT_CHOP,
|
ENDTURN_THROAT_CHOP,
|
||||||
ENDTURN_SLOW_START,
|
ENDTURN_SLOW_START,
|
||||||
|
ENDTURN_PLASMA_FISTS,
|
||||||
ENDTURN_BATTLER_COUNT
|
ENDTURN_BATTLER_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2885,6 +2886,11 @@ u8 DoBattlerEndTurnEffects(void)
|
|||||||
}
|
}
|
||||||
gBattleStruct->turnEffectsTracker++;
|
gBattleStruct->turnEffectsTracker++;
|
||||||
break;
|
break;
|
||||||
|
case ENDTURN_PLASMA_FISTS:
|
||||||
|
for (i = 0; i < gBattlersCount; i++)
|
||||||
|
gStatuses4[i] &= ~(STATUS4_PLASMA_FISTS);
|
||||||
|
gBattleStruct->turnEffectsTracker++;
|
||||||
|
break;
|
||||||
case ENDTURN_BATTLER_COUNT: // done
|
case ENDTURN_BATTLER_COUNT: // done
|
||||||
gBattleStruct->turnEffectsTracker = 0;
|
gBattleStruct->turnEffectsTracker = 0;
|
||||||
gBattleStruct->turnEffectsBattlerId++;
|
gBattleStruct->turnEffectsBattlerId++;
|
||||||
|
@ -10435,7 +10435,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
|||||||
|
|
||||||
[MOVE_PLASMA_FISTS] =
|
[MOVE_PLASMA_FISTS] =
|
||||||
{
|
{
|
||||||
.effect = EFFECT_PLACEHOLDER, // Needs a custom move effect
|
.effect = EFFECT_PLASMA_FISTS,
|
||||||
.power = 100,
|
.power = 100,
|
||||||
.type = TYPE_ELECTRIC,
|
.type = TYPE_ELECTRIC,
|
||||||
.accuracy = 100,
|
.accuracy = 100,
|
||||||
|
Loading…
Reference in New Issue
Block a user