@Override public PartnerWithAbility copy() { return new PartnerWithAbility(this); }
protected int addMissingPartner(List<Card> booster, boolean partnerAllowed, int max, int i) { for (Ability ability : booster.get(booster.size() - 1).getAbilities()) { //Check if fetched card has the PartnerWithAbility if (ability instanceof PartnerWithAbility) { //Check if the pack already contains a partner pair if (partnerAllowed) { //Added card always replaces an uncommon card Card card = CardRepository.instance.findCard(((PartnerWithAbility) ability).getPartnerName()).getCard(); if (i < max) { booster.add(card); } else { booster.set(0, card); } //2 return value indicates found partner return 2; } else { //If partner already exists, remove card and loop again booster.remove(booster.size() - 1); return 0; } } } return 1; }
public PartnerWithAbility(String partnerName, boolean isLegendary, boolean hasReminderText) { super(new PartnersWithSearchEffect(partnerName), false); this.addTarget(new TargetPlayer()); this.partnerName = partnerName; this.hasReminderText = hasReminderText; if (isLegendary) { this.shortName = shortenName(partnerName); } else { this.shortName = partnerName; } }
public SoulbladeRenewer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); this.subtype.add(SubType.ELF); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); // Partner with Soulblade Corrupter (When this creature enters the battlefield, target player may put Soulblade Corrupter into their hand from their library, then shuffle.) this.addAbility(new PartnerWithAbility("Soulblade Corrupter")); // When Soulblade Renewer enters the battlefield, support 2. (Put a +1/+1 counter on each of up to two target creatures.) this.addAbility(new SupportAbility(this, 2)); }
for (Ability ability : commander.getAbilities()) { if (ability instanceof PartnerWithAbility && commanderNames.contains(((PartnerWithAbility) ability).getPartnerName())) { partnersWith = true; break;
public PirImaginativeRascal(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); // Partner with Toothy, Imaginary Friend (When this creature enters the battlefield, target player may put Toothy into their hand from their library, then shuffle.) this.addAbility(new PartnerWithAbility("Toothy, Imaginary Friend", true)); // If one or more counters would be put on a permanent your team controls, that many plus one of each of those kinds of counters are put on that permanent instead. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PirImaginativeRascalEffect())); }
for (Ability ability : commander.getAbilities()) { if (ability instanceof PartnerWithAbility && commanderNames.contains(((PartnerWithAbility) ability).getPartnerName())) { partnersWith = true; break;
public ImpetuousProtege(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(0); this.toughness = new MageInt(4); // Partner with Proud Mentor (When this creature enters the battlefield, target player may put Proud Mentor into their hand from their library, then shuffle.) this.addAbility(new PartnerWithAbility("Proud Mentor")); // Whenever Impetuous Protege attacks, it gets +X/+0 until end of turn, where X is the greatest power among tapped creatures your opponents control this.addAbility(new AttacksTriggeredAbility(new ImpetuousProtegeEffect(), false)); }
for (Ability ability : commander.getAbilities()) { if (ability instanceof PartnerWithAbility && commanderNames.contains(((PartnerWithAbility) ability).getPartnerName())) { partnersWith = true; break;
public BlaringCaptain(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.subtype.add(SubType.AZRA); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); // Partner with Blaring Recruiter (When this creature enters the battlefield, target player may put Blaring Recruiter into their hand from their library, then shuffle.) this.addAbility(new PartnerWithAbility("Blaring Recruiter")); // Whenever Blaring Captain attacks, attacking Warriors get +1/+1 until end of turn. this.addAbility(new AttacksTriggeredAbility(new BoostAllEffect(1, 1, Duration.EndOfTurn, filter, false), false)); }
public SoulbladeCorrupter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); // Partner with Soulblade Renewer (When this creature enters the battlefield, target player may put Soulblade Renewer into their hand from their library, then shuffle.) this.addAbility(new PartnerWithAbility("Soulblade Renewer")); // Deathtouch this.addAbility(DeathtouchAbility.getInstance()); // Whenever a creature with a +1/+1 counter on it attacks one of your opponents, that creature gains deathtouch until end of turn. this.addAbility(new SoulbladeCorrupterTriggeredAbility()); }
public VirtusTheVeiled(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.AZRA); this.subtype.add(SubType.ASSASSIN); this.power = new MageInt(1); this.toughness = new MageInt(1); // Partner with Gorm the Great (When this creature enters the battlefield, target player may put Gorm into their hand from their library, then shuffle.) this.addAbility(new PartnerWithAbility("Gorm the Great", true)); // Deathtouch this.addAbility(DeathtouchAbility.getInstance()); // Whenever Virtus the Veiled deals combat damage to a player, that player loses half their life, rounded up. this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new LoseHalfLifeTargetEffect(), false, true)); }
public BlaringRecruiter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); this.subtype.add(SubType.ELF); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); // Partner with Blaring Captain (When this creature enters the battlefield, target player may put Blaring Captain into their hand from their library, then shuffle.) this.addAbility(new PartnerWithAbility("Blaring Captain")); // {2}{W}: Create a 1/1 white Warrior creature token. this.addAbility(new SimpleActivatedAbility(new CreateTokenEffect(new WarriorToken()), new ManaCostsImpl("{2}{W}"))); }
public ZndrspltEyeOfWisdom(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HOMUNCULUS); this.power = new MageInt(1); this.toughness = new MageInt(4); // Partner with Okaun, Eye of Chaos (When this creature enters the battlefield, target player may put Okaun into their hand from their library, then shuffle.) this.addAbility(new PartnerWithAbility("Okaun, Eye of Chaos", true)); // At the beginning of combat on your turn, flip a coin until you lose a flip. this.addAbility(new BeginningOfCombatTriggeredAbility(new FlipUntilLoseEffect(), TargetController.YOU, false)); // Whenever a player wins a coin flip, draw a card. this.addAbility(new WinsCoinFlipTriggeredAbility(new DrawCardSourceControllerEffect(1))); }
public LoreWeaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); // Partner with Ley Weaver (When this creature enters the battlefield, target player may put Ley Weaver into their hand from their library, then shuffle.) this.addAbility(new PartnerWithAbility("Ley Weaver")); // {5}{U}{U}: Target player draws two cards. Ability ability = new SimpleActivatedAbility(new DrawCardTargetEffect(2), new ManaCostsImpl("{5}{U}{U}")); ability.addTarget(new TargetPlayer()); this.addAbility(ability); }
public LeyWeaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.DRUID); this.power = new MageInt(2); this.toughness = new MageInt(2); // Partner with Lore Weaver (When this creature enters the battlefield, target player may put Lore Weaver into their hand from their library, then shuffle.) this.addAbility(new PartnerWithAbility("Lore Weaver")); // {T}: Untap two target lands. Ability ability = new SimpleActivatedAbility(new UntapTargetEffect(), new TapSourceCost()); ability.addTarget(new TargetLandPermanent(2)); this.addAbility(ability); }
public SylviaBrightspear(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); // Partner with Khorvath Brightflame (When this creature enters the battlefield, target player may put Khorvath into their hand from their library, then shuffle.) this.addAbility(new PartnerWithAbility("Khorvath Brightflame", true)); // Double strike this.addAbility(DoubleStrikeAbility.getInstance()); // Dragons your team controls have double strike. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield, filter))); }
public ChewbaccaTheBeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.WOOKIEE); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); // Partner with Han Solo, Scrumrat this.addAbility(new PartnerWithAbility("Han Solo, Scrumrat")); // Whenever Chewbacca, the Beast attacks, another target attacking creature you control gains indestructible until end of turn. Ability ability = new AttacksTriggeredAbility(new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), false); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); }
public GormTheGreat(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.GIANT); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(7); // Partner with Virtus the Veiled (When this creature enters the battlefield, target player may put Virtus into their hand from their library, then shuffle.) this.addAbility(new PartnerWithAbility("Virtus the Veiled", true)); // Vigilance this.addAbility(VigilanceAbility.getInstance()); // Gorm the Great must be blocked if able, and Gorm must be blocked by two or more creatures if able. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MustBeBlockedByAtLeastOneSourceEffect(Duration.WhileOnBattlefield, 2) .setText("{this} must be blocked if able, and {this} must be blocked by two or more creatures if able"))); }
public ProudMentor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); // Partner with Impetuous Protege (When this creature enters the battlefield, target player may put Impetuous Protege into their hand from their library, then shuffle.) this.addAbility(new PartnerWithAbility("Impetuous Protege")); // {W}, {T}: Tap target creature Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ColoredManaCost(ColoredManaSymbol.W)); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }