forked from External/mage
Refactor: improved emblem rules generation;
This commit is contained in:
parent
e1630b3c6f
commit
a4e374f96a
11 changed files with 63 additions and 91 deletions
|
|
@ -2,6 +2,7 @@ package mage.abilities.effects.common;
|
|||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
|
|
@ -17,6 +18,7 @@ public class CopyTargetSpellEffect extends OneShotEffect {
|
|||
|
||||
private final boolean useController;
|
||||
private final boolean useLKI;
|
||||
private String copyThatSpellName = "that spell";
|
||||
|
||||
public CopyTargetSpellEffect() {
|
||||
this(false);
|
||||
|
|
@ -38,6 +40,11 @@ public class CopyTargetSpellEffect extends OneShotEffect {
|
|||
this.useController = effect.useController;
|
||||
}
|
||||
|
||||
public Effect withSpellName(String copyThatSpellName) {
|
||||
this.copyThatSpellName = copyThatSpellName;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Spell spell;
|
||||
|
|
@ -81,7 +88,7 @@ public class CopyTargetSpellEffect extends OneShotEffect {
|
|||
if (!mode.getTargets().isEmpty()) {
|
||||
sb.append("target ").append(mode.getTargets().get(0).getTargetName());
|
||||
} else {
|
||||
sb.append("that spell");
|
||||
sb.append(copyThatSpellName);
|
||||
}
|
||||
sb.append(". You may choose new targets for the copy");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue