Classic Blades of Exile :
- Various aesthetics fixes (no more buttons cut in half, justified some buttons, etc) - Clicking the help icon next to the (unused) job button now correctly displays help. - Redid the implementation of the (new) "check statistic node" (replaces "has enough mage lore") to prevent potential compatibility breaking with legacy scenarios. - Small change to the (new) "Set town status" (replaces "Make Town Hostile") for the same reason. - To clarify, renamed the "Dispel spirit" item ability to "Ravage spirit" (as it is, in fact, the spell called by the ability). - For the same reason, renamed the monster spell "Heal All" to "Full Heal", as it isn't a mass spell but a powerful (and reliable) self-healing spell for monsters. - Aligned the sleep immunity on the mac version : Slimes (regardless of the monster number), Stone and Undead types monsters are immuned to sleep. - Dart throwing now only takes 2 ap for monsters (corrected from invisibility ability). - Field generating monsters are now immuned to the type of field they generate (corrected from an Exile 3 incomplete transition). - Rewrote the pending special queue for better events handling (no more potential overflow, entering/exiting town events are now sure to happens) - Implemented the "No Terrain Animation" option. - Un/Equipping something while in combat now correctly updates the ap display. - MOnsters missile abilities now show their correct damage range in description (game and editor). - Bashing weapons charges (if any) are now correctly shown (as usual, next to the name). Codewise : - The game shouldn't check if the item to be equipped is food anymore. - Replaced lots of number checks by "human-readable" constants (some new). - Removed some false checks about awaken spell supposed to work as dispel field. - Fleeing and winning an outdoor battle now call the run_special function with the correct parameter (was reversed, with no consequences, since it's never checked) - AI doesn't check the monster number, when deciding if the monster should cast a mage spell, anymore. Chokboyz git-svn-id: http://openexile.googlecode.com/svn/trunk@159 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
@@ -22,44 +22,68 @@
|
||||
#define SDF_PARTY_SPLIT_WHERE_PARTY_X 304][1
|
||||
#define SDF_PARTY_SPLIT_WHERE_PARTY_Y 304][2
|
||||
#define SDF_PARTY_SPLIT_PC 304][3
|
||||
#define SDF_PARTY_SPLIT_TOWN 304][4 // for future use, hopefully
|
||||
#define SDF_SKIP_STARTUP 305][4
|
||||
#define SDF_PARTY_SPLIT_TOWN 304][4 //for future use, hopefully
|
||||
#define SDF_STEALTH 305][0
|
||||
#define SDF_FLYING 305][1
|
||||
#define SDF_DETECT_MONSTER 305][2
|
||||
#define SDF_LAVAWALK 305][3
|
||||
//#define SDF_SKIP_STARTUP 305][4 //is now a boolean : play_startup
|
||||
#define SDF_LESS_SOUND 305][5
|
||||
#define SDF_NO_TARGET_LINE 305][6
|
||||
#define SDF_NO_TARGET_LINE 305][6
|
||||
#define SDF_FASTER_BOOM_SPACES 305][7 //new (Classic Blades of Exile) option
|
||||
#define SDF_MONSTERS_ALERTNESS 305][9 //is 0 if monsters are placid (not detected), 30 if an active monster is seeking the party (detected), reduced by one (until 0) each turn when no such monster exists
|
||||
#define SFD_NO_MAPS 306][0
|
||||
#define SDF_NO_SOUNDS 306][1
|
||||
#define SDF_NO_FRILLS 306][2
|
||||
#define SDF_ROOM_DESCS_AGAIN 306][3
|
||||
#define SDF_NO_INSTANT_HELP 306][4 // boolean
|
||||
#define SDF_ROOM_DESCS_AGAIN 306][3 //not used in the code
|
||||
#define SDF_NO_INSTANT_HELP 306][4 //boolean
|
||||
#define SDF_NO_SHORE_FRILLS 306][5
|
||||
#define SDF_GAME_SPEED 306][6
|
||||
#define SDF_EASY_MODE 306][7
|
||||
#define SDF_LESS_WANDER_ENC 306][8
|
||||
#define SDF_NO_TER_ANIM 306][9
|
||||
#define SDF_NO_TER_ANIM 306][9
|
||||
#define SDF_USE_DARKER_GRAPHICS 307][0 //new (Classic Blades of Exile) option (use Mac graphics)
|
||||
#define SDF_ASK_ABOUT_TEXT_BOX 307][1 //new (Classic Blades of Exile) option (display an "Ask About" text box in talk mode)
|
||||
#define SDF_HIDDEN_MAP 308][0
|
||||
#define SDF_LEGACY_SCENARIO 305][8 //0 is new scenario, 1 is legacy
|
||||
#define SDF_LEGACY_SCENARIO 305][8 //0 is new scenario, 1 is legacy
|
||||
|
||||
#define SDF_COMPATIBILITY_LEGACY_DAY_REACHED 309][0
|
||||
#define SDF_COMPATIBILITY_LEGACY_KILL_NODE 309][1
|
||||
#define SDF_COMPATIBILITY_WORKING_TOWN_WATERFALL 309][2
|
||||
#define SDF_COMPATIBILITY_FULL_TRIMS 309][3
|
||||
#define SDF_COMPATIBILITY_SPECIALS_INTERRUPT_REST 309][4
|
||||
#define SDF_COMPATIBILITY_ANYTIME_STAIRWAY_NODES 309][5
|
||||
#define SDF_COMPATIBILITY_CHECK_TIMERS_WHILE_RESTING 309][6
|
||||
|
||||
#define INVALID_TOWN 200
|
||||
#define INVALID_TOWN 200
|
||||
|
||||
typedef unsigned short m_num_t;
|
||||
typedef unsigned short ter_num_t;
|
||||
typedef signed short spec_num_t;
|
||||
typedef signed short item_num_t;
|
||||
typedef unsigned short str_num_t;
|
||||
|
||||
/* Monsters Attitudes :
|
||||
0 - Friendly, Docile
|
||||
1 - Hostile, Type A
|
||||
2 - Friendly, Will fight
|
||||
3 - Hostile, Type B
|
||||
*/
|
||||
|
||||
/* overall mode; some seem to be missing */
|
||||
/* overall mode; some seem to be missing */ //<=seems complete now
|
||||
enum eMode {
|
||||
MODE_OUTDOORS = 0,
|
||||
MODE_TOWN = 1,
|
||||
MODE_TALK_TOWN = 2, // looking for someone to talk
|
||||
MODE_TOWN_TARGET = 3, // spell target, that is
|
||||
MODE_USE = 4,
|
||||
MODE_USE = 4,
|
||||
MODE_TOWN_DROPPING = 5,//dropping while in town mode
|
||||
MODE_COMBAT = 10,
|
||||
MODE_SPELL_TARGET = 11,
|
||||
MODE_FIRING = 12, // firing from bow or crossbow
|
||||
MODE_THROWING = 13, // throwing missile
|
||||
MODE_FANCY_TARGET = 14, // spell target, that is
|
||||
MODE_DROPPING = 15,
|
||||
MODE_DROPPING = 15,//dropping while in combat mode
|
||||
MODE_TALKING = 20,
|
||||
MODE_SHOPPING = 21,
|
||||
MODE_LOOK_OUTDOORS = 35, // looking at something
|
||||
@@ -107,7 +131,7 @@ enum eMainStatus {
|
||||
MAIN_STATUS_SPLIT_WON = MAIN_STATUS_SPLIT + MAIN_STATUS_WON,
|
||||
};
|
||||
|
||||
/* adven[i].race */ //complete
|
||||
/* adven[i].race */ //future races !!! only first 3 (zero, one and two) are legacy !
|
||||
enum eRace {
|
||||
RACE_UNKNOWN = -1, // for parameters to some functions; not valid in the class
|
||||
RACE_HUMAN = 0,
|
||||
@@ -193,7 +217,7 @@ enum eTrait {
|
||||
TRAIT_PACIFIST = 15,
|
||||
};
|
||||
|
||||
/* Monster Type */
|
||||
/* Monster Type a.k.a m_type */
|
||||
enum eMonsterType {
|
||||
MONSTER_TYPE_UNKNOWN = -1, // for parameters to some functions; not valid in the class
|
||||
MONSTER_TYPE_HUMAN = 0,
|
||||
@@ -217,7 +241,7 @@ enum eMonsterType {
|
||||
//future spec_skill !!!
|
||||
/* Special Ability a.k.a spec_skill */
|
||||
|
||||
enum eMonstAbil {
|
||||
/*enum eMonstAbil {
|
||||
MONST_NO_ABIL = 0,
|
||||
// Missile abilities (extra1 = number of sided dice; extra2 = number of sides)
|
||||
MONST_THROWS_DARTS = 10,
|
||||
@@ -263,13 +287,13 @@ enum eMonstAbil {
|
||||
MONST_RADIATE,
|
||||
MONST_CALL_LOCAL_SPECIAL,
|
||||
MONST_CALL_GLOBAL_SPECIAL,
|
||||
};
|
||||
};*/
|
||||
|
||||
//at least for proper code comprehension
|
||||
//legacy spec_skill
|
||||
/* Special Ability a.k.a spec_skill */
|
||||
|
||||
/* #define MONSTER_NO_SPECIAL_ABILITY 0
|
||||
#define MONSTER_NO_SPECIAL_ABILITY 0
|
||||
#define MONSTER_THROWS_DARTS 1
|
||||
#define MONSTER_SHOOTS_ARROWS 2
|
||||
#define MONSTER_THROWS_SPEARS 3
|
||||
@@ -299,61 +323,78 @@ enum eMonstAbil {
|
||||
#define MONSTER_WEB_TOUCH 27
|
||||
#define MONSTER_SLEEP_TOUCH 28
|
||||
#define MONSTER_PARALYSIS_TOUCH 29
|
||||
#define MONSTER_PETRIFICATION_TOUCH 30
|
||||
#define MONSTER_PETRIFYING_TOUCH 30
|
||||
#define MONSTER_ACID_TOUCH 31
|
||||
#define MONSTER_BREATHES_SLEEP_CLOUDS 32
|
||||
#define MONSTER_ACID_SPIT 33
|
||||
#define MONSTER_SHOOTS_SPINES 34
|
||||
#define MONSTER_DEATH_TOUCH 35
|
||||
#define MONSTER_INVULNERABILITY 36
|
||||
#define MONSTER_GUARD 37 */
|
||||
#define MONSTER_GUARD 37
|
||||
|
||||
/* Create Monsters/Fields */
|
||||
/* Create Monsters/Fields */
|
||||
//a.k.a radiate_1
|
||||
//radiate_2 is the second field (monster to summon, probability to happens, etc)
|
||||
|
||||
/* #define MONSTER_NO_RADIATE 0
|
||||
#define MONSTER_NO_RADIATE 0
|
||||
#define MONSTER_RADIATE_FIRE_FIELDS 1
|
||||
#define MONSTER_RADIATE_ICE_FIELDS 2
|
||||
#define MONSTER_RADIATE_SHOCK_FIELDS 3
|
||||
#define MONSTER_RADIATE_ANTIMAGIC_FIELDS 4
|
||||
#define MONSTER_RADIATE_SLEEP_FIELDS 5
|
||||
#define MONSTER_RADIATE_STINKING_CLOUDS 6
|
||||
//as said 7,8 and 9 are unused
|
||||
// 7,8 and 9 are unused
|
||||
#define MONSTER_SUMMON1 10 //5 percent chance
|
||||
#define MONSTER_SUMMON2 11 //20 percent chance
|
||||
#define MONSTER_SUMMON3 12 //50 percent chance
|
||||
//as said 13 and 14 are unused
|
||||
// 13 and 14 are unused
|
||||
#define MONSTER_DEATH_TRIGGERS 15 //death triggers global special
|
||||
*/
|
||||
|
||||
|
||||
/* Attack Types */
|
||||
|
||||
enum eMonsterAttackTypes{
|
||||
MONSTER_ATTACK_SWINGS = 0,
|
||||
MONSTER_ATTACK_CLAWS = 1,
|
||||
MONSTER_ATTACK_BITES = 2,
|
||||
MONSTER_ATTACK_SLIMES = 3,
|
||||
MONSTER_ATTACK_PUNCHES = 4,
|
||||
MONSTER_ATTACK_STINGS = 5,
|
||||
MONSTER_ATTACK_CLUBS = 6,
|
||||
MONSTER_ATTACK_BURNS = 7,
|
||||
MONSTER_ATTACK_HARMS = 8,
|
||||
MONSTER_ATTACK_STABS = 9,
|
||||
};
|
||||
|
||||
/* Terrains Special Properties : scenario.ter_types[i].special */ //complete
|
||||
|
||||
enum eTerSpec {
|
||||
// TER_SPEC_NONE = 0,
|
||||
// TER_SPEC_CHANGE_WHEN_STEP_ON = 1,
|
||||
// TER_SPEC_DOES_FIRE_DAMAGE = 2,
|
||||
// TER_SPEC_DOES_COLD_DAMAGE = 3,
|
||||
// TER_SPEC_DOES_MAGIC_DAMAGE = 4,
|
||||
// TER_SPEC_POISON_LAND = 5,
|
||||
// TER_SPEC_DISEASED_LAND = 6,
|
||||
// TER_SPEC_CRUMBLING_TERRAIN = 7,
|
||||
// TER_SPEC_LOCKABLE_TERRAIN = 8,
|
||||
// TER_SPEC_UNLOCKABLE_TERRAIN = 9,
|
||||
// TER_SPEC_UNLOCKABLE_BASHABLE = 10,
|
||||
// TER_SPEC_IS_A_SIGN = 11,
|
||||
// TER_SPEC_CALL_LOCAL_SPECIAL = 12,
|
||||
// TER_SPEC_CALL_SCENARIO_SPECIAL = 13,
|
||||
// TER_SPEC_IS_A_CONTAINER = 14,
|
||||
// TER_SPEC_WATERFALL = 15,
|
||||
// TER_SPEC_CONVEYOR_NORTH = 16,
|
||||
// TER_SPEC_CONVEYOR_EAST = 17,
|
||||
// TER_SPEC_CONVEYOR_SOUTH = 18,
|
||||
// TER_SPEC_CONVEYOR_WEST = 19,
|
||||
// TER_SPEC_BLOCKED_TO_MONSTERS = 20,
|
||||
// TER_SPEC_TOWN_ENTRANCE = 21,
|
||||
// TER_SPEC_CHANGE_WHEN_USED = 22,
|
||||
// TER_SPEC_CALL_SPECIAL_WHEN_USED = 23,
|
||||
TER_SPEC_NONE = 0,
|
||||
TER_SPEC_NONE = 0,
|
||||
TER_SPEC_CHANGE_WHEN_STEP_ON = 1,
|
||||
TER_SPEC_DOES_FIRE_DAMAGE = 2,
|
||||
TER_SPEC_DOES_COLD_DAMAGE = 3,
|
||||
TER_SPEC_DOES_MAGIC_DAMAGE = 4,
|
||||
TER_SPEC_POISON_LAND = 5,
|
||||
TER_SPEC_DISEASED_LAND = 6,
|
||||
TER_SPEC_CRUMBLING_TERRAIN = 7,
|
||||
TER_SPEC_LOCKABLE_TERRAIN = 8,
|
||||
TER_SPEC_UNLOCKABLE_TERRAIN = 9,
|
||||
TER_SPEC_UNLOCKABLE_BASHABLE = 10,
|
||||
TER_SPEC_IS_A_SIGN = 11,
|
||||
TER_SPEC_CALL_LOCAL_SPECIAL = 12,
|
||||
TER_SPEC_CALL_SCENARIO_SPECIAL = 13,
|
||||
TER_SPEC_IS_A_CONTAINER = 14,
|
||||
TER_SPEC_WATERFALL = 15,
|
||||
TER_SPEC_CONVEYOR_NORTH = 16,
|
||||
TER_SPEC_CONVEYOR_EAST = 17,
|
||||
TER_SPEC_CONVEYOR_SOUTH = 18,
|
||||
TER_SPEC_CONVEYOR_WEST = 19,
|
||||
TER_SPEC_BLOCKED_TO_MONSTERS = 20,
|
||||
TER_SPEC_TOWN_ENTRANCE = 21,
|
||||
TER_SPEC_CHANGE_WHEN_USED = 22,
|
||||
TER_SPEC_CALL_SPECIAL_WHEN_USED = 23,
|
||||
|
||||
//future specs
|
||||
/*TER_SPEC_NONE = 0,
|
||||
TER_SPEC_CHANGE_WHEN_STEP_ON = 1,
|
||||
TER_SPEC_DAMAGING = 2,
|
||||
TER_SPEC_BRIDGE = 3, // new
|
||||
@@ -400,10 +441,10 @@ enum eTerSpec {
|
||||
// 21. Town entrance (Terrain type if hidden, Unused, Unused)
|
||||
// 22. Change when Used (Terrain to change to when used, Number of sound, Unused)
|
||||
// 23. Call special when used (Special to call, local or scenario?, Unused)
|
||||
// 24. Bridge - if the party boats over it, they get the option to land. (Unused, Unused, Unused)
|
||||
// 24. Bridge - if the party boats over it, they get the option to land. (Unused, Unused, Unused)*/
|
||||
};
|
||||
|
||||
enum eTrimType {
|
||||
enum eTrimType {//hopefully used in the future
|
||||
TRIM_NONE = 0,
|
||||
TRIM_WALL = 1, // not a trim, but trims will conform to it as if it's the same ground type (eg stone wall)
|
||||
TRIM_S, TRIM_SE, TRIM_E, TRIM_NE, TRIM_N, TRIM_NW, TRIM_W, TRIM_SW,
|
||||
@@ -537,7 +578,8 @@ enum eItemAbil {
|
||||
ITEM_STEALTH = 91,
|
||||
ITEM_FIREWALK = 92,
|
||||
ITEM_FLYING = 93,
|
||||
ITEM_MAJOR_HEALING = 94,
|
||||
ITEM_MAJOR_HEALING = 94,
|
||||
ITEM_CALL_SPECIAL = 95, //new (Classic Blades of Exile) item property
|
||||
// Spell Usable
|
||||
ITEM_SPELL_FLAME = 110,
|
||||
ITEM_SPELL_FIREBALL = 111,
|
||||
@@ -547,7 +589,7 @@ enum eItemAbil {
|
||||
ITEM_SPELL_SLOW = 115,
|
||||
ITEM_SPELL_SHOCKWAVE = 116,
|
||||
ITEM_SPELL_DISPEL_UNDEAD = 117,
|
||||
ITEM_SPELL_DISPEL_SPIRIT = 118,
|
||||
ITEM_SPELL_RAVAGE_SPIRIT = 118,
|
||||
ITEM_SPELL_SUMMONING = 119,
|
||||
ITEM_SPELL_MASS_SUMMONING = 120,
|
||||
ITEM_SPELL_ACID_SPRAY = 121,
|
||||
@@ -662,6 +704,7 @@ enum eSpecContext {
|
||||
};
|
||||
|
||||
enum eSpecNodeType {
|
||||
SPEC_ERROR = -1,
|
||||
SPEC_NULL = 0,
|
||||
SPEC_SET_SDF = 1,
|
||||
SPEC_INC_SDF = 2,
|
||||
@@ -689,7 +732,8 @@ enum eSpecNodeType {
|
||||
SPEC_SANCTIFY = 24,
|
||||
SPEC_REST = 25,
|
||||
SPEC_WANDERING_WILL_FIGHT = 26,
|
||||
SPEC_END_SCENARIO = 27,
|
||||
SPEC_END_SCENARIO = 27,
|
||||
SPEC_DISPLAY_PICTURE = 28,//new (Classic Blades of Exile) special
|
||||
SPEC_ONCE_GIVE_ITEM = 50,
|
||||
SPEC_ONCE_GIVE_SPEC_ITEM = 51,
|
||||
SPEC_ONCE_NULL = 52,
|
||||
@@ -754,10 +798,11 @@ enum eSpecNodeType {
|
||||
SPEC_IF_EVENT_OCCURRED = 150,
|
||||
SPEC_IF_HAS_CAVE_LORE = 151,
|
||||
SPEC_IF_HAS_WOODSMAN = 152,
|
||||
SPEC_IF_ENOUGH_MAGE_LORE = 153,
|
||||
SPEC_IF_ENOUGH_STATISTIC = 153,//modified (Classic Blades of Exile) special node
|
||||
SPEC_IF_TEXT_RESPONSE = 154,
|
||||
SPEC_IF_SDF_EQ = 155,
|
||||
SPEC_MAKE_TOWN_HOSTILE = 170,
|
||||
SPEC_IF_SDF_EQ = 155,
|
||||
SPEC_IF_ENOUGH_SPECIES = 156,
|
||||
SPEC_SET_TOWN_STATUS = 170,
|
||||
SPEC_TOWN_CHANGE_TER = 171,
|
||||
SPEC_TOWN_SWAP_TER = 172,
|
||||
SPEC_TOWN_TRANS_TER = 173,
|
||||
@@ -782,7 +827,9 @@ enum eSpecNodeType {
|
||||
SPEC_TOWN_PLACE_ITEM = 192,
|
||||
SPEC_TOWN_SPLIT_PARTY = 193,
|
||||
SPEC_TOWN_REUNITE_PARTY = 194,
|
||||
SPEC_TOWN_TIMER_START = 195,
|
||||
SPEC_TOWN_TIMER_START = 195,
|
||||
SPEC_TOWN_CHANGE_LIGHTNING = 196,//new (Classic Blades of Exile) special node
|
||||
SPEC_TOWN_CHANGE_ATTITUDE = 197,//new (Classic Blades of Exile) special node
|
||||
SPEC_RECT_PLACE_FIRE = 200,
|
||||
SPEC_RECT_PLACE_FORCE = 201,
|
||||
SPEC_RECT_PLACE_ICE = 202,
|
||||
@@ -841,6 +888,223 @@ enum eTalkNodeType {
|
||||
TALK_END_DIE = 28,
|
||||
TALK_CALL_TOWN_SPEC = 29,
|
||||
TALK_CALL_SCEN_SPEC = 30,
|
||||
};
|
||||
|
||||
enum eMageSpells {
|
||||
SPELL_MAGE_LIGHT = 0,
|
||||
SPELL_MAGE_SPARK = 1,
|
||||
SPELL_MAGE_MINOR_HASTE = 2,
|
||||
SPELL_MAGE_STRENGTH = 3,
|
||||
SPELL_MAGE_SCARE = 4,
|
||||
SPELL_MAGE_FLAME_CLOUD = 5,
|
||||
SPELL_MAGE_IDENTIFY = 6,
|
||||
SPELL_MAGE_SCRY_MONSTER = 7,
|
||||
SPELL_MAGE_GOO = 8,
|
||||
SPELL_MAGE_TRUE_SIGHT = 9,
|
||||
SPELL_MAGE_MINOR_POISON = 10,
|
||||
SPELL_MAGE_FLAME = 11,
|
||||
SPELL_MAGE_SLOW = 12,
|
||||
SPELL_MAGE_DUMBFOUND = 13,
|
||||
SPELL_MAGE_ENVENOM = 14,
|
||||
SPELL_MAGE_STINKING_CLOUD = 15,
|
||||
SPELL_MAGE_SUMMON_BEAST = 16,
|
||||
SPELL_MAGE_CONFLAGRATION = 17,
|
||||
SPELL_MAGE_DISPEL_FIELDS = 18,
|
||||
SPELL_MAGE_SLEEP_CLOUD = 19,
|
||||
SPELL_MAGE_UNLOCK = 20,
|
||||
SPELL_MAGE_HASTE = 21,
|
||||
SPELL_MAGE_FIREBALL = 22,
|
||||
SPELL_MAGE_LONG_LIGHT = 23,
|
||||
SPELL_MAGE_FEAR = 24,
|
||||
SPELL_MAGE_WALL_OF_FORCE = 25,
|
||||
SPELL_MAGE_WEAK_SUMMONING = 26,
|
||||
SPELL_MAGE_FLAME_ARROWS = 27,
|
||||
SPELL_MAGE_WEB = 28,
|
||||
SPELL_MAGE_RESIST_MAGIC = 29,
|
||||
SPELL_MAGE_POISON = 30,
|
||||
SPELL_MAGE_ICE_BOLT = 31,
|
||||
SPELL_MAGE_SLOW_GROUP = 32,
|
||||
SPELL_MAGE_MAGIC_MAP = 33,
|
||||
SPELL_MAGE_CAPTURE_SOUL = 34,
|
||||
SPELL_MAGE_SIMULACRUM = 35,
|
||||
SPELL_MAGE_VENOM_ARROWS = 36,
|
||||
SPELL_MAGE_WALL_OF_ICE = 37,
|
||||
SPELL_MAGE_STEALTH = 38,
|
||||
SPELL_MAGE_MAJOR_HASTE = 39,
|
||||
SPELL_MAGE_FIRE_STORM = 40,
|
||||
SPELL_MAGE_DISPEL_BARRIER = 41,
|
||||
SPELL_MAGE_FIRE_BARRIER = 42,
|
||||
SPELL_MAGE_SUMMONING = 43,
|
||||
SPELL_MAGE_SHOCKSTORM = 44,
|
||||
SPELL_MAGE_SPRAY_FIELDS = 45,
|
||||
SPELL_MAGE_MAJOR_POISON = 46,
|
||||
SPELL_MAGE_GROUP_FEAR = 47,
|
||||
SPELL_MAGE_KILL = 48,
|
||||
SPELL_MAGE_PARALYSIS = 49,
|
||||
SPELL_MAGE_DAEMON = 50,
|
||||
SPELL_MAGE_ANTIMAGIC_CLOUD = 51,
|
||||
SPELL_MAGE_MINDDUEL = 52,
|
||||
SPELL_MAGE_FLIGHT = 53,
|
||||
SPELL_MAGE_SHOCKWAVE = 54,
|
||||
SPELL_MAGE_MAJOR_BLESSING = 55,
|
||||
SPELL_MAGE_MASS_PARALYSIS = 56,
|
||||
SPELL_MAGE_PROTECTION = 57,
|
||||
SPELL_MAGE_MAJOR_SUMMON = 58,
|
||||
SPELL_MAGE_FORCE_BARRIER = 59,
|
||||
SPELL_MAGE_QUICKFIRE = 60,
|
||||
SPELL_MAGE_DEATH_ARROWS = 61,
|
||||
};
|
||||
|
||||
enum ePriestSpells {
|
||||
SPELL_PRIEST_MINOR_BLESS = 0,
|
||||
SPELL_PRIEST_MINOR_HEAL = 1,
|
||||
SPELL_PRIEST_WEAKEN_POISON = 2,
|
||||
SPELL_PRIEST_TURN_UNDEAD = 3,
|
||||
SPELL_PRIEST_LOCATION = 4,
|
||||
SPELL_PRIEST_SANCTUARY = 5,
|
||||
SPELL_PRIEST_SYMBIOSIS = 6,
|
||||
SPELL_PRIEST_MINOR_MANNA = 7,
|
||||
SPELL_PRIEST_RITUAL_SANCTIFY = 8,
|
||||
SPELL_PRIEST_STUMBLE = 9,
|
||||
SPELL_PRIEST_BLESS = 10,
|
||||
SPELL_PRIEST_CURE_POISON = 11,
|
||||
SPELL_PRIEST_CURSE = 12,
|
||||
SPELL_PRIEST_LIGHT = 13,
|
||||
SPELL_PRIEST_WOUND = 14,
|
||||
SPELL_PRIEST_SUMMON_SPIRIT = 15,
|
||||
SPELL_PRIEST_MOVE_MOUNTAINS = 16,
|
||||
SPELL_PRIEST_CHARM_FOE = 17,
|
||||
SPELL_PRIEST_DISEASE = 18,
|
||||
SPELL_PRIEST_AWAKEN = 19,
|
||||
SPELL_PRIEST_HEAL = 20,
|
||||
SPELL_PRIEST_LIGHT_HEAL_ALL = 21,
|
||||
SPELL_PRIEST_HOLY_SCOURGE = 22,
|
||||
SPELL_PRIEST_DETECT_LIFE = 23,
|
||||
SPELL_PRIEST_CURE_PARALYSIS = 24,
|
||||
SPELL_PRIEST_MANNA = 25,
|
||||
SPELL_PRIEST_FORCEFIELD = 26,
|
||||
SPELL_PRIEST_CURE_DISEASE = 27,
|
||||
SPELL_PRIEST_RESTORE_MIND = 28,
|
||||
SPELL_PRIEST_SMITE = 29,
|
||||
SPELL_PRIEST_CURE_PARTY = 30,
|
||||
SPELL_PRIEST_CURSE_ALL = 31,
|
||||
SPELL_PRIEST_DISPEL_UNDEAD = 32,
|
||||
SPELL_PRIEST_REMOVE_CURSE = 33,
|
||||
SPELL_PRIEST_STICKS_TO_SNAKES = 34,
|
||||
SPELL_PRIEST_MARTYRS_SHIELD = 35,
|
||||
SPELL_PRIEST_CLEANSE = 36,
|
||||
SPELL_PRIEST_FIREWALK = 37,
|
||||
SPELL_PRIEST_BLESS_PARTY = 38,
|
||||
SPELL_PRIEST_MAJOR_HEAL = 39,
|
||||
SPELL_PRIEST_RAISE_DEAD = 40,
|
||||
SPELL_PRIEST_FLAMESTRIKE = 41,
|
||||
SPELL_PRIEST_MASS_SANCTUARY = 42,
|
||||
SPELL_PRIEST_SUMMON_HOST = 43,
|
||||
SPELL_PRIEST_SHATTER = 44,
|
||||
SPELL_PRIEST_DISPEL_FIELDS = 45,
|
||||
SPELL_PRIEST_HEAL_ALL = 46,
|
||||
SPELL_PRIEST_REVIVE = 47,
|
||||
SPELL_PRIEST_HYPERACTIVITY = 48,
|
||||
SPELL_PRIEST_DESTONE = 49,
|
||||
SPELL_PRIEST_GUARDIAN = 50,
|
||||
SPELL_PRIEST_MASS_CHARM = 51,
|
||||
SPELL_PRIEST_PROTECTIVE_CIRCLE = 52,
|
||||
SPELL_PRIEST_PESTILENCE = 53,
|
||||
SPELL_PRIEST_REVIVE_ALL = 54,
|
||||
SPELL_PRIEST_RAVAGE_SPIRIT = 55,
|
||||
SPELL_PRIEST_RESURRECT = 56,
|
||||
SPELL_PRIEST_DIVINE_THUD = 57,
|
||||
SPELL_PRIEST_AVATAR = 58,
|
||||
SPELL_PRIEST_WALL_OF_BLADES = 59,
|
||||
SPELL_PRIEST_WORD_OF_RECALL = 60,
|
||||
SPELL_PRIEST_MAJOR_CLEANSING = 61,
|
||||
};
|
||||
|
||||
//Specific spells called when using items
|
||||
enum eItemsSpells {
|
||||
SPELL_ITEMS_STRENGHTEN_TARGET = 62, //wand of carrunos effect
|
||||
SPELL_ITEMS_ICE_WALL_BALLS = 64, //circular radius rather than straight wall
|
||||
SPELL_ITEMS_GOO_BOMB = 65, //greater radius than webs
|
||||
SPELL_ITEMS_FOUL_VAPORS = 66, //greater radius than stinking cloud
|
||||
SPELL_ITEMS_SPRAY_ACID = 68,
|
||||
SPELL_ITEMS_PARALYZE = 69, //powerful paralysis (won't break out of it soon)
|
||||
};
|
||||
|
||||
enum eMonstersMageSpells {
|
||||
SPELL_MONST_MAGE_NO_SPELL = 0,
|
||||
SPELL_MONST_MAGE_SPARK = 1,
|
||||
SPELL_MONST_MAGE_MINOR_HASTE = 2,
|
||||
SPELL_MONST_MAGE_STRENGH = 3,
|
||||
SPELL_MONST_MAGE_FLAME_CLOUD = 4,
|
||||
SPELL_MONST_MAGE_FLAME = 5,
|
||||
SPELL_MONST_MAGE_MINOR_POISON = 6,
|
||||
SPELL_MONST_MAGE_SLOW = 7,
|
||||
SPELL_MONST_MAGE_DUMBFOUND = 8,
|
||||
SPELL_MONST_MAGE_STINKING_CLOUD = 9,
|
||||
SPELL_MONST_MAGE_SUMMON_BEAST = 10,
|
||||
SPELL_MONST_MAGE_CONFLAGRATION = 11,
|
||||
SPELL_MONST_MAGE_FIREBALL = 12,
|
||||
SPELL_MONST_MAGE_WEAK_SUMMONING = 13,
|
||||
SPELL_MONST_MAGE_WEB = 14,
|
||||
SPELL_MONST_MAGE_POISON = 15,
|
||||
SPELL_MONST_MAGE_ICE_BOLT = 16,
|
||||
SPELL_MONST_MAGE_SLOW_GROUP = 17,
|
||||
SPELL_MONST_MAGE_MAJOR_HASTE = 18,
|
||||
SPELL_MONST_MAGE_FIRESTORM = 19,
|
||||
SPELL_MONST_MAGE_SUMMONING = 20,
|
||||
SPELL_MONST_MAGE_SHOCKSTORM = 21,
|
||||
SPELL_MONST_MAGE_MAJOR_POISON = 22,
|
||||
SPELL_MONST_MAGE_KILL = 23,
|
||||
SPELL_MONST_MAGE_DAEMON = 24,
|
||||
SPELL_MONST_MAGE_MAJOR_BLESSING = 25,
|
||||
SPELL_MONST_MAGE_MAJOR_SUMMONING = 26,
|
||||
SPELL_MONST_MAGE_SHOCKWAVE = 27,
|
||||
};
|
||||
|
||||
enum eMonstersPriestSpells {
|
||||
SPELL_MONST_PRIEST_NO_SPELL = 0,
|
||||
SPELL_MONST_PRIEST_MINOR_BLESS = 1,
|
||||
SPELL_MONST_PRIEST_LIGHT_HEAL = 2,
|
||||
SPELL_MONST_PRIEST_WRACK = 3,
|
||||
SPELL_MONST_PRIEST_STUMBLE = 4,
|
||||
SPELL_MONST_PRIEST_BLESS = 5,
|
||||
SPELL_MONST_PRIEST_CURSE = 6,
|
||||
SPELL_MONST_PRIEST_WOUND = 7,
|
||||
SPELL_MONST_PRIEST_SUMMON_SPIRIT = 8,
|
||||
SPELL_MONST_PRIEST_DISEASE = 9,
|
||||
SPELL_MONST_PRIEST_HEAL = 10,
|
||||
SPELL_MONST_PRIEST_HOLY_SCOURGE = 11,
|
||||
SPELL_MONST_PRIEST_SMITE = 12,
|
||||
SPELL_MONST_PRIEST_CURSE_ALL = 13,
|
||||
SPELL_MONST_PRIEST_STICKS_TO_SNAKES = 14,
|
||||
SPELL_MONST_PRIEST_MARTYRS_SHIELD = 15,
|
||||
SPELL_MONST_PRIEST_BLESS_ALL = 16,
|
||||
SPELL_MONST_PRIEST_MAJOR_HEAL = 17,
|
||||
SPELL_MONST_PRIEST_FLAMESTRIKE = 18,
|
||||
SPELL_MONST_PRIEST_SUMMON_HOST = 19,
|
||||
SPELL_MONST_PRIEST_HEAL_ALL = 20,// !!! this isn't a mass spell !!! it's the most reliable self-heal spell a monster can cast (heal 50 health each cast)
|
||||
SPELL_MONST_PRIEST_UNHOLY_RAVAGING = 21,
|
||||
SPELL_MONST_PRIEST_SUMMON_GUARDIAN = 22,
|
||||
SPELL_MONST_PRIEST_PESTILENCE = 23,
|
||||
SPELL_MONST_PRIEST_REVIVE_ALL = 24,
|
||||
SPELL_MONST_PRIEST_AVATAR = 25,
|
||||
SPELL_MONST_PRIEST_DIVINE_THUD = 26,
|
||||
};
|
||||
|
||||
enum eShopTypes {
|
||||
SHOP_WEAPON_SHOP = 0,
|
||||
SHOP_ARMOR_SHOP = 1,
|
||||
SHOP_MISC_SHOP = 2,
|
||||
SHOP_HEALER = 3,
|
||||
SHOP_FOOD = 4,
|
||||
SHOP_MAGIC_SHOP_1 = 5,
|
||||
SHOP_MAGIC_SHOP_2 = 6,
|
||||
SHOP_MAGIC_SHOP_3 = 7,
|
||||
SHOP_MAGIC_SHOP_4 = 8,
|
||||
SHOP_MAGIC_SHOP_5 = 9,
|
||||
SHOP_MAGE_SPELLS = 10,
|
||||
SHOP_PRIEST_SPELLS = 11,
|
||||
SHOP_ALCHEMY = 12,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -62,23 +62,23 @@ void location::crumbleWall()
|
||||
{
|
||||
unsigned char ter;
|
||||
|
||||
if (loc_off_act_area(*this) == TRUE)
|
||||
if (loc_off_act_area(*this) == true)
|
||||
return;
|
||||
ter = t_d.terrain[x][y];
|
||||
if (scenario.ter_types[ter].special == 7) {
|
||||
if (scenario.ter_types[ter].special == TER_SPEC_CRUMBLING_TERRAIN) {
|
||||
play_sound(60);
|
||||
t_d.terrain[x][y] = scenario.ter_types[ter].flag1;
|
||||
if(scenario.ter_types[scenario.ter_types[ter].flag1].special >= 16 && scenario.ter_types[scenario.ter_types[ter].flag1].special <=19)
|
||||
belt_present = TRUE;
|
||||
if(scenario.ter_types[scenario.ter_types[ter].flag1].special >= TER_SPEC_CONVEYOR_NORTH && scenario.ter_types[scenario.ter_types[ter].flag1].special <= TER_SPEC_CONVEYOR_WEST)
|
||||
belt_present = true;
|
||||
add_string_to_buf(" Barrier crumbles.");
|
||||
}
|
||||
}
|
||||
|
||||
bool location::isDoor() const
|
||||
{
|
||||
if ((scenario.ter_types[t_d.terrain[x][y]].special == 9) ||
|
||||
(scenario.ter_types[t_d.terrain[x][y]].special == 1) ||
|
||||
(scenario.ter_types[t_d.terrain[x][y]].special == 10))
|
||||
if ((scenario.ter_types[t_d.terrain[x][y]].special == TER_SPEC_UNLOCKABLE_TERRAIN) ||
|
||||
(scenario.ter_types[t_d.terrain[x][y]].special == TER_SPEC_CHANGE_WHEN_STEP_ON) ||
|
||||
(scenario.ter_types[t_d.terrain[x][y]].special == TER_SPEC_UNLOCKABLE_BASHABLE))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ void location::pickLock(short pc_num)
|
||||
{
|
||||
unsigned char terrain;
|
||||
short r1,which_item;
|
||||
Boolean will_break = FALSE;
|
||||
Boolean will_break = false;
|
||||
short unlock_adjust;
|
||||
|
||||
terrain = t_d.terrain[x][y];
|
||||
@@ -101,25 +101,25 @@ void location::pickLock(short pc_num)
|
||||
r1 = get_ran(1,0,100) + adven[pc_num].items[which_item].ability_strength * 7;
|
||||
|
||||
if (r1 < 75)
|
||||
will_break = TRUE;
|
||||
will_break = true;
|
||||
|
||||
r1 = get_ran(1,0,100) - 5 * adven[pc_num].statAdj(SKILL_DEXTERITY) + c_town.difficulty * 7
|
||||
- 5 * adven[pc_num].skills[SKILL_LOCKPICKING] - adven[pc_num].items[which_item].ability_strength * 7;
|
||||
|
||||
// Nimble?
|
||||
if (adven[pc_num].traits[TRAIT_NIMBLE] == TRUE) r1 -= 8;
|
||||
if (adven[pc_num].traits[TRAIT_NIMBLE] == true) r1 -= 8;
|
||||
|
||||
if (adven[pc_num].hasAbilEquip(ITEM_THIEVING) < 24)
|
||||
r1 = r1 - 12;
|
||||
|
||||
if ((scenario.ter_types[terrain].special < 9) || (scenario.ter_types[terrain].special > 10)) {
|
||||
if ((scenario.ter_types[terrain].special < TER_SPEC_UNLOCKABLE_TERRAIN) || (scenario.ter_types[terrain].special > TER_SPEC_UNLOCKABLE_BASHABLE)) {
|
||||
add_string_to_buf(" Wrong terrain type. ");
|
||||
return;
|
||||
}
|
||||
unlock_adjust = scenario.ter_types[terrain].flag2;
|
||||
if ((unlock_adjust >= 5) || (r1 > (90 - unlock_adjust * 15))) {
|
||||
add_string_to_buf(" Didn't work. ");
|
||||
if (will_break == TRUE)
|
||||
if (will_break == true)
|
||||
{
|
||||
add_string_to_buf(" Pick breaks. ");
|
||||
adven[pc_num].removeCharge(which_item);
|
||||
@@ -130,8 +130,8 @@ void location::pickLock(short pc_num)
|
||||
add_string_to_buf(" Door unlocked. ");
|
||||
play_sound(9);
|
||||
t_d.terrain[x][y] = scenario.ter_types[terrain].flag1;
|
||||
if(scenario.ter_types[scenario.ter_types[terrain].flag1].special >= 16 && scenario.ter_types[scenario.ter_types[terrain].flag1].special <=19)
|
||||
belt_present = TRUE;
|
||||
if(scenario.ter_types[scenario.ter_types[terrain].flag1].special >= TER_SPEC_CONVEYOR_NORTH && scenario.ter_types[scenario.ter_types[terrain].flag1].special <= TER_SPEC_CONVEYOR_WEST)
|
||||
belt_present = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,9 +142,9 @@ void location::bashDoor(short pc_num)
|
||||
short r1,unlock_adjust;
|
||||
|
||||
terrain = t_d.terrain[x][y];
|
||||
r1 = get_ran(1,0,100) - 15 * adven[pc_num].statAdj(0) + c_town.difficulty * 4;
|
||||
r1 = get_ran(1,0,100) - 15 * adven[pc_num].statAdj(SKILL_STRENGTH) + c_town.difficulty * 4;
|
||||
|
||||
if ((scenario.ter_types[terrain].special < 9) || (scenario.ter_types[terrain].special > 10))
|
||||
if ((scenario.ter_types[terrain].special < TER_SPEC_UNLOCKABLE_TERRAIN) || (scenario.ter_types[terrain].special > TER_SPEC_UNLOCKABLE_BASHABLE))
|
||||
{
|
||||
add_string_to_buf(" Wrong terrain type. ");
|
||||
return;
|
||||
@@ -152,7 +152,7 @@ void location::bashDoor(short pc_num)
|
||||
|
||||
unlock_adjust = scenario.ter_types[terrain].flag2;
|
||||
|
||||
if ((unlock_adjust >= 5) || (r1 > (100 - unlock_adjust * 15)) || (scenario.ter_types[terrain].special != 10))
|
||||
if ((unlock_adjust >= 5) || (r1 > (100 - unlock_adjust * 15)) || (scenario.ter_types[terrain].special != TER_SPEC_UNLOCKABLE_BASHABLE))
|
||||
{
|
||||
add_string_to_buf(" Didn't work. ");
|
||||
adven[pc_num].damage(get_ran(1,1,4),4,-1);
|
||||
@@ -162,7 +162,7 @@ void location::bashDoor(short pc_num)
|
||||
add_string_to_buf(" Lock breaks. ");
|
||||
play_sound(9);
|
||||
t_d.terrain[x][y] = scenario.ter_types[terrain].flag1;
|
||||
if(scenario.ter_types[scenario.ter_types[terrain].flag1].special >= 16 && scenario.ter_types[scenario.ter_types[terrain].flag1].special <=19)
|
||||
belt_present = TRUE;
|
||||
if(scenario.ter_types[scenario.ter_types[terrain].flag1].special >= TER_SPEC_CONVEYOR_NORTH && scenario.ter_types[scenario.ter_types[terrain].flag1].special <= TER_SPEC_CONVEYOR_WEST)
|
||||
belt_present = true;
|
||||
}
|
||||
}
|
||||
|
@@ -33,9 +33,9 @@ void pc_record_type::kill(short type)
|
||||
|
||||
if(no_save == false){
|
||||
if (type != 4)
|
||||
i = hasAbilEquip(48); //check if has life saving items
|
||||
i = hasAbilEquip(ITEM_LIFE_SAVING); //check if has life saving items
|
||||
else
|
||||
i = hasAbilEquip(49); //check if has protection vs petrification items
|
||||
i = hasAbilEquip(ITEM_PROTECT_FROM_PETRIFY); //check if has protection vs petrification items
|
||||
}
|
||||
|
||||
short which_pc = getNum();
|
||||
@@ -59,11 +59,11 @@ void pc_record_type::kill(short type)
|
||||
else if (type == 3)
|
||||
make_sfx(item_loc.x,item_loc.y,6);
|
||||
|
||||
if (overall_mode != 0)
|
||||
if (overall_mode != MODE_OUTDOORS)
|
||||
for (i = 0; i < 24; i++)
|
||||
if (items[i].variety != 0) {
|
||||
if (items[i].variety != ITEM_TYPE_NO_ITEM) {
|
||||
dummy = place_item(items[i],item_loc,true);
|
||||
items[i].variety = 0;
|
||||
items[i].variety = ITEM_TYPE_NO_ITEM;
|
||||
}
|
||||
if ((type == 2) || (type == 3))
|
||||
play_sound(21);
|
||||
@@ -291,11 +291,11 @@ void pc_record_type::giveXP(short amt)
|
||||
play_sound(7);
|
||||
level++;
|
||||
|
||||
sprintf ((char *) c_line, " %s is level %d! ",(char *) name, level);
|
||||
add_string_to_buf((char *) c_line);
|
||||
sprintf (c_line, " %s is level %d! ", name, level);
|
||||
add_string_to_buf(c_line);
|
||||
skill_pts += (level < 20) ? 5 : 4;
|
||||
add_hp = (level < 26) ? get_ran(1,2,6) + skill_bonus[skills[0]]
|
||||
: max (skill_bonus[skills[0]],0);
|
||||
add_hp = (level < 26) ? get_ran(1,2,6) + skill_bonus[skills[SKILL_STRENGTH]]
|
||||
: max (skill_bonus[skills[SKILL_STRENGTH]],0);
|
||||
|
||||
if (add_hp < 0) add_hp = 0;
|
||||
max_health += add_hp;
|
||||
@@ -314,8 +314,8 @@ void pc_record_type::drainXP(short how_much)
|
||||
if (!isAlive()) return;
|
||||
|
||||
experience = max(experience - how_much, 0);
|
||||
sprintf ((char *) c_line, " %s drained.",(char *) name);
|
||||
add_string_to_buf((char *) c_line);
|
||||
sprintf (c_line, " %s drained.", name);
|
||||
add_string_to_buf(c_line);
|
||||
}
|
||||
|
||||
void pc_record_type::restoreSP(short amt)
|
||||
@@ -343,8 +343,8 @@ void pc_record_type::curse(short how_much)
|
||||
if (!isAlive()) return;
|
||||
|
||||
status[STATUS_BLESS_CURSE] = max(status[STATUS_BLESS_CURSE] - how_much, -8);
|
||||
sprintf ((char *) c_line, " %s cursed.",(char *) name);
|
||||
add_string_to_buf((char *) c_line);
|
||||
sprintf (c_line, " %s cursed.", name);
|
||||
add_string_to_buf(c_line);
|
||||
|
||||
put_pc_screen();
|
||||
give_help(59,0,0);
|
||||
@@ -358,7 +358,7 @@ void pc_record_type::dumbfound(short how_much)
|
||||
|
||||
r1 = get_ran(1,0,90);
|
||||
|
||||
if (hasAbilEquip(53) < 24) {
|
||||
if (hasAbilEquip(ITEM_WILL) < 24) {
|
||||
add_string_to_buf(" Ring of Will glows.");
|
||||
r1 -= 10;
|
||||
}
|
||||
@@ -367,14 +367,14 @@ void pc_record_type::dumbfound(short how_much)
|
||||
how_much -= 2;
|
||||
|
||||
if (how_much <= 0) {
|
||||
sprintf ((char *) c_line, " %s saved.",(char *) name);
|
||||
add_string_to_buf((char *) c_line);
|
||||
sprintf (c_line, " %s saved.", name);
|
||||
add_string_to_buf(c_line);
|
||||
return;
|
||||
}
|
||||
|
||||
status[STATUS_DUMB] = min(status[STATUS_DUMB] + how_much, 8);
|
||||
sprintf ((char *) c_line, " %s dumbfounded.",(char *) name);
|
||||
add_string_to_buf((char *) c_line);
|
||||
sprintf (c_line, " %s dumbfounded.", name);
|
||||
add_string_to_buf(c_line);
|
||||
|
||||
one_sound(67);
|
||||
put_pc_screen();
|
||||
@@ -492,9 +492,9 @@ void pc_record_type::acid(short how_much)
|
||||
{
|
||||
if (!isAlive()) return;
|
||||
|
||||
if (hasAbilEquip(36) < 24) {
|
||||
sprintf ((char *) c_line, " %s resists acid.",(char *) name);
|
||||
add_string_to_buf((char *) c_line);
|
||||
if (hasAbilEquip(ITEM_ACID_PROTECTION) < 24) {
|
||||
sprintf (c_line, " %s resists acid.", name);
|
||||
add_string_to_buf(c_line);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -561,15 +561,15 @@ bool pc_record_type::giveToPC(item_record_type item, bool print_result)
|
||||
short free_space;
|
||||
char announce_string[60];
|
||||
|
||||
if (item.variety == 0)
|
||||
if (item.variety == ITEM_TYPE_NO_ITEM)
|
||||
return true;
|
||||
|
||||
if (item.variety == 3) {
|
||||
if (item.variety == ITEM_TYPE_GOLD) {
|
||||
party.gold += item.item_level;
|
||||
ASB("You get some gold.");
|
||||
return true;
|
||||
}
|
||||
if (item.variety == 11) {
|
||||
if (item.variety == ITEM_TYPE_FOOD) {
|
||||
party.food += item.item_level;
|
||||
ASB("You get some food.");
|
||||
return true;
|
||||
@@ -608,30 +608,30 @@ bool pc_record_type::giveToPC(item_record_type item, bool print_result)
|
||||
return false;
|
||||
}
|
||||
|
||||
// returnes equipped protection level of specified abil, or -1 if no such abil is equipped
|
||||
// returns ability strength of equipped item with specified ability, or -1 if no such item is equipped
|
||||
short pc_record_type::getProtLevel(short abil)
|
||||
{
|
||||
for (int i = 0; i < 24; i++)
|
||||
if ((items[i].variety != 0) && (items[i].ability == abil) && (equip[i] == true))
|
||||
if ((items[i].variety != ITEM_TYPE_NO_ITEM) && (items[i].ability == abil) && (equip[i] == true))
|
||||
return items[i].ability_strength;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
short pc_record_type::hasAbilEquip(short abil)
|
||||
short pc_record_type::hasAbilEquip(short abil)//returns the number of the equipped item with ability "abil" or 24 if none
|
||||
{
|
||||
short i = 0;
|
||||
|
||||
while (((items[i].variety == 0) || (items[i].ability != abil)
|
||||
while (((items[i].variety == ITEM_TYPE_NO_ITEM) || (items[i].ability != abil)
|
||||
|| (equip[i] == false)) && (i < 24))
|
||||
i++;
|
||||
return i;
|
||||
}
|
||||
|
||||
short pc_record_type::hasAbil(short abil)
|
||||
short pc_record_type::hasAbil(short abil)//returns the number of the item with ability "abil" or 24 if none
|
||||
{
|
||||
short i = 0;
|
||||
|
||||
while (((items[i].variety == 0) || (items[i].ability != abil)) && (i < 24)) i++;
|
||||
while (((items[i].variety == ITEM_TYPE_NO_ITEM) || (items[i].ability != abil)) && (i < 24)) i++;
|
||||
return i;
|
||||
}
|
||||
|
||||
@@ -647,11 +647,11 @@ short pc_record_type::amountCarried()
|
||||
bool airy = false, heavy = false;
|
||||
|
||||
for (i = 0; i < 24; i++)
|
||||
if (items[i].variety > 0)
|
||||
if (items[i].variety > ITEM_TYPE_NO_ITEM)
|
||||
{
|
||||
storage += item_weight(items[i]);
|
||||
if (items[i].ability == 44) airy = true;
|
||||
if (items[i].ability == 45) heavy = true;
|
||||
if (items[i].ability == ITEM_LIGHTER_OBJECT) airy = true;
|
||||
if (items[i].ability == ITEM_HEAVIER_OBJECT) heavy = true;
|
||||
}
|
||||
|
||||
if (airy) storage -= 30;
|
||||
@@ -667,7 +667,7 @@ short pc_record_type::hasSpace()
|
||||
|
||||
while (i < 24)
|
||||
{
|
||||
if (items[i].variety == 0)
|
||||
if (items[i].variety == ITEM_TYPE_NO_ITEM)
|
||||
return i;
|
||||
i++;
|
||||
}
|
||||
@@ -680,9 +680,9 @@ short pc_record_type::okToBuy(short cost, item_record_type item)
|
||||
{
|
||||
int i;
|
||||
|
||||
if ((item.variety != 3) && (item.variety != 11)) {
|
||||
if ((item.variety != ITEM_TYPE_GOLD) && (item.variety != ITEM_TYPE_FOOD)) {
|
||||
for (i = 0; i < 24; i++)
|
||||
if ((items[i].variety > 0) && (items[i].type_flag == item.type_flag)
|
||||
if ((items[i].variety > ITEM_TYPE_NO_ITEM) && (items[i].type_flag == item.type_flag)
|
||||
&& (items[i].charges > 123))
|
||||
return 5;
|
||||
|
||||
@@ -706,12 +706,12 @@ void pc_record_type::takeItem(short which_item)
|
||||
which_item -= 30;
|
||||
}
|
||||
|
||||
if ((weap_poisoned == which_item) && (status[0] > 0)) {
|
||||
if ((weap_poisoned == which_item) && (status[STATUS_POISONED_WEAPON] > 0)) {
|
||||
add_string_to_buf(" Poison lost. ");
|
||||
status[0] = 0;
|
||||
status[STATUS_POISONED_WEAPON] = 0;
|
||||
}
|
||||
|
||||
if ((weap_poisoned > which_item) && (status[0] > 0))
|
||||
if ((weap_poisoned > which_item) && (status[STATUS_POISONED_WEAPON] > 0))
|
||||
weap_poisoned--;
|
||||
|
||||
for (i = which_item; i < 23; i++) {
|
||||
@@ -748,41 +748,41 @@ void pc_record_type::enchantWeapon(short item_hit, short enchant_type, short new
|
||||
|
||||
switch (enchant_type) {
|
||||
case 0:
|
||||
sprintf((char *)store_name,"%s (+1)", items[item_hit].full_name);
|
||||
sprintf(store_name,"%s (+1)", items[item_hit].full_name);
|
||||
items[item_hit].bonus++;
|
||||
items[item_hit].value = new_val;
|
||||
break;
|
||||
case 1:
|
||||
sprintf((char *)store_name,"%s (+2)", items[item_hit].full_name);
|
||||
sprintf(store_name,"%s (+2)", items[item_hit].full_name);
|
||||
items[item_hit].bonus += 2;
|
||||
items[item_hit].value = new_val;
|
||||
break;
|
||||
case 2:
|
||||
sprintf((char *)store_name,"%s (+3)", items[item_hit].full_name);
|
||||
sprintf(store_name,"%s (+3)", items[item_hit].full_name);
|
||||
items[item_hit].bonus += 3;
|
||||
items[item_hit].value = new_val;
|
||||
break;
|
||||
case 3:
|
||||
sprintf((char *)store_name,"%s (F)", items[item_hit].full_name);
|
||||
items[item_hit].ability = 110;
|
||||
sprintf(store_name,"%s (F)", items[item_hit].full_name);
|
||||
items[item_hit].ability = ITEM_SPELL_FLAME;
|
||||
items[item_hit].ability_strength = 5;
|
||||
items[item_hit].charges = 8;
|
||||
break;
|
||||
case 4:
|
||||
sprintf((char *)store_name,"%s (F!)", items[item_hit].full_name);
|
||||
sprintf(store_name,"%s (F!)", items[item_hit].full_name);
|
||||
items[item_hit].value = new_val;
|
||||
items[item_hit].ability = 1;
|
||||
items[item_hit].ability = ITEM_FLAMING_WEAPON;
|
||||
items[item_hit].ability_strength = 5;
|
||||
break;
|
||||
case 5:
|
||||
sprintf((char *)store_name,"%s (+5)", items[item_hit].full_name);
|
||||
sprintf(store_name,"%s (+5)", items[item_hit].full_name);
|
||||
items[item_hit].value = new_val;
|
||||
items[item_hit].bonus += 5;
|
||||
break;
|
||||
case 6:
|
||||
sprintf((char *)store_name,"%s (B)", items[item_hit].full_name);
|
||||
sprintf(store_name,"%s (B)", items[item_hit].full_name);
|
||||
items[item_hit].bonus++;
|
||||
items[item_hit].ability = 71;
|
||||
items[item_hit].ability = ITEM_BLESS_CURSE;
|
||||
items[item_hit].ability_strength = 5;
|
||||
items[item_hit].magic_use_type = 0;
|
||||
items[item_hit].charges = 8;
|
||||
@@ -805,9 +805,10 @@ void pc_record_type::equipItem(short item_num)
|
||||
short i;
|
||||
short equip_item_type = 0;
|
||||
|
||||
if ((overall_mode == MODE_COMBAT) && (items[item_num].variety == 11))
|
||||
//the next check didn't allow food to be equipped in combat mode... leftover from Exile 1-2-3 ?
|
||||
/*if ((overall_mode == MODE_COMBAT) && (items[item_num].variety == ITEM_TYPE_FOOD))
|
||||
add_string_to_buf("Equip: Not in combat");
|
||||
else {
|
||||
else {*/
|
||||
// unequip
|
||||
if (equip[item_num] == true) {
|
||||
if ((equip[item_num] == true) &&
|
||||
@@ -816,9 +817,9 @@ void pc_record_type::equipItem(short item_num)
|
||||
else {
|
||||
equip[item_num] = false;
|
||||
add_string_to_buf("Equip: Unequipped");
|
||||
if ((weap_poisoned == item_num) && (status[0] > 0)) {
|
||||
if ((weap_poisoned == item_num) && (status[STATUS_POISONED_WEAPON] > 0)) {
|
||||
add_string_to_buf(" Poison lost. ");
|
||||
status[0] = 0;
|
||||
status[STATUS_POISONED_WEAPON] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -846,7 +847,7 @@ void pc_record_type::equipItem(short item_num)
|
||||
}
|
||||
}
|
||||
|
||||
if ((is_combat()) && (items[item_num].variety == 13))
|
||||
if ((is_combat()) && (items[item_num].variety == ITEM_TYPE_ARMOR))
|
||||
add_string_to_buf("Equip: Not armor in combat");
|
||||
else if ((2 - num_hands_occupied) < num_hands_to_use[items[item_num].variety])
|
||||
add_string_to_buf("Equip: Not enough free hands");
|
||||
@@ -859,7 +860,7 @@ void pc_record_type::equipItem(short item_num)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
||||
if (stat_window == getNum())
|
||||
put_item_screen(stat_window,1);
|
||||
@@ -966,10 +967,10 @@ void pc_record_type::combineThings()
|
||||
int i,j,test;
|
||||
|
||||
for (i = 0; i < 24; i++) {
|
||||
if ((items[i].variety > 0) && (items[i].type_flag > 0) && (items[i].isIdent()))
|
||||
if ((items[i].variety > ITEM_TYPE_NO_ITEM) && (items[i].type_flag > 0) && (items[i].isIdent()))
|
||||
{
|
||||
for (j = i + 1; j < 24; j++)
|
||||
if ((items[j].variety > 0) && (items[j].type_flag == items[i].type_flag) && (items[j].isIdent()))
|
||||
if ((items[j].variety > ITEM_TYPE_NO_ITEM) && (items[j].type_flag == items[i].type_flag) && (items[j].isIdent()))
|
||||
{
|
||||
add_string_to_buf("(items combined)");
|
||||
test = items[i].charges + items[j].charges;
|
||||
@@ -985,7 +986,7 @@ void pc_record_type::combineThings()
|
||||
takeItem(30 + j);
|
||||
}
|
||||
}
|
||||
if ((items[i].variety > 0) && (items[i].charges < 0))
|
||||
if ((items[i].variety > ITEM_TYPE_NO_ITEM) && (items[i].charges < 0))
|
||||
items[i].charges = 1;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user