public TokenImpl(String name, String description, int power, int toughness) { this(name, description); this.power.modifyBaseValue(power); this.toughness.modifyBaseValue(toughness); }
@Override public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) { permanent.removePTCDA(); permanent.getPower().modifyBaseValue(7); permanent.getToughness().modifyBaseValue(7); return true; }
@Override public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) { mageObject.removePTCDA(); mageObject.getPower().modifyBaseValue(7); mageObject.getToughness().modifyBaseValue(7); return true; }
@Override public boolean turnFaceUp(Game game, UUID playerId) { if (super.turnFaceUp(game, playerId)) { power.modifyBaseValue(power.getBaseValue()); toughness.modifyBaseValue(toughness.getBaseValue()); setManifested(false); setMorphed(false); return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { String lastChosen = (String) game.getState().getValue(source.getSourceId().toString() + "_Shapeshifter"); int lastChosenNumber = Integer.parseInt(lastChosen); permanent.getPower().modifyBaseValue(lastChosenNumber); permanent.getToughness().modifyBaseValue(7 - lastChosenNumber); return true; } return false; } }
public CamaridToken() { super("Camarid", "1/1 blue Camarid creature tokens"); this.setOriginalExpansionSetCode("FEM"); this.getPower().modifyBaseValue(1); this.getToughness().modifyBaseValue(1); this.color.setBlue(true); this.getSubtype(null).add(SubType.CAMARID); this.addCardType(CardType.CREATURE); }
@Override public boolean apply(Game game, Ability source) { DevastatingSummonsElementalToken token = new DevastatingSummonsElementalToken(); token.getPower().modifyBaseValue(GetXValue.instance.calculate(game, source, this)); token.getToughness().modifyBaseValue(GetXValue.instance.calculate(game, source, this)); token.putOntoBattlefield(2, game, source.getSourceId(), source.getControllerId()); return true; }
public RagavanToken() { super("Ragavan", "legendary 2/1 red Monkey creature token named Ragavan"); this.setOriginalExpansionSetCode("AER"); this.addSuperType(SuperType.LEGENDARY); this.getPower().modifyBaseValue(2); this.getToughness().modifyBaseValue(1); this.color.setRed(true); this.getSubtype(null).add(SubType.MONKEY); this.addCardType(CardType.CREATURE); }
@Override public boolean apply(Game game, Ability source) { int count = source.getManaCostsToPay().getX(); WurmCallingWurmToken token = new WurmCallingWurmToken(); token.getPower().modifyBaseValue(count); token.getToughness().modifyBaseValue(count); token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); return true; }
public NissaSageAnimistToken() { super("Ashaya, the Awoken World", "legendary 4/4 green Elemental creature token named Ashaya, the Awoken World"); this.setOriginalExpansionSetCode("ORI"); this.addSuperType(SuperType.LEGENDARY); this.getPower().modifyBaseValue(4); this.getToughness().modifyBaseValue(4); this.color.setGreen(true); this.getSubtype(null).add(SubType.ELEMENTAL); this.addCardType(CardType.CREATURE); }
@Override public boolean apply(Game game, Ability source) { int count = source.getManaCostsToPay().getX(); OozeToken oozeToken = new OozeToken(); oozeToken.getPower().modifyBaseValue(count); oozeToken.getToughness().modifyBaseValue(count); oozeToken.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); return true; }
@Override public boolean apply(Game game, Ability source) { int count = source.getManaCostsToPay().getX(); OozeToken oozeToken = new OozeToken(); oozeToken.getPower().modifyBaseValue(count); oozeToken.getToughness().modifyBaseValue(count); oozeToken.putOntoBattlefield(count, game, source.getSourceId(), source.getControllerId()); return true; }
public WireflyToken() { super("Wirefly", "2/2 colorless Insect artifact creature token with flying named Wirefly"); this.setOriginalExpansionSetCode("DST"); this.getPower().modifyBaseValue(2); this.getToughness().modifyBaseValue(2); this.getSubtype(null).add(SubType.INSECT); this.addCardType(CardType.ARTIFACT); this.addCardType(CardType.CREATURE); this.addAbility(FlyingAbility.getInstance()); }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { int amount = ManacostVariableValue.instance.calculate(game, source, this); Token token = new MarathWillOfTheWildElementalToken(); token.getPower().modifyBaseValue(amount); token.getToughness().modifyBaseValue(amount); token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); return true; } return false; } }
public PermanentToken(Token token, UUID controllerId, String expansionSetCode, Game game) { super(controllerId, controllerId, token.getName()); this.expansionSetCode = expansionSetCode; this.token = token.copy(); this.token.getAbilities().newOriginalId(); // neccessary if token has ability like DevourAbility() this.token.getAbilities().setSourceId(objectId); this.power.modifyBaseValue(token.getPower().getBaseValueModified()); this.toughness.modifyBaseValue(token.getToughness().getBaseValueModified()); this.copyFromToken(this.token, game, false); // needed to have at this time (e.g. for subtypes for entersTheBattlefield replacement effects) }
public CatWarriorToken() { super("Cat Warrior", "2/2 green Cat Warrior creature token with forestwalk"); availableImageSetCodes = tokenImageSets; this.setOriginalExpansionSetCode("PLC"); this.getPower().modifyBaseValue(2); this.getToughness().modifyBaseValue(2); this.color.setGreen(true); this.getSubtype(null).add(SubType.CAT); this.getSubtype(null).add(SubType.WARRIOR); this.addCardType(CardType.CREATURE); this.addAbility(new ForestwalkAbility()); }
@Override public boolean apply(Game game, Ability source) { int count = 0; for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), game)) { count += permanent.destroy(source.getSourceId(), game, false) ? 1 : 0; } PhyrexianRebirthHorrorToken horrorToken = new PhyrexianRebirthHorrorToken(); horrorToken.getPower().modifyBaseValue(count); horrorToken.getToughness().modifyBaseValue(count); horrorToken.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); return true; }
@Override public boolean apply(Game game, Ability source) { String key = CardUtil.getCardZoneString("lifePaid", source.getSourceId(), game, true); Object object = game.getState().getValue(key); if (object instanceof Integer) { int lifePaid = (int) object; MinionToken token = new MinionToken(); token.getPower().modifyBaseValue(lifePaid); token.getToughness().modifyBaseValue(lifePaid); token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { int xValue = 0; for (Cost cost : source.getCosts()) { if (cost instanceof RemoveVariableCountersTargetCost) { xValue = ((RemoveVariableCountersTargetCost) cost).getAmount(); break; } } Token tokenCopy = token.copy(); tokenCopy.getAbilities().newId(); tokenCopy.getPower().modifyBaseValue(xValue); tokenCopy.getToughness().modifyBaseValue(xValue); tokenCopy.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); return true; } }
public static void setPermanentToFaceDownCreature(MageObject mageObject) { mageObject.getPower().modifyBaseValue(2); mageObject.getToughness().modifyBaseValue(2); mageObject.getAbilities().clear(); mageObject.getColor(null).setColor(new ObjectColor()); mageObject.setName(""); mageObject.getCardType().clear(); mageObject.addCardType(CardType.CREATURE); mageObject.getSubtype(null).clear(); mageObject.getSuperType().clear(); mageObject.getManaCost().clear(); if (mageObject instanceof Permanent) { ((Permanent) mageObject).setExpansionSetCode(""); ((Permanent) mageObject).setRarity(Rarity.SPECIAL); } } }