mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Added cards.
Fixed 2 previously added cards.
This commit is contained in:
parent
fb4bd59af8
commit
3851aa1402
10 changed files with 441 additions and 43 deletions
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* 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.riseoftheeldrazi;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class MightOfTheMasses extends CardImpl<MightOfTheMasses> {
|
||||
|
||||
public MightOfTheMasses(UUID ownerId) {
|
||||
super(ownerId, 196, "Might of the Masses", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}");
|
||||
this.expansionSetCode = "ROE";
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
||||
PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(new FilterCreaturePermanent(), true);
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(value, value, Duration.EndOfTurn));
|
||||
}
|
||||
|
||||
public MightOfTheMasses(final MightOfTheMasses card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MightOfTheMasses copy() {
|
||||
return new MightOfTheMasses(this);
|
||||
}
|
||||
}
|
|
@ -50,7 +50,7 @@ public class LoamLion extends CardImpl<LoamLion> {
|
|||
private static final FilterLandPermanent filter = new FilterLandPermanent("a Forest");
|
||||
|
||||
static {
|
||||
filter.getName().add("a Forest");
|
||||
filter.getName().add("Forest");
|
||||
}
|
||||
|
||||
public LoamLion(UUID ownerId) {
|
||||
|
|
|
@ -52,7 +52,7 @@ public class SejiriMerfolk extends CardImpl<SejiriMerfolk> {
|
|||
private static final FilterLandPermanent filter = new FilterLandPermanent("a Plains");
|
||||
|
||||
static {
|
||||
filter.getName().add("a Plains");
|
||||
filter.getName().add("Plains");
|
||||
}
|
||||
|
||||
public SejiriMerfolk(UUID ownerId) {
|
||||
|
|
75
Mage.Sets/src/mage/sets/zendikar/GuulDrazVampire.java
Normal file
75
Mage.Sets/src/mage/sets/zendikar/GuulDrazVampire.java
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* 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.zendikar;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.TenOrLessLife;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.IntimidateAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class GuulDrazVampire extends CardImpl<GuulDrazVampire> {
|
||||
|
||||
public GuulDrazVampire(UUID ownerId) {
|
||||
super(ownerId, 93, "Guul Draz Vampire", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}");
|
||||
this.expansionSetCode = "ZEN";
|
||||
this.subtype.add("Vampire");
|
||||
this.subtype.add("Rogue");
|
||||
|
||||
this.color.setBlack(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
ContinuousEffect effect = new GainAbilitySourceEffect(IntimidateAbility.getInstance(), Duration.WhileOnBattlefield);
|
||||
SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect, new TenOrLessLife(TenOrLessLife.CheckType.AN_OPPONENT), "As long as an opponent has 10 or less life, Guul Draz Vampire gets +2/+1 and has intimidate."));
|
||||
ability.addEffect(new BoostSourceEffect(2, 1, Duration.WhileOnBattlefield));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public GuulDrazVampire(final GuulDrazVampire card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuulDrazVampire copy() {
|
||||
return new GuulDrazVampire(this);
|
||||
}
|
||||
}
|
66
Mage.Sets/src/mage/sets/zendikar/HedronCrab.java
Normal file
66
Mage.Sets/src/mage/sets/zendikar/HedronCrab.java
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* 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.zendikar;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.LandfallAbility;
|
||||
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class HedronCrab extends CardImpl<HedronCrab> {
|
||||
|
||||
public HedronCrab(UUID ownerId) {
|
||||
super(ownerId, 47, "Hedron Crab", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{U}");
|
||||
this.expansionSetCode = "ZEN";
|
||||
this.subtype.add("Crab");
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(2);
|
||||
LandfallAbility ability = new LandfallAbility(new PutLibraryIntoGraveTargetEffect(3), false);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public HedronCrab(final HedronCrab card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HedronCrab copy() {
|
||||
return new HedronCrab(this);
|
||||
}
|
||||
}
|
70
Mage.Sets/src/mage/sets/zendikar/PrimalBellow.java
Normal file
70
Mage.Sets/src/mage/sets/zendikar/PrimalBellow.java
Normal file
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* 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.zendikar;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class PrimalBellow extends CardImpl<PrimalBellow> {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest");
|
||||
|
||||
static {
|
||||
filter.getName().add("Forest");
|
||||
}
|
||||
|
||||
public PrimalBellow(UUID ownerId) {
|
||||
super(ownerId, 176, "Primal Bellow", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{G}");
|
||||
this.expansionSetCode = "ZEN";
|
||||
|
||||
this.color.setGreen(true);
|
||||
PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter, true);
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(value, value, Duration.EndOfTurn));
|
||||
}
|
||||
|
||||
public PrimalBellow(final PrimalBellow card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PrimalBellow copy() {
|
||||
return new PrimalBellow(this);
|
||||
}
|
||||
}
|
74
Mage.Sets/src/mage/sets/zendikar/TimbermawLarva.java
Normal file
74
Mage.Sets/src/mage/sets/zendikar/TimbermawLarva.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* 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.zendikar;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class TimbermawLarva extends CardImpl<TimbermawLarva> {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest");
|
||||
|
||||
static {
|
||||
filter.getName().add("Forest");
|
||||
}
|
||||
|
||||
public TimbermawLarva(UUID ownerId) {
|
||||
super(ownerId, 189, "Timbermaw Larva", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}");
|
||||
this.expansionSetCode = "ZEN";
|
||||
this.subtype.add("Beast");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter, true);
|
||||
this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(value, value, Duration.EndOfTurn), false));
|
||||
}
|
||||
|
||||
public TimbermawLarva(final TimbermawLarva card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TimbermawLarva copy() {
|
||||
return new TimbermawLarva(this);
|
||||
}
|
||||
}
|
|
@ -27,22 +27,16 @@
|
|||
*/
|
||||
package mage.sets.zendikar;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.BeginningOfControllerUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.MyTurn;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.condition.common.Unless;
|
||||
import mage.abilities.condition.common.TenOrLessLife;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.LoseLifeSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
||||
import static mage.abilities.condition.common.TenOrLessLife.CheckType.*;
|
||||
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class PermanentsOnBattlefieldCount implements DynamicValue {
|
||||
|
||||
private FilterPermanent filter;
|
||||
private boolean controlled;
|
||||
|
||||
public PermanentsOnBattlefieldCount() {
|
||||
filter = new FilterPermanent();
|
||||
controlled = false;
|
||||
}
|
||||
|
||||
public PermanentsOnBattlefieldCount(FilterPermanent filter, boolean controlled) {
|
||||
this.filter = filter;
|
||||
this.controlled = controlled;
|
||||
}
|
||||
|
||||
public PermanentsOnBattlefieldCount(final PermanentsOnBattlefieldCount dynamicValue) {
|
||||
this.filter = dynamicValue.filter;
|
||||
this.controlled = dynamicValue.controlled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility) {
|
||||
if (controlled) {
|
||||
return game.getBattlefield().countAll(filter, sourceAbility.getControllerId());
|
||||
} else {
|
||||
return game.getBattlefield().countAll(filter);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DynamicValue clone() {
|
||||
return new PermanentsOnBattlefieldCount(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "X";
|
||||
}
|
||||
}
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.effects.common.continious;
|
||||
|
||||
import mage.Constants.Duration;
|
||||
|
@ -33,6 +32,8 @@ import mage.Constants.Layer;
|
|||
import mage.Constants.Outcome;
|
||||
import mage.Constants.SubLayer;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -43,10 +44,14 @@ import mage.game.permanent.Permanent;
|
|||
*/
|
||||
public class BoostTargetEffect extends ContinuousEffectImpl<BoostTargetEffect> {
|
||||
|
||||
private int power;
|
||||
private int toughness;
|
||||
private DynamicValue power;
|
||||
private DynamicValue toughness;
|
||||
|
||||
public BoostTargetEffect(int power, int toughness, Duration duration) {
|
||||
this(new StaticValue(power), new StaticValue(toughness), duration);
|
||||
}
|
||||
|
||||
public BoostTargetEffect(DynamicValue power, DynamicValue toughness, Duration duration) {
|
||||
super(duration, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
||||
this.power = power;
|
||||
this.toughness = toughness;
|
||||
|
@ -54,8 +59,8 @@ public class BoostTargetEffect extends ContinuousEffectImpl<BoostTargetEffect> {
|
|||
|
||||
public BoostTargetEffect(final BoostTargetEffect effect) {
|
||||
super(effect);
|
||||
this.power = effect.power;
|
||||
this.toughness = effect.toughness;
|
||||
this.power = effect.power.clone();
|
||||
this.toughness = effect.toughness.clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -67,8 +72,8 @@ public class BoostTargetEffect extends ContinuousEffectImpl<BoostTargetEffect> {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent target = (Permanent) game.getPermanent(source.getFirstTarget());
|
||||
if (target != null) {
|
||||
target.addPower(power);
|
||||
target.addToughness(toughness);
|
||||
target.addPower(power.calculate(game, source));
|
||||
target.addToughness(toughness.calculate(game, source));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -78,9 +83,8 @@ public class BoostTargetEffect extends ContinuousEffectImpl<BoostTargetEffect> {
|
|||
public String getText(Ability source) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("target ").append(source.getTargets().get(0).getTargetName()).append(" gets ");
|
||||
sb.append(String.format("%1$+d/%2$+d", power, toughness)).append(" ").append(duration.toString());
|
||||
sb.append(power.toString()).append("/").append(toughness.toString());
|
||||
sb.append(" ").append(duration.toString());
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue