mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 20:29:19 -08:00
* Hallowed Moonlight - Fixed a bug in the way cards were moved to exile.
This commit is contained in:
parent
0157bf0494
commit
855ac6e4e1
3 changed files with 44 additions and 5 deletions
|
|
@ -31,6 +31,7 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
|
@ -89,9 +90,12 @@ class HallowedMoonlightEffect extends ReplacementEffectImpl {
|
|||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
EntersTheBattlefieldEvent entersTheBattlefieldEvent = (EntersTheBattlefieldEvent) event;
|
||||
controller.moveCards(entersTheBattlefieldEvent.getTarget(), Zone.EXILED, source, game, false, false, false, null);
|
||||
Card targetCard = game.getCard(event.getTargetId());
|
||||
if (targetCard == null) {
|
||||
targetCard = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
}
|
||||
if (controller != null && targetCard != null) {
|
||||
controller.moveCards(targetCard, Zone.EXILED, source, game, false, false, false, null);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@ public class GemstoneMine extends CardImpl {
|
|||
// Gemstone Mine enters the battlefield with three mining counters on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.MINING.createInstance(3))));
|
||||
|
||||
// {tap}, Remove a mining counter from Gemstone Mine: Add one mana of any color to your mana pool. If there are no mining counters on Gemstone Mine, sacrifice it.
|
||||
// {T}, Remove a mining counter from Gemstone Mine: Add one mana of any color to your mana pool. If there are no mining counters on Gemstone Mine, sacrifice it.
|
||||
Ability ability = new AnyColorManaAbility();
|
||||
ability.addCost(new RemoveCountersSourceCost(CounterType.MINING.createInstance(1)));
|
||||
ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new SourceHasCounterCondition(CounterType.MINING, 0,0), "If there are no mining counters on Gemstone Mine, sacrifice it"));
|
||||
ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new SourceHasCounterCondition(CounterType.MINING, 0, 0), "If there are no mining counters on {this}, sacrifice it"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue