Affectable
, Behavable
, CMObject
, Contingent
, DBIdentifiable
, Environmental
, Expireable
, Modifiable
, MsgListener
, Physical
, PhysicalAgent
, Readable
, Rider
, StatsAffecting
, Tickable
, Item
, MiscMagic
, PlayingCard
, Wearable
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
GenPlayingCard
public class StdPlayingCard extends StdItem implements MiscMagic, PlayingCard
Wearable.CODES
Modifier and Type | Field | Description |
---|---|---|
protected int |
oldAbility |
idConverter
cards, suits
_name, affectPhyStats, affects, baseGoldValue, basePhyStats, behaviors, cachedImageName, CODES, databaseID, description, destroyed, displayText, dispossessionTime, material, me, miscText, myContainer, myUses, myWornCode, owner, phyStats, properWornBitmap, rawImageName, riding, scripts, secretIdentity, tickCtr, tickStatus, wornLogicalAnd, xtraValues
DEFAULT_WORN_CODES, DEFAULT_WORN_DEPENDENCYGRID, DEFAULT_WORN_DESCS, DEFAULT_WORN_ORDER, DEFAULT_WORN_USUAL_NAMES, DEFAULT_WORN_WEIGHT_POINTS, DEFAULT_WORN_WEIGHTS, FILTER_ANY, FILTER_MOBINVONLY, FILTER_ROOMONLY, FILTER_UNWORNONLY, FILTER_WORNONLY, HIGHEST_WORN_CODE, IN_INVENTORY, WORN_ABOUT_BODY, WORN_ARMS, WORN_BACK, WORN_EARS, WORN_EYES, WORN_FEET, WORN_FLOATING_NEARBY, WORN_HANDS, WORN_HEAD, WORN_HELD, WORN_LEFT_FINGER, WORN_LEFT_WRIST, WORN_LEGS, WORN_MOUTH, WORN_NECK, WORN_RIGHT_FINGER, WORN_RIGHT_WRIST, WORN_TORSO, WORN_WAIST, WORN_WIELD
Constructor | Description |
---|---|
StdPlayingCard() |
Modifier and Type | Method | Description |
---|---|---|
protected boolean |
abilityImbuesMagic() |
|
java.lang.String |
genericName() |
Returns a generic name for this object, devoid of its particular
identifying details.
|
int |
getBitEncodedSuit() |
Returns the bitmap value that represents the suit of this card.
|
int |
getBitEncodedValue() |
Returns the full bit-encoded value of this card, with suit | value.
|
java.lang.String |
getCardValueLongDescription(int value) |
Returns the english-word representation of the value
passed to this method.
|
java.lang.String |
getCardValueShortDescription(int value) |
Returns partial english-word representation of the value
passed to this method.
|
java.lang.String |
getStringEncodedSuit() |
Returns the suit of this card as a single letter string
|
java.lang.String |
getStringEncodedValue() |
Return the value of this card as a short string
face cards are only a single letter
|
java.lang.String |
getSuitDescription(int suit) |
Returns an english-word, color-coded representation
of the suit passed to this method.
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
boolean |
isFaceUp() |
Gets whether the card is face up
|
void |
recoverPhyStats() |
This method copies the basePhyStats() object into the phyStats() object, then makes repeated calls to
all surrounding objects with affectPhyStats(Environmental,PhyStats) method.
|
void |
turnFaceDown() |
Sets the card as face down
|
void |
turnFaceUp() |
Sets the card as face up
|
addBehavior, addScript, behaviors, delAllBehaviors, delAllScripts, delBehavior, delScript, eachBehavior, eachScript, fetchBehavior, fetchBehavior, fetchScript, numBehaviors, numScripts, scripts
copyOf, initializeClass, newInstance
canSaveDatabaseID, databaseID, setDatabaseID
baseGoldValue, container, material, numberOfItems, owner, rawSecretIdentity, recursiveWeight, removeFromOwnerContainer, secretIdentity, setBaseValue, setContainer, setMaterial, setOwner, setSecretIdentity, setUsesRemaining, stopTicking, subjectToWearAndTear, ultimateContainer, usesRemaining, value
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isReadable, readableText, setReadable, setReadableText
addBehavior, addEffect, addNonUninvokableEffect, addScript, affectCharState, affectCharStats, affectPhyStats, alreadyWornMsg, amBeingWornProperly, amDestroyed, amWearingAt, baseGoldValue, basePhyStats, behaviors, canSaveDatabaseID, canWear, canWearComplete, cloneFix, compareProperLocations, compareTo, container, copyOf, databaseID, delAllBehaviors, delAllEffects, delAllScripts, delBehavior, delEffect, delScript, description, description, destroy, displayText, displayText, eachBehavior, eachEffect, eachScript, effects, executeMsg, expirationDate, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchScript, fitsOn, getSaveStatIndex, getStat, getStatCodes, getTickStatus, I, image, initializeClass, isGeneric, isReadable, isSavable, isStat, L, material, maxRange, minRange, miscTextFormat, name, name, Name, newInstance, numBehaviors, numberOfItems, numEffects, numScripts, okMessage, owner, phyStats, rawImage, rawLogicalAnd, rawProperLocationBitmap, rawSecretIdentity, rawWornCode, readableText, recursiveWeight, removeFromOwnerContainer, riding, sameAs, scripts, secretIdentity, setBasePhyStats, setBaseValue, setContainer, setDatabaseID, setDescription, setDisplayText, setExpirationDate, setImage, setMaterial, setMiscText, setName, setOwner, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, setReadable, setReadableText, setRiding, setSavable, setSecretIdentity, setStat, setUsesRemaining, stopTicking, subjectToWearAndTear, tackOns, text, tick, ultimateContainer, unWear, usesRemaining, value, wearAt, wearEvenIfImpossible, wearIfPossible, wearIfPossible, whereCantWear
amBeingWornProperly, amWearingAt, canWear, compareProperLocations, fitsOn, rawLogicalAnd, rawProperLocationBitmap, rawWornCode, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, unWear, wearAt, wearEvenIfImpossible, wearIfPossible, wearIfPossible, whereCantWear
public java.lang.String ID()
CMObject
public java.lang.String genericName()
Physical
genericName
in interface Physical
genericName
in class StdItem
protected boolean abilityImbuesMagic()
abilityImbuesMagic
in class StdItem
public int getBitEncodedSuit()
PlayingCard
getBitEncodedSuit
in interface PlayingCard
PlayingCard.suits
public int getBitEncodedValue()
PlayingCard
getBitEncodedValue
in interface PlayingCard
PlayingCard.suits
,
The card values are 2-14, the suit bitmasks are 0, 16, 32, and 48.
Face up is bit 64.
public boolean isFaceUp()
PlayingCard
isFaceUp
in interface PlayingCard
PlayingCard.turnFaceUp()
,
Face up is bit 64.
public void turnFaceUp()
PlayingCard
turnFaceUp
in interface PlayingCard
PlayingCard.isFaceUp()
,
Face up is bit 64.
public void turnFaceDown()
PlayingCard
turnFaceDown
in interface PlayingCard
PlayingCard.isFaceUp()
,
Face up is bit 64.
public java.lang.String getStringEncodedSuit()
PlayingCard
getStringEncodedSuit
in interface PlayingCard
public java.lang.String getStringEncodedValue()
PlayingCard
getStringEncodedValue
in interface PlayingCard
public java.lang.String getCardValueLongDescription(int value)
PlayingCard
getCardValueLongDescription
in interface PlayingCard
value
- the value to return a description ofpublic java.lang.String getCardValueShortDescription(int value)
PlayingCard
getCardValueShortDescription
in interface PlayingCard
value
- the value to return a description ofpublic java.lang.String getSuitDescription(int suit)
PlayingCard
getSuitDescription
in interface PlayingCard
suit
- the suit to return a description ofpublic void recoverPhyStats()
Affectable
recoverPhyStats
in interface Affectable
recoverPhyStats
in class StdItem
Affectable.basePhyStats()
,
Affectable.phyStats()
,
Affectable.addEffect(Ability)
,
Behavable.addBehavior(Behavior)
,
PhyStats