mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fixed K'rrik, Son of Yawgmoth
K'rrik's second ability is no longer active after he leaves the battlefield. KNOWN ISSUE: Cards you would not normally be able to play without this ability are still not highlighted as playable.
This commit is contained in:
parent
6fd9cab283
commit
84701cfbab
2 changed files with 13 additions and 7 deletions
|
@ -24,6 +24,7 @@ import mage.filter.FilterMana;
|
|||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
|
@ -73,7 +74,7 @@ class KrrikSonOfYawgmothPhyrexianEffect extends ContinuousEffectImpl {
|
|||
|
||||
public KrrikSonOfYawgmothPhyrexianEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.PlayerEffects, SubLayer.NA, Outcome.Benefit);
|
||||
this.staticText = "For each {B} in a cost, you may pay 2 life rather than pay that mana.";
|
||||
this.staticText = "for each {B} in a cost, you may pay 2 life rather than pay that mana";
|
||||
}
|
||||
|
||||
public KrrikSonOfYawgmothPhyrexianEffect(final KrrikSonOfYawgmothPhyrexianEffect effect) {
|
||||
|
@ -87,10 +88,12 @@ class KrrikSonOfYawgmothPhyrexianEffect extends ContinuousEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
FilterMana phyrexianBlack = new FilterMana();
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
FilterMana phyrexianBlack = new FilterMana();
|
||||
|
||||
phyrexianBlack.setBlack(true);
|
||||
if (controller != null) {
|
||||
if (controller != null && sourcePermanent != null) {
|
||||
for (UUID playerId: game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null)
|
||||
|
|
|
@ -175,7 +175,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
protected List<Designation> designations = new ArrayList<>();
|
||||
|
||||
protected FilterMana phyrexianColors = new FilterMana();
|
||||
protected FilterMana phyrexianColors;
|
||||
|
||||
/**
|
||||
* During some steps we can't play anything
|
||||
|
@ -194,6 +194,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
manaPool = new ManaPool(playerId);
|
||||
library = new Library(playerId);
|
||||
sideboard = new CardsImpl();
|
||||
phyrexianColors = new FilterMana();
|
||||
}
|
||||
|
||||
protected PlayerImpl(UUID id) {
|
||||
|
@ -277,10 +278,9 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
this.castSourceIdManaCosts = player.castSourceIdManaCosts;
|
||||
this.castSourceIdCosts = player.castSourceIdCosts;
|
||||
this.payManaMode = player.payManaMode;
|
||||
this.phyrexianColors = player.phyrexianColors.copy();
|
||||
|
||||
this.designations.addAll(player.designations);
|
||||
|
||||
this.phyrexianColors = player.phyrexianColors;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -345,6 +345,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
this.castSourceIdWithAlternateMana = player.getCastSourceIdWithAlternateMana();
|
||||
this.castSourceIdManaCosts = player.getCastSourceIdManaCosts();
|
||||
this.castSourceIdCosts = player.getCastSourceIdCosts();
|
||||
this.phyrexianColors = player.getPhyrexianColors().copy();
|
||||
|
||||
this.designations.clear();
|
||||
this.designations.addAll(player.getDesignations());
|
||||
|
@ -422,6 +423,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
this.castSourceIdManaCosts = null;
|
||||
this.castSourceIdCosts = null;
|
||||
this.getManaPool().init(); // needed to remove mana that not empties on step change from previous game if left
|
||||
this.phyrexianColors = new FilterMana();
|
||||
|
||||
this.designations.clear();
|
||||
}
|
||||
|
@ -448,6 +450,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
this.castSourceIdManaCosts = null;
|
||||
this.castSourceIdCosts = null;
|
||||
this.getManaPool().clearEmptyManaPoolRules();
|
||||
this.phyrexianColors = new FilterMana();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -4207,6 +4210,6 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public FilterMana getPhyrexianColors() {
|
||||
return this.phyrexianColors.copy();
|
||||
return this.phyrexianColors;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue