* Daxos's Torment - fixed that it can't get Vampire type from Mephidross Vampire;

This commit is contained in:
Oleg Agafonov 2018-05-14 02:42:57 +04:00
parent 4851ba9e84
commit ec4bee43d2
5 changed files with 249 additions and 5 deletions

View file

@ -926,6 +926,14 @@ public class ContinuousEffects implements Serializable {
while (!done) { // loop needed if a added effect adds again an effect (e.g. Level 5- of Joraga Treespeaker)
done = true;
layer = filterLayeredEffects(activeLayerEffects, Layer.AbilityAddingRemovingEffects_6);
// debug
/*
System.out.println(game.getTurn() + ", " + game.getPhase() + ": " + "need apply " + layer.stream()
.map((eff) -> {return eff.getClass().getName().replaceAll(".+\\.(.+)", "$1");})
.collect(Collectors.joining(", ")));
*/
for (ContinuousEffect effect : layer) {
if (activeLayerEffects.contains(effect) && !appliedEffects.contains(effect.getId())) { // Effect does still exist and was not applied yet
Set<UUID> dependentTo = effect.isDependentTo(layer);

View file

@ -31,6 +31,7 @@ import mage.MageObjectReference;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.keyword.FlyingAbility;
import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -64,6 +65,8 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements
this.power = power;
this.toughness = toughness;
setText();
this.addDependencyType(DependencyType.BecomeCreature);
}
public BecomesCreatureSourceEffect(final BecomesCreatureSourceEffect effect) {
@ -110,6 +113,7 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements
for (CardType cardType : token.getCardType()) {
permanent.addCardType(cardType);
}
if (theyAreStillType != null && theyAreStillType.isEmpty() || theyAreStillType == null && permanent.isLand()) {
permanent.getSubtype(game).retainAll(SubType.getLandTypes(false));
}

View file

@ -39,7 +39,6 @@ package mage.constants;
* @author LevelX2
*/
public enum DependencyType {
AuraAddingRemoving,
ArtifactAddingRemoving,
AddingAbility,
@ -48,6 +47,7 @@ public enum DependencyType {
BecomeMountain,
BecomePlains,
BecomeSwamp,
BecomeCreature,
EnchantmentAddingRemoving,
LooseDefenderEffect
}
}