mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
- Added Silkbind Faerie, Swans of Bryn Argoll, and Thoughtweft Gambit.
This commit is contained in:
parent
2e68f6c692
commit
ba96f651ef
3 changed files with 332 additions and 0 deletions
80
Mage.Sets/src/mage/sets/shadowmoor/SilkbindFaerie.java
Normal file
80
Mage.Sets/src/mage/sets/shadowmoor/SilkbindFaerie.java
Normal file
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* 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.shadowmoor;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.UntapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class SilkbindFaerie extends CardImpl {
|
||||
|
||||
public SilkbindFaerie(UUID ownerId) {
|
||||
super(ownerId, 148, "Silkbind Faerie", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W/U}");
|
||||
this.expansionSetCode = "SHM";
|
||||
this.subtype.add("Faerie");
|
||||
this.subtype.add("Rogue");
|
||||
|
||||
this.color.setWhite(true);
|
||||
this.color.setBlue(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// {1}{WU}, {untap}: Tap target creature.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl("{1}{W/U}"));
|
||||
ability.addCost(new UntapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public SilkbindFaerie(final SilkbindFaerie card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SilkbindFaerie copy() {
|
||||
return new SilkbindFaerie(this);
|
||||
}
|
||||
}
|
140
Mage.Sets/src/mage/sets/shadowmoor/SwansOfBrynArgoll.java
Normal file
140
Mage.Sets/src/mage/sets/shadowmoor/SwansOfBrynArgoll.java
Normal file
|
@ -0,0 +1,140 @@
|
|||
/*
|
||||
* 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.shadowmoor;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamageEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class SwansOfBrynArgoll extends CardImpl {
|
||||
|
||||
public SwansOfBrynArgoll(UUID ownerId) {
|
||||
super(ownerId, 151, "Swans of Bryn Argoll", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W/U}{W/U}");
|
||||
this.expansionSetCode = "SHM";
|
||||
this.subtype.add("Bird");
|
||||
this.subtype.add("Spirit");
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.color.setWhite(true);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// If a source would deal damage to Swans of Bryn Argoll, prevent that damage. The source's controller draws cards equal to the damage prevented this way.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SwansOfBrynArgollEffect()));
|
||||
|
||||
}
|
||||
|
||||
public SwansOfBrynArgoll(final SwansOfBrynArgoll card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SwansOfBrynArgoll copy() {
|
||||
return new SwansOfBrynArgoll(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SwansOfBrynArgollEffect extends ReplacementEffectImpl {
|
||||
|
||||
SwansOfBrynArgollEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.PreventDamage);
|
||||
staticText = "If a source would deal damage to {this}, prevent that damage. The source's controller draws cards equal to the damage prevented this way";
|
||||
}
|
||||
|
||||
SwansOfBrynArgollEffect(final SwansOfBrynArgollEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Boolean passed = false;
|
||||
DamageEvent damageEvent = (DamageEvent) event;
|
||||
Card sourceOfDamage = game.getCard(event.getSourceId());
|
||||
if (sourceOfDamage != null) {
|
||||
Spell spell = game.getStack().getSpell(sourceOfDamage.getId());
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(sourceOfDamage.getId());
|
||||
if (spell != null) {
|
||||
Player controllerOfSpell = game.getPlayer(spell.getControllerId());
|
||||
controllerOfSpell.drawCards(damageEvent.getAmount(), game);
|
||||
passed = true;
|
||||
}
|
||||
if (permanent != null) {
|
||||
Player controllerOfPermanent = game.getPlayer(permanent.getControllerId());
|
||||
controllerOfPermanent.drawCards(damageEvent.getAmount(), game);
|
||||
passed = true;
|
||||
}
|
||||
if (!passed) {
|
||||
Player owner = game.getPlayer(sourceOfDamage.getOwnerId());
|
||||
if (owner != null) {
|
||||
owner.drawCards(damageEvent.getAmount(), game);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return event.getType() == EventType.DAMAGE_CREATURE
|
||||
&& event.getTargetId().equals(source.getSourceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SwansOfBrynArgollEffect copy() {
|
||||
return new SwansOfBrynArgollEffect(this);
|
||||
}
|
||||
}
|
112
Mage.Sets/src/mage/sets/shadowmoor/ThoughtweftGambit.java
Normal file
112
Mage.Sets/src/mage/sets/shadowmoor/ThoughtweftGambit.java
Normal file
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* 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.shadowmoor;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class ThoughtweftGambit extends CardImpl {
|
||||
|
||||
public ThoughtweftGambit(UUID ownerId) {
|
||||
super(ownerId, 154, "Thoughtweft Gambit", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{4}{W/U}{W/U}");
|
||||
this.expansionSetCode = "SHM";
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Tap all creatures your opponents control and untap all creatures you control.
|
||||
this.getSpellAbility().addEffect(new ThoughtweftGambitEffect());
|
||||
|
||||
}
|
||||
|
||||
public ThoughtweftGambit(final ThoughtweftGambit card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThoughtweftGambit copy() {
|
||||
return new ThoughtweftGambit(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ThoughtweftGambitEffect extends OneShotEffect {
|
||||
|
||||
private static FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
public ThoughtweftGambitEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Tap all creatures your opponents control and untap all creatures you control";
|
||||
}
|
||||
|
||||
public ThoughtweftGambitEffect(final ThoughtweftGambitEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Boolean passed = false;
|
||||
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (opponents != null) {
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
|
||||
if (opponents.contains(creature.getControllerId())) {
|
||||
creature.tap(game);
|
||||
}
|
||||
}
|
||||
passed = true;
|
||||
}
|
||||
if (controller != null) {
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
|
||||
if (controller.getId() == creature.getControllerId()) {
|
||||
creature.untap(game);
|
||||
}
|
||||
}
|
||||
passed = true;
|
||||
}
|
||||
return passed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThoughtweftGambitEffect copy() {
|
||||
return new ThoughtweftGambitEffect(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue