- [+] don't trigger ANY god effects while raging.
- [+] when wishing for "power", don't give tech that you can't use. - [+] INFINITE LOOP in timeeffectslf(). - [+] happens when an lf is prone and falls down a hole. - [+] pass search check on natural 20! - [+] undead weapons are normally cursed - [+] walking into a wall now takes time, but can detect secret doors - [+] tiled floors also multiply the effects of slippery objects - [+] wand of dispersal - getting "no lof" - [+] make time debugging for all lfs be an option. - [+] when set, dump the following for each lf: - [+] time (millisecnds) taken for their turn - [+] whether player can see them or not - [+] # screen redraws during their turn - [+] skillchecks - [+] shield check.... - [+] Human checkmod (type Shieldblock): 19(attr)+1(lvm)+0(othmod),totroll=71--More-- - [+] Human: Shieldblock check, rolled 71, need >= 95. (fail) [you takes 1 dam]--More - [+] wondering monsters - they turn up on levels when you go back to them. (but never near the stairs) - [+] only if you haven't been there for a while (50 turns or so?) - [+] (depth*5)% chance for each room without stairs - [+] dark elf - Vell - [+] consumesouls - [+] +int - [+] novice necromancy - [+] metal vuln - [+] don't start player with obects which they are vulnerable to!! - [+] matvuln should hurt you if you touch something made of it! - [+] wands should be made of dragonwood, not metal - [+] diferent kinds of matvuln - - [+] you get hurt more by it - [+] you can't even touch it - [+] use v2 to determine.
This commit is contained in:
parent
8b6f5a13a8
commit
e805e9dc01
131
data.c
131
data.c
|
@ -1720,6 +1720,7 @@ void initobjects(void) {
|
|||
|
||||
addot(OT_TREEDOWN, "hollow tree leading down", "A huge hollow tree containing an ascending staircase.", MT_DRAGONWOOD, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, C_BROWN, '>', NA, NULL);
|
||||
addflag(lastot->flags, F_STAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, "hollow tree");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_TREEUP, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
|
@ -1729,6 +1730,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NA, "birds chirping.");
|
||||
addot(OT_TREEUP, "hollow tree leading up", "A huge hollow tree containing an ascending staircase.", MT_DRAGONWOOD, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, C_BROWN, '<', NA, NULL);
|
||||
addflag(lastot->flags, F_STAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, "hollow tree");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_TREEDOWN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL);
|
||||
|
@ -1737,6 +1739,7 @@ void initobjects(void) {
|
|||
|
||||
addot(OT_TUNNELDOWN, "tunnel leading down", "A wide tunnel leading downwards.", MT_STONE, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, C_BROWN, '>', NA, NULL);
|
||||
addflag(lastot->flags, F_STAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, "tunnel");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_TUNNELUP, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
|
@ -1746,6 +1749,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NA, "an echoing drip.");
|
||||
addot(OT_TUNNELUP, "tunnel leading up", "A wide tunnel leading upwards.", MT_STONE, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, C_BROWN, '<', NA, NULL);
|
||||
addflag(lastot->flags, F_STAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, "tunnel");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_TUNNELDOWN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL);
|
||||
|
@ -1766,6 +1770,7 @@ void initobjects(void) {
|
|||
|
||||
addot(OT_STAIRSDOWN, "staircase going down", "A stone staircase winding downwards.", MT_STONE, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, NA, '>', NA, NULL);
|
||||
addflag(lastot->flags, F_STAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, "staircase");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_STAIRSUP, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
|
@ -1773,6 +1778,7 @@ void initobjects(void) {
|
|||
|
||||
addot(OT_STAIRSUP, "staircase going up", "A stone staircase climbing upwards.", MT_STONE, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, NA, '<', NA, NULL);
|
||||
addflag(lastot->flags, F_STAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, "staircase");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_STAIRSDOWN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL);
|
||||
|
@ -1781,6 +1787,7 @@ void initobjects(void) {
|
|||
|
||||
addot(OT_VSTAIRSDOWN, "metal hatch leading down", "A study metal hatchway set into the floor.", MT_METAL, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, NA, '>', NA, NULL);
|
||||
addflag(lastot->flags, F_STAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, "staircase");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_VSTAIRSUP, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL);
|
||||
|
@ -1790,6 +1797,7 @@ void initobjects(void) {
|
|||
|
||||
addot(OT_VSTAIRSUP, "metal ladder leading up", "A ladder of rigid metal, leading up to through roof.", MT_METAL, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, NA, '<', NA, NULL);
|
||||
addflag(lastot->flags, F_STAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, "staircase");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_VSTAIRSDOWN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
|
@ -2818,10 +2826,10 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_EXPLODEONDAM, DT_FIRE, NA, NA, "2d4");
|
||||
addflag(lastot->flags, F_VALUE, 15, NA, NA, NULL);
|
||||
addot(OT_POT_COFFEE, "potion of coffee", "A caffeinated beverage prepared from coffee beans. Prevents your stamina from decreasing, but also prevents you from sleeping.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL);
|
||||
addflag(lastot->flags, F_VALUE, 10, NA, NA, NULL);
|
||||
addot(OT_POT_RUM, "potion of rum", "Strong liqour which is sure to make you tipsy. This will make you unsteady and lower your accuracy, but also let you ignore pain, minor damage, and many mental attacks.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL);
|
||||
addflag(lastot->flags, F_FLAMMABLE, 1, NA, NA, "medium fire");
|
||||
addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_DTVULN, DT_FIRE, NA, NA, NULL);
|
||||
|
@ -3904,7 +3912,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_MAXPOWER, 3, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_PLEASESGOD, R_GODNATURE, 1, NA, NULL);
|
||||
addot(OT_S_STICKTOSNAKE, "sticks to snakes", "Transforms all rod-shaped objects in sight into allied snakes.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "This spell does not affect the caster's weapon.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "This spell does not affect the caster's equipment.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_NATURE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
|
@ -4436,7 +4444,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOFLEE, ST_SELF, NA, NA, NULL);
|
||||
//addflag(lastot->flags, F_XPVAL, 50, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_LFSSTOP, NA, NULL);
|
||||
addot(OT_S_PASSWALL, "passwall", "Allows the caster to temporarily walk through a single wall.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell's power determines how long the caster can wait before entering a wall.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
|
@ -4628,7 +4636,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOFLEE, ST_VICTIM, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_LFSSTOP, NA, NULL);
|
||||
addot(OT_S_GATE, "gate", "Creates a portal to a different dungeon level (within ^bpower^n*2 levels).", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_TRANSLOCATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 4, NA, NA, NULL);
|
||||
|
@ -4906,7 +4914,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_STAMCOST, 2, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addot(OT_A_THRUST, "thrust", "Perform a long range attack on an enemy up to two cells away.", MT_NOTHING, 0, OC_ABILITY, SZ_TINY);
|
||||
addot(OT_A_THRUST, "thrust", "Perform a long range attack on an enemy up to two cells away (with slightly lower accuracy).", MT_NOTHING, 0, OC_ABILITY, SZ_TINY);
|
||||
addflag(lastot->flags, F_STAMCOST, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
|
@ -4942,88 +4950,88 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_RARITY, H_CAVE, 100, RR_VERYRARE, NULL);
|
||||
|
||||
// wands
|
||||
addot(OT_WAND_CREATEFOOD, "wand of culinary abundance", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_CREATEFOOD, "wand of culinary abundance", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_COMMON, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_CREATEFOOD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_NONE, NA, NA, NULL);
|
||||
addot(OT_WAND_KNOCK, "wand of opening", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_KNOCK, "wand of opening", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_COMMON, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_KNOCK, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_DOOR, NA, NA, NULL);
|
||||
/*
|
||||
addot(OT_WAND_LIGHT, "wand of light", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_LIGHT, "wand of light", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_COMMON, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_LIGHT, 3, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_MONSTER, TR_NEEDLOF, NA, NULL);
|
||||
*/
|
||||
addot(OT_WAND_NULLIFY, "wand of nullification", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_NULLIFY, "wand of nullification", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_NULLIFY, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_MONSTER, TR_NEEDLOF, NA, NULL);
|
||||
addot(OT_WAND_REVEALHIDDEN, "wand of reveal hidden", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_REVEALHIDDEN, "wand of reveal hidden", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_COMMON, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_REVEALHIDDEN, NA, NA, NULL);
|
||||
addot(OT_WAND_SLOW, "wand of slowness", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_SLOW, "wand of slowness", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_SLOW, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addot(OT_WAND_DIGGING, "wand of digging", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_DIGGING, "wand of digging", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_DIG, NA, NA, NULL);
|
||||
//addflag(lastot->flags, F_OPERNEEDTARGET, TT_NONE, NA, NA, NULL);
|
||||
addot(OT_WAND_COLD, "wand of cold", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_COLD, "wand of cold", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_COLDRAY, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addot(OT_WAND_FIRE, "wand of fire", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_FIRE, "wand of fire", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_FIREDART, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addot(OT_WAND_HASTE, "wand of haste", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_HASTE, "wand of haste", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_HASTE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, NA, NA, NULL);
|
||||
addot(OT_WAND_WEAKNESS, "wand of enfeeblement", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_WEAKNESS, "wand of enfeeblement", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_WEAKEN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addot(OT_WAND_WONDER, "wand of wonder", "Produces random effects.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_WONDER, "wand of wonder", "Produces random effects.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_NONE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addot(OT_WAND_INVIS, "wand of invisibility", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_INVIS, "wand of invisibility", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_INVISIBILITY, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, NA, NA, NULL);
|
||||
addot(OT_WAND_DISPERSAL, "wand of dispersal", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_DISPERSAL, "wand of dispersal", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_DISPERSAL, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_MONSTER|TT_OBJECT, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AIFLEEITEM, B_TRUE, NA, NA, NULL);
|
||||
addot(OT_WAND_FIREBALL, "wand of fireball", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_FIREBALL, "wand of fireball", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_FIREBALL, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addot(OT_WAND_DETONATION, "wand of detonation", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_DETONATION, "wand of detonation", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_DETONATE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_MONSTER|TT_DOOR, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
addot(OT_WAND_POLYMORPH, "wand of polymorph", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_POLYMORPH, "wand of polymorph", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_POLYMORPH, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addot(OT_WAND_TURNUNDEAD, "wand of turn undead", "A limited-use magical wand which casts the imbued spell.", MT_METAL, 0.5, OC_WAND, SZ_SMALL);
|
||||
addot(OT_WAND_TURNUNDEAD, "wand of turn undead", "A limited-use magical wand which casts the imbued spell.", MT_DRAGONWOOD, 0.5, OC_WAND, SZ_SMALL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_LINKSPELL, OT_S_TURNUNDEAD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERNEEDTARGET, TT_MONSTER, NA, NA, NULL);
|
||||
|
@ -8016,6 +8024,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CANBEDIFFMAT, MT_SILVER, 5, NA, NULL);
|
||||
addflag(lastot->flags, F_CANBLOCK, DT_SLASH, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_RODSHAPED, B_TRUE, NA, NA, NULL);
|
||||
|
||||
addot(OT_EPEE, "epee", "A short, narrow French sword made for fast movement and stabbing.", MT_METAL, 3.5, OC_WEAPON, SZ_MEDIUM);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, NA, NULL);
|
||||
|
@ -8870,6 +8879,7 @@ void initoptions(void) {
|
|||
addoption(OPT_AUTORELOAD, "automatically reload empty firearms", B_TRUE);
|
||||
addoption(OPT_RETRIEVE_MISSILES, "automatically retrieve used missiles", B_TRUE);
|
||||
addoption(OPT_STOPRUNONNOISE, "stop running if sound heard", B_TRUE);
|
||||
addoption(OPT_TIMEDEBUG, "enable performance debugging", B_FALSE);
|
||||
}
|
||||
|
||||
void initrace(void) {
|
||||
|
@ -9347,6 +9357,51 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_TAMABLE, 125, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
|
||||
|
||||
addrace(R_ELFDARK, "vell", 70, '@', C_BLUE, MT_FLESH, RC_HUMANOID, "Vell are a dark subspecies of Selnor, exiled for their usage of death magic. The Vell reliance on necromantic arts has given them an aversion to all metals, but also rendered them stronger than their Selnor cousins.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_PLAYABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_GTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 1, NA, 5, NULL);
|
||||
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOB, 80, NA, NA, "1-50 gold dollars");
|
||||
addflag(lastrace->flags, F_STARTOBCLASS, 65, OC_WEAPON, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBCLASS, 65, OC_ARMOUR, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBCLASS, 65, OC_ARMOUR, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBCLASS, 65, OC_ARMOUR, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBCLASS, 30, OC_POTION, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBCLASS, 30, OC_POTION, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBCLASS, 30, OC_SCROLL, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBCLASS, 30, OC_SCROLL, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTJOB, 33, J_WIZARD, SJ_NECROMANCER, NULL);
|
||||
addflag(lastrace->flags, F_STARTJOB, 50, J_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout");
|
||||
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, NULL);
|
||||
// bonuses
|
||||
addflag(lastrace->flags, F_SEEINDARK, 2, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MEDITATES, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MPMOD, 3, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_SS_DEATH, PR_NOVICE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_STEALTH, PR_NOVICE, NA, NULL);
|
||||
addflag(lastrace->flags, F_CONSUMESOULS, 10, NA, NA, NULL);
|
||||
// penalties
|
||||
addflag(lastrace->flags, F_MATVULN, MT_METAL, 200, NA, NULL);
|
||||
//addbonustext(lastrace->flags, F_PENDESC, "Slightly below average Hit Points.");
|
||||
addflag(lastrace->flags, F_TAMABLE, 175, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "ne");
|
||||
|
||||
addrace(R_MAMMOAN, "mammoan", 150, '@', C_GREY, MT_LEATHER, RC_HUMANOID, "Mammoans are huge, elephant-like humanoids. Their have great senses of hearing and smell, a photographic memory, and leather skin which greatly lessens damage. On the other hand they vision is poor, their movement slow, and their digestive system cannot cope with meat.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
noarmouron(lastrace, BP_EARS);
|
||||
|
@ -11380,11 +11435,11 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL);
|
||||
|
||||
addrace(R_GREMLIN, "gremlin", 20, 'g', C_BOLDGREEN, MT_FLESH, RC_HUMANOID, "Small mischievous imps known for their love of sabotage.");
|
||||
addrace(R_GREMLIN, "gremlin", 20, 'g', C_BOLDGREEN, MT_FLESH, RC_DEMON, "Small mischievous imps known for their love of sabotage.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
|
||||
|
@ -11401,7 +11456,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBCLASS, 50, OC_TECH, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOB, 50, OC_TECH, NA, "wand of wonder");
|
||||
addflag(lastrace->flags, F_STARTOB, 20, OC_TECH, NA, "wand of wonder");
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "chuckles^a chuckle");
|
||||
addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL);
|
||||
|
@ -16223,7 +16278,7 @@ void initrace(void) {
|
|||
|
||||
addrace(R_BUTTERFLY, "butterfly", 0.01, 'i', C_YELLOW, MT_FLESH, RC_INSECT, "A harmless, colourful butterfly.");
|
||||
setbodytype(lastrace, BT_BIRD);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
||||
//addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_INSECT, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_EXLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
|
||||
|
@ -16558,7 +16613,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_WINGS, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_HEAVEN, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL);
|
||||
|
@ -16627,7 +16682,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
|
||||
|
@ -16651,7 +16706,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_TINY, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 1, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 2, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
|
@ -16673,7 +16728,7 @@ void initrace(void) {
|
|||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addbodypart(lastrace, BP_WINGS, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RETALIATE, DT_PIERCE, NA, NA, "1d4^razor-sharp spikes");
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
|
@ -16742,7 +16797,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addbodypart(lastrace, BP_WINGS, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_HEAVEN, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
|
@ -17290,7 +17345,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_VAMPIRIC, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTVULN, DT_LIGHT, NA, NA, "3d6");
|
||||
addflag(lastrace->flags, F_MATVULN, MT_SILVER, 200, NA, NULL);
|
||||
addflag(lastrace->flags, F_MATVULN, MT_SILVER, 200, 6, NULL);
|
||||
addflag(lastrace->flags, F_SEEINVIS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, 8, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_AVOIDOBTYPE, OT_GARLIC, B_TRUE, NA, NULL);
|
||||
|
@ -17336,7 +17391,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MATVULN, MT_SILVER, 200, NA, NULL);
|
||||
addflag(lastrace->flags, F_MATVULN, MT_SILVER, 200, 6, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL);
|
||||
|
@ -17382,7 +17437,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MATVULN, MT_SILVER, 200, NA, NULL);
|
||||
addflag(lastrace->flags, F_MATVULN, MT_SILVER, 200, 6, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, 7, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL);
|
||||
|
@ -17425,7 +17480,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MATVULN, MT_SILVER, 200, NA, NULL);
|
||||
addflag(lastrace->flags, F_MATVULN, MT_SILVER, 200, 6, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL);
|
||||
|
@ -17604,7 +17659,7 @@ void initrace(void) {
|
|||
} else if (r->raceclass->id == RC_DEMON) {
|
||||
addflag(r->flags, F_NOBREATH, B_TRUE, NA, NA, NULL);
|
||||
addflag(r->flags, F_DISEASEIMMUNE, B_TRUE, NA, NA, NULL);
|
||||
addflag(r->flags, F_MATVULN, MT_SILVER, 200, NA, NULL);
|
||||
addflag(r->flags, F_MATVULN, MT_SILVER, 200, 6, NULL);
|
||||
addflag(r->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
|
||||
addflag(r->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
|
||||
addflag(r->flags, F_SEEINVIS, B_TRUE, NA, NA, NULL);
|
||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
4
defs.h
4
defs.h
|
@ -1038,6 +1038,7 @@ enum RACE {
|
|||
R_CYBORG,
|
||||
R_DWARF,
|
||||
R_ELF,
|
||||
R_ELFDARK,
|
||||
R_HUMAN,
|
||||
R_MAMMOAN,
|
||||
R_WYRMSPAWN,
|
||||
|
@ -2639,6 +2640,7 @@ enum FLAG {
|
|||
F_MATIMMUNE, // immune to damage from obs with material 'v0'
|
||||
F_MATVULN, // vulnarable to damage from obs with material 'v0'
|
||||
// v1 = this % of damage is done. ie. 110%
|
||||
// if v2 > 0, you take this much dam by touching it
|
||||
F_PURIFIESTO, // v0 = new obid after purify food spell
|
||||
F_CLIMBOBSTACLE, // must pass climb check of difficulty v0 to
|
||||
// walk onto this object. if you fail, you fall
|
||||
|
@ -2806,6 +2808,7 @@ enum FLAG {
|
|||
// to find it.
|
||||
// NA means 'can never find this'
|
||||
// stairs / teleporters / portals
|
||||
F_STAIRS, // this object counts as a 'staircase'
|
||||
F_CLIMBABLE, // this is a stiarcase, v0 = up/down/in
|
||||
// also use this for portals
|
||||
// text = you climb down a/an XXXX
|
||||
|
@ -4151,6 +4154,7 @@ enum OPTION {
|
|||
OPT_AUTORELOAD,
|
||||
OPT_RETRIEVE_MISSILES,
|
||||
OPT_STOPRUNONNOISE,
|
||||
OPT_TIMEDEBUG,
|
||||
};
|
||||
|
||||
typedef struct option_s {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
defs.h:
|
||||
add RACE enum (R_xx)
|
||||
add OT_CORPSExxx obtype
|
||||
|
||||
lf.c:
|
||||
addrace(R_xx)
|
||||
|
|
7
god.c
7
god.c
|
@ -41,6 +41,9 @@ void angergod(enum RACE rid, int amt, enum GODANGERREASON why) {
|
|||
enum PIETYLEV plev;
|
||||
int dosay = B_FALSE;
|
||||
|
||||
// don't please/anger gods while enraged.
|
||||
if (lfhasflag(player, F_RAGE)) return;
|
||||
|
||||
if (lfhasflag(player, F_WINNER)) return;
|
||||
|
||||
god = findgod(rid);
|
||||
|
@ -1626,6 +1629,10 @@ void modpiety(enum RACE rid, int amt) {
|
|||
void pleasegod(enum RACE rid, int amt) {
|
||||
lifeform_t *lf;
|
||||
char lfname[BUFLEN];
|
||||
|
||||
// don't please/anger gods while enraged.
|
||||
if (lfhasflag(player, F_RAGE)) return;
|
||||
|
||||
lf = findgod(rid);
|
||||
real_getlfname(lf, lfname, NULL, B_NOSHOWALL, B_REALRACE);
|
||||
|
||||
|
|
26
io.c
26
io.c
|
@ -1554,6 +1554,12 @@ int announceflaggain(lifeform_t *lf, flag_t *f) {
|
|||
}
|
||||
donesomething = B_TRUE;
|
||||
break;
|
||||
case F_CONSUMESOULS:
|
||||
if (isplayer(lf)) {
|
||||
msg("^wYou hunger for the souls of the dead!");
|
||||
donesomething = B_TRUE;
|
||||
}
|
||||
break;
|
||||
case F_DEAF:
|
||||
if (isplayer(lf)) {
|
||||
msg("^wYou cannot hear anything!");
|
||||
|
@ -2297,6 +2303,12 @@ int announceflagloss(lifeform_t *lf, flag_t *f) {
|
|||
}
|
||||
donesomething = B_TRUE;
|
||||
break;
|
||||
case F_CONSUMESOULS:
|
||||
if (isplayer(lf)) {
|
||||
msg("Your hunger for souls has abated.");
|
||||
donesomething = B_TRUE;
|
||||
}
|
||||
break;
|
||||
case F_DEAF:
|
||||
if (isplayer(lf)) {
|
||||
msg("Your hearing returns.");
|
||||
|
@ -6735,6 +6747,10 @@ char *makedesc_ob(object_t *o, char *retbuf) {
|
|||
sprintf(buf2, "%s lets you control teleportation and polymorphic effects.\n", buf);
|
||||
strncat(retbuf, buf2, HUGEBUFLEN);
|
||||
break;
|
||||
case F_CONSUMESOULS:
|
||||
sprintf(buf2, "%s allows you to consume the souls of nearby dead.\n", buf);
|
||||
strncat(retbuf, buf2, HUGEBUFLEN);
|
||||
break;
|
||||
case F_DEAF:
|
||||
sprintf(buf2, "%s prevents you from hearing anything.\n", buf);
|
||||
strncat(retbuf, buf2, HUGEBUFLEN);
|
||||
|
@ -7388,6 +7404,11 @@ char *makedesc_race(enum RACE rid, char *retbuf, int showextra, int forplayersel
|
|||
case F_AQUATIC: if (lorelev >= PR_NOVICE) strcpy(buf, "Moves normally through water"); break;
|
||||
case F_AWARENESS: if (lorelev >= PR_BEGINNER) strcpy(buf, "Can see in all directions."); break;
|
||||
case F_CANEATRAW: if (lorelev >= PR_ADEPT) strcpy(buf, "Can safely digest raw meat."); break;
|
||||
case F_CONSUMESOULS:
|
||||
if (lorelev >= PR_BEGINNER) {
|
||||
strcpy(buf, "Consumes the souls of nearby dead."); ;
|
||||
}
|
||||
break;
|
||||
case F_DAYBOOST:
|
||||
if (lorelev >= PR_ADEPT) {
|
||||
if (f->val[0] > 0) {
|
||||
|
@ -13373,6 +13394,11 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
mvwprintw(mainwin, y, 0, "%s %s confused.", you(lf), is(lf));
|
||||
y++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_CONSUMESOULS);
|
||||
if (f) {
|
||||
mvwprintw(mainwin, y, 0, "%s can consume souls of those who die nearby.", you(lf));
|
||||
y++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_DETECTAURAS);
|
||||
if (f) {
|
||||
mvwprintw(mainwin, y, 0, "%s automatically detect blessings or curses.", you(lf));
|
||||
|
|
101
lf.c
101
lf.c
|
@ -9479,15 +9479,23 @@ int getshieldblockmod(lifeform_t *lf, object_t *o) {
|
|||
slev = getweaponskill(lf, o) - 2;
|
||||
}
|
||||
switch (slev) {
|
||||
/*
|
||||
case PR_NOVICE: othermod = 0; break;
|
||||
case PR_BEGINNER: othermod = 4; break;
|
||||
case PR_ADEPT: othermod = 7; break;
|
||||
case PR_SKILLED: othermod = 10; break;
|
||||
case PR_EXPERT: othermod = 13; break;
|
||||
case PR_MASTER: othermod = 16; break;
|
||||
*/
|
||||
case PR_NOVICE: othermod = 0; break;
|
||||
case PR_BEGINNER: othermod = 10; break;
|
||||
case PR_ADEPT: othermod = 20; break;
|
||||
case PR_SKILLED: othermod = 30; break;
|
||||
case PR_EXPERT: othermod = 40; break;
|
||||
case PR_MASTER: othermod = 50; break;
|
||||
default:
|
||||
// should never happen
|
||||
othermod = -4;
|
||||
othermod = -15;
|
||||
break;
|
||||
}
|
||||
return othermod;
|
||||
|
@ -11404,7 +11412,7 @@ flag_t *giveskill(lifeform_t *lf, enum SKILL id) {
|
|||
}
|
||||
}
|
||||
} else if (id == SK_LORE_NATURE) {
|
||||
if (f->val[1] == PR_ADEPT) {
|
||||
if (f->val[1] == PR_BEGINNER) {
|
||||
if (isplayer(lf)) {
|
||||
makeknown(OT_MUSHROOMSHI);
|
||||
makeknown(OT_MUSHROOMTOAD);
|
||||
|
@ -11573,9 +11581,11 @@ void givestartobs(lifeform_t *lf, object_t *targob, flagpile_t *fp) {
|
|||
targmap = c->map;
|
||||
maxobsize = getobsize(targob);
|
||||
if (hasflag(targob->flags, F_SHOP)) isshop = B_TRUE;
|
||||
} else {
|
||||
} else if (lf) {
|
||||
op = lf->pack;
|
||||
targmap = lf->cell->map;
|
||||
} else {
|
||||
assert("error - givestartobs() called without lf or targob" == 0);
|
||||
}
|
||||
|
||||
if (db) {
|
||||
|
@ -11623,7 +11633,11 @@ void givestartobs(lifeform_t *lf, object_t *targob, flagpile_t *fp) {
|
|||
dam = f2->val[1];
|
||||
sprintf(thisdesc, "%s (Damage: %d %s, Accuracy: %s)", poss[i]->name,
|
||||
dam, getdamname(dt), getaccuracyname(acc));
|
||||
addchoice(&prompt, ch++, thisdesc, NULL, poss[i], NULL);
|
||||
|
||||
// don't allow this if the player is vulnerable to it!
|
||||
if (!lfhasflagval(lf, F_MATVULN, poss[i]->material->id, NA, NA, NULL)) {
|
||||
addchoice(&prompt, ch++, thisdesc, NULL, poss[i], NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (prompt.nchoices == 1) {
|
||||
|
@ -11807,11 +11821,19 @@ void givestartobs(lifeform_t *lf, object_t *targob, flagpile_t *fp) {
|
|||
|
||||
// some things aren't possible...
|
||||
if (o) {
|
||||
int obok = B_TRUE;
|
||||
if (!obfits(o, op)) {
|
||||
killob(o);
|
||||
o = NULL;
|
||||
// don't add objects which won't fit
|
||||
obok = B_FALSE;
|
||||
} else if (op->parentob && hasflag(o->flags, F_CONTAINER)) {
|
||||
// don't put containers in other containers
|
||||
obok = B_FALSE;
|
||||
} else if (lf && lfhasflagval(lf, F_MATVULN, o->material->id, NA, NA, NULL)) {
|
||||
// don't start with objects which are dangerous to the lf
|
||||
obok = B_FALSE;
|
||||
}
|
||||
|
||||
if (!obok) {
|
||||
killob(o);
|
||||
o = NULL;
|
||||
}
|
||||
|
@ -14526,6 +14548,8 @@ lifeform_t *makezombie(object_t *o) {
|
|||
int areenemies(lifeform_t *lf1, lifeform_t *lf2) {
|
||||
reason = E_OK;
|
||||
|
||||
if (ispetof(lf1, lf2) || ispetof(lf2, lf1)) return B_FALSE;
|
||||
|
||||
if (!isplayer(lf1) && lfhasflagval(lf1, F_TARGETLF, lf2->id, NA, NA, NULL)) return B_TRUE;
|
||||
if (!isplayer(lf2) && lfhasflagval(lf2, F_TARGETLF, lf1->id, NA, NA, NULL)) return B_TRUE;
|
||||
|
||||
|
@ -19916,6 +19940,10 @@ int modskillcheckroll(lifeform_t *lf, enum CHECKTYPE ct, int *roll) {
|
|||
int bonus = 0;
|
||||
sumflags(lf->flags, F_ENHANCESEARCH, &bonus, NULL, NULL);
|
||||
othermod += bonus;
|
||||
// hard to search while fighting!
|
||||
if (isinbattle(lf, B_NODISTANT, B_FALSE)) {
|
||||
othermod -= 50;
|
||||
}
|
||||
} else if (ct == SC_SPEECH) {
|
||||
othermod += (getskill(lf, SK_SPEECH)*10);
|
||||
} else if (ct == SC_STEAL) {
|
||||
|
@ -19985,6 +20013,7 @@ int modskillcheckroll(lifeform_t *lf, enum CHECKTYPE ct, int *roll) {
|
|||
if (pctchance(5)) {
|
||||
switch (ct) {
|
||||
case SC_DODGE:
|
||||
case SC_SEARCH: // so that you never get stuck with secret doors
|
||||
case SC_STEALTH:
|
||||
if (db) {
|
||||
msg("%s skillcheck autopassed with 'natural 20'.", lf->race->name);
|
||||
|
@ -20949,9 +20978,9 @@ void startlfturn(lifeform_t *lf) {
|
|||
for (i = 0; i < lf->nlos; i++) {
|
||||
if (!lf->los[i]->lf || (lf->los[i]->lf == lf)) {
|
||||
object_t *o;
|
||||
int multiplier;
|
||||
multiplier = getcelldist(lf->cell, lf->los[i]);
|
||||
limit(&multiplier, 1, NA);
|
||||
int distmod;
|
||||
distmod = getcelldist(lf->cell, lf->los[i]);
|
||||
limit(&distmod, 1, NA);
|
||||
for (o = lf->los[i]->obpile->first; o ; o = o->next) {
|
||||
flag_t *f;
|
||||
int mod = 0;
|
||||
|
@ -20962,7 +20991,7 @@ void startlfturn(lifeform_t *lf) {
|
|||
if (hasflag(o->flags, F_TRAP)) {
|
||||
mod += (getskill(lf, SK_TRAPS)*2);
|
||||
}
|
||||
diff = f->val[0] * multiplier;
|
||||
diff = f->val[0] + (distmod*15);
|
||||
if (skillcheck(lf, SC_SEARCH, diff, mod)) {
|
||||
char obname[BUFLEN];
|
||||
// reveal it
|
||||
|
@ -20989,7 +21018,7 @@ void startlfturn(lifeform_t *lf) {
|
|||
ot = findot(f->val[0]);
|
||||
trapflag = hasflag(ot->flags, F_TRAP);
|
||||
assert(trapflag);
|
||||
diff = trapflag->val[0] * multiplier;
|
||||
diff = trapflag->val[0] + (distmod*20);
|
||||
mod += getskill(lf, SK_TRAPS);
|
||||
if (skillcheck(lf, SC_SEARCH, diff, mod)) {
|
||||
char obname[BUFLEN];
|
||||
|
@ -22558,26 +22587,41 @@ int real_touch(lifeform_t *lf, object_t *o, int onpurpose) {
|
|||
if (!hasflag(o->flags, F_TAINTED)) {
|
||||
addflag(o->flags, F_TAINTED, B_TRUE, NA, NA, NULL);
|
||||
}
|
||||
return B_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
f = hasflag(o->flags, F_SHARP);
|
||||
if (f) {
|
||||
object_t *gloves;
|
||||
if (!gloves) {
|
||||
if (isplayer(lf)) {
|
||||
msg("^bOw! You cut your finger on %s.", obname);
|
||||
}
|
||||
|
||||
snprintf(buf, BUFLEN, "touching %s", obname);
|
||||
losehp(lf, rnd(1,2), DT_SLASH, NULL, buf);
|
||||
// drop the object if we're holding it
|
||||
if ((o->pile->owner == lf) && !isequipped(o)) {
|
||||
drop(o, ALL);
|
||||
}
|
||||
if (f && !gloves) {
|
||||
if (isplayer(lf)) {
|
||||
msg("^bOw! You cut your finger on %s.", obname);
|
||||
}
|
||||
|
||||
snprintf(buf, BUFLEN, "touching %s", obname);
|
||||
losehp(lf, rnd(1,2), DT_SLASH, NULL, buf);
|
||||
bleed(lf, B_FALSE);
|
||||
// drop the object if we're holding it
|
||||
if ((o->pile->owner == lf) && !isequipped(o)) {
|
||||
drop(o, ALL);
|
||||
}
|
||||
return B_TRUE;
|
||||
}
|
||||
|
||||
f = (lfhasflagval(lf, F_MATVULN, o->material->id, NA, NA, NULL));
|
||||
if (f && (f->val[2] > 0) && !gloves) {
|
||||
if (isplayer(lf)) {
|
||||
msg("^%cThe %s%s %s burns you!", getlfcol(lf, CC_BAD),
|
||||
obname, getpossessive(obname), o->material->name);
|
||||
} else if (cansee(player, lf)) {
|
||||
msg("^%cThe %s%s %s burns %s!", getlfcol(lf, CC_BAD),
|
||||
obname, getpossessive(obname), o->material->name);
|
||||
}
|
||||
sprintf(buf, "the touch of %s", o->material->name);
|
||||
losehp(lf, pctof(f->val[1], f->val[2], DT_DIRECT, NULL, buf);
|
||||
return B_TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
if (isequipped(o) && !isweapon(o) && !isimmuneto(lf->flags, DT_FIRE, B_FALSE)) {
|
||||
f = hasflag(o->flags, F_HOT);
|
||||
|
@ -24650,6 +24694,11 @@ int weild(lifeform_t *lf, object_t *o) {
|
|||
return B_FALSE;
|
||||
}
|
||||
|
||||
if (touch(lf, o)) {
|
||||
taketime(lf, getactspeed(lf));
|
||||
return B_TRUE;
|
||||
}
|
||||
|
||||
// now weild this
|
||||
addflag(o->flags, F_EQUIPPED, weildloc, -1, -1, NULL);
|
||||
if (istwohandedfor(o, lf)) {
|
||||
|
@ -24672,6 +24721,8 @@ int weild(lifeform_t *lf, object_t *o) {
|
|||
}
|
||||
strcat(buf2, ".");
|
||||
msg(buf2);
|
||||
|
||||
|
||||
// warn if it won't do any damage
|
||||
if (!ismeleeweapon(o) && !isfirearm(o)) {
|
||||
msg("^wYou have a feeling that this weapon will not be very effective...");
|
||||
|
@ -24706,8 +24757,6 @@ int weild(lifeform_t *lf, object_t *o) {
|
|||
}
|
||||
|
||||
|
||||
touch(lf, o);
|
||||
|
||||
if (o->blessed == B_CURSED) {
|
||||
if (isplayer(lf)) {
|
||||
msg("^bOh no! The %s releases a pulse of evil!", strchr(buf, ' ')+1);
|
||||
|
|
111
map.c
111
map.c
|
@ -317,44 +317,42 @@ lifeform_t *addmonster(cell_t *c, enum RACE rid, char *racename, int randomjobok
|
|||
for (i = 0; i < nretflags; i++) {
|
||||
f = retflag[i];
|
||||
// has a job?
|
||||
if (f->id == F_STARTJOB) {
|
||||
if (rnd(1,100) <= f->val[0]) {
|
||||
if (rnd(1,100) <= f->val[0]) {
|
||||
job_t *j;
|
||||
enum SUBJOB wantsubjob;
|
||||
if (f->val[1] == J_RANDOM) {
|
||||
job_t *j;
|
||||
enum SUBJOB wantsubjob;
|
||||
if (f->val[1] == J_RANDOM) {
|
||||
job_t *j;
|
||||
j = getrandomjob(B_TRUE);
|
||||
wantjob = j->id;
|
||||
} else {
|
||||
wantjob = f->val[1];
|
||||
}
|
||||
// special case: wizards MUST have a subjob.
|
||||
if (wantjob == J_WIZARD) {
|
||||
wantsubjob = SJ_RANDOM;
|
||||
} else {
|
||||
wantsubjob = f->val[2];
|
||||
}
|
||||
givejob(lf, wantjob);
|
||||
|
||||
j = findjob(wantjob);
|
||||
// subjob ?
|
||||
if (j && (wantsubjob != NA)) {
|
||||
// cope with random
|
||||
if (wantsubjob == SJ_RANDOM) {
|
||||
// find a subjob which applies
|
||||
flag_t *retflag[MAXCANDIDATES];
|
||||
int nretflags;
|
||||
|
||||
getflags(j->flags, retflag, &nretflags, F_CANHAVESUBJOB, F_NONE);
|
||||
if (nretflags) {
|
||||
givesubjob(lf, retflag[rnd(0,nretflags-1)]->val[0]);
|
||||
}
|
||||
} else {
|
||||
givesubjob(lf, wantsubjob);
|
||||
}
|
||||
}
|
||||
break;
|
||||
j = getrandomjob(B_TRUE);
|
||||
wantjob = j->id;
|
||||
} else {
|
||||
wantjob = f->val[1];
|
||||
}
|
||||
// special case: wizards MUST have a subjob.
|
||||
if (wantjob == J_WIZARD) {
|
||||
wantsubjob = SJ_RANDOM;
|
||||
} else {
|
||||
wantsubjob = f->val[2];
|
||||
}
|
||||
givejob(lf, wantjob);
|
||||
|
||||
j = findjob(wantjob);
|
||||
// subjob ?
|
||||
if (j && (wantsubjob != NA)) {
|
||||
// cope with random
|
||||
if (wantsubjob == SJ_RANDOM) {
|
||||
// find a subjob which applies
|
||||
flag_t *retflag[MAXCANDIDATES];
|
||||
int nretflags;
|
||||
|
||||
getflags(j->flags, retflag, &nretflags, F_CANHAVESUBJOB, F_NONE);
|
||||
if (nretflags) {
|
||||
givesubjob(lf, retflag[rnd(0,nretflags-1)]->val[0]);
|
||||
}
|
||||
} else {
|
||||
givesubjob(lf, wantsubjob);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7118,12 +7116,22 @@ int getslipperyness(cell_t *c, object_t **slipob) {
|
|||
int bestslip = 0;
|
||||
int totalslip = 0;
|
||||
int addition = 0;
|
||||
int pctmod = 100;
|
||||
if (slipob) *slipob = NULL;
|
||||
|
||||
switch (c->type->id) {
|
||||
case CT_FLOORTILE: addition = 10; break;
|
||||
case CT_FLOORCARPET: addition = -10; break;
|
||||
default: addition = 0; break;
|
||||
case CT_FLOORTILE:
|
||||
addition = 10;
|
||||
pctmod += 50;
|
||||
break;
|
||||
case CT_FLOORCARPET:
|
||||
addition = -10;
|
||||
pctmod -= 50;
|
||||
break;
|
||||
default:
|
||||
addition = 0;
|
||||
pctmod = 100;
|
||||
break;
|
||||
}
|
||||
|
||||
for (o = c->obpile->first ; o ; o = o->next) {
|
||||
|
@ -7135,7 +7143,7 @@ int getslipperyness(cell_t *c, object_t **slipob) {
|
|||
bestob = o;
|
||||
bestslip = thisslip;
|
||||
}
|
||||
thisslip += addition;
|
||||
thisslip += pctof(pctmod, addition);
|
||||
thisslip *= o->amt;
|
||||
totalslip += thisslip;
|
||||
}
|
||||
|
@ -8265,18 +8273,39 @@ void mapentereffects(map_t *m) {
|
|||
*/
|
||||
}
|
||||
|
||||
// monsters on the new level now get a bunch of turns to simulate them moving about when the player wasn't there.
|
||||
// if you've been here before...
|
||||
if (m->lastplayervisit != -1) {
|
||||
int nturns;
|
||||
int dowandering = B_FALSE;
|
||||
|
||||
enteringmap = B_TRUE;
|
||||
|
||||
// monsters on the new level now get a bunch of turns to simulate them moving about when the player wasn't there.
|
||||
nturns = (curtime - m->lastplayervisit) / TICK_INTERVAL;
|
||||
if (nturns >= 50) {
|
||||
dowandering = B_TRUE;
|
||||
}
|
||||
limit(&nturns, NA, 20);
|
||||
//nturns *= countlfs(m);
|
||||
for (i = 0; i < nturns; i++) {
|
||||
donextturn(m);
|
||||
}
|
||||
|
||||
// (depth*5)% chance of a wandering monster in each room, as long as the
|
||||
// chosen cell is not near stairs
|
||||
if (dowandering) {
|
||||
int monchance;
|
||||
monchance = getmapdifficulty(m)*5;
|
||||
for (i = 0; i < m->nrooms; i++) {
|
||||
if (pctchance(monchance)) {
|
||||
c = getrandomroomcell(m, m->room[i].id, WE_WALKABLE);
|
||||
if (c && !hasobflagwithin(c, F_STAIRS, 15, DT_COMPASS)) {
|
||||
addmonster(c, R_RANDOM, NULL, B_TRUE, 1, B_TRUE, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enteringmap = B_FALSE;
|
||||
}
|
||||
}
|
||||
|
|
15
move.c
15
move.c
|
@ -2534,7 +2534,7 @@ int initiatemove(lifeform_t *lf, cell_t *cell, int onpurpose, int *didmsg) {
|
|||
}
|
||||
|
||||
// are we on the ground?
|
||||
if (isprone(lf) && (!isplayer(lf) || !attacking)) {
|
||||
if (isprone(lf) && (!isplayer(lf) || !attacking) && onpurpose) {
|
||||
int willstand = B_FALSE;
|
||||
if (isplayer(lf)) {
|
||||
if (!attacking) {
|
||||
|
@ -2559,7 +2559,7 @@ int initiatemove(lifeform_t *lf, cell_t *cell, int onpurpose, int *didmsg) {
|
|||
|
||||
|
||||
// slipping on something before moving?
|
||||
if (!attacking) {
|
||||
if (!attacking && onpurpose) {
|
||||
if (!isairborne(lf)) {
|
||||
int slip;
|
||||
object_t *slipob;
|
||||
|
@ -3139,6 +3139,14 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
|
|||
msg("%s %ss into a %s.", buf, getmoveverb(lf),
|
||||
cell ? cell->type->name : "wall");
|
||||
}
|
||||
if (cell && isplayer(lf) && haslos(lf, cell)) {
|
||||
object_t *door;
|
||||
door = hassecretdoor(cell->obpile);
|
||||
if (door) {
|
||||
msg("^gThere seems to be a secret door here!");
|
||||
killflagsofid(door->flags, F_SECRET);
|
||||
}
|
||||
}
|
||||
//if (isblind(lf) || !haslos(lf, cell)) {
|
||||
if (!cell || !haslos(lf, cell)) {
|
||||
if (isplayer(lf)) {
|
||||
|
@ -3152,15 +3160,14 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
|
|||
setcellknown(cell, B_FALSE);
|
||||
}
|
||||
|
||||
if (onpurpose) taketime(lf, getmovespeed(lf));
|
||||
}
|
||||
} else {
|
||||
snprintf(buf, BUFLEN, "%sing into a %s", getmoveverb(lf),
|
||||
cell ? cell->type->name : "wall");
|
||||
losehp(lf, 1, DT_BASH, NULL, buf);
|
||||
if (onpurpose) taketime(lf, getmovespeed(lf));
|
||||
}
|
||||
}
|
||||
if (onpurpose) taketime(lf, getmovespeed(lf));
|
||||
break;
|
||||
case E_DOORINWAY:
|
||||
// can't open doors while climbing
|
||||
|
|
21
nexus.c
21
nexus.c
|
@ -714,6 +714,18 @@ void cleanup(void) {
|
|||
//WriteMemLeak();
|
||||
}
|
||||
|
||||
void dbtimestartlf(lifeform_t *lf) {
|
||||
char buf[BUFLEN];
|
||||
snprintf(buf, BUFLEN, "%s (id %d), seenbyplayer = %s",lf->race->name, lf->id, cansee(player, lf) ? "YES" : "NO");
|
||||
dbtimestart(buf);
|
||||
}
|
||||
|
||||
void dbtimeendlf(lifeform_t *lf) {
|
||||
char buf[BUFLEN];
|
||||
snprintf(buf, BUFLEN, "%s (id %d), numdraws=%d",lf->race->name, lf->id, numdraws);
|
||||
dbtimeend(buf);
|
||||
}
|
||||
|
||||
void dbtimestart(char *text) {
|
||||
gettimeofday(&tv, NULL);
|
||||
starttv = tv;
|
||||
|
@ -760,9 +772,12 @@ void donextturn(map_t *map) {
|
|||
if (who) {
|
||||
if (db) dblog("**** donextturn for: id %d %s", who->id, who->race->name);
|
||||
|
||||
|
||||
assert(who->timespent == 0);
|
||||
|
||||
if (getoption(OPT_TIMEDEBUG)) {
|
||||
dbtimestartlf(who);
|
||||
}
|
||||
|
||||
startlfturn(who);
|
||||
|
||||
// calculate light
|
||||
|
@ -1093,6 +1108,10 @@ void donextturn(map_t *map) {
|
|||
}
|
||||
|
||||
if (!isdead(who)) endlfturn(who);
|
||||
|
||||
if (getoption(OPT_TIMEDEBUG)) {
|
||||
dbtimeendlf(who);
|
||||
}
|
||||
} // end 'if (who)'
|
||||
|
||||
if (isplayer(who)) {
|
||||
|
|
2
nexus.h
2
nexus.h
|
@ -7,7 +7,9 @@ void checkendgame(void);
|
|||
void cleanup(void);
|
||||
void dbtime(char *text);
|
||||
void dbtimeend(char *text);
|
||||
void dbtimeendlf(lifeform_t *lf);
|
||||
void dbtimestart(char *text);
|
||||
void dbtimestartlf(lifeform_t *lf);
|
||||
void dobresnham(int d, int xinc1, int yinc1, int dinc1, int xinc2, int yinc2, int dinc2, int *xinc, int *yinc, int *dinc);
|
||||
void donextturn(map_t *map);
|
||||
command_t *findcommand(enum COMMAND id);
|
||||
|
|
74
objects.c
74
objects.c
|
@ -1440,6 +1440,15 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum
|
|||
o->blessed = B_CURSED;
|
||||
}
|
||||
}
|
||||
if (where->owner && isundead(where->owner)) {
|
||||
// never blessed!
|
||||
o->blessed = B_UNCURSED;
|
||||
// probably cursed
|
||||
if (pctchance(80)) {
|
||||
o->blessed = B_CURSED;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// fill in portal destinations
|
||||
if (targetmap) {
|
||||
|
@ -6967,6 +6976,28 @@ object_t *hasobid(obpile_t *op, long id) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// is there an object of type oid within 'dist' of cell
|
||||
object_t *hasobflagwithin(cell_t *start, enum FLAG fid, int dist, int disttype) {
|
||||
cell_t *retcell[MAXCANDIDATES],*c;
|
||||
int nretcells,i,mindist=9999;
|
||||
object_t *bestob = NULL;
|
||||
getradiuscells(start, dist, disttype, B_FALSE, LOF_DONTNEED, B_INCLUDECENTRE, retcell, &nretcells, 0);
|
||||
for (i = 0; i < nretcells; i++) {
|
||||
int thisdist;
|
||||
c = retcell[i];
|
||||
thisdist = getcelldist(c, start);
|
||||
if (thisdist < mindist) {
|
||||
object_t *o = NULL;
|
||||
o = hasobwithflag(c->obpile, fid);
|
||||
if (o) {
|
||||
bestob = o;
|
||||
mindist = thisdist;
|
||||
}
|
||||
}
|
||||
}
|
||||
return bestob;
|
||||
}
|
||||
|
||||
object_t *hassecretdoor(obpile_t *op) {
|
||||
object_t *o;
|
||||
for (o = op->first ; o ; o = o->next) {
|
||||
|
@ -9250,31 +9281,47 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) {
|
|||
|
||||
if (isplayer(lf)) {
|
||||
char subprompt[BUFLEN];
|
||||
enum LOFTYPE askltype;
|
||||
enum LOFTYPE ltype;
|
||||
|
||||
if (!isknown(o)) {
|
||||
// default to needing lof
|
||||
ltype = LOF_NEED;
|
||||
f2 = hasflag(o->flags, F_LINKSPELL);
|
||||
if (f2) {
|
||||
ltype = getspellloftype(f2->val[0]);
|
||||
} else {
|
||||
f2 = hasflag(o->flags, F_LINKSPELL);
|
||||
if (f2) {
|
||||
ltype = getspellloftype(f2->val[0]);
|
||||
} else {
|
||||
ltype = LOF_NEED;
|
||||
}
|
||||
ltype = LOF_NEED;
|
||||
}
|
||||
if (isknown(o)) {
|
||||
askltype = ltype;
|
||||
} else {
|
||||
// default to needing lof, lfs don't count
|
||||
askltype = LOF_WALLSTOP;
|
||||
}
|
||||
|
||||
snprintf(subprompt, BUFLEN, "%s->Aim->", obname);
|
||||
if (strlen(f->text) > 0) {
|
||||
where = askcoords(f->text, subprompt, ttype, lf, range, ltype, B_TRUE);
|
||||
where = askcoords(f->text, subprompt, ttype, lf, range, askltype, B_TRUE);
|
||||
} else {
|
||||
snprintf(buf, BUFLEN, "Where will you aim %s?",obname);
|
||||
where = askcoords(buf, subprompt, ttype, lf, range, ltype, B_TRUE);
|
||||
where = askcoords(buf, subprompt, ttype, lf, range, askltype, B_TRUE);
|
||||
if (!haslos(lf, where)) {
|
||||
msg("You can't see there!");
|
||||
return B_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// now adjust target cell for line-of-fire....
|
||||
if (ltype != askltype) {
|
||||
cell_t *newcell;
|
||||
if (ltype != LOF_DONTNEED) {
|
||||
if (!haslof(lf->cell, where, ltype, &newcell)) {
|
||||
where = newcell;
|
||||
if (!where) {
|
||||
msg("For some reason you can't aim there.");
|
||||
return B_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
char lfname[BUFLEN];
|
||||
getlfname(lf, lfname);
|
||||
|
@ -14111,9 +14158,10 @@ void timeeffectsob(object_t *o) {
|
|||
ourcell = getoblocation(o);
|
||||
if (ourcell) {
|
||||
int x,y;
|
||||
int disttocheck = 3;
|
||||
// check if we are near undead (ie. within 2 sq)
|
||||
for (y = ourcell->y - 2; y <= ourcell->y + 2; y++) {
|
||||
for (x = ourcell->x - 2; x <= ourcell->x + 2; x++) {
|
||||
for (y = ourcell->y - disttocheck; y <= ourcell->y + disttocheck; y++) {
|
||||
for (x = ourcell->x - disttocheck; x <= ourcell->x + disttocheck; x++) {
|
||||
cell_t *c;
|
||||
c = getcellat(ourcell->map, x, y);
|
||||
if (c && haslf(c) && isundead(c->lf)) {
|
||||
|
|
|
@ -170,6 +170,7 @@ object_t *hasobmulti(obpile_t *op, enum OBTYPE *oid, int noids);
|
|||
object_t *hasobwithflag(obpile_t *op, enum FLAG flagid);
|
||||
object_t *hasobwithflagval(obpile_t *op, enum FLAG flagid, int val0, int val1, int val2, char *text);
|
||||
object_t *hasobid(obpile_t *op, long id);
|
||||
object_t *hasobflagwithin(cell_t *start, enum FLAG fid, int dist, int disttype);
|
||||
object_t *hassecretdoor(obpile_t *op);
|
||||
void identify(object_t *o);
|
||||
void ignite(object_t *o);
|
||||
|
|
21
spell.c
21
spell.c
|
@ -4700,7 +4700,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
int donesomething = B_FALSE;
|
||||
cell_t *c;
|
||||
//powerleft = rolldie(power+1, 4);
|
||||
powerleft = power;
|
||||
powerleft = power+2;
|
||||
for (i = 0; i < caster->nlos; i++) {
|
||||
c = caster->los[i];
|
||||
if (c->lf && (c->lf != caster) && (c->lf->race->raceclass->id == RC_ANIMAL) && lfhasflag(c->lf, F_HOSTILE)) {
|
||||
|
@ -4792,6 +4792,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
for (i = 0; i < narccells; i++) {
|
||||
losehp(arccell[i]->lf, rolldie(3,nsides), DT_ELECTRIC, caster, "an electricity bolt");
|
||||
hitcell[nhitcells++] = arccell[i];
|
||||
assert(nhitcells < MAXRETCELLS*2);
|
||||
|
||||
if (haslos(player, arccell[i])) {
|
||||
stillseen = B_TRUE;
|
||||
|
@ -4827,6 +4828,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
if (!found) {
|
||||
// will arc to here
|
||||
arccell2[narccells2++] = c;
|
||||
assert(narccells2 < MAXRETCELLS);
|
||||
animline(arccell[i], c, B_FALSE, '/', '\\', C_WHITE);
|
||||
}
|
||||
}
|
||||
|
@ -4839,6 +4841,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
arccell[i] = arccell2[i];
|
||||
}
|
||||
narccells = narccells2;
|
||||
assert(narccells < MAXRETCELLS);
|
||||
|
||||
if (narccells && stillseen) {
|
||||
msg("The electricity arcs!");
|
||||
|
@ -11266,11 +11269,11 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
// for each cell we can see... (including our own)
|
||||
for (i = 0; i < caster->nlos; i++) {
|
||||
c = caster->los[i];
|
||||
if (c->lf && cansee(caster, c->lf)) {
|
||||
if (c->lf && cansee(caster, c->lf) && (c->lf != caster)) {
|
||||
for (o = c->lf->pack->first ; o ; o = nexto) {
|
||||
nexto = o->next;
|
||||
if ( hasflag(o->flags, F_RODSHAPED) &&
|
||||
(!isequipped(o) || (c->lf != caster)) &&
|
||||
isequipped(o) &&
|
||||
(o->blessed == B_UNCURSED) &&
|
||||
!hasflag(o->flags, F_HASBRAND)) {
|
||||
char obname[BUFLEN];
|
||||
|
@ -12660,7 +12663,10 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
// find all associated weapons
|
||||
for (ot = objecttype ; ot ; ot = ot->next) {
|
||||
if (hasflagval(ot->flags, F_USESSKILL, sk->id, NA, NA, NULL)) {
|
||||
nweps++;
|
||||
if (gettechlevel(o->type->id) > getskill(player, SK_TECHUSAGE)) {
|
||||
} else {
|
||||
nweps++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nweps) {
|
||||
|
@ -12668,8 +12674,11 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
sel = rnd(0,nweps-1);
|
||||
for (ot = objecttype ; ot ; ot = ot->next) {
|
||||
if (hasflagval(ot->flags, F_USESSKILL, sk->id, NA, NA, NULL)) {
|
||||
if (n == sel) break;
|
||||
n++;
|
||||
if (gettechlevel(o->type->id) > getskill(player, SK_TECHUSAGE)) {
|
||||
} else {
|
||||
if (n == sel) break;
|
||||
n++;
|
||||
}
|
||||
}
|
||||
}
|
||||
snprintf(buf, BUFLEN, "excellent branded %s", ot->name);
|
||||
|
|
Loading…
Reference in New Issue