Files
HW-04-JAVA-KNIGHT/Java-Knight/src/main/java/org/project/abilities/InfernoBreath.java
T
2026-05-17 06:23:39 -07:00

38 lines
774 B
Java

package org.project.abilities;
import org.project.entity.Entity;
public class InfernoBreath extends SpecialAbility{
/*
Dragon use this special ability
its fiery breath deals huge damage to the enemy
*/
private final int breathDamage = 20;
public InfernoBreath() {
super("InfernoBreath",25, 1,AbilityTarget.TARGET);
}
@Override
public void onApply(Entity target) {
super.onApply(target);
}
@Override
public void onTick(Entity target) {
target.takeDamage(breathDamage);
System.out.println("ooooh! " + getName() + " impacted with " + target.getName());
reduceDuration();
}
@Override
public void onExpire(Entity self) {
super.onExpire(self);
}
}