-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuffConsumable.cs
35 lines (29 loc) · 896 Bytes
/
BuffConsumable.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FinalProject
{
internal class BuffConsumable : Consumable
{
public StatusEffect Effect { get; }
public BuffConsumable(string name, string description, int buyPrice, int sellPrice, StatusEffect effect)
: base(name, description, buyPrice, sellPrice)
{
Effect = effect;
}
public override void ActivateEffect(Hero hero)
{
hero.Effects.Add(Effect);
}
public override string ToString()
{
StringBuilder builder = new StringBuilder();
builder.AppendLine(Name);
builder.AppendLine(Description);
builder.AppendLine($"Applies {Effect.Name} on use.");
return builder.ToString();
}
}
}