forked from External/mage
added new helper methods to test for CardType, to get rid of the contains(CardType.XXX) everywhere, put the logic of that in one place and use the interface call
This commit is contained in:
parent
6b20d352ca
commit
5a57731968
69 changed files with 151 additions and 120 deletions
|
|
@ -172,13 +172,13 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
public void checkForRemoveFromCombat(Game game) {
|
||||
for (UUID creatureId : getAttackers()) {
|
||||
Permanent creature = game.getPermanent(creatureId);
|
||||
if (creature != null && !creature.getCardType().contains(CardType.CREATURE)) {
|
||||
if (creature != null && !creature.isCreature()) {
|
||||
removeFromCombat(creatureId, game, true);
|
||||
}
|
||||
}
|
||||
for (UUID creatureId : getBlockers()) {
|
||||
Permanent creature = game.getPermanent(creatureId);
|
||||
if (creature != null && !creature.getCardType().contains(CardType.CREATURE)) {
|
||||
if (creature != null && !creature.isCreature()) {
|
||||
removeFromCombat(creatureId, game, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue