mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
- Added The Wretched.
This commit is contained in:
parent
977645f88f
commit
57ba2861bc
5 changed files with 227 additions and 0 deletions
|
|
@ -50,6 +50,7 @@ import mage.util.trace.TraceUtil;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
|
@ -881,6 +882,7 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
if (creature != null) {
|
||||
creature.setAttacking(false);
|
||||
creature.setBlocking(0);
|
||||
creature.setRemovedFromCombat(true);
|
||||
for (CombatGroup group : groups) {
|
||||
result |= group.remove(creatureId);
|
||||
}
|
||||
|
|
@ -906,6 +908,10 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
}
|
||||
}
|
||||
}
|
||||
// reset the removeFromCombat flag on all creatures on the battlefield
|
||||
for (Permanent creaturePermanent : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), game)) {
|
||||
creaturePermanent.setRemovedFromCombat(false);
|
||||
}
|
||||
clear();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -154,6 +154,8 @@ public interface Permanent extends Card, Controllable {
|
|||
int getMinBlockedBy();
|
||||
void setMinBlockedBy(int minBlockedBy);
|
||||
int getMaxBlockedBy();
|
||||
boolean isRemovedFromCombat();
|
||||
void setRemovedFromCombat(boolean removedFromCombat);
|
||||
|
||||
/**
|
||||
* Sets the maximum number of blockers the creature can be blocked by.
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
protected int minBlockedBy = 1;
|
||||
// maximal number of creatures the creature can be blocked by 0 = no restriction
|
||||
protected int maxBlockedBy = 0;
|
||||
protected boolean removedFromCombat;
|
||||
protected boolean deathtouched;
|
||||
protected List<UUID> attachments = new ArrayList<>();
|
||||
protected Map<String, List<UUID>> connectedCards = new HashMap<>();
|
||||
|
|
@ -506,6 +507,11 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
public int getMaxBlockedBy() {
|
||||
return maxBlockedBy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRemovedFromCombat() {
|
||||
return removedFromCombat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID getControllerId() {
|
||||
|
|
@ -1105,6 +1111,11 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRemovedFromCombat(boolean removedFromCombat) {
|
||||
this.removedFromCombat = removedFromCombat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean imprint(UUID imprintedCard, Game game) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue