Implements several more moves
This commit is contained in:
20
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Belch.cs
Normal file
20
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Belch.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Linq;
|
||||
using PkmnLib.Dynamic.Models.Choices;
|
||||
using PkmnLib.Dynamic.ScriptHandling;
|
||||
using PkmnLib.Static;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
public class Belch : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void PreventMoveSelection(IMoveChoice choice, ref bool prevent)
|
||||
{
|
||||
var battleData = choice.User.BattleData;
|
||||
if (battleData == null)
|
||||
return;
|
||||
|
||||
if (battleData.ConsumedItems.All(x => x.Category != ItemCategory.Berry))
|
||||
prevent = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user