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:
ingmargoudt 2017-03-04 00:16:36 +01:00
parent 6b20d352ca
commit 5a57731968
69 changed files with 151 additions and 120 deletions

View file

@ -115,7 +115,7 @@ public class ProtectionAbility extends StaticAbility {
// object is still a card and not a spell yet. So return only if the source object can't be a spell
// otherwise the following FilterObject check will be applied
if (source instanceof StackObject
|| (!source.getCardType().contains(CardType.INSTANT) && !source.getCardType().contains(CardType.SORCERY))) {
|| (!source.isInstant() && !source.isSorcery())) {
return true;
}
}