mirror of
https://github.com/magefree/mage.git
synced 2026-01-19 09:49:54 -08:00
* Fixed Identity Thief copying creature with +1/+1 counter gets P/T boost from it, but not counter (fixes #2131).
This commit is contained in:
parent
d1c25b0662
commit
d0db2d51ed
33 changed files with 407 additions and 385 deletions
|
|
@ -158,8 +158,8 @@ class MarathWillOfTheWildCreateTokenEffect extends OneShotEffect {
|
|||
if (player != null) {
|
||||
int amount = new ManacostVariableValue().calculate(game, source, this);
|
||||
Token token = new MarathWillOfTheWildElementalToken();
|
||||
token.getPower().initValue(amount);
|
||||
token.getToughness().initValue(amount);
|
||||
token.getPower().modifyBaseValue(amount);
|
||||
token.getToughness().modifyBaseValue(amount);
|
||||
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,8 +113,8 @@ class WireflyToken extends Token {
|
|||
WireflyToken() {
|
||||
super("Wirefly", "2/2 colorless Insect artifact creature token named Wirefly");
|
||||
this.setOriginalExpansionSetCode("DST");
|
||||
this.getPower().initValue(2);
|
||||
this.getToughness().initValue(2);
|
||||
this.getPower().modifyBaseValue(2);
|
||||
this.getToughness().modifyBaseValue(2);
|
||||
this.getSubtype().add("Insect");
|
||||
this.getCardType().add(CardType.ARTIFACT);
|
||||
this.getCardType().add(CardType.CREATURE);
|
||||
|
|
|
|||
|
|
@ -106,10 +106,7 @@ class IdentityThiefAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getSourceId().equals(this.getSourceId())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return event.getSourceId().equals(this.getSourceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -141,7 +138,11 @@ class IdentityThiefEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (controller != null && permanent != null && sourcePermanent != null) {
|
||||
CopyEffect copyEffect = new CopyEffect(Duration.EndOfTurn, permanent, source.getSourceId());
|
||||
Permanent permanentReset = permanent.copy();
|
||||
permanentReset.getCounters().clear();
|
||||
permanentReset.getPower().resetToBaseValue();
|
||||
permanentReset.getToughness().resetToBaseValue();
|
||||
CopyEffect copyEffect = new CopyEffect(Duration.EndOfTurn, permanentReset, source.getSourceId());
|
||||
if (controller.moveCardToExileWithInfo(permanent, source.getSourceId(), sourcePermanent.getIdName(), source.getSourceId(), game, Zone.BATTLEFIELD, true)) {
|
||||
// Copy exiled permanent
|
||||
game.addEffect(copyEffect, source);
|
||||
|
|
|
|||
|
|
@ -33,14 +33,11 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -108,7 +105,9 @@ class TreeOfPerditionEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
opponent.setLife(amount, game);
|
||||
game.addEffect(new SetPowerToughnessSourceEffect(Integer.MIN_VALUE, life, Duration.Custom, SubLayer.SetPT_7b), source);
|
||||
perm.getPower().modifyBaseValue(life);
|
||||
perm.getToughness().modifyBaseValue(life);
|
||||
// game.addEffect(new SetPowerToughnessSourceEffect(Integer.MIN_VALUE, life, Duration.Custom, SubLayer.SetPT_7b), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ class CamaridToken extends Token {
|
|||
CamaridToken() {
|
||||
super("Camarid", "1/1 blue Camarid creature tokens");
|
||||
this.setOriginalExpansionSetCode("FEM");
|
||||
this.getPower().initValue(1);
|
||||
this.getToughness().initValue(1);
|
||||
this.getPower().modifyBaseValue(1);
|
||||
this.getToughness().modifyBaseValue(1);
|
||||
this.color.setBlue(true);
|
||||
this.getSubtype().add("Camarid");
|
||||
this.getCardType().add(CardType.CREATURE);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -43,7 +42,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
|
|
@ -152,7 +150,9 @@ class PrimalPlasmaReplacementEffect extends ReplacementEffectImpl {
|
|||
game.addEffect(new GainAbilitySourceEffect(DefenderAbility.getInstance(), Duration.Custom), source);
|
||||
break;
|
||||
}
|
||||
game.addEffect(new SetPowerToughnessSourceEffect(power, toughness, Duration.Custom, SubLayer.SetPT_7b), source);
|
||||
permanent.getPower().modifyBaseValue(power);
|
||||
permanent.getToughness().modifyBaseValue(toughness);
|
||||
// game.addEffect(new SetPowerToughnessSourceEffect(power, toughness, Duration.Custom, SubLayer.SetPT_7b), source);
|
||||
}
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,117 +1,117 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.gatecrash;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class MimingSlime extends CardImpl {
|
||||
|
||||
public MimingSlime(UUID ownerId) {
|
||||
super(ownerId, 126, "Miming Slime", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{G}");
|
||||
this.expansionSetCode = "GTC";
|
||||
|
||||
// Put an X/X green Ooze creature token onto the battlefield, where X is the greatest power among creatures you control.
|
||||
this.getSpellAbility().addEffect(new MimingSlimeEffect());
|
||||
}
|
||||
|
||||
public MimingSlime(final MimingSlime card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MimingSlime copy() {
|
||||
return new MimingSlime(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MimingSlimeEffect extends OneShotEffect {
|
||||
|
||||
public MimingSlimeEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
staticText = "Put an X/X green Ooze creature token onto the battlefield, where X is the greatest power among creatures you control";
|
||||
}
|
||||
|
||||
public MimingSlimeEffect(final MimingSlimeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MimingSlimeEffect copy() {
|
||||
return new MimingSlimeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
List<Permanent> creatures = game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), player.getId(), game);
|
||||
int amount = 0;
|
||||
for (Permanent creature : creatures) {
|
||||
int power = creature.getPower().getValue();
|
||||
if (amount < power) {
|
||||
amount = power;
|
||||
}
|
||||
}
|
||||
OozeToken oozeToken = new OozeToken();
|
||||
oozeToken.getPower().initValue(amount);
|
||||
oozeToken.getToughness().initValue(amount);
|
||||
oozeToken.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class OozeToken extends Token {
|
||||
public OozeToken() {
|
||||
super("Ooze", "X/X green Ooze creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Ooze");
|
||||
color.setGreen(true);
|
||||
power = new MageInt(0);
|
||||
toughness = new MageInt(0);
|
||||
setOriginalExpansionSetCode("RTR");
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.gatecrash;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class MimingSlime extends CardImpl {
|
||||
|
||||
public MimingSlime(UUID ownerId) {
|
||||
super(ownerId, 126, "Miming Slime", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{G}");
|
||||
this.expansionSetCode = "GTC";
|
||||
|
||||
// Put an X/X green Ooze creature token onto the battlefield, where X is the greatest power among creatures you control.
|
||||
this.getSpellAbility().addEffect(new MimingSlimeEffect());
|
||||
}
|
||||
|
||||
public MimingSlime(final MimingSlime card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MimingSlime copy() {
|
||||
return new MimingSlime(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MimingSlimeEffect extends OneShotEffect {
|
||||
|
||||
public MimingSlimeEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
staticText = "Put an X/X green Ooze creature token onto the battlefield, where X is the greatest power among creatures you control";
|
||||
}
|
||||
|
||||
public MimingSlimeEffect(final MimingSlimeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MimingSlimeEffect copy() {
|
||||
return new MimingSlimeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
List<Permanent> creatures = game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), player.getId(), game);
|
||||
int amount = 0;
|
||||
for (Permanent creature : creatures) {
|
||||
int power = creature.getPower().getValue();
|
||||
if (amount < power) {
|
||||
amount = power;
|
||||
}
|
||||
}
|
||||
OozeToken oozeToken = new OozeToken();
|
||||
oozeToken.getPower().modifyBaseValue(amount);
|
||||
oozeToken.getToughness().modifyBaseValue(amount);
|
||||
oozeToken.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class OozeToken extends Token {
|
||||
public OozeToken() {
|
||||
super("Ooze", "X/X green Ooze creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Ooze");
|
||||
color.setGreen(true);
|
||||
power = new MageInt(0);
|
||||
toughness = new MageInt(0);
|
||||
setOriginalExpansionSetCode("RTR");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,109 +1,109 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.RemoveVariableCountersTargetCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class OozeFlux extends CardImpl {
|
||||
|
||||
public OozeFlux(UUID ownerId) {
|
||||
super(ownerId, 128, "Ooze Flux", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}");
|
||||
this.expansionSetCode = "GTC";
|
||||
|
||||
// {1}{G}, Remove one or more +1/+1 counters from among creatures you control: Put an X/X green Ooze creature token onto the battlefield, where X is the number of +1/+1 counters removed this way.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new OozeFluxCreateTokenEffect(new OozeToken()),new ManaCostsImpl("{1}{G}"));
|
||||
ability.addCost(new RemoveVariableCountersTargetCost(new FilterControlledCreaturePermanent("creatures you control"), CounterType.P1P1, "one or more", 1));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public OozeFlux(final OozeFlux card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OozeFlux copy() {
|
||||
return new OozeFlux(this);
|
||||
}
|
||||
}
|
||||
|
||||
class OozeFluxCreateTokenEffect extends OneShotEffect {
|
||||
|
||||
private final Token token;
|
||||
|
||||
public OozeFluxCreateTokenEffect(Token token) {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.token = token;
|
||||
staticText = "Put an X/X green Ooze creature token onto the battlefield, where X is the number of +1/+1 counters removed this way";
|
||||
}
|
||||
|
||||
public OozeFluxCreateTokenEffect(final OozeFluxCreateTokenEffect effect) {
|
||||
super(effect);
|
||||
this.token = effect.token.copy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public OozeFluxCreateTokenEffect copy() {
|
||||
return new OozeFluxCreateTokenEffect(this);
|
||||
}
|
||||
|
||||
@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().initValue(xValue);
|
||||
tokenCopy.getToughness().initValue(xValue);
|
||||
tokenCopy.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.RemoveVariableCountersTargetCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class OozeFlux extends CardImpl {
|
||||
|
||||
public OozeFlux(UUID ownerId) {
|
||||
super(ownerId, 128, "Ooze Flux", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}");
|
||||
this.expansionSetCode = "GTC";
|
||||
|
||||
// {1}{G}, Remove one or more +1/+1 counters from among creatures you control: Put an X/X green Ooze creature token onto the battlefield, where X is the number of +1/+1 counters removed this way.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new OozeFluxCreateTokenEffect(new OozeToken()),new ManaCostsImpl("{1}{G}"));
|
||||
ability.addCost(new RemoveVariableCountersTargetCost(new FilterControlledCreaturePermanent("creatures you control"), CounterType.P1P1, "one or more", 1));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public OozeFlux(final OozeFlux card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OozeFlux copy() {
|
||||
return new OozeFlux(this);
|
||||
}
|
||||
}
|
||||
|
||||
class OozeFluxCreateTokenEffect extends OneShotEffect {
|
||||
|
||||
private final Token token;
|
||||
|
||||
public OozeFluxCreateTokenEffect(Token token) {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.token = token;
|
||||
staticText = "Put an X/X green Ooze creature token onto the battlefield, where X is the number of +1/+1 counters removed this way";
|
||||
}
|
||||
|
||||
public OozeFluxCreateTokenEffect(final OozeFluxCreateTokenEffect effect) {
|
||||
super(effect);
|
||||
this.token = effect.token.copy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public OozeFluxCreateTokenEffect copy() {
|
||||
return new OozeFluxCreateTokenEffect(this);
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ class SkeletonToken extends Token {
|
|||
SkeletonToken() {
|
||||
super("Skeleton", "1/1 black Skeleton creature token onto the battlefield. It has \"{B}: Regenerate this creature.\"");
|
||||
this.setOriginalExpansionSetCode("HML");
|
||||
this.getPower().initValue(1);
|
||||
this.getToughness().initValue(1);
|
||||
this.getPower().modifyBaseValue(1);
|
||||
this.getToughness().modifyBaseValue(1);
|
||||
this.color.setBlack(true);
|
||||
this.getSubtype().add("Skeleton");
|
||||
this.getCardType().add(CardType.CREATURE);
|
||||
|
|
|
|||
|
|
@ -99,7 +99,11 @@ class EssenceOfTheWildEffect extends ReplacementEffectImpl {
|
|||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Permanent sourceObject = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (sourceObject != null) {
|
||||
game.addEffect(new CopyEffect(Duration.Custom, sourceObject, event.getTargetId()), source);
|
||||
Permanent permanentReset = sourceObject.copy();
|
||||
permanentReset.getCounters().clear();
|
||||
permanentReset.getPower().resetToBaseValue();
|
||||
permanentReset.getToughness().resetToBaseValue();
|
||||
game.addEffect(new CopyEffect(Duration.Custom, permanentReset, event.getTargetId()), source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,14 +73,13 @@ public class PharikaGodOfAffliction extends CardImpl {
|
|||
// As long as your devotion to black and green is less than seven, Pharika isn't a creature.
|
||||
Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.B, ColoredManaSymbol.G), 7);
|
||||
effect.setText("As long as your devotion to black and green is less than seven, Pharika isn't a creature");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
// {B}{G}: Exile target creature card from a graveyard. It's owner puts a 1/1 black and green Snake enchantment creature token with deathtouch onto the battlefield.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PharikaExileEffect(), new ManaCostsImpl("{B}{G}"));
|
||||
Target target = new TargetCardInGraveyard(new FilterCreatureCard("a creature card from a graveyard"));
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public PharikaGodOfAffliction(final PharikaGodOfAffliction card) {
|
||||
|
|
@ -98,7 +97,7 @@ class PharikaExileEffect extends OneShotEffect {
|
|||
public PharikaExileEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
staticText = "Exile target creature card from a graveyard. It's owner puts a 1/1 black and green Snake enchantment creature token with deathtouch onto the battlefield";
|
||||
}
|
||||
}
|
||||
|
||||
public PharikaExileEffect(final PharikaExileEffect effect) {
|
||||
super(effect);
|
||||
|
|
@ -116,8 +115,8 @@ class PharikaExileEffect extends OneShotEffect {
|
|||
Player tokenController = game.getPlayer(targetCard.getOwnerId());
|
||||
if (tokenController != null) {
|
||||
return new PharikaSnakeToken().putOntoBattlefield(1, game, source.getSourceId(), tokenController.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -132,15 +131,13 @@ class PharikaExileEffect extends OneShotEffect {
|
|||
class PharikaSnakeToken extends Token {
|
||||
|
||||
public PharikaSnakeToken() {
|
||||
super("Snake", "1/1 black and green Snake enchantment creature token with deathtouch");
|
||||
super("Snake", "1/1 black and green Snake enchantment creature token with deathtouch", 1, 1);
|
||||
this.setOriginalExpansionSetCode("JOU");
|
||||
cardType.add(CardType.ENCHANTMENT);
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Snake");
|
||||
color.setBlack(true);
|
||||
color.setGreen(true);
|
||||
power.setValue(1);
|
||||
toughness.setValue(1);
|
||||
this.addAbility(DeathtouchAbility.getInstance());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,8 +134,8 @@ class NissaSageAnimistToken extends Token {
|
|||
super("Ashaya, the Awoken World", "legendary 4/4 green Elemental creature token named Ashaya, the Awoken World");
|
||||
this.setOriginalExpansionSetCode("ORI");
|
||||
this.getSupertype().add("Legendary");
|
||||
this.getPower().initValue(4);
|
||||
this.getToughness().initValue(4);
|
||||
this.getPower().modifyBaseValue(4);
|
||||
this.getToughness().modifyBaseValue(4);
|
||||
this.color.setGreen(true);
|
||||
this.getSubtype().add("Elemental");
|
||||
this.getCardType().add(CardType.CREATURE);
|
||||
|
|
|
|||
|
|
@ -81,8 +81,8 @@ public class PhyrexianRebirth extends CardImpl {
|
|||
count += permanent.destroy(source.getSourceId(), game, false) ? 1 : 0;
|
||||
}
|
||||
HorrorToken horrorToken = new HorrorToken();
|
||||
horrorToken.getPower().initValue(count);
|
||||
horrorToken.getToughness().initValue(count);
|
||||
horrorToken.getPower().modifyBaseValue(count);
|
||||
horrorToken.getToughness().modifyBaseValue(count);
|
||||
horrorToken.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ class CatWarriorToken extends Token {
|
|||
CatWarriorToken() {
|
||||
super("Cat Warrior", "2/2 green Cat Warrior creature token with forestwalk");
|
||||
this.setOriginalExpansionSetCode("PLC");
|
||||
this.getPower().initValue(2);
|
||||
this.getToughness().initValue(2);
|
||||
this.getPower().modifyBaseValue(2);
|
||||
this.getToughness().modifyBaseValue(2);
|
||||
this.color.setGreen(true);
|
||||
this.getSubtype().add("Cat");
|
||||
this.getSubtype().add("Warrior");
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -43,7 +42,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
|
|
@ -153,7 +151,9 @@ class PrimalPlasmaReplacementEffect extends ReplacementEffectImpl {
|
|||
game.addEffect(new GainAbilitySourceEffect(DefenderAbility.getInstance(), Duration.Custom), source);
|
||||
break;
|
||||
}
|
||||
game.addEffect(new SetPowerToughnessSourceEffect(power, toughness, Duration.Custom, SubLayer.SetPT_7b), source);
|
||||
permanent.getPower().modifyBaseValue(power);
|
||||
permanent.getToughness().modifyBaseValue(toughness);
|
||||
// game.addEffect(new SetPowerToughnessSourceEffect(power, toughness, Duration.Custom, SubLayer.SetPT_7b), source);
|
||||
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -31,11 +31,8 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.SetToughnessSourceEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -95,14 +92,14 @@ class MoltenSentryEffect extends OneShotEffect {
|
|||
if (controller != null && permanent != null) {
|
||||
if (controller.flipCoin(game)) {
|
||||
game.informPlayers("Heads: " + permanent.getLogName() + " enters the battlefield as a 5/2 creature with haste");
|
||||
game.addEffect(new SetPowerSourceEffect(new StaticValue(5), Duration.WhileOnBattlefield), source);
|
||||
game.addEffect(new SetToughnessSourceEffect(new StaticValue(2), Duration.WhileOnBattlefield), source);
|
||||
permanent.getPower().modifyBaseValue(5);
|
||||
permanent.getToughness().modifyBaseValue(2);
|
||||
game.addEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield), source);
|
||||
return true;
|
||||
} else {
|
||||
game.informPlayers("Tails: " + permanent.getLogName() + " enters the battlefield as a 2/5 creature with defender");
|
||||
game.addEffect(new SetPowerSourceEffect(new StaticValue(2), Duration.WhileOnBattlefield), source);
|
||||
game.addEffect(new SetToughnessSourceEffect(new StaticValue(5), Duration.WhileOnBattlefield), source);
|
||||
permanent.getPower().modifyBaseValue(2);
|
||||
permanent.getToughness().modifyBaseValue(5);
|
||||
game.addEffect(new GainAbilitySourceEffect(DefenderAbility.getInstance(), Duration.WhileOnBattlefield), source);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ class SlimeMoldingEffect extends OneShotEffect {
|
|||
int count = source.getManaCostsToPay().getX();
|
||||
|
||||
OozeToken oozeToken = new OozeToken();
|
||||
oozeToken.getPower().initValue(count);
|
||||
oozeToken.getToughness().initValue(count);
|
||||
oozeToken.getPower().modifyBaseValue(count);
|
||||
oozeToken.getToughness().modifyBaseValue(count);
|
||||
oozeToken.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ class DevastatingSummonsEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
ElementalToken token = new ElementalToken();
|
||||
|
||||
token.getPower().initValue(new GetXValue().calculate(game, source, this));
|
||||
token.getToughness().initValue(new GetXValue().calculate(game, source, this));
|
||||
token.getPower().modifyBaseValue(new GetXValue().calculate(game, source, this));
|
||||
token.getToughness().modifyBaseValue(new GetXValue().calculate(game, source, this));
|
||||
|
||||
token.putOntoBattlefield(2, game, source.getSourceId(), source.getControllerId());
|
||||
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ class GelatinousGenesisEffect extends OneShotEffect {
|
|||
int count = source.getManaCostsToPay().getX();
|
||||
|
||||
OozeToken oozeToken = new OozeToken();
|
||||
oozeToken.getPower().initValue(count);
|
||||
oozeToken.getToughness().initValue(count);
|
||||
oozeToken.getPower().modifyBaseValue(count);
|
||||
oozeToken.getToughness().modifyBaseValue(count);
|
||||
oozeToken.putOntoBattlefield(count, game, source.getSourceId(), source.getControllerId());
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,15 +72,15 @@ class QuicksilverGargantuanApplyToPermanent extends ApplyToPermanent {
|
|||
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
permanent.getPower().initValue(7);
|
||||
permanent.getToughness().initValue(7);
|
||||
permanent.getPower().modifyBaseValue(7);
|
||||
permanent.getToughness().modifyBaseValue(7);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
mageObject.getPower().initValue(7);
|
||||
mageObject.getToughness().initValue(7);
|
||||
mageObject.getPower().modifyBaseValue(7);
|
||||
mageObject.getToughness().modifyBaseValue(7);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ class WurmcallingEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
int count = source.getManaCostsToPay().getX();
|
||||
WurmToken token = new WurmToken();
|
||||
token.getPower().initValue(count);
|
||||
token.getToughness().initValue(count);
|
||||
token.getPower().modifyBaseValue(count);
|
||||
token.getToughness().modifyBaseValue(count);
|
||||
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,8 +129,8 @@ class PhyrexianProcessorCreateTokenEffect extends OneShotEffect {
|
|||
if(object != null && object instanceof Integer) {
|
||||
int lifePaid = (int) object;
|
||||
MinionToken token = new MinionToken();
|
||||
token.getPower().initValue(lifePaid);
|
||||
token.getToughness().initValue(lifePaid);
|
||||
token.getPower().modifyBaseValue(lifePaid);
|
||||
token.getToughness().modifyBaseValue(lifePaid);
|
||||
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue