huge rework on subtypes (#3668)

* huge rework on subtypes

* update for coat of arms

* fix test
This commit is contained in:
ingmargoudt 2017-07-16 23:57:39 +02:00 committed by Jeff Wadsworth
parent 81fb4b5d92
commit 09f0c9ad97
185 changed files with 1068 additions and 906 deletions

View file

@ -5,8 +5,6 @@
*/
package mage.abilities.effects.common;
import java.util.ArrayList;
import java.util.List;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.ReplacementEffectImpl;
@ -26,6 +24,9 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCardInHand;
import java.util.ArrayList;
import java.util.List;
/**
* Effect for the AmplifyAbility
*
@ -101,8 +102,8 @@ public class AmplifyEffect extends ReplacementEffectImpl {
if (controller != null && sourceCreature != null) {
FilterCreatureCard filter = new FilterCreatureCard("creatures cards to reveal");
List<SubtypePredicate> filterSubtypes = new ArrayList<>();
for (String subtype : sourceCreature.getSubtype(game)) {
filterSubtypes.add(new SubtypePredicate(SubType.byDescription(subtype)));
for (SubType subtype : sourceCreature.getSubtype(game)) {
filterSubtypes.add(new SubtypePredicate(subtype));
}
if (filterSubtypes.size() > 1) {
filter.add(Predicates.or(filterSubtypes));