mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 11:02:00 -08:00
Fixed Deceiver of Form duration and tooltip. Fixed Goblin Freerunner tooltip.
This commit is contained in:
parent
90322d2846
commit
be05be8733
2 changed files with 199 additions and 194 deletions
|
|
@ -1,192 +1,192 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without modification, are
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
* permitted provided that the following conditions are met:
|
* permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
* conditions and the following disclaimer.
|
* conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
* 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
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
* provided with the distribution.
|
* provided with the distribution.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
* 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
|
* 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
|
* 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
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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
|
* 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
|
* 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
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* The views and conclusions contained in the software and documentation are those of the
|
* 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
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
package mage.sets.oathofthegatewatch;
|
package mage.sets.oathofthegatewatch;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
|
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
import mage.abilities.effects.ContinuousEffectImpl;
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.Cards;
|
import mage.cards.Cards;
|
||||||
import mage.cards.CardsImpl;
|
import mage.cards.CardsImpl;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Layer;
|
import mage.constants.Layer;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
import mage.constants.SubLayer;
|
import mage.constants.SubLayer;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public class DeceiverOfForm extends CardImpl {
|
public class DeceiverOfForm extends CardImpl {
|
||||||
|
|
||||||
public DeceiverOfForm(UUID ownerId) {
|
public DeceiverOfForm(UUID ownerId) {
|
||||||
super(ownerId, 1, "Deceiver of Form", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}{C}");
|
super(ownerId, 1, "Deceiver of Form", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}{C}");
|
||||||
this.expansionSetCode = "OGW";
|
this.expansionSetCode = "OGW";
|
||||||
this.subtype.add("Eldrazi");
|
this.subtype.add("Eldrazi");
|
||||||
this.power = new MageInt(8);
|
this.power = new MageInt(8);
|
||||||
this.toughness = new MageInt(8);
|
this.toughness = new MageInt(8);
|
||||||
|
|
||||||
// At the beginning of combat on your turn, reveal the top card of your library.
|
// At the beginning of combat on your turn, reveal the top card of your library.
|
||||||
// If a creature card is revealed this way, you may have creatures you control other than Deceiver of Form becomes copies of that card until end of turn.
|
// If a creature card is revealed this way, you may have creatures you control other than Deceiver of Form becomes copies of that card until end of turn.
|
||||||
// You may put that card on the bottom of your library.
|
// You may put that card on the bottom of your library.
|
||||||
this.addAbility(new BeginningOfCombatTriggeredAbility(new DeceiverOfFormEffect(), TargetController.YOU, false));
|
this.addAbility(new BeginningOfCombatTriggeredAbility(new DeceiverOfFormEffect(), TargetController.YOU, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeceiverOfForm(final DeceiverOfForm card) {
|
public DeceiverOfForm(final DeceiverOfForm card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DeceiverOfForm copy() {
|
public DeceiverOfForm copy() {
|
||||||
return new DeceiverOfForm(this);
|
return new DeceiverOfForm(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DeceiverOfFormEffect extends OneShotEffect {
|
class DeceiverOfFormEffect extends OneShotEffect {
|
||||||
|
|
||||||
public DeceiverOfFormEffect() {
|
public DeceiverOfFormEffect() {
|
||||||
super(Outcome.Copy);
|
super(Outcome.Copy);
|
||||||
this.staticText = "At the beginning of combat on your turn, reveal the top card of your library. If a creature card is revealed this way, you may have creatures you control other than Deceiver of Form becomes copies of that card until end of turn. You may put that card on the bottom of your library";
|
this.staticText = "reveal the top card of your library. If a creature card is revealed this way, you may have creatures you control other than Deceiver of Form becomes copies of that card until end of turn. You may put that card on the bottom of your library";
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeceiverOfFormEffect(final DeceiverOfFormEffect effect) {
|
public DeceiverOfFormEffect(final DeceiverOfFormEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DeceiverOfFormEffect copy() {
|
public DeceiverOfFormEffect copy() {
|
||||||
return new DeceiverOfFormEffect(this);
|
return new DeceiverOfFormEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
MageObject sourceObject = source.getSourceObject(game);
|
MageObject sourceObject = source.getSourceObject(game);
|
||||||
if (controller != null && sourceObject != null) {
|
if (controller != null && sourceObject != null) {
|
||||||
Card card = controller.getLibrary().getFromTop(game);
|
Card card = controller.getLibrary().getFromTop(game);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
Cards cards = new CardsImpl(card);
|
Cards cards = new CardsImpl(card);
|
||||||
controller.revealCards(sourceObject.getIdName(), cards, game);
|
controller.revealCards(sourceObject.getIdName(), cards, game);
|
||||||
if (card.getCardType().contains(CardType.CREATURE)) {
|
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||||
if (controller.chooseUse(outcome, "Let creatures you control other than "
|
if (controller.chooseUse(outcome, "Let creatures you control other than "
|
||||||
+ sourceObject.getLogName() + " becomes copies of " + card.getLogName() + " until end of turn?", source, game)) {
|
+ sourceObject.getLogName() + " becomes copies of " + card.getLogName() + " until end of turn?", source, game)) {
|
||||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), controller.getId(), game)) {
|
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), controller.getId(), game)) {
|
||||||
if (!permanent.getId().equals(sourceObject.getId())) {
|
if (!permanent.getId().equals(sourceObject.getId())) {
|
||||||
ContinuousEffect effect = new DeceiverOfFormCopyEffect(card);
|
ContinuousEffect effect = new DeceiverOfFormCopyEffect(card);
|
||||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (controller.chooseUse(outcome, "Move " + card.getLogName() + " to the bottom of your library?", source, game)) {
|
if (controller.chooseUse(outcome, "Move " + card.getLogName() + " to the bottom of your library?", source, game)) {
|
||||||
controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, false, true);
|
controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DeceiverOfFormCopyEffect extends ContinuousEffectImpl {
|
class DeceiverOfFormCopyEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
private final Card card;
|
private final Card card;
|
||||||
|
|
||||||
public DeceiverOfFormCopyEffect(Card card) {
|
public DeceiverOfFormCopyEffect(Card card) {
|
||||||
super(Duration.WhileOnBattlefield, Layer.CopyEffects_1, SubLayer.NA, Outcome.BecomeCreature);
|
super(Duration.EndOfTurn, Layer.CopyEffects_1, SubLayer.NA, Outcome.BecomeCreature);
|
||||||
this.card = card;
|
this.card = card;
|
||||||
staticText = "becomes copies of that card until end of turn";
|
staticText = "becomes copies of that card until end of turn";
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeceiverOfFormCopyEffect(final DeceiverOfFormCopyEffect effect) {
|
public DeceiverOfFormCopyEffect(final DeceiverOfFormCopyEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
this.card = effect.card;
|
this.card = effect.card;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DeceiverOfFormCopyEffect copy() {
|
public DeceiverOfFormCopyEffect copy() {
|
||||||
return new DeceiverOfFormCopyEffect(this);
|
return new DeceiverOfFormCopyEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||||
if (card == null || permanent == null) {
|
if (card == null || permanent == null) {
|
||||||
discard();
|
discard();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
permanent.setName(card.getName());
|
permanent.setName(card.getName());
|
||||||
permanent.getPower().setValue(card.getPower().getValue());
|
permanent.getPower().setValue(card.getPower().getValue());
|
||||||
permanent.getToughness().setValue(card.getToughness().getValue());
|
permanent.getToughness().setValue(card.getToughness().getValue());
|
||||||
permanent.getColor(game).setColor(card.getColor(game));
|
permanent.getColor(game).setColor(card.getColor(game));
|
||||||
permanent.getManaCost().clear();
|
permanent.getManaCost().clear();
|
||||||
permanent.getManaCost().add(card.getManaCost());
|
permanent.getManaCost().add(card.getManaCost());
|
||||||
permanent.getCardType().clear();
|
permanent.getCardType().clear();
|
||||||
for (CardType type : card.getCardType()) {
|
for (CardType type : card.getCardType()) {
|
||||||
if (!permanent.getCardType().contains(type)) {
|
if (!permanent.getCardType().contains(type)) {
|
||||||
permanent.getCardType().add(type);
|
permanent.getCardType().add(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
permanent.getSubtype().clear();
|
permanent.getSubtype().clear();
|
||||||
for (String type : card.getSubtype()) {
|
for (String type : card.getSubtype()) {
|
||||||
if (!permanent.getSubtype().contains(type)) {
|
if (!permanent.getSubtype().contains(type)) {
|
||||||
permanent.getSubtype().add(type);
|
permanent.getSubtype().add(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
permanent.getSupertype().clear();
|
permanent.getSupertype().clear();
|
||||||
for (String type : card.getSupertype()) {
|
for (String type : card.getSupertype()) {
|
||||||
if (!permanent.getSupertype().contains(type)) {
|
if (!permanent.getSupertype().contains(type)) {
|
||||||
permanent.getSupertype().add(type);
|
permanent.getSupertype().add(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
permanent.removeAllAbilities(source.getSourceId(), game);
|
permanent.removeAllAbilities(source.getSourceId(), game);
|
||||||
|
|
||||||
for (Ability ability : card.getAbilities()) {
|
for (Ability ability : card.getAbilities()) {
|
||||||
if (!permanent.getAbilities().contains(ability)) {
|
if (!permanent.getAbilities().contains(ability)) {
|
||||||
permanent.addAbility(ability, source.getSourceId(), game);
|
permanent.addAbility(ability, source.getSourceId(), game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@
|
||||||
package mage.sets.oathofthegatewatch;
|
package mage.sets.oathofthegatewatch;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.abilities.effects.common.combat.CantBlockTargetEffect;
|
import mage.abilities.effects.common.combat.CantBlockTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -47,8 +48,12 @@ public class SparkmagesGambit extends CardImpl {
|
||||||
this.expansionSetCode = "OGW";
|
this.expansionSetCode = "OGW";
|
||||||
|
|
||||||
// Sparkmage's Gambit deals 1 damage to each of up to two target creatures. Those creatures can't block this turn.
|
// Sparkmage's Gambit deals 1 damage to each of up to two target creatures. Those creatures can't block this turn.
|
||||||
this.getSpellAbility().addEffect(new DamageTargetEffect(1));
|
Effect effect = new DamageTargetEffect(1);
|
||||||
this.getSpellAbility().addEffect(new CantBlockTargetEffect(Duration.EndOfTurn));
|
effect.setText("{this} deals 1 damage to each of up to two target creatures. ");
|
||||||
|
this.getSpellAbility().addEffect(effect);
|
||||||
|
effect = new CantBlockTargetEffect(Duration.EndOfTurn);
|
||||||
|
effect.setText("Those creatures can't block this turn");
|
||||||
|
this.getSpellAbility().addEffect(effect);
|
||||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue