rework some effects to use CardUtil::getEffectValueFromAbility

This commit is contained in:
theelk801 2025-06-04 08:35:08 -04:00 committed by Failure
parent 3f63abbab3
commit e2c4918092
14 changed files with 74 additions and 132 deletions

View file

@ -21,7 +21,6 @@ import mage.players.Player;
import mage.target.common.TargetControlledPermanent;
import mage.util.CardUtil;
import java.util.Objects;
import java.util.UUID;
/*
@ -188,13 +187,9 @@ class ConspireTriggeredAbility extends CastSourceTriggeredAbility {
return false;
}
Spell spell = game.getStack().getSpell(event.getSourceId());
return spell != null
&& spell
.getSpellAbility()
.getAllEffects()
.stream()
.map(effect -> effect.getValue("ConspireActivation" + conspireId + addedById))
.anyMatch(Objects::nonNull);
return spell != null && CardUtil.getEffectValueFromAbility(
spell.getSpellAbility(), "ConspireActivation" + conspireId + addedById, Boolean.class
).orElse(false);
}
@Override