add abilities
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user