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