More moves, allow for typeless moves
This commit is contained in:
23
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Refresh.cs
Normal file
23
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Refresh.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "refresh")]
|
||||
public class Refresh : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
var userStatus = move.User.StatusScript;
|
||||
switch (userStatus.Script?.Name)
|
||||
{
|
||||
case "paralyzed":
|
||||
case "burned":
|
||||
case "poisoned":
|
||||
case "badly_poisoned":
|
||||
move.User.ClearStatus();
|
||||
break;
|
||||
default:
|
||||
move.GetHitData(target, hit).Fail();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user