Advertisement
Alexander_Maximov

Untitled

Mar 16th, 2023
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. using System;
  2.  
  3. namespace GladiatorFight
  4. {
  5.     public class Sagittarius : Fighter
  6.     {
  7.         private int _additionalDamage;
  8.        
  9.         public Sagittarius(string name, int health, int damage, int armor) : base (name, health, damage, armor)
  10.         {
  11.             Random rand = new Random();
  12.             _additionalDamage = rand.Next(10, 1000);
  13.         }
  14.        
  15.         public override int UseSkill(int roundCount)
  16.         {
  17.             int skillDamage = Damage + _additionalDamage;
  18.             Console.Write("\nИспользован скилл Сагитариуса!");
  19.             return skillDamage;
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement