mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[VOW] Implemented Creepy Puppeteer
This commit is contained in:
parent
51e88b8e19
commit
db7a5b5001
2 changed files with 96 additions and 0 deletions
95
Mage.Sets/src/mage/cards/c/CreepyPuppeteer.java
Normal file
95
Mage.Sets/src/mage/cards/c/CreepyPuppeteer.java
Normal file
|
@ -0,0 +1,95 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CreepyPuppeteer extends CardImpl {
|
||||
|
||||
public CreepyPuppeteer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.ROGUE);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// Whenever Creepy Puppeteer attacks, if you attacked with exactly one other creature this combat, you may have that creature's base power and toughness become 4/3 until end of turn.
|
||||
this.addAbility(new CreepyPuppeteerTriggeredAbility());
|
||||
}
|
||||
|
||||
private CreepyPuppeteer(final CreepyPuppeteer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreepyPuppeteer copy() {
|
||||
return new CreepyPuppeteer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CreepyPuppeteerTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
CreepyPuppeteerTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new SetPowerToughnessTargetEffect(4, 3, Duration.EndOfTurn), true);
|
||||
}
|
||||
|
||||
private CreepyPuppeteerTriggeredAbility(final CreepyPuppeteerTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreepyPuppeteerTriggeredAbility copy() {
|
||||
return new CreepyPuppeteerTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DECLARED_ATTACKERS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (!isControlledBy(game.getCombat().getAttackingPlayerId())
|
||||
|| !game.getCombat().getAttackers().contains(getSourceId())
|
||||
|| game.getCombat().getAttackers().size() != 2) {
|
||||
return false;
|
||||
}
|
||||
UUID otherAttacker = game
|
||||
.getCombat()
|
||||
.getAttackers()
|
||||
.stream()
|
||||
.filter(uuid -> !getSourceId().equals(uuid))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (otherAttacker == null) {
|
||||
return false;
|
||||
}
|
||||
this.getEffects().setTargetPointer(new FixedTarget(otherAttacker, game));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever {this} attacks, if you attacked with exactly one other creature this combat, " +
|
||||
"you may have that creature's base power and toughness become 4/3 until end of turn.";
|
||||
}
|
||||
}
|
|
@ -94,6 +94,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Courier Bat", 102, Rarity.COMMON, mage.cards.c.CourierBat.class));
|
||||
cards.add(new SetCardInfo("Cradle of Safety", 54, Rarity.COMMON, mage.cards.c.CradleOfSafety.class));
|
||||
cards.add(new SetCardInfo("Crawling Infestation", 193, Rarity.UNCOMMON, mage.cards.c.CrawlingInfestation.class));
|
||||
cards.add(new SetCardInfo("Creepy Puppeteer", 151, Rarity.RARE, mage.cards.c.CreepyPuppeteer.class));
|
||||
cards.add(new SetCardInfo("Cruel Witness", 55, Rarity.COMMON, mage.cards.c.CruelWitness.class));
|
||||
cards.add(new SetCardInfo("Crushing Canopy", 194, Rarity.COMMON, mage.cards.c.CrushingCanopy.class));
|
||||
cards.add(new SetCardInfo("Cultivator Colossus", 195, Rarity.MYTHIC, mage.cards.c.CultivatorColossus.class));
|
||||
|
|
Loading…
Reference in a new issue