- [+] reduce movement noise when hiding.

- [+] stealth check to not make ANY noise when hiding is easier.
- [+] redo skillchecks to use a percentage, not d20!
    - [+] new function behaviour:
        - [+] skillcheck()
            - [+] roll a die.  d100? d50?
            - [+] modifyskillcheckroll() - apply modifiers (based on
                  attribs, etc). higher roll is better.
            - [+] store die roll in *result
            - [+] difficulty 70 means "must roll higher than 70" = 30%
                  chance.
            - [+] if roll >= what you need, you pass.
        - [+] skillcheckvs()
            - [+] each roll a die
            - [+] modify die roll for both of you
            - [+] who is higher
        - [+] now modify ALL calls to skillcheck() to be pctage based. 
            - [+] in general, difficulty of 20 ->diff 95 (ie. 5% base
                  chance)
            - [+] each +/- 1 will chance difficulty by 5%
            - [+] ie. multiply current values by 5
            - [+] IN
                - [+] attack
                - [+] io
                - [+] lf
                - [+] move
                - [+] objects
                - [+] shops
                - [+] spell
        - [+] then REMOVE getskillcheckchance()
        - [+] auto fail poison check on low roll
- [+] let everyone attempt to climb climbobstacles.
- [+] potion of oil isn't smashing when thrown
    - [+] shatter() was failing because the EXPLODEONDAM check was
          incorrect.
- [+] fix felix money sacrifice exploit . done.
- [+] change collapsing door trap - first check for F_DOORFALLOB
      instead of just checking material. that way we can cope with iron
      gates etc.
    - [+] done
    - [+] define doorfallob for iron gate - 4-5 iron bars
This commit is contained in:
Rob Pearce 2012-07-17 23:03:17 +00:00
parent 57be5448c8
commit 023c8a5eaa
16 changed files with 696 additions and 315 deletions

4
ai.c
View File

@ -76,8 +76,8 @@ int aiattack(lifeform_t *lf, lifeform_t *victim, int timelimit) {
int penalty;
penalty = (getcelldist(lf->cell, victim->cell)-1);
if (penalty < 0) penalty = 0;
penalty *= 3;
checkpassed = skillcheckvs(lf, SC_IQ, -penalty, victim, SC_WILL, 5+gettr(victim));
penalty *= 15;
checkpassed = skillcheckvs(lf, SC_IQ, -penalty, victim, SC_WILL, 20+(gettr(victim)*2));
}
if (!checkpassed) {

View File

@ -1106,7 +1106,7 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag)
damtype[i] = DT_HOLY;
}
sprintf(attackname, "%s%s attack", attackername, getpossessive(attackername));
difficulty = 24 + gettr(victim) - gettr(lf);
difficulty = 100 + (gettr(victim)*5) - (gettr(lf)*5);
if (check_for_block(lf, victim, dam[i], damtype[i], difficulty, attackname)) {
blocked = B_TRUE;
break; // stop processing damage now.
@ -1426,7 +1426,7 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag)
f = lfhasflag(lf, F_FREEZINGTOUCH);
if (f) {
int diff;
diff = f->val[2];
diff = f->val[2]*20;
if (isimmuneto(victim->flags, DT_COLD, B_FALSE) || skillcheck(victim, SC_RESISTMAG, diff, 0)) {
if (isplayer(victim)) {
msg("You feel mildly chilly.");
@ -1452,12 +1452,12 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag)
// special lifeform-based effects
if ((lf->race->id == R_COCKATRICE) && dam[0]) {
// first saving throw...
if (skillcheck(victim, SC_CON, 25, 0)) {
if (skillcheck(victim, SC_CON, 75, 0)) {
// slowed
addtempflag(victim->flags, F_SLOWACTMOVE, 15, NA, NA, NULL, 2);
} else {
// second saving throw...
if (skillcheck(victim, SC_CON, 25, 0)) {
if (skillcheck(victim, SC_CON, 75, 0)) {
// paralyzed
addtempflag(victim->flags, F_PARALYZED, B_TRUE, NA, NA, NULL, 5);
} else {
@ -2997,7 +2997,7 @@ void wepeffects(flagpile_t *fp, cell_t *where, flag_t *damflag, int dam, int isu
if (pctchance(chance)) {
// knock back victim
dir = getdirtowards(owner->cell, victim->cell, victim, B_FALSE, DT_COMPASS);
knockback(victim, dir , 2, owner, 30, B_TRUE);
knockback(victim, dir , 2, owner, 110, B_TRUE);
if (cansee(player, owner)) {
f->known = B_TRUE;
}
@ -3026,7 +3026,7 @@ void wepeffects(flagpile_t *fp, cell_t *where, flag_t *damflag, int dam, int isu
if (f->val[1] != NA) {
int scdiff;
if (f->val[2] == NA) {
scdiff = 30; // default
scdiff = 100; // default
} else {
scdiff = f->val[2];
}

217
data.c
View File

@ -785,7 +785,7 @@ void initjobs(void) {
addflag(lastjob->flags, F_STABILITY, B_TRUE, NA, NA, NULL);
addflag(lastjob->flags, F_NOBODYPART, BP_LEFTFINGER, NA, NA, NULL);
addflag(lastjob->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL);
addflag(lastjob->flags, F_EXTRALUCK, 1, NA, NA, NULL);
addflag(lastjob->flags, F_EXTRALUCK, 5, NA, NA, NULL);
addflag(lastjob->flags, F_HASPET, NA, NA, NA, "young hawk");
addflag(lastjob->flags, F_MAXATTACKS, 2, 2, NA, NULL);// this is so that our hookhand works
addflag(lastjob->flags, F_INJURY, IJ_EYEDESTROYED, BP_EYES, DT_EXPLOSIVE, "right eye is destroyed^field of view halved");
@ -799,7 +799,8 @@ void initjobs(void) {
addflag(lastjob->flags, F_JOBATTRMOD, A_CON, -10, NA, NULL);
addflag(lastjob->flags, F_ALIGNMENT, AL_NONE, NA, NA, "ne");
// initial objects
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "dagger");
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "daggers");
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "10 throwing knives");
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "leather cloak");
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "leather armour");
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "5 lockpicks");
@ -1139,7 +1140,7 @@ void initobjects(void) {
// object modifiers - flags can be either known or not, depending on if it's obvious
addobmod(OM_BLOODSTAINED,"bloodstained");
addflag_real(lastobmod->flags, F_SCARY, 2, NA, NA, NULL, PERMENANT, B_KNOWN, -1);
addflag_real(lastobmod->flags, F_SCARY, 10, NA, NA, NULL, PERMENANT, B_KNOWN, -1);
addobmod(OM_ENCHANTED, "enchanted");
addflag_real(lastobmod->flags, F_ENCHANTED, NA, NA, NA, NULL, PERMENANT, B_KNOWN, -1);
addobmod(OM_FLAMING,"flaming");
@ -1168,7 +1169,7 @@ void initobjects(void) {
addomprefix(OM_SHODDY, "splintered");
addomprefix(OM_SHODDY, "torn");
addobmod(OM_POISONED,"poisoned");
addflag_real(lastobmod->flags, F_HITCONFER, F_POISONED, SC_POISON, 40, "15-30", PERMENANT, B_KNOWN, -1);
addflag_real(lastobmod->flags, F_HITCONFER, F_POISONED, SC_POISON, 150, "15-30", PERMENANT, B_KNOWN, -1);
addflag_real(lastobmod->flags, F_HITCONFERVALS, P_VENOM, 1, NA, NULL, PERMENANT, B_KNOWN, -1);
addobmod(OM_WET1,"damp");
addflag_real(lastobmod->flags, F_WET, W_DAMP, NA, NA, NULL, PERMENANT, B_KNOWN, -1);
@ -1534,6 +1535,7 @@ void initobjects(void) {
addot(OT_DOORWOOD, "wooden door", "A sturdy wooden door.", MT_WOOD, 150, OC_DFEATURE, SZ_LARGE);
// GLYPH here is a special case in getglyph
addflag(lastot->flags, F_DOOR, SZ_MIN, SZ_MAX, NA, NULL);
addflag(lastot->flags, F_DOORFALLOB, NA, NA, NA, "wooden plank");
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_MAX, NA, NULL);
addflag(lastot->flags, F_BLOCKSVIEW, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_BLOCKSLOF, B_TRUE, NA, NA, NULL);
@ -1554,6 +1556,7 @@ void initobjects(void) {
addot(OT_DOORIRON, "iron door", "A strong iron door.", MT_METAL, 300, OC_DFEATURE, SZ_LARGE);
// GLYPH here is a special case in getglyph
addflag(lastot->flags, F_DOOR, SZ_MIN, SZ_MAX, NA, NULL);
addflag(lastot->flags, F_DOORFALLOB, NA, NA, NA, "sheet of metal");
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_MAX, NA, NULL);
addflag(lastot->flags, F_BLOCKSVIEW, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_BLOCKSLOF, B_TRUE, NA, NA, NULL);
@ -1591,6 +1594,7 @@ void initobjects(void) {
addot(OT_GATEIRON, "iron gate", "A gate comprised of a series of vertical iron bars, raised slightly above the floor.", MT_METAL, 500, OC_DFEATURE, SZ_LARGE);
addflag(lastot->flags, F_GLYPH, C_GREY, '+', NA, NULL);
addflag(lastot->flags, F_DOOR, SZ_MEDIUM, SZ_MAX, NA, NULL);
addflag(lastot->flags, F_DOORFALLOB, NA, NA, NA, "4-5 iron poles");
addflag(lastot->flags, F_IMPASSABLE, SZ_MEDIUM, SZ_MAX, NA, NULL);
addflag(lastot->flags, F_LOCKABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_ATTACKABLE, B_TRUE, NA, NA, NULL);
@ -1607,6 +1611,7 @@ void initobjects(void) {
addot(OT_GATEBONE, "bone gate", "A grisly gate created from human bones.", MT_BONE, 60, OC_DFEATURE, SZ_LARGE);
addflag(lastot->flags, F_GLYPH, C_GREY, '+', NA, NULL);
addflag(lastot->flags, F_DOOR, SZ_MIN, SZ_MAX, NA, NULL);
addflag(lastot->flags, F_DOORFALLOB, NA, NA, NA, "50-100 bones");
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_MAX, NA, NULL);
addflag(lastot->flags, F_LOCKABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_ATTACKABLE, B_TRUE, NA, NA, NULL);
@ -1619,6 +1624,7 @@ void initobjects(void) {
addot(OT_GATEWOOD, "wooden gate", "A gate comprised of a series of wooden slats.", MT_WOOD, 200, OC_DFEATURE, SZ_LARGE);
addflag(lastot->flags, F_GLYPH, C_GREY, '+', NA, NULL);
addflag(lastot->flags, F_DOOR, SZ_MIN, SZ_MAX, NA, NULL);
addflag(lastot->flags, F_DOORFALLOB, NA, NA, NA, "plank of wood");
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_MAX, NA, NULL);
addflag(lastot->flags, F_LOCKABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_ATTACKABLE, B_TRUE, NA, NA, NULL);
@ -1743,7 +1749,7 @@ void initobjects(void) {
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_MAX, NA, NULL);
addflag(lastot->flags, F_CLIMBOBSTACLE, 20, NA, NA, NULL);
addflag(lastot->flags, F_CLIMBOBSTACLE, 100, NA, NA, NULL);
addflag(lastot->flags, F_GROWSTO, OT_BOULDER, VT_OB, NA, NULL);
addflag(lastot->flags, F_SHRINKSTO, OT_STONE, VT_OB, NA, NULL);
@ -1770,7 +1776,7 @@ void initobjects(void) {
addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_LOCKED, 500, NA, B_TRUE, NULL); // impossible to disarm!
addflag(lastot->flags, F_LOCKED, B_TRUE, 500, B_TRUE, NULL); // impossible to disarm!
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);
@ -1802,7 +1808,7 @@ void initobjects(void) {
addflag(lastot->flags, F_CLIMBABLE, D_IN, NA, NA, "doorway");
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_BABAYAGAHUT, NA, NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_LOCKED, B_TRUE, 40, NA, NULL);
addflag(lastot->flags, F_LOCKED, B_TRUE, 120, NA, NULL);
addflag(lastot->flags, F_LOCKABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_ATTACKABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
@ -1997,67 +2003,67 @@ void initobjects(void) {
// traps - cell only
addot(OT_TRAPARROW, "arrow trap", "A pressure plate which causes arrows to shoot at you.", MT_NOTHING, 0, OC_TRAP, SZ_SMALL);
addflag(lastot->flags, F_TRAP, 25, B_TRUE, NA, "ground");
addflag(lastot->flags, F_TRAP, 80, B_TRUE, NA, "ground");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 76, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 76, NA, NULL);
addflag(lastot->flags, F_GLYPH, C_GREY, '^', NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
addflag(lastot->flags, F_SECRET, 30, NA, NA, NULL);
addflag(lastot->flags, F_SECRET, 75, NA, NA, NULL);
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
addot(OT_TRAPARROWP, "poison arrow trap", "A pressure plate which causes poisoned arrows to shoot at you.", MT_NOTHING, 0, OC_TRAP, SZ_SMALL);
addflag(lastot->flags, F_TRAP, 25, B_TRUE, NA, "ground");
addflag(lastot->flags, F_TRAP, 85, B_TRUE, NA, "ground");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 69, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 69, NA, NULL);
addflag(lastot->flags, F_GLYPH, C_GREY, '^', NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
addflag(lastot->flags, F_SECRET, 30, NA, NA, NULL);
addflag(lastot->flags, F_SECRET, 75, NA, NA, NULL);
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
addot(OT_TRAPPIT, "pit trap", "A pressure plate which causes the floor to drop away.", MT_NOTHING, 0, OC_TRAP, SZ_SMALL);
addflag(lastot->flags, F_TRAP, 20, B_TRUE, 22, "ground");
addflag(lastot->flags, F_TRAP, 85, B_TRUE, 22, "ground");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 85, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 85, NA, NULL);
addflag(lastot->flags, F_GLYPH, C_GREY, '^', NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_SECRET, 20, NA, NA, NULL);
addflag(lastot->flags, F_SECRET, 60, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addot(OT_TRAPROCK, "falling rock trap", "A pressure plate which causes heavy rocks to drop from the ceiling.", MT_NOTHING, 0, OC_TRAP, SZ_SMALL);
addflag(lastot->flags, F_TRAP, 20, B_TRUE, 22, "ground");
addflag(lastot->flags, F_TRAP, 70, B_TRUE, 22, "ground");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 85, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 85, NA, NULL);
addflag(lastot->flags, F_GLYPH, C_GREY, '^', NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
addflag(lastot->flags, F_SECRET, 25, NA, NA, NULL);
addflag(lastot->flags, F_SECRET, 70, NA, NA, NULL);
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
addot(OT_TRAPSUMMON, "summoning trap", "A magical trap which causes a monster to appear.", MT_NOTHING, 0, OC_TRAP, SZ_SMALL);
addflag(lastot->flags, F_TRAP, 30, B_TRUE, NA, NULL);
addflag(lastot->flags, F_TRAP, 90, B_TRUE, NA, NULL);
addflag(lastot->flags, F_RARITY, H_DUNGEON, 60, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 60, NA, NULL);
addflag(lastot->flags, F_GLYPH, C_GREEN, '^', NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
addflag(lastot->flags, F_SECRET, 30, NA, NA, NULL);
addflag(lastot->flags, F_SECRET, 100, NA, NA, NULL);
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
addot(OT_TRAPTRIP, "tripwire", "A thin wire at ankle height.", MT_WIRE, 0.1, OC_TRAP, SZ_SMALL);
addflag(lastot->flags, F_TRAP, 15, B_FALSE, 20, "ground");
addflag(lastot->flags, F_TRAP, 50, B_FALSE, 20, "ground");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 90, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 90, NA, NULL);
addflag(lastot->flags, F_GLYPH, C_GREY, '^', NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
addflag(lastot->flags, F_SECRET, 25, NA, NA, NULL);
addflag(lastot->flags, F_SECRET, 65, NA, NA, NULL);
addflag(lastot->flags, F_ATTACKABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 1, 1, NA, NULL);
@ -2066,13 +2072,13 @@ void initobjects(void) {
// traps - object only
addot(OT_TRAPNEEDLEP, "poison needle trap", "A springed needle coated with poison.", MT_NOTHING, 0, OC_TRAP, SZ_SMALL);
addflag(lastot->flags, F_OBJECTTRAP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_TRAP, 23, B_TRUE, 25, NULL);
addflag(lastot->flags, F_TRAP, 75, B_TRUE, 25, NULL);
addflag(lastot->flags, F_GLYPH, C_GREY, '^', NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addot(OT_TRAPWIND, "wind trap", "A magical trap which assails the target with a blast of air.", MT_NOTHING, 0, OC_TRAP, SZ_SMALL);
addflag(lastot->flags, F_OBJECTTRAP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_TRAP, 20, B_TRUE, NA, NULL);
addflag(lastot->flags, F_TRAP, 100, B_TRUE, NA, NULL);
addflag(lastot->flags, F_GLYPH, C_MAGENTA, '^', NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
@ -2080,14 +2086,14 @@ void initobjects(void) {
addot(OT_TRAPDOORFALL, "falling door trap", "A door hinged at the bottom, ready to crush the unwary.", MT_NOTHING, 0, OC_TRAP, SZ_SMALL);
addflag(lastot->flags, F_OBJECTTRAP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_DOORTRAPONLY, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_TRAP, 25, B_TRUE, 23, NULL);
addflag(lastot->flags, F_TRAP, 70, B_TRUE, 23, NULL);
addflag(lastot->flags, F_GLYPH, C_GREY, '^', NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
// traps - either cell on object
addot(OT_TRAPALARM, "alarm trap", "A pressure-triggered trap which sounds a loud siren.", MT_NOTHING, 0, OC_TRAP, SZ_SMALL);
addflag(lastot->flags, F_TRAP, 18, B_TRUE, NA, "ground");
addflag(lastot->flags, F_TRAP, 65, B_TRUE, NA, "ground");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 100, NA, NULL);
addflag(lastot->flags, F_OBJECTTRAP, B_TRUE, NA, NA, NULL);
@ -2095,11 +2101,11 @@ void initobjects(void) {
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
addflag(lastot->flags, F_SECRET, 30, NA, NA, NULL);
addflag(lastot->flags, F_SECRET, 65, NA, NA, NULL);
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
addot(OT_TRAPEBLAST, "energy blast trap", "A magical trap which blasts its victim with energy.", MT_NOTHING, 0, OC_TRAP, SZ_SMALL);
addflag(lastot->flags, F_TRAP, 30, B_TRUE, NA, NULL);
addflag(lastot->flags, F_TRAP, 70, B_TRUE, NA, NULL);
addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 75, NA, NULL);
addflag(lastot->flags, F_OBJECTTRAP, B_TRUE, NA, NA, NULL);
@ -2107,11 +2113,11 @@ void initobjects(void) {
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
addflag(lastot->flags, F_SECRET, 30, NA, NA, NULL);
addflag(lastot->flags, F_SECRET, 75, NA, NA, NULL);
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
addot(OT_TRAPFIRE, "fire trap", "A trap which fires a pillar of flame.", MT_NOTHING, 0, OC_TRAP, SZ_SMALL);
addflag(lastot->flags, F_TRAP, 30, B_TRUE, 30, NULL);
addflag(lastot->flags, F_TRAP, 70, B_TRUE, 30, NULL);
addflag(lastot->flags, F_RARITY, H_DUNGEON, 59, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 59, NA, NULL);
addflag(lastot->flags, F_OBJECTTRAP, B_TRUE, NA, NA, NULL);
@ -2119,34 +2125,34 @@ void initobjects(void) {
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
addflag(lastot->flags, F_SECRET, 30, NA, NA, NULL);
addflag(lastot->flags, F_SECRET, 75, NA, NA, NULL);
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
addot(OT_TRAPLIGHTNING, "electrical trap", "A metal pressure plate which triggers a bolt of arcing electricity.", MT_NOTHING, 0, OC_TRAP, SZ_SMALL);
addflag(lastot->flags, F_TRAP, 30, B_TRUE, NA, "ground");
addflag(lastot->flags, F_TRAP, 65, B_TRUE, NA, "ground");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 59, NA, NULL);
addflag(lastot->flags, F_OBJECTTRAP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_GLYPH, C_GREY, '^', NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
addflag(lastot->flags, F_SECRET, 30, NA, NA, NULL);
addflag(lastot->flags, F_SECRET, 70, NA, NA, NULL);
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
addot(OT_TRAPGAS, "gas trap", "A trap which releases poisonous gas.", MT_NOTHING, 0, OC_TRAP, SZ_SMALL);
addflag(lastot->flags, F_TRAP, 27, B_TRUE, NA, NULL);
addflag(lastot->flags, F_TRAP, 70, B_TRUE, NA, NULL);
addflag(lastot->flags, F_RARITY, H_DUNGEON, 69, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 69, NA, NULL);
addflag(lastot->flags, F_GLYPH, C_GREY, '^', NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
addflag(lastot->flags, F_SECRET, 30, NA, NA, NULL);
addflag(lastot->flags, F_SECRET, 70, NA, NA, NULL);
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_OBJECTTRAP, B_TRUE, NA, NA, NULL);
addot(OT_TRAPMINE, "landmine trap", "A buried, pressure-sensitive explosive device.", MT_NOTHING, 0, OC_TRAP, SZ_SMALL);
addflag(lastot->flags, F_TRAP, 30, B_TRUE, NA, "ground");
addflag(lastot->flags, F_TRAP, 100, B_TRUE, NA, "ground");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 50, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 50, NA, NULL);
addflag(lastot->flags, F_RARITY, H_FOREST, 20, NA, NULL);
@ -2155,7 +2161,7 @@ void initobjects(void) {
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
addflag(lastot->flags, F_SECRET, 30, NA, NA, NULL);
addflag(lastot->flags, F_SECRET, 85, NA, NA, NULL);
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
addot(OT_TRAPTELEPORT, "teleportation trap", "A magical dispersal field.", MT_NOTHING, 0, OC_TRAP, SZ_LARGE);
@ -2166,7 +2172,7 @@ void initobjects(void) {
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
addflag(lastot->flags, F_SECRET, 30, NA, NA, NULL);
addflag(lastot->flags, F_SECRET, 70, NA, NA, NULL);
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_OBJECTTRAP, B_TRUE, NA, NA, NULL);
@ -2398,7 +2404,7 @@ void initobjects(void) {
addot(OT_GEMOFSEEING, "gem of seeing", "Magically enhances your eyesight.", MT_STONE, 1, OC_ROCK, SZ_TINY);
addflag(lastot->flags, F_HOLDCONFER, F_XRAYVIS, 1, NA, NULL);
addflag(lastot->flags, F_HOLDCONFER, F_SEEINVIS, B_TRUE, NA, NULL);
addflag(lastot->flags, F_HOLDCONFER, F_ENHANCESEARCH, 20, NA, NULL);
addflag(lastot->flags, F_HOLDCONFER, F_ENHANCESEARCH, 100, NA, NULL);
addflag(lastot->flags, F_HOLDCONFER, F_DETECTAURAS, B_TRUE, NA, NULL);
addflag(lastot->flags, F_HOLDCONFER, F_DETECTMAGIC, B_TRUE, NA, NULL);
addflag(lastot->flags, F_VALUE, 1000, NA, NA, NULL);
@ -2579,7 +2585,7 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_DUNGEON, NA, NA, NULL);
addflag(lastot->flags, F_RARITY, H_FOREST, NA, NA, NULL);
addflag(lastot->flags, F_RARITY, H_ANTNEST, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_SLIPPERY, 15, NA, NA, NULL);
addflag(lastot->flags, F_SLIPPERY, 75, NA, NA, NULL);
addflag(lastot->flags, F_SLIPMOVE, 15, NA, NA, NULL);
addot(OT_BERRY, "berry", "Juicy, brightly coloured berries.", MT_FOOD, 0.1, OC_FOOD, SZ_TINY);
addflag(lastot->flags, F_GLYPH, C_ORANGE, '%', NA, NULL);
@ -2619,7 +2625,7 @@ void initobjects(void) {
addflag(lastot->flags, F_EDIBLE, B_TRUE, 5, NA, "");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_VERYRARE, NULL);
addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_VERYRARE, NULL);
addflag(lastot->flags, F_HOLDCONFER, F_EXTRALUCK, 1, NA, NULL);
addflag(lastot->flags, F_HOLDCONFER, F_EXTRALUCK, 5, NA, NULL);
addflag(lastot->flags, F_VALUE, 300, NA, NA, "");
addflag(lastot->flags, F_GROWSTO, OT_SHRUB, VT_OB, NA, NULL);
killflagsofid(lastot->flags, F_STACKABLE);
@ -5053,7 +5059,7 @@ void initobjects(void) {
addot(OT_BLANKET, "wool blanket", "A warm wool blanket for those cold winter nights.", MT_CLOTH, 2, OC_TOOLS, SZ_MEDIUM);
addflag(lastot->flags, F_RARITY, H_ALL, 80, NA, NULL);
addflag(lastot->flags, F_VALUE, 50, NA, NA, NULL);
addflag(lastot->flags, F_HELPSREST, 10, NA, NA, NULL);
addflag(lastot->flags, F_HELPSREST, 15, NA, NA, NULL);
addot(OT_BLINDFOLD, "blindfold", "Short length of wide cloth, used for blocking eyesight.", MT_CLOTH, 0.01, OC_TOOLS, SZ_TINY);
addflag(lastot->flags, F_GOESON, BP_EYES, NA, NA, NULL);
@ -5174,7 +5180,7 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_FOREST, 75, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_VALUE, 35, NA, NA, NULL);
addflag(lastot->flags, F_HELPSCLIMB, 3, NA, NA, NULL);
addflag(lastot->flags, F_HELPSCLIMB, 15, NA, NA, NULL);
addflag(lastot->flags, F_GOESON, BP_WAIST, NA, NA, NULL); // ie. can wear it as a belt
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 20, 20, NA, NULL);
@ -5376,7 +5382,7 @@ void initobjects(void) {
addot(OT_SLEEPINGBAG, "sleeping bag", "An insulated bag for sleeping in. Very comfortable.", MT_CLOTH, 2, OC_TECH, SZ_MEDIUM);
addflag(lastot->flags, F_RARITY, H_ALL, 70, NA, NULL);
addflag(lastot->flags, F_VALUE, 75, NA, NA, NULL);
addflag(lastot->flags, F_HELPSREST, 15, NA, NA, NULL);
addflag(lastot->flags, F_HELPSREST, 30, NA, NA, NULL);
// tech - l1
addot(OT_BUTANETORCH, "butane torch", "A cooking tool which creates an intensely hot flame using butane gas.", MT_METAL, 0.5, OC_TECH, SZ_TINY);
@ -5439,7 +5445,7 @@ void initobjects(void) {
addot(OT_TENT, "tent", "A easy to use, portable shelter made of fabric.", MT_CLOTH, 10, OC_TECH, SZ_HUMAN);
addflag(lastot->flags, F_RARITY, H_ALL, 70, RR_RARE, NULL);
addflag(lastot->flags, F_VALUE, 150, NA, NA, NULL);
addflag(lastot->flags, F_HELPSREST, 15, 1, NA, NULL);
addflag(lastot->flags, F_HELPSREST, 50, 1, NA, NULL);
addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_TECHLEVEL, PR_BEGINNER, NA, NA, NULL);
addot(OT_FLASHBANG, "flashbang", "A stun grenade which temporarily blinds all within sight.", MT_METAL, 1, OC_TECH, SZ_TINY);
@ -5635,7 +5641,7 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_ALL, 70, RR_RARE, NULL);
addflag(lastot->flags, F_VALUE, 125, NA, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_EXTRAINFO, B_TRUE, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_ENHANCESEARCH, 10, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_ENHANCESEARCH, 50, NA, NULL);
addflag(lastot->flags, F_TECHLEVEL, PR_ADEPT, NA, NA, NULL);
addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL);
@ -5823,7 +5829,7 @@ void initobjects(void) {
addflag(lastot->flags, F_OBHPDRAIN, 1, NA, NA, NULL);
addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_SLIPPERY, 14, NA, NA, NULL);
addflag(lastot->flags, F_SLIPPERY, 70, NA, NA, NULL);
addflag(lastot->flags, F_GROWSTO, OT_ICICLE, VT_OB, NA, NULL);
addflag(lastot->flags, F_SHRINKSTO, OT_ICECHUNK, VT_OB, NA, NULL);
addot(OT_ICECHUNK, "chunk of ice", "A chunk of ice.", MT_ICE, 0.5, OC_MISC, SZ_SMALL);
@ -5873,7 +5879,7 @@ void initobjects(void) {
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_GLYPH, C_GREEN, ',', NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_SLIPPERY, 1, NA, NA, NULL);
addflag(lastot->flags, F_SLIPPERY, 5, NA, NA, NULL);
addflag(lastot->flags, F_DRINKABLE, B_TRUE, 0, NA, NULL);
addflag(lastot->flags, F_TAINTED, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_PURIFIESTO, OT_PUDDLEWATERL, NA, NA, NULL);
@ -5951,7 +5957,7 @@ void initobjects(void) {
addflag(lastot->flags, F_FLAMMABLE, 5, NA, NA, "medium fire");
addflag(lastot->flags, F_DRINKABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_FILLPOT, OT_POT_OIL, NA, NA, NULL);
addflag(lastot->flags, F_SLIPPERY, 13, NA, NA, NULL);
addflag(lastot->flags, F_SLIPPERY, 65, NA, NA, NULL);
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 5, 5, NA, NULL);
addflag(lastot->flags, F_OBHPDRAIN, 1, NA, NA, NULL);
@ -6019,7 +6025,7 @@ void initobjects(void) {
addflag(lastot->flags, F_FILLPOT, OT_POT_WATER, NA, NA, NULL);
//addflag(lastot->flags, F_WALKDAM, DT_WATER, NA, NA, "0d1+1");
addflag(lastot->flags, F_WALKDAMBP, BP_FEET, DT_WATER, FALLTHRU, "0d1+1");
addflag(lastot->flags, F_SLIPPERY, 1, NA, NA, NULL);
addflag(lastot->flags, F_SLIPPERY, 5, NA, NA, NULL);
addot(OT_PUDDLEWATERL, "large puddle of water", "A large pool of water.", MT_WATER, 20, OC_MISC, SZ_MEDIUM);
addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL);
@ -6060,7 +6066,7 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_DUNGEON, 50, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 50, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_SLIPPERY, 1, NA, NA, NULL);
addflag(lastot->flags, F_SLIPPERY, 5, NA, NA, NULL);
addflag(lastot->flags, F_OBDIETEXT, NA, NA, NA, "evaporates");
addflag(lastot->flags, F_OBHP, 3, 3, NA, NULL);
addflag(lastot->flags, F_OBHPDRAIN, 1, NA, NA, NULL);
@ -6078,7 +6084,7 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 75, NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_SLIPPERY, 1, NA, NA, NULL);
addflag(lastot->flags, F_SLIPPERY, 5, NA, NA, NULL);
addflag(lastot->flags, F_DIECONVERT, NA, NA, NA, "blood stain");
//addflag(lastot->flags, F_DIECONVERTTEXT, NA, NA, NA, "dries up");
//addflag(lastot->flags, F_DIECONVERTTEXTPL, NA, NA, NA, "dry up");
@ -6099,7 +6105,7 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_DUNGEON, 65, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 65, NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_SLIPPERY, 5, NA, NA, NULL);
addflag(lastot->flags, F_SLIPPERY, 25, NA, NA, NULL);
addflag(lastot->flags, F_DIECONVERT, NA, NA, NA, "blood stain");
addflag(lastot->flags, F_DIECONVERTTEXT, NA, NA, NA, "dries up");
addflag(lastot->flags, F_DIECONVERTTEXTPL, NA, NA, NA, "dry up");
@ -6157,7 +6163,7 @@ void initobjects(void) {
addflag(lastot->flags, F_GLYPH, C_BROWN, '_', NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_HELPSREST, 15, 1, NA, NULL);
addflag(lastot->flags, F_HELPSREST, 20, 1, NA, NULL);
addflag(lastot->flags, F_GROWSTO, OT_DOORWOOD, VT_OB, NA, NULL);
addflag(lastot->flags, F_SHRINKSTO, OT_WOODENTABLE, VT_OB, NA, NULL);
@ -6268,7 +6274,7 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
addflag(lastot->flags, F_GLYPH, C_BROWN, '\\', NA, NULL);
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_HUMAN, NA, NULL);
addflag(lastot->flags, F_CLIMBOBSTACLE, 5, NA, NA, NULL);
addflag(lastot->flags, F_CLIMBOBSTACLE, 25, NA, NA, NULL);
addflag(lastot->flags, F_CRUSHABLE, SZ_LARGE, NA, NA, NULL);
addflag(lastot->flags, F_PUSHABLE, B_TRUE, NA, NA, NULL);
//addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
@ -6297,7 +6303,7 @@ void initobjects(void) {
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_HUMAN, NA, NULL);
addflag(lastot->flags, F_CLIMBOBSTACLE, 10, NA, NA, NULL);
addflag(lastot->flags, F_CLIMBOBSTACLE, 50, NA, NA, NULL);
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 20, 20, NA, NULL);
addflag(lastot->flags, F_GROWSTO, OT_IRONBARS, VT_OB, NA, NULL);
@ -6349,7 +6355,7 @@ void initobjects(void) {
addflag(lastot->flags, F_BLOCKSVIEW, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!");
addflag(lastot->flags, F_CAUSESCOUGH, 18, NA, NA, NULL);
addflag(lastot->flags, F_CAUSESCOUGH, 90, NA, NA, NULL);
addflag(lastot->flags, F_SHRINKSTO, OT_STONE, VT_OB, NA, NULL);
addot(OT_DUSTPUFF, "small dust cloud", "A small cloud of dust particles.", MT_GAS, 0, OC_EFFECT, SZ_MEDIUM);
@ -6361,7 +6367,7 @@ void initobjects(void) {
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_BLOCKSVIEW, 3, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
addflag(lastot->flags, F_CAUSESCOUGH, 12, NA, NA, NULL);
addflag(lastot->flags, F_CAUSESCOUGH, 60, NA, NA, NULL);
addot(OT_FIRELARGE, "large fire", "A large, roaring inferno.", MT_FIRE, 0, OC_EFFECT, SZ_HUMAN);
addflag(lastot->flags, F_GLYPH, C_ORANGE, '}', NA, NULL);
@ -6466,7 +6472,7 @@ void initobjects(void) {
addflag(lastot->flags, F_BLOCKSVIEW, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!");
addflag(lastot->flags, F_CAUSESCOUGH, 25, NA, NA, NULL);
addflag(lastot->flags, F_CAUSESCOUGH, 125, NA, NA, NULL);
addot(OT_SMOKEPUFF, "puff of smoke", "A small puff of black smoke.", MT_GAS, 0, OC_EFFECT, SZ_MEDIUM);
addflag(lastot->flags, F_GLYPH, C_GREY, UNI_SHADELIGHT, NA, NULL);
@ -6477,7 +6483,7 @@ void initobjects(void) {
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_BLOCKSVIEW, 2, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
addflag(lastot->flags, F_CAUSESCOUGH, 16, NA, NA, NULL);
addflag(lastot->flags, F_CAUSESCOUGH, 80, NA, NA, NULL);
addot(OT_POISONCLOUD, "cloud of poison gas", "A thick cloud of poisonous gas.", MT_GAS, 0, OC_EFFECT, SZ_LARGE);
addflag(lastot->flags, F_GLYPH, C_GREEN, UNI_SHADEMED, NA, NULL);
@ -6537,7 +6543,7 @@ void initobjects(void) {
addflag(lastot->flags, F_NOOBDIETEXT, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_KNOCKAWAY, 4, 40, 12, "12d3");
addflag(lastot->flags, F_KNOCKAWAY, 4, 40, 60, "12d3");
addflag(lastot->flags, F_OBMOVESRANDOMLY, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!");
@ -6566,7 +6572,7 @@ void initobjects(void) {
addflag(lastot->flags, F_NOOBDIETEXT, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_KNOCKAWAY, 2, 35, 10, "8d3");
addflag(lastot->flags, F_KNOCKAWAY, 2, 35, 50, "8d3");
addflag(lastot->flags, F_OBMOVESRANDOMLY, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!");
@ -6588,7 +6594,7 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_SWAMP, 90, RR_COMMON, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_GLYPH, C_GREEN, '^', NA, NULL);
addflag(lastot->flags, F_RESTRICTMOVEMENT, 30, B_TRUE, B_TRUE, NULL);// the value here will be filled in by the spell.
addflag(lastot->flags, F_RESTRICTMOVEMENT, 150, B_TRUE, B_TRUE, NULL);// the value here will be filled in by the spell.
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 5, 5, NA, NULL);
addflag(lastot->flags, F_DTVULN, DT_FIRE, NA, NA, NULL);
@ -6602,7 +6608,7 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_DUNGEON, 86, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 86, NA, NULL);
addflag(lastot->flags, F_RARITY, H_FOREST, 88, NA, NULL);
addflag(lastot->flags, F_RESTRICTMOVEMENT, 25, B_TRUE, B_TRUE, NULL);
addflag(lastot->flags, F_RESTRICTMOVEMENT, 125, B_TRUE, B_TRUE, NULL);
addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 5, 5, NA, NULL);
@ -6617,7 +6623,7 @@ void initobjects(void) {
addflag(lastot->flags, F_NOOBDIETEXT, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_KNOCKAWAY, 1, 30, 8, "2d6");
addflag(lastot->flags, F_KNOCKAWAY, 1, 30, 40, "2d6");
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!");
// armour objects
@ -6794,7 +6800,7 @@ void initobjects(void) {
addflag(lastot->flags, F_ARMOURRATING, 1, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 30, 30, NA, NULL);
addflag(lastot->flags, F_WATERPROOF, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_HELPSREST, 2, NA, NA, NULL);
addflag(lastot->flags, F_HELPSREST, 5, NA, NA, NULL);
addot(OT_CLOAKFUR, "fur cloak", "A warm and lightweight fur cloak, great for winter camping trips.", MT_FLESH, 3, OC_ARMOUR, SZ_MEDIUM);
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL);
@ -6802,7 +6808,7 @@ void initobjects(void) {
addflag(lastot->flags, F_ARMOURRATING, 1, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 20, 20, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_DTRESIST, DT_COLD, NA, NULL);
addflag(lastot->flags, F_HELPSREST, 5, NA, NA, NULL);
addflag(lastot->flags, F_HELPSREST, 10, NA, NA, NULL);
addot(OT_APRON, "apron", "A sturdy rubber apron, designed to protect against stains.", MT_RUBBER, 2, OC_ARMOUR, SZ_MEDIUM);
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL);
@ -6955,7 +6961,7 @@ void initobjects(void) {
addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 10, 10, NA, NULL);
addflag(lastot->flags, F_SCARY, 2, NA, NA, NULL);
addflag(lastot->flags, F_SCARY, 10, NA, NA, NULL);
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
addot(OT_BALACLAVA, "balaclava", "A form of cloth headgear that covers the whole head, exposing only the eyes. While it does not give much protection, its cloth will filter out poisonous particles.", MT_CLOTH, 1, OC_ARMOUR, SZ_SMALL);
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
@ -7024,7 +7030,7 @@ void initobjects(void) {
addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 2, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 30, 30, NA, NULL);
addflag(lastot->flags, F_SCARY, 4, NA, NA, NULL);
addflag(lastot->flags, F_SCARY, 20, NA, NA, NULL);
addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL);
addot(OT_POINTYHAT, "wizard hat", "A foot-long brimmed conical hat, inscribed with strange symbols.", MT_CLOTH, 1, OC_ARMOUR, SZ_SMALL);
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
@ -7083,7 +7089,7 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_GOESON, BP_EYES, NA, NA, NULL);
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_SCARY, 2, NA, NA, NULL);
addflag(lastot->flags, F_SCARY, 10, NA, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_VISRANGEMOD, -2, NA, NULL);
addflag(lastot->flags, F_CRITPROTECTION, 50, NA, NA, NULL);
killflagsofid(lastot->flags, F_ENCHANTABLE);
@ -7603,6 +7609,15 @@ void initobjects(void) {
addflag(lastot->flags, F_RODSHAPED, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_CANBEDIFFMAT, MT_SILVER, 15, NA, NULL);
addot(OT_KNIFETHROWING, "throwing knife", "A weighted knife, designed to be thrown.", MT_METAL, 1.5, OC_MISSILE, SZ_SMALL);
addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, "");
addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, "");
addflag(lastot->flags, F_MISSILEDAM, NA, NA, NA, "2");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, NA, "");
addflag(lastot->flags, F_RARITY, H_CAVE, 100, NA, "");
addflag(lastot->flags, F_NUMAPPEAR, 1, 3, NA, "");
addflag(lastot->flags, F_CANHAVEOBMOD, OM_POISONED, 17, NA, NULL);
addot(OT_DARTNANO, "nanodart", "A metal dart with a nanofibre point. Capable of piercing most armour.", MT_METAL, 0.5, OC_MISSILE, SZ_TINY);
addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, "");
addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, "");
@ -7632,7 +7647,7 @@ void initobjects(void) {
addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_MISSILEDAM, NA, NA, NA, "0");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_TANGLEMISSILE, 26, 21, B_FALSE, NULL);
addflag(lastot->flags, F_TANGLEMISSILE, 130, 105, B_FALSE, NULL);
addot(OT_NEEDLE, "needle", "A tiny pointed needle.", MT_METAL, 0.02, OC_MISSILE, SZ_TINY);
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "It makes sewing easier.");
@ -7656,7 +7671,7 @@ void initobjects(void) {
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 5, 5, NA, NULL);
addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_TANGLEMISSILE, 33, 30, B_TRUE, NULL);
addflag(lastot->flags, F_TANGLEMISSILE, 165, 150, B_TRUE, NULL);
addot(OT_JAVELIN, "javelin", "A long, sharp missile weapon.", MT_METAL, 4, OC_MISSILE, SZ_MEDIUM);
addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, "");
@ -8340,7 +8355,7 @@ void initobjects(void) {
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
addflag(lastot->flags, F_CANBLOCK, DT_SLASH, NA, NA, NULL);
addot(OT_IRONSTAFF, "iron staff", "A long, stout metal pole.", MT_METAL, 8, OC_WEAPON, SZ_HUMAN);
addot(OT_IRONSTAFF, "iron pole", "A long, stout metal pole.", MT_METAL, 8, OC_WEAPON, SZ_HUMAN);
addflag(lastot->flags, F_RARITY, H_DUNGEON, 60, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 60, NA, NULL);
addflag(lastot->flags, F_OBATTACKDELAY, 110, NA, NA, NULL);
@ -9017,7 +9032,7 @@ void initrace(void) {
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);
addflag(lastrace->flags, F_TAMABLE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 150, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
@ -9059,7 +9074,7 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTJOB, 75, J_RANDOM, NA, NULL);
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 40, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 200, NA, NA, NULL);
addflag(lastrace->flags, F_AVIAN, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
@ -9116,7 +9131,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 4, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "bleeps^a bleep");
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 35, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 150, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
@ -9166,7 +9181,7 @@ void initrace(void) {
addflag(lastrace->flags, F_DTVULN, DT_SONIC, NA, NA, NULL);
addflag(lastrace->flags, F_DTVULN, DT_WATER, NA, NA, NULL);
addflag(lastrace->flags, F_NOSKILL, SK_SWIMMING, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 25, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 125, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
@ -9201,7 +9216,7 @@ void initrace(void) {
// penalties
addflag(lastrace->flags, F_MPMOD, -3, NA, NA, NULL);
addflag(lastrace->flags, F_DTVULN, DT_LIGHT, NA, NA, "1d6");
addflag(lastrace->flags, F_TAMABLE, 35, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 175, NA, NA, NULL);
// for ai:
addflag(lastrace->flags, F_WANTS, OT_GOLD, NA, NA, NULL);
addflag(lastrace->flags, F_WANTSOBFLAG, F_GEM, NA, NA, NULL);
@ -9319,7 +9334,7 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTSKILL, SK_STEALTH, PR_NOVICE, NA, NULL);
// penalties
addbonustext(lastrace->flags, F_PENDESC, "Slightly below average Hit Points.");
addflag(lastrace->flags, F_TAMABLE, 25, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 125, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
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.");
@ -9362,7 +9377,7 @@ void initrace(void) {
addflag(lastrace->flags, F_DTVULN, DT_SONIC, NA, NA, NULL);
addflag(lastrace->flags, F_VEGETARIAN, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOSKILL, SK_ATHLETICS, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 25, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 125, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
addrace(R_WYRMSPAWN, "wyrmspawn", 150, '@', C_MAGENTA, MT_FLESH, RC_HUMANOID, "In the rare occasion that a wyrm mates with a human, the result is a wyrmspawn - half-human, half-wyrm. Their scaled skin protects against slashing damage, and those who live long enough gain powerful breath weapons. On the other hand, their innate ego precludes the worship of any god and limits their rate of learning.");
@ -11696,9 +11711,9 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTSKILL, SK_THIEVERY, PR_SKILLED, NA, NULL);
addflag(lastrace->flags, F_WANTS, OT_GOLD, B_COVETS, NA, NULL);
addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EXTRALUCK, 2, NA, NA, NULL);
addflag(lastrace->flags, F_EXTRALUCK, 10, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 0, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_EXTRALUCK, 1, NA, "25");
addflag(lastrace->flags, F_EATCONFER, F_EXTRALUCK, 5, NA, NULL);
addrace(R_LESHY, "leshy", 35, 'h', C_GREEN, MT_PLANT, RC_HUMANOID, "Human-like figures with leaves (and the occasional fruit) covering their bodies.");
setbodytype(lastrace, BT_HUMANOID);
@ -13127,7 +13142,7 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 8, NA, NULL);
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 32, "5-10");
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 110, "5-10");
addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 3, NA, NULL);
addflag(lastrace->flags, F_REGENERATES, 2, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL);
@ -13522,7 +13537,7 @@ void initrace(void) {
addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL);
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_ADHESIVE, 25, NA, NA, NULL);
addflag(lastrace->flags, F_ADHESIVE, 100, NA, NA, NULL);
addrace(R_IVYRAPID, "rapid ivy", 1, 'F', C_CYAN, MT_PLANT, RC_PLANT, "A strain of ivy which reproduces with incredible speed. Farmers find it difficult to remove due to its sharp spines.");
@ -13799,8 +13814,8 @@ void initrace(void) {
addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, B_COVETS, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_MASTER, NA, NULL);
addflag(lastrace->flags, F_FATALFOOD, OT_CHOCOLATE, NA, NA, NULL);
addflag(lastrace->flags, F_SKILLCHECKMOD, SC_SLIP, -3, NA, NULL); // paws can't grip
addflag(lastrace->flags, F_SKILLCHECKMOD, SC_FALL, -3, NA, NULL); // paws can't grip
addflag(lastrace->flags, F_SKILLCHECKMOD, SC_SLIP, -15, NA, NULL); // paws can't grip
addflag(lastrace->flags, F_SKILLCHECKMOD, SC_FALL, -15, NA, NULL); // paws can't grip
addflag(lastrace->flags, F_FELINE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_HATESRACEWITHFLAG, F_CANINE, NA, NA, NULL);
@ -14050,7 +14065,7 @@ void initrace(void) {
addflag(lastrace->flags, F_SEEINDARK, 4, NA, NA, NULL);
addflag(lastrace->flags, F_CRITKNOCKDOWN, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, "");
addflag(lastrace->flags, F_TAMABLE, 35, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 175, NA, NA, NULL);
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
addrace(R_ANT, "giant ant", 20, 'a', C_BROWN, MT_FLESH, RC_ANIMAL, "Giant ants are enormous (for an ant, anyway), and keen to take avenge their smaller ancestors who were crushed by small children.");
setbodytype(lastrace, BT_QUADRAPED);
@ -14267,7 +14282,7 @@ void initrace(void) {
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 2, NA, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_SWIMMING, PR_BEGINNER, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 150, NA, NA, NULL);
addflag(lastrace->flags, F_CANINE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_FATALFOOD, OT_CHOCOLATE, NA, NA, NULL);
@ -14334,7 +14349,7 @@ void initrace(void) {
addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 2, NA, "whines in pain^whining");
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "howls^a howl");
addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 3, NA, "growls^growling");
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 24, "10-15");
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 100, "10-15");
addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 1, NA, NULL);
addflag(lastrace->flags, F_CRITKNOCKDOWN, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_SWIMMING, PR_BEGINNER, NA, NULL);
@ -14370,7 +14385,7 @@ void initrace(void) {
addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 2, NA, "whines in pain^whining");
addflag(lastrace->flags, F_STARTSKILL, SK_SWIMMING, PR_ADEPT, NA, NULL);
addflag(lastrace->flags, F_MORALE, 8, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 40, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 200, NA, NA, NULL);
addflag(lastrace->flags, F_CANINE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
@ -14499,7 +14514,7 @@ void initrace(void) {
addflag(lastrace->flags, F_LEVRACE, 4, R_HAWK, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 3, NA, "screeches in pain^screeches of pain");
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 150, NA, NA, NULL);
addflag(lastrace->flags, F_AVIAN, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
@ -14911,7 +14926,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 1, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL);
addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL);
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 10, "2-4");
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 60, "2-4");
addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 1, NA, NULL);
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, B_COVETS, NA, NULL);
@ -15046,7 +15061,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 2, NA, NULL);
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 20, "5-10");
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 80, "5-10");
addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 1, NA, NULL);
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
@ -15301,7 +15316,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 6, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL);
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 26, "10-20");
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 100, "10-20");
addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 3, NA, NULL); // strong!
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, NULL); // don't announce spellcasting
addflag(lastrace->flags, F_CASTWITHOUTIQ, B_TRUE, NA, NA, NULL);
@ -15452,7 +15467,7 @@ void initrace(void) {
addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 3, NA, "growls^growling");
addflag(lastrace->flags, F_FLEEONHPPCT, 75, NA, NA, "");
addflag(lastrace->flags, F_HASSKILL, SK_SWIMMING, PR_BEGINNER, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 150, NA, NA, NULL);
addflag(lastrace->flags, F_CANINE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_FATALFOOD, OT_CHOCOLATE, NA, NA, NULL);
@ -16351,7 +16366,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 6, NA, NULL);
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 25, "10-15");
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 90, "10-15");
addflag(lastrace->flags, F_HITCONFERVALS, P_WEAKNESS, 3, NA, NULL);
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
@ -16735,7 +16750,7 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_VLOW, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 2, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL);
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 28, "3-5");
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 100, "3-5");
addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 2, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, 10, NA, NA, NULL);
addflag(lastrace->flags, F_DTIMMUNE, DT_POISON, NA, NA, NULL);
@ -16924,7 +16939,7 @@ void initrace(void) {
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_HASATTACK, OT_TOUCHPOISON, 4, NA, NULL);
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 32, "5-10");
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 115, "5-10");
addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 3, NA, NULL);
addflag(lastrace->flags, F_DTVULN, DT_FIRE, NA, NA, NULL);
addflag(lastrace->flags, F_CANCAST, OT_S_BLIGHT, NA, NA, "pw:5;");
@ -17339,7 +17354,7 @@ void initrace(void) {
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 8, NA, NA, NULL);
addflag(lastrace->flags, F_HIRABLE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 25, NULL);
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 100, NULL);
addflag(lastrace->flags, F_HITCONFERVALS, P_LYCANTHROPY, -1, PERMENANT, "10^grizzly bear");
addflag(lastrace->flags, F_FILLPOT, OT_POT_LYCANTHROPY, NA, NA, NULL);
@ -17382,7 +17397,7 @@ void initrace(void) {
addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_LYCANTHROPE, -1, NA, NA, "dire rat");
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 25, NULL);
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 100, NULL);
addflag(lastrace->flags, F_HITCONFERVALS, P_LYCANTHROPY, -1, PERMENANT, "10^dire rat");
addflag(lastrace->flags, F_FILLPOT, OT_POT_LYCANTHROPY, NA, NA, NULL);
@ -17424,7 +17439,7 @@ void initrace(void) {
addflag(lastrace->flags, F_CANINE, B_TRUE, NA, NA, NULL); // ie. cats will know!
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 6, NA, NA, NULL);
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 25, NULL);
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 100, NULL);
addflag(lastrace->flags, F_HITCONFERVALS, P_LYCANTHROPY, -1, PERMENANT, "10^dire wolf");
addflag(lastrace->flags, F_FILLPOT, OT_POT_LYCANTHROPY, NA, NA, NULL);
@ -17868,9 +17883,9 @@ void initskills(void) {
addskilldesc(SK_THIEVERY, PR_NOVICE, "^gYou gain the 'steal' ability, usable on enemies or in shops.^n", B_FALSE);
addskilldesc(SK_THIEVERY, PR_BEGINNER, "^gYour accuracy penalty when stealing is reduced.^n", B_TRUE);
addskilldesc(SK_THIEVERY, PR_ADEPT, "^gYou can now choose which items to steal.^n", B_TRUE);
addskilldesc(SK_THIEVERY, PR_SKILLED, "gYou can now steal heavy items.", B_TRUE);
addskilldesc(SK_THIEVERY, PR_EXPERT, "gYou can now steal multiple items.", B_TRUE);
addskilldesc(SK_THIEVERY, PR_MASTER, "gYou can now steal equipped items.", B_TRUE);
addskilldesc(SK_THIEVERY, PR_SKILLED, "^gYou can now steal heavy items.", B_TRUE);
addskilldesc(SK_THIEVERY, PR_EXPERT, "^gYou can now steal multiple items.", B_TRUE);
addskilldesc(SK_THIEVERY, PR_MASTER, "^gYou can now steal equipped items.", B_TRUE);
addskill(SK_THROWING, "Throwing", "Your accuracy when throwing objects at things.", 50);
addskilldesc(SK_THROWING, PR_INEPT, "^gYour throw accuracy decreases by 32%% per cell.^n", B_FALSE);
addskilldesc(SK_THROWING, PR_NOVICE, "^gYour throw accuracy decreases by 22%% per cell.^n", B_FALSE);

Binary file not shown.

4
defs.h
View File

@ -2211,6 +2211,7 @@ enum OBTYPE {
OT_DART,
OT_DARTNANO,
OT_DARTTRANQ,
OT_KNIFETHROWING,
OT_MANRIKI,
OT_NEEDLE,
OT_NET,
@ -2765,6 +2766,9 @@ enum FLAG {
// if you're on the ground (ie not flying)
F_OBJECTTRAP, // this trap can go onto an object (door, chest, etc)
F_DOORTRAPONLY, // this trap can only go on to doors
F_DOORFALLOB, // if this object is trapped with OT_TRAPDOORFALL,
// text is the object it turns into after falling
// on you.
F_SMELLY, // lfs with enhacned scent can smell this object
F_MAKESNOISE, // object periodically makes noise.
// v0 = % chance of noise.

14
god.c
View File

@ -575,6 +575,7 @@ void dooffer(void) {
} else if ((f->id == F_SACRIFICEOBCLASS) && (f->val[0] == o->type->obclass->id)) {
ok = B_TRUE;
thispiety = f->val[2];
// will be override late though, if val[0] is OC_MONEY
} else if ((f->id == F_SACRIFICEOBWITHFLAG) && hasflag(o->flags, f->val[0])) {
ok = B_TRUE;
thispiety = f->val[2];
@ -586,13 +587,14 @@ void dooffer(void) {
char *p;
char obname[BUFLEN];
// override piety sometimes
if (god->race->id == R_GODTHIEVES) {
// 100 value = 1 piety.
// NOTE: this could be exploited by constantly sacrificing
// 1 gold at a time!
// gold/gems are treated differently
// if you don't donate at least 100gold worth, you
// might not get any piety.
if ((o->type->id == OT_GOLD) || hasflag(o->flags, F_GEM)) {
thispiety = (getobvalue(o) / 100) + 1;
if (pctchance(getobvalue(o))) {
thispiety = (getobvalue(o) / 100);
} else {
thispiety = 0;
}
}

23
io.c
View File

@ -1687,7 +1687,8 @@ int announceflaggain(lifeform_t *lf, flag_t *f) {
if (lf2) {
getlfname(lf2, buf);
if ((f->lifetime == PERMENANT) || (f->lifetime >= 4)) {
msg("%s turn%s to flee from %s!", lfname, isplayer(lf) ? "" : "s",
msg("^%d%s turn%s to flee from %s!", getlfcol(lf, CC_BAD),
lfname, isplayer(lf) ? "" : "s",
(cansee(player, lf2) || isplayer(lf2)) ? buf : "something");
} else { // jsut scared a little bit
msg("%s cower%s away from %s!", lfname, isplayer(lf) ? "" : "s",
@ -4519,7 +4520,7 @@ void docomms(lifeform_t *lf) {
// only get speech bonus if humanoid (ie they can understand you)
if (!cantalk(lf)) {
// this will counteract the bonus given in skillcheck()
mod -= (getskill(player, SK_SPEECH)*2);
mod -= (getskill(player, SK_SPEECH)*10);
}
// chance of calming hostile intelligent, monsters
@ -4650,7 +4651,7 @@ void docomms(lifeform_t *lf) {
canhear(lf, player->cell, SV_SHOUT, NULL) &&
(getattrbracket(getattr(lf, A_IQ), A_IQ, NULL) > IQ_ANIMAL) &&
!isundead(lf)) {
if (skillcheck(player, SC_SPEECH, 30, alignmod)) {
if (skillcheck(player, SC_SPEECH, 150, alignmod)) {
// passed!
sayphrase(lf, SP_MERCYACCEPT, SV_TALK, NA, player->race->name, player);
// they knock you out
@ -5151,7 +5152,7 @@ void doeat(obpile_t *op) {
eatob = askobject(op, "Eat what", "You have nothing to eat!", NULL, 'e', AO_EDIBLE);
}
if (eatob) {
if (isunknownbadobject(eatob) && skillcheck(player, A_WIS, 30, 0)) {
if (isunknownbadobject(eatob) && skillcheck(player, A_WIS, 120, 0)) {
if (!confirm_badfeeling(eatob)) {
msg("Cancelled.");
return;
@ -5166,7 +5167,7 @@ int dowear(obpile_t *op) {
int rv;
o = askobject(op, "Wear what", "You have nothing to wear!", NULL, '\0', AO_WEARABLE);
if (o) {
if (isunknownbadobject(o) && skillcheck(player, A_WIS, 30, 0)) {
if (isunknownbadobject(o) && skillcheck(player, A_WIS, 120, 0)) {
if (!confirm_badfeeling(o)) {
msg("Cancelled.");
return B_TRUE;
@ -5188,7 +5189,7 @@ int doweild(obpile_t *op) {
int rv;
o = askobject(op, "Weild what", "You have nothing to weild.", &count, 'w', AO_WEILDABLE | AO_INCLUDENOTHING);
if (o) {
if (isunknownbadobject(o) && skillcheck(player, A_WIS, 30, 0)) {
if (isunknownbadobject(o) && skillcheck(player, A_WIS, 120, 0)) {
if (!confirm_badfeeling(o)) {
msg("Cancelled.");
return B_TRUE;
@ -5484,8 +5485,14 @@ char *makedesc_god(lifeform_t *god, char *retbuf) {
getflags(god->flags, retflag, &nretflags, F_SACRIFICEOBCLASS, F_NONE);
for (i = 0; i < nretflags; i++) {
objectclass_t *oc;
char name[BUFLEN];
oc = findoc(retflag[i]->val[0]);
sprintf(thisline, "%s accepts the sacrifice of all %s.\n",godname, oc->name);
if (oc->id == OC_MONEY) {
sprintf(name, "money ($100 or more preferred).");
} else {
sprintf(name, "all %s", oc->name);
}
sprintf(thisline, "%s accepts the sacrifice of %s.\n",godname, name);
strncat(retbuf, thisline, HUGEBUFLEN);
}
getflags(god->flags, retflag, &nretflags, F_SACRIFICEOB, F_NONE);
@ -8646,7 +8653,7 @@ void doquaff(obpile_t *op) {
}
if (liquid) {
if (canquaff(player, liquid)) {
if (isunknownbadobject(liquid) && skillcheck(player, A_WIS, 30, 0)) {
if (isunknownbadobject(liquid) && skillcheck(player, A_WIS, 120, 0)) {
if (!confirm_badfeeling(liquid)) {
msg("Cancelled.");
return;

446
lf.c
View File

@ -1884,7 +1884,7 @@ int castspell(lifeform_t *lf, enum OBTYPE sid, lifeform_t *targlf, object_t *tar
}
}
if (!willflag && real_getmr(lf, B_ONLYEXTERNAL) && skillcheck(lf, SC_RESISTMAG, 20 + power, 0) && !isgod(lf)) {
if (!willflag && real_getmr(lf, B_ONLYEXTERNAL) && skillcheck(lf, SC_RESISTMAG, 90 + (power*10), 0) && !isgod(lf)) {
if (power > 1) {
// half strength
power /= 2;
@ -4576,12 +4576,12 @@ int eat(lifeform_t *lf, object_t *o) {
char dambuf[BUFLEN];
snprintf(dambuf, BUFLEN, "a bad %s",noprefix(obname));
if (hasflag(corpserace->flags, F_AVIAN)) {
checkdiff = 20;
checkdiff = 100;
ptid = P_FOODBAD;
timemin = 30;
timemax = 50;
} else {
checkdiff = 13;
checkdiff = 65;
if (onein(3)) {
ptid = P_FOOD;
} else {
@ -6343,7 +6343,7 @@ void gainmp(lifeform_t *lf, int amt) {
max = getmaxmp(lf);
// magic resistance means you can't regenerate mana!
if (skillcheck(lf, SC_RESISTMAG, 20, 0)) {
if (skillcheck(lf, SC_RESISTMAG, 100, 0)) {
return;
}
@ -8339,6 +8339,7 @@ int getnightvisrange(lifeform_t *lf) {
int getnoisedetails(lifeform_t *lf, enum NOISETYPE nid, flag_t *noiseflag, char *heartext,char *seetext, int *volume) {
flag_t *retflag[MAXCANDIDATES],*nflag[MAXCANDIDATES];
int nretflags, i,nnflags = 0;
int ok = B_FALSE;
// deafults
if (volume) *volume = 0;
@ -8398,7 +8399,7 @@ int getnoisedetails(lifeform_t *lf, enum NOISETYPE nid, flag_t *noiseflag,
if (nid == N_WALK) {
if (lf) *volume += getarmournoise(lf);
}
return B_FALSE;
ok = B_TRUE;
} else if (lf) {
// some defaults
if (nid == N_WALK) {
@ -8446,27 +8447,36 @@ int getnoisedetails(lifeform_t *lf, enum NOISETYPE nid, flag_t *noiseflag,
(*volume)--;
limit(volume, 1, NA);
}
return B_FALSE;
ok = B_TRUE;
}
} else if (nid == N_DEATHKEEN) {
if (volume) *volume = SV_TALK;
if (heartext) strcpy(heartext, "the dread wailing of death!");
if (seetext) strcpy(seetext, "wails with the power of death!");
return B_FALSE;
ok = B_TRUE;
} else if (nid == N_SONICBOLT) {
if (volume) *volume = 5;
if (heartext) strcpy(heartext, "a ear-splitting burst of sound!");
if (seetext) strcpy(seetext, "emits an ear-splitting burst of sound!");
return B_FALSE;
ok = B_TRUE;
} else if (nid == N_WARCRY) {
if (volume) *volume = 4;
if (heartext) strcpy(heartext, "a blood-curdling war cry!");
if (seetext) strcpy(seetext, "shouts a blood-curdling war-cry!");
return B_FALSE;
ok = B_TRUE;
}
}
if (!ok) {
// failed!
return B_TRUE;
}
// when hiding, volume is decreased by one
if (lfhasflag(lf, F_HIDING)) {
if (volume) {
*volume -= 1;
if (*volume <= 0) return B_TRUE;
}
}
return B_FALSE;
}
@ -14262,7 +14272,7 @@ void adjustdamlf(lifeform_t *lf, int *amt, enum DAMTYPE damtype) {
return;
}
if ((damtype == DT_MAGIC) && getmr(lf) && skillcheck(lf, SC_RESISTMAG, 10 + (*amt * 2), 0)) {
if ((damtype == DT_MAGIC) && getmr(lf) && skillcheck(lf, SC_RESISTMAG, 100 + (*amt * 2), 0)) {
*amt = 0;
return;
}
@ -14693,12 +14703,12 @@ int askforinfo(lifeform_t *lf, int diffmod) {
diffmod += 15;
}
difficulty = 20 + diffmod + ((gettr(player) - gettr(lf))*2);
difficulty = 70 + diffmod + ((gettr(player) - gettr(lf))*2);
if (real_skillcheck(player, SC_SPEECH, difficulty, alignmod, &result)) {
askingprice = 0;
// passed - free!
} else {
if (!greedy && (result <= 40)) {
if (!greedy && !real_skillcheck(player, SC_SPEECH, difficulty/2, alignmod, &result)) {
// will not help!
askingprice = -1;
} else {
@ -15751,7 +15761,7 @@ void losehpeffects(lifeform_t *lf, int dam, enum DAMTYPE damtype, lifeform_t *fr
addtempflag(lf->flags, F_SLOWMOVE, 5, NA, NA, NULL, 10);
}
// catch a cold?
if (!skillcheck(lf, SC_CON, (dam/2) + getexposedlimbs(lf), 0)) {
if (!skillcheck(lf, SC_CON, (dam/2) + (getexposedlimbs(lf)*20), 0)) {
poison(lf, 20+(dam*3), P_COLD, 0, "the cold", fromlf ? fromlf->race->id : R_NONE);
}
// cold will heal bruised limbs
@ -15799,7 +15809,7 @@ void losehpeffects(lifeform_t *lf, int dam, enum DAMTYPE damtype, lifeform_t *fr
}
} else if (damtype == DT_POISONGAS) {
if (dam > 0) {
if (!skillcheck(lf, SC_POISON, 35, 0)) { // HARD.
if (!skillcheck(lf, SC_POISON, 170, 0)) { // HARD.
poison(lf, rnd(20,40), P_GAS, 2, "poison gas", fromlf ? fromlf->race->id : R_NONE);
}
}
@ -16295,7 +16305,7 @@ int mightflee(lifeform_t *lf) {
iqb = getattrbracket(getattr(lf, A_IQ), A_IQ, NULL);
if (iqb >= AT_AVERAGE) {
if (!skillcheck(lf, SC_MORALE, (100 - gethppct(lf))/2, 0)) {
if (!skillcheck(lf, SC_MORALE, (160 - gethppct(lf))/2, 0)) {
return B_TRUE;
}
}
@ -16654,7 +16664,7 @@ int noise(cell_t *c, lifeform_t *noisemaker, enum NOISECLASS nclass, int volume,
difficulty = 9999;
} else {
//difficulty = (int) ( ((float)getcelldist(l->cell, c) / (float)gethearingrange(l)) * 20);
difficulty = (int) ( ((float) dist / ((float)gethearingrange(l) + volume)) * 14);
difficulty = (int) ( ((float) dist / ((float)gethearingrange(l) + volume)) * 75);
}
// listen bonus is based on sound volume
@ -17707,8 +17717,8 @@ int recruit(lifeform_t *lf) {
int difficulty;
int minmult,maxmult;
// since you have to be at least speech=5(expert) to ask someone to
// join, add +10 to difficulty (pr_skilled * 2)
difficulty = 25 + 10 + ((gettr(player) - gettr(lf))*2);
// join, add +20 to difficulty (pr_skilled * 5)
difficulty = 60 + 20 + ((gettr(player) - gettr(lf))*5);
if (real_skillcheck(player, SC_SPEECH, difficulty, 0, &result)) {
minmult = 10;
@ -17893,6 +17903,11 @@ int startclimbing(lifeform_t *lf) {
}
// technically you need the climbing skill to do this,
// since the only way to direclty trigger 'startclimbing'
// is either by prompting when moving onto a CLIMBOBSTACLE
// (which a pit isn't), or by using the 'climb'
// ability (which you need the skill to get).
if (pit && isplayer(lf)) {
char ques[BUFLEN], ch;
sprintf(ques, "Climb down %s?",pitname);
@ -17963,7 +17978,13 @@ int startclimbing(lifeform_t *lf) {
return B_TRUE;
}
} else {
if (skillcheck(lf, SC_CLIMB, getcellclimbdifficulty(where), 0)) {
// you need to climbing skill to climb walls
if (!getskill(lf, SK_CLIMBING)) {
if (isplayer(lf)) {
msg("You are not sufficiently skilled to climb walls.");
}
return B_TRUE;
} if (skillcheck(lf, SC_CLIMB, getcellclimbdifficulty(where), 0)) {
// announce
if (isplayer(lf)) {
msg("You climb onto %s %s.", needan(where->type->name) ? "an" : "a", where->type->name);
@ -18667,7 +18688,7 @@ int scare(lifeform_t *lf, lifeform_t *scarer, int howlong, int scarerbonus) {
}
// the person being scared gets a wisdom bonus
scareebonus += (getattr(lf, A_WIS)/20);
scareebonus += (getstatmod(lf, A_WIS));
for (i = 0; i < nchecks; i++) {
if (!skillcheckvs(lf, SC_MORALE, scareebonus, scarer, SC_MORALE, scarerbonus)) {
@ -19444,6 +19465,7 @@ int shoot(lifeform_t *lf) {
return B_FALSE;
}
/*
int getskillcheckchance(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod) {
int attrib;
int levmod;
@ -19576,8 +19598,8 @@ int getskillcheckchance(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod) {
}
} else if (ct == SC_DODGE) {
if (attrib) {
// ie. -2 to 2
othermod += (getstatmod(lf, A_AGI) / 20);
// ie. -25 to 25
othermod += (getstatmod(lf, A_AGI) / 2);
}
} else if (ct == SC_SLIP) {
if (lfhasflagval(lf, F_INJURY, IJ_LEGBROKEN, NA, NA, NULL)) {
@ -19635,17 +19657,15 @@ int getskillcheckchance(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod) {
othermod += (getskill(lf, SK_SPEECH)*2);
} else if (ct == SC_STEAL) {
if (attrib > 0) {
// ie. -3 to 3
othermod += (getstatmod(lf, A_AGI) / 15);
// ie. -25 to 25
othermod += (getstatmod(lf, A_AGI) / 2);
}
} else if (ct == SC_STEALTH) {
/*
if (attrib > 0) {
if (lfhasflag(lf, F_CAREFULMOVE)) {
othermod += 3;
}
}
*/
//if (attrib > 0) {
// if (lfhasflag(lf, F_CAREFULMOVE)) {
// othermod += 3;
// }
// }
if (!islit(lf->cell)) {
othermod += 5;
}
@ -19653,8 +19673,8 @@ int getskillcheckchance(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod) {
// level counts for more
levmod *= 2;
} else if (ct == SC_TUMBLE) {
// ie. -3 to 3
othermod += (getstatmod(lf, A_AGI) / 15);
// ie. -25 to 25
othermod += (getstatmod(lf, A_AGI) / 2);
}
getflags(lf->flags, retflag, &nretflags, F_SKILLCHECKMOD, F_NONE);
@ -19681,17 +19701,18 @@ int getskillcheckchance(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod) {
limit(&pct, 0, 100);
return pct;
}
*/
int skillcheck(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod) {
return real_skillcheck(lf, ct, diff, mod, NULL);
}
// positive mod makes it easier, negative makes it harder
// "result" will be filled with difference between our pct chance and what you rolled.
// positive "result" means you rolled higher than what you need.
// negative "result" means you rolled lower.
int real_skillcheck(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod, int *result) {
int roll,db = B_FALSE, pct;
int modskillcheckroll(lifeform_t *lf, enum CHECKTYPE ct, int *roll) {
int attrib;
int levmod;
int othermod = 0;
int db = B_FALSE;
int luckmod = 0;
char mbuf[BUFLEN];
flag_t *retflag[MAXCANDIDATES];
int nretflags,i;
flag_t *f;
if (lfhasflag(lf, F_DEBUG)) {
if (ct != SC_STEALTH) { // dont show debug info for stealth checks
@ -19699,58 +19720,320 @@ int real_skillcheck(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod, int *r
}
}
pct = getskillcheckchance(lf, ct, diff, mod);
// lower roll is better
roll = rnd(1,100);
if (db) {
msg("rolled %d, need <= %d.",roll,pct);
switch (ct) {
case SC_STR:
attrib = getattr(lf, A_STR);
break;
case SC_CON:
attrib = getattr(lf, A_CON);
break;
case SC_DEX:
attrib = getattr(lf, A_AGI);
break;
case SC_IQ:
attrib = getattr(lf, A_IQ);
break;
case SC_CHA:
// if you're bleeding you're less attractive!
attrib = (pctof(gethppct(lf), getattr(lf, A_CHA)));
if (lfhasflagval(lf, F_INJURY, IJ_BLACKEYE, NA, NA, NULL)) {
attrib -= 15;
}
break;
case SC_WIS:
attrib = getattr(lf, A_WIS);
break;
///////////////
case SC_OPENLOCKS:
attrib = (getattr(lf, A_AGI)/2);
break;
case SC_WILL:
attrib = getattr(lf, A_WIS);
break;
case SC_TUMBLE:
attrib = getskill(lf, SK_ATHLETICS);
break;
case SC_LEARNMAGIC:
attrib = (getattr(lf, A_IQ) / 2) + lf->level;
break;
case SC_MORALE: // based on morale, level/hitdice and size.
attrib = getmorale(lf);
attrib += getlfsize(lf);
break;
case SC_SLIP:
case SC_FALL:
attrib = getattr(lf, A_AGI);
break;
case SC_SHIELDBLOCK:
attrib = (getattr(lf, A_AGI) / 3);
break;
case SC_POISON:
attrib = getattr(lf, A_CON);
break;
case SC_DISARM:
attrib = (getskill(lf, SK_TRAPS)*15);
if (attrib) {
attrib += (getattr(lf, A_AGI)/3);
}
break;
case SC_CLIMB:
attrib = (getskill(lf, SK_CLIMBING)*10);
break;
case SC_DODGE:
attrib = getevasion(lf);
break;
case SC_LISTEN:
// if you are asleep, listen check doesn't help.
if (lfhasflag(lf, F_ASLEEP) || isdeaf(lf)) {
attrib = 0;
} else {
attrib = getskill(lf, SK_LISTEN)*5;
}
break;
case SC_RESISTMAG:
attrib = (getattr(lf, A_CON)/5) + (getattr(lf, A_WIS)/5) + (getmr(lf));
break;
case SC_SEARCH:
attrib = (getskill(lf, SK_PERCEPTION)*10);
break;
case SC_SPEECH:
attrib = (getattr(lf, A_CHA)/2) + (getattr(lf, A_IQ)/2);
break;
case SC_STEAL:
attrib = (getskill(lf, SK_THIEVERY)*5);
break;
case SC_STEALTH:
attrib = (getskill(lf, SK_STEALTH)*10);
break;
default:
// invalid checktype
dblog("warning: invalid checktype %d", (int)ct);
msg("warning: invalid checktype %d", (int)ct);
attrib = 0;
break;
}
// auto-fail some things
// level modifier
levmod = gettr(lf);
// other modifiers
if (ct == SC_CLIMB) {
object_t *o;
for (o = lf->pack->first ; o ; o = o->next) {
f = hasflag(o->flags, F_HELPSCLIMB);
if (f && isknown(o)) {
othermod += f->val[0];
}
}
// autopass if we have spiderclimb skill.
if (lfhasflag(lf, F_SPIDERCLIMB)) {
othermod = 300;
}
} else if (ct == SC_DODGE) {
if (attrib) {
// ie. -2 to 2
othermod += (getstatmod(lf, A_AGI) / 2);
}
} else if (ct == SC_SLIP) {
if (lfhasflagval(lf, F_INJURY, IJ_LEGBROKEN, NA, NA, NULL)) {
othermod -= 25;
} else {
if (getequippedob(lf->pack, BP_FEET)) {
othermod += 20;
}
if (lfhasflag(lf, F_STABILITY) || !hasbp(lf, BP_FEET)) {
othermod += 50;
}
}
} else if (ct == SC_FALL) {
if (lfhasflag(lf, F_STABILITY) || !hasbp(lf, BP_FEET)) {
othermod += 30;
}
} else if (ct == SC_LISTEN) {
if (hasequippedobid(lf->pack, OT_AMU_LISTEN)) {
othermod += 50;
}
// nocturnal monsters asleep at night, or diurnal during the day
if (isasleep(lf) && issleepingtimefor(lf)) {
othermod -= 35;
}
} else if (ct == SC_MORALE) {
if (isbleeding(lf) || islowhp(lf)) {
othermod -= 25;
}
} else if (ct == SC_OPENLOCKS) {
enum SKILLLEVEL slev;
slev = getskill(lf, SK_LOCKPICKING);
if (slev == PR_INEPT) {
othermod -= 50;
} else {
othermod += (5 * slev);
}
if (hasequippedobid(lf->pack, OT_AMU_THIEF)) {
othermod += 50;
}
} else if (ct == SC_POISON) {
// auto pass if we are immune
if (isimmuneto(lf->flags, DT_POISON, B_FALSE)) {
othermod += 300;
} else if (isresistantto(lf->flags, DT_POISON, B_FALSE)) {
othermod += 25;
} else if (isvulnto(lf->flags, DT_POISON, B_FALSE)) {
othermod -= 50;
}
} else if (ct == SC_SEARCH) {
int bonus = 0;
sumflags(lf->flags, F_ENHANCESEARCH, &bonus, NULL, NULL);
othermod += bonus;
} else if (ct == SC_SPEECH) {
othermod += (getskill(lf, SK_SPEECH)*10);
} else if (ct == SC_STEAL) {
if (attrib > 0) {
// ie. -25 to 25
othermod += (getstatmod(lf, A_AGI) / 2);
}
} else if (ct == SC_STEALTH) {
/*
if (attrib > 0) {
if (lfhasflag(lf, F_CAREFULMOVE)) {
othermod += 3;
}
}
*/
/*
if (!islit(lf->cell)) {
othermod += 5;
}
*/
} else if (ct == SC_WILL) {
// level counts for more
levmod *= 2;
} else if (ct == SC_TUMBLE) {
// ie. -25 to 25
othermod += (getstatmod(lf, A_AGI) / 2);
}
getflags(lf->flags, retflag, &nretflags, F_SKILLCHECKMOD, F_NONE);
for (i = 0; i < nretflags; i++) {
if (retflag[i]->val[0] == ct) othermod += retflag[i]->val[1];
}
// luck
sumflags(lf->flags, F_EXTRALUCK, &luckmod, NULL, NULL);
othermod += luckmod;
*roll += (attrib);
*roll += (levmod);
*roll += (othermod);
// auto fail...
if (isimmobile(lf) || lfhasflag(lf, F_DOESNTMOVE)) {
switch (ct) {
case SC_CLIMB:
case SC_DODGE:
case SC_SHIELDBLOCK:
roll = 9999;
*roll = 0;
break;
default: break;
}
}
if (lfhasflag(lf, F_RAGE) && (ct == SC_STEALTH)) {
roll = 9999;
*roll = 0;
}
// auto pass some things
// auto pass...
if (lfhasflag(lf, F_RAGE) && (ct == SC_MORALE)) {
roll = 0;
*roll = 300;
}
if (hasequippedobid(lf->pack, OT_AMU_ACROBAT) && (ct == SC_TUMBLE)) {
roll = 0;
*roll = 300;
}
// natural 20 will pass some checks
if (roll <= 5) {
// smell chance to autopass/autofail some checks
if (pctchance(5)) {
switch (ct) {
case SC_DODGE:
case SC_STEALTH:
if (db) {
msg("%s skillcheck passed with natural 20.", lf->race->name);
msg("%s skillcheck autopassed with 'natural 20'.", lf->race->name);
}
roll = 0;
*roll = 300;
break;
case SC_POISON:
if (db) {
msg("%s skillcheck autofailed with 'natural 0'.", lf->race->name);
}
*roll = 0;
break;
default:
break;
}
}
if (result) {
*result = roll - pct;
if (db) {
snprintf(mbuf, BUFLEN, "%s checkmod (type %s): %d(attr)+%d(lvm)+%d(othmod),totroll=%d",
lf->race->name,
getskillcheckname(ct), attrib,levmod, othermod,*roll);
msg(mbuf); more();
}
//limit(&pct, 0, 100);
//return pct;
return *roll;
}
int skillcheck(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod) {
return real_skillcheck(lf, ct, diff, mod, NULL);
}
// positive mod makes it easier, negative makes it harder
// "result" will be filled with difference between our pct chance and what you rolled.
// positive "result" means you rolled better than what you need.
// negative "result" means you rolled worse.
int real_skillcheck(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod, int *result) {
int roll,db = B_FALSE;
char dbtag[BUFLEN];
if (lfhasflag(lf, F_DEBUG)) {
if (ct != SC_STEALTH) { // dont show debug info for stealth checks
db = B_TRUE;
}
}
if (roll <= pct) {
sprintf(dbtag, "[lfid %d (%s) %s check] ",lf->id, lf->race->name, getskillcheckname(ct));
//////////////////////////////////////
// debugging for new skillcheck code
dblog("%s difficulty %d, mod %d",dbtag, diff, mod);
//////////////////////////////////////
//pct = getskillcheckchance(lf, ct, diff, mod);
// higher roll is better
roll = rnd(1,100);
// debugging for new skillcheck code
dblog("%s initial roll=%d",dbtag,roll);
//////////////////////////////////////
roll += mod;
dblog("%s +mod(%d) = %d",dbtag,mod,roll);
modskillcheckroll(lf, ct, &roll);
dblog("%s +other_factors = %d",dbtag,roll);
if (db) {
msg("%s: %s check, rolled %d, need >= %d. (%s)",lf->race->name, getskillcheckname(ct), roll,diff,
(roll >= diff) ? "PASS" : "fail");
}
dblog("%s === rolled %d, need >= %d. (%s)",dbtag,roll,diff, (roll >= diff) ? "PASS" : "fail");
if (result) {
*result = roll;
}
if (roll >= diff) {
// passed!
// some checks will train skills when passed.
switch (ct) {
@ -19782,9 +20065,10 @@ int skillcheckvs(lifeform_t *lf1, enum CHECKTYPE ct1, int mod1, lifeform_t *lf2,
mod2 += 5;
}
// ignore the difficult, we just want the modified roll.
real_skillcheck(lf1, ct1, 0, mod1, &roll1);
real_skillcheck(lf2, ct2, 0, mod2, &roll2);
if (db) {
char lfname1[BUFLEN];
char lfname2[BUFLEN];
@ -19804,7 +20088,6 @@ int skillcheckvs(lifeform_t *lf1, enum CHECKTYPE ct1, int mod1, lifeform_t *lf2,
return B_FALSE;
}
int slipon(lifeform_t *lf, object_t *o) {
char obname[BUFLEN];
char lfname[BUFLEN];
@ -20599,19 +20882,32 @@ void startlfturn(lifeform_t *lf) {
if (f && !isinbattle(lf, B_NODISTANT, B_FALSE)) {
// can you see their cell?
if (!lfhasflag(lf, F_TRAINING) && haslos(lf, l->cell)) {
int bonus = 0;
int spotmod = 0;
int dist;
int trmod;
/*
if (!lfhasflag(l, F_SILENTMOVE) && !isdeaf(lf)) {
bonus += (getskill(lf, SK_LISTEN)/2);
}
*/
// harder to spot hiding lfs which are further away
dist = getcelldist(lf->cell, l->cell);
if (dist > 1) {
bonus -= (dist*2);
if (dist == 1) {
spotmod += 15;
} else if (dist > 1) {
spotmod -= ((dist-1)*5);
}
// spotters gets +5 to the check for every threat rating
// they are higher than the hiding lf.
trmod = gettr(lf) - gettr(l);
if (trmod > 0) {
spotmod += (trmod*5);
}
// did you spot them?
if (skillcheckvs(lf, SC_SEARCH, bonus, l, SC_STEALTH, f->val[0])) {
if (skillcheckvs(lf, SC_SEARCH, spotmod, l, SC_STEALTH, f->val[0])) {
spot_hiding_lf(lf, l);
}
}
@ -20638,7 +20934,6 @@ void startlfturn(lifeform_t *lf) {
mod += (getskill(lf, SK_TRAPS)*2);
}
diff = f->val[0] * multiplier;
if (skillcheck(lf, SC_SEARCH, diff, mod)) {
char obname[BUFLEN];
// reveal it
@ -20795,7 +21090,7 @@ void startlfturn(lifeform_t *lf) {
pt = findpoisontype(f->val[0]);
// chance of fighting it off - gets easier over time.
//
if ((f->lifetime > 0) && skillcheck(lf, SC_POISON, (f->lifetime * 9), -(f->val[1]) )) {
if ((f->lifetime > 0) && skillcheck(lf, SC_POISON, (f->lifetime * 5), -(f->val[1]*5) )) {
killflag(f);
} else {
flag_t *asleep;
@ -22092,7 +22387,7 @@ int tryclimb(lifeform_t *lf, cell_t *where, char *towhat, int onpurpose) {
taketime(lf, getactspeed(lf));
// base difficulty of 20
if (skillcheck(lf, SC_CLIMB, 20, (countadjwalls(where)+1)/2)) {
if (skillcheck(lf, SC_CLIMB, getcellclimbdifficultyavg(where), 0)) {
// you made it!
if (isplayer(lf)) {
msg("You reach %s.", towhat);
@ -23468,11 +23763,10 @@ int rest(lifeform_t *lf, int onpurpose) {
if (f->val[0] >= healtime) {
int difficulty;
if (isplayer(lf)) {
// ie. for hp, at con <= 4 and no first aid skill, you NEVER Heal!
difficulty = 25;
difficulty = 50;
} else {
// ai passes very easily
difficulty = 5;
difficulty = 25;
}
// modify difficulty if you're resting properly via 'R'
@ -23499,7 +23793,7 @@ int rest(lifeform_t *lf, int onpurpose) {
if (lf->mp < getmaxmp(lf)) {
// pass a skill check to regain mp
if (skillcheck(lf, SC_IQ, difficulty, (lf->level/2))) {
if (skillcheck(lf, SC_IQ, difficulty, lf->level)) {
gainmp(lf, mpheal);
}
}

1
lf.h
View File

@ -405,6 +405,7 @@ int modattr(lifeform_t *lf, enum ATTRIB attr, int amt);
void modhunger(lifeform_t *lf, int amt);
float modifybystat(float num, lifeform_t *lf, enum ATTRIB att);
void modmorale(lifeform_t *lf, int howmuch);
int modskillcheckroll(lifeform_t *lf, enum CHECKTYPE ct, int *roll);
void modstamina(lifeform_t *lf, float howmuch);
int movecausesnoise(lifeform_t *lf);
int needstobreath(lifeform_t *lf);

33
map.c
View File

@ -2147,18 +2147,18 @@ cell_t *getcellat(map_t *map, int x, int y) {
int getcellclimbdifficulty(cell_t *c) {
int diff = 12;
switch (c->type->material->id) {
case MT_GLASS: diff = 26; break;
case MT_DRAGONWOOD: diff = 20; break;
case MT_METAL: diff = 20; break;
case MT_STONE: diff = 15; break;
case MT_WAX: diff = 10; break;
case MT_WOOD: diff = 8; break;
case MT_PLANT: diff = 8; break;
default: diff = 12; break;
case MT_GLASS: diff = 130; break;
case MT_DRAGONWOOD: diff = 100; break;
case MT_METAL: diff = 100; break;
case MT_STONE: diff = 75; break;
case MT_WAX: diff = 50; break;
case MT_WOOD: diff = 50; break;
case MT_PLANT: diff = 40; break;
default: diff = 60; break;
}
// modify for celltype
switch (c->type->id) {
case CT_WALLBRICK: diff -= 5; break;
case CT_WALLBRICK: diff -= 15; break;
default: break;
}
limit(&diff, 0, NA);
@ -2176,7 +2176,7 @@ int getcellclimbdifficultyavg(cell_t *c) {
if (newcell && newcell->type->solid) {
diff += getcellclimbdifficulty(newcell);
} else {
diff += 30; // ie. v.high
diff += 120; // ie. v.high
}
nwalls++;
}
@ -2377,10 +2377,11 @@ cell_t *get_closest_adjcell(cell_t *src, cell_t *dst) {
}
int getdoorlockdiff(int depth) {
return 19 + depth;
return 70 + (depth*3);
}
int getdoorsecretdiff(int depth) {
return 20 + (depth / 2);
//return 70 + (depth / 2);
return 40 + (depth * 2);
}
flag_t *getmapcoords(map_t *m, int *x, int *y) {
@ -5950,7 +5951,7 @@ void explodecells(cell_t *c, int dam, int killwalls, object_t *o, int range, int
criticalhit(NULL, cc->lf, BP_HANDS, NULL, pctof(critchance, dam), DT_EXPLOSIVE);
}
// move away from centre of explosion
knockback(cc->lf, getdiraway(cc, c, NULL, B_FALSE, DT_COMPASS, B_FALSE), 2, NULL, 40-(mydist*10), B_TRUE);
knockback(cc->lf, getdiraway(cc, c, NULL, B_FALSE, DT_COMPASS, B_FALSE), 2, NULL, 200-(mydist*50), B_TRUE);
}
}
}
@ -7120,8 +7121,8 @@ int getslipperyness(cell_t *c, object_t **slipob) {
if (slipob) *slipob = NULL;
switch (c->type->id) {
case CT_FLOORTILE: addition = 2; break;
case CT_FLOORCARPET: addition = -2; break;
case CT_FLOORTILE: addition = 10; break;
case CT_FLOORCARPET: addition = -10; break;
default: addition = 0; break;
}
@ -7140,7 +7141,7 @@ int getslipperyness(cell_t *c, object_t **slipob) {
}
}
totalslip *= 2;
//totalslip *= 2;
if (slipob) {
*slipob = bestob;

22
move.c
View File

@ -887,7 +887,7 @@ int knockback(lifeform_t *lf, int dir, int howfar, lifeform_t *pusher, int fallc
// calculate chance of falling
if (fallcheckdiff == 0) {
// chance based on distance
fallcheckdiff = howfar*10;
fallcheckdiff = howfar*45;
}
getlfname(lf,lfname);
@ -987,7 +987,7 @@ int knockback(lifeform_t *lf, int dir, int howfar, lifeform_t *pusher, int fallc
i = howfar;
// higher chance of both falling
if (fallcheckdiff != NA) {
fallcheckdiff += (momentumleft*5);
fallcheckdiff += (momentumleft*45);
}
// confer our remaining momentum on to them
knockback(newcell->lf, dir, momentumleft, lf, fallcheckdiff, B_TRUE); // NOTE: recursive call
@ -1118,7 +1118,7 @@ int moveeffects(lifeform_t *lf, int moved) {
// effects which only happen if you actually moved (not attacked)
if (moved) {
if (lfhasflagval(lf, F_INJURY, IJ_HAMSTRUNG, NA, NA, NULL)) {
if (!skillcheck(lf, SC_FALL, 18, 0)) {
if (!skillcheck(lf, SC_FALL, 80, 0)) {
fall(lf, NULL, B_TRUE);
if (isplayer(lf)) didmsg = B_TRUE;
}
@ -1804,7 +1804,7 @@ int moveto(lifeform_t *lf, cell_t *newcell, int onpurpose, int dontclearmsg) {
// (stealth check to avoid this)
willmakenoise = B_TRUE;
if (lfhasflag(lf, F_HIDING)) {
if (skillcheck(lf, SC_STEALTH, 20, isairborne(lf) ? 5 : 0)) {
if (skillcheck(lf, SC_STEALTH, 70, isairborne(lf) ? 25 : 0)) {
willmakenoise = B_FALSE;
}
}
@ -2434,7 +2434,7 @@ int initiatemove(lifeform_t *lf, cell_t *cell, int onpurpose, int *didmsg) {
if (!attacking) {
if (lfhasflag(lf, F_GRAVBOOSTED)) {
// make a saving throw to move
if (skillcheck(lf, SC_STR, 25, 0)) {
if (skillcheck(lf, SC_STR, 125, 0)) {
if (isplayer(lf)) {
msg("You manage to %s despite the strong gravity.", isprone(lf) ? "stand" : "move");
if (didmsg) *didmsg = B_TRUE;
@ -2479,7 +2479,7 @@ int initiatemove(lifeform_t *lf, cell_t *cell, int onpurpose, int *didmsg) {
// can you break free?
diff = f->val[0];
if (o->amt > 1) {
diff = (o->amt - 1) * ((float)f->val[0] / 4.0);
diff += ((o->amt - 1) * ((float)f->val[0] / 4.0));
}
getsweaker = f->val[1];
@ -2500,7 +2500,6 @@ int initiatemove(lifeform_t *lf, cell_t *cell, int onpurpose, int *didmsg) {
getlfname(lf,lfname);
real_getobname(o, buf, o->amt, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_NOBLESSINGS, B_NOUSED, B_NOSHOWALL);
if (skillcheck(lf, SC_STR, diff, checkmod)) {
if (isplayer(lf)) {
msg("You tear free from %s!", buf);
@ -3265,7 +3264,7 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
if (moveclear(lf, dir, &errcode)) {
moveto(lf, cell, B_TRUE, B_TRUE);
}
} else if (getskill(lf, SK_CLIMBING) && hasflag(inway->flags, F_CLIMBOBSTACLE)
} else if (hasflag(inway->flags, F_CLIMBOBSTACLE)
&& haslos(lf, cell)) {
int doclimb = B_TRUE;
if (isplayer(lf)) {
@ -3292,12 +3291,7 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
} else {
strcpy(obname, "something");
}
sprintf(text, "There is %s in your way",obname);
if (hasflag(inway->flags, F_CLIMBOBSTACLE)) {
strcat(text, ", and you are inept at climbing.");
} else {
strcat(text, ".");
}
sprintf(text, "There is %s in your way.",obname);
msg("There is %s in your way.",obname);
}
}

View File

@ -8536,7 +8536,7 @@ object_t *real_moveob(object_t *src, obpile_t *dst, int howmany, int stackok) {
}
// if you were just asleep, you might be awoken.
if (!isunconscious(robbedlf) && dst->owner && !lfhasflag(robbedlf, F_WOKENBY)) {
if (!skillcheck(dst->owner, SC_STEALTH, 13, 0)) { //easy check since target is asleep!
if (!skillcheck(dst->owner, SC_STEALTH, 65, 0)) { //easy check since target is asleep!
addflag(robbedlf->flags, F_WOKENBY, dst->owner->id, NA, NA, "^WYou awaken to someone rummaging through your pack!^n");
}
}
@ -10338,7 +10338,7 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) {
noprefix(obname));
}
} else {
addflag(oo->flags, F_LOCKED, B_TRUE, 20, NA, NULL);
addflag(oo->flags, F_LOCKED, B_TRUE, 100, NA, NULL);
if (isplayer(lf)) {
msg("Your %s buzzes.", noprefix(obname));
} else if (cansee(player, lf)) {
@ -11013,7 +11013,7 @@ void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE
losehp(lf, dam, DT_ACID, NULL, "drinking acid");
break;
case OT_POT_ACROBATICS:
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 30, 0)) {
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 150, 0)) {
if (isplayer(lf)) {
msg("You feel momentarily jumpy.");
}
@ -11070,7 +11070,7 @@ void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE
break;
case OT_POT_COMPETENCE:
failed = B_TRUE;
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 30, 0)) {
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 150, 0)) {
if (isplayer(lf)) {
msg("You feel momentarily %s.", (potblessed == B_CURSED) ? "incompetent" : "more competent");
}
@ -11131,7 +11131,7 @@ void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE
}
break;
case OT_POT_ELEMENTIMMUNE:
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 30, 0)) {
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 150, 0)) {
if (isplayer(lf)) {
msg("You feel momentarily immune to the elements.");
}
@ -11152,7 +11152,7 @@ void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE
break;
case OT_POT_EXPERIENCE:
// gain xp!
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 30, 0)) {
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 150, 0)) {
if (isplayer(lf)) {
msg("You feel momentarily more experienced.");
}
@ -11171,7 +11171,7 @@ void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE
break;
case OT_POT_FISHLUNG:
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 30, 0)) {
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 150, 0)) {
if (isplayer(lf)) {
msg("You lungs feel momentarily watery.");
}
@ -11215,7 +11215,7 @@ void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE
dospelleffects(lf, OT_S_INVISIBILITY,potblessed ? 6 : 3, lf, NULL, lf->cell, potblessed, seen, B_TRUE, NULL);
break;
case OT_POT_INVULN:
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 30, 0)) {
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 150, 0)) {
if (isplayer(lf)) {
msg("You feel momentarily invulnerable.");
}
@ -11238,7 +11238,7 @@ void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE
poison(lf, PERMENANT, P_LYCANTHROPY, 1, r->name, R_NONE);
break;
case OT_POT_MAGIC:
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 30, -10)) {
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 150, -10)) {
if (isplayer(lf)) {
msg("You feel your magical energy temporarily pulse.");
}
@ -11285,7 +11285,7 @@ void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE
case OT_POT_SANCTUARY:
// how long for?
//i = gethealtime(lf); // TODO: change...
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 30, 0)) {
if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 150, 0)) {
if (isplayer(lf)) {
nothinghappens();
}
@ -12411,9 +12411,9 @@ int shatter(object_t *o, int hitlf, char *damstring, lifeform_t *fromlf) {
if ((f->id == F_EXPLODEONDAM) && (f->val[0] != NA)) {
} else {
explodeob(o, f, f->val[1]);
}
return B_FALSE;
}
}
getobname(o,obname,o->amt);
where = getoblocation(o);
@ -12453,8 +12453,8 @@ int shatter(object_t *o, int hitlf, char *damstring, lifeform_t *fromlf) {
if (shatterdam && !isdead(target)) {
// extra glass damage
if (seen) {
msg("%s %s showered in %s shards!", targetname, is(target),
o->material->name);
msg("^%d%s %s showered in %s shards!", getlfcol(target, CC_BAD),
targetname, is(target), o->material->name);
}
losehp(target, shatterdam, DT_SLASH, fromlf, damstring);
}
@ -12551,7 +12551,8 @@ int shatter(object_t *o, int hitlf, char *damstring, lifeform_t *fromlf) {
case OT_POT_OIL:
if (seen) {
makeknown(o->type->id);
msg("%s %s covered with oil!", targetname, is(target));
msg("^%d%s %s covered with oil!", getlfcol(target, CC_BAD),
targetname, is(target));
}
// target is temporarily vulnerable to fire.
howlong = rnd(5,10);
@ -13186,6 +13187,7 @@ int real_fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int sp
if (isplayer(thrower)) {
strcpy(throwernamea, throwername);
strcpy(realthrowernamea, throwername);
} else {
if (isvowel(*(noprefix(throwername)))) {
strcpy(throwernamea, "an ");
@ -13668,7 +13670,7 @@ int real_fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int sp
// an actual physical shield?
sprintf(attackname, "%s", obname);
difficulty = 14 + (speed*2);
difficulty = 60 + (speed*10);
if (check_for_block(thrower, target, getthrowdam(o) + speed, DT_PROJECTILE, difficulty, attackname)) {
announcedmiss = B_TRUE;
youhit = B_FALSE;
@ -13703,7 +13705,7 @@ int real_fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int sp
catchmod = -6;
dodgemod = 2;
}
if (hasfreeaction(target) && skillcheck(target, SC_DODGE, 27+(speed*2), dodgemod)) {
if (hasfreeaction(target) && skillcheck(target, SC_DODGE, 100+(speed*5), dodgemod)) {
// if we passed the dodge check, now see if we caught it...
// first check to see if you can catch it. this should be very hard!
if (!lfhasflag(target, F_NOPACK) && hasbp(target, BP_HANDS) &&
@ -13711,7 +13713,7 @@ int real_fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int sp
canpickup(target, o, o->amt) &&
!willburden(target, o, o->amt) &&
!isimmobile(target) &&
skillcheck(target, SC_DEX, 27 + (speed*5), catchmod)) {
skillcheck(target, SC_DEX, 100 + (speed*10), catchmod)) {
if (db) dblog("target passed catch check.");
willcatch = B_TRUE;
} else {
@ -14444,7 +14446,7 @@ void timeeffectsob(object_t *o) {
if (hasflag(o->flags, F_OBHPDRAIN)) {
if (o->pile->where && haslos(player, o->pile->where)) {
// pass a perception check to see it sparking...
if (skillcheck(player, SC_SEARCH, 15, 0)) {
if (skillcheck(player, SC_SEARCH, 75, 0)) {
msg("^w%s sparks.^n", obname);
}
}
@ -14597,7 +14599,7 @@ void timeeffectsob(object_t *o) {
} else if ((f->val[1] - f->val[0]) <= 10) {
if (haslos(player, obloc)) {
// pass a perception chekc to see it moving...
if (skillcheck(player, SC_SEARCH, 20, 0)) {
if (skillcheck(player, SC_SEARCH, 100, 0)) {
msg("%s twitches.", obname);
}
}
@ -14868,15 +14870,22 @@ void trapeffects(object_t *trapob, enum OBTYPE oid, cell_t *c, object_t *trapped
}
}
if (trappedob) {
enum OBTYPE oid = OT_NONE;
flag_t *f2;
char fallobtext[BUFLEN];
strcpy(fallobtext, "");
f2 = hasflag(trappedob->flags, F_DOORFALLOB);
if (f2) {
strcpy(fallobtext, f2->text);
} else {
switch (trappedob->material->id) {
case MT_WOOD: oid = OT_WOODPLANK; break;
case MT_METAL: oid = OT_METALSHEET ; break;
case MT_WOOD: strcpy(fallobtext, "plank of wood"); break;
case MT_METAL: strcpy(fallobtext, "sheet of metal"); break;
default: break;
}
if (oid != OT_NONE) {
}
if (strlen(fallobtext)) {
object_t *newob;
newob = addobfast(c->obpile, oid);
newob = addob(c->obpile, fallobtext);
if (newob) {
flag_t *f, *f2;
// inherit weight
@ -15377,6 +15386,10 @@ int validateobs(void) {
printf("ERROR in object '%s' - cannot have F_BLUNTONFAIL on stackable objects.\n", ot->name);
goterror = B_TRUE;
}
if (hasflag(ot->flags, F_DOOR) && !hasflag(ot->flags, F_DOORFALLOB)) {
printf("ERROR in object '%s' - door objects must have F_DOORFALLOB.\n", ot->name);
goterror = B_TRUE;
}
if (hasflag(ot->flags, F_FIREARM)) {
if (!hasflag(ot->flags, F_RANGE)) {
printf("ERROR in object '%s' - firearms need to have F_RANGE.\n", ot->name);

10
shops.c
View File

@ -651,7 +651,7 @@ enum SHOPRETURN shopbless(lifeform_t *lf, object_t *vm, int starty, char *toptex
msg("\"Hey, this item is already blessed!\""); more();
o->blessknown = B_TRUE;
// chance to get your money back.
if (skillcheck(player, SC_SPEECH, 20, 0)) {
if (skillcheck(player, SC_SPEECH, 100, 0)) {
char goldbuf[BUFLEN];
msg("\"...so I will return your payment.\""); more();
sprintf(goldbuf, "%d gold dollars", cost);
@ -1027,13 +1027,7 @@ enum SHOPRETURN shoppurchase(lifeform_t *lf, object_t *vm, int starty, char *top
}
} else if (answer == 's') { // steal
// skillcheck - difficulty based on total value of objects here
// 15 + value/50 means:
// $50 is diff 16
// $100 is diff 17
// $200 is diff 19
// $500 is diff 25
// $1000 is diff 35
if (skillcheck(player, SC_STEAL, 15+(value/50), 0)) {
if (skillcheck(player, SC_STEAL, 75+(value/10), 0)) {
int shopamt;
// success
o->letter = '\0';

101
spell.c
View File

@ -952,14 +952,14 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
taketime(user, getactspeed(user));
if (wep) {
skillmod = getweaponskill(user, wep);
if (isplayer(user) && (skillmod == 0)) skillmod = -5;
skillmod = getweaponskill(user, wep) * 10;
if (isplayer(user) && (skillmod == 0)) skillmod = -25;
} else {
skillmod = getskill(user, SK_UNARMED);
skillmod = getskill(user, SK_UNARMED) * 10;
}
targetskillmod = getweaponskill(target, targetwep);
if (isplayer(target) && (targetskillmod == 0)) targetskillmod = -5;
targetskillmod = getweaponskill(target, targetwep) * 10;
if (isplayer(target) && (targetskillmod == 0)) targetskillmod = -25;
if (skillcheckvs(user, SC_DEX, skillmod, target, SC_DEX, targetskillmod)) {
if (cansee(player, user)) {
@ -1071,7 +1071,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
}
// victim gets a skilcheck to avoid being grabbed - hard.
if (skillcheck(target, SC_DODGE, (getattr(user, A_AGI)/5)+18, 0)) {
if (skillcheck(target, SC_DODGE, getattr(user, A_AGI)+50, 0)) {
if (cansee(player, user)) {
msg("%s evade%s %s%s grasp.", targetname, isplayer(target) ? "" : "s",
username, getpossessive(username));
@ -1095,7 +1095,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
}
dist = 2 + (getskill(user, SK_ATHLETICS)/3);
setfacing(target, getrandomdir(DT_COMPASS));
knockback(target, dir, dist, user, 25, B_FALSE);
knockback(target, dir, dist, user, 125, B_FALSE);
} else {
if (isplayer(user)) {
msg("There is no room to flip %s!", targetname);
@ -1150,7 +1150,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
}
// push them back
knockback(target, dir, 1, user, 5, B_TRUE);
knockback(target, dir, 1, user, 25, B_TRUE);
// if we succeeded in pushing them...
if (target->cell != targcell) {
@ -1213,7 +1213,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
}
// victim gets a skilcheck to avoid being grabbed
if (skillcheck(target, SC_DODGE, (getattr(user, A_AGI)/5)+11, 0)) {
if (skillcheck(target, SC_DODGE, (getattr(user, A_AGI))+50, 0)) {
if (cansee(player, user)) {
msg("%s evade%s %s%s grasp.", targetname, isplayer(target) ? "" : "s",
username, getpossessive(username));
@ -1240,7 +1240,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
}
// victim gets a skilcheck to avoid damage...
if (skillcheckvs(target, SC_STR, 0, user, SC_STR, 1)) {
if (skillcheckvs(target, SC_STR, 0, user, SC_STR, 5)) {
if (cansee(player, target)) {
// broke free
killflagsofid(target->flags, F_GRABBEDBY);
@ -1731,9 +1731,9 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
if (gethardness(shield->material->id)) {
// success depends on shield skill, relative lf size, target's evasion
mod = 0;
modifyforsize(&mod, user, target, 5, M_VAL);
modifyforsize(&mod, user, target, 10, M_VAL);
if (mod > 0) mod = 0;
if (skillcheck(user, SC_SHIELDBLOCK, 5 + getevasion(target), mod)) {
if (skillcheck(user, SC_SHIELDBLOCK, 25 + getevasion(target), mod)) {
stun(target, 3);
}
}
@ -1912,12 +1912,11 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
f = hasflag(o->flags, F_LINKSPELL);
if (f && !cancast(user, f->val[0], NULL)) {
char buf2[BUFLEN];
int pct;
getobname(o, buf, o->amt);
difficulty = 20 + (getspelllevel(f->val[0])*3);
mod = getspellskill(user, f->val[0]) * 3;
pct = getskillcheckchance(user, SC_LEARNMAGIC, difficulty, mod);
sprintf(buf2, "%s (%d%% success chance)", buf, pct);
difficulty = 100 + (getspelllevel(f->val[0])*10);
mod = getspellskill(user, f->val[0]) * 10;
//pct = getskillcheckchance(user, SC_LEARNMAGIC, difficulty, mod);
sprintf(buf2, "%s (%d%% success chance)", buf, difficulty-mod);
addchoice(&prompt, o->letter, buf2, NULL, f, NULL);
}
}
@ -1936,8 +1935,8 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
o = f->pile->ob;
// try to transcribe it...
difficulty = 20 + (getspelllevel(f->val[0])*3);
mod = getspellskill(user, f->val[0]) * 3;
difficulty = 100 + (getspelllevel(f->val[0])*10);
mod = getspellskill(user, f->val[0]) * 10;
if (skillcheck(user, SC_LEARNMAGIC, difficulty, mod)) {
addflag(user->flags, F_CANCAST, f->val[0], NA, NA, NULL);
@ -2059,7 +2058,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
target = targcell->lf;
if (target) {
if (skillcheck(target, SC_DODGE, 20, 0)) {
if (skillcheck(target, SC_DODGE, 100, 0)) {
dodged = B_TRUE;
}
}
@ -2401,13 +2400,13 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
taketime(user, getactspeed(user));
if (wep) {
skillmod = getweaponskill(user, wep);
skillmod = getweaponskill(user, wep)*10;
if (isplayer(user) && (skillmod == 0)) skillmod = -5;
} else {
skillmod = getskill(user, SK_UNARMED);
skillmod = getskill(user, SK_UNARMED)*10;
}
if (skillcheckvs(user, SC_DEX, skillmod, target, SC_SLIP, (legs > 2) ? 5 : 0)) {
if (skillcheckvs(user, SC_DEX, skillmod, target, SC_SLIP, (legs > 2) ? 25 : 0)) {
if (cansee(player, user)) {
msg("^w%s trip%s %s.",username, isplayer(user) ? "" : "s", targetname);
}
@ -2563,7 +2562,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
}
// skillcheck...
if (!skillcheck(user, SC_TUMBLE, 10, 0)) {
if (!skillcheck(user, SC_TUMBLE, 50, 0)) {
// fail!
if (isplayer(user)) {
msg("You fumble and fall.");
@ -2598,7 +2597,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
}
// pass another (harder) skill check or fall
if (!skillcheck(user, SC_TUMBLE, 20, 0)) {
if (!skillcheck(user, SC_TUMBLE, 100, 0)) {
// fail!
fall(user, NULL, B_TRUE);
return B_FALSE;
@ -3460,7 +3459,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
} else {
rarity = 0;
}
difficulty = 20 + (rarity*5);
difficulty = 90 + (rarity*10);
switch (o->type->obclass->id) {
case OC_SCROLL:
difficulty += 2; break;
@ -3869,7 +3868,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
for (o = firstobcell->obpile->first ;o ; o = nexto) {
nexto = o->next;
if (!hasflag(o->flags, F_NOPICKUP) && !hasflag(o->flags, F_COSMETIC)) {
knockbackob(o, dir, power, power, caster);
knockbackob(o, dir, power, power*5, caster);
}
}
}
@ -3956,7 +3955,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
newlf = makezombie(o);
if (newlf) {
if (isplayer(target)){
if (skillcheck(target, A_IQ, 20, power)) {
if (skillcheck(target, A_IQ, 100, power)) {
makefriendly(newlf, PERMENANT);
} else if (cansee(target, newlf)) {
msg("Uh oh, you have a bad feeling about this...");
@ -5187,7 +5186,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
if (target) {
getlfname(target, lfname);
// target takes magical damage
if (skillcheck(target, SC_DODGE, 20 + (power*2), 0)) {
if (skillcheck(target, SC_DODGE, 90 + (power*10), 0)) {
// miss
if (cansee(player, target)) {
msg("A blast of icy air misses %s.",lfname);
@ -6484,7 +6483,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
if (retcell[i]->lf) {
knockback(retcell[i]->lf,
getdiraway(retcell[i], targcell, NULL, B_FALSE, DT_COMPASS, B_FALSE),
2, target, 27+power, B_TRUE);
2, target, 100+(power*10), B_TRUE);
}
}
}
@ -6655,7 +6654,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
getlfname(target, lfname);
// target takes magical damage
// check if it hits
if (skillcheck(target, SC_DODGE, 20 + (power*2), 0)) {
if (skillcheck(target, SC_DODGE, 90 + (power*10), 0)) {
// miss
if (isplayer(target) || cansee(player, target)) {
msg("A dart of flame misses %s.",lfname);
@ -6877,7 +6876,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
// set power
f = hasflag(o->flags, F_RESTRICTMOVEMENT);
if (f) {
f->val[0] = 30 + (power/2);
f->val[0] = 100 + (power*10);
f->val[1] = B_FALSE; // struggling doesn't damage the vine
}
if (caster && (caster->cell->map == targcell->map)) {
@ -7420,7 +7419,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
enum ATTRBRACKET iqb;
iqb = getattrbracket(getattr(target, A_IQ), A_IQ, NULL);
if ((iqb >= IQ_ANIMAL) && cansee(target, caster)) {
if (skillcheckvs(caster, SC_MORALE, 3, target, SC_MORALE, 0)) {
if (skillcheckvs(caster, SC_MORALE, 15, target, SC_MORALE, 0)) {
makepeaceful(target, caster);
}
}
@ -7630,7 +7629,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
cell_t *c;
c = getrandomadjcell(targcell, WE_WALKABLE, B_NOEXPAND);
if (c) {
knockback(targcell->lf, getdirtowards(targcell, c, NULL, B_FALSE, DT_COMPASS), 1, NULL, 25+power, B_TRUE);
knockback(targcell->lf, getdirtowards(targcell, c, NULL, B_FALSE, DT_COMPASS), 1, NULL, 100+(power*10), B_TRUE);
} else {
if (isplayer(targcell->lf)) {
msg("^%cYou are impaled by an icicle!", getlfcol(targcell->lf, CC_BAD) );
@ -8673,7 +8672,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
saved = B_TRUE;
} else if (spellresisted(target, caster, spellid, power, seenbyplayer, B_FALSE)) {
saved = B_TRUE;
} else if (skillcheck(target, SC_STR, 20 + power, 0)) {
} else if (skillcheck(target, SC_STR, 100 + (power*5), 0)) {
saved = B_TRUE;
}
@ -8705,7 +8704,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
if (spellresisted(target, caster, spellid, power, seenbyplayer, B_FALSE)) {
failed = B_TRUE;
} else if (skillcheck(target, SC_CON, 20 + (power*2), 0)) {
} else if (skillcheck(target, SC_CON, 100 + (power*5), 0)) {
failed = B_TRUE;
}
@ -8743,7 +8742,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
}
// savingthrow
if (spellresisted(target, caster, spellid, power, seenbyplayer, B_FALSE) || skillcheck(target, SC_CON, 30 + power, 0)) {
if (spellresisted(target, caster, spellid, power, seenbyplayer, B_FALSE) || skillcheck(target, SC_CON, 100 + power*5, 0)) {
if (haslos(player, target->cell)) {
char lfname[BUFLEN];
getlfname(target, lfname);
@ -8767,7 +8766,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
if (target) {
getlfname(target, lfname);
// target gets saving throw to avoid...
if (skillcheck(target, SC_DODGE, 20 + (power*2), 0)) {
if (skillcheck(target, SC_DODGE, 90 + (power*10), 0)) {
// miss
if (cansee(player, target)) {
msg("A glob of venom misses %s.",lfname);
@ -9329,7 +9328,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
}
}
// undead will flee from light
if (isundead(l) && !skillcheck(l, SC_WILL, 20, 0)) {
if (isundead(l) && !skillcheck(l, SC_WILL, 100, 0)) {
// runs away from caster
addtempflag(l->flags, F_FLEEFROM, caster->id, NA, NA, NULL, 20);
}
@ -9719,17 +9718,17 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
// easyish save to avoid falling
switch (getlfsize(target)) {
case SZ_MEDIUM:
pen = -3; break;
pen = -15; break;
case SZ_SMALL:
pen = -5; break;
pen = -25; break;
case SZ_TINY:
pen = -7; break;
pen = -35; break;
case SZ_MINI:
pen = -9; break;
pen = -45; break;
break;
default: pen = 0; break;
}
if (target && !skillcheck(target, SC_FALL, 12 + (power*2), pen)) {
if (target && !skillcheck(target, SC_FALL, 60 + (power*5), pen)) {
fall(target, NULL, B_TRUE);
}
needredraw = B_TRUE;
@ -11411,7 +11410,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
if (!fromob && spellresisted(target, caster, spellid, power, seenbyplayer, B_TRUE)) {
failed = B_TRUE;
} else if (fromob && skillcheck(target, SC_DODGE, 12, 0)) {
} else if (fromob && skillcheck(target, SC_DODGE, 60, 0)) {
failed = B_TRUE;
// announce whip failures
if (cansee(player, target)) {
@ -12241,7 +12240,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
}
// knock lfs away
if (c->lf) {
knockback(c->lf, getdiraway(c, c, NULL, B_FALSE, DT_COMPASS, B_FALSE), 1, NULL, 30+power, B_TRUE);
knockback(c->lf, getdiraway(c, c, NULL, B_FALSE, DT_COMPASS, B_FALSE), 1, NULL, 100+(power*10), B_TRUE);
donesomething = B_TRUE;
}
}
@ -12257,7 +12256,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
}
// knock lfs away
if (c->lf) {
knockback(c->lf, getdiraway(c, c, NULL, B_FALSE, DT_COMPASS, B_FALSE), 1, NULL, 30+power, B_TRUE);
knockback(c->lf, getdiraway(c, c, NULL, B_FALSE, DT_COMPASS, B_FALSE), 1, NULL, 100+(power*10), B_TRUE);
donesomething = B_TRUE;
}
}
@ -12273,7 +12272,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
}
// knock lfs away
if (c->lf) {
knockback(c->lf, getdiraway(c, c, NULL, B_FALSE, DT_COMPASS, B_FALSE), 1, NULL, 30+power, B_TRUE);
knockback(c->lf, getdiraway(c, c, NULL, B_FALSE, DT_COMPASS, B_FALSE), 1, NULL, 100+(power*10), B_TRUE);
donesomething = B_TRUE;
}
}
@ -12289,7 +12288,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
}
// knock lfs away
if (c->lf) {
knockback(c->lf, getdiraway(c, c, NULL, B_FALSE, DT_COMPASS, B_FALSE), 1, NULL, 30+power, B_TRUE);
knockback(c->lf, getdiraway(c, c, NULL, B_FALSE, DT_COMPASS, B_FALSE), 1, NULL, 100+(power*10), B_TRUE);
donesomething = B_TRUE;
}
}
@ -12476,7 +12475,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
}
if (c) {
if (c->lf && (c->lf->race->baseid != R_SPIDER)) {
if (skillcheck(c->lf, SC_DODGE, 20+power, 0)) {
if (skillcheck(c->lf, SC_DODGE, 90+(power*10), 0)) {
if (isplayer(c->lf)) {
msg("You dodge a web.");
} else if (cansee(player, c->lf)) {
@ -13071,7 +13070,7 @@ int getmpcost(lifeform_t *lf, enum OBTYPE oid) {
int getmrdiff(enum OBTYPE spellid, int power) {
int lev,diff;
lev = getspelllevel(spellid);
diff = 20 + (lev*2) + power;
diff = 90 + (lev*10) + (power*5);
return diff;
}

56
text.c
View File

@ -1652,6 +1652,62 @@ char *getschoolnameshort(enum SPELLSCHOOL sch) {
return "unknown school";
}
char *getskillcheckname(enum CHECKTYPE ct) {
switch (ct) {
case SC_STR:
return "Strength";
case SC_DEX:
return "Agility";
case SC_IQ:
return "IQ";
case SC_CON:
return "Fitness";
case SC_CHA:
return "Charisma";
case SC_WIS:
return "Wisdom";
case SC_CLIMB:
return "Climb";
case SC_DISARM:
return "Disarm";
case SC_DODGE:
return "Dodge";
case SC_SHIELDBLOCK:
return "Shieldblock";
case SC_FALL:
return "Fall";
case SC_SLIP:
return "Slip";
case SC_LEARNMAGIC:
return "Learnmagic";
case SC_LISTEN:
return "Listen";
case SC_MORALE:
return "Morale";
case SC_OPENLOCKS:
return "Open locks";
case SC_POISON:
return "Poison";
case SC_RESISTMAG:
return "Resistmag";
case SC_SEARCH:
return "Search";
case SC_SPEECH:
return "Speech";
case SC_STEAL:
return "Thievery/Steal";
case SC_STEALTH:
return "Stealth";
case SC_TUMBLE:
return "Tumble";
case SC_WILL:
return "Will";
default:
break;
}
return "?unknown_skillcheck?";
}
char *gettimephasename(enum TIMEPHASE tp) {
switch (tp) {
case TP_SUNRISE: return "sunrise";

1
text.h
View File

@ -40,6 +40,7 @@ char *getreldirname(int reldir);
char *getsizetext(enum LFSIZE sz);
char *getschoolname(enum SPELLSCHOOL sch);
char *getschoolnameshort(enum SPELLSCHOOL sch);
char *getskillcheckname(enum CHECKTYPE ct);
char *gettimephasename(enum TIMEPHASE tp);
char *gettimetext(char *retbuf);
char *gettimetextfuzzy(char *retbuf, int wantpm);