mirror of
https://github.com/correl/mage.git
synced 2025-04-09 01:01:06 -09:00
Merge branch 'master' of https://github.com/magefree/mage
This commit is contained in:
commit
2ec5a47f05
5 changed files with 25 additions and 27 deletions
Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck
Mage.Sets/src/mage/cards/t
Mage/src/main/java/mage/game/combat
|
@ -76,7 +76,7 @@ public class Commander extends Constructed {
|
|||
|
||||
@Override
|
||||
public int getDeckMinSize() {
|
||||
return 99;
|
||||
return 98;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -89,8 +89,8 @@ public class Commander extends Constructed {
|
|||
boolean valid = true;
|
||||
FilterMana colorIdentity = new FilterMana();
|
||||
|
||||
if (deck.getCards().size() + deck.getSideboard().size() != getDeckMinSize() + getSideboardMinSize()) {
|
||||
invalid.put("Deck", "Must contain " + getDeckMinSize() + getSideboardMinSize() + " cards: has " + (deck.getCards().size() + deck.getSideboard().size()) + " cards");
|
||||
if (deck.getCards().size() + deck.getSideboard().size() != 100) {
|
||||
invalid.put("Deck", "Must contain " + 100 + " cards: has " + (deck.getCards().size() + deck.getSideboard().size()) + " cards");
|
||||
valid = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public class FreeformCommander extends Constructed {
|
|||
|
||||
@Override
|
||||
public int getDeckMinSize() {
|
||||
return 99;
|
||||
return 98;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -49,8 +49,8 @@ public class FreeformCommander extends Constructed {
|
|||
boolean valid = true;
|
||||
FilterMana colorIdentity = new FilterMana();
|
||||
|
||||
if (deck.getCards().size() + deck.getSideboard().size() != getDeckMinSize() + getSideboardMinSize()) {
|
||||
invalid.put("Deck", "Must contain " + getDeckMinSize() + getSideboardMinSize() + " cards: has " + (deck.getCards().size() + deck.getSideboard().size()) + " cards");
|
||||
if (deck.getCards().size() + deck.getSideboard().size() != 100) {
|
||||
invalid.put("Deck", "Must contain " + 100 + " cards: has " + (deck.getCards().size() + deck.getSideboard().size()) + " cards");
|
||||
valid = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public class PennyDreadfulCommander extends Constructed {
|
|||
|
||||
@Override
|
||||
public int getDeckMinSize() {
|
||||
return 99;
|
||||
return 98;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -51,8 +51,8 @@ public class PennyDreadfulCommander extends Constructed {
|
|||
boolean valid = true;
|
||||
FilterMana colorIdentity = new FilterMana();
|
||||
|
||||
if (deck.getCards().size() + deck.getSideboard().size() != getDeckMinSize() + getSideboardMinSize()) {
|
||||
invalid.put("Deck", "Must contain " + getDeckMinSize() + +getSideboardMinSize() + " cards: has " + (deck.getCards().size() + deck.getSideboard().size()) + " cards");
|
||||
if (deck.getCards().size() + deck.getSideboard().size() != 100) {
|
||||
invalid.put("Deck", "Must contain " + 100 + " cards: has " + (deck.getCards().size() + deck.getSideboard().size()) + " cards");
|
||||
valid = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -13,12 +11,7 @@ import mage.abilities.effects.ReplacementEffectImpl;
|
|||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
|
@ -29,8 +22,9 @@ import mage.game.permanent.token.BrainiacToken;
|
|||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public final class TheBigIdea extends CardImpl {
|
||||
|
@ -72,7 +66,7 @@ public final class TheBigIdea extends CardImpl {
|
|||
class TheBigIdeaReplacementEffect extends ReplacementEffectImpl {
|
||||
|
||||
TheBigIdeaReplacementEffect() {
|
||||
super(Duration.EndOfTurn, Outcome.Damage);
|
||||
super(Duration.OneUse, Outcome.Damage);
|
||||
staticText = "The next time you would roll a six-sided die, instead roll two six-sided dice and use the total of those results";
|
||||
}
|
||||
|
||||
|
|
|
@ -523,6 +523,7 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
if (!effect.canAttackCheckAfter(numberAttackers, ability, game, true)) {
|
||||
MageObject sourceObject = ability.getSourceObject(game);
|
||||
if (attackingPlayer.isHuman()) {
|
||||
attackingPlayer.resetPlayerPassedActions();
|
||||
game.informPlayer(attackingPlayer, attackingCreature.getIdName() + " can't attack this way (" + (sourceObject == null ? "null" : sourceObject.getIdName()) + ')');
|
||||
return false;
|
||||
} else {
|
||||
|
@ -856,9 +857,8 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
// if creature can block more attackers, inform human player or set blocks for AI player
|
||||
if (mayBlock) {
|
||||
if (controller.isHuman()) {
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayer(controller, "Creature should block all attackers it's able to this turn: " + creature.getIdName());
|
||||
}
|
||||
controller.resetPlayerPassedActions();
|
||||
game.informPlayer(controller, "Creature should block all attackers it's able to this turn: " + creature.getIdName());
|
||||
} else {
|
||||
Player defender = game.getPlayer(creature.getControllerId());
|
||||
if (defender != null) {
|
||||
|
@ -947,9 +947,8 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
// if creature can block, inform human player or set block for AI player
|
||||
if (mayBlock) {
|
||||
if (controller.isHuman()) {
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayer(controller, "Creature should block this turn: " + creature.getIdName());
|
||||
}
|
||||
controller.resetPlayerPassedActions();
|
||||
game.informPlayer(controller, "Creature should block this turn: " + creature.getIdName());
|
||||
} else {
|
||||
Player defender = game.getPlayer(creature.getControllerId());
|
||||
if (defender != null) {
|
||||
|
@ -1001,6 +1000,7 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
possibleBlockerId, toBeBlockedCreatureId, mustBeBlockedByAtLeastX, game);
|
||||
if (blockRequiredMessage != null) { // message means not required
|
||||
removeBlocker(possibleBlockerId, game);
|
||||
controller.resetPlayerPassedActions();
|
||||
game.informPlayer(controller, blockRequiredMessage + " Existing block removed. It's a requirement to block " + toBeBlockedCreature.getIdName() + '.');
|
||||
return false;
|
||||
}
|
||||
|
@ -1095,7 +1095,8 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
}
|
||||
}
|
||||
if (sb.length() > 0) {
|
||||
if (!game.isSimulation()) {
|
||||
if (controller.isHuman()) {
|
||||
controller.resetPlayerPassedActions();
|
||||
sb.insert(0, "Some creatures are forced to block certain attacker(s):\n");
|
||||
sb.append("\nPlease block with each of these creatures an appropriate attacker.");
|
||||
game.informPlayer(controller, sb.toString());
|
||||
|
@ -1180,6 +1181,7 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
for (Ability ability : entry.getValue()) {
|
||||
if (!effect.canBlockCheckAfter(ability, game, true)) {
|
||||
if (controller.isHuman()) {
|
||||
controller.resetPlayerPassedActions();
|
||||
game.informPlayer(controller, blockingCreature.getLogName() + " can't block this way.");
|
||||
return false;
|
||||
} else {
|
||||
|
@ -1200,6 +1202,7 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
for (Ability ability : entry.getValue()) {
|
||||
if (!effect.canBeBlockedCheckAfter(attackingCreature, ability, game, true)) {
|
||||
if (controller.isHuman()) {
|
||||
controller.resetPlayerPassedActions();
|
||||
game.informPlayer(controller, attackingCreature.getLogName() + " can't be blocked this way.");
|
||||
return false;
|
||||
} else {
|
||||
|
@ -1340,7 +1343,8 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
}
|
||||
if (defenderAttackedBy.size() >= defendingPlayer.getMaxAttackedBy()) {
|
||||
Player attackingPlayer = game.getPlayer(game.getControllerId(attackerId));
|
||||
if (attackingPlayer != null && !game.isSimulation()) {
|
||||
if (attackingPlayer != null && attackingPlayer.isHuman()) {
|
||||
attackingPlayer.resetPlayerPassedActions();
|
||||
game.informPlayer(attackingPlayer, "No more than "
|
||||
+ CardUtil.numberToText(defendingPlayer.getMaxAttackedBy())
|
||||
+ " creatures can attack "
|
||||
|
|
Loading…
Add table
Reference in a new issue