forked from External/mage
Add modeTag + hint of used modes for "choose one that hasn't been chosen" abilities. (#10860)
* Add modeTag + hint of used modes on Three Bowls of Porridge * add ModesAlreadyUsedHint to all the cards.
This commit is contained in:
parent
dcca63b963
commit
be4b568e88
14 changed files with 168 additions and 15 deletions
|
|
@ -17,6 +17,12 @@ public class Mode implements Serializable {
|
|||
protected final Targets targets;
|
||||
protected final Effects effects;
|
||||
protected String flavorWord;
|
||||
/**
|
||||
* Optional Tag to distinguish this mode from others.
|
||||
* In the case of modes that players can only choose once,
|
||||
* the tag is directly what is displayed in ModesAlreadyUsedHint
|
||||
*/
|
||||
protected String modeTag;
|
||||
|
||||
public Mode(Effect effect) {
|
||||
this.id = UUID.randomUUID();
|
||||
|
|
@ -32,6 +38,7 @@ public class Mode implements Serializable {
|
|||
this.targets = mode.targets.copy();
|
||||
this.effects = mode.effects.copy();
|
||||
this.flavorWord = mode.flavorWord;
|
||||
this.modeTag = mode.modeTag;
|
||||
}
|
||||
|
||||
public UUID setRandomId() {
|
||||
|
|
@ -71,6 +78,21 @@ public class Mode implements Serializable {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tag the mode to be retrieved elsewhere thanks to the tag.
|
||||
*/
|
||||
public Mode setModeTag(String tag) {
|
||||
this.modeTag = tag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the mode tag for this mode, if set
|
||||
*/
|
||||
public String getModeTag() {
|
||||
return this.modeTag == null ? "" : this.modeTag;
|
||||
}
|
||||
|
||||
public String getFlavorWord() {
|
||||
return flavorWord;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue