* Liliana, Defiant Necromancer - Fixed target bug of -X ability.

This commit is contained in:
LevelX2 2016-08-02 16:52:25 +02:00
parent acf5df7f94
commit 270ffcb88a
4 changed files with 32 additions and 27 deletions

View file

@ -254,14 +254,15 @@ public abstract class AbilityImpl implements Ability {
if (!getModes().choose(game, this)) {
return false;
}
getSourceObject(game);
if (controller.isTestMode()) {
if (!controller.addTargets(this, game)) {
return false;
}
}
getSourceObject(game);
/* 20130201 - 601.2b
* If the player wishes to splice any cards onto the spell (see rule 702.45), he
* or she reveals those cards in his or her hand.
@ -269,7 +270,7 @@ public abstract class AbilityImpl implements Ability {
if (this.abilityType.equals(AbilityType.SPELL)) {
game.getContinuousEffects().applySpliceEffects(this, game);
}
// if ability can be cast for no mana, clear the mana costs now, because additional mana costs must be paid.
// For Flashback ability can be set X before, so the X costs have to be restored for the flashbacked ability
if (noMana) {

View file

@ -241,12 +241,20 @@ public class PermanentCard extends PermanentImpl {
@Override
public void adjustTargets(Ability ability, Game game) {
card.adjustTargets(ability, game);
if (this.isTransformed()) {
card.getSecondCardFace().adjustTargets(ability, game);
} else {
card.adjustTargets(ability, game);
}
}
@Override
public void adjustCosts(Ability ability, Game game) {
card.adjustCosts(ability, game);
if (this.isTransformed()) {
card.getSecondCardFace().adjustCosts(ability, game);
} else {
card.adjustCosts(ability, game);
}
}
@Override