I'm working on a task given off of a textbook . I can't call out the "poisonAttack" method from the same class. Would appreciate if anyone can give me feedback.
public class PoisonMatango extends Matango {
PoisonMatango pm = new PoisonMatango ('A');
public PoisonMatango ( char suffix) {
super(suffix);
}
// The method I am trying call.
public void poisonAttack(Hero h) {
super.attack(h);
int poisonCount = 5;
if ( poisonCount >=0 ) {
System.out.println("The enemy had spread poisonous pollons");
int pollenDamage = h.hp / 5;
h.hp-= pollenDamage;
System.out.println("Hero has received " + pollenDamage + "damage from " );
poisonCount --;
}else
{
System.out.println("No additional attack were made since poisonCount= 0");
}}
}