pokemon-cmd/src/main/java/items/MasterBall.java
EpicKnarvik97 c5c4420ac0 Huge changes
Refactoring of Game
Adds and improves all comments
Restructures files
Improves items
Makes project into a maven project
2020-02-16 02:36:26 +01:00

22 lines
553 B
Java

package items;
import pokemon.Pokemon;
import storage.Trainer;
import java.util.List;
/**
* This class represents a master ball item
*/
public class MasterBall extends AbstractPokeBall {
public MasterBall() {
super("Master ball", "The best Poké Ball with the ultimate level of performance. With it, " +
"you will catch any wild Pokémon without fail.");
}
@Override
public boolean use(Pokemon target, List<Pokemon> current, Trainer catcher) {
return target.tryCapture(current, catcher, 0);
}
}