Fix pollen puff
This commit is contained in:
@@ -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;
|
||||
|
||||
if (move.User.SideIndex != target.SideIndex)
|
||||
return;
|
||||
|
||||
if (battleData.SideIndex == target.SideIndex)
|
||||
{
|
||||
var maxHealth = target.MaxHealth;
|
||||
target.Heal(maxHealth / 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user