Fix pollen puff
This commit is contained in:
@@ -9,11 +9,7 @@ public class PollenPuff : Script, IScriptOnSecondaryEffect, IScriptChangeCategor
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public void ChangeCategory(IExecutingMove move, IBattlePokemon target, byte hitIndex, ref MoveCategory category)
|
public void ChangeCategory(IExecutingMove move, IBattlePokemon target, byte hitIndex, ref MoveCategory category)
|
||||||
{
|
{
|
||||||
var battleData = move.User;
|
if (move.User.SideIndex == target.SideIndex)
|
||||||
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (battleData.SideIndex == target.SideIndex)
|
|
||||||
{
|
{
|
||||||
category = MoveCategory.Status;
|
category = MoveCategory.Status;
|
||||||
}
|
}
|
||||||
@@ -22,14 +18,9 @@ public class PollenPuff : Script, IScriptOnSecondaryEffect, IScriptChangeCategor
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public void OnSecondaryEffect(IExecutingMove move, IBattlePokemon target, byte hit)
|
public void OnSecondaryEffect(IExecutingMove move, IBattlePokemon target, byte hit)
|
||||||
{
|
{
|
||||||
var battleData = move.User;
|
if (move.User.SideIndex != target.SideIndex)
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (battleData.SideIndex == target.SideIndex)
|
|
||||||
{
|
|
||||||
var maxHealth = target.MaxHealth;
|
var maxHealth = target.MaxHealth;
|
||||||
target.Heal(maxHealth / 2);
|
target.Heal(maxHealth / 2);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user