mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
C17 added Seth's Tiger.
This commit is contained in:
parent
884b6919c4
commit
7e8dcef120
4 changed files with 366 additions and 238 deletions
|
@ -28,6 +28,7 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.FatefulHourCondition;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -54,11 +55,9 @@ import mage.target.common.TargetControlledPermanent;
|
|||
public class FaithsShield extends CardImpl {
|
||||
|
||||
public FaithsShield(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
|
||||
|
||||
// Target permanent you control gains protection from the color of your choice until end of turn.
|
||||
|
||||
// Fateful hour - If you have 5 or less life, instead you and each permanent you control gain protection from the color of your choice until end of turn.
|
||||
this.getSpellAbility().addEffect(new FaithsShieldEffect());
|
||||
this.getSpellAbility().addTarget(new TargetControlledPermanent());
|
||||
|
@ -79,7 +78,7 @@ class FaithsShieldEffect extends OneShotEffect {
|
|||
public FaithsShieldEffect() {
|
||||
super(Outcome.Protect);
|
||||
staticText = "Target permanent you control gains protection from the color of your choice until end of turn."
|
||||
+ "<br/><br/><i>Fateful hour</i> - If you have 5 or less life, instead you and each permanent you control gain protection from the color of your choice until end of turn";
|
||||
+ "<br/><br/><i>Fateful hour</i> - If you have 5 or less life, instead you and each permanent you control gain protection from the color of your choice until end of turn";
|
||||
}
|
||||
|
||||
public FaithsShieldEffect(final FaithsShieldEffect effect) {
|
||||
|
@ -89,7 +88,8 @@ class FaithsShieldEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
MageObject mageObject = game.getObject(source.getSourceId());
|
||||
if (controller != null && mageObject != null) {
|
||||
if (FatefulHourCondition.instance.apply(game, source)) {
|
||||
ChoiceColor choice = new ChoiceColor();
|
||||
while (!choice.isChosen()) {
|
||||
|
@ -98,18 +98,20 @@ class FaithsShieldEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
FilterCard filter = new FilterCard();
|
||||
filter.add(new ColorPredicate(choice.getColor()));
|
||||
filter.setMessage(choice.getChoice());
|
||||
|
||||
Ability ability = new ProtectionAbility(filter) ;
|
||||
game.addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn), source);
|
||||
game.addEffect(new GainAbilityControllerEffect(ability, Duration.EndOfTurn), source);
|
||||
}
|
||||
else {
|
||||
if (choice.getColor() != null) {
|
||||
game.informPlayers(mageObject.getLogName() + ": " + controller.getLogName() + " has chosen " + choice.getChoice());
|
||||
FilterCard filter = new FilterCard();
|
||||
filter.add(new ColorPredicate(choice.getColor()));
|
||||
filter.setMessage(choice.getChoice());
|
||||
Ability ability = new ProtectionAbility(filter);
|
||||
game.addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn), source);
|
||||
game.addEffect(new GainAbilityControllerEffect(ability, Duration.EndOfTurn), source);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
game.addEffect(new GainProtectionFromColorTargetEffect(Duration.EndOfTurn), source);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
return false;
|
||||
|
|
125
Mage.Sets/src/mage/cards/s/SehtsTiger.java
Normal file
125
Mage.Sets/src/mage/cards/s/SehtsTiger.java
Normal file
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* 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.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControllerEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.choices.ChoiceColor;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SehtsTiger extends CardImpl {
|
||||
|
||||
public SehtsTiger(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}");
|
||||
|
||||
this.subtype.add(SubType.CAT);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// When Seht's Tiger enters the battlefield, you gain protection from the color of your choice until end of turn.
|
||||
// (You can't be targeted, dealt damage, or enchanted by anything of the chosen color.)
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SehtsTigerEffect(), false));
|
||||
|
||||
}
|
||||
|
||||
public SehtsTiger(final SehtsTiger card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SehtsTiger copy() {
|
||||
return new SehtsTiger(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SehtsTigerEffect extends OneShotEffect {
|
||||
|
||||
public SehtsTigerEffect() {
|
||||
super(Outcome.Protect);
|
||||
staticText = "you gain protection from the color of your choice until end of turn <i>(You can't be targeted, dealt damage, or enchanted by anything of the chosen color.)</i>";
|
||||
}
|
||||
|
||||
public SehtsTigerEffect(final SehtsTigerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject mageObject = game.getObject(source.getSourceId());
|
||||
if (controller != null && mageObject != null) {
|
||||
ChoiceColor choice = new ChoiceColor();
|
||||
while (!choice.isChosen()) {
|
||||
controller.choose(Outcome.Protect, choice, game);
|
||||
if (!controller.canRespond()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (choice.getColor() != null) {
|
||||
game.informPlayers(mageObject.getLogName() + ": " + controller.getLogName() + " has chosen " + choice.getChoice());
|
||||
FilterCard filter = new FilterCard();
|
||||
filter.add(new ColorPredicate(choice.getColor()));
|
||||
filter.setMessage(choice.getChoice());
|
||||
Ability ability = new ProtectionAbility(filter);
|
||||
game.addEffect(new GainAbilityControllerEffect(ability, Duration.EndOfTurn), source);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SehtsTigerEffect copy() {
|
||||
return new SehtsTigerEffect(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -183,6 +183,7 @@ public class FutureSight extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Scourge of Kher Ridges", 107, Rarity.RARE, mage.cards.s.ScourgeOfKherRidges.class));
|
||||
cards.add(new SetCardInfo("Scout's Warning", 16, Rarity.RARE, mage.cards.s.ScoutsWarning.class));
|
||||
cards.add(new SetCardInfo("Second Wind", 57, Rarity.UNCOMMON, mage.cards.s.SecondWind.class));
|
||||
cards.add(new SetCardInfo("Seht's Tiger", 31, Rarity.RARE, mage.cards.s.SehtsTiger.class));
|
||||
cards.add(new SetCardInfo("Shapeshifter's Marrow", 58, Rarity.RARE, mage.cards.s.ShapeshiftersMarrow.class));
|
||||
cards.add(new SetCardInfo("Shimian Specter", 76, Rarity.RARE, mage.cards.s.ShimianSpecter.class));
|
||||
cards.add(new SetCardInfo("Skirk Ridge Exhumer", 77, Rarity.UNCOMMON, mage.cards.s.SkirkRidgeExhumer.class));
|
||||
|
|
|
@ -1829,7 +1829,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
MageObject sourceObject = game.getObject(sourceId);
|
||||
game.informPlayers(damage + " damage "
|
||||
+ (sourceObject == null ? "" : "from " + sourceObject.getLogName())
|
||||
+ "to " + getLogName()
|
||||
+ " to " + getLogName()
|
||||
+ (damage > 1 ? " were" : "was") + " prevented because of protection.");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue