📄 dndutil.h
字号:
* skill (int) - one of the sk-- constants. * * OUTPUT: * int - one of the skt--- constants that indicates the the skill type * of the given skill for the given class * ---------------------------------------------------------------------- */int dndGetSkillType( int classType, int skill );/* ---------------------------------------------------------------------- * * dndGetSkillBonusForClass( int classType ) * * INPUT: * classType (int) - one of the pc---, npc---, or prc--- constants. * * OUTPUT: * int - the skill bonus for a given class. * ---------------------------------------------------------------------- */int dndGetSkillBonusForClass( int classType );/* ---------------------------------------------------------------------- * * dndGetAbilityName( int ability ) * * INPUT: * ability (int) - one of the ab-- constants. * * OUTPUT: * char* - a static buffer containing the text that describes the given * ability, or NULL if an unknown ability was specified. * ---------------------------------------------------------------------- */char* dndGetAbilityName( int ability );/* ---------------------------------------------------------------------- * * dndGetAbilityBonus( int abilityScore ) * * INPUT: * abilityScore (int) - the ability score to calculate the bonus for * * OUTPUT: * int - the ability bonus * ---------------------------------------------------------------------- */int dndGetAbilityBonus( int abilityScore );/* ---------------------------------------------------------------------- * * dndGetRaceName( int id ) * * INPUT: * id (int) - one of the rc-- constants. * * OUTPUT: * char* - a static buffer containing the text that describes the given * race, or NULL if an unknown race was specified. * ---------------------------------------------------------------------- */char* dndGetRaceName( int id );/* ---------------------------------------------------------------------- * * dndGetRaceSize( int id ) * * INPUT: * id (int) - one of the rc-- constants. * * OUTPUT: * int - one of the sz--- constants. * ---------------------------------------------------------------------- */int dndGetRaceSize( int id );/* ---------------------------------------------------------------------- * * dndGetRaceSpeed( int id ) * * INPUT: * id (int) - one of the rc-- constants. * * OUTPUT: * int - the base speed of the given race. * ---------------------------------------------------------------------- */int dndGetRaceSpeed( int id );/* ---------------------------------------------------------------------- * * dndGetRaceCR( int id ) * * INPUT: * id (int) - one of the rc-- constants. * * OUTPUT: * int - the challenge rating (CR) for an average specimen of the given * race. A CR of 1 here actually represents a CR of 1 or less. * ---------------------------------------------------------------------- */int dndGetRaceCR( int id );/* ---------------------------------------------------------------------- * * dndGetRaceBonus( int id, int gender, int type, int data ) * * INPUT: * id (int) - one of the rc-- constants. * gender (int) - on of the g--- constants. * type (int) - one of the rbt-- constants. * data (int) - data corresponding to the 'type' field. * * OUTPUT: * int - the bonus associated with the given type for the given race. * ---------------------------------------------------------------------- */int dndGetRaceBonus( int id, int gender, int type, int data );/* ---------------------------------------------------------------------- * * dndGetFeatName( int id ) * * INPUT: * id (int) - one of the ft-- constants. * * OUTPUT: * char* - a static buffer containing the text that describes the given * feat, or NULL if an unknown feat was specified. * ---------------------------------------------------------------------- */char* dndGetFeatName( int id );/* ---------------------------------------------------------------------- * * dndFeatIsReusable( int id ) * * INPUT: * id (int) - one of the ft-- constants. * * OUTPUT: * boolean - 1 (true) or 0 (false), indicating whether or not the given * feat may be taken more than once. * ---------------------------------------------------------------------- */int dndFeatIsReusable( int id );/* ---------------------------------------------------------------------- * * dndGetFeatPrerequisite( int id, int* type, int *data1, int *data2, char** next ) * * INPUT: * id (int) - one of the ft-- constants. * type (int*) - will contain the type of the prerequisite * data1 (int*) - will contain data regarding the prerequisite * data2 (int*) - will contain data regarding the prerequisite * next (char**) - a place holder * * OUTPUT: * boolean - 1 (true) or 0 (false), indicating whether or not the data * returned is valid. If not, then the end of the prerequisite * list has been reached. * * The first time dndGetFeatPrerequisite is called, 'id' must indicate a * valid feat identifier. On subsequent calls, id must be 0 and 'next' will * be used to maintain positional information. * ---------------------------------------------------------------------- */int dndGetFeatPrerequisite( int id, int* type, int* data1, int* data2, char** next );/* ---------------------------------------------------------------------- * * dndGetWeaponName( int id ) * * INPUT: * id (int) - one of the wp-- constants. * * OUTPUT: * char* - a static buffer containing the name of the indicated weapon, * or NULL if the weapon is not known. * ---------------------------------------------------------------------- */char* dndGetWeaponName( int id );/* ---------------------------------------------------------------------- * * dndGetWeaponSize( int id ) * * INPUT: * id (int) - one of the wp-- constants. * * OUTPUT: * int - one of the sz--- constants, or 0 if the weapon is not known. * ---------------------------------------------------------------------- */int dndGetWeaponSize( int id );/* ---------------------------------------------------------------------- * * dndGetWeaponType( int id ) * * INPUT: * id (int) - one of the wp-- constants. * * OUTPUT: * int - one or more of the wt--- constants OR'd together, or 0 if the * weapon is not known. * ---------------------------------------------------------------------- */int dndGetWeaponType( int id );/* ---------------------------------------------------------------------- * * dndGetWeaponCost( int id ) * * INPUT: * id (int) - one of the wp-- constants. * * OUTPUT: * int - the cost of the weapon in copper pieces (gp x 100). * ---------------------------------------------------------------------- */int dndGetWeaponCost( int id );/* ---------------------------------------------------------------------- * * dndGetSchoolOfMagicName( int id ) * * INPUT: * id (int) - one of the ss-- constants. * * OUTPUT: * char* - a static buffer containing the name of the given school of * magic. * ---------------------------------------------------------------------- */char* dndGetSchoolOfMagicName( int id );/* ---------------------------------------------------------------------- * * dndGetSizeName( int id ) * * INPUT: * id (int) - one of the sz-- constants. * * OUTPUT: * char* - a static buffer containing the name of the given size, or * NULL if the size was not found. * ---------------------------------------------------------------------- */char* dndGetSizeName( int id );/* ---------------------------------------------------------------------- * * dndGetSizeACMod( int id ) * * INPUT: * id (int) - one of the sz-- constants. * * OUTPUT: * int - the armor class modifier for the given size. * ---------------------------------------------------------------------- */int dndGetSizeACMod( int id );/* ---------------------------------------------------------------------- * * dndGetSizeHideMod( int id ) * * INPUT: * id (int) - one of the sz-- constants. * * OUTPUT: * int - the hide skill modifier for the given size. * ---------------------------------------------------------------------- */int dndGetSizeHideMod( int id );/* ---------------------------------------------------------------------- * * dndGetSpellName( int id ) * * INPUT: * id (int) - one of the sp-- constants. * * OUTPUT: * char* - a static buffer containing the name of the spell, or NULL if * the spell is not known. * ---------------------------------------------------------------------- */char* dndGetSpellName( int id );/* ---------------------------------------------------------------------- * * dndGetSpellSchool( int id ) * * INPUT: * id (int) - one of the sp-- constants. * * OUTPUT: * int - one of ss--- constants. * ---------------------------------------------------------------------- */int dndGetSpellSchool( int id );/* ---------------------------------------------------------------------- * * dndGetSpellLevel( int classid, int spellid ) * * INPUT: * classid (int) - one of the pc--, npc--, or prc-- constants. * spellid (int) - one of the sp-- constants. * * OUTPUT: * int - the level that the spell is for the given class, or -1 if the * spell is unusuable by that class. * ---------------------------------------------------------------------- */int dndGetSpellLevel( int classid, int spellid );/* ---------------------------------------------------------------------- * * dndGetSpellOfLevel( int classid, int level, char** next ) * * INPUT: * classid (int) - one of the pc--, npc--, or prc-- constants. * level (int) - the level of the spell desired * next (char**) - a placeholder * * OUTPUT: * int - one of the sp--- constants, or 0 (see below). * * If classid is not zero, the first spell of the given level for the given * class (if any) is returned. If classid is NOT zero, another spell for * the given level is returned for each invocation. When there are no * more spells for the given level (or if there were none to begin with) * 0 is returned. * ---------------------------------------------------------------------- */int dndGetSpellOfLevel( int classid, int level, char** next );/* ---------------------------------------------------------------------- * * dndGetSpellsPerDay( int classid, int classLevel, int spellLevel ) * * INPUT: * classid (int) - one of the pc--, npc--, or prc-- constants. * classLevel (int) - from 1 to 20, inclusive * spellLevel (int) - from 0 to 9, inclusive * * OUTPUT: * int - the number of spells usable by that class per day, or 0 if * they need an ability bonus to be able to cast any spells of * that level, or -1 if they cannot cast any spells of that level. * ---------------------------------------------------------------------- */int dndGetSpellsPerDay( int classid, int classLevel, int spellLevel );/* ---------------------------------------------------------------------- * * dndGetSpellsKnown( int classid, int classLevel, int spellLevel ) * * INPUT: * classid (int) - one of the pc--, npc--, or prc-- constants. * classLevel (int) - from 1 to 20, inclusive * spellLevel (int) - from 0 to 9, inclusive *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -