Class PluralDescription
java.lang.Object
net.demilich.metastone.game.logic.CustomCloneable
net.demilich.metastone.game.cards.dynamicdescription.DynamicDescription
net.demilich.metastone.game.cards.dynamicdescription.ValueDescription
net.demilich.metastone.game.cards.dynamicdescription.PluralDescription
- All Implemented Interfaces:
Serializable
,Cloneable
,HasDesc<DynamicDescriptionDesc>
- Direct Known Subclasses:
GatekeeperShaValueDescription
Appends the
DynamicDescriptionArg.VALUE
with DynamicDescriptionArg.DESCRIPTION1
if the value is
singular, otherwise appends DynamicDescriptionArg.DESCRIPTION2
.
For example, this code will read the RESERVED_INTEGER_1
attribute on the card and render it with the
appropriate pluralized count.
"description": "Summon [0 copies] of a friendly minion.", "dynamicDescription": [ // Observe this is an array, each element corresponds to each square-bracketed number in your description {"class": "PluralDescription" // Observe the space, since it is concatenating to the right of your number. // description1 corresponds to singular, description2 to plural "description1": " copy", "description2": " copies", "value": { "class": "AttributeValueProvider", "attribute": "RESERVED_INTEGER_1", "target": "SELF" } ]
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolveFinalString
(GameContext context, Player player, Entity entity) Methods inherited from class net.demilich.metastone.game.cards.dynamicdescription.ValueDescription
getValue
Methods inherited from class net.demilich.metastone.game.cards.dynamicdescription.DynamicDescription
getDesc, setDesc
Methods inherited from class net.demilich.metastone.game.logic.CustomCloneable
clone
-
Constructor Details
-
PluralDescription
-
-
Method Details
-
resolveFinalString
- Overrides:
resolveFinalString
in classValueDescription
-