Eamon CS
3.1.0
|
Implements the core functionality of the Eamon CS game engine. More...
Public Member Functions | |
void | HandleException (Exception ex, string stackTraceFile, string errorMessage) |
void | ResolvePortabilityClassMappings () |
void | ProcessArgv (string[] args) |
RetCode | LoadPluginClassMappings () |
Loads the ClassMappingsDictionary with all interface to class mapping Key/Value pairs necessary to allow the currently loaded Eamon CS plugin to run. More... | |
RetCode | LoadPluginClassMappings01 (Assembly plugin) |
Probes the currently executing library/plugin (Assembly) for all classes adorned with the ClassMappings attribute, pairs each class with its corresponding interface, and updates the ClassMappingsDictionary accordingly. More... | |
RetCode | PushRulesetVersion (long rulesetVersion) |
RetCode | PopRulesetVersion () |
RetCode | ClearRvStack () |
RetCode | GetRvStackTop (ref long rvStackTop) |
T | CreateInstance< T > (Type ifaceType, Action< T > initialize=null) |
T | CreateInstance< T > (Action< T > initialize=null) |
T | CloneInstance< T > (T source) |
bool | CompareInstances< T > (T object1, T object2) |
bool | IsRulesetVersion (params long[] versions) |
string | GetPrefixedFileName (string fileName) |
void | ConvertDatafileFromXmlToDat (string fileName) |
RetCode | PushDatabase () |
RetCode | PushDatabase (IDatabase database) |
RetCode | PopDatabase (bool freeDatabase=true) |
RetCode | GetDatabase (long index, ref IDatabase database) |
RetCode | SaveDatabase (string fileName) |
RetCode | RestoreDatabase (string fileName) |
RetCode | ClearDbStack () |
RetCode | GetDbStackTop (ref long dbStackTop) |
void | InitSystem () |
void | DeinitSystem () |
void | ResetProperties (PropertyResetCode resetCode) |
void | ReplaceDatafileValues (string fileName, string[] patterns, string[] replacements) |
void | UpgradeDatafile (string fileName) |
string | Upgrade300DatafileGetCharArtFileName (string characterFileName) |
IList< ICharArtListData > | Upgrade300DatafileParseCharacters (string xmlString) |
IArtifact | Upgrade300DatafileGetCharArtifact (ICharArtListData charArtData, string propertyName, XElement element) |
string | Upgrade300DatafileStripEquipment (string xmlString) |
IPrep | GetPrep (long index) |
Gets the sentence preposition (e.g., "to", "from", "inside", etc). More... | |
string | GetArticle (long index) |
Gets the sentence article (e.g., "a", "some", "the", etc). More... | |
string | GetNumberString (long index) |
string | GetFieldDescName (long index) |
string | GetFieldDescName (FieldDesc fieldDesc) |
string | GetStatusName (long index) |
Gets the name for a given Status. More... | |
string | GetStatusName (Status status) |
Gets the name for a given Status. More... | |
string | GetClothingName (long index) |
Gets the name for a given Clothing. More... | |
string | GetClothingName (Clothing clothing) |
Gets the name for a given Clothing. More... | |
string | GetCombatCodeDesc (long index) |
Gets the description for a given CombatCode. More... | |
string | GetCombatCodeDesc (CombatCode combatCode) |
Gets the description for a given CombatCode. More... | |
string | GetParryCodeDesc (long index) |
Gets the description for a given ParryCode. More... | |
string | GetParryCodeDesc (ParryCode parryCode) |
Gets the description for a given ParryCode. More... | |
string | GetContainerDisplayCodeDesc (long index) |
string | GetContainerDisplayCodeDesc (ContainerDisplayCode containerDisplayCode) |
string | GetLightLevelName (long index) |
Gets the name for a given LightLevel. More... | |
string | GetLightLevelName (LightLevel lightLevel) |
Gets the name for a given LightLevel. More... | |
IStat | GetStat (long index) |
Gets the data for a given Stat. More... | |
IStat | GetStat (Stat stat) |
Gets the data for a given Stat. More... | |
ISpell | GetSpell (long index) |
Gets the data for a given Spell. More... | |
ISpell | GetSpell (Spell spell) |
Gets the data for a given Spell. More... | |
IWeapon | GetWeapon (long index) |
Gets the data for a given Weapon. More... | |
IWeapon | GetWeapon (Weapon weapon) |
Gets the data for a given Weapon. More... | |
IArmor | GetArmor (long index) |
Gets the data for a given Armor. More... | |
IArmor | GetArmor (Armor armor) |
Gets the data for a given Armor. More... | |
IDirection | GetDirection (long index) |
Gets the data for a given Direction. More... | |
IDirection | GetDirection (Direction direction) |
Gets the data for a given Direction. More... | |
IArtifactType | GetArtifactType (long index) |
Gets the data for a given ArtifactType. More... | |
IArtifactType | GetArtifactType (ArtifactType artifactType) |
Gets the data for a given ArtifactType. More... | |
bool | IsSuccess (RetCode rc) |
Indicates whether an operation succeeded. More... | |
bool | IsFailure (RetCode rc) |
Indicates whether an operation failed. More... | |
bool | IsValidPluralType (PluralType pluralType) |
Indicates whether a plural type is valid. More... | |
bool | IsValidArtifactType (ArtifactType artifactType) |
Indicates whether an artifact type is valid. More... | |
bool | IsValidArtifactArmor (long armor, bool includeShields=true) |
Indicates whether an armor value is valid for a wearable Artifact. More... | |
bool | IsValidMonsterArmor (long armor) |
Indicates whether an armor value is valid for a Monster. More... | |
bool | IsValidMonsterCourage (long courage) |
Indicates whether a courage value is valid for a Monster. More... | |
bool | IsValidMonsterFriendliness (Friendliness friendliness) |
bool | IsValidMonsterFriendlinessPct (Friendliness friendliness) |
bool | IsValidDirection (Direction dir) |
bool | IsValidRoomUid01 (long roomUid) |
bool | IsValidRoomDirectionDoorUid01 (long roomUid) |
bool | IsArtifactFieldStrength (long value) |
bool | IsUnmovable (long weight) |
bool | IsUnmovable01 (long weight) |
long | GetMonsterHealthStatusIndex (long hardiness, long dmgTaken) |
long | GetWeightCarryableGronds (long hardiness) |
long | GetWeightCarryableDos (long hardiness) |
long | GetIntellectBonusPct (long intellect) |
long | GetCharmMonsterPct (long charisma) |
long | GetPluralTypeEffectUid (PluralType pluralType) |
long | GetArmorFactor (long armorUid, long shieldUid) |
long | GetCharismaFactor (long charisma) |
long | GetMonsterFriendlinessPct (Friendliness friendliness) |
long | GetArtifactFieldStrength (long value) |
long | GetMerchantAskPrice (double price, double rtio) |
long | GetMerchantBidPrice (double price, double rtio) |
long | GetMerchantAdjustedCharisma (long charisma) |
double | GetMerchantRtio (long charisma) |
bool | IsCharYOrN (char ch) |
Indicates whether a character is one of ['Y', 'N']. More... | |
bool | IsCharGOrAOrN (char ch) |
Indicates whether a character is one of ['G', 'A', 'N']. More... | |
bool | IsCharSOrTOrROrX (char ch) |
Indicates whether a character is one of ['S', 'T', 'R', 'X']. More... | |
bool | IsCharNOrSOrEOrW (char ch) |
Indicates whether a character is one of ['N', 'S', 'E', 'W']. More... | |
bool | IsChar0Or1 (char ch) |
Indicates whether a character is one of ['0', '1']. More... | |
bool | IsChar0To2 (char ch) |
Indicates whether a character is one of ['0', '1', '2']. More... | |
bool | IsChar0To3 (char ch) |
Indicates whether a character is one of ['0', '1', '2', '3']. More... | |
bool | IsChar1To3 (char ch) |
Indicates whether a character is one of ['1', '2', '3']. More... | |
bool | IsChar1To4 (char ch) |
Indicates whether a character is one of ['1', '2', '3', '4']. More... | |
bool | IsCharDigit (char ch) |
Indicates whether a character is a numeric digit. More... | |
bool | IsCharDigitOrX (char ch) |
Indicates whether a character is a numeric digit or 'X'. More... | |
bool | IsCharPlusMinusDigit (char ch) |
Indicates whether a character is a numeric digit or one of ['+', '-']. More... | |
bool | IsCharAlpha (char ch) |
Indicates whether a character is alphabetic. More... | |
bool | IsCharAlphaSpace (char ch) |
Indicates whether a character is alphabetic or space. More... | |
bool | IsCharAlnum (char ch) |
Indicates whether a character is alphabetic or numeric digit. More... | |
bool | IsCharAlnumSpace (char ch) |
Indicates whether a character is alphabetic, numeric digit or space. More... | |
bool | IsCharAlnumPeriodUnderscore (char ch) |
Indicates whether a character is alphabetic, numeric digit, period or underscore. More... | |
bool | IsCharPrint (char ch) |
Indicates whether a character is printable. More... | |
bool | IsCharPound (char ch) |
Indicates whether a character is '#'. More... | |
bool | IsCharQuote (char ch) |
Indicates whether a character is a quote. More... | |
bool | IsCharAny (char ch) |
Indicates whether a character is any character at all. More... | |
bool | IsCharAnyButDquoteCommaColon (char ch) |
Indicates whether a character is any character but one of ['"', ',', ':']. More... | |
bool | IsCharAnyButBackForwardSlash (char ch) |
Indicates whether a character is any character but one of ['\', '/']. More... | |
char | ModifyCharToUpper (char ch) |
Given a character, produce its upper case equivalent, if any. More... | |
char | ModifyCharToNullOrX (char ch) |
Given a character, produce either 'X' or '\0'. More... | |
char | ModifyCharToNull (char ch) |
Given a character, produce '\0'. More... | |
Direction | GetDirection (string directionName) |
ContainerType | GetContainerType (ArtifactType artifactType) |
IConfig | GetConfig () |
IGameState | GetGameState () |
Gets the GameState record. More... | |
IModule | GetModule () |
Gets the Module record. More... | |
void | Shuffle< T > (IList< T > list) |
T | GetRandomElement< T > (T[] array, Func< long > indexFunc=null) |
T | GetNonRepeatingRandomElement< T > (IList< T > sourceList, IList< T > usedList, Action< IList< T >> shuffleFunc=null) |
T | GetNonRepeatingRandomElement01< T > (IList< T > sourceList, bool shuffle=false, Action< IList< T >> shuffleFunc=null) |
T | EvalFriendliness< T > (Friendliness friendliness, T enemyValue, T neutralValue, T friendValue) |
Evaluates the Friendliness, returning a value of type T. More... | |
T | EvalGender< T > (Gender gender, T maleValue, T femaleValue, T neutralValue) |
Evaluates the Gender, returning a value of type T. More... | |
T | EvalContainerType< T > (ContainerType containerType, T inValue, T onValue, T underValue, T behindValue) |
Evaluates the ContainerType, returning a value of type T. More... | |
T | EvalRoomType< T > (RoomType roomType, T indoorsValue, T outdoorsValue) |
Evaluates the RoomType, returning a value of type T. More... | |
T | EvalLightLevel< T > (LightLevel lightLevel, T darkValue, T lightValue) |
Evaluates the LightLevel, returning a value of type T. More... | |
T | EvalPlural< T > (bool isPlural, T singularValue, T pluralValue) |
Evaluates the plural value, returning a value of type T. More... | |
string | BuildPrompt (long bufSize, char fillChar, long number, string msg, string emptyVal) |
string | BuildValue (long bufSize, char fillChar, long offset, long longVal, string stringVal, string lookupMsg) |
string | WordWrap (string str, StringBuilder buf, long margin, IWordWrapArgs args, bool clearBuf=true) |
string | WordWrap (string str, StringBuilder buf, bool clearBuf=true) |
string | LineWrap (string str, StringBuilder buf, long startColumn, bool clearBuf=true) |
string | GetStringFromNumber (long num, bool addSpace, StringBuilder buf) |
long | GetNumberFromString (string str) |
RetCode | RollDice (long numDice, long numSides, ref long[] dieRolls) |
Rolls a number of dice, storing the resulting values in an array. More... | |
long | RollDice (long numDice, long numSides, long modifier) |
Rolls a number of dice, returning a sum of the results. More... | |
RetCode | SumHighestRolls (long[] dieRolls, long numRollsToSum, ref long result) |
Given an array of die rolls, sum the highest of them and return the result. More... | |
string | Capitalize (string str) |
void | UnlinkOnFailure () |
Deletes a set of game-related files from the filesystem. More... | |
void | TruncatePluralTypeEffectDesc (PluralType pluralType, long maxSize) |
void | TruncatePluralTypeEffectDesc (IEffect effect) |
RetCode | SplitPath (string fullPath, ref string directory, ref string fileName, ref string extension, bool appendDirectorySeparatorChar=true) |
RetCode | StripPrepsAndArticles (StringBuilder buf, ref bool mySeen) |
void | PrintTitle (string title, bool inBox) |
void | PrintEffectDesc (IEffect effect, bool printFinalNewLine=true) |
void | PrintEffectDesc (long effectUid, bool printFinalNewLine=true) |
void | PrintZapDirectHit () |
Prints the Blast spell description. More... | |
RetCode | ValidateRecordsAfterDatabaseLoaded () |
RetCode | StatDisplay (IStatDisplayArgs args) |
RetCode | GetRecordNameList (IList< IGameBase > recordList, IRecordNameListArgs args, StringBuilder buf) |
RetCode | GetRecordNameCount (IList< IGameBase > recordList, string name, bool exactMatch, ref long count) |
RetCode | ListRecords (IList< IGameBase > recordList, bool capitalize, bool showExtraInfo, StringBuilder buf) |
RetCode | ResolveUidMacros (string str, StringBuilder buf, bool resolveFuncs, bool recurse, ref long invalidUid) |
RetCode | ResolveUidMacros (string str, StringBuilder buf, bool resolveFuncs, bool recurse) |
double | GetWeaponPriceOrValue (string name, long complexity, Weapon type, long dice, long sides, long numHands, bool calcPrice, ref bool isMarcosWeapon) |
double | GetWeaponPriceOrValue (IArtifact weapon, bool calcPrice, ref bool isMarcosWeapon) |
double | GetArmorPriceOrValue (Armor armor, bool calcPrice, ref bool isMarcosArmor) |
void | AppendFieldDesc (FieldDesc fieldDesc, StringBuilder buf, StringBuilder fullDesc, StringBuilder briefDesc) |
void | AppendFieldDesc (FieldDesc fieldDesc, StringBuilder buf, string fullDesc, string briefDesc) |
IList< IArtifact > | GetArtifactList (params Func< IArtifact, bool >[] whereClauseFuncs) |
IList< IMonster > | GetMonsterList (params Func< IMonster, bool >[] whereClauseFuncs) |
IList< IGameBase > | GetRecordList (params Func< IGameBase, bool >[] whereClauseFuncs) |
IList< IMonster > | GetFriendlyMonsterList (IMonster monster) |
IList< IMonster > | GetHostileMonsterList (IMonster monster) |
IArtifact | GetNthArtifact (IList< IArtifact > artifactList, long which, Func< IArtifact, bool > whereClauseFunc) |
IMonster | GetNthMonster (IList< IMonster > monsterList, long which, Func< IMonster, bool > whereClauseFunc) |
IGameBase | GetNthRecord (IList< IGameBase > recordList, long which, Func< IGameBase, bool > whereClauseFunc) |
bool | StripUniqueCharsFromRecordNames (IList< IGameBase > recordList) |
bool | AddUniqueCharsToRecordNames (IList< IGameBase > recordList) |
bool | SwapGreaterArmorUidWithLesserShieldUid (ICharacter character) |
bool | ShouldSleepAfterInput (StringBuilder buf, char inputFillChar) |
void | ConvertWeaponToGoldOrTreasure (IArtifact artifact, bool convertToGold) |
void | ConvertTreasureToContainer (IArtifact artifact, ContainerType containerType=ContainerType.In) |
void | ConvertContainerToTreasure (IArtifact artifact, ContainerType containerType=ContainerType.In) |
Properties | |
StringBuilder | Buf [get, set] |
string[] | CommandSepTokens [get] |
string[] | PronounTokens [get] |
string | ToughDesc [get] |
string | CourageDesc [get] |
int | ArtNameLen [get] |
Gets the maximum length of an Artifact Name. More... | |
int | ArtStateDescLen [get] |
Gets the maximum length of an Artifact StateDesc. More... | |
int | ArtDescLen [get] |
Gets the maximum length of an Artifact Desc. More... | |
int | CharNameLen [get] |
Gets the maximum length of a Character Name. More... | |
int | EffDescLen [get] |
Gets the maximum length of an Effect Desc. More... | |
int | FsNameLen [get] |
Gets the maximum length of a Fileset Name. More... | |
int | FsFileNameLen [get] |
Gets the maximum length of a Fileset file name (e.g., PluginFileName, etc). More... | |
int | HntQuestionLen [get] |
Gets the maximum length of a Hint Question. More... | |
int | HntAnswerLen [get] |
Gets the maximum length of a Hint Answer. More... | |
int | ModNameLen [get] |
Gets the maximum length of a Module Name. More... | |
int | ModDescLen [get] |
Gets the maximum length of a Module Desc. More... | |
int | ModAuthorLen [get] |
Gets the maximum length of a Module Author. More... | |
int | ModVolLabelLen [get] |
Gets the maximum length of a Module VolLabel. More... | |
int | ModSerialNumLen [get] |
Gets the maximum length of a Module SerialNum. More... | |
int | MonNameLen [get] |
Gets the maximum length of a Monster Name. More... | |
int | MonStateDescLen [get] |
Gets the maximum length of a Monster StateDesc. More... | |
int | MonDescLen [get] |
Gets the maximum length of a Monster Desc. More... | |
int | RmNameLen [get] |
Gets the maximum length of a Room Name. More... | |
int | RmDescLen [get] |
Gets the maximum length of a Room Desc. More... | |
long | AxePrice [get] |
Gets the base price, in gold pieces, of an axe sold by Marcos Cavielli. More... | |
long | BowPrice [get] |
Gets the base price, in gold pieces, of a bow sold by Marcos Cavielli. More... | |
long | MacePrice [get] |
Gets the base price, in gold pieces, of a mace sold by Marcos Cavielli. More... | |
long | SpearPrice [get] |
Gets the base price, in gold pieces, of a spear sold by Marcos Cavielli. More... | |
long | SwordPrice [get] |
Gets the base price, in gold pieces, of a sword sold by Marcos Cavielli. More... | |
long | ShieldPrice [get] |
Gets the base price, in gold pieces, of a shield sold by Marcos Cavielli. More... | |
long | LeatherArmorPrice [get] |
Gets the base price, in gold pieces, of some leather armor sold by Marcos Cavielli. More... | |
long | ChainMailPrice [get] |
Gets the base price, in gold pieces, of some chain mail armor sold by Marcos Cavielli. More... | |
long | PlateMailPrice [get] |
Gets the base price, in gold pieces, of some plate mail armor sold by Marcos Cavielli. More... | |
long | BlastPrice [get] |
Gets the base price, in gold pieces, of the Blast spell sold by Hokas Tokas. More... | |
long | HealPrice [get] |
Gets the base price, in gold pieces, of the Heal spell sold by Hokas Tokas. More... | |
long | SpeedPrice [get] |
Gets the base price, in gold pieces, of the Speed spell sold by Hokas Tokas. More... | |
long | PowerPrice [get] |
Gets the base price, in gold pieces, of the Power spell sold by Hokas Tokas. More... | |
long | RecallPrice [get] |
Gets the base price, in gold pieces, of being recalled from an adventure by a local wizard, as noted by the Burly Irishman at the Front Desk. More... | |
long | StatGainPrice [get] |
Gets the base price, in gold pieces, of having a Stat boosted by the Good Witch. More... | |
long | WeaponTrainingPrice [get] |
Gets the base price, in gold pieces, of having a weapon training session with Don Diego. More... | |
long | ArmorTrainingPrice [get] |
Gets the base price, in gold pieces, of having an armor training session with the giant. More... | |
long | SpellTrainingPrice [get] |
Gets the base price, in gold pieces, of having a spell training session with the licensed wizard. More... | |
long | InfoBoothPrice [get] |
Gets the base price, in gold pieces, of purchasing services from the practice area info booth. More... | |
long | FountainPrice [get] |
Gets the base price, in gold pieces, of interacting with the village fountain statue. More... | |
long | NumRecords [get] |
Gets the maximum number of Records allowed in a database table. More... | |
long | NumCharacterWeapons [get] |
Gets the maximum number of weapon Artifacts allowed in a Character's inventory. More... | |
long | NumCharacterArtifacts [get] |
Gets the maximum number of Artifacts allowed in a Character's inventory. More... | |
long | NumArtifactCategories [get] |
Gets the maximum number of Categories assignable to a single Artifact. More... | |
long | NumArtifactCategoryFields [get] |
int | BufSize [get] |
Gets the default size for large, discardable StringBuilders created during system processing. More... | |
int | BufSize01 [get] |
Gets the default size for small, discardable StringBuilders created during system processing. More... | |
int | BufSize02 [get] |
Gets the default size for tiny, discardable StringBuilders created during system processing. More... | |
int | BufSize03 [get] |
Gets the default size for medium, discardable StringBuilders created during system processing. More... | |
string | ResolveEffectRegexPattern [get] |
string | ResolveUidMacroRegexPattern [get] |
string | ValidWorkDirRegexPattern [get] |
string | CommandSepRegexPattern [get] |
string | PronounRegexPattern [get] |
string | EverythingRegexPattern [get] |
string | ExceptRegexPattern [get] |
string | RecIdepErrorFmtStr [get] |
Gets the format string used to produce error messages during Record interdependency checking. More... | |
string | AndroidAdventuresDir [get] |
Gets the Adventures directory path on Android platforms, relative to the working directory. More... | |
string | AdventuresDir [get] |
Gets the Adventures directory path on non-Android platforms, relative to the working directory. More... | |
string | QuickLaunchDir [get] |
Gets the QuickLaunch directory path, relative to the working directory. More... | |
string | DefaultWorkDir [get] |
string | ProcessMutexName [get] |
Gets the name of the Mutex used to synchronize Eamon CS processes. More... | |
string | EamonCSSlnFile [get] |
Gets the Eamon CS Solution path and file name, relative to the working directory. More... | |
string | StackTraceFile [get] |
Gets the relative path and name of the error file dumped when an unexpected system shutdown occurs. More... | |
string | GlobalLaunchParametersFile [get] |
Gets the Global Launch Parameters path and file name, relative to the working directory. More... | |
string | ProgVersion [get] |
Gets the Eamon CS system version displayed on program startup. More... | |
long | InfiniteDrinkableEdible [get] |
Gets a value indicating whether a Drinkable or Edible Artifact has infinite quantity. More... | |
long | DirectionExit [get] |
Gets the Room Uid constant representing an exit from a game. More... | |
long | LimboLocation [get] |
Gets the Room Uid constant representing "limbo". More... | |
long | MinWeaponComplexity [get] |
Gets the minimum allowed weapon Complexity. More... | |
long | MaxWeaponComplexity [get] |
Gets the maximum allowed weapon Complexity. More... | |
long | MinGoldValue [get] |
Gets the minimum amount of gold the player character can carry or hold in the bank. More... | |
long | MaxGoldValue [get] |
Gets the maximum amount of gold the player character can carry or hold in the bank. More... | |
long | MaxPathLen [get] |
long | MaxRecursionLevel [get] |
Gets the maximum recursion level for macro replacement. More... | |
int | WindowWidth [get] |
int | WindowHeight [get] |
int | BufferWidth [get] |
int | BufferHeight [get] |
long | RightMargin [get] |
long | NumRows [get] |
IDictionary< Type, Type > | ClassMappingsDictionary [get, set] |
Gets or sets the Dictionary that stores interface to class mappings as Key/Value pairs, used for dependency injection. More... | |
ITextReader | In [get, set] |
Gets or sets the text reader that accepts user input from the console window. More... | |
ITextWriter | Out [get, set] |
Gets or sets the text writer that prints text to the console window. More... | |
ITextWriter | Error [get, set] |
Gets or sets the text writer that prints error messages to the console window. More... | |
IMutex | Mutex [get, set] |
Gets or sets a mutex (mutual exclusion lock) that ensures only one Eamon CS process runs in a given operating system at a time. More... | |
ITransferProtocol | TransferProtocol [get, set] |
IDirectory | Directory [get, set] |
Gets or sets the platform-independent Directory manager that Eamon CS relies on for all directory-related operations. More... | |
IFile | File [get, set] |
Gets or sets the platform-independent File manager that Eamon CS relies on for all file-related operations. More... | |
IPath | Path [get, set] |
Gets or sets the platform-independent file system Path manager that Eamon CS relies on for all file system path-related operations. More... | |
ISharpSerializer | SharpSerializer [get, set] |
IThread | Thread [get, set] |
Gets or sets the platform-independent Thread manager that Eamon CS relies on for all thread-related operations. More... | |
MemoryStream | CloneStream [get, set] |
long | MutatePropertyCounter [get, set] |
string | WorkDir [get, set] |
string | FilePrefix [get, set] |
long | RulesetVersion [get] |
Gets a value indicating which Eamon ruleset applies to the current game. More... | |
bool | EnableMutateProperties [get] |
Gets a value indicating whether "mutating properties" (those that are dynamically calculated) should be enabled. More... | |
bool | EnableStdio [get, set] |
bool | EnableNegativeRoomUidLinks [get, set] |
bool | EnableScreenReaderMode [get, set] |
bool | EnableCommandHistory [get, set] |
bool | EnableEnhancedCombat [get, set] |
bool | IgnoreMutex [get, set] |
Gets or sets a value indicating whether the Mutex should be ignored, allowing unlimited Eamon CS processes to run simultaneously. More... | |
bool | DisableValidation [get, set] |
Gets or sets a value indicating whether validation should be disabled when Records are loaded. More... | |
bool | RunGameEditor [get, set] |
bool | DeleteGameStateFromMainHall [get, set] |
bool | GetMainMenuInput [get, set] |
Action< IDictionary< Type, Type > > | LoadPortabilityClassMappings [get, set] |
IDatabase | Database [get] |
IRoom | RevealContentRoom [get, set] |
IMonster | RevealContentMonster [get, set] |
IList< IArtifact > | RevealContentArtifactList [get, set] |
IList< Action > | RevealContentFuncList [get, set] |
long | RevealContentCounter [get, set] |
string | LineSep [get, set] |
bool | LineWrapUserInput [get, set] |
IRecordDb< IConfig > | CFGDB [get, set] |
Gets or sets the Config database quick-accessor. More... | |
IRecordDb< IFileset > | FSDB [get, set] |
Gets or sets the Fileset database quick-accessor. More... | |
IRecordDb< ICharacter > | CHRDB [get, set] |
Gets or sets the Character database quick-accessor. More... | |
IRecordDb< IModule > | MODDB [get, set] |
Gets or sets the Module database quick-accessor. More... | |
IRecordDb< IRoom > | RDB [get, set] |
Gets or sets the Room database quick-accessor. More... | |
IRecordDb< IArtifact > | ADB [get, set] |
Gets or sets the Artifact database quick-accessor. More... | |
IRecordDb< IEffect > | EDB [get, set] |
Gets or sets the Effect database quick-accessor. More... | |
IRecordDb< IMonster > | MDB [get, set] |
Gets or sets the Monster database quick-accessor. More... | |
IRecordDb< IHint > | HDB [get, set] |
Gets or sets the Hint database quick-accessor. More... | |
IRecordDb< IGameState > | GSDB [get, set] |
Gets or sets the GameState database quick-accessor. More... | |
IDictionary< long, Func< string > > | MacroFuncs [get, set] |
Gets or sets a collection of functions used to resolve macros embedded in Desc, ArtifactStateDesc and Monster StateDesc properties. More... | |
Action< IRoom, IMonster, IArtifact, long, bool > | RevealContainerContentsFunc [get, set] |
IPrep[] | Preps [get, set] |
Gets or sets an array of sentence prepositions (e.g., "to", "from", "inside", etc). More... | |
string[] | Articles [get, set] |
Gets or sets an array of sentence articles (e.g., "a", "some", "the", etc). More... | |
string | UnknownName [get, set] |
Gets or sets a generic string representing an unknown name (e.g., "???"). More... | |
Implements the core functionality of the Eamon CS game engine.
Spending any amount of time looking through the Eamon CS code base reveals how critical this class is. Originally, it was split into three classes encompassing (low level) ClassMappings, Constants, and the Engine itself. But this led to a convoluted property thunking implementation that was resolved when the classes were merged into a single mega-class. Clearly this is against typical conventions, the tendency is to split complexity apart, but in this case it felt like the conglomerate class simplified things, in spite of the large amount of functionality contained within. Doing so doesn't really increase overall complexity since these properties and methods are largely stand-alone, plus proper documentation will improve things considerably.
This class combined with the GameBase, Command, State, and Component derivatives (among others) are used to implement games in Eamon CS. The different plugin Engine classes form a hierarchy, often overriding or adding new functionality at higher system levels (particularly in games). This is also the default class you can use to store runtime (non-persisted) game state variables, although it is optional. Please take a look at the various games implemented in Eamon CS to see how Engine is used.
bool Eamon.Framework.Plugin.IEngine.AddUniqueCharsToRecordNames | ( | IList< IGameBase > | recordList | ) |
void Eamon.Framework.Plugin.IEngine.AppendFieldDesc | ( | FieldDesc | fieldDesc, |
StringBuilder | buf, | ||
string | fullDesc, | ||
string | briefDesc | ||
) |
fieldDesc | |
buf | |
fullDesc | |
briefDesc |
Implemented in Eamon.Game.Plugin.Engine.
void Eamon.Framework.Plugin.IEngine.AppendFieldDesc | ( | FieldDesc | fieldDesc, |
StringBuilder | buf, | ||
StringBuilder | fullDesc, | ||
StringBuilder | briefDesc | ||
) |
fieldDesc | |
buf | |
fullDesc | |
briefDesc |
Implemented in Eamon.Game.Plugin.Engine.
string Eamon.Framework.Plugin.IEngine.BuildPrompt | ( | long | bufSize, |
char | fillChar, | ||
long | number, | ||
string | msg, | ||
string | emptyVal | ||
) |
string Eamon.Framework.Plugin.IEngine.BuildValue | ( | long | bufSize, |
char | fillChar, | ||
long | offset, | ||
long | longVal, | ||
string | stringVal, | ||
string | lookupMsg | ||
) |
bufSize | |
fillChar | |
offset | |
longVal | |
stringVal | |
lookupMsg |
Implemented in Eamon.Game.Plugin.Engine.
string Eamon.Framework.Plugin.IEngine.Capitalize | ( | string | str | ) |
RetCode Eamon.Framework.Plugin.IEngine.ClearDbStack | ( | ) |
Implemented in Eamon.Game.Plugin.Engine.
RetCode Eamon.Framework.Plugin.IEngine.ClearRvStack | ( | ) |
Implemented in Eamon.Game.Plugin.Engine.
T Eamon.Framework.Plugin.IEngine.CloneInstance< T > | ( | T | source | ) |
bool Eamon.Framework.Plugin.IEngine.CompareInstances< T > | ( | T | object1, |
T | object2 | ||
) |
object1 | |
object2 |
Implemented in Eamon.Game.Plugin.Engine.
T | : | class |
void Eamon.Framework.Plugin.IEngine.ConvertContainerToTreasure | ( | IArtifact | artifact, |
ContainerType | containerType = ContainerType.In |
||
) |
artifact | |
containerType |
Implemented in Eamon.Game.Plugin.Engine.
void Eamon.Framework.Plugin.IEngine.ConvertDatafileFromXmlToDat | ( | string | fileName | ) |
fileName |
Implemented in Eamon.Game.Plugin.Engine.
void Eamon.Framework.Plugin.IEngine.ConvertTreasureToContainer | ( | IArtifact | artifact, |
ContainerType | containerType = ContainerType.In |
||
) |
artifact | |
containerType |
Implemented in Eamon.Game.Plugin.Engine.
void Eamon.Framework.Plugin.IEngine.ConvertWeaponToGoldOrTreasure | ( | IArtifact | artifact, |
bool | convertToGold | ||
) |
artifact | |
convertToGold |
Implemented in Eamon.Game.Plugin.Engine.
T Eamon.Framework.Plugin.IEngine.CreateInstance< T > | ( | Action< T > | initialize = null | ) |
T Eamon.Framework.Plugin.IEngine.CreateInstance< T > | ( | Type | ifaceType, |
Action< T > | initialize = null |
||
) |
ifaceType | |
initialize |
Implemented in Eamon.Game.Plugin.Engine.
T | : | class |
void Eamon.Framework.Plugin.IEngine.DeinitSystem | ( | ) |
Implemented in Eamon.Game.Plugin.Engine.
T Eamon.Framework.Plugin.IEngine.EvalContainerType< T > | ( | ContainerType | containerType, |
T | inValue, | ||
T | onValue, | ||
T | underValue, | ||
T | behindValue | ||
) |
Evaluates the ContainerType, returning a value of type T.
containerType | |
inValue | |
onValue | |
underValue | |
behindValue |
Implemented in Eamon.Game.Plugin.Engine.
T Eamon.Framework.Plugin.IEngine.EvalFriendliness< T > | ( | Friendliness | friendliness, |
T | enemyValue, | ||
T | neutralValue, | ||
T | friendValue | ||
) |
Evaluates the Friendliness, returning a value of type T.
friendliness | |
enemyValue | |
neutralValue | |
friendValue |
Implemented in Eamon.Game.Plugin.Engine.
T Eamon.Framework.Plugin.IEngine.EvalGender< T > | ( | Gender | gender, |
T | maleValue, | ||
T | femaleValue, | ||
T | neutralValue | ||
) |
Evaluates the Gender, returning a value of type T.
gender | |
maleValue | |
femaleValue | |
neutralValue |
Implemented in Eamon.Game.Plugin.Engine.
T Eamon.Framework.Plugin.IEngine.EvalLightLevel< T > | ( | LightLevel | lightLevel, |
T | darkValue, | ||
T | lightValue | ||
) |
Evaluates the LightLevel, returning a value of type T.
lightLevel | |
darkValue | |
lightValue |
Implemented in Eamon.Game.Plugin.Engine.
T Eamon.Framework.Plugin.IEngine.EvalPlural< T > | ( | bool | isPlural, |
T | singularValue, | ||
T | pluralValue | ||
) |
Evaluates the plural value, returning a value of type T.
isPlural | |
singularValue | |
pluralValue |
Implemented in Eamon.Game.Plugin.Engine.
T Eamon.Framework.Plugin.IEngine.EvalRoomType< T > | ( | RoomType | roomType, |
T | indoorsValue, | ||
T | outdoorsValue | ||
) |
Evaluates the RoomType, returning a value of type T.
roomType | |
indoorsValue | |
outdoorsValue |
Implemented in Eamon.Game.Plugin.Engine.
IArmor Eamon.Framework.Plugin.IEngine.GetArmor | ( | long | index | ) |
long Eamon.Framework.Plugin.IEngine.GetArmorFactor | ( | long | armorUid, |
long | shieldUid | ||
) |
double Eamon.Framework.Plugin.IEngine.GetArmorPriceOrValue | ( | Armor | armor, |
bool | calcPrice, | ||
ref bool | isMarcosArmor | ||
) |
string Eamon.Framework.Plugin.IEngine.GetArticle | ( | long | index | ) |
Gets the sentence article (e.g., "a", "some", "the", etc).
index |
Implemented in Eamon.Game.Plugin.Engine.
long Eamon.Framework.Plugin.IEngine.GetArtifactFieldStrength | ( | long | value | ) |
IArtifactType Eamon.Framework.Plugin.IEngine.GetArtifactType | ( | ArtifactType | artifactType | ) |
Gets the data for a given ArtifactType.
artifactType |
Implemented in Eamon.Game.Plugin.Engine.
IArtifactType Eamon.Framework.Plugin.IEngine.GetArtifactType | ( | long | index | ) |
Gets the data for a given ArtifactType.
index |
Implemented in Eamon.Game.Plugin.Engine.
long Eamon.Framework.Plugin.IEngine.GetCharismaFactor | ( | long | charisma | ) |
long Eamon.Framework.Plugin.IEngine.GetCharmMonsterPct | ( | long | charisma | ) |
string Eamon.Framework.Plugin.IEngine.GetClothingName | ( | Clothing | clothing | ) |
Gets the name for a given Clothing.
clothing |
Implemented in Eamon.Game.Plugin.Engine.
string Eamon.Framework.Plugin.IEngine.GetClothingName | ( | long | index | ) |
Gets the name for a given Clothing.
index |
Implemented in Eamon.Game.Plugin.Engine.
string Eamon.Framework.Plugin.IEngine.GetCombatCodeDesc | ( | CombatCode | combatCode | ) |
Gets the description for a given CombatCode.
combatCode |
Implemented in Eamon.Game.Plugin.Engine.
string Eamon.Framework.Plugin.IEngine.GetCombatCodeDesc | ( | long | index | ) |
Gets the description for a given CombatCode.
index |
Implemented in Eamon.Game.Plugin.Engine.
IConfig Eamon.Framework.Plugin.IEngine.GetConfig | ( | ) |
Implemented in Eamon.Game.Plugin.Engine.
string Eamon.Framework.Plugin.IEngine.GetContainerDisplayCodeDesc | ( | ContainerDisplayCode | containerDisplayCode | ) |
string Eamon.Framework.Plugin.IEngine.GetContainerDisplayCodeDesc | ( | long | index | ) |
ContainerType Eamon.Framework.Plugin.IEngine.GetContainerType | ( | ArtifactType | artifactType | ) |
RetCode Eamon.Framework.Plugin.IEngine.GetDbStackTop | ( | ref long | dbStackTop | ) |
IDirection Eamon.Framework.Plugin.IEngine.GetDirection | ( | Direction | direction | ) |
Gets the data for a given Direction.
direction |
Implemented in Eamon.Game.Plugin.Engine.
IDirection Eamon.Framework.Plugin.IEngine.GetDirection | ( | long | index | ) |
Gets the data for a given Direction.
index |
Implemented in Eamon.Game.Plugin.Engine.
Direction Eamon.Framework.Plugin.IEngine.GetDirection | ( | string | directionName | ) |
string Eamon.Framework.Plugin.IEngine.GetFieldDescName | ( | FieldDesc | fieldDesc | ) |
string Eamon.Framework.Plugin.IEngine.GetFieldDescName | ( | long | index | ) |
IGameState Eamon.Framework.Plugin.IEngine.GetGameState | ( | ) |
monster |
Implemented in Eamon.Game.Plugin.Engine, TheWayfarersInn.Game.Plugin.Engine, TheVileGrimoireOfJaldial.Game.Plugin.Engine, OrbOfMyLife.Game.Plugin.Engine, and Dharmaquest.Game.Plugin.Engine.
long Eamon.Framework.Plugin.IEngine.GetIntellectBonusPct | ( | long | intellect | ) |
string Eamon.Framework.Plugin.IEngine.GetLightLevelName | ( | LightLevel | lightLevel | ) |
Gets the name for a given LightLevel.
lightLevel |
Implemented in Eamon.Game.Plugin.Engine.
string Eamon.Framework.Plugin.IEngine.GetLightLevelName | ( | long | index | ) |
Gets the name for a given LightLevel.
index |
Implemented in Eamon.Game.Plugin.Engine.
long Eamon.Framework.Plugin.IEngine.GetMerchantAdjustedCharisma | ( | long | charisma | ) |
long Eamon.Framework.Plugin.IEngine.GetMerchantAskPrice | ( | double | price, |
double | rtio | ||
) |
long Eamon.Framework.Plugin.IEngine.GetMerchantBidPrice | ( | double | price, |
double | rtio | ||
) |
double Eamon.Framework.Plugin.IEngine.GetMerchantRtio | ( | long | charisma | ) |
IModule Eamon.Framework.Plugin.IEngine.GetModule | ( | ) |
long Eamon.Framework.Plugin.IEngine.GetMonsterFriendlinessPct | ( | Friendliness | friendliness | ) |
long Eamon.Framework.Plugin.IEngine.GetMonsterHealthStatusIndex | ( | long | hardiness, |
long | dmgTaken | ||
) |
T Eamon.Framework.Plugin.IEngine.GetNonRepeatingRandomElement01< T > | ( | IList< T > | sourceList, |
bool | shuffle = false , |
||
Action< IList< T >> | shuffleFunc = null |
||
) |
T Eamon.Framework.Plugin.IEngine.GetNonRepeatingRandomElement< T > | ( | IList< T > | sourceList, |
IList< T > | usedList, | ||
Action< IList< T >> | shuffleFunc = null |
||
) |
long Eamon.Framework.Plugin.IEngine.GetNumberFromString | ( | string | str | ) |
string Eamon.Framework.Plugin.IEngine.GetNumberString | ( | long | index | ) |
string Eamon.Framework.Plugin.IEngine.GetParryCodeDesc | ( | long | index | ) |
Gets the description for a given ParryCode.
index |
Implemented in Eamon.Game.Plugin.Engine.
string Eamon.Framework.Plugin.IEngine.GetParryCodeDesc | ( | ParryCode | parryCode | ) |
Gets the description for a given ParryCode.
parryCode |
Implemented in Eamon.Game.Plugin.Engine.
long Eamon.Framework.Plugin.IEngine.GetPluralTypeEffectUid | ( | PluralType | pluralType | ) |
string Eamon.Framework.Plugin.IEngine.GetPrefixedFileName | ( | string | fileName | ) |
IPrep Eamon.Framework.Plugin.IEngine.GetPrep | ( | long | index | ) |
Gets the sentence preposition (e.g., "to", "from", "inside", etc).
index |
Implemented in Eamon.Game.Plugin.Engine.
T Eamon.Framework.Plugin.IEngine.GetRandomElement< T > | ( | T[] | array, |
Func< long > | indexFunc = null |
||
) |
RetCode Eamon.Framework.Plugin.IEngine.GetRecordNameList | ( | IList< IGameBase > | recordList, |
IRecordNameListArgs | args, | ||
StringBuilder | buf | ||
) |
RetCode Eamon.Framework.Plugin.IEngine.GetRvStackTop | ( | ref long | rvStackTop | ) |
ISpell Eamon.Framework.Plugin.IEngine.GetSpell | ( | long | index | ) |
IStat Eamon.Framework.Plugin.IEngine.GetStat | ( | long | index | ) |
string Eamon.Framework.Plugin.IEngine.GetStatusName | ( | long | index | ) |
string Eamon.Framework.Plugin.IEngine.GetStatusName | ( | Status | status | ) |
Gets the name for a given Status.
status |
Implemented in Eamon.Game.Plugin.Engine.
string Eamon.Framework.Plugin.IEngine.GetStringFromNumber | ( | long | num, |
bool | addSpace, | ||
StringBuilder | buf | ||
) |
IWeapon Eamon.Framework.Plugin.IEngine.GetWeapon | ( | long | index | ) |
Gets the data for a given Weapon.
weapon |
Implemented in Eamon.Game.Plugin.Engine.
double Eamon.Framework.Plugin.IEngine.GetWeaponPriceOrValue | ( | IArtifact | weapon, |
bool | calcPrice, | ||
ref bool | isMarcosWeapon | ||
) |
double Eamon.Framework.Plugin.IEngine.GetWeaponPriceOrValue | ( | string | name, |
long | complexity, | ||
Weapon | type, | ||
long | dice, | ||
long | sides, | ||
long | numHands, | ||
bool | calcPrice, | ||
ref bool | isMarcosWeapon | ||
) |
name | |
complexity | |
type | |
dice | |
sides | |
numHands | |
calcPrice | |
isMarcosWeapon |
Implemented in Eamon.Game.Plugin.Engine.
long Eamon.Framework.Plugin.IEngine.GetWeightCarryableDos | ( | long | hardiness | ) |
long Eamon.Framework.Plugin.IEngine.GetWeightCarryableGronds | ( | long | hardiness | ) |
void Eamon.Framework.Plugin.IEngine.HandleException | ( | Exception | ex, |
string | stackTraceFile, | ||
string | errorMessage | ||
) |
ex | |
stackTraceFile | |
errorMessage |
Implemented in Eamon.Game.Plugin.Engine.
void Eamon.Framework.Plugin.IEngine.InitSystem | ( | ) |
bool Eamon.Framework.Plugin.IEngine.IsArtifactFieldStrength | ( | long | value | ) |
bool Eamon.Framework.Plugin.IEngine.IsChar0Or1 | ( | char | ch | ) |
Indicates whether a character is one of ['0', '1'].
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsChar0To2 | ( | char | ch | ) |
Indicates whether a character is one of ['0', '1', '2'].
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsChar0To3 | ( | char | ch | ) |
Indicates whether a character is one of ['0', '1', '2', '3'].
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsChar1To3 | ( | char | ch | ) |
Indicates whether a character is one of ['1', '2', '3'].
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsChar1To4 | ( | char | ch | ) |
Indicates whether a character is one of ['1', '2', '3', '4'].
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharAlnum | ( | char | ch | ) |
Indicates whether a character is alphabetic or numeric digit.
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharAlnumPeriodUnderscore | ( | char | ch | ) |
Indicates whether a character is alphabetic, numeric digit, period or underscore.
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharAlnumSpace | ( | char | ch | ) |
Indicates whether a character is alphabetic, numeric digit or space.
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharAlpha | ( | char | ch | ) |
Indicates whether a character is alphabetic.
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharAlphaSpace | ( | char | ch | ) |
Indicates whether a character is alphabetic or space.
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharAny | ( | char | ch | ) |
Indicates whether a character is any character at all.
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharAnyButBackForwardSlash | ( | char | ch | ) |
Indicates whether a character is any character but one of ['\', '/'].
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharAnyButDquoteCommaColon | ( | char | ch | ) |
Indicates whether a character is any character but one of ['"', ',', ':'].
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharDigit | ( | char | ch | ) |
Indicates whether a character is a numeric digit.
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharDigitOrX | ( | char | ch | ) |
Indicates whether a character is a numeric digit or 'X'.
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharGOrAOrN | ( | char | ch | ) |
Indicates whether a character is one of ['G', 'A', 'N'].
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharNOrSOrEOrW | ( | char | ch | ) |
Indicates whether a character is one of ['N', 'S', 'E', 'W'].
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharPlusMinusDigit | ( | char | ch | ) |
Indicates whether a character is a numeric digit or one of ['+', '-'].
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharPound | ( | char | ch | ) |
Indicates whether a character is '#'.
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharPrint | ( | char | ch | ) |
Indicates whether a character is printable.
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharQuote | ( | char | ch | ) |
Indicates whether a character is a quote.
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharSOrTOrROrX | ( | char | ch | ) |
Indicates whether a character is one of ['S', 'T', 'R', 'X'].
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsCharYOrN | ( | char | ch | ) |
Indicates whether a character is one of ['Y', 'N'].
ch |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsFailure | ( | RetCode | rc | ) |
Indicates whether an operation failed.
rc |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsRulesetVersion | ( | params long[] | versions | ) |
bool Eamon.Framework.Plugin.IEngine.IsSuccess | ( | RetCode | rc | ) |
Indicates whether an operation succeeded.
rc |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsUnmovable | ( | long | weight | ) |
bool Eamon.Framework.Plugin.IEngine.IsUnmovable01 | ( | long | weight | ) |
bool Eamon.Framework.Plugin.IEngine.IsValidArtifactArmor | ( | long | armor, |
bool | includeShields = true |
||
) |
Indicates whether an armor value is valid for a wearable Artifact.
armor | |
includeShields |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsValidArtifactType | ( | ArtifactType | artifactType | ) |
Indicates whether an artifact type is valid.
artifactType |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsValidDirection | ( | Direction | dir | ) |
bool Eamon.Framework.Plugin.IEngine.IsValidMonsterArmor | ( | long | armor | ) |
Indicates whether an armor value is valid for a Monster.
armor |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsValidMonsterCourage | ( | long | courage | ) |
Indicates whether a courage value is valid for a Monster.
courage |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsValidMonsterFriendliness | ( | Friendliness | friendliness | ) |
bool Eamon.Framework.Plugin.IEngine.IsValidMonsterFriendlinessPct | ( | Friendliness | friendliness | ) |
bool Eamon.Framework.Plugin.IEngine.IsValidPluralType | ( | PluralType | pluralType | ) |
Indicates whether a plural type is valid.
pluralType |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.IsValidRoomDirectionDoorUid01 | ( | long | roomUid | ) |
bool Eamon.Framework.Plugin.IEngine.IsValidRoomUid01 | ( | long | roomUid | ) |
string Eamon.Framework.Plugin.IEngine.LineWrap | ( | string | str, |
StringBuilder | buf, | ||
long | startColumn, | ||
bool | clearBuf = true |
||
) |
RetCode Eamon.Framework.Plugin.IEngine.LoadPluginClassMappings | ( | ) |
Loads the ClassMappingsDictionary with all interface to class mapping Key/Value pairs necessary to allow the currently loaded Eamon CS plugin to run.
The mechanism used to accomplish this is easy to understand but somewhat hard to describe without providing a concrete example and referring you to other source code files to inspect their contents. Let's take a look at the game Wrenhold's Secret Vigil. Please inspect the following files in the order listed (they are also executed in this order by Eamon CS - a simplified call stack):
All of these files contain LoadPluginClassMappings. In the top three files, it is an override that calls into the level below by invoking base.LoadPluginClassMappings. So it immediately drills down to the bottom of the stack (to the Eamon library).
Then things get interesting. The lowest level calls LoadPluginClassMappings01 which probes the current Assembly (the Eamon library) using Reflection, looking for classes adorned with the ClassMappings attribute. It then adds Key/Value pairs for all found classes (along with their matching interfaces) to the ClassMappingsDictionary. At this point, the call stack unwinds to the next higher level (EamonDD), and the overridden LoadPluginClassMappings method makes the same call to LoadPluginClassMappings01 which performs the same function, only this time it probes EamonDD for classes. This process repeats until the stack is fully unwound and the original call to LoadPluginClassMappings (in Program.cs) returns.
At each level, all newly discovered class/interface pairs are added immediately to the ClassMappingsDictionary; however, for any new class that maps to a pre-existing interface already in the Dictionary, that new class becomes the Value for that interface's Key/Value pair. In other words, classes in higher layers override classes in lower layers when they map to the same interface. This is how, for example, in Wrenhold's Secret Vigil, you wind up with EamonRT.Framework.Components.ICombatComponent mapping to WrenholdsSecretVigil.Game.Components.CombatComponent. And why a call made to CreateInstance returns the game-specific CombatComponent object.
Implemented in Eamon.Game.Plugin.Engine, EamonRT.Game.Plugin.Engine, EamonDD.Game.Plugin.Engine, EamonMH.Game.Plugin.Engine, TheWayfarersInn.Game.Plugin.Engine, TheVileGrimoireOfJaldial.Game.Plugin.Engine, OrbOfMyLife.Game.Plugin.Engine, TheSubAquanLaboratory.Game.Plugin.Engine, ThePyramidOfAnharos.Game.Plugin.Engine, ARuncibleCargo.Game.Plugin.Engine, TheTempleOfNgurct.Game.Plugin.Engine, AlternateBeginnersCave.Game.Plugin.Engine, WrenholdsSecretVigil.Game.Plugin.Engine, Dharmaquest.Game.Plugin.Engine, TheBeginnersCave.Game.Plugin.Engine, TheDeepCanyon.Game.Plugin.Engine, BeginnersForest.Game.Plugin.Engine, BeginnersCaveII.Game.Plugin.Engine, StrongholdOfKahrDur.Game.Plugin.Engine, LandOfTheMountainKing.Game.Plugin.Engine, TheTrainingGround.Game.Plugin.Engine, and SampleAdventure.Game.Plugin.Engine.
RetCode Eamon.Framework.Plugin.IEngine.LoadPluginClassMappings01 | ( | Assembly | plugin | ) |
Probes the currently executing library/plugin (Assembly) for all classes adorned with the ClassMappings attribute, pairs each class with its corresponding interface, and updates the ClassMappingsDictionary accordingly.
This is the third and final piece of the Eamon CS dependency injection puzzle. If you haven't done so, please review the remarks on ClassMappingsDictionary and LoadPluginClassMappings for necessary background information before reading these comments. This method is responsible for probing the passed in library/plugin (in C# terms, an Assembly) for classes adorned with the ClassMappings attribute. Then it iterates over each found class and obtains all ClassMappings attribute information for that class. (While in theory, each class can have multiple ClassMappings attributes applied to it, this is not currently done.) At this point, we know the class will be the Value part of a Key/Value pair, but we still don't know what interface to associate it with (the Key part). This is decided based on which ClassMappings constructor is called. If this constructor is used (e.g., [ClassMappings(typeof(Eamon.Framework.IGameState))]) then the passed in interface is used as the Key. Otherwise, for this constructor (e.g., [ClassMappings]), the name of the interface used as the Key will be synthesized by prepending "I" to the class name. So, for example, CombatComponent pairs with ICombatComponent. In this scenario, the class must always implement or inherit the interface; otherwise the system won't be able to find it. If the interface to be used as a Key can't be found, Eamon CS will issue an error and terminate the program. Assuming everything checks out, the class is then stored as the Value in the Dictionary with the interface as the Key. If the interface already existed in the Dictionary (having been inserted by a lower level of the system) then the old class associated with the interface is replaced with the new class. This allows lower-level interfaces to be associated with increasingly specialized higher-level classes, which is core to the functioning of Eamon CS.
plugin |
Implemented in Eamon.Game.Plugin.Engine.
char Eamon.Framework.Plugin.IEngine.ModifyCharToNull | ( | char | ch | ) |
char Eamon.Framework.Plugin.IEngine.ModifyCharToNullOrX | ( | char | ch | ) |
Given a character, produce either 'X' or '\0'.
ch |
Implemented in Eamon.Game.Plugin.Engine.
char Eamon.Framework.Plugin.IEngine.ModifyCharToUpper | ( | char | ch | ) |
Given a character, produce its upper case equivalent, if any.
ch |
Implemented in Eamon.Game.Plugin.Engine.
RetCode Eamon.Framework.Plugin.IEngine.PopDatabase | ( | bool | freeDatabase = true | ) |
RetCode Eamon.Framework.Plugin.IEngine.PopRulesetVersion | ( | ) |
Implemented in Eamon.Game.Plugin.Engine.
void Eamon.Framework.Plugin.IEngine.PrintEffectDesc | ( | IEffect | effect, |
bool | printFinalNewLine = true |
||
) |
effect | |
printFinalNewLine |
Implemented in Eamon.Game.Plugin.Engine.
void Eamon.Framework.Plugin.IEngine.PrintEffectDesc | ( | long | effectUid, |
bool | printFinalNewLine = true |
||
) |
effectUid | |
printFinalNewLine |
Implemented in Eamon.Game.Plugin.Engine.
void Eamon.Framework.Plugin.IEngine.PrintTitle | ( | string | title, |
bool | inBox | ||
) |
title | |
inBox |
Implemented in Eamon.Game.Plugin.Engine.
void Eamon.Framework.Plugin.IEngine.PrintZapDirectHit | ( | ) |
void Eamon.Framework.Plugin.IEngine.ProcessArgv | ( | string[] | args | ) |
args |
Implemented in Eamon.Game.Plugin.Engine.
RetCode Eamon.Framework.Plugin.IEngine.PushDatabase | ( | ) |
Implemented in Eamon.Game.Plugin.Engine.
RetCode Eamon.Framework.Plugin.IEngine.PushRulesetVersion | ( | long | rulesetVersion | ) |
void Eamon.Framework.Plugin.IEngine.ReplaceDatafileValues | ( | string | fileName, |
string[] | patterns, | ||
string[] | replacements | ||
) |
fileName | |
patterns | |
replacements |
Implemented in Eamon.Game.Plugin.Engine.
void Eamon.Framework.Plugin.IEngine.ResetProperties | ( | PropertyResetCode | resetCode | ) |
resetCode |
Implemented in Eamon.Game.Plugin.Engine, EamonRT.Game.Plugin.Engine, EamonDD.Game.Plugin.Engine, and EamonMH.Game.Plugin.Engine.
void Eamon.Framework.Plugin.IEngine.ResolvePortabilityClassMappings | ( | ) |
Implemented in Eamon.Game.Plugin.Engine.
RetCode Eamon.Framework.Plugin.IEngine.ResolveUidMacros | ( | string | str, |
StringBuilder | buf, | ||
bool | resolveFuncs, | ||
bool | recurse | ||
) |
RetCode Eamon.Framework.Plugin.IEngine.ResolveUidMacros | ( | string | str, |
StringBuilder | buf, | ||
bool | resolveFuncs, | ||
bool | recurse, | ||
ref long | invalidUid | ||
) |
RetCode Eamon.Framework.Plugin.IEngine.RestoreDatabase | ( | string | fileName | ) |
long Eamon.Framework.Plugin.IEngine.RollDice | ( | long | numDice, |
long | numSides, | ||
long | modifier | ||
) |
Rolls a number of dice, returning a sum of the results.
numDice | |
numSides | |
modifier |
Implemented in Eamon.Game.Plugin.Engine.
RetCode Eamon.Framework.Plugin.IEngine.RollDice | ( | long | numDice, |
long | numSides, | ||
ref long[] | dieRolls | ||
) |
Rolls a number of dice, storing the resulting values in an array.
numDice | |
numSides | |
dieRolls |
Implemented in Eamon.Game.Plugin.Engine.
RetCode Eamon.Framework.Plugin.IEngine.SaveDatabase | ( | string | fileName | ) |
bool Eamon.Framework.Plugin.IEngine.ShouldSleepAfterInput | ( | StringBuilder | buf, |
char | inputFillChar | ||
) |
buf | |
inputFillChar |
Implemented in Eamon.Game.Plugin.Engine, EamonRT.Game.Plugin.Engine, EamonDD.Game.Plugin.Engine, and EamonMH.Game.Plugin.Engine.
void Eamon.Framework.Plugin.IEngine.Shuffle< T > | ( | IList< T > | list | ) |
list |
Implemented in Eamon.Game.Plugin.Engine.
RetCode Eamon.Framework.Plugin.IEngine.SplitPath | ( | string | fullPath, |
ref string | directory, | ||
ref string | fileName, | ||
ref string | extension, | ||
bool | appendDirectorySeparatorChar = true |
||
) |
fullPath | |
directory | |
fileName | |
extension | |
appendDirectorySeparatorChar |
Implemented in Eamon.Game.Plugin.Engine.
RetCode Eamon.Framework.Plugin.IEngine.StatDisplay | ( | IStatDisplayArgs | args | ) |
args |
Implemented in Eamon.Game.Plugin.Engine, TheTempleOfNgurct.Game.Plugin.Engine, and AlternateBeginnersCave.Game.Plugin.Engine.
RetCode Eamon.Framework.Plugin.IEngine.StripPrepsAndArticles | ( | StringBuilder | buf, |
ref bool | mySeen | ||
) |
bool Eamon.Framework.Plugin.IEngine.StripUniqueCharsFromRecordNames | ( | IList< IGameBase > | recordList | ) |
RetCode Eamon.Framework.Plugin.IEngine.SumHighestRolls | ( | long[] | dieRolls, |
long | numRollsToSum, | ||
ref long | result | ||
) |
Given an array of die rolls, sum the highest of them and return the result.
dieRolls | |
numRollsToSum | |
result |
Implemented in Eamon.Game.Plugin.Engine.
bool Eamon.Framework.Plugin.IEngine.SwapGreaterArmorUidWithLesserShieldUid | ( | ICharacter | character | ) |
void Eamon.Framework.Plugin.IEngine.TruncatePluralTypeEffectDesc | ( | IEffect | effect | ) |
effect |
Implemented in Eamon.Game.Plugin.Engine.
void Eamon.Framework.Plugin.IEngine.TruncatePluralTypeEffectDesc | ( | PluralType | pluralType, |
long | maxSize | ||
) |
pluralType | |
maxSize |
Implemented in Eamon.Game.Plugin.Engine.
void Eamon.Framework.Plugin.IEngine.UnlinkOnFailure | ( | ) |
Deletes a set of game-related files from the filesystem.
Implemented in Eamon.Game.Plugin.Engine.
string Eamon.Framework.Plugin.IEngine.Upgrade300DatafileGetCharArtFileName | ( | string | characterFileName | ) |
IArtifact Eamon.Framework.Plugin.IEngine.Upgrade300DatafileGetCharArtifact | ( | ICharArtListData | charArtData, |
string | propertyName, | ||
XElement | element | ||
) |
IList<ICharArtListData> Eamon.Framework.Plugin.IEngine.Upgrade300DatafileParseCharacters | ( | string | xmlString | ) |
string Eamon.Framework.Plugin.IEngine.Upgrade300DatafileStripEquipment | ( | string | xmlString | ) |
void Eamon.Framework.Plugin.IEngine.UpgradeDatafile | ( | string | fileName | ) |
fileName |
Implemented in Eamon.Game.Plugin.Engine.
RetCode Eamon.Framework.Plugin.IEngine.ValidateRecordsAfterDatabaseLoaded | ( | ) |
Implemented in Eamon.Game.Plugin.Engine.
string Eamon.Framework.Plugin.IEngine.WordWrap | ( | string | str, |
StringBuilder | buf, | ||
bool | clearBuf = true |
||
) |
string Eamon.Framework.Plugin.IEngine.WordWrap | ( | string | str, |
StringBuilder | buf, | ||
long | margin, | ||
IWordWrapArgs | args, | ||
bool | clearBuf = true |
||
) |
|
get |
Gets the Adventures directory path on non-Android platforms, relative to the working directory.
|
get |
Gets the Adventures directory path on Android platforms, relative to the working directory.
|
get |
Gets the base price, in gold pieces, of having an armor training session with the giant.
|
getset |
Gets or sets an array of sentence articles (e.g., "a", "some", "the", etc).
|
get |
|
get |
Gets the base price, in gold pieces, of an axe sold by Marcos Cavielli.
|
get |
Gets the base price, in gold pieces, of the Blast spell sold by Hokas Tokas.
|
get |
Gets the base price, in gold pieces, of a bow sold by Marcos Cavielli.
|
getset |
|
get |
|
get |
|
get |
Gets the default size for large, discardable StringBuilders created during system processing.
|
get |
Gets the default size for small, discardable StringBuilders created during system processing.
|
get |
Gets the default size for tiny, discardable StringBuilders created during system processing.
|
get |
Gets the default size for medium, discardable StringBuilders created during system processing.
|
get |
Gets the base price, in gold pieces, of some chain mail armor sold by Marcos Cavielli.
|
getset |
|
getset |
Gets or sets the Dictionary that stores interface to class mappings as Key/Value pairs, used for dependency injection.
This is the heart of the customized dependency injection architecture used by Eamon CS. If you've ever wondered how the system seems to "know" which class needs to be instantiated to make any game work, it is all based on the contents of this Dictionary. When the system calls CreateInstance, this Dictionary is consulted and the concrete class corresponding to the provided interface is created. If you use the debugger to step through a game while its running, looking in this Dictionary at the Key/Value pairs is very enlightening. Another piece to this puzzle is how the Dictionary itself is loaded during program bootstrap, and this information will be provided in the comments for LoadPluginClassMappings and LoadPluginClassMappings01.
Side note: Research was done on dependency injection toolkits (like Ninject, etc.), but that avenue was avoided because it would have introduced unnecessary dependencies for the project. There don't seem to be any frameworks that fit what was done in Eamon CS, so this dependency injection architecture is outside typical patterns.
|
getset |
|
get |
|
get |
|
get |
|
get |
|
get |
|
getset |
|
get |
|
getset |
Gets or sets the platform-independent Directory manager that Eamon CS relies on for all directory-related operations.
|
getset |
Gets or sets a value indicating whether validation should be disabled when Records are loaded.
The various Helper subclasses perform Record validation to ensure the data being loaded is as expected, but there are times when this default behavior is undesirable. For example, when porting an adventure from a previous Eamon system, the Record data may need to be massaged to make it compatible with Eamon CS. Doing this requires validation to be temporarily disabled.
|
get |
Gets the Eamon CS Solution path and file name, relative to the working directory.
|
getset |
|
getset |
|
get |
Gets a value indicating whether "mutating properties" (those that are dynamically calculated) should be enabled.
Examples of mutating properties include Monster Courage and Artifact Location, but there are more scattered through the various games as well. You will note that both the getter and setter of a property can mutate if necessary. In general, you want this behavior enabled during gameplay so properties can respond to changes in game state, but never when the SharpSerializer is running during datafile serialization or deserialization because it can lead to corrupted values. This value should be checked in all mutating properties and if it is false
they should disable complex calculations and return a simple base value.
|
getset |
|
getset |
|
getset |
|
getset |
Gets or sets the text writer that prints error messages to the console window.
|
get |
|
get |
|
getset |
Gets or sets the platform-independent File manager that Eamon CS relies on for all file-related operations.
|
getset |
|
get |
Gets the base price, in gold pieces, of interacting with the village fountain statue.
|
get |
Gets the maximum length of a Fileset file name (e.g., PluginFileName, etc).
|
getset |
|
get |
Gets the Global Launch Parameters path and file name, relative to the working directory.
|
getset |
|
get |
Gets the base price, in gold pieces, of the Heal spell sold by Hokas Tokas.
|
getset |
|
getset |
Gets or sets the text reader that accepts user input from the console window.
|
get |
|
get |
Gets the base price, in gold pieces, of purchasing services from the practice area info booth.
|
get |
Gets the base price, in gold pieces, of some leather armor sold by Marcos Cavielli.
|
get |
|
getset |
|
getset |
|
getset |
|
get |
Gets the base price, in gold pieces, of a mace sold by Marcos Cavielli.
|
getset |
|
get |
Gets the maximum amount of gold the player character can carry or hold in the bank.
This maximum value applies separately to each.
|
get |
|
get |
Gets the maximum recursion level for macro replacement.
When resolving MacroFuncs macros, this value is a circuit breaker that ensures there is never an infinite loop.
|
get |
Gets the maximum allowed weapon Complexity.
For Artifacts with a Type of Weapon or MagicWeapon, this denotes the maximum value for Field1, also known as Odds.
|
get |
Gets the minimum amount of gold the player character can carry or hold in the bank.
This negative number actually represents the maximum amount of debt oweable by the player character.
|
get |
Gets the minimum allowed weapon Complexity.
For Artifacts with a Type of Weapon or MagicWeapon, this denotes the minimum value for Field1, also known as Odds.
|
get |
|
get |
|
getset |
|
getset |
Gets or sets a mutex (mutual exclusion lock) that ensures only one Eamon CS process runs in a given operating system at a time.
Eamon CS loads its datafiles into an in-memory database, requiring the use of a global system mutex to prevent datafile corruption. This mutex prevents multiple Eamon CS processes from running simultaneously, even if they are run from different repositories on the same computer.
|
get |
Gets the maximum number of Categories assignable to a single Artifact.
Each Artifact fits into one or more Categories defined by ArtifactType, which affects its behavior when manipulated by various Commands during the game.
|
get |
|
get |
Gets the maximum number of Artifacts allowed in a Character's inventory.
|
get |
Gets the maximum number of weapon Artifacts allowed in a Character's inventory.
|
get |
Gets the maximum number of Records allowed in a database table.
|
get |
|
getset |
Gets or sets the text writer that prints text to the console window.
|
getset |
Gets or sets the platform-independent file system Path manager that Eamon CS relies on for all file system path-related operations.
|
get |
Gets the base price, in gold pieces, of some plate mail armor sold by Marcos Cavielli.
|
get |
Gets the base price, in gold pieces, of the Power spell sold by Hokas Tokas.
|
getset |
Gets or sets an array of sentence prepositions (e.g., "to", "from", "inside", etc).
|
get |
Gets the name of the Mutex used to synchronize Eamon CS processes.
Due to the use of an in-memory database, only one Eamon CS process is allowed to run at a time. The ProgVersion is embedded in the name.
|
get |
|
get |
|
get |
|
get |
Gets the QuickLaunch directory path, relative to the working directory.
|
get |
Gets the base price, in gold pieces, of being recalled from an adventure by a local wizard, as noted by the Burly Irishman at the Front Desk.
|
get |
Gets the format string used to produce error messages during Record interdependency checking.
The Eamon CS Dungeon Designer plugin (EamonDD) uses this format string to produce error messages when analysing Record interdependencies. A variety of potential error conditions can be caught during this process.
|
get |
|
get |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
get |
|
get |
Gets a value indicating which Eamon ruleset applies to the current game.
Earlier rulesets of Eamon gave a different "vibe" to the gameplay experience, so a means to support them was introduced. Currently supported rulesets include 5 for DDD5, 62 for DDD6.2, and 0 for Eamon Deluxe. The Temple of Ngurct is the only game using DDD5 at the time of this writing. Recent enhancements allow a game to change rulesets dynamically at runtime.
|
getset |
|
getset |
|
get |
Gets the base price, in gold pieces, of a shield sold by Marcos Cavielli.
|
get |
Gets the base price, in gold pieces, of a spear sold by Marcos Cavielli.
|
get |
Gets the base price, in gold pieces, of the Speed spell sold by Hokas Tokas.
|
get |
Gets the base price, in gold pieces, of having a spell training session with the licensed wizard.
|
get |
Gets the relative path and name of the error file dumped when an unexpected system shutdown occurs.
If an unexpected and unrecoverable error occurs, Eamon CS will abort execution and dump a series of error messages to a stack trace file located in the current working directory (typically System\Bin or an Adventure folder). This usually happens for uncaught exceptions, or record validation errors. Looking in the file can be helpful to overcome the issue. But in the case of a game engine bug, if possible, please contact TheRe and provide this file along with a description of your actions. It can greatly aid in the debugging process. alEa monCS @hot mail. com
|
get |
Gets the base price, in gold pieces, of having a Stat boosted by the Good Witch.
|
get |
Gets the base price, in gold pieces, of a sword sold by Marcos Cavielli.
|
getset |
Gets or sets the platform-independent Thread manager that Eamon CS relies on for all thread-related operations.
|
get |
|
getset |
|
getset |
Gets or sets a generic string representing an unknown name (e.g., "???").
|
get |
|
get |
Gets the base price, in gold pieces, of having a weapon training session with Don Diego.
|
get |
|
get |
|
getset |