Implemented Plasma Fists

This commit is contained in:
LOuroboros 2021-10-17 12:27:17 -03:00
parent eda99fcf29
commit a6315ffc75
9 changed files with 50 additions and 2 deletions

View File

@ -1844,6 +1844,10 @@
various \battler, VARIOUS_TRY_ACTIVATE_BATTLE_BOND
.endm
.macro applyplasmafists
various BS_ATTACKER, VARIOUS_APPLY_PLASMA_FISTS
.endm
@ helpful macros
.macro setstatchanger stat:req, stages:req, down:req
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7

View File

@ -389,6 +389,33 @@ gBattleScriptsForMoveEffects::
.4byte BattleScript_EffectSappySeed @ EFFECT_SAPPY_SEED
.4byte BattleScript_EffectFreezyFrost @ EFFECT_FREEZY_FROST
.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:
attackcanceler

View File

@ -173,6 +173,7 @@
#define STATUS3_SEMI_INVULNERABLE (STATUS3_UNDERGROUND | STATUS3_ON_AIR | STATUS3_UNDERWATER | STATUS3_PHANTOM_FORCE)
#define STATUS4_ELECTRIFIED (1 << 0)
#define STATUS4_PLASMA_FISTS (1 << 1)
#define HITMARKER_x10 (1 << 4)
#define HITMARKER_x20 (1 << 5)

View File

@ -373,7 +373,8 @@
#define EFFECT_SAPPY_SEED 367
#define EFFECT_FREEZY_FROST 368
#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

View File

@ -190,6 +190,7 @@
#define VARIOUS_JUMP_IF_NOT_ROTOTILLER_AFFECTED 117
#define VARIOUS_TRY_ACTIVATE_BATTLE_BOND 118
#define VARIOUS_CONSUME_BERRY 119
#define VARIOUS_APPLY_PLASMA_FISTS 120
// Cmd_manipulatedamage
#define DMG_CHANGE_SIGN 0

View File

@ -5156,6 +5156,10 @@ void SetTypeBeforeUsingMove(u16 move, u8 battlerAtk)
{
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.
GET_MOVE_TYPE(move, moveType);

View File

@ -8910,6 +8910,10 @@ static void Cmd_various(void)
gBattlescriptCurrInstr += 4;
return;
case VARIOUS_APPLY_PLASMA_FISTS:
for (i = 0; i < gBattlersCount; i++)
gStatuses4[i] |= STATUS4_PLASMA_FISTS;
break;
}
gBattlescriptCurrInstr += 3;

View File

@ -2379,6 +2379,7 @@ enum
ENDTURN_POWDER,
ENDTURN_THROAT_CHOP,
ENDTURN_SLOW_START,
ENDTURN_PLASMA_FISTS,
ENDTURN_BATTLER_COUNT
};
@ -2885,6 +2886,11 @@ u8 DoBattlerEndTurnEffects(void)
}
gBattleStruct->turnEffectsTracker++;
break;
case ENDTURN_PLASMA_FISTS:
for (i = 0; i < gBattlersCount; i++)
gStatuses4[i] &= ~(STATUS4_PLASMA_FISTS);
gBattleStruct->turnEffectsTracker++;
break;
case ENDTURN_BATTLER_COUNT: // done
gBattleStruct->turnEffectsTracker = 0;
gBattleStruct->turnEffectsBattlerId++;

View File

@ -10435,7 +10435,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
[MOVE_PLASMA_FISTS] =
{
.effect = EFFECT_PLACEHOLDER, // Needs a custom move effect
.effect = EFFECT_PLASMA_FISTS,
.power = 100,
.type = TYPE_ELECTRIC,
.accuracy = 100,