-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMinions.java
More file actions
40 lines (23 loc) · 788 Bytes
/
Minions.java
File metadata and controls
40 lines (23 loc) · 788 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
public class Minions extends Sidekick implements Cloneable {
public Minions(float HP,float XP, float cost, float damage){
super(HP,XP,cost,damage);
}
@Override
public void attack(Monster monster){
System.out.println("You attacked and inflicted " + damage + " damage to the monster.");
monster.setHP(monster.getHP()- damage);
}
@Override
public void defence(float f,Monster monster){
// System.out.println("You got " + f+5 + " less damage.");
// this.setHP(this.getHP()+f+5);
}
@Override
public void toDefault(){
this.HP=100;
}
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
}