[GRN] Added Thief of Sanity.

This commit is contained in:
LevelX2 2018-09-22 16:43:15 +02:00
parent e50a922970
commit 4c17a13bce
7 changed files with 274 additions and 16 deletions

View file

@ -1,4 +1,3 @@
package mage.abilities.effects;
import java.io.Serializable;
@ -496,7 +495,7 @@ public class ContinuousEffects implements Serializable {
if (effect.applies(objectId, ability, controllerId, game)) {
return new MageObjectReference(ability.getSourceObject(game), game);
}
} else if (effect.applies(objectId, affectedAbility, ability, game)) {
} else if (effect.applies(objectId, affectedAbility, ability, game, controllerId)) {
return new MageObjectReference(ability.getSourceObject(game), game);
}
}
@ -512,7 +511,7 @@ public class ContinuousEffects implements Serializable {
Set<Ability> abilities = asThoughEffectsMap.get(AsThoughEffectType.SPEND_ONLY_MANA).getAbility(effect.getId());
for (Ability ability : abilities) {
if ((affectedAbility == null && effect.applies(objectId, ability, controllerId, game))
|| effect.applies(objectId, affectedAbility, ability, game)) {
|| effect.applies(objectId, affectedAbility, ability, game, controllerId)) {
if (((AsThoughManaEffect) effect).getAsThoughManaType(manaType, mana, controllerId, ability, game) == null) {
return null;
}
@ -525,7 +524,7 @@ public class ContinuousEffects implements Serializable {
Set<Ability> abilities = asThoughEffectsMap.get(AsThoughEffectType.SPEND_OTHER_MANA).getAbility(effect.getId());
for (Ability ability : abilities) {
if ((affectedAbility == null && effect.applies(objectId, ability, controllerId, game))
|| effect.applies(objectId, affectedAbility, ability, game)) {
|| effect.applies(objectId, affectedAbility, ability, game, controllerId)) {
ManaType usableManaType = ((AsThoughManaEffect) effect).getAsThoughManaType(manaType, mana, controllerId, ability, game);
if (usableManaType != null) {
return usableManaType;