mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
* Aftermath - Fixed that aftermath cards were no longer castable from graveyard (fixes #5539).
This commit is contained in:
parent
f2f5e5cb7e
commit
fa859a6bfd
1 changed files with 38 additions and 37 deletions
|
@ -1,5 +1,9 @@
|
||||||
package mage.players;
|
package mage.players;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.Map.Entry;
|
||||||
import mage.ConditionalMana;
|
import mage.ConditionalMana;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.MageObjectReference;
|
import mage.MageObjectReference;
|
||||||
|
@ -65,11 +69,6 @@ import mage.util.GameLog;
|
||||||
import mage.util.RandomUtil;
|
import mage.util.RandomUtil;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
public abstract class PlayerImpl implements Player, Serializable {
|
public abstract class PlayerImpl implements Player, Serializable {
|
||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(PlayerImpl.class);
|
private static final Logger logger = Logger.getLogger(PlayerImpl.class);
|
||||||
|
@ -1412,9 +1411,9 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (zone != Zone.BATTLEFIELD
|
if (zone != Zone.BATTLEFIELD /*&& null != game.getContinuousEffects().asThough(object.getId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, null, this.getId(), game)*/) {
|
||||||
&& null != game.getContinuousEffects().asThough(object.getId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, null, this.getId(), game)) {
|
|
||||||
for (Ability ability : candidateAbilites) {
|
for (Ability ability : candidateAbilites) {
|
||||||
|
if (null != game.getContinuousEffects().asThough(object.getId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, ability, this.getId(), game)) {
|
||||||
if (canUse || ability.getAbilityType() == AbilityType.SPECIAL_ACTION) {
|
if (canUse || ability.getAbilityType() == AbilityType.SPECIAL_ACTION) {
|
||||||
ability.setControllerId(this.getId());
|
ability.setControllerId(this.getId());
|
||||||
if (ability instanceof ActivatedAbility && ability.getZone().match(Zone.HAND)
|
if (ability instanceof ActivatedAbility && ability.getZone().match(Zone.HAND)
|
||||||
|
@ -1426,6 +1425,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LinkedHashMap<UUID, ActivatedAbility> getUseableActivatedAbilities(MageObject object, Zone zone, Game game) {
|
public LinkedHashMap<UUID, ActivatedAbility> getUseableActivatedAbilities(MageObject object, Zone zone, Game game) {
|
||||||
|
@ -2566,7 +2566,8 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
* @param game
|
* @param game
|
||||||
* @param winnable
|
* @param winnable
|
||||||
* @param appliedEffects
|
* @param appliedEffects
|
||||||
* @return if winnable, true if player won the toss, if not winnable, true for heads and false for tails
|
* @return if winnable, true if player won the toss, if not winnable, true
|
||||||
|
* for heads and false for tails
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean flipCoin(Ability source, Game game, boolean winnable, ArrayList<UUID> appliedEffects) {
|
public boolean flipCoin(Ability source, Game game, boolean winnable, ArrayList<UUID> appliedEffects) {
|
||||||
|
@ -3691,7 +3692,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
// identify cards from one owner
|
// identify cards from one owner
|
||||||
Cards cards = new CardsImpl();
|
Cards cards = new CardsImpl();
|
||||||
UUID ownerId = null;
|
UUID ownerId = null;
|
||||||
for (Iterator<Card> it = allCards.iterator(); it.hasNext(); ) {
|
for (Iterator<Card> it = allCards.iterator(); it.hasNext();) {
|
||||||
Card card = it.next();
|
Card card = it.next();
|
||||||
if (cards.isEmpty()) {
|
if (cards.isEmpty()) {
|
||||||
ownerId = card.getOwnerId();
|
ownerId = card.getOwnerId();
|
||||||
|
|
Loading…
Reference in a new issue