-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEarth.java
More file actions
26 lines (22 loc) · 747 Bytes
/
Copy pathEarth.java
File metadata and controls
26 lines (22 loc) · 747 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
package org.example.entities.characters.spells;
import org.example.entities.characters.Entity;
//Class that handles Earth Spells
public class Earth extends Spell {
public Earth(int damage, int mana) {
super(damage, mana);
}
@Override
public String toString() {
return " Earth Spell : Damage = " + this.abilityDamage + ", Mana Cost = " + this.manaCost;
}
@Override
public void visit(Entity entity) {
if(entity.isImuneEarth(this)) {
System.out.println("Imune to the Earth Spell used");
System.out.println("Switching to basic attack");
}
// else {
// entity.receiveDamage(this.getAbilityDamage());
// }
}
}