-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCharacter.cs
More file actions
25 lines (21 loc) · 889 Bytes
/
Character.cs
File metadata and controls
25 lines (21 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
namespace EternityRPG
{
public abstract class Character
{
public Random random = new Random();
public string NormalAttackPhrase { get; protected set; }
public string CriticalAttackPhrase { get; protected set; }
public string Name { get; protected set; }
public double MaxHP { get; protected set; }
public double HP { get; set; }
public double MinDamage { get; protected set; }
public double MaxDamage { get; protected set; }
public int CritChance { get; set; } = 5;
public int Exp { get; set; }
public double Gold { get; set; }
public bool IsDead { get; set; } = false;
public double GenerateDamage() => random.Next((int)MinDamage, (int)MaxDamage);
public abstract void Attack(Player player, Enemy enemy, double damage, bool crit = false);
}
}