38 lines
774 B
Java
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);
|
|
}
|
|
}
|