Fixes several moves
This commit is contained in:
7
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/AllySwitch.cs
Normal file
7
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/AllySwitch.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "ally_switch")]
|
||||
public class AllySwitch : Script
|
||||
{
|
||||
// TODO: Implement the AllySwitch script.
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using PkmnLib.Static;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "belch")]
|
||||
public class Belch : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -21,7 +21,7 @@ public class ChangeAllTargetStats : Script
|
||||
{
|
||||
throw new ArgumentException("Parameter 'amount' is required.");
|
||||
}
|
||||
_amount = (sbyte)amount;
|
||||
_amount = (sbyte)(int)amount;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -28,7 +28,7 @@ public abstract class ChangeTargetStats : Script
|
||||
throw new ArgumentException("Parameter 'amount' is required.");
|
||||
}
|
||||
|
||||
_amount = (sbyte)amount;
|
||||
_amount = (sbyte)(int)amount;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -28,7 +28,7 @@ public abstract class ChangeUserStats : Script
|
||||
throw new ArgumentException("Parameter 'amount' is required.");
|
||||
}
|
||||
|
||||
_amount = (sbyte)amount;
|
||||
_amount = (sbyte)(int)amount;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -7,10 +7,6 @@ public class BindEffect : Script
|
||||
private int _turns;
|
||||
private readonly float _percentOfMaxHealth;
|
||||
|
||||
private BindEffect(float percentOfMaxHealth)
|
||||
{
|
||||
_percentOfMaxHealth = percentOfMaxHealth;
|
||||
}
|
||||
|
||||
public BindEffect(IPokemon owner, int turns, float percentOfMaxHealth)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ public class DoomDesireEffect : Script
|
||||
}
|
||||
}
|
||||
|
||||
private readonly IBattleSide _side;
|
||||
private readonly IBattleSide? _side;
|
||||
private List<Target> _targets = new();
|
||||
|
||||
public DoomDesireEffect(IBattleSide side)
|
||||
@@ -40,6 +40,9 @@ public class DoomDesireEffect : Script
|
||||
/// <inheritdoc />
|
||||
public override void OnEndTurn(IBattle battle)
|
||||
{
|
||||
if (_side == null)
|
||||
return;
|
||||
|
||||
var toRemove = new List<Target>();
|
||||
foreach (var v in _targets)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user