Eamon CS  3.1.0
Eamon.Framework.IGameState Interface Reference

Represents the base properties that comprise the saved state of a game. These properties are stored when the game is saved and restored when the game is resumed. More...

Inheritance diagram for Eamon.Framework.IGameState:
Eamon.Framework.IGameBase AlternateBeginnersCave.Framework.IGameState ARuncibleCargo.Framework.IGameState BeginnersForest.Framework.IGameState Dharmaquest.Framework.IGameState Eamon.Game.GameState LandOfTheMountainKing.Framework.IGameState OrbOfMyLife.Framework.IGameState StrongholdOfKahrDur.Framework.IGameState TheBeginnersCave.Framework.IGameState TheDeepCanyon.Framework.IGameState ThePyramidOfAnharos.Framework.IGameState TheSubAquanLaboratory.Framework.IGameState TheTempleOfNgurct.Framework.IGameState TheTrainingGround.Framework.IGameState TheVileGrimoireOfJaldial.Framework.IGameState TheWayfarersInn.Framework.IGameState WrenholdsSecretVigil.Framework.IGameState

Public Member Functions

long GetNBTL (long index, long roomUid=0)
 Gets the total Hardiness of Monsters with a specified Friendliness in a particular Room. More...
 
long GetNBTL (Friendliness friendliness, long roomUid=0)
 Gets the total Hardiness of Monsters with a specified Friendliness in a particular Room. More...
 
long GetDTTL (long index, long roomUid=0)
 Gets the total DmgTaken of Monsters with a specified Friendliness in a particular Room. More...
 
long GetDTTL (Friendliness friendliness, long roomUid=0)
 Gets the total DmgTaken of Monsters with a specified Friendliness in a particular Room. More...
 
long GetSa (long index)
 Gets the player's current ability for a given Spell. More...
 
long GetSa (Spell spell)
 Gets the player's current ability for a given Spell. More...
 
long GetImportedArtUid (long index)
 Gets the imported ArtifactUid at a given index. More...
 
long GetHeldWpnUid (long index)
 Gets the held weapon ArtifactUid at a given index. More...
 
void SetSa (long index, long value)
 Sets the player's current ability for a given Spell. More...
 
void SetSa (Spell spell, long value)
 Sets the player's current ability for a given Spell. More...
 
void SetImportedArtUid (long value)
 Adds the imported ArtifactUid to the list. More...
 
void SetHeldWpnUid (long value)
 Adds the held weapon ArtifactUid to the list. More...
 
void ModSa (long index, long value)
 Modifies the player's current ability for a given Spell. More...
 
void ModSa (Spell spell, long value)
 Modifies the player's current ability for a given Spell. More...
 
- Public Member Functions inherited from Eamon.Framework.IGameBase
void SetParentReferences ()
 
string GetPluralName (string fieldName)
 
string GetPluralName01 ()
 
string GetDecoratedName (string fieldName, ArticleType articleType, bool upshift=false, bool showCharOwned=true, bool showStateDesc=false, bool showContents=false, bool groupCountOne=false)
 
string GetNoneName (bool upshift=false, bool showCharOwned=true, bool showStateDesc=false, bool showContents=false, bool groupCountOne=false)
 
string GetArticleName (bool upshift=false, bool showCharOwned=true, bool showStateDesc=false, bool showContents=false, bool groupCountOne=false)
 
string GetTheName (bool upshift=false, bool showCharOwned=true, bool showStateDesc=false, bool showContents=false, bool groupCountOne=false)
 
RetCode BuildPrintedFullDesc (StringBuilder buf, bool showName, bool showVerboseName)
 

Properties

long Ar [get, set]
 Gets or sets the ArtifactUid for the armor being worn by the player character (may be 0 if none exists). More...
 
long Cm [get, set]
 Gets or sets the MonsterUid being used to represent the player character. More...
 
long Ls [get, set]
 Gets or sets the ArtifactUid for the currently active LightSource (may be 0 if none exists). More...
 
long Ro [get, set]
 Gets or sets the RoomUid for the player character's current location (may be 0 if in limbo). More...
 
long R2 [get, set]
 Gets or sets the RoomUid for the location the player character is entering (during a movement operation). More...
 
long R3 [get, set]
 Gets or sets the RoomUid for the location the player character is exiting (during a movement operation). More...
 
long Sh [get, set]
 Gets or sets the ArtifactUid for the shield being worn by the player character (may be 0 if none exists). More...
 
long Die [get, set]
 Gets or sets a value indicating the player character death status (-1=Quitting Game; 0=Alive; 1=Dead). More...
 
long Speed [get, set]
 Gets or sets the number of rounds remaining before the player character's Speed spell expires. More...
 
bool Vr [get, set]
 Gets or sets a value indicating whether Rooms should always be printed verbosely. More...
 
bool Vm [get, set]
 Gets or sets a value indicating whether Monsters should always be printed verbosely. More...
 
bool Va [get, set]
 Gets or sets a value indicating whether Artifacts should always be printed verbosely. More...
 
bool Vn [get, set]
 Gets or sets a value indicating whether names for Monsters and Artifacts should always be printed verbosely. More...
 
bool MatureContent [get, set]
 Gets or sets a value indicating whether mature content should be allowed during gameplay. More...
 
bool InteractiveFiction [get, set]
 Gets or sets a value indicating whether the game is being played as traditional Interactive Fiction or an Eamon adventure. More...
 
bool EnhancedCombat [get, set]
 Gets or sets a value indicating whether the game is using enhanced combat or traditional Eamon combat. More...
 
bool EnhancedParser [get, set]
 Gets or sets a value indicating whether the game is using an enhanced parser or traditional Eamon parser. More...
 
bool IobjPronounAffinity [get, set]
 Gets or sets a value indicating whether pronouns attach to the most recently used indirect or direct object (enhanced parser only). More...
 
bool ShowPronounChanges [get, set]
 Gets or sets a value indicating whether the parser emits a message when it changes the object referred to by a pronoun. (enhanced parser only). More...
 
bool ShowFulfillMessages [get, set]
 Gets or sets a value indicating whether the parser emits a message when it executes each command in a series (enhanced parser only). More...
 
long CurrTurn [get, set]
 Gets or sets the current turn in the game; this is incremented after player command parsing but before execution. More...
 
long PauseCombatMs [get, set]
 Gets or sets the number of milliseconds to pause between actions during a combat round. More...
 
long PauseCombatActions [get, set]
 Gets or sets the number of actions to pause between during a combat round. More...
 
long UsedWpnIdx [get, set]
 Gets or sets a value that indexes HeldWpnUids and indicates which weapon in that array is being used by the player in the game (Beginner's adventures only). More...
 
long[] Sa [get, set]
 Gets or sets an array of player character Spell abilities that is updated during gameplay. More...
 
IList< long > ImportedArtUids [get, set]
 Gets or sets a list of ArtifactUids corresponding to the Artifacts brought into the game by the player (armor, shield and weapons). More...
 
IList< long > HeldWpnUids [get, set]
 Gets or sets a list of ArtifactUids corresponding to the weapons brought into the game by the player (Beginner's adventures only). More...
 
IEventHeap BeforePrintPlayerRoomEventHeap [get, set]
 Gets or sets the data structure that holds events to be fired before the player character's current Room is printed. More...
 
IEventHeap AfterPrintPlayerRoomEventHeap [get, set]
 Gets or sets the data structure that holds events to be fired after the player character's current Room is printed, but before the command prompt is displayed. More...
 
- Properties inherited from Eamon.Framework.IGameBase
long Uid [get, set]
 Gets or sets a unique Id that distinguishes this Record from others of its type. More...
 
string Name [get, set]
 Gets or sets the name of this Record as shown in various lists or the Record's full description. More...
 
string Desc [get, set]
 Gets or sets the detailed description of this Record shown when the Record is first Seen or later examined. More...
 
string[] Synonyms [get, set]
 Gets or sets a string array containing Name synonyms for this Record (may be null). More...
 
bool Seen [get, set]
 Gets or sets a value indicating whether this Record has been seen by the player character. More...
 
bool Moved [get, set]
 Gets or sets a value indicating whether this Record has been moved from its original Location. More...
 
ArticleType ArticleType [get, set]
 Gets or sets a value indicating how this Record's Name is prefixed to produce its listed Name. More...
 
string ParserMatchName [get, set]
 Gets or sets the name or synonym of this Record matched in the FilterRecordList method. More...
 

Detailed Description

Represents the base properties that comprise the saved state of a game. These properties are stored when the game is saved and restored when the game is resumed.

Game designers can extend this interface and add new properties needed for the game state of their new game, implementing those properties in the game's underlying derived GameState class. Provided the SharpSerializer library can handle the new properties, the save and restore of the game's new GameState is automatically supported by Eamon CS. Luckily, this library is very powerful and only exotic things like cyclic graphs aren't supported. Be careful to distinguish between game state and scratch variables used only during gameplay, which are best stored elsewhere (perhaps in IEngine).

Member Function Documentation

◆ GetDTTL() [1/2]

long Eamon.Framework.IGameState.GetDTTL ( Friendliness  friendliness,
long  roomUid = 0 
)

Gets the total DmgTaken of Monsters with a specified Friendliness in a particular Room.

Parameters
friendlinessThe Friendliness value.
roomUidThe Room Uid, or 0 for the player's current Room. (Optional)

This convenience wrapper should typically never be overridden in games. The other base method remarks are also applicable here.

Returns
A single summed DmgTaken value for all affected Monsters.
See also
GetDTTL(long, long)

Implemented in Eamon.Game.GameState.

◆ GetDTTL() [2/2]

long Eamon.Framework.IGameState.GetDTTL ( long  index,
long  roomUid = 0 
)

Gets the total DmgTaken of Monsters with a specified Friendliness in a particular Room.

Parameters
indexThe Friendliness value expressed as a long datatype.
roomUidThe Room Uid, or 0 for the player's current Room. (Optional)

This method returns the summed damage taken for games using Ruleset Version 5 or 62; for others it returns 0. For group Monsters, the value added to the sum is the damage taken by the "current" group member. When the roomUid is omitted the player's current Room is used. This method can be overridden in games when necessary.

Returns
A single summed DmgTaken value for all affected Monsters.
See also
GetDTTL(Friendliness, long)

Implemented in Eamon.Game.GameState, and TheVileGrimoireOfJaldial.Game.GameState.

◆ GetHeldWpnUid()

long Eamon.Framework.IGameState.GetHeldWpnUid ( long  index)

Gets the held weapon ArtifactUid at a given index.

Parameters
indexThe list index.

The HeldWpnUids list stores all weapon Artifacts brought into a Beginner's adventure. This method can be overridden in games when necessary.

Returns
The held weapon Artifact Uid.

Implemented in Eamon.Game.GameState.

◆ GetImportedArtUid()

long Eamon.Framework.IGameState.GetImportedArtUid ( long  index)

Gets the imported ArtifactUid at a given index.

Parameters
indexThe list index.

The ImportedArtUids list stores Artifacts imported by the player into the game. This method can be overridden in games when necessary.

Returns
The imported Artifact Uid.

Implemented in Eamon.Game.GameState.

◆ GetNBTL() [1/2]

long Eamon.Framework.IGameState.GetNBTL ( Friendliness  friendliness,
long  roomUid = 0 
)

Gets the total Hardiness of Monsters with a specified Friendliness in a particular Room.

Parameters
friendlinessThe Friendliness value.
roomUidThe Room Uid, or 0 for the player's current Room. (Optional)

This convenience wrapper should typically never be overridden in games. The other base method remarks are also applicable here.

Returns
A single summed Hardiness value for all affected Monsters.
See also
GetNBTL(long, long)

Implemented in Eamon.Game.GameState.

◆ GetNBTL() [2/2]

long Eamon.Framework.IGameState.GetNBTL ( long  index,
long  roomUid = 0 
)

Gets the total Hardiness of Monsters with a specified Friendliness in a particular Room.

Parameters
indexThe Friendliness value expressed as a long datatype.
roomUidThe Room Uid, or 0 for the player's current Room. (Optional)

For group Monsters, the value added to the sum is equal to (Hardiness * CurrGroupCount). When the roomUid is omitted the player's current Room is used. This method can be overridden in games when necessary.

Returns
A single summed Hardiness value for all affected Monsters.
See also
GetNBTL(Friendliness, long)

Implemented in Eamon.Game.GameState.

◆ GetSa() [1/2]

long Eamon.Framework.IGameState.GetSa ( long  index)

Gets the player's current ability for a given Spell.

Parameters
indexThe Spell value expressed as a long datatype.

The value changes during gameplay based on Spell usage and regeneration each round. This method can be overridden in games when necessary.

Returns
The current ability value for the Spell.
See also
GetSa(Spell)

Implemented in Eamon.Game.GameState.

◆ GetSa() [2/2]

long Eamon.Framework.IGameState.GetSa ( Spell  spell)

Gets the player's current ability for a given Spell.

Parameters
spellThe Spell value.

This convenience wrapper should typically never be overridden in games. The other base method remarks are also applicable here.

Returns
The current ability value for the Spell.
See also
GetSa(long)

Implemented in Eamon.Game.GameState.

◆ ModSa() [1/2]

void Eamon.Framework.IGameState.ModSa ( long  index,
long  value 
)

Modifies the player's current ability for a given Spell.

Parameters
indexThe Spell value expressed as a long datatype.
valueThe modifier to the current ability value.

The current ability value can be incremented or decremented during gameplay for any reason, based on the value being positive or negative. This method can be overridden in games when necessary.

See also
ModSa(Spell, long)

Implemented in Eamon.Game.GameState.

◆ ModSa() [2/2]

void Eamon.Framework.IGameState.ModSa ( Spell  spell,
long  value 
)

Modifies the player's current ability for a given Spell.

Parameters
spellThe Spell value.
valueThe modifier to the current ability value.

This convenience wrapper should typically never be overridden in games. The other base method remarks are also applicable here.

See also
ModSa(long, long)

Implemented in Eamon.Game.GameState.

◆ SetHeldWpnUid()

void Eamon.Framework.IGameState.SetHeldWpnUid ( long  value)

Adds the held weapon ArtifactUid to the list.

Parameters
valueThe new held weapon Artifact Uid.

The held weapon Artifact Uid is appended to the HeldWpnUids list. This method can be overridden in games when necessary.

Implemented in Eamon.Game.GameState.

◆ SetImportedArtUid()

void Eamon.Framework.IGameState.SetImportedArtUid ( long  value)

Adds the imported ArtifactUid to the list.

Parameters
valueThe new imported Artifact Uid.

The imported Artifact Uid is appended to the ImportedArtUids list. This method can be overridden in games when necessary.

Implemented in Eamon.Game.GameState.

◆ SetSa() [1/2]

void Eamon.Framework.IGameState.SetSa ( long  index,
long  value 
)

Sets the player's current ability for a given Spell.

Parameters
indexThe Spell value expressed as a long datatype.
valueThe new current ability value.

The current ability value can be changed during gameplay for any reason. This method can be overridden in games when necessary.

See also
SetSa(Spell, long)

Implemented in Eamon.Game.GameState.

◆ SetSa() [2/2]

void Eamon.Framework.IGameState.SetSa ( Spell  spell,
long  value 
)

Sets the player's current ability for a given Spell.

Parameters
spellThe Spell value.
valueThe new current ability value.

This convenience wrapper should typically never be overridden in games. The other base method remarks are also applicable here.

See also
SetSa(long, long)

Implemented in Eamon.Game.GameState.

Property Documentation

◆ AfterPrintPlayerRoomEventHeap

IEventHeap Eamon.Framework.IGameState.AfterPrintPlayerRoomEventHeap
getset

Gets or sets the data structure that holds events to be fired after the player character's current Room is printed, but before the command prompt is displayed.

◆ Ar

long Eamon.Framework.IGameState.Ar
getset

Gets or sets the ArtifactUid for the armor being worn by the player character (may be 0 if none exists).

◆ BeforePrintPlayerRoomEventHeap

IEventHeap Eamon.Framework.IGameState.BeforePrintPlayerRoomEventHeap
getset

Gets or sets the data structure that holds events to be fired before the player character's current Room is printed.

◆ Cm

long Eamon.Framework.IGameState.Cm
getset

Gets or sets the MonsterUid being used to represent the player character.

◆ CurrTurn

long Eamon.Framework.IGameState.CurrTurn
getset

Gets or sets the current turn in the game; this is incremented after player command parsing but before execution.

◆ Die

long Eamon.Framework.IGameState.Die
getset

Gets or sets a value indicating the player character death status (-1=Quitting Game; 0=Alive; 1=Dead).

◆ EnhancedCombat

bool Eamon.Framework.IGameState.EnhancedCombat
getset

Gets or sets a value indicating whether the game is using enhanced combat or traditional Eamon combat.

◆ EnhancedParser

bool Eamon.Framework.IGameState.EnhancedParser
getset

Gets or sets a value indicating whether the game is using an enhanced parser or traditional Eamon parser.

◆ HeldWpnUids

IList<long> Eamon.Framework.IGameState.HeldWpnUids
getset

Gets or sets a list of ArtifactUids corresponding to the weapons brought into the game by the player (Beginner's adventures only).

All but one of these weapons is put in limbo at game startup; the UsedWpnIdx property indicates which weapon is being used by the player in the game. All weapons are returned to the player when the game is exited. Avoid accessing list elements directly in favor of using Getter/Setter methods to ensure games can override when necessary.

See also
GetHeldWpnUid(long), SetHeldWpnUid(long)

◆ ImportedArtUids

IList<long> Eamon.Framework.IGameState.ImportedArtUids
getset

Gets or sets a list of ArtifactUids corresponding to the Artifacts brought into the game by the player (armor, shield and weapons).

This list is loaded during game startup. Avoid accessing list elements directly in favor of using Getter/Setter methods to ensure games can override when necessary.

See also
GetImportedArtUid(long), SetImportedArtUid(long)

◆ InteractiveFiction

bool Eamon.Framework.IGameState.InteractiveFiction
getset

Gets or sets a value indicating whether the game is being played as traditional Interactive Fiction or an Eamon adventure.

◆ IobjPronounAffinity

bool Eamon.Framework.IGameState.IobjPronounAffinity
getset

Gets or sets a value indicating whether pronouns attach to the most recently used indirect or direct object (enhanced parser only).

◆ Ls

long Eamon.Framework.IGameState.Ls
getset

Gets or sets the ArtifactUid for the currently active LightSource (may be 0 if none exists).

Here are some basics about the LightSource ArtifactType in Eamon CS. Like Eamon Deluxe, it directly supports only one light source active at a time, and it must be in the Room with the player. When the LightSource is active, its Uid is stored in Ls; if no LightSource is active, this property will be 0. Furthermore, if the LightSource is portable, it must be carried by the player when activated as well (the game automatically causes the player character to pick it up). If a portable LightSource is dropped, it will go out; if the LightSource is not portable, it will go out when the player leaves the room. If one LightSource is lit when another is active, the currently lit LightSource will go out.

◆ MatureContent

bool Eamon.Framework.IGameState.MatureContent
getset

Gets or sets a value indicating whether mature content should be allowed during gameplay.

◆ PauseCombatActions

long Eamon.Framework.IGameState.PauseCombatActions
getset

Gets or sets the number of actions to pause between during a combat round.

◆ PauseCombatMs

long Eamon.Framework.IGameState.PauseCombatMs
getset

Gets or sets the number of milliseconds to pause between actions during a combat round.

◆ R2

long Eamon.Framework.IGameState.R2
getset

Gets or sets the RoomUid for the location the player character is entering (during a movement operation).

◆ R3

long Eamon.Framework.IGameState.R3
getset

Gets or sets the RoomUid for the location the player character is exiting (during a movement operation).

◆ Ro

long Eamon.Framework.IGameState.Ro
getset

Gets or sets the RoomUid for the player character's current location (may be 0 if in limbo).

◆ Sa

long [] Eamon.Framework.IGameState.Sa
getset

Gets or sets an array of player character Spell abilities that is updated during gameplay.

This array is initialized and synchronized with the player character's permanent SpellAbilities before and during the game. Avoid accessing array elements directly in favor of using Getter/Setter/Mutator methods to ensure games can override when necessary.

See also
GetSa(long), GetSa(Spell), SetSa(long, long), SetSa(Spell, long), ModSa(long, long), ModSa(Spell, long)

◆ Sh

long Eamon.Framework.IGameState.Sh
getset

Gets or sets the ArtifactUid for the shield being worn by the player character (may be 0 if none exists).

◆ ShowFulfillMessages

bool Eamon.Framework.IGameState.ShowFulfillMessages
getset

Gets or sets a value indicating whether the parser emits a message when it executes each command in a series (enhanced parser only).

◆ ShowPronounChanges

bool Eamon.Framework.IGameState.ShowPronounChanges
getset

Gets or sets a value indicating whether the parser emits a message when it changes the object referred to by a pronoun. (enhanced parser only).

◆ Speed

long Eamon.Framework.IGameState.Speed
getset

Gets or sets the number of rounds remaining before the player character's Speed spell expires.

◆ UsedWpnIdx

long Eamon.Framework.IGameState.UsedWpnIdx
getset

Gets or sets a value that indexes HeldWpnUids and indicates which weapon in that array is being used by the player in the game (Beginner's adventures only).

◆ Va

bool Eamon.Framework.IGameState.Va
getset

Gets or sets a value indicating whether Artifacts should always be printed verbosely.

◆ Vm

bool Eamon.Framework.IGameState.Vm
getset

Gets or sets a value indicating whether Monsters should always be printed verbosely.

◆ Vn

bool Eamon.Framework.IGameState.Vn
getset

Gets or sets a value indicating whether names for Monsters and Artifacts should always be printed verbosely.

◆ Vr

bool Eamon.Framework.IGameState.Vr
getset

Gets or sets a value indicating whether Rooms should always be printed verbosely.


The documentation for this interface was generated from the following file: