コード例 #1
0
ファイル: Stats.cs プロジェクト: DuckDefense/duck
 public Stats ApplyModifiers(Monster monster)
 {
     var stats = monster.Stats;
     monster.RestorePreviousStats();
     CheckMinimum(monster.Stats, monster.PreviousStats);
     stats.Attack = Convert.ToInt32(stats.Attack * AttackMod);
     stats.Defense = Convert.ToInt32(stats.Defense * DefenseMod);
     stats.SpecialAttack = Convert.ToInt32(stats.SpecialAttack * SpecialAttackMod);
     stats.SpecialDefense = Convert.ToInt32(stats.SpecialDefense * SpecialDefenseMod);
     stats.Speed = Convert.ToInt32(stats.Speed * SpeedMod);
     //Actually set the right stats to PreviousStats
     return stats;
 }