protected virtual void OnStatStageChanged(StatType stat, int amount) { StatStageChanged?.Invoke(this, new StatStageChangedEventArgs() { pokemon = Pokemon, battlePokemon = this, statChanged = stat, change = amount }); }
public int ChangeStage(Stats Stat, int Stages) { var initialValue = _stages[Stat]; _stages[Stat] += Stages; _stages[Stat] = _stages[Stat].Clip(-6, 6); var val = _stages[Stat] - initialValue; if (val != 0) { StatStageChanged?.Invoke(val); } return(val); }