Implements Paralysis
This commit is contained in:
@@ -3,5 +3,21 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Status;
|
||||
[Script(ScriptCategory.Status, "paralyzed")]
|
||||
public class Paralyzed : Script
|
||||
{
|
||||
// TODO: Implement the Paralyzed status effect.
|
||||
/// <inheritdoc />
|
||||
public override void ChangeSpeed(ITurnChoice choice, ref uint speed)
|
||||
{
|
||||
speed = (uint)(speed * 0.5f);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void PreventMove(IExecutingMove move, ref bool prevent)
|
||||
{
|
||||
if (move.Battle.Random.GetInt(0, 100) >= 25)
|
||||
return;
|
||||
prevent = true;
|
||||
move.Battle.EventHook.Invoke(new DialogEvent("paralysis_prevent_move", new Dictionary<string, object>
|
||||
{
|
||||
{ "pokemon", move.User },
|
||||
}));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user