Adds battle history, fixes code style
This commit is contained in:
@@ -523,7 +523,7 @@ public class PokemonImpl : ScriptSource, IPokemon
|
||||
{
|
||||
> 0 => StatBoost.IncreaseStatistic(stat, change),
|
||||
< 0 => StatBoost.DecreaseStatistic(stat, change),
|
||||
_ => changed
|
||||
_ => changed,
|
||||
};
|
||||
if (!changed)
|
||||
return false;
|
||||
@@ -599,7 +599,7 @@ public class PokemonImpl : ScriptSource, IPokemon
|
||||
// If the Pokémon is in a battle, we trigger an event to the front-end.
|
||||
BattleData.Battle.EventHook.Invoke(new DamageEvent(this, CurrentHealth, newHealth, source)
|
||||
{
|
||||
BatchId = batchId
|
||||
BatchId = batchId,
|
||||
});
|
||||
// And allow scripts to execute.
|
||||
this.RunScriptHook(script => script.OnDamage(this, source, CurrentHealth, newHealth));
|
||||
|
||||
Reference in New Issue
Block a user