* [+] CRASH when you create a pit on the last level of a dungeon.
- [+] no evasion if grabbed/grabbing - [+] polyrevert only usable if you cast the spell AND it's controlled - [+] salt kills leeches, causes pain in lfs who are bleeding - [+] raging ai will attack anything - [+] rage gives big morale boost - [+] potion of fury - [+] don't run onto water if it will hurt you! - [+] bad brands should be cursed more often. brands should have "startcursedchance" - [+] brand->blessstatus, br->blesschance
This commit is contained in:
parent
f31222e47d
commit
58e61e6a07
2
ai.c
2
ai.c
|
@ -665,7 +665,7 @@ int ai_bored(lifeform_t *lf, lifeform_t *master, int icanattack) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pctchance(chance)) {
|
if (pctchance(chance)) {
|
||||||
if (lfhasflag(lf, F_HATESALL)) {
|
if (lfhasflag(lf, F_HATESALL) || lfhasflag(lf, F_RAGE)) {
|
||||||
if (nhateposs < MAXCANDIDATES) {
|
if (nhateposs < MAXCANDIDATES) {
|
||||||
if (db) dblog(".oO { hate everything - found lfid %d (%s) ! }",who->id, who->race->name);
|
if (db) dblog(".oO { hate everything - found lfid %d (%s) ! }",who->id, who->race->name);
|
||||||
hateposs[nhateposs++] = who;
|
hateposs[nhateposs++] = who;
|
||||||
|
|
75
data.c
75
data.c
|
@ -91,6 +91,7 @@ void initcommands(void) {
|
||||||
addcommand(CMD_QUAFF, 'q', "Quaff (drink) a potion.");
|
addcommand(CMD_QUAFF, 'q', "Quaff (drink) a potion.");
|
||||||
addcommand(CMD_READ, 'r', "Read a scroll/book.");
|
addcommand(CMD_READ, 'r', "Read a scroll/book.");
|
||||||
addcommand(CMD_RESTFULL, 'R', "Rest until healed, or train your skills.");
|
addcommand(CMD_RESTFULL, 'R', "Rest until healed, or train your skills.");
|
||||||
|
addcommand(CMD_THROW, 's', "Step carefully.");
|
||||||
addcommand(CMD_THROW, 't', "Throw an object.");
|
addcommand(CMD_THROW, 't', "Throw an object.");
|
||||||
addcommand(CMD_TAKEOFF, 'T', "Take off an item of clothing/jewelery.");
|
addcommand(CMD_TAKEOFF, 'T', "Take off an item of clothing/jewelery.");
|
||||||
addcommand(CMD_WEILD, 'w', "Weild a weapon.");
|
addcommand(CMD_WEILD, 'w', "Weild a weapon.");
|
||||||
|
@ -951,92 +952,92 @@ void initobjects(void) {
|
||||||
// ie. spellbook of flight, boots of flight.
|
// ie. spellbook of flight, boots of flight.
|
||||||
|
|
||||||
// weapons
|
// weapons
|
||||||
addbrand(BR_BALANCE, "of balance", BP_WEAPON);
|
addbrand(BR_BALANCE, "of balance", BP_WEAPON, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_BALANCE, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_BALANCE, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_IMPACT, "of impact", BP_WEAPON);
|
addbrand(BR_IMPACT, "of impact", BP_WEAPON, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_ONLYFORDAMTYPE, DT_BASH, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_ONLYFORDAMTYPE, DT_BASH, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addflag_real(lastbrand->flags, F_HEAVYBLOW, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_HEAVYBLOW, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_MERCY, "of mercy", BP_WEAPON);
|
addbrand(BR_MERCY, "of mercy", BP_WEAPON, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_MERCIFUL, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_MERCIFUL, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_PYROMANIA, "of pyromania", BP_WEAPON);
|
addbrand(BR_PYROMANIA, "of pyromania", BP_WEAPON, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_FLAMESTRIKE, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_FLAMESTRIKE, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_REVENGE, "of revenge", BP_WEAPON);
|
addbrand(BR_REVENGE, "of revenge", BP_WEAPON, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_REVENGE, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_REVENGE, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_SHARPNESS, "of sharpness", BP_WEAPON);
|
addbrand(BR_SHARPNESS, "of sharpness", BP_WEAPON, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_ARMOURPIERCE, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_ARMOURPIERCE, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_LIFESUCK, "of lifesucking", BP_WEAPON);
|
addbrand(BR_LIFESUCK, "of lifesucking", BP_WEAPON, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_VAMPIRIC, NA, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_VAMPIRIC, NA, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
|
|
||||||
addbrand(BR_SLAY_ANIMAL, "of butchering", BP_WEAPON);
|
addbrand(BR_SLAY_ANIMAL, "of butchering", BP_WEAPON, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_ONLYFORDAMTYPE, DT_SLASH, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_ONLYFORDAMTYPE, DT_SLASH, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addflag_real(lastbrand->flags, F_RACESLAY, RC_ANIMAL, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_RACESLAY, RC_ANIMAL, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_SLAY_DRAGON, "of dragonslaying", BP_WEAPON);
|
addbrand(BR_SLAY_DRAGON, "of dragonslaying", BP_WEAPON, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_ONLYFORWEPSKILL, SK_POLEARMS, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_ONLYFORWEPSKILL, SK_POLEARMS, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addflag_real(lastbrand->flags, F_RACESLAY, RC_DRAGON, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_RACESLAY, RC_DRAGON, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_SLAY_MAGIC, "of antimagic", BP_WEAPON);
|
addbrand(BR_SLAY_MAGIC, "of antimagic", BP_WEAPON, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_RACESLAY, RC_MAGIC, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_RACESLAY, RC_MAGIC, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_SLAY_PLANT, "of blight", BP_WEAPON);
|
addbrand(BR_SLAY_PLANT, "of blight", BP_WEAPON, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_ONLYFOROBTYPE, OT_SCYTHE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_ONLYFOROBTYPE, OT_SCYTHE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addflag_real(lastbrand->flags, F_RACESLAY, RC_PLANT, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_RACESLAY, RC_PLANT, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_SLAY_UNDEAD, "of divine power", BP_WEAPON);
|
addbrand(BR_SLAY_UNDEAD, "of divine power", BP_WEAPON, B_BLESSED, 80);
|
||||||
addflag_real(lastbrand->flags, F_ONLYFORWEPSKILL, SK_LONGBLADES, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_ONLYFORWEPSKILL, SK_LONGBLADES, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addflag_real(lastbrand->flags, F_ONLYFORWEPSKILL, SK_SHORTBLADES, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_ONLYFORWEPSKILL, SK_SHORTBLADES, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addflag_real(lastbrand->flags, F_RACESLAY, RC_UNDEAD, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_RACESLAY, RC_UNDEAD, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_PRODUCESLIGHT, 3, NA, NULL, PERMENANT, B_KNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_PRODUCESLIGHT, 3, NA, NULL, PERMENANT, B_KNOWN, -1);
|
||||||
|
|
||||||
// feet
|
// feet
|
||||||
addbrand(BR_LEVITATION, "of hovering", BP_FEET);
|
addbrand(BR_LEVITATION, "of hovering", BP_FEET, B_CURSED, 50);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_LEVITATING, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_LEVITATING, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_FEATHERFALL, "of featherfall", BP_FEET);
|
addbrand(BR_FEATHERFALL, "of featherfall", BP_FEET, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_DTIMMUNE, DT_FALL, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_DTIMMUNE, DT_FALL, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_SWIFTNESS, "of swiftness", BP_FEET);
|
addbrand(BR_SWIFTNESS, "of swiftness", BP_FEET, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_FASTMOVE, 5, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_FASTMOVE, 5, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_SLOTH, "of sloth", BP_FEET);
|
addbrand(BR_SLOTH, "of sloth", BP_FEET, B_CURSED, 80);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_SLOWMOVE, 5, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_SLOWMOVE, 5, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_STEALTH, "of stealth", BP_FEET);
|
addbrand(BR_STEALTH, "of stealth", BP_FEET, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_SILENTMOVE, B_TRUE, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_SILENTMOVE, B_TRUE, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
|
|
||||||
// hands
|
// hands
|
||||||
addbrand(BR_POWER, "of power", BP_HANDS);
|
addbrand(BR_POWER, "of power", BP_HANDS, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_ATTRMOD, A_STR, 3, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_ATTRMOD, A_STR, 3, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_WEAKNESS, "of feebleness", BP_HANDS);
|
addbrand(BR_WEAKNESS, "of feebleness", BP_HANDS, B_CURSED, 80);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_ATTRMOD, A_STR, -3, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_ATTRMOD, A_STR, -3, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_NIMBLENESS, "of nimbleness", BP_HANDS);
|
addbrand(BR_NIMBLENESS, "of nimbleness", BP_HANDS, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_ATTRMOD, A_AGI, 3, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_ATTRMOD, A_AGI, 3, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_SPIDERCLIMB, "of the spider", BP_HANDS);
|
addbrand(BR_SPIDERCLIMB, "of the spider", BP_HANDS, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_SPIDERCLIMB, B_TRUE, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_SPIDERCLIMB, B_TRUE, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
|
|
||||||
// head
|
// head
|
||||||
addbrand(BR_THINKING, "of thinking", BP_HEAD);
|
addbrand(BR_THINKING, "of thinking", BP_HEAD, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_ATTRMOD, A_IQ, 3, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_ATTRMOD, A_IQ, 3, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_KNOWLEDGE, "of knowledge", BP_HEAD);
|
addbrand(BR_KNOWLEDGE, "of knowledge", BP_HEAD, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_DETECTAURAS, B_TRUE, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_DETECTAURAS, B_TRUE, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_DETECTMAGIC, B_TRUE, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_DETECTMAGIC, B_TRUE, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_TELEPATHY, "of telepathy", BP_HEAD);
|
addbrand(BR_TELEPATHY, "of telepathy", BP_HEAD, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_DETECTLIFE, 5, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_DETECTLIFE, 5, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_TELEKINESIS, "of the poltergeist", BP_HEAD);
|
addbrand(BR_TELEKINESIS, "of the poltergeist", BP_HEAD, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_CANWILL, OT_S_TELEKINESIS, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_CANWILL, OT_S_TELEKINESIS, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
|
|
||||||
// waist
|
// waist
|
||||||
addbrand(BR_GIANTSTRENGTH, "of giant strength", BP_WAIST);
|
addbrand(BR_GIANTSTRENGTH, "of giant strength", BP_WAIST, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_ATTRSET, A_STR, 18, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_ATTRSET, A_STR, 18, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_FEEBLENESS, "of feebleness", BP_WAIST);
|
addbrand(BR_FEEBLENESS, "of feebleness", BP_WAIST, B_CURSED, 80);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_ATTRSET, A_STR, 3, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_ATTRSET, A_STR, 3, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_FLIGHT, "of the eagle", BP_WAIST);
|
addbrand(BR_FLIGHT, "of the eagle", BP_WAIST, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_FLYING, B_TRUE, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_FLYING, B_TRUE, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_SPEED, "of swiftness", BP_WAIST);
|
addbrand(BR_SPEED, "of swiftness", BP_WAIST, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_FASTACT, 5, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_FASTACT, 5, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
|
|
||||||
// shoulders
|
// shoulders
|
||||||
addbrand(BR_CONCEALMENT, "of concealment", BP_SHOULDERS);
|
addbrand(BR_CONCEALMENT, "of concealment", BP_SHOULDERS, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_INVISIBLE, B_TRUE, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_INVISIBLE, B_TRUE, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_ANTIMAG, "of antimagic", BP_SHOULDERS);
|
addbrand(BR_ANTIMAG, "of antimagic", BP_SHOULDERS, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_RESISTMAG, 10, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_RESISTMAG, 10, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_SHADOWS, "of shadows", BP_SHOULDERS);
|
addbrand(BR_SHADOWS, "of shadows", BP_SHOULDERS, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_CANWILL, OT_A_DARKWALK, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_CANWILL, OT_A_DARKWALK, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
|
|
||||||
// body
|
// body
|
||||||
addbrand(BR_HEALTH, "of health", BP_BODY);
|
addbrand(BR_HEALTH, "of health", BP_BODY, B_UNCURSED, 0);
|
||||||
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_ATTRMOD, A_CON, 3, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_EQUIPCONFER, F_ATTRMOD, A_CON, 3, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
|
|
||||||
// materials
|
// materials
|
||||||
|
@ -2080,6 +2081,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_VALUE, 15, NA, NA, NULL);
|
addflag(lastot->flags, F_VALUE, 15, NA, NA, NULL);
|
||||||
addot(OT_POT_RESTORATION, "potion of restoration", "Restores lost abilities to the drinker.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
addot(OT_POT_RESTORATION, "potion of restoration", "Restores lost abilities to the drinker.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, NA, NULL);
|
addflag(lastot->flags, F_RARITY, H_ALL, 100, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_AIHEALITEM, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_VALUE, 170, NA, NA, NULL);
|
addflag(lastot->flags, F_VALUE, 170, NA, NA, NULL);
|
||||||
addot(OT_POT_SLEEP, "potion of sleep", "Puts the drinker into a deep sleep.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
addot(OT_POT_SLEEP, "potion of sleep", "Puts the drinker into a deep sleep.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, NA, NULL);
|
addflag(lastot->flags, F_RARITY, H_ALL, 100, NA, NULL);
|
||||||
|
@ -2126,6 +2128,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_VALUE, 15, NA, NA, NULL);
|
addflag(lastot->flags, F_VALUE, 15, NA, NA, NULL);
|
||||||
addot(OT_POT_SANCTUARY, "potion of sanctuary", "Creates a temporary magical barrier abour the drinker.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
addot(OT_POT_SANCTUARY, "potion of sanctuary", "Creates a temporary magical barrier abour the drinker.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, NA, NULL);
|
addflag(lastot->flags, F_RARITY, H_ALL, 100, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_AIFLEEITEM, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_VALUE, 75, NA, NA, NULL);
|
addflag(lastot->flags, F_VALUE, 75, NA, NA, NULL);
|
||||||
|
|
||||||
addot(OT_POT_ETHEREALNESS, "potion of etherealness", "Allows the walker to temporarily pass through walls.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
addot(OT_POT_ETHEREALNESS, "potion of etherealness", "Allows the walker to temporarily pass through walls.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
||||||
|
@ -2142,9 +2145,14 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_VALUE, 35, NA, NA, NULL);
|
addflag(lastot->flags, F_VALUE, 35, NA, NA, NULL);
|
||||||
|
|
||||||
addot(OT_POT_COMPETENCE, "potion of competence", "Permemantly increases the drinker's base attribites (Strength, IQ, etc).", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
addot(OT_POT_COMPETENCE, "potion of competence", "Permemantly increases the drinker's base attribites (Strength, IQ, etc).", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
||||||
|
addflag(lastot->flags, F_AIBOOSTITEM, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, NA, NULL);
|
addflag(lastot->flags, F_RARITY, H_ALL, 100, NA, NULL);
|
||||||
addflag(lastot->flags, F_VALUE, 160, NA, NA, NULL);
|
addflag(lastot->flags, F_VALUE, 160, NA, NA, NULL);
|
||||||
|
|
||||||
|
addot(OT_POT_FURY, "potion of fury", "Causes the drinker to enter a state of berzerk rage.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
||||||
|
addflag(lastot->flags, F_AIBOOSTITEM, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_RARITY, H_ALL, 100, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_VALUE, 70, NA, NA, NULL);
|
||||||
addot(OT_POT_GASEOUSFORM, "potion of gaseous form", "Turns the drinker into a cloud of gas. Only intended for emergencies, since it will cause you to drop all your items.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
addot(OT_POT_GASEOUSFORM, "potion of gaseous form", "Turns the drinker into a cloud of gas. Only intended for emergencies, since it will cause you to drop all your items.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, NA, NULL);
|
addflag(lastot->flags, F_RARITY, H_ALL, 100, NA, NULL);
|
||||||
addflag(lastot->flags, F_AIFLEEITEM, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_AIFLEEITEM, B_TRUE, NA, NA, NULL);
|
||||||
|
@ -9026,6 +9034,7 @@ void initrace(void) {
|
||||||
addrace(R_LEECH, "giant leech", 10, 'j', C_MAGENTA, MT_FLESH, RC_ANIMAL, "A boneless blood-sucking creature. Quite dangerous until it eats it becomes satiated with blood, at which point it will slither off and fall asleep.");
|
addrace(R_LEECH, "giant leech", 10, 'j', C_MAGENTA, MT_FLESH, RC_ANIMAL, "A boneless blood-sucking creature. Quite dangerous until it eats it becomes satiated with blood, at which point it will slither off and fall asleep.");
|
||||||
addbodypart(lastrace, BP_BODY, NULL);
|
addbodypart(lastrace, BP_BODY, NULL);
|
||||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_VULNTOSALT, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
|
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
|
||||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
7
defs.h
7
defs.h
|
@ -1165,6 +1165,7 @@ enum OBTYPE {
|
||||||
OT_POT_ELEMENTIMMUNE,
|
OT_POT_ELEMENTIMMUNE,
|
||||||
OT_POT_ETHEREALNESS,
|
OT_POT_ETHEREALNESS,
|
||||||
OT_POT_EXPERIENCE,
|
OT_POT_EXPERIENCE,
|
||||||
|
OT_POT_FURY,
|
||||||
OT_POT_GASEOUSFORM,
|
OT_POT_GASEOUSFORM,
|
||||||
OT_POT_HEALING,
|
OT_POT_HEALING,
|
||||||
OT_POT_HEALINGMIN,
|
OT_POT_HEALINGMIN,
|
||||||
|
@ -2611,7 +2612,8 @@ enum FLAG {
|
||||||
// movement penalties
|
// movement penalties
|
||||||
F_AVIAN, // this race is an avian
|
F_AVIAN, // this race is an avian
|
||||||
F_CANINE, // this race is a canine
|
F_CANINE, // this race is a canine
|
||||||
F_HUMANOID, // this race can wear armour / use weapons
|
F_HUMANOID, // this race is a humanoid
|
||||||
|
// (can wear armour / use weapons)
|
||||||
F_INSECT, // this race is classed as an insect
|
F_INSECT, // this race is classed as an insect
|
||||||
F_UNDEAD, // this race is classed as undead
|
F_UNDEAD, // this race is classed as undead
|
||||||
F_COLDBLOOD, // this race is coldblooded
|
F_COLDBLOOD, // this race is coldblooded
|
||||||
|
@ -2634,6 +2636,7 @@ enum FLAG {
|
||||||
F_SPOTTED, // you have spotted hiding lf id v0. you lsoe this if they
|
F_SPOTTED, // you have spotted hiding lf id v0. you lsoe this if they
|
||||||
// go out of sight.
|
// go out of sight.
|
||||||
F_TIMID, // monster will only move close if behind its target.
|
F_TIMID, // monster will only move close if behind its target.
|
||||||
|
F_VULNTOSALT, // salt kills this monster
|
||||||
// special attack flags
|
// special attack flags
|
||||||
F_AIMEDSTRIKE, // next attack is an aimed strike
|
F_AIMEDSTRIKE, // next attack is an aimed strike
|
||||||
F_COMBOSTRIKE, // lf is performing a combination strike
|
F_COMBOSTRIKE, // lf is performing a combination strike
|
||||||
|
@ -3680,6 +3683,8 @@ typedef struct brand_s {
|
||||||
char *suffix;
|
char *suffix;
|
||||||
flagpile_t *flags;
|
flagpile_t *flags;
|
||||||
enum BODYPART bp;
|
enum BODYPART bp;
|
||||||
|
enum BLESSTYPE blessed;
|
||||||
|
int blesschance;
|
||||||
struct brand_s *next, *prev;
|
struct brand_s *next, *prev;
|
||||||
} brand_t;
|
} brand_t;
|
||||||
|
|
||||||
|
|
9
io.c
9
io.c
|
@ -8263,9 +8263,10 @@ void handleinput(void) {
|
||||||
lastdir = f->val[0];
|
lastdir = f->val[0];
|
||||||
ihaveturned = f->val[1];
|
ihaveturned = f->val[1];
|
||||||
|
|
||||||
// certain objects will stop us from running.
|
// certain objects in the current cell will stop us from running.
|
||||||
for (o = player->cell->obpile->first ; o ; o = o->next) {
|
for (o = player->cell->obpile->first ; o ; o = o->next) {
|
||||||
if ( !hasflag(o->flags, F_NOPICKUP) ||
|
if ( !hasflag(o->flags, F_NOPICKUP) ||
|
||||||
|
hasflag(o->flags, F_SHOP) ||
|
||||||
hasflag(o->flags, F_CLIMBABLE) ) {
|
hasflag(o->flags, F_CLIMBABLE) ) {
|
||||||
stopnow = B_TRUE;
|
stopnow = B_TRUE;
|
||||||
break;
|
break;
|
||||||
|
@ -8320,6 +8321,11 @@ void handleinput(void) {
|
||||||
|
|
||||||
if (stopnow) {
|
if (stopnow) {
|
||||||
stoprunning(player);
|
stoprunning(player);
|
||||||
|
} else {
|
||||||
|
cell_t *c;
|
||||||
|
c = getcellindir(player->cell, rundir);
|
||||||
|
if (c && celldangerous(player, c, B_TRUE, NULL)) {
|
||||||
|
stoprunning(player);
|
||||||
} else {
|
} else {
|
||||||
if (trymove(player, rundir, B_TRUE, B_FALSE)) {
|
if (trymove(player, rundir, B_TRUE, B_FALSE)) {
|
||||||
// failed.
|
// failed.
|
||||||
|
@ -8332,6 +8338,7 @@ void handleinput(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
drawmsg();
|
drawmsg();
|
||||||
|
|
||||||
|
|
24
lf.c
24
lf.c
|
@ -2791,8 +2791,6 @@ int digdown(lifeform_t *lf, object_t *o) {
|
||||||
char lfname[BUFLEN];
|
char lfname[BUFLEN];
|
||||||
getlfname(lf, lfname);
|
getlfname(lf, lfname);
|
||||||
|
|
||||||
// TODO: check if the floor is solid?
|
|
||||||
|
|
||||||
if (o) {
|
if (o) {
|
||||||
if (lfhasflag(lf, F_LEVITATING)) {
|
if (lfhasflag(lf, F_LEVITATING)) {
|
||||||
if (isplayer(lf)) {
|
if (isplayer(lf)) {
|
||||||
|
@ -2802,10 +2800,21 @@ int digdown(lifeform_t *lf, object_t *o) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: check if the floor is solid?
|
||||||
|
if (lf->cell->map->depth >= lf->cell->map->region->rtype->maxdepth) {
|
||||||
|
if (isplayer(lf)) {
|
||||||
|
msg("The floor here is too solid to dig in.");
|
||||||
|
} else if (cansee(player, lf)) {
|
||||||
|
msg("%s tries to dig a hole in the floor, but fails.", lfname);
|
||||||
|
}
|
||||||
|
return B_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (isplayer(lf)) {
|
if (isplayer(lf)) {
|
||||||
msg("You dig a hole in the floor.");
|
msg("You dig a hole in the floor.");
|
||||||
} else if (cansee(player, lf)) {
|
} else if (cansee(player, lf)) {
|
||||||
msg("%s digs a hole in the floor.");
|
msg("%s digs a hole in the floor.", lfname);
|
||||||
}
|
}
|
||||||
|
|
||||||
addobfast(lf->cell->obpile, OT_HOLEINGROUND);
|
addobfast(lf->cell->obpile, OT_HOLEINGROUND);
|
||||||
|
@ -5302,6 +5311,10 @@ int getevasion(lifeform_t *lf) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// no evasion if you're holding someone, or someone is holding you
|
||||||
|
if (lfhasflag(lf, F_GRABBEDBY) || lfhasflag(lf, F_GRABBING)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
// positive modifiers first
|
// positive modifiers first
|
||||||
|
@ -14831,6 +14844,11 @@ int real_skillcheck(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod, int *r
|
||||||
modroll = 0;
|
modroll = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// auto pass some things
|
||||||
|
if (lfhasflag(lf, F_RAGE) && (ct == SC_MORALE)) {
|
||||||
|
modroll = diff;
|
||||||
|
}
|
||||||
|
|
||||||
// natural 20 will pass some checks
|
// natural 20 will pass some checks
|
||||||
if (roll == 20) {
|
if (roll == 20) {
|
||||||
switch (ct) {
|
switch (ct) {
|
||||||
|
|
13
move.c
13
move.c
|
@ -221,7 +221,8 @@ int celldangerous(lifeform_t *lf, cell_t *cell, int onlyifknown, enum ERROR *err
|
||||||
f = hasflag(o->flags, F_DEEPWATER);
|
f = hasflag(o->flags, F_DEEPWATER);
|
||||||
if (f) {
|
if (f) {
|
||||||
// non swimming creature in water?
|
// non swimming creature in water?
|
||||||
if (!isairborne(lf) && (getobdepth(o, lf) >= DP_HEAD)) {
|
if (!isairborne(lf)) {
|
||||||
|
if ((getobdepth(o, lf) >= DP_HEAD)) {
|
||||||
if (getskill(lf, SK_SWIMMING) - isburdened(lf) <= 0) {
|
if (getskill(lf, SK_SWIMMING) - isburdened(lf) <= 0) {
|
||||||
if (error) {
|
if (error) {
|
||||||
*error = E_AVOIDOB;
|
*error = E_AVOIDOB;
|
||||||
|
@ -230,6 +231,14 @@ int celldangerous(lifeform_t *lf, cell_t *cell, int onlyifknown, enum ERROR *err
|
||||||
return B_TRUE;
|
return B_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (isvulnto(lf->flags, DT_WATER, B_FALSE)) {
|
||||||
|
if (error) {
|
||||||
|
*error = E_AVOIDOB;
|
||||||
|
rdata = o;
|
||||||
|
}
|
||||||
|
return B_TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
f = obrestrictsmovement(o, lf);
|
f = obrestrictsmovement(o, lf);
|
||||||
if (f) {
|
if (f) {
|
||||||
|
@ -256,7 +265,7 @@ int celldangerous(lifeform_t *lf, cell_t *cell, int onlyifknown, enum ERROR *err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// non-obvious things - only include these if we are smart enough
|
// non-obvious things - only include these if we are wise enough
|
||||||
if (!onlyifknown) {
|
if (!onlyifknown) {
|
||||||
include_nonobvious = B_TRUE;
|
include_nonobvious = B_TRUE;
|
||||||
} else {
|
} else {
|
||||||
|
|
57
objects.c
57
objects.c
|
@ -228,7 +228,7 @@ char *ringadjective[] = {
|
||||||
|
|
||||||
long nextoid = 0;
|
long nextoid = 0;
|
||||||
|
|
||||||
brand_t *addbrand(enum BRAND id, char *suffix, enum BODYPART bp) {
|
brand_t *addbrand(enum BRAND id, char *suffix, enum BODYPART bp, enum BLESSTYPE blessed, int blesschance) {
|
||||||
brand_t *a, *om;
|
brand_t *a, *om;
|
||||||
char buf[BUFLEN];
|
char buf[BUFLEN];
|
||||||
//flag_t *f;
|
//flag_t *f;
|
||||||
|
@ -257,6 +257,8 @@ brand_t *addbrand(enum BRAND id, char *suffix, enum BODYPART bp) {
|
||||||
a->bp = bp;
|
a->bp = bp;
|
||||||
snprintf(buf, BUFLEN, " %s",suffix);
|
snprintf(buf, BUFLEN, " %s",suffix);
|
||||||
a->suffix = strdup(buf);
|
a->suffix = strdup(buf);
|
||||||
|
a->blessed = blessed;
|
||||||
|
a->blesschance = blesschance;
|
||||||
|
|
||||||
a->flags = addflagpile(NULL, NULL);
|
a->flags = addflagpile(NULL, NULL);
|
||||||
|
|
||||||
|
@ -1637,6 +1639,9 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int wantlinkholes
|
||||||
if (brandappliesto(wantbrand, o->type)) {
|
if (brandappliesto(wantbrand, o->type)) {
|
||||||
copyflags(o->flags, wantbrand->flags, FROMBRAND);
|
copyflags(o->flags, wantbrand->flags, FROMBRAND);
|
||||||
addflag(o->flags, F_HASBRAND, wantbrand->id, NA, NA, NULL);
|
addflag(o->flags, F_HASBRAND, wantbrand->id, NA, NA, NULL);
|
||||||
|
if (pctchance(wantbrand->blesschance)) {
|
||||||
|
o->blessed = wantbrand->blessed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9430,6 +9435,9 @@ void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE
|
||||||
}
|
}
|
||||||
gainlevel(lf, B_TRUE);
|
gainlevel(lf, B_TRUE);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case OT_POT_FURY:
|
||||||
|
abilityeffects(lf, OT_A_RAGE, lf->cell, lf, NULL);
|
||||||
break;
|
break;
|
||||||
case OT_POT_GASEOUSFORM:
|
case OT_POT_GASEOUSFORM:
|
||||||
dospelleffects(lf, OT_S_GASEOUSFORM, (potblessed) ? 5 : 1, lf, NULL, lf->cell, potblessed, seen, B_TRUE);
|
dospelleffects(lf, OT_S_GASEOUSFORM, (potblessed) ? 5 : 1, lf, NULL, lf->cell, potblessed, seen, B_TRUE);
|
||||||
|
@ -9498,28 +9506,22 @@ void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE
|
||||||
break;
|
break;
|
||||||
case OT_POT_POLYMORPH:
|
case OT_POT_POLYMORPH:
|
||||||
if (potblessed == B_BLESSED) {
|
if (potblessed == B_BLESSED) {
|
||||||
// controlled polymorph
|
// controlled polymorph - you can chnage back.
|
||||||
dospelleffects(lf, OT_S_POLYMORPH, 5, lf, NULL, lf->cell, potblessed, NULL, B_TRUE);
|
dospelleffects(NULL, OT_S_POLYMORPH, 5, lf, NULL, lf->cell, potblessed, NULL, B_TRUE);
|
||||||
} else {
|
} else {
|
||||||
// random polymorph
|
// random polymorph
|
||||||
dospelleffects(lf, OT_S_POLYMORPH, 1, lf, NULL, lf->cell, potblessed, NULL, B_TRUE);
|
dospelleffects(NULL, OT_S_POLYMORPH, 1, lf, NULL, lf->cell, potblessed, NULL, B_TRUE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OT_POT_RESTORATION:
|
case OT_POT_RESTORATION:
|
||||||
failed = B_TRUE;
|
failed = B_TRUE;
|
||||||
if (getattr(lf,A_STR) < lf->baseatt[A_STR]) {
|
for (i = 0; i < MAXATTS; i++ ){
|
||||||
setattr(lf, A_STR, lf->baseatt[A_STR]);
|
if (getattr(lf,i) < lf->baseatt[i]) {
|
||||||
|
setattr(lf, i, lf->baseatt[i]);
|
||||||
failed = B_FALSE;
|
failed = B_FALSE;
|
||||||
}
|
}
|
||||||
if (getattr(lf,A_AGI) < lf->baseatt[A_AGI]) {
|
|
||||||
setattr(lf, A_AGI, lf->baseatt[A_AGI]);
|
|
||||||
failed = B_FALSE;
|
|
||||||
}
|
}
|
||||||
if (getattr(lf,A_IQ) < lf->baseatt[A_IQ]) {
|
// blessed restores hp/mp to full
|
||||||
setattr(lf, A_IQ, lf->baseatt[A_IQ]);
|
|
||||||
failed = B_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (potblessed == B_BLESSED) {
|
if (potblessed == B_BLESSED) {
|
||||||
hpheal = lf->maxhp;
|
hpheal = lf->maxhp;
|
||||||
mpheal = getmaxmp(lf);
|
mpheal = getmaxmp(lf);
|
||||||
|
@ -9530,8 +9532,6 @@ void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE
|
||||||
hpheal = lf->maxhp / 2;
|
hpheal = lf->maxhp / 2;
|
||||||
mpheal = getmaxmp(lf) / 2;
|
mpheal = getmaxmp(lf) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// blessed restores hp/mp to full
|
|
||||||
if (lf->hp < hpheal) {
|
if (lf->hp < hpheal) {
|
||||||
gainhp(lf, hpheal - lf->hp);
|
gainhp(lf, hpheal - lf->hp);
|
||||||
if (!isplayer(lf) && cansee(player, lf)) {
|
if (!isplayer(lf) && cansee(player, lf)) {
|
||||||
|
@ -11362,13 +11362,34 @@ int fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int speed,
|
||||||
spellcloud(srcloc, radius, UNI_SHADELIGHT, C_MAGENTA, OT_S_SLEEP, radius, B_TRUE, buf, "A wispy mist appears!");
|
spellcloud(srcloc, radius, UNI_SHADELIGHT, C_MAGENTA, OT_S_SLEEP, radius, B_TRUE, buf, "A wispy mist appears!");
|
||||||
} else if (o->type->id == OT_SALT) {
|
} else if (o->type->id == OT_SALT) {
|
||||||
if (target && (getcelldist(srcloc, where) <= 1)) {
|
if (target && (getcelldist(srcloc, where) <= 1)) {
|
||||||
if (hasbp(target, BP_EYES) && !isblind(target) && !getequippedob(target->pack, BP_EYES)) {
|
// salt won't work if they're immersed in water
|
||||||
|
if (lfhasflag(target, F_VULNTOSALT) &&
|
||||||
|
(getcellwaterdepth(target->cell, target) < DP_WAIST)) {
|
||||||
|
// instakill
|
||||||
if (cansee(player, target)) {
|
if (cansee(player, target)) {
|
||||||
msg("%s irritates %s%s eyes!", obname, targetname, getpossessive(targetname));
|
msg("%s%s skin sizzles and bubbles!", targetname, getpossessive(targetname));
|
||||||
|
}
|
||||||
|
target->hp = 0;
|
||||||
|
setlastdam(target, "osmosis");
|
||||||
|
setkillverb(target, "Dehydrated");
|
||||||
|
} else {
|
||||||
|
if (hasbp(target, BP_EYES) &&
|
||||||
|
!isblind(target) &&
|
||||||
|
!getequippedob(target->pack, BP_EYES)) {
|
||||||
|
if (cansee(player, target)) {
|
||||||
|
msg("%s stings %s%s eyes!", obname, targetname, getpossessive(targetname));
|
||||||
}
|
}
|
||||||
// blind for 5-7 turns
|
// blind for 5-7 turns
|
||||||
addtempflag(target->flags, F_BLIND, B_TRUE, NA, NA, NULL, rnd(5,10));
|
addtempflag(target->flags, F_BLIND, B_TRUE, NA, NA, NULL, rnd(5,10));
|
||||||
}
|
}
|
||||||
|
if (isbleeding(target)) {
|
||||||
|
if (cansee(player, target)) {
|
||||||
|
msg("%s irritates %s%s wounds!", obname, targetname, getpossessive(targetname));
|
||||||
|
}
|
||||||
|
// pain for 3-5 turns
|
||||||
|
addtempflag(target->flags, F_PAIN, DT_DIRECT, NA, NA, "1d4", rnd(3,5));
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (haslos(player, srcloc)) {
|
if (haslos(player, srcloc)) {
|
||||||
msg("%s dispers%s into the air.", obname, (amt == 1) ? "es" : "e");
|
msg("%s dispers%s into the air.", obname, (amt == 1) ? "es" : "e");
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#define __OBJECTS_H
|
#define __OBJECTS_H
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
brand_t *addbrand(enum BRAND id, char *suffix, enum BODYPART bp);
|
brand_t *addbrand(enum BRAND id, char *suffix, enum BODYPART bp, enum BLESSTYPE blessed, int blesschance);
|
||||||
object_t *addemptyob(obpile_t *where, object_t *o);
|
object_t *addemptyob(obpile_t *where, object_t *o);
|
||||||
hiddenname_t *addhiddenname(enum OBCLASS obclass, char *text);
|
hiddenname_t *addhiddenname(enum OBCLASS obclass, char *text);
|
||||||
knowledge_t *addknowledge(enum OBCLASS id, char *hiddenname, int known);
|
knowledge_t *addknowledge(enum OBCLASS id, char *hiddenname, int known);
|
||||||
|
|
6
spell.c
6
spell.c
|
@ -1385,7 +1385,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
|
||||||
losehp(victim, dam, DT_BASH, user, buf);
|
losehp(victim, dam, DT_BASH, user, buf);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
// both victim and attacker wall
|
// both victim and attacker fall
|
||||||
if (!isdead(victim)) fall(victim, NULL, B_TRUE);
|
if (!isdead(victim)) fall(victim, NULL, B_TRUE);
|
||||||
fall(user, NULL, B_TRUE);
|
fall(user, NULL, B_TRUE);
|
||||||
}
|
}
|
||||||
|
@ -7773,8 +7773,8 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
||||||
// become the new race!
|
// become the new race!
|
||||||
setrace(target, r->id, B_TRUE);
|
setrace(target, r->id, B_TRUE);
|
||||||
|
|
||||||
// if someone cast the spell at themself, they can change back at will.
|
// if someone cast the spell at themself and it's controlled, they can change back at will.
|
||||||
if (target == caster) {
|
if ((target == caster) && (power >= 5)) {
|
||||||
addflag(target->flags, F_CANWILL, OT_A_POLYREVERT, NA, NA, NULL);
|
addflag(target->flags, F_CANWILL, OT_A_POLYREVERT, NA, NA, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue