-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathAssassin.java
More file actions
42 lines (34 loc) · 1.13 KB
/
Assassin.java
File metadata and controls
42 lines (34 loc) · 1.13 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
package org.project.entity.players;
import org.project.object.armors.Armor;
import org.project.object.weapons.Weapon;
import org.project.entity.Entity;
public class Assassin extends Assassin {
public Assassin(String name, 200, 40, weapon, armor) {
@Override
public void attack(Entity target) {
System.out.println(getName() + " attacks with a" + weapon.getname());
super.attack(target);
}
@Override
public void defend() {
System.out.println(getName() + " raises his shield!");
super.defend();
}
@Override
public void takeDamage(int damage) {
System.out.println(getName() + " takes " + damage + " damage!");
super.takeDamage(damage);
}
@Override
public void heal(int health) {
System.out.println(getName() + " heals for " + health + " health!");
super.heal(health);
}
@Override
public void fillMana(int mana) {
System.out.println(getName() + " restores " + mana + " mana!");
super.fillMana(mana);
}
}
}
}