mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Fixed that spells with target amount distribution did not fizzle if all their targets were illegal at resolution (e.g. Electrolyze).
This commit is contained in:
parent
ff011f8ab8
commit
b602be2b53
3 changed files with 7 additions and 2 deletions
|
@ -1514,7 +1514,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public void idleTimeout(Game game) {
|
||||
game.informPlayers(new StringBuilder(getName()).append(" has run out of time. Loosing the Match.").toString());
|
||||
game.informPlayers(new StringBuilder(getName()).append(" was idle for too long. Loosing the Match.").toString());
|
||||
quit = true;
|
||||
idleTimeout = true;
|
||||
this.concede(game);
|
||||
|
|
|
@ -327,7 +327,7 @@ public abstract class TargetImpl implements Target {
|
|||
@Override
|
||||
public boolean isLegal(Ability source, Game game) {
|
||||
//20101001 - 608.2b
|
||||
Set <UUID> illegalTargets = new HashSet<UUID>();
|
||||
Set <UUID> illegalTargets = new HashSet<>();
|
||||
int replacedTargets = 0;
|
||||
for (UUID targetId: targets.keySet()) {
|
||||
Card card = game.getCard(targetId);
|
||||
|
|
|
@ -53,7 +53,12 @@ public class TargetCreatureOrPlayerAmount extends TargetAmount {
|
|||
protected FilterCreatureOrPlayer filter;
|
||||
|
||||
public TargetCreatureOrPlayerAmount(int amount) {
|
||||
// 107.1c If a rule or ability instructs a player to choose “any number,” that player may choose
|
||||
// any positive number or zero, unless something (such as damage or counters) is being divided
|
||||
// or distributed among “any number” of players and/or objects. In that case, a nonzero number
|
||||
// of players and/or objects must be chosen if possible.
|
||||
this(new StaticValue(amount));
|
||||
this.minNumberOfTargets = 1;
|
||||
}
|
||||
|
||||
public TargetCreatureOrPlayerAmount(DynamicValue amount) {
|
||||
|
|
Loading…
Reference in a new issue