This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using PkmnLib.Static;
|
||||
using PkmnLib.Static.Utils;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Battle;
|
||||
@@ -7,6 +6,8 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Battle;
|
||||
[Script(ScriptCategory.Battle, "gravity")]
|
||||
public class Gravity : Script
|
||||
{
|
||||
private int _turns = 5;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ChangeTypesForIncomingMove(IExecutingMove executingMove, IPokemon target, byte hitIndex,
|
||||
IList<TypeIdentifier> types)
|
||||
@@ -25,4 +26,21 @@ public class Gravity : Script
|
||||
if (move.UseMove.HasFlag("gravity"))
|
||||
fail = true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void IsFloating(IPokemon pokemon, ref bool isFloating)
|
||||
{
|
||||
// Gravity makes all Pokémon susceptible to Ground-type moves
|
||||
isFloating = false;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnEndTurn(IBattle battle)
|
||||
{
|
||||
_turns--;
|
||||
if (_turns > 0)
|
||||
return;
|
||||
|
||||
RemoveSelf();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
using PkmnLib.Static;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Battle;
|
||||
|
||||
[Script(ScriptCategory.Move, "ion_deluge")]
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using PkmnLib.Static;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Battle;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ public class MudSportEffect : Script
|
||||
private int _turnsLeft = 5;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref byte basePower)
|
||||
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower)
|
||||
{
|
||||
if (move.UseMove.MoveType.Name == "electric")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user