Even more moves
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-05-05 16:58:03 +02:00
parent 292c303fc0
commit 7727f92f4e
132 changed files with 624 additions and 171 deletions

View File

@@ -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();
}
}