* Fixed a problem of Gideon Jura +2 ability introduced with 1be4379(fixes) #4994.

This commit is contained in:
LevelX2 2018-06-03 18:38:53 +02:00
parent 961860107e
commit 46da34da78
2 changed files with 23 additions and 24 deletions

View file

@ -1,4 +1,3 @@
package mage.cards.g;
import java.util.UUID;
@ -15,8 +14,8 @@ import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.TurnPhase;
import mage.filter.common.FilterCreaturePermanent;
@ -24,7 +23,6 @@ import mage.filter.predicate.permanent.TappedPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.TokenImpl;
import mage.game.permanent.token.Token;
import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetOpponent;
@ -86,10 +84,12 @@ class GideonJuraToken extends TokenImpl {
power = new MageInt(6);
toughness = new MageInt(6);
}
public GideonJuraToken(final GideonJuraToken token) {
super(token);
}
@Override
public GideonJuraToken copy() {
return new GideonJuraToken(this);
}

View file

@ -1,4 +1,3 @@
package mage.game.combat;
import java.io.Serializable;
@ -397,10 +396,10 @@ public class Combat implements Serializable, Copyable<Combat> {
}
}
} else {
if (defenders.size() == 1) {
if (defendersForcedToAttack.size() == 1) {
player.declareAttacker(creature.getId(), defendersForcedToAttack.iterator().next(), game, false);
} else {
TargetDefender target = new TargetDefender(defendersCostlessAttackable, creature.getId());
TargetDefender target = new TargetDefender(defendersForcedToAttack, creature.getId());
target.setRequired(true);
if (player.chooseTarget(Outcome.Damage, target, null, game)) {
player.declareAttacker(creature.getId(), target.getFirstTarget(), game, false);
@ -954,7 +953,6 @@ public class Combat implements Serializable, Copyable<Combat> {
continue;
}
// // check if creature has to pay a cost to block so it's not mandatory to block
// boolean removedAttacker = false;
// for (Iterator<UUID> iterator = entry.getValue().iterator(); iterator.hasNext();) {
@ -970,7 +968,6 @@ public class Combat implements Serializable, Copyable<Combat> {
// continue;
// }
// creature does not block -> not allowed
// Check if blocker is really able to block one or more attackers (maybe not if the attacker has menace) - if not continue with the next forced blocker
// TODO: Probably there is some potential to abuse the check if forced blockers are assigned to differnt attackers with e.g. menace.
// While if assigned all to one the block is possible
@ -1280,7 +1277,8 @@ public class Combat implements Serializable, Copyable<Combat> {
}
/**
* Add blocking group for creatures that already block more than one creature
* Add blocking group for creatures that already block more than one
* creature
*
* @param blockerId
* @param attackerId
@ -1292,14 +1290,15 @@ public class Combat implements Serializable, Copyable<Combat> {
}
/**
* Use the previous addBlockingGroup instead (solveBanding should always be true
* outside this method)
* Use the previous addBlockingGroup instead (solveBanding should always be
* true outside this method)
*
* @param blockerId
* @param attackerId
* @param playerId
* @param game
* @param solveBanding check whether also add creatures banded with attackerId
* @param solveBanding check whether also add creatures banded with
* attackerId
*/
public void addBlockingGroup(UUID blockerId, UUID attackerId, UUID playerId, Game game, boolean solveBanding) {
Permanent blocker = game.getPermanent(blockerId);
@ -1562,8 +1561,8 @@ public class Combat implements Serializable, Copyable<Combat> {
}
/**
* Manual player action for undoing one declared blocker
* (used for multi-blocker creatures)
* Manual player action for undoing one declared blocker (used for
* multi-blocker creatures)
*
* @param blockerId
* @param groupToUnblock
@ -1628,8 +1627,8 @@ public class Combat implements Serializable, Copyable<Combat> {
}
/**
* Manual player action for undoing all declared blockers
* (used for single-blocker creatures and multi-blockers exceeding blocking limit)
* Manual player action for undoing all declared blockers (used for
* single-blocker creatures and multi-blockers exceeding blocking limit)
*
* @param blockerId
* @param game