mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Updated wordings and refactored class name for effects which prompt the player to choose a card name
This commit is contained in:
parent
d2e8016a10
commit
2662fa7799
33 changed files with 149 additions and 159 deletions
|
|
@ -16,7 +16,7 @@ import mage.util.CardUtil;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class NameACardEffect extends OneShotEffect {
|
||||
public class ChooseACardNameEffect extends OneShotEffect {
|
||||
|
||||
public static String INFO_KEY = "NAMED_CARD";
|
||||
|
||||
|
|
@ -33,13 +33,13 @@ public class NameACardEffect extends OneShotEffect {
|
|||
|
||||
private final TypeOfName typeOfName;
|
||||
|
||||
public NameACardEffect(TypeOfName typeOfName) {
|
||||
public ChooseACardNameEffect(TypeOfName typeOfName) {
|
||||
super(Outcome.Detriment);
|
||||
this.typeOfName = typeOfName;
|
||||
staticText = setText();
|
||||
}
|
||||
|
||||
public NameACardEffect(final NameACardEffect effect) {
|
||||
public ChooseACardNameEffect(final ChooseACardNameEffect effect) {
|
||||
super(effect);
|
||||
this.typeOfName = effect.typeOfName;
|
||||
}
|
||||
|
|
@ -100,8 +100,8 @@ public class NameACardEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public NameACardEffect copy() {
|
||||
return new NameACardEffect(this);
|
||||
public ChooseACardNameEffect copy() {
|
||||
return new ChooseACardNameEffect(this);
|
||||
}
|
||||
|
||||
private String setText() {
|
||||
|
|
@ -12,7 +12,7 @@ import mage.abilities.*;
|
|||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.VariableCost;
|
||||
import mage.abilities.costs.common.RemoveVariableCountersTargetCost;
|
||||
import mage.abilities.effects.common.NameACardEffect;
|
||||
import mage.abilities.effects.common.ChooseACardNameEffect;
|
||||
import mage.abilities.mana.ActivatedManaAbilityImpl;
|
||||
import mage.cards.repository.PluginClassloaderRegistery;
|
||||
import mage.constants.*;
|
||||
|
|
@ -401,7 +401,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
|||
case CHOSEN_NAME: //Declaration of Naught only
|
||||
ability.getTargets().clear();
|
||||
FilterSpell filterSpell = new FilterSpell("spell with the chosen name");
|
||||
filterSpell.add(new NamePredicate((String) game.getState().getValue(ability.getSourceId().toString() + NameACardEffect.INFO_KEY)));
|
||||
filterSpell.add(new NamePredicate((String) game.getState().getValue(ability.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY)));
|
||||
TargetSpell target = new TargetSpell(1, filterSpell);
|
||||
ability.addTarget(target);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue