This commit is contained in:
@@ -3,11 +3,14 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
[Script(ScriptCategory.Pokemon, "magnet_rise")]
|
||||
public class MagnetRiseEffect : Script, IScriptChangeEffectiveness, IScriptOnEndTurn
|
||||
{
|
||||
private int _turnsRemaining = 5;
|
||||
private int _turnsRemaining = 4;
|
||||
private static readonly StringKey IronBallName = "iron_ball";
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ChangeEffectiveness(IExecutingMove move, IPokemon target, byte hit, ref float effectiveness)
|
||||
{
|
||||
if (move.User.HasHeldItem(IronBallName))
|
||||
return;
|
||||
if (move.UseMove.MoveType.Name == "ground")
|
||||
{
|
||||
effectiveness = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user