More move effects
This commit is contained in:
22
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/FollowMe.cs
Normal file
22
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/FollowMe.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "follow_me")]
|
||||
public class FollowMe : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void ChangeTargets(IMoveChoice moveChoice, ref IReadOnlyList<IPokemon?> targets)
|
||||
{
|
||||
if (targets.Count != 1)
|
||||
return;
|
||||
|
||||
var target = targets[0];
|
||||
if (target == null)
|
||||
return;
|
||||
if (target.BattleData?.SideIndex != moveChoice.User.BattleData?.SideIndex)
|
||||
return;
|
||||
|
||||
targets = [moveChoice.User];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user