More moves

This commit is contained in:
Deukhoofd committed 2025-04-17 13:10:27 +02:00
1 parent 1b54c78b07
commit d02c05874b
31 files changed
+682 -65

No files matched your search

@@ -0,0 +1,39 @@
using PkmnLib.Static.Moves;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "pollen_puff")]
public class PollenPuff : Script
{
/// <inheritdoc />
/// <inheritdoc />
public override void ChangeCategory(IExecutingMove move, IPokemon target, byte hitIndex, ref MoveCategory category)
{
var battleData = move.User.BattleData;
var targetBattleData = target.BattleData;
if (battleData == null || targetBattleData == null)
return;
if (battleData.SideIndex == targetBattleData.SideIndex)
{
category = MoveCategory.Status;
}
}
/// <inheritdoc />
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
var battleData = move.User.BattleData;
var targetBattleData = target.BattleData;
if (battleData == null || targetBattleData == null)
return;
if (battleData.SideIndex == targetBattleData.SideIndex)
{
var maxHealth = target.MaxHealth;
target.Heal(maxHealth / 2);
}
}
}