use of Cards.Fish.BaitfishCard in project cardgame1 by joey101937.
the class BaitfishMinion method onDeath.
@Override
public void onDeath() {
Sticker s = new Sticker(SpriteHandler.skullMedium, this, 600);
if (isSilenced)
return;
ArrayList<Minion> targets = new ArrayList<>();
for (Minion m : owner.minions.getOccupants()) {
if (m.tribe == Tribe.Fish && m != this)
targets.add(m);
}
if (targets.isEmpty()) {
System.out.println("no targets for baitfish death effect");
owner.draw(new BaitfishCard());
return;
}
Minion target = targets.get(Main.generateRandom(0, targets.size()));
target.attack += 1;
target.health += 1;
target.proc();
owner.draw(new BaitfishCard());
}
Aggregations