This commit is contained in:
@@ -28,6 +28,9 @@ public class Poisoned : Script
|
||||
damage = 1;
|
||||
|
||||
var battleData = _pokemon.BattleData;
|
||||
var args = new CustomTriggers.PoisonedDamageArgs(_pokemon, damage);
|
||||
_pokemon.RunScriptHook(x => x.CustomTrigger(CustomTriggers.PoisonedDamage, args));
|
||||
|
||||
var eventBatchId = new EventBatchId();
|
||||
battleData?.Battle.EventHook.Invoke(new DialogEvent("poisoned_damage", new Dictionary<string, object>
|
||||
{
|
||||
@@ -37,6 +40,10 @@ public class Poisoned : Script
|
||||
{
|
||||
BatchId = eventBatchId,
|
||||
});
|
||||
_pokemon.Damage(damage, DamageSource.Status, eventBatchId);
|
||||
|
||||
if (args.Invert)
|
||||
_pokemon.Heal(damage, batchId: eventBatchId);
|
||||
else
|
||||
_pokemon.Damage(damage, DamageSource.Status, eventBatchId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user