Merge pull request #1789 from LOuroboros/plasmaFists

Implemented Plasma Fists
This commit is contained in:
Eduardo Quezada D'Ottone 2021-10-23 11:11:42 -03:00 committed by GitHub
commit 3b746de1d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 50 additions and 2 deletions

View File

@ -1853,6 +1853,10 @@
various BS_ATTACKER, VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL
.4byte \ptr
.endm
.macro applyplasmafists
various BS_ATTACKER, VARIOUS_APPLY_PLASMA_FISTS
.endm
@ helpful macros
.macro setstatchanger stat:req, stages:req, down:req

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

@ -192,6 +192,7 @@
#define VARIOUS_CONSUME_BERRY 119
#define VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL 120
#define VARIOUS_HANDLE_PRIMAL_REVERSION 121
#define VARIOUS_APPLY_PLASMA_FISTS 122
// Cmd_manipulatedamage
#define DMG_CHANGE_SIGN 0

View File

@ -5198,6 +5198,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

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

View File

@ -2380,6 +2380,7 @@ enum
ENDTURN_POWDER,
ENDTURN_THROAT_CHOP,
ENDTURN_SLOW_START,
ENDTURN_PLASMA_FISTS,
ENDTURN_BATTLER_COUNT
};
@ -2886,6 +2887,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,