-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpell.java
More file actions
45 lines (37 loc) · 1.01 KB
/
Copy pathSpell.java
File metadata and controls
45 lines (37 loc) · 1.01 KB
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
public abstract class Spell extends RPGItem {
protected int damage;
protected int manaCost;
public Spell() {
super();
damage = 0;
manaCost = 0;
}
public Spell(String name, int price, int requiredLevel, int damage, int manaCost) {
super(name, price, requiredLevel);
this.damage = damage;
this.manaCost = manaCost;
}
public int getDamage() {
return damage;
}
public int getManaCost() {
return manaCost;
}
public void setDamage(int damage) {
this.damage = damage;
}
public void setManaCost(int manaCost) {
this.manaCost = manaCost;
}
@Override
public String toString() {
return "Spell{" +
" Name: " + name +
" Price: " + price +
" Required Level: " + requiredLevel +
" Damage: " + damage +
" Mana Cost: " + manaCost +
" }";
}
public abstract String getAttribute();
}