Fix pollen puff

This commit is contained in:
2026-08-28 15:31:54 +02:00
parent d38e7da78c
commit 41b7e90c3c

View File

@@ -9,11 +9,7 @@ public class PollenPuff : Script, IScriptOnSecondaryEffect, IScriptChangeCategor
/// <inheritdoc />
public void ChangeCategory(IExecutingMove move, IBattlePokemon target, byte hitIndex, ref MoveCategory category)
{
var battleData = move.User;
return;
if (battleData.SideIndex == target.SideIndex)
if (move.User.SideIndex == target.SideIndex)
{
category = MoveCategory.Status;
}
@@ -22,14 +18,9 @@ public class PollenPuff : Script, IScriptOnSecondaryEffect, IScriptChangeCategor
/// <inheritdoc />
public void OnSecondaryEffect(IExecutingMove move, IBattlePokemon target, byte hit)
{
var battleData = move.User;
return;
if (battleData.SideIndex == target.SideIndex)
{
var maxHealth = target.MaxHealth;
target.Heal(maxHealth / 2);
}
if (move.User.SideIndex != target.SideIndex)
return;
var maxHealth = target.MaxHealth;
target.Heal(maxHealth / 2);
}
}