28 lines
747 B
Java
28 lines
747 B
Java
package Moves;
|
|
|
|
import ru.ifmo.se.pokemon.*;
|
|
|
|
public class Thunderbolt extends SpecialMove {
|
|
private boolean success = false;
|
|
public Thunderbolt(){
|
|
super(Type.ELECTRIC, 90, 100);
|
|
}
|
|
|
|
@Override
|
|
protected void applyOppEffects(Pokemon pokemon) {
|
|
int chance = (int)(Math.random() * 101);
|
|
if (chance <= 10) {
|
|
this.success = true;
|
|
pokemon.setCondition((new Effect()).condition(Status.PARALYZE));
|
|
}
|
|
}
|
|
|
|
@Override
|
|
protected String describe() {
|
|
if (this.success) {
|
|
return "успешно отравил просроченным энергетиком";
|
|
}
|
|
return "подкинул просроченный энергетик";
|
|
}
|
|
}
|