protected virtual void OnStatStageChanged(StatType stat, int amount)
 {
     StatStageChanged?.Invoke(this, new StatStageChangedEventArgs()
     {
         pokemon       = Pokemon,
         battlePokemon = this,
         statChanged   = stat,
         change        = amount
     });
 }
示例#2
0
文件: Stat.cs 项目: sonumeewa/Poke
        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);
        }