Deukhoofd 7c270a6d52
All checks were successful
Build / Build (push) Successful in 1m1s
Finish script interface refactor
2025-07-06 10:27:56 +02:00

27 lines
827 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
[Script(ScriptCategory.Pokemon, "telekinesis")]
public class TelekinesisEffect : Script, IScriptChangeIncomingEffectiveness, IScriptIsFloating,
IScriptChangeIncomingAccuracy
{
/// <inheritdoc />
public void ChangeIncomingAccuracy(IExecutingMove executingMove, IPokemon target, byte hitIndex,
ref int modifiedAccuracy)
{
modifiedAccuracy = 255;
}
/// <inheritdoc />
public void IsFloating(IPokemon pokemon, ref bool isFloating)
{
isFloating = true;
}
/// <inheritdoc />
public void ChangeIncomingEffectiveness(IExecutingMove executingMove, IPokemon target, byte hitIndex,
ref float effectiveness)
{
if (executingMove.UseMove.MoveType.Name == "ground")
effectiveness = 0;
}
}