| 123456789101112131415161718192021222324252627282930313233 |
- namespace D21._1
- {
- public abstract class Player
- {
- protected int OrigHitPoints { get; set; }
- public int HitPoints { get; set; }
- public int Damage { get; set; }
- public int Armor { get; set; }
- public void Heal() => HitPoints = OrigHitPoints;
- }
- public class Heroe : Player
- {
- public Heroe()
- {
- HitPoints = 50;
- OrigHitPoints = 50;
- Mana = 500;
- }
- public int Mana { get; set; }
- }
- public class MonsterBoss : Player
- {
- public MonsterBoss(int hp)
- {
- HitPoints = hp;
- OrigHitPoints = hp;
- }
- }
- }
|