-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHeroes.cs
49 lines (44 loc) · 1.64 KB
/
Heroes.cs
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//Put all heros here.
public class TrueProgrammer : Character
{
public override string Name { get; }
public override CharacterType _characterType => CharacterType.TRUE_PROGRAMMER;
public override PlayerType _playerType => PlayerType.HUMAN;
public TrueProgrammer(string name) { Name = name; }
public override int MaxHealthPoints => 25;
public override IAttack BasicAttack => new Punch();
public override IAttackModifiers DefensiveMods => new ObjectSight();
}
public class Punch : IAttack
{
public string Name => "PUNCH";
public AttackData Generate() => new AttackData(1);
}
public class ObjectSight : IAttackModifiers
{
public string Name => "OBJECT SIGHT";
public int DamageReduction => 1;
public int IncreaseDamage { get; }
public AttackData RunModifier(AttackData data, Character user, Character target)
{
var damage = data.Damage;
var damageReduction = DamageReduction;
var isDecoding = data._damageType == DamageType.DECODING;
if (isDecoding)
{
//ensures they can't heal from the damage if it's too low.
damage = Math.Max(damage - damageReduction, 0);
return new AttackData(damage);
}
//otherwise returns the original data
else return data;
}
}
public class Vin : Character
{
public override string Name => "Vin Fletcher";
public override CharacterType _characterType => CharacterType.HUMAN;
public override int MaxHealthPoints => 15;
public override IAttack BasicAttack => new Punch();
public override Equipment Weapon => new Bow();
}