mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Prettify Any TgtPrompt
This commit is contained in:
@@ -332,15 +332,21 @@ public final class AbilityFactory {
|
||||
|
||||
// TgtPrompt should only be needed for more complicated ValidTgts
|
||||
String tgtWhat = mapParams.get("ValidTgts");
|
||||
final String[] commonStuff = new String[] {
|
||||
//list of common one word non-core type ValidTgts that should be lowercase in the target prompt
|
||||
"Player", "Opponent", "Card", "Spell", "Permanent"
|
||||
};
|
||||
if (Arrays.asList(commonStuff).contains(tgtWhat) || CardType.CoreType.isValidEnum(tgtWhat)) {
|
||||
tgtWhat = tgtWhat.toLowerCase();
|
||||
final String prompt;
|
||||
if (mapParams.containsKey("TgtPrompt")) {
|
||||
prompt = mapParams.get("TgtPrompt");
|
||||
} else if (tgtWhat.equals("Any")) {
|
||||
prompt = "Select any target";
|
||||
} else {
|
||||
final String[] commonStuff = new String[] {
|
||||
//list of common one word non-core type ValidTgts that should be lowercase in the target prompt
|
||||
"Player", "Opponent", "Card", "Spell", "Permanent"
|
||||
};
|
||||
if (Arrays.asList(commonStuff).contains(tgtWhat) || CardType.CoreType.isValidEnum(tgtWhat)) {
|
||||
tgtWhat = tgtWhat.toLowerCase();
|
||||
}
|
||||
prompt = "Select target " + tgtWhat;
|
||||
}
|
||||
final String prompt = mapParams.containsKey("TgtPrompt") ? mapParams.get("TgtPrompt") :
|
||||
"Select target " + tgtWhat;
|
||||
|
||||
TargetRestrictions abTgt = new TargetRestrictions(prompt, mapParams.get("ValidTgts").split(","), min, max);
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ public final class CardUtil {
|
||||
newCopy.getCurrentState().copyFrom(in.getState(in.getFaceupCardStateName()), true);
|
||||
if (in.isFaceDown()) {
|
||||
newCopy.turnFaceDownNoUpdate();
|
||||
newCopy.setType(new CardType(in.getType()));
|
||||
newCopy.setType(new CardType(in.getCurrentState().getType()));
|
||||
// prevent StackDescription from revealing face
|
||||
newCopy.updateStateForView();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user