* Fixed a problem with removing too much counters (caused by AI simulation).

This commit is contained in:
LevelX2 2018-10-14 10:14:36 +02:00
parent 2bd5d0ddf6
commit 9423731e97
4 changed files with 7 additions and 16 deletions

View file

@ -28,7 +28,6 @@ import mage.constants.SubType;
import mage.constants.SuperType; import mage.constants.SuperType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.FilterSpell;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -38,8 +37,6 @@ import mage.game.permanent.Permanent;
*/ */
public final class ArixmethesSlumberingIsle extends CardImpl { public final class ArixmethesSlumberingIsle extends CardImpl {
private static final FilterSpell filter = new FilterSpell("a spell");
public ArixmethesSlumberingIsle(UUID ownerId, CardSetInfo setInfo) { public ArixmethesSlumberingIsle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{U}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{U}");

View file

@ -1,12 +1,8 @@
package mage.cards.p; package mage.cards.p;
import java.util.UUID; import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.AsThoughEffect;
import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.AsThoughEffectImpl;
import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AsThoughEffectType; import mage.constants.AsThoughEffectType;
@ -24,7 +20,6 @@ public final class PredatoryFocus extends CardImpl {
public PredatoryFocus(UUID ownerId, CardSetInfo setInfo) { public PredatoryFocus(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}{G}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}{G}");
// You may have creatures you control assign their combat damage this turn as though they weren't blocked. // You may have creatures you control assign their combat damage this turn as though they weren't blocked.
this.getSpellAbility().addEffect(new PredatoryFocusEffect()); this.getSpellAbility().addEffect(new PredatoryFocusEffect());
@ -58,10 +53,10 @@ class PredatoryFocusEffect extends AsThoughEffectImpl {
super.init(source, game); super.init(source, game);
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
String sourceName = source.getSourceObject(game).getLogName(); String sourceName = source.getSourceObject(game).getLogName();
choseUse = controller.chooseUse(Outcome.Damage, "Have creatures you control deal combat damage this turn" + choseUse = controller.chooseUse(Outcome.Damage, "Have creatures you control deal combat damage this turn"
" as though they weren't blocked?", source, game); + " as though they weren't blocked?", source, game);
game.informPlayers(choseUse ? controller.getName()+" chose to use "+sourceName+"'s effect" : game.informPlayers(choseUse ? controller.getName() + " chose to use " + sourceName + "'s effect"
controller.getName()+" chose not to use "+sourceName+"'s effect."); : controller.getName() + " chose not to use " + sourceName + "'s effect.");
} }
@Override @Override
@ -78,4 +73,4 @@ class PredatoryFocusEffect extends AsThoughEffectImpl {
public PredatoryFocusEffect copy() { public PredatoryFocusEffect copy() {
return new PredatoryFocusEffect(this); return new PredatoryFocusEffect(this);
} }
} }

View file

@ -15,8 +15,8 @@ import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.Effects; import mage.abilities.effects.Effects;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.mana.DynamicManaEffect;
import mage.abilities.effects.common.ManaEffect; import mage.abilities.effects.common.ManaEffect;
import mage.abilities.effects.mana.DynamicManaEffect;
import mage.abilities.mana.ActivatedManaAbilityImpl; import mage.abilities.mana.ActivatedManaAbilityImpl;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.SplitCard; import mage.cards.SplitCard;
@ -116,7 +116,7 @@ public abstract class AbilityImpl implements Ability {
this.costModificationActive = ability.costModificationActive; this.costModificationActive = ability.costModificationActive;
this.worksFaceDown = ability.worksFaceDown; this.worksFaceDown = ability.worksFaceDown;
this.abilityWord = ability.abilityWord; this.abilityWord = ability.abilityWord;
this.sourceObject = ability.sourceObject; this.sourceObject = null; // you may not copy this because otherwise simulation may modify real game object
this.sourceObjectZoneChangeCounter = ability.sourceObjectZoneChangeCounter; this.sourceObjectZoneChangeCounter = ability.sourceObjectZoneChangeCounter;
this.canFizzle = ability.canFizzle; this.canFizzle = ability.canFizzle;
this.targetAdjuster = ability.targetAdjuster; this.targetAdjuster = ability.targetAdjuster;

View file

@ -1,4 +1,3 @@
package mage.abilities.effects.common.counter; package mage.abilities.effects.common.counter;
import mage.abilities.Ability; import mage.abilities.Ability;