Implements experience gain
All checks were successful
Build / Build (push) Successful in 1m49s

This commit is contained in:
2025-11-02 23:20:07 +01:00
parent f00453448f
commit 90eaeb1a72
7 changed files with 83 additions and 2 deletions

View File

@@ -1184,6 +1184,11 @@ public class PokemonImpl : ScriptSource, IPokemon
BattleData.BattleSide.MarkFaint(BattleData.Position);
BattleData.BattleSide.ForceClearPokemonFromField(BattleData.Position);
foreach (var opponent in BattleData.SeenOpponents.WhereNotNull())
{
opponent.AddExperience(Library.ExperienceGainCalculator.CalculateExperienceGain(this, opponent));
}
// Validate the battle state to see if the battle is over.
BattleData.Battle.ValidateBattleState();
}