mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 02:52:02 -08:00
[J25] Implement Pol Jamaar, Illusionist
This commit is contained in:
parent
2220c1e490
commit
a23b8f4c87
2 changed files with 91 additions and 0 deletions
90
Mage.Sets/src/mage/cards/p/PolJamaarIllusionist.java
Normal file
90
Mage.Sets/src/mage/cards/p/PolJamaarIllusionist.java
Normal file
|
|
@ -0,0 +1,90 @@
|
||||||
|
package mage.cards.p;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.choices.ChoiceCreatureType;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class PolJamaarIllusionist extends CardImpl {
|
||||||
|
|
||||||
|
public PolJamaarIllusionist(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}");
|
||||||
|
|
||||||
|
this.supertype.add(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
this.subtype.add(SubType.ILLUSION);
|
||||||
|
this.subtype.add(SubType.WIZARD);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// When Pol Jamaar, Illusionist enters, choose a creature type. Draw a card for each creature you control of that type.
|
||||||
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new PolJamaarIllusionistEffect()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private PolJamaarIllusionist(final PolJamaarIllusionist card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PolJamaarIllusionist copy() {
|
||||||
|
return new PolJamaarIllusionist(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PolJamaarIllusionistEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
PolJamaarIllusionistEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "choose a creature type. Draw a card for each creature you control of that type";
|
||||||
|
}
|
||||||
|
|
||||||
|
private PolJamaarIllusionistEffect(final PolJamaarIllusionistEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PolJamaarIllusionistEffect copy() {
|
||||||
|
return new PolJamaarIllusionistEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
if (player == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ChoiceCreatureType choice = new ChoiceCreatureType(game, source);
|
||||||
|
player.choose(outcome, choice, game);
|
||||||
|
SubType subType = SubType.byDescription(choice.getChoice());
|
||||||
|
if (subType == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
game.informPlayers(player.getLogName() + " chooses " + subType);
|
||||||
|
int amount = game
|
||||||
|
.getBattlefield()
|
||||||
|
.count(
|
||||||
|
new FilterControlledCreaturePermanent(subType),
|
||||||
|
source.getControllerId(), source, game
|
||||||
|
);
|
||||||
|
return amount > 0 && player.drawCards(amount, source, game) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -509,6 +509,7 @@ public final class FoundationsJumpstart extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Plains", 81, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Plains", 81, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Plate Armor", 100, Rarity.UNCOMMON, mage.cards.p.PlateArmor.class));
|
cards.add(new SetCardInfo("Plate Armor", 100, Rarity.UNCOMMON, mage.cards.p.PlateArmor.class));
|
||||||
cards.add(new SetCardInfo("Play with Fire", 586, Rarity.UNCOMMON, mage.cards.p.PlayWithFire.class));
|
cards.add(new SetCardInfo("Play with Fire", 586, Rarity.UNCOMMON, mage.cards.p.PlayWithFire.class));
|
||||||
|
cards.add(new SetCardInfo("Pol Jamaar, Illusionist", 38, Rarity.MYTHIC, mage.cards.p.PolJamaarIllusionist.class));
|
||||||
cards.add(new SetCardInfo("Powerstone Fracture", 477, Rarity.COMMON, mage.cards.p.PowerstoneFracture.class));
|
cards.add(new SetCardInfo("Powerstone Fracture", 477, Rarity.COMMON, mage.cards.p.PowerstoneFracture.class));
|
||||||
cards.add(new SetCardInfo("Predator's Strike", 699, Rarity.COMMON, mage.cards.p.PredatorsStrike.class));
|
cards.add(new SetCardInfo("Predator's Strike", 699, Rarity.COMMON, mage.cards.p.PredatorsStrike.class));
|
||||||
cards.add(new SetCardInfo("Pridemalkin", 700, Rarity.COMMON, mage.cards.p.Pridemalkin.class));
|
cards.add(new SetCardInfo("Pridemalkin", 700, Rarity.COMMON, mage.cards.p.Pridemalkin.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue