mirror of
https://github.com/correl/mage.git
synced 2025-03-17 01:06:26 -09:00
* Fixed a problem of Gideon Jura +2 ability introduced with 1be4379(fixes) #4994.
This commit is contained in:
parent
961860107e
commit
46da34da78
2 changed files with 23 additions and 24 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -15,8 +14,8 @@ import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.TurnPhase;
|
import mage.constants.TurnPhase;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
@ -24,7 +23,6 @@ import mage.filter.predicate.permanent.TappedPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.token.TokenImpl;
|
import mage.game.permanent.token.TokenImpl;
|
||||||
import mage.game.permanent.token.Token;
|
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
|
|
||||||
|
@ -86,10 +84,12 @@ class GideonJuraToken extends TokenImpl {
|
||||||
power = new MageInt(6);
|
power = new MageInt(6);
|
||||||
toughness = new MageInt(6);
|
toughness = new MageInt(6);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GideonJuraToken(final GideonJuraToken token) {
|
public GideonJuraToken(final GideonJuraToken token) {
|
||||||
super(token);
|
super(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public GideonJuraToken copy() {
|
public GideonJuraToken copy() {
|
||||||
return new GideonJuraToken(this);
|
return new GideonJuraToken(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.game.combat;
|
package mage.game.combat;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
@ -397,10 +396,10 @@ public class Combat implements Serializable, Copyable<Combat> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (defenders.size() == 1) {
|
if (defendersForcedToAttack.size() == 1) {
|
||||||
player.declareAttacker(creature.getId(), defendersForcedToAttack.iterator().next(), game, false);
|
player.declareAttacker(creature.getId(), defendersForcedToAttack.iterator().next(), game, false);
|
||||||
} else {
|
} else {
|
||||||
TargetDefender target = new TargetDefender(defendersCostlessAttackable, creature.getId());
|
TargetDefender target = new TargetDefender(defendersForcedToAttack, creature.getId());
|
||||||
target.setRequired(true);
|
target.setRequired(true);
|
||||||
if (player.chooseTarget(Outcome.Damage, target, null, game)) {
|
if (player.chooseTarget(Outcome.Damage, target, null, game)) {
|
||||||
player.declareAttacker(creature.getId(), target.getFirstTarget(), game, false);
|
player.declareAttacker(creature.getId(), target.getFirstTarget(), game, false);
|
||||||
|
@ -954,7 +953,6 @@ public class Combat implements Serializable, Copyable<Combat> {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// // check if creature has to pay a cost to block so it's not mandatory to block
|
// // check if creature has to pay a cost to block so it's not mandatory to block
|
||||||
// boolean removedAttacker = false;
|
// boolean removedAttacker = false;
|
||||||
// for (Iterator<UUID> iterator = entry.getValue().iterator(); iterator.hasNext();) {
|
// for (Iterator<UUID> iterator = entry.getValue().iterator(); iterator.hasNext();) {
|
||||||
|
@ -970,7 +968,6 @@ public class Combat implements Serializable, Copyable<Combat> {
|
||||||
// continue;
|
// continue;
|
||||||
// }
|
// }
|
||||||
// creature does not block -> not allowed
|
// 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
|
// 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.
|
// 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
|
// 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 blockerId
|
||||||
* @param attackerId
|
* @param attackerId
|
||||||
|
@ -1292,14 +1290,15 @@ public class Combat implements Serializable, Copyable<Combat> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the previous addBlockingGroup instead (solveBanding should always be true
|
* Use the previous addBlockingGroup instead (solveBanding should always be
|
||||||
* outside this method)
|
* true outside this method)
|
||||||
*
|
*
|
||||||
* @param blockerId
|
* @param blockerId
|
||||||
* @param attackerId
|
* @param attackerId
|
||||||
* @param playerId
|
* @param playerId
|
||||||
* @param game
|
* @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) {
|
public void addBlockingGroup(UUID blockerId, UUID attackerId, UUID playerId, Game game, boolean solveBanding) {
|
||||||
Permanent blocker = game.getPermanent(blockerId);
|
Permanent blocker = game.getPermanent(blockerId);
|
||||||
|
@ -1562,8 +1561,8 @@ public class Combat implements Serializable, Copyable<Combat> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manual player action for undoing one declared blocker
|
* Manual player action for undoing one declared blocker (used for
|
||||||
* (used for multi-blocker creatures)
|
* multi-blocker creatures)
|
||||||
*
|
*
|
||||||
* @param blockerId
|
* @param blockerId
|
||||||
* @param groupToUnblock
|
* @param groupToUnblock
|
||||||
|
@ -1628,8 +1627,8 @@ public class Combat implements Serializable, Copyable<Combat> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manual player action for undoing all declared blockers
|
* Manual player action for undoing all declared blockers (used for
|
||||||
* (used for single-blocker creatures and multi-blockers exceeding blocking limit)
|
* single-blocker creatures and multi-blockers exceeding blocking limit)
|
||||||
*
|
*
|
||||||
* @param blockerId
|
* @param blockerId
|
||||||
* @param game
|
* @param game
|
||||||
|
|
Loading…
Add table
Reference in a new issue