Adds effects for after you, assist, and attract
This commit is contained in:
25
Plugins/PkmnLib.Plugin.Gen7/Scripts/Pokemon/Infatuated.cs
Normal file
25
Plugins/PkmnLib.Plugin.Gen7/Scripts/Pokemon/Infatuated.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using PkmnLib.Dynamic.Models;
|
||||
using PkmnLib.Dynamic.ScriptHandling;
|
||||
using PkmnLib.Dynamic.ScriptHandling.Registry;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
/// <summary>
|
||||
/// If an infatuated Pokémon attempts to use a move, it will fail 50% of the time, even when targeting Pokémon other than
|
||||
/// the one it is infatuated with. This failed move does not spend PP.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Infatuation is caused when Attract is used on a target of the opposite gender, G-Max Cuddle is used by Gigantamax Eevee
|
||||
/// on all opponents of the opposite gender, may be caused when a Pokémon makes contact with a Pokémon of the opposite
|
||||
/// gender that has Cute Charm as its Ability, and is caused to a Pokémon that infatuates a Pokémon holding a Destiny Knot.
|
||||
/// </remarks>
|
||||
[Script(ScriptCategory.Pokemon, "infatuated")]
|
||||
public class Infatuated : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void PreventMove(IExecutingMove move, ref bool prevent)
|
||||
{
|
||||
if (move.User.BattleData?.Battle?.Random.GetBool() == true)
|
||||
prevent = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user