mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 15:32:08 -08:00
Additional fixed for #6147
This commit is contained in:
parent
b6d76a7c02
commit
854eaadcc4
2 changed files with 13 additions and 6 deletions
|
|
@ -34,22 +34,30 @@ public class GainAbilityDependenciesTest extends CardTestPlayerBase {
|
|||
SubType.HUMAN.getPredicate(),
|
||||
SubType.ORC.getPredicate())
|
||||
));
|
||||
FilterPermanent filterNotTree = new FilterPermanent("tree");
|
||||
filterNotTree.add(Predicates.not(
|
||||
Predicates.or(
|
||||
SubType.HUMAN.getPredicate(),
|
||||
SubType.ORC.getPredicate())
|
||||
));
|
||||
|
||||
ContinuousEffectImpl effectEmpty = new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.EndOfTurn, filterEmpty);
|
||||
ContinuousEffectImpl effectSubtype = new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.EndOfTurn, filterSubtype);
|
||||
ContinuousEffectImpl effectOr = new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.EndOfTurn, filterOr);
|
||||
ContinuousEffectImpl effectTree = new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.EndOfTurn, filterTree);
|
||||
ContinuousEffectImpl effectNotTree = new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.EndOfTurn, filterNotTree);
|
||||
|
||||
Assert.assertFalse("must haven't depends with empty filter", effectEmpty.getDependedToTypes().contains(DependencyType.AddingCreatureType));
|
||||
Assert.assertTrue("must have depend from subtype predicate", effectSubtype.getDependedToTypes().contains(DependencyType.AddingCreatureType));
|
||||
Assert.assertTrue("must have depend from or predicate", effectOr.getDependedToTypes().contains(DependencyType.AddingCreatureType));
|
||||
Assert.assertTrue("must have depend from tree predicate", effectTree.getDependedToTypes().contains(DependencyType.AddingCreatureType));
|
||||
Assert.assertTrue("must have depend from not-tree predicate", effectNotTree.getDependedToTypes().contains(DependencyType.AddingCreatureType));
|
||||
}
|
||||
|
||||
/**
|
||||
* I had an elephant token equipped with Amorphous Axe attacking and a Tempered Sliver in play. The token did combat
|
||||
* damage to a player but it didnt get the +1/+1 counter it hsould be getting.
|
||||
*
|
||||
* <p>
|
||||
* More details: https://github.com/magefree/mage/issues/6147
|
||||
*/
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue