mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 22:12:03 -08:00
fix enter with counter
This commit is contained in:
parent
087e36b63d
commit
acceb33bd9
4 changed files with 23 additions and 24 deletions
|
|
@ -11,6 +11,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.Counters;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamageEvent;
|
||||
|
|
@ -167,12 +168,14 @@ class AscentOfTheWorthyReturnEffect extends OneShotEffect {
|
|||
if (player == null || card == null) {
|
||||
return false;
|
||||
}
|
||||
Counters countersToAdd = new Counters();
|
||||
countersToAdd.addCounter(CounterType.FLYING.createInstance());
|
||||
game.setEnterWithCounters(card.getId(), countersToAdd);
|
||||
player.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
Permanent permanent = game.getPermanent(card.getId());
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
permanent.addCounters(CounterType.FLYING.createInstance(), source.getControllerId(), source, game);
|
||||
game.addEffect(new AddCardSubTypeTargetEffect(
|
||||
SubType.ANGEL, Duration.Custom
|
||||
).setTargetPointer(new FixedTarget(permanent, game)), source);
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import mage.constants.CardType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.Counters;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
|
@ -77,15 +77,14 @@ class CauldronsGiftEffect extends OneShotEffect {
|
|||
TargetCard target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
|
||||
target.setNotTarget(true);
|
||||
if (!player.choose(outcome, player.getGraveyard(), target, source, game)) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card == null || !player.moveCards(card, Zone.BATTLEFIELD, source, game)) {
|
||||
return false;
|
||||
}
|
||||
Permanent permanent = game.getPermanent(card.getId());
|
||||
if (permanent != null) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(), source.getControllerId(), source, game);
|
||||
if (card != null) {
|
||||
Counters countersToAdd = new Counters();
|
||||
countersToAdd.addCounter(CounterType.P1P1.createInstance());
|
||||
game.setEnterWithCounters(card.getId(), countersToAdd);
|
||||
player.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -94,4 +93,4 @@ class CauldronsGiftEffect extends OneShotEffect {
|
|||
public Condition getCondition() {
|
||||
return AdamantCondition.BLACK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.Counters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
|
|
@ -123,12 +124,9 @@ class LuminousBroodmothEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
player.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
Permanent permanent = game.getPermanent(card.getId());
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
permanent.addCounters(CounterType.FLYING.createInstance(), source.getControllerId(), source, game);
|
||||
return true;
|
||||
Counters countersToAdd = new Counters();
|
||||
countersToAdd.addCounter(CounterType.FLYING.createInstance());
|
||||
game.setEnterWithCounters(card.getId(), countersToAdd);
|
||||
return player.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.Counters;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
|
@ -99,13 +99,12 @@ class TurntimberSymbiosisEffect extends OneShotEffect {
|
|||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
|
||||
boolean small = card.getManaValue() <= 3;
|
||||
player.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
Permanent permanent = game.getPermanent(card.getId());
|
||||
if (small && permanent != null) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(3), source.getControllerId(), source, game);
|
||||
if (card.getManaValue() <= 3) {
|
||||
Counters countersToAdd = new Counters();
|
||||
countersToAdd.addCounter(CounterType.P1P1.createInstance(3));
|
||||
game.setEnterWithCounters(card.getId(), countersToAdd);
|
||||
}
|
||||
player.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
player.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue