More abilities
All checks were successful
Build / Build (push) Successful in 48s

This commit is contained in:
2025-06-13 15:39:08 +02:00
parent 4385f0afaa
commit 24712fbb0d
16 changed files with 238 additions and 16 deletions

View File

@@ -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);
}
}