forked from External/mage
[CMM] rework Narci, Fable Singer (#10699)
* easy fix first * use targetPointer in Narci effect.
This commit is contained in:
parent
ba9ede4d66
commit
263b01e702
2 changed files with 13 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package mage.cards.n;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.FinalChapterAbilityResolvesTriggeredAbility;
|
||||
import mage.abilities.common.SacrificePermanentTriggeredAbility;
|
||||
|
|
@ -17,6 +18,7 @@ import mage.constants.SubType;
|
|||
import mage.constants.SuperType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -77,7 +79,17 @@ class NarciFableSingerEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int value = (int) getValue("SAGA_MANACOST");
|
||||
FixedTarget fixedTarget = targetPointer.getFixedTarget(game, source);
|
||||
if (fixedTarget == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
MageObject saga = game.getObject(fixedTarget.getTarget());
|
||||
if (saga == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int value = saga.getManaValue();
|
||||
if (value > 0) {
|
||||
new LoseLifeOpponentsEffect(value).apply(game, source);
|
||||
new GainLifeEffect(value).apply(game, source);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ public class FinalChapterAbilityResolvesTriggeredAbility extends TriggeredAbilit
|
|||
|
||||
if (rememberSaga) {
|
||||
getEffects().setTargetPointer(new FixedTarget(permanent.getId(), game));
|
||||
getEffects().setValue("SAGA_MANACOST", permanent.getManaValue());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue