mirror of
https://github.com/correl/mage.git
synced 2025-01-13 03:00:10 +00:00
Added Utvara Scalper
Added Mogg Jailer Added Goblin Masons Cleaned up a bunch of goblin cards.
This commit is contained in:
parent
2d35b0c3b2
commit
a023d07c7e
9 changed files with 291 additions and 10 deletions
|
@ -82,7 +82,7 @@ class SkirkCommandoEffect extends OneShotEffect {
|
|||
|
||||
public SkirkCommandoEffect() {
|
||||
super(Outcome.Damage);
|
||||
staticText = "it deals 2 damage to target creature that player controls";
|
||||
staticText = "have it deal 2 damage to target creature that player controls";
|
||||
}
|
||||
|
||||
public SkirkCommandoEffect(final SkirkCommandoEffect effect) {
|
||||
|
|
69
Mage.Sets/src/mage/sets/dissension/UtvaraScalper.java
Normal file
69
Mage.Sets/src/mage/sets/dissension/UtvaraScalper.java
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* 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.dissension;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.AttacksEachTurnStaticAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BursegSardaukar
|
||||
*/
|
||||
public class UtvaraScalper extends CardImpl {
|
||||
|
||||
public UtvaraScalper(UUID ownerId) {
|
||||
super(ownerId, 76, "Utvara Scalper", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
this.expansionSetCode = "DIS";
|
||||
this.subtype.add("Goblin");
|
||||
this.subtype.add("Scout");
|
||||
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
//Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
//Utvara Scalper attacks each turn if able
|
||||
this.addAbility(new AttacksEachTurnStaticAbility());
|
||||
}
|
||||
|
||||
public UtvaraScalper(final UtvaraScalper card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UtvaraScalper copy() {
|
||||
return new UtvaraScalper(this);
|
||||
}
|
||||
}
|
|
@ -36,6 +36,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
|
@ -51,7 +52,7 @@ import mage.filter.common.FilterAttackingCreature;
|
|||
*/
|
||||
public class RabbleRouser extends CardImpl {
|
||||
|
||||
private final static FilterAttackingCreature filter = new FilterAttackingCreature("attacking creatures");
|
||||
final static private String rule = "Attacking creatures get +X/+0 until end of turn, where X is Rabble-Rouser's power.";
|
||||
|
||||
public RabbleRouser(UUID ownerId) {
|
||||
super(ownerId, 73, "Rabble-Rouser", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
|
@ -66,7 +67,8 @@ public class RabbleRouser extends CardImpl {
|
|||
this.addAbility(new BloodthirstAbility(1));
|
||||
|
||||
//{R}, {T}: Attacking creatures get +X/+0 until end of turn, where X is Rabble-Rouser's power.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(new SourcePermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, filter, false), new ManaCostsImpl("{R}"));
|
||||
DynamicValue amount = new SourcePermanentPowerCount();
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(amount, new StaticValue(0), Duration.EndOfTurn, new FilterAttackingCreature(), false, rule), new ManaCostsImpl("{R}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -49,9 +49,9 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
|||
*/
|
||||
public class BoggartSpriteChaser extends CardImpl {
|
||||
|
||||
final static private String rule = "{this} flying as long as you control a Faerie";
|
||||
final static private String rule = "{this} has flying as long as you control a Faerie";
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("a Faerie");
|
||||
private static final FilterPermanent filter = new FilterPermanent("Faerie");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Faerie"));
|
||||
|
|
|
@ -45,7 +45,7 @@ import mage.target.TargetPlayer;
|
|||
*/
|
||||
public class QuillSlingerBoggart extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("Kithkin spell");
|
||||
private static final FilterSpell filter = new FilterSpell("a Kithkin spell");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Kithkin"));
|
||||
|
|
133
Mage.Sets/src/mage/sets/planeshift/MoggJailer.java
Normal file
133
Mage.Sets/src/mage/sets/planeshift/MoggJailer.java
Normal file
|
@ -0,0 +1,133 @@
|
|||
/*
|
||||
* 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.planeshift;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.RestrictionEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BursegSardaukar
|
||||
|
||||
*/
|
||||
public class MoggJailer extends CardImpl {
|
||||
|
||||
static final private FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creature with power 2 or less");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.and(new PowerPredicate(Filter.ComparisonType.LessThan, 2), Predicates.not(new TappedPredicate())));
|
||||
//filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3));
|
||||
}
|
||||
|
||||
public MoggJailer(UUID ownerId) {
|
||||
super(ownerId, 68, "Mogg Jailer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
this.expansionSetCode = "PLS";
|
||||
this.subtype.add("Goblin");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Mogg Jailer can't attack if defending player controls an untapped creature with power 2 or less.
|
||||
Effect effect = new CantAttackIfDefenderControllsPermanent(filter);
|
||||
effect.setText("Mogg Jailer can't attack if defending player controls an untapped creature with power 2 or less.");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
public MoggJailer(final MoggJailer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MoggJailer copy() {
|
||||
return new MoggJailer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CantAttackIfDefenderControllsPermanent extends RestrictionEffect {
|
||||
|
||||
private final FilterPermanent filter;
|
||||
|
||||
public CantAttackIfDefenderControllsPermanent(FilterPermanent filter) {
|
||||
super(Duration.WhileOnBattlefield);
|
||||
this.filter = filter;
|
||||
staticText = new StringBuilder("{this} can't attack if defending player controls ").append(filter.getMessage()).toString();
|
||||
}
|
||||
|
||||
public CantAttackIfDefenderControllsPermanent(final CantAttackIfDefenderControllsPermanent effect) {
|
||||
super(effect);
|
||||
this.filter = effect.filter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
return permanent.getId().equals(source.getSourceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttack(UUID defenderId, Ability source, Game game) {
|
||||
UUID defendingPlayerId;
|
||||
Player player = game.getPlayer(defenderId);
|
||||
if (player == null) {
|
||||
Permanent permanent = game.getPermanent(defenderId);
|
||||
if (permanent != null) {
|
||||
defendingPlayerId = permanent.getControllerId();
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
defendingPlayerId = defenderId;
|
||||
}
|
||||
if (defendingPlayerId != null && game.getBattlefield().countAll(filter, defendingPlayerId, game) > 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CantAttackIfDefenderControllsPermanent copy() {
|
||||
return new CantAttackIfDefenderControllsPermanent(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -58,7 +58,6 @@ public class GoblinFireFiend extends CardImpl {
|
|||
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
|
||||
//Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
|
|
|
@ -35,8 +35,8 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.MultipliedValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.dynamicvalue.common.SignInversionDynamicValue;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Duration;
|
||||
|
@ -64,8 +64,8 @@ public class MoggSquad extends CardImpl {
|
|||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
DynamicValue amount = new PermanentsOnBattlefieldCount(filter);
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new MultipliedValue(amount, -1), new MultipliedValue(amount, -1), Duration.WhileOnBattlefield));
|
||||
DynamicValue amount = new SignInversionDynamicValue(new PermanentsOnBattlefieldCount(filter));
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
78
Mage.Sets/src/mage/sets/urzasdestiny/GoblinMasons.java
Normal file
78
Mage.Sets/src/mage/sets/urzasdestiny/GoblinMasons.java
Normal file
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* 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.urzasdestiny;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BursegSardaukar
|
||||
*/
|
||||
public class GoblinMasons extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("Wall");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Wall"));
|
||||
}
|
||||
|
||||
|
||||
public GoblinMasons(UUID ownerId) {
|
||||
super(ownerId, 86, "Goblin Masons", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
this.expansionSetCode = "UDS";
|
||||
this.subtype.add("Goblin");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
//When Goblin Masons dies, destroy target Wall
|
||||
DiesTriggeredAbility ability = new DiesTriggeredAbility(new DestroyTargetEffect(), false);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public GoblinMasons(final GoblinMasons card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoblinMasons copy() {
|
||||
return new GoblinMasons(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue