mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +00:00
* Gonti, Lord of Luxury - Fixed the not working "look at the face down card" ability.
This commit is contained in:
parent
cbffe624aa
commit
bc47bb0e7d
2 changed files with 10 additions and 5 deletions
|
@ -34,6 +34,7 @@ import mage.MageInt;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.AsThoughEffectImpl;
|
import mage.abilities.effects.AsThoughEffectImpl;
|
||||||
import mage.abilities.effects.AsThoughManaEffect;
|
import mage.abilities.effects.AsThoughManaEffect;
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
|
@ -79,11 +80,13 @@ public class GontiLordOfLuxury extends CardImpl {
|
||||||
// Deathtouch
|
// Deathtouch
|
||||||
this.addAbility(DeathtouchAbility.getInstance());
|
this.addAbility(DeathtouchAbility.getInstance());
|
||||||
|
|
||||||
// When Gonti, Lord of Luxury enters the battlefield, look at the top four cards of target opponent's library, exile one of them face down, then put the rest on the bottom of that library in a random order. For as long as that card remains exiled, you may look at it, you may cast it, and you may spend mana as though it were mana of any type to cast it.
|
// When Gonti, Lord of Luxury enters the battlefield, look at the top four cards of target opponent's library, exile one of them face down,
|
||||||
|
// then put the rest on the bottom of that library in a random order. For as long as that card remains exiled,
|
||||||
|
// you may look at it, you may cast it, and you may spend mana as though it were mana of any type to cast it.
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(new GontiLordOfLuxuryEffect());
|
Ability ability = new EntersBattlefieldTriggeredAbility(new GontiLordOfLuxuryEffect());
|
||||||
ability.addTarget(new TargetOpponent());
|
ability.addTarget(new TargetOpponent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.ALL, new GontiLordOfLuxuryLookEffect()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public GontiLordOfLuxury(final GontiLordOfLuxury card) {
|
public GontiLordOfLuxury(final GontiLordOfLuxury card) {
|
||||||
|
@ -130,6 +133,7 @@ class GontiLordOfLuxuryEffect extends OneShotEffect {
|
||||||
card.setFaceDown(true, game);
|
card.setFaceDown(true, game);
|
||||||
controller.moveCardsToExile(card, source, game, false, exileZoneId, sourceObject.getIdName());
|
controller.moveCardsToExile(card, source, game, false, exileZoneId, sourceObject.getIdName());
|
||||||
card.setFaceDown(true, game);
|
card.setFaceDown(true, game);
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
Set<UUID> exileZones = (Set<UUID>) game.getState().getValue(GontiLordOfLuxury.VALUE_PREFIX + source.getSourceId().toString());
|
Set<UUID> exileZones = (Set<UUID>) game.getState().getValue(GontiLordOfLuxury.VALUE_PREFIX + source.getSourceId().toString());
|
||||||
if (exileZones == null) {
|
if (exileZones == null) {
|
||||||
exileZones = new HashSet<>();
|
exileZones = new HashSet<>();
|
||||||
|
@ -145,6 +149,7 @@ class GontiLordOfLuxuryEffect extends OneShotEffect {
|
||||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!topCards.isEmpty() && controller.isInGame()) {
|
while (!topCards.isEmpty() && controller.isInGame()) {
|
||||||
Card libCard = topCards.getRandom(game);
|
Card libCard = topCards.getRandom(game);
|
||||||
topCards.remove(libCard);
|
topCards.remove(libCard);
|
||||||
|
|
|
@ -162,7 +162,7 @@ class IntetTheDreamerCastEffect extends AsThoughEffectImpl {
|
||||||
if (zone != null && zone.contains(card.getId())/* && CardUtil.cardCanBePlayedNow(card, controller.getId(), game)*/) {
|
if (zone != null && zone.contains(card.getId())/* && CardUtil.cardCanBePlayedNow(card, controller.getId(), game)*/) {
|
||||||
if (card.getCardType().contains(CardType.LAND)) {
|
if (card.getCardType().contains(CardType.LAND)) {
|
||||||
if (game.canPlaySorcery(controller.getId()) && game.getPlayer(controller.getId()).canPlayLand()) {
|
if (game.canPlaySorcery(controller.getId()) && game.getPlayer(controller.getId()).canPlayLand()) {
|
||||||
return controller.chooseUse(outcome, "Play " + card.getName() + "?", source, game);
|
return controller.chooseUse(outcome, "Play " + card.getIdName() + "?", source, game);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
controller.setCastSourceIdWithAlternateMana(objectId, null, null);
|
controller.setCastSourceIdWithAlternateMana(objectId, null, null);
|
||||||
|
|
Loading…
Reference in a new issue