* [+] maybe a new weapon damage calculation....
- [+] eyes shouldn't adjust if you can seein the dark - [+] make fire spread to nearby flammable objects. - [+] issue with soldering iron - [+] shouldn't be able to weild it if we don't know what it is - [+] shouldn't be able to get stats like damage dealt ect if we dno't know what it is - [+] need technology skill to weild tech weapons?? - [+] misile damage problem - Killed by a spear (thrown by an orc warrior).(33 damage) - [+] ring of endurance - [+] make evasion checks modified by speed. - [+] bone items have higehr chance to be cursed - [+] tweak feign death check now - int check (attacker) vs wisdom (one feigning death) - [+] cursed teleportation should take you next to a monster - [+] bug: infinite loop during getrandomroomcell(map,ANYROOM) - [+] make dumprooms able to show room ids - [+] bug: i'm able to cast varpower spells which cost more mp than i have!
This commit is contained in:
parent
4eeb8cfe43
commit
0d663e81b3
2
ai.c
2
ai.c
|
@ -68,7 +68,7 @@ int aiattack(lifeform_t *lf, lifeform_t *victim, int timelimit) {
|
||||||
penalty = (getcelldist(lf->cell, victim->cell)-1);
|
penalty = (getcelldist(lf->cell, victim->cell)-1);
|
||||||
if (penalty < 0) penalty = 0;
|
if (penalty < 0) penalty = 0;
|
||||||
penalty *= 3;
|
penalty *= 3;
|
||||||
if (!skillcheckvs(lf, SC_WILL, -penalty, victim, SC_WILL, 5+gethitdice(victim))) {
|
if (!skillcheckvs(lf, SC_IQ, -penalty, victim, SC_WILL, 5+gethitdice(victim))) {
|
||||||
dblog(".oO { attempted target fooled me with feign death. ignoring. }");
|
dblog(".oO { attempted target fooled me with feign death. ignoring. }");
|
||||||
return B_TRUE;
|
return B_TRUE;
|
||||||
}
|
}
|
||||||
|
|
48
attack.c
48
attack.c
|
@ -2586,23 +2586,43 @@ void wepeffects(flagpile_t *fp, cell_t *where, flag_t *damflag, int dam) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wep && owner && victim) {
|
if (wep && owner && victim) {
|
||||||
|
enum DRAINTYPE draintype = DR_NONE;
|
||||||
if ((wep->type->id == OT_TEETH) && lfhasflag(owner, F_VAMPIRIC) && isbleeding(victim)) {
|
if ((wep->type->id == OT_TEETH) && lfhasflag(owner, F_VAMPIRIC) && isbleeding(victim)) {
|
||||||
|
draintype = DR_FROMBITE;
|
||||||
|
} else if (hasflag(wep->flags, F_VAMPIRIC)) {
|
||||||
|
draintype = DR_FROMWEP;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (draintype && !isimmuneto(victim->flags, DT_NECROTIC)) {
|
||||||
|
int hpgain;
|
||||||
// drain life!
|
// drain life!
|
||||||
gainhp(owner, dam);
|
if (isresistantto(victim->flags, DT_NECROTIC)) {
|
||||||
if (isplayer(owner)) {
|
hpgain = dam;
|
||||||
char lfname[BUFLEN];
|
} else {
|
||||||
char victimname[BUFLEN];
|
hpgain = (dam/2);
|
||||||
getlfname(owner,lfname);
|
}
|
||||||
getlfname(victim, victimname);
|
if (hpgain && (owner->hp < owner->maxhp)) {
|
||||||
msg("You suck %s%s blood!", victimname, getpossessive(victimname));
|
gainhp(owner, hpgain);
|
||||||
} else if (cansee(player, owner)) {
|
if (draintype == DR_FROMBITE) {
|
||||||
char lfname[BUFLEN];
|
if (isplayer(owner)) {
|
||||||
char victimname[BUFLEN];
|
char lfname[BUFLEN];
|
||||||
getlfname(owner,lfname);
|
char victimname[BUFLEN];
|
||||||
getlfname(victim, victimname);
|
getlfname(owner,lfname);
|
||||||
msg("%s sucks %s%s blood!", lfname, victimname, getpossessive(victimname));
|
getlfname(victim, victimname);
|
||||||
|
msg("You suck %s%s blood!", victimname, getpossessive(victimname));
|
||||||
|
} else if (cansee(player, owner)) {
|
||||||
|
char lfname[BUFLEN];
|
||||||
|
char victimname[BUFLEN];
|
||||||
|
getlfname(owner,lfname);
|
||||||
|
getlfname(victim, victimname);
|
||||||
|
msg("%s sucks %s%s blood!", lfname, victimname, getpossessive(victimname));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (isplayer(owner)) {
|
||||||
|
msg("Life force surges into you!");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
96
data.c
96
data.c
|
@ -367,6 +367,7 @@ void initjobs(void) {
|
||||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "2 potions of oil");
|
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "2 potions of oil");
|
||||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "rubber boots");
|
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "rubber boots");
|
||||||
// initial skills
|
// initial skills
|
||||||
|
addflag(lastjob->flags, F_STARTSKILL, SK_CHANNELING, PR_NOVICE, NA, NULL);
|
||||||
addflag(lastjob->flags, F_STARTSKILL, SK_METALWORK, PR_ADEPT, NA, NULL);
|
addflag(lastjob->flags, F_STARTSKILL, SK_METALWORK, PR_ADEPT, NA, NULL);
|
||||||
addflag(lastjob->flags, F_STARTSKILL, SK_SPEECH, PR_NOVICE, NA, NULL);
|
addflag(lastjob->flags, F_STARTSKILL, SK_SPEECH, PR_NOVICE, NA, NULL);
|
||||||
addflag(lastjob->flags, F_STARTSKILL, SK_TECHUSAGE, PR_BEGINNER, NA, NULL);
|
addflag(lastjob->flags, F_STARTSKILL, SK_TECHUSAGE, PR_BEGINNER, NA, NULL);
|
||||||
|
@ -512,9 +513,9 @@ void initjobs(void) {
|
||||||
// stats
|
// stats
|
||||||
addflag(lastjob->flags, F_JOBATTRMOD, A_STR, 2, NA, NULL);
|
addflag(lastjob->flags, F_JOBATTRMOD, A_STR, 2, NA, NULL);
|
||||||
addflag(lastjob->flags, F_JOBATTRMOD, A_AGI, 2, NA, NULL);
|
addflag(lastjob->flags, F_JOBATTRMOD, A_AGI, 2, NA, NULL);
|
||||||
addflag(lastjob->flags, F_JOBATTRMOD, A_IQ, -3, NA, NULL);
|
addflag(lastjob->flags, F_JOBATTRMOD, A_IQ, -2, NA, NULL);
|
||||||
addflag(lastjob->flags, F_JOBATTRMOD, A_CON, 2, NA, NULL);
|
addflag(lastjob->flags, F_JOBATTRMOD, A_CON, 2, NA, NULL);
|
||||||
addflag(lastjob->flags, F_JOBATTRMOD, A_CHA, -3, NA, NULL);
|
addflag(lastjob->flags, F_JOBATTRMOD, A_CHA, -2, NA, NULL);
|
||||||
addflag(lastjob->flags, F_JOBATTRMOD, A_WIS, -4, NA, NULL);
|
addflag(lastjob->flags, F_JOBATTRMOD, A_WIS, -4, NA, NULL);
|
||||||
// initial objects
|
// initial objects
|
||||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "helmet");
|
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "helmet");
|
||||||
|
@ -764,6 +765,8 @@ void initobjects(void) {
|
||||||
addflag_real(lastbrand->flags, F_REVENGE, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_REVENGE, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
addbrand(BR_SHARPNESS, "of sharpness", BP_WEAPON);
|
addbrand(BR_SHARPNESS, "of sharpness", BP_WEAPON);
|
||||||
addflag_real(lastbrand->flags, F_ARMOURPIERCE, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
addflag_real(lastbrand->flags, F_ARMOURPIERCE, B_TRUE, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
|
addbrand(BR_LIFESUCK, "of lifesucking", BP_WEAPON);
|
||||||
|
addflag_real(lastbrand->flags, F_VAMPIRIC, NA, NA, NA, NULL, PERMENANT, B_UNKNOWN, -1);
|
||||||
|
|
||||||
// feet
|
// feet
|
||||||
addbrand(BR_LEVITATION, "of hovering", BP_FEET);
|
addbrand(BR_LEVITATION, "of hovering", BP_FEET);
|
||||||
|
@ -1464,6 +1467,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_HUMAN, NA, NULL);
|
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_HUMAN, NA, NULL);
|
||||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_FLAMMABLE, PERMENANT, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_OBHP, 30, 30, NA, NULL);
|
addflag(lastot->flags, F_OBHP, 30, 30, NA, NULL);
|
||||||
addflag(lastot->flags, F_DTVULN, DT_FIRE, NA, NA, "2d6");
|
addflag(lastot->flags, F_DTVULN, DT_FIRE, NA, NA, "2d6");
|
||||||
addflag(lastot->flags, F_DTVULN, DT_CHOP, NA, NA, NULL);
|
addflag(lastot->flags, F_DTVULN, DT_CHOP, NA, NA, NULL);
|
||||||
|
@ -1476,6 +1480,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_OBHP, 80, 80, NA, NULL);
|
addflag(lastot->flags, F_OBHP, 80, 80, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_FLAMMABLE, PERMENANT, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_DTVULN, DT_FIRE, NA, NA, "2d6");
|
addflag(lastot->flags, F_DTVULN, DT_FIRE, NA, NA, "2d6");
|
||||||
addflag(lastot->flags, F_DTVULN, DT_CHOP, NA, NA, NULL);
|
addflag(lastot->flags, F_DTVULN, DT_CHOP, NA, NA, NULL);
|
||||||
|
@ -3543,6 +3548,16 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_OBHP, 2, 2, NA, NULL);
|
addflag(lastot->flags, F_OBHP, 2, 2, NA, NULL);
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_SEEINDARK, 5, NA, NULL);
|
addflag(lastot->flags, F_EQUIPCONFER, F_SEEINDARK, 5, NA, NULL);
|
||||||
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
|
||||||
|
addot(OT_SOLDERINGIRON, "soldering iron", "A hand tool with an electrically heated metal tip. This unit is operated by an in-built battery.", MT_METAL, 0.5, OC_TECH, SZ_TINY);
|
||||||
|
addflag(lastot->flags, F_RARITY, H_ALL, RR_UNCOMMON, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_USESSKILL, SK_SHORTBLADES, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_DAM, DT_HEAT, NA, NA, "1d6");
|
||||||
|
addflag(lastot->flags, F_ACCURACY, 70, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_RODSHAPED, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_TECHLEVEL, PR_BEGINNER, NA, NA, NULL);
|
||||||
addot(OT_STYPTIC, "styptic", "A medical compound designed to inhibit bleeding.", MT_METAL, 0.5, OC_TECH, SZ_SMALL);
|
addot(OT_STYPTIC, "styptic", "A medical compound designed to inhibit bleeding.", MT_METAL, 0.5, OC_TECH, SZ_SMALL);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
|
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
|
||||||
addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL);
|
||||||
|
@ -4128,7 +4143,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_OBHPDRAIN, 1, NA, NA, NULL);
|
addflag(lastot->flags, F_OBHPDRAIN, 1, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_NOOBDAMTEXT, 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_DAMAGABLE, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_BLOCKSVIEW, 4, 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_THEREISHERE, B_TRUE, NA, NA, ".");
|
||||||
addflag(lastot->flags, F_CAUSESCOUGH, 18, NA, NA, NULL);
|
addflag(lastot->flags, F_CAUSESCOUGH, 18, NA, NA, NULL);
|
||||||
|
|
||||||
|
@ -4546,69 +4561,72 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_OBHP, 50, 50, NA, NULL);
|
addflag(lastot->flags, F_OBHP, 50, 50, NA, NULL);
|
||||||
|
|
||||||
// rings
|
// rings
|
||||||
|
addot(OT_RING_ENDURANCE, "ring of endurance", "Boosts stamina regeneration.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
|
addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, "");
|
||||||
|
addflag(lastot->flags, F_EQUIPCONFER, F_STAMREGEN, NA, NA, "0.5");
|
||||||
addot(OT_RING_SIGHT, "ring of sight", "Allows the caster to see the invisible, and in the dark.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_SIGHT, "ring of sight", "Allows the caster to see the invisible, and in the dark.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 75, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_SEEINVIS, NA, NA, NULL);
|
addflag(lastot->flags, F_EQUIPCONFER, F_SEEINVIS, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_SEEINDARK, 3, NA, NULL);
|
addflag(lastot->flags, F_EQUIPCONFER, F_SEEINDARK, 3, NA, NULL);
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_VISRANGEMOD, 1, NA, NULL);
|
addflag(lastot->flags, F_EQUIPCONFER, F_VISRANGEMOD, 1, NA, NULL);
|
||||||
addot(OT_RING_MANA, "ring of mana", "Increases the wearer's MP pool.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_MANA, "ring of mana", "Increases the wearer's MP pool.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 75, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_EXTRAMP, 10, NA, NULL);
|
addflag(lastot->flags, F_EQUIPCONFER, F_EXTRAMP, 10, NA, NULL);
|
||||||
addot(OT_RING_LUCK, "ring of luck", "Makes the wearer more lucky.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_LUCK, "ring of luck", "Makes the wearer more lucky.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 75, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_EXTRALUCK, 5, NA, NULL);
|
addflag(lastot->flags, F_EQUIPCONFER, F_EXTRALUCK, 5, NA, NULL);
|
||||||
addot(OT_RING_PROTFIRE, "ring of fire immunity", "Grants the caster complete immunity to fire.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_PROTFIRE, "ring of fire immunity", "Grants the caster complete immunity to fire.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 75, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_DTIMMUNE, DT_FIRE, NA, NULL);
|
addflag(lastot->flags, F_EQUIPCONFER, F_DTIMMUNE, DT_FIRE, NA, NULL);
|
||||||
addot(OT_RING_PROTCOLD, "ring of cold immunity", "Grants the caster complete immunity to cold.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_PROTCOLD, "ring of cold immunity", "Grants the caster complete immunity to cold.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 75, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_DTIMMUNE, DT_COLD, NA, NULL);
|
addflag(lastot->flags, F_EQUIPCONFER, F_DTIMMUNE, DT_COLD, NA, NULL);
|
||||||
|
|
||||||
addot(OT_RING_STR, "ring of strength", "Increases the wearer's strength.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_STR, "ring of strength", "Increases the wearer's strength.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 70, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 70, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_ATTRMOD, A_STR, 1, NULL); // '1' is randomized during generation
|
addflag(lastot->flags, F_EQUIPCONFER, F_ATTRMOD, A_STR, 1, NULL); // '1' is randomized during generation
|
||||||
addflag(lastot->flags, F_IDWHENUSED, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_IDWHENUSED, B_TRUE, NA, NA, NULL);
|
||||||
addot(OT_RING_IQ, "ring of intelligence", "Increases the wearer's intelligence.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_IQ, "ring of intelligence", "Increases the wearer's intelligence.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 70, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 70, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_ATTRMOD, A_IQ, 1, NULL); // '1' is randomized during generation
|
addflag(lastot->flags, F_EQUIPCONFER, F_ATTRMOD, A_IQ, 1, NULL); // '1' is randomized during generation
|
||||||
addflag(lastot->flags, F_IDWHENUSED, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_IDWHENUSED, B_TRUE, NA, NA, NULL);
|
||||||
addot(OT_RING_CON, "ring of fitness", "Increases the wearer's fitness.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_CON, "ring of fitness", "Increases the wearer's fitness.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 70, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 70, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_ATTRMOD, A_CON, 1, NULL); // '1' is randomized during generation
|
addflag(lastot->flags, F_EQUIPCONFER, F_ATTRMOD, A_CON, 1, NULL); // '1' is randomized during generation
|
||||||
addflag(lastot->flags, F_IDWHENUSED, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_IDWHENUSED, B_TRUE, NA, NA, NULL);
|
||||||
addot(OT_RING_DEX, "ring of dexterity", "Increases the wearer's dexterity.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_DEX, "ring of dexterity", "Increases the wearer's dexterity.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 70, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 70, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_ATTRMOD, A_AGI, 1, NULL); // '1' is randomized during generation
|
addflag(lastot->flags, F_EQUIPCONFER, F_ATTRMOD, A_AGI, 1, NULL); // '1' is randomized during generation
|
||||||
addflag(lastot->flags, F_IDWHENUSED, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_IDWHENUSED, B_TRUE, NA, NA, NULL);
|
||||||
|
|
||||||
addot(OT_RING_HUNGER, "ring of hunger", "Greatly increases the metabolic rate of the wearer.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_HUNGER, "ring of hunger", "Greatly increases the metabolic rate of the wearer.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 73, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 73, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_FASTMETAB, 3, NA, NULL);
|
addflag(lastot->flags, F_EQUIPCONFER, F_FASTMETAB, 3, NA, NULL);
|
||||||
addflag(lastot->flags, F_STARTBLESSED, B_CURSED, NA, NA, NULL);
|
addflag(lastot->flags, F_STARTBLESSED, B_CURSED, NA, NA, NULL);
|
||||||
addot(OT_RING_WOUNDING, "ring of wounding", "Increases the damage output of the wearer.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_WOUNDING, "ring of wounding", "Increases the damage output of the wearer.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 73, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 73, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_EXTRADAM, NA, NA, "0d0+4");
|
addflag(lastot->flags, F_EQUIPCONFER, F_EXTRADAM, NA, NA, "0d0+4");
|
||||||
addflag(lastot->flags, F_ENCHANTABLE, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_ENCHANTABLE, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_IDWHENUSED, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_IDWHENUSED, B_TRUE, NA, NA, NULL);
|
||||||
addot(OT_RING_INVIS, "ring of invisibility", "Renders the wearer invisible.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_INVIS, "ring of invisibility", "Renders the wearer invisible.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 60, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_INVISIBLE, NA, NA, NULL);
|
addflag(lastot->flags, F_EQUIPCONFER, F_INVISIBLE, NA, NA, NULL);
|
||||||
addot(OT_RING_INVULN, "ring of invulnerability", "Grants the caster complete immunity to physical harm.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_INVULN, "ring of invulnerability", "Grants the caster complete immunity to physical harm.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_INVULNERABLE, NA, NA, NULL);
|
addflag(lastot->flags, F_EQUIPCONFER, F_INVULNERABLE, NA, NA, NULL);
|
||||||
addot(OT_RING_MPREGEN, "ring of recharging", "Slowly regenerates the wearer's mana.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_MPREGEN, "ring of recharging", "Slowly regenerates the wearer's mana.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 50, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_MPREGEN, 1, NA, NULL);
|
addflag(lastot->flags, F_EQUIPCONFER, F_MPREGEN, 1, NA, NULL);
|
||||||
addot(OT_RING_CONTROL, "ring of control", "Allows the wearer control over teleportation and polymorphic effects.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_CONTROL, "ring of control", "Allows the wearer control over teleportation and polymorphic effects.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 50, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_CONTROL, NA, NA, NULL);
|
addflag(lastot->flags, F_EQUIPCONFER, F_CONTROL, NA, NA, NULL);
|
||||||
addot(OT_RING_REGENERATION, "ring of regeneration", "Slowly regenerates the wearer's health, even when not resting.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_REGENERATION, "ring of regeneration", "Slowly regenerates the wearer's health, even when not resting.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 50, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_REGENERATES, 1, NA, NULL);
|
addflag(lastot->flags, F_EQUIPCONFER, F_REGENERATES, 1, NA, NULL);
|
||||||
addot(OT_RING_RESISTMAG, "ring of magic resistance", "Renders the wearer immune to most magical effects.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_RESISTMAG, "ring of magic resistance", "Renders the wearer immune to most magical effects.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 50, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_EQUIPCONFER, F_RESISTMAG, 5, NA, NULL);
|
addflag(lastot->flags, F_EQUIPCONFER, F_RESISTMAG, 5, NA, NULL);
|
||||||
addot(OT_RING_MIRACLES, "ring of miracles", "Grants a limited number of miracles to the wearer.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
addot(OT_RING_MIRACLES, "ring of miracles", "Grants a limited number of miracles to the wearer.", MT_METAL, 0.1, OC_RING, SZ_MINI);
|
||||||
addflag(lastot->flags, F_RARITY, H_ALL, 40, NA, "");
|
addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, "");
|
||||||
addflag(lastot->flags, F_CHARGES, 1, 3, NA, NULL);
|
addflag(lastot->flags, F_CHARGES, 1, 3, NA, NULL);
|
||||||
|
|
||||||
// unarmed weapons - note these damage/accuracys can be
|
// unarmed weapons - note these damage/accuracys can be
|
||||||
|
@ -4642,6 +4660,15 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_CRITCHANCE, 3, NA, NA, NULL);
|
addflag(lastot->flags, F_CRITCHANCE, 3, NA, NA, NULL);
|
||||||
|
|
||||||
|
addot(OT_BEAK, "beak", "beak object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
|
||||||
|
addflag(lastot->flags, F_DAM, DT_BITE, NA, NA, "1d2");
|
||||||
|
addflag(lastot->flags, F_ACCURACY, 100, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_NOSTRDAMMOD, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_USESSKILL, SK_NONE, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_ATTACKVERB, NA, NA, NA, "peck");
|
||||||
|
|
||||||
addot(OT_CLAWS, "claws", "claws object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
|
addot(OT_CLAWS, "claws", "claws object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
|
||||||
addflag(lastot->flags, F_DAM, DT_SLASH, NA, NA, "1d2");
|
addflag(lastot->flags, F_DAM, DT_SLASH, NA, NA, "1d2");
|
||||||
addflag(lastot->flags, F_ATTACKVERB, NA, 5, NA, "scratch");
|
addflag(lastot->flags, F_ATTACKVERB, NA, 5, NA, "scratch");
|
||||||
|
@ -4826,14 +4853,14 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
|
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
|
||||||
addot(OT_BATTLEAXE, "battleaxe", "An large axe specifically designed for combat.", MT_METAL, 8, OC_WEAPON, SZ_MEDIUM);
|
addot(OT_BATTLEAXE, "battleaxe", "An large axe specifically designed for combat.", MT_METAL, 8, OC_WEAPON, SZ_MEDIUM);
|
||||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, NA, NULL);
|
addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, NA, NULL);
|
||||||
addflag(lastot->flags, F_DAM, DT_CHOP, NA, NA, "1d8+1");
|
addflag(lastot->flags, F_DAM, DT_CHOP, NA, NA, "1d10+1");
|
||||||
addflag(lastot->flags, F_ACCURACY, 80, NA, NA, NULL);
|
addflag(lastot->flags, F_ACCURACY, 80, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_USESSKILL, SK_AXES, NA, NA, NULL);
|
addflag(lastot->flags, F_USESSKILL, SK_AXES, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_ATTREQ, A_STR, 13, NA, NULL);
|
addflag(lastot->flags, F_ATTREQ, A_STR, 13, NA, NULL);
|
||||||
addot(OT_GREATAXE, "greataxe", "An enormous axe made designed for combat.", MT_METAL, 10, OC_WEAPON, SZ_MEDIUM);
|
addot(OT_GREATAXE, "greataxe", "An enormous axe made designed for combat.", MT_METAL, 10, OC_WEAPON, SZ_MEDIUM);
|
||||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 50, NA, NULL);
|
addflag(lastot->flags, F_RARITY, H_DUNGEON, 50, NA, NULL);
|
||||||
addflag(lastot->flags, F_OBATTACKDELAY, 180, NA, NA, NULL);
|
addflag(lastot->flags, F_OBATTACKDELAY, 180, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_DAM, DT_CHOP, NA, NA, "1d9+1");
|
addflag(lastot->flags, F_DAM, DT_CHOP, NA, NA, "3d6");
|
||||||
addflag(lastot->flags, F_TWOHANDED, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_TWOHANDED, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_ACCURACY, 70, NA, NA, NULL);
|
addflag(lastot->flags, F_ACCURACY, 70, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_USESSKILL, SK_AXES, NA, NA, NULL);
|
addflag(lastot->flags, F_USESSKILL, SK_AXES, NA, NA, NULL);
|
||||||
|
@ -4846,9 +4873,17 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_USESSKILL, SK_AXES, NA, NA, NULL);
|
addflag(lastot->flags, F_USESSKILL, SK_AXES, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_ATTREQ, A_STR, 7, NA, NULL);
|
addflag(lastot->flags, F_ATTREQ, A_STR, 7, NA, NULL);
|
||||||
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
|
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
|
||||||
addot(OT_WARAXE, "war axe", "An axe made for combat.", MT_METAL, 7, OC_WEAPON, SZ_MEDIUM);
|
addot(OT_HATCHET, "hatchet", "Similar to a handaxe but weighted at the head. A fast one-handed axe, ideal for throwing.", MT_METAL, 4, OC_WEAPON, SZ_SMALL);
|
||||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, NA, NULL);
|
addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, NA, NULL);
|
||||||
addflag(lastot->flags, F_DAM, DT_CHOP, NA, NA, "1d7+1");
|
addflag(lastot->flags, F_DAM, DT_CHOP, NA, NA, "1d7+1");
|
||||||
|
addflag(lastot->flags, F_ACCURACY, 90, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_USESSKILL, SK_AXES, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_ATTREQ, A_STR, 8, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_CRITCHANCE, 6, NA, NA, NULL);
|
||||||
|
addot(OT_WARAXE, "war axe", "An axe made for combat.", MT_METAL, 7, OC_WEAPON, SZ_MEDIUM);
|
||||||
|
addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_DAM, DT_CHOP, NA, NA, "3d4");
|
||||||
addflag(lastot->flags, F_ACCURACY, 85, NA, NA, NULL);
|
addflag(lastot->flags, F_ACCURACY, 85, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_USESSKILL, SK_AXES, NA, NA, NULL);
|
addflag(lastot->flags, F_USESSKILL, SK_AXES, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_ATTREQ, A_STR, 11, NA, NULL);
|
addflag(lastot->flags, F_ATTREQ, A_STR, 11, NA, NULL);
|
||||||
|
@ -4875,6 +4910,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_USESSKILL, SK_SHORTBLADES, NA, NA, NULL);
|
addflag(lastot->flags, F_USESSKILL, SK_SHORTBLADES, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_CRITCHANCE, 2, NA, NA, NULL);
|
addflag(lastot->flags, F_CRITCHANCE, 2, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_CANBEDIFFMAT, MT_SILVER, 10, NA, NULL);
|
addflag(lastot->flags, F_CANBEDIFFMAT, MT_SILVER, 10, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_CANBEDIFFMAT, MT_BONE, 10, NA, NULL);
|
||||||
addot(OT_FORK, "fork", "A common kitchen fork.", MT_METAL, 0.2, OC_WEAPON, SZ_SMALL);
|
addot(OT_FORK, "fork", "A common kitchen fork.", MT_METAL, 0.2, OC_WEAPON, SZ_SMALL);
|
||||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, NA, NULL);
|
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, NA, NULL);
|
||||||
addflag(lastot->flags, F_DAM, DT_PIERCE, NA, NA, "1d2");
|
addflag(lastot->flags, F_DAM, DT_PIERCE, NA, NA, "1d2");
|
||||||
|
@ -5454,17 +5490,15 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_DTVULN, DT_WATER, NA, NA, "2d6");
|
addflag(lastrace->flags, F_DTVULN, DT_WATER, NA, NA, "2d6");
|
||||||
addflag(lastrace->flags, F_DTVULN, DT_ELECTRIC, NA, NA, NULL);
|
addflag(lastrace->flags, F_DTVULN, DT_ELECTRIC, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_NOARMOURON, BP_BODY, NA, NA, NULL);
|
|
||||||
addflag(lastrace->flags, F_NOARMOURON, BP_LEGS, NA, NA, NULL);
|
addflag(lastrace->flags, F_NOARMOURON, BP_LEGS, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_NOARMOURON, BP_HANDS, NA, NA, NULL);
|
addflag(lastrace->flags, F_NOARMOURON, BP_HANDS, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_NOARMOURON, BP_FEET, NA, NA, NULL);
|
addflag(lastrace->flags, F_NOARMOURON, BP_FEET, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_NOARMOURON, BP_RIGHTFINGER, NA, NA, NULL);
|
addflag(lastrace->flags, F_NOARMOURON, BP_RIGHTFINGER, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_NOARMOURON, BP_LEFTFINGER, NA, NA, NULL);
|
addflag(lastrace->flags, F_NOARMOURON, BP_LEFTFINGER, NA, NA, NULL);
|
||||||
// other special stuff
|
// other special stuff
|
||||||
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, "puddle of oil");
|
|
||||||
addflag(lastrace->flags, F_BODYPARTNAME, BP_EARS, NA, NA, "audio inputs");
|
addflag(lastrace->flags, F_BODYPARTNAME, BP_EARS, NA, NA, "audio inputs");
|
||||||
addflag(lastrace->flags, F_BODYPARTNAME, BP_EYES, NA, NA, "video inputs");
|
addflag(lastrace->flags, F_BODYPARTNAME, BP_EYES, NA, NA, "video inputs");
|
||||||
addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "metal frame");
|
addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "central frame");
|
||||||
addflag(lastrace->flags, F_BODYPARTNAME, BP_LEGS, NA, NA, "stabilisers");
|
addflag(lastrace->flags, F_BODYPARTNAME, BP_LEGS, NA, NA, "stabilisers");
|
||||||
addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "robotic hands");
|
addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "robotic hands");
|
||||||
addflag(lastrace->flags, F_BODYPARTNAME, BP_FEET, NA, NA, "lower propulsion units");
|
addflag(lastrace->flags, F_BODYPARTNAME, BP_FEET, NA, NA, "lower propulsion units");
|
||||||
|
@ -5503,6 +5537,7 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, NULL);
|
addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, NULL);
|
||||||
// bonuses
|
// bonuses
|
||||||
addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL);
|
addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_STARTSKILL, SK_CARTOGRAPHY, PR_NOVICE, NA, NULL);
|
||||||
// penalties
|
// penalties
|
||||||
addflag(lastrace->flags, F_MPMOD, -3, NA, NA, NULL);
|
addflag(lastrace->flags, F_MPMOD, -3, NA, NA, NULL);
|
||||||
|
|
||||||
|
@ -7376,6 +7411,7 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL);
|
addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL);
|
addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_HASATTACK, OT_BEAK, NA, NA, "1d2");
|
||||||
addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL);
|
addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_VEGETARIAN, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_VEGETARIAN, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_SEEINDARK, 1, NA, NA, NULL);
|
addflag(lastrace->flags, F_SEEINDARK, 1, NA, NA, NULL);
|
||||||
|
@ -7750,15 +7786,15 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
|
||||||
addrace(R_SNAKETREE, "tree snake", 3, 's', C_GREEN, MT_FLESH, RC_ANIMAL, "Non-venomous snakes which leap at their prey.");
|
addrace(R_SNAKETREE, "tree snake", 3, 's', C_GREEN, MT_FLESH, RC_ANIMAL, "Non-venomous snakes which leap at their prey.");
|
||||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||||
addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
|
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
|
||||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, "");
|
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, "");
|
||||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4");
|
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4");
|
||||||
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, NA, NA, "3d4+1");
|
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, NA, NA, "1d4+1");
|
||||||
addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "torso");
|
addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "torso");
|
||||||
addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL);
|
addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL);
|
addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL);
|
||||||
|
@ -8103,7 +8139,7 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_ATTACKRANGE, 1, 2, NA, NULL); // just buzz around
|
addflag(lastrace->flags, F_ATTACKRANGE, 1, 2, NA, NULL); // just buzz around
|
||||||
addflag(lastrace->flags, F_MORALE, 0, NA, NA, NULL);
|
addflag(lastrace->flags, F_MORALE, 0, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL);
|
||||||
addrace(R_STIRGE, "mosquitoid", 10, 'i', C_BROWN, MT_FLESH, RC_INSECT, "Mosquitoids look like giant mosquiteos but are equipped with human-like arms, with clawed hands.");
|
addrace(R_STIRGE, "mosquitoid", 10, 'i', C_BROWN, MT_FLESH, RC_INSECT, "Mosquitoids look like giant mosquitoes but are equipped with human-like arms, with clawed hands.");
|
||||||
addflag(lastrace->flags, F_INSECT, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_INSECT, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
|
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
|
||||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
18
defs.h
18
defs.h
|
@ -373,6 +373,12 @@ enum CASTTYPE {
|
||||||
CT_EYESPIT
|
CT_EYESPIT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum DRAINTYPE {
|
||||||
|
DR_NONE = 0,
|
||||||
|
DR_FROMBITE,
|
||||||
|
DR_FROMWEP
|
||||||
|
};
|
||||||
|
|
||||||
enum NOISECLASS {
|
enum NOISECLASS {
|
||||||
NC_NONE = 0,
|
NC_NONE = 0,
|
||||||
NC_MOVEMENT = 1,
|
NC_MOVEMENT = 1,
|
||||||
|
@ -1363,6 +1369,7 @@ enum OBTYPE {
|
||||||
OT_INSECTICIDE,
|
OT_INSECTICIDE,
|
||||||
OT_LANTERNLED,
|
OT_LANTERNLED,
|
||||||
OT_TENT,
|
OT_TENT,
|
||||||
|
OT_SOLDERINGIRON,
|
||||||
// tech l2
|
// tech l2
|
||||||
OT_C4,
|
OT_C4,
|
||||||
OT_FLASHBANG,
|
OT_FLASHBANG,
|
||||||
|
@ -1494,6 +1501,7 @@ enum OBTYPE {
|
||||||
OT_SHIELDLARGE,
|
OT_SHIELDLARGE,
|
||||||
OT_SHIELDTOWER,
|
OT_SHIELDTOWER,
|
||||||
// rings
|
// rings
|
||||||
|
OT_RING_ENDURANCE,
|
||||||
OT_RING_INVIS,
|
OT_RING_INVIS,
|
||||||
OT_RING_INVULN,
|
OT_RING_INVULN,
|
||||||
OT_RING_LUCK,
|
OT_RING_LUCK,
|
||||||
|
@ -1513,6 +1521,7 @@ enum OBTYPE {
|
||||||
OT_RING_SIGHT,
|
OT_RING_SIGHT,
|
||||||
OT_RING_WOUNDING,
|
OT_RING_WOUNDING,
|
||||||
// innate / animal weapons
|
// innate / animal weapons
|
||||||
|
OT_BEAK,
|
||||||
OT_CLAWS,
|
OT_CLAWS,
|
||||||
OT_FISTS,
|
OT_FISTS,
|
||||||
OT_HOOKHAND, // for pirate
|
OT_HOOKHAND, // for pirate
|
||||||
|
@ -1541,6 +1550,7 @@ enum OBTYPE {
|
||||||
// axes
|
// axes
|
||||||
OT_AXE,
|
OT_AXE,
|
||||||
OT_HANDAXE,
|
OT_HANDAXE,
|
||||||
|
OT_HATCHET,
|
||||||
OT_BATTLEAXE,
|
OT_BATTLEAXE,
|
||||||
OT_GREATAXE,
|
OT_GREATAXE,
|
||||||
OT_WARAXE,
|
OT_WARAXE,
|
||||||
|
@ -2081,7 +2091,10 @@ enum FLAG {
|
||||||
F_DEBUG, // debugging enabled
|
F_DEBUG, // debugging enabled
|
||||||
F_ACCURACYMOD, // modify your accuracy by val0
|
F_ACCURACYMOD, // modify your accuracy by val0
|
||||||
F_PLAYABLE, // player can select to be this race.
|
F_PLAYABLE, // player can select to be this race.
|
||||||
F_VAMPIRIC, // successful bite attacks form this lf will heal it
|
F_VAMPIRIC, // when on a lf:
|
||||||
|
// successful bite attacks form this lf will heal it
|
||||||
|
// when on an object
|
||||||
|
// successful attacks with this weapon will heal lf
|
||||||
F_VEGETARIAN, // this lf will not eat meat.
|
F_VEGETARIAN, // this lf will not eat meat.
|
||||||
F_PARTVEGETARIAN,// this lf will only eat if hunger >= 'hungry'
|
F_PARTVEGETARIAN,// this lf will only eat if hunger >= 'hungry'
|
||||||
F_CARNIVORE, // this lf will only eat meat.
|
F_CARNIVORE, // this lf will only eat meat.
|
||||||
|
@ -2464,6 +2477,8 @@ enum FLAG {
|
||||||
F_SEEINVIS, // can see invisible things
|
F_SEEINVIS, // can see invisible things
|
||||||
F_SILENTMOVE, // lf makes no noise when walking/flying
|
F_SILENTMOVE, // lf makes no noise when walking/flying
|
||||||
F_STABILITY, // doesn't slip over
|
F_STABILITY, // doesn't slip over
|
||||||
|
F_STAMREGEN, // boost stamina regeneration at 'text' per turn
|
||||||
|
// (this is a float)
|
||||||
F_STENCH, // creatures within v0 gain f_nauseated = v1
|
F_STENCH, // creatures within v0 gain f_nauseated = v1
|
||||||
F_STUNNED, // cannot attack or cast spells
|
F_STUNNED, // cannot attack or cast spells
|
||||||
F_TREMORSENSE, // doesn't need eyes to see, can see in dark with v0
|
F_TREMORSENSE, // doesn't need eyes to see, can see in dark with v0
|
||||||
|
@ -3263,6 +3278,7 @@ enum BRAND {
|
||||||
BR_THINKING,
|
BR_THINKING,
|
||||||
BR_KNOWLEDGE,
|
BR_KNOWLEDGE,
|
||||||
BR_LEVITATION,
|
BR_LEVITATION,
|
||||||
|
BR_LIFESUCK,
|
||||||
BR_FEATHERFALL,
|
BR_FEATHERFALL,
|
||||||
BR_ANTIMAG,
|
BR_ANTIMAG,
|
||||||
BR_CONCEALMENT,
|
BR_CONCEALMENT,
|
||||||
|
|
36
io.c
36
io.c
|
@ -1159,7 +1159,7 @@ int announceflaggain(lifeform_t *lf, flag_t *f) {
|
||||||
donesomething = B_TRUE;
|
donesomething = B_TRUE;
|
||||||
break;
|
break;
|
||||||
case F_MAGICARMOUR:
|
case F_MAGICARMOUR:
|
||||||
msg("%s %s appears around %s!",needan(f->text) ? "an" : "a", f->text, lfname);
|
msg("%s %s forms around %s!",needan(f->text) ? "an" : "a", f->text, lfname);
|
||||||
donesomething = B_TRUE;
|
donesomething = B_TRUE;
|
||||||
break;
|
break;
|
||||||
case F_ASLEEP:
|
case F_ASLEEP:
|
||||||
|
@ -4505,11 +4505,13 @@ char *makedesc_ob(object_t *o, char *retbuf) {
|
||||||
ff->val[0], (ff->val[0] == 1) ? "" : "s",
|
ff->val[0], (ff->val[0] == 1) ? "" : "s",
|
||||||
ff2->val[0], (ff2->val[0] == 1) ? "" : "s");
|
ff2->val[0], (ff2->val[0] == 1) ? "" : "s");
|
||||||
strncat(retbuf, buf, HUGEBUFLEN);
|
strncat(retbuf, buf, HUGEBUFLEN);
|
||||||
} else if (o->type->obclass->id == OC_WEAPON) {
|
} else if (isweapon(o) && isknown(o)) {
|
||||||
flag_t *damflag;
|
flag_t *damflag;
|
||||||
int delay;
|
int delay;
|
||||||
int critchance;
|
int critchance;
|
||||||
snprintf(buf, BUFLEN, "It is a %s weapon", hasflag(o->flags, F_TWOHANDED) ? "two-handed" : "single handed");
|
snprintf(buf, BUFLEN, "%s %s weapon",
|
||||||
|
(o->type->obclass->id == OC_WEAPON) ? "It is a" : "It can be used as a",
|
||||||
|
hasflag(o->flags, F_TWOHANDED) ? "two-handed" : "single handed");
|
||||||
damflag = hasflag(o->flags, F_DAM);
|
damflag = hasflag(o->flags, F_DAM);
|
||||||
if (damflag) {
|
if (damflag) {
|
||||||
int bonus = 0;
|
int bonus = 0;
|
||||||
|
@ -5311,14 +5313,16 @@ char *makedesc_ob(object_t *o, char *retbuf) {
|
||||||
|
|
||||||
|
|
||||||
// skill type?
|
// skill type?
|
||||||
f = hasflag(o->flags, F_USESSKILL);
|
if (isknown(o)) {
|
||||||
if (f && (f->val[0] != SK_NONE)) {
|
f = hasflag(o->flags, F_USESSKILL);
|
||||||
enum SKILLLEVEL slev;
|
if (f && (f->val[0] != SK_NONE)) {
|
||||||
slev = getskill(player, f->val[0]);
|
enum SKILLLEVEL slev;
|
||||||
sprintf(buf, "It falls into the '%s' category (your skill: ",getskillname(f->val[0]));
|
slev = getskill(player, f->val[0]);
|
||||||
strncat(retbuf, buf, HUGEBUFLEN);
|
sprintf(buf, "It falls into the '%s' category (your skill: ",getskillname(f->val[0]));
|
||||||
sprintf(buf, "^%d%s^n)\n", getskilllevelcolour(slev), getskilllevelname(getskill(player, f->val[0])) );
|
strncat(retbuf, buf, HUGEBUFLEN);
|
||||||
strncat(retbuf, buf, HUGEBUFLEN);
|
sprintf(buf, "^%d%s^n)\n", getskilllevelcolour(slev), getskilllevelname(getskill(player, f->val[0])) );
|
||||||
|
strncat(retbuf, buf, HUGEBUFLEN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasflag(o->flags, F_NOBLESS)) {
|
if (hasflag(o->flags, F_NOBLESS)) {
|
||||||
|
@ -5396,9 +5400,10 @@ char *makedesc_skill(enum SKILL skid, char *retbuf, enum SKILLLEVEL levhilite) {
|
||||||
if ((levhilite != PR_INEPT) && (slev == levhilite)) {
|
if ((levhilite != PR_INEPT) && (slev == levhilite)) {
|
||||||
hilitethis = B_TRUE;
|
hilitethis = B_TRUE;
|
||||||
}
|
}
|
||||||
snprintf(buf, BUFLEN, "%sAt %s level%s: %s\n",hilitethis ? "^W" : "",
|
snprintf(buf, BUFLEN, "%sAt %s level%s: %s\n",hilitethis ? "^8" : "",
|
||||||
getskilllevelname(sk->skilldesclev[i]), sk->skilldesctext[i],
|
getskilllevelname(sk->skilldesclev[i]),
|
||||||
hilitethis ? "^n" : "");
|
hilitethis ? "^n" : "",
|
||||||
|
sk->skilldesctext[i]);
|
||||||
}
|
}
|
||||||
strncat(retbuf, buf, HUGEBUFLEN);
|
strncat(retbuf, buf, HUGEBUFLEN);
|
||||||
}
|
}
|
||||||
|
@ -8054,7 +8059,8 @@ void drawstatus(void) {
|
||||||
snprintf(maxmpstr, BUFLEN, "(%d)",player->maxmp);
|
snprintf(maxmpstr, BUFLEN, "(%d)",player->maxmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getmaxmp(player) > 0) {
|
// note: not using getmaxmp() here on purpose!
|
||||||
|
if (player->maxmp > 0) {
|
||||||
wattron(statwin, A_BOLD); wprintw(statwin, "MP:"); wattroff(statwin, A_BOLD);
|
wattron(statwin, A_BOLD); wprintw(statwin, "MP:"); wattroff(statwin, A_BOLD);
|
||||||
setcol(statwin, getpctcol(player->mp, getmaxmp(player)));
|
setcol(statwin, getpctcol(player->mp, getmaxmp(player)));
|
||||||
wprintw(statwin, "%d",player->mp);
|
wprintw(statwin, "%d",player->mp);
|
||||||
|
|
50
lf.c
50
lf.c
|
@ -1126,6 +1126,10 @@ int canweild(lifeform_t *lf, object_t *o) {
|
||||||
return B_FALSE;
|
return B_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (o && (gettechlevel(o->type->id) > getskill(lf, SK_TECHUSAGE))) {
|
||||||
|
reason = E_NOTKNOWN;
|
||||||
|
return B_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (o && lfhasflagval(lf, F_INJURY, IJ_TENDONCUT, NA, NA, NULL)) {
|
if (o && lfhasflagval(lf, F_INJURY, IJ_TENDONCUT, NA, NA, NULL)) {
|
||||||
if ((weildloc == BP_WEAPON) || (otherloc == BP_WEAPON)) {
|
if ((weildloc == BP_WEAPON) || (otherloc == BP_WEAPON)) {
|
||||||
|
@ -1271,8 +1275,6 @@ int castspell(lifeform_t *lf, enum OBTYPE sid, lifeform_t *targlf, object_t *tar
|
||||||
return B_TRUE;
|
return B_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
power = getspellpower(lf, sid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sp = findot(sid);
|
sp = findot(sid);
|
||||||
|
@ -1289,17 +1291,26 @@ int castspell(lifeform_t *lf, enum OBTYPE sid, lifeform_t *targlf, object_t *tar
|
||||||
snprintf(buf, BUFLEN, "Cast %s at what power level?", sp->name);
|
snprintf(buf, BUFLEN, "Cast %s at what power level?", sp->name);
|
||||||
initprompt(&prompt, buf);
|
initprompt(&prompt, buf);
|
||||||
for (i = 1; i <= max; i++) {
|
for (i = 1; i <= max; i++) {
|
||||||
snprintf(buf, BUFLEN, "Power %s (%d MP)", roman(i), getmpcost(lf, sid) * i);
|
int thiscost;
|
||||||
getvarpowerspelldesc(sp->id, i, desc);
|
thiscost = getmpcost(lf, sid) * i;
|
||||||
if (strlen(desc)) {
|
if (lf->mp >= thiscost) {
|
||||||
strcat(buf, "\t");
|
snprintf(buf, BUFLEN, "Power %s (%d MP)", roman(i), thiscost);
|
||||||
strcat(buf, desc);
|
getvarpowerspelldesc(sp->id, i, desc);
|
||||||
}
|
if (strlen(desc)) {
|
||||||
addchoice(&prompt, '0' + i, buf, buf, NULL, NULL);
|
strcat(buf, "\t");
|
||||||
|
strcat(buf, desc);
|
||||||
|
}
|
||||||
|
addchoice(&prompt, '0' + i, buf, buf, NULL, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
addchoice(&prompt, '0', "Cancel", "Cancel", NULL, NULL);
|
||||||
ch = getchoice(&prompt);
|
ch = getchoice(&prompt);
|
||||||
power = ch - '0';
|
power = ch - '0';
|
||||||
|
|
||||||
|
if (power == 0) {
|
||||||
|
msg("Cancelled.");
|
||||||
|
return B_TRUE;
|
||||||
|
}
|
||||||
// modify cost
|
// modify cost
|
||||||
cost *= i;
|
cost *= i;
|
||||||
}
|
}
|
||||||
|
@ -2556,7 +2567,7 @@ void do_eyesight_adjust(lifeform_t *lf) {
|
||||||
setlosdirty(lf);
|
setlosdirty(lf);
|
||||||
//precalclos(lf);
|
//precalclos(lf);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!lfhasflag(lf, F_SEEINDARK)) {
|
||||||
if ((lf->cell->lit == L_NOTLIT) && (lf->eyeadjustment < MAX_EYEADJ)) {
|
if ((lf->cell->lit == L_NOTLIT) && (lf->eyeadjustment < MAX_EYEADJ)) {
|
||||||
// your eyes start to adjust...
|
// your eyes start to adjust...
|
||||||
lf->eyeadjustment++;
|
lf->eyeadjustment++;
|
||||||
|
@ -6333,6 +6344,9 @@ int getstamina(lifeform_t *lf) {
|
||||||
|
|
||||||
float getstamregen(lifeform_t *lf) {
|
float getstamregen(lifeform_t *lf) {
|
||||||
float regenrate = STAMREGEN;
|
float regenrate = STAMREGEN;
|
||||||
|
flag_t *retflag[MAXCANDIDATES];
|
||||||
|
int nretflags,i;
|
||||||
|
|
||||||
if (lfhasflagval(lf, F_INJURY, IJ_WINDPIPECRUSHED, NA, NA, NULL)) {
|
if (lfhasflagval(lf, F_INJURY, IJ_WINDPIPECRUSHED, NA, NA, NULL)) {
|
||||||
regenrate = 0.2; // override everything else
|
regenrate = 0.2; // override everything else
|
||||||
} else {
|
} else {
|
||||||
|
@ -6343,7 +6357,13 @@ float getstamregen(lifeform_t *lf) {
|
||||||
regenrate = pctof(50, regenrate);
|
regenrate = pctof(50, regenrate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getflags(lf->flags, retflag, &nretflags, F_STAMREGEN, F_NONE);
|
||||||
|
for (i = 0; i < nretflags; i++) {
|
||||||
|
regenrate += atof(retflag[i]->text);
|
||||||
|
}
|
||||||
limitf(®enrate, 0, NA);
|
limitf(®enrate, 0, NA);
|
||||||
|
|
||||||
return regenrate;
|
return regenrate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13007,6 +13027,11 @@ int real_skillcheck(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod, int *r
|
||||||
othermod += f->val[0];
|
othermod += f->val[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (ct == SC_DODGE) {
|
||||||
|
if (attrib) {
|
||||||
|
// ie. -5 to 5
|
||||||
|
othermod += (getstatmod(lf, A_AGI) / 10);
|
||||||
|
}
|
||||||
} else if (ct == SC_SLIP) {
|
} else if (ct == SC_SLIP) {
|
||||||
if (lfhasflagval(lf, F_INJURY, IJ_LEGBROKEN, NA, NA, NULL)) {
|
if (lfhasflagval(lf, F_INJURY, IJ_LEGBROKEN, NA, NA, NULL)) {
|
||||||
othermod -= 25;
|
othermod -= 25;
|
||||||
|
@ -15768,7 +15793,7 @@ int wear(lifeform_t *lf, object_t *o) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case E_NOTKNOWN:
|
case E_NOTKNOWN:
|
||||||
if (isplayer(lf)) msg("You can't wear that!");
|
if (isplayer(lf)) msg("You can't wear that!"); // same message as wearing non-armour
|
||||||
break;
|
break;
|
||||||
case E_NOBP:
|
case E_NOBP:
|
||||||
if (isplayer(lf)) msg("You have no %s on which to wear that!", getbodypartname(lf, bp));
|
if (isplayer(lf)) msg("You have no %s on which to wear that!", getbodypartname(lf, bp));
|
||||||
|
@ -15926,6 +15951,9 @@ int weild(lifeform_t *lf, object_t *o) {
|
||||||
case E_NOHANDS:
|
case E_NOHANDS:
|
||||||
msg("You do not have enough free hands to weild this weapon.");
|
msg("You do not have enough free hands to weild this weapon.");
|
||||||
break;
|
break;
|
||||||
|
case E_NOTKNOWN:
|
||||||
|
if (isplayer(lf)) msg("You can't weild that!"); // same message as wearing non-armour
|
||||||
|
break;
|
||||||
case E_LOWCHA:
|
case E_LOWCHA:
|
||||||
msg("You are not attractive enough to use this weapon.");
|
msg("You are not attractive enough to use this weapon.");
|
||||||
break;
|
break;
|
||||||
|
|
174
map.c
174
map.c
|
@ -1082,95 +1082,121 @@ void clearcell_exceptflags(cell_t *c, ... ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// returns true if something happened
|
// returns true if something happened
|
||||||
int dowaterspread(cell_t *c) {
|
int doelementspread(cell_t *c) {
|
||||||
float thisdepth;
|
float thisdepth;
|
||||||
int i;
|
int i;
|
||||||
int nsurround = 0;
|
int nsurround = 0;
|
||||||
int db = B_FALSE;
|
int db = B_FALSE;
|
||||||
cell_t *surroundcell[8];
|
cell_t *surroundcell[8];
|
||||||
|
object_t *fireob = NULL;
|
||||||
|
|
||||||
if (!c || c->type->solid || hascloseddoor(c)) {
|
if (!c || c->type->solid) {
|
||||||
return B_FALSE;
|
return B_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// calculate depth of this cell
|
// calculate depth of this cell
|
||||||
thisdepth = getcellwaterdepth(c, NULL);
|
if (!hascloseddoor(c)) {
|
||||||
|
thisdepth = getcellwaterdepth(c, NULL);
|
||||||
|
|
||||||
if (!thisdepth) return B_FALSE;
|
if (thisdepth) {
|
||||||
|
|
||||||
// count surrounding cells of lower depth
|
// count surrounding cells of lower depth
|
||||||
for (i = DC_N; i <= DC_NW; i++) {
|
for (i = DC_N; i <= DC_NW; i++) {
|
||||||
cell_t *newc;
|
cell_t *newc;
|
||||||
|
|
||||||
newc = getcellindir(c, i);
|
newc = getcellindir(c, i);
|
||||||
if (newc && !newc->type->solid && !hascloseddoor(newc)) {
|
if (newc && !newc->type->solid && !hascloseddoor(newc)) {
|
||||||
float newcdepth;
|
float newcdepth;
|
||||||
int ok = B_FALSE;
|
int ok = B_FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FIX THIS CODE LATER
|
FIX THIS CODE LATER
|
||||||
if (newc->type->floorheight == c->type->floorheight) {
|
if (newc->type->floorheight == c->type->floorheight) {
|
||||||
// same height - don't include these???
|
// same height - don't include these???
|
||||||
ok = B_FALSE;
|
ok = B_FALSE;
|
||||||
//ok = B_TRUE;
|
//ok = B_TRUE;
|
||||||
} else if (newc->type->floorheight < c->type->floorheight) {
|
} else if (newc->type->floorheight < c->type->floorheight) {
|
||||||
// ie. downhill. don't include these
|
// ie. downhill. don't include these
|
||||||
ok = B_FALSE;
|
ok = B_FALSE;
|
||||||
} else if (newc->type->floorheight > c->type->floorheight) {
|
} else if (newc->type->floorheight > c->type->floorheight) {
|
||||||
// ie. uphill.
|
// ie. uphill.
|
||||||
ok = B_TRUE;
|
ok = B_TRUE;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if (newc->type->floorheight == c->type->floorheight) {
|
if (newc->type->floorheight == c->type->floorheight) {
|
||||||
ok = B_TRUE;
|
ok = B_TRUE;
|
||||||
} else {
|
} else {
|
||||||
ok = B_FALSE;
|
ok = B_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ok) {
|
if (ok) {
|
||||||
newcdepth = getcellwaterdepth(newc, NULL);
|
newcdepth = getcellwaterdepth(newc, NULL);
|
||||||
|
|
||||||
if (newcdepth < thisdepth) {
|
if (newcdepth < thisdepth) {
|
||||||
surroundcell[nsurround] = newc;
|
surroundcell[nsurround] = newc;
|
||||||
nsurround++;
|
nsurround++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// if there were any posisble cells around us
|
||||||
|
if (nsurround) {
|
||||||
|
float newdepth;
|
||||||
|
|
||||||
|
//newdepth = thisdepth / (pctof(nsurround,50)+1);
|
||||||
|
newdepth = thisdepth / (pctof(nsurround,55)+1);
|
||||||
|
//newdepth = thisdepth / (nsurround+1);
|
||||||
|
limitf(&newdepth,(float)DP_NONE, (float)DP_MAX);
|
||||||
|
|
||||||
|
if (db) dblog("waterspread: cell %d,%d (%d/%s) spreads to %d cells-->%d/%s",
|
||||||
|
c->x, c->y, (int)thisdepth, getwaterdepthname((int)thisdepth),
|
||||||
|
nsurround, (int)newdepth, getwaterdepthname((int)newdepth));
|
||||||
|
|
||||||
|
// SET our cell to new depth
|
||||||
|
setwaterdepth(c, (int)newdepth);
|
||||||
|
|
||||||
|
// ADD water to surrounding cells
|
||||||
|
for (i = 0; i < nsurround; i++) {
|
||||||
|
cell_t *sc;
|
||||||
|
flag_t *f;
|
||||||
|
|
||||||
|
sc = surroundcell[i];
|
||||||
|
|
||||||
|
f = hasflagval(sc->map->flags, F_NEWWATERDEPTH, sc->x, sc->y, NA, NULL);
|
||||||
|
if (f) {
|
||||||
|
f->val[2] += newdepth;
|
||||||
|
} else {
|
||||||
|
addflag(sc->map->flags, F_NEWWATERDEPTH, sc->x, sc->y, (int)newdepth, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return B_TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// fire
|
||||||
|
fireob = hasobofmaterial(c->obpile, MT_FIRE);
|
||||||
// if there were any posisble cells around us
|
if (fireob && (fireob->birthtime != curtime)) {
|
||||||
if (nsurround) {
|
cell_t *retcell[MAXRETCELLS];
|
||||||
float newdepth;
|
int nretcells,i,nspread = 0;
|
||||||
|
|
||||||
//newdepth = thisdepth / (pctof(nsurround,50)+1);
|
|
||||||
newdepth = thisdepth / (pctof(nsurround,55)+1);
|
|
||||||
//newdepth = thisdepth / (nsurround+1);
|
|
||||||
limitf(&newdepth,(float)DP_NONE, (float)DP_MAX);
|
|
||||||
|
|
||||||
if (db) dblog("waterspread: cell %d,%d (%d/%s) spreads to %d cells-->%d/%s",
|
|
||||||
c->x, c->y, (int)thisdepth, getwaterdepthname((int)thisdepth),
|
|
||||||
nsurround, (int)newdepth, getwaterdepthname((int)newdepth));
|
|
||||||
|
|
||||||
// SET our cell to new depth
|
|
||||||
setwaterdepth(c, (int)newdepth);
|
|
||||||
|
|
||||||
// ADD water to surrounding cells
|
|
||||||
for (i = 0; i < nsurround; i++) {
|
|
||||||
cell_t *sc;
|
|
||||||
flag_t *f;
|
|
||||||
|
|
||||||
sc = surroundcell[i];
|
|
||||||
|
|
||||||
f = hasflagval(sc->map->flags, F_NEWWATERDEPTH, sc->x, sc->y, NA, NULL);
|
// check adjacent cells for flammable stuff
|
||||||
if (f) {
|
getradiuscells(c, 1, DT_COMPASS, B_FALSE, LOF_DONTNEED, B_FALSE, retcell, &nretcells, B_FALSE);
|
||||||
f->val[2] += newdepth;
|
for (i = 0; i < nretcells; i++) {
|
||||||
} else {
|
object_t *oo;
|
||||||
addflag(sc->map->flags, F_NEWWATERDEPTH, sc->x, sc->y, (int)newdepth, NULL);
|
for (oo = retcell[i]->obpile->first ; oo ; oo = oo->next) {
|
||||||
|
if (isflammable(oo) && !hasobofmaterial(retcell[i]->obpile, MT_FIRE)) {
|
||||||
|
ignite(oo);
|
||||||
|
// if object didn't ignite into a fire, add one.
|
||||||
|
if (!hasobofmaterial(retcell[i]->obpile, MT_FIRE)) {
|
||||||
|
addobfast(retcell[i]->obpile, fireob->type->id);
|
||||||
|
}
|
||||||
|
nspread++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return B_TRUE;
|
|
||||||
}
|
}
|
||||||
return B_FALSE;
|
return B_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -3676,7 +3702,7 @@ int dirtoy(int dt, int dir) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void dumpmap(map_t *map) {
|
void dumpmap(map_t *map, int showrooms) {
|
||||||
int x,y;
|
int x,y;
|
||||||
cell_t *cell;
|
cell_t *cell;
|
||||||
char ch;
|
char ch;
|
||||||
|
@ -3694,8 +3720,16 @@ printf("dump of map '%s' (%d x %d):\n",map->name, map->w, map->h);
|
||||||
for (x = 0; x < map->w; x++) {
|
for (x = 0; x < map->w; x++) {
|
||||||
cell = getcellat(map, x, y);
|
cell = getcellat(map, x, y);
|
||||||
ch = cell->type->glyph.ch;
|
ch = cell->type->glyph.ch;
|
||||||
if ((ch == '.') && cell->filled) {
|
if (ch == '.') {
|
||||||
ch = 'o';
|
if (showrooms && isroom(cell)) {
|
||||||
|
ch = '0' + getroomid(cell);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ch == '.') {
|
||||||
|
if (cell->filled) {
|
||||||
|
ch = 'o';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dblog_nocr("%c",ch);
|
dblog_nocr("%c",ch);
|
||||||
}
|
}
|
||||||
|
@ -4455,7 +4489,7 @@ cell_t *getrandomroomcell(map_t *map, int roomid) {
|
||||||
if (getroomid(c) == roomid) {
|
if (getroomid(c) == roomid) {
|
||||||
ok = B_TRUE;
|
ok = B_TRUE;
|
||||||
} else if (roomid == ANYROOM) {
|
} else if (roomid == ANYROOM) {
|
||||||
if (isroom(c) != -1) {
|
if (isroom(c)) {
|
||||||
ok = B_TRUE;
|
ok = B_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
map.h
4
map.h
|
@ -16,7 +16,7 @@ int autodoors(map_t *map, int roomid, int minx, int miny, int maxx, int maxy, in
|
||||||
int cellhaslos(cell_t *c1, cell_t *dest);
|
int cellhaslos(cell_t *c1, cell_t *dest);
|
||||||
void clearcell(cell_t *c);
|
void clearcell(cell_t *c);
|
||||||
void clearcell_exceptflags(cell_t *c, ...);
|
void clearcell_exceptflags(cell_t *c, ...);
|
||||||
int dowaterspread(cell_t *c);
|
int doelementspread(cell_t *c);
|
||||||
int fix_reachability(map_t *m);
|
int fix_reachability(map_t *m);
|
||||||
int fix_unreachable_cell(cell_t *badcell);
|
int fix_unreachable_cell(cell_t *badcell);
|
||||||
void floodfill(cell_t *startcell);
|
void floodfill(cell_t *startcell);
|
||||||
|
@ -59,7 +59,7 @@ int createroom(map_t *map, int roomid, int overrideminw, int overrideminh, int x
|
||||||
int createvault(map_t *map, int roomid, vault_t *v, int *retw, int *reth, int *retx, int *rety);
|
int createvault(map_t *map, int roomid, vault_t *v, int *retw, int *reth, int *retx, int *rety);
|
||||||
int dirtox(int dt, int dir);
|
int dirtox(int dt, int dir);
|
||||||
int dirtoy(int dt, int dir);
|
int dirtoy(int dt, int dir);
|
||||||
void dumpmap(map_t *map);
|
void dumpmap(map_t *map, int showrooms);
|
||||||
void explodesinglecell(cell_t *c, int dam, int killwalls, object_t *o, cell_t *centre);
|
void explodesinglecell(cell_t *c, int dam, int killwalls, object_t *o, cell_t *centre);
|
||||||
void explodecells(cell_t *c, int dam, int killwalls, object_t *o, int range, int dirtype, int wantannounce);
|
void explodecells(cell_t *c, int dam, int killwalls, object_t *o, int range, int dirtype, int wantannounce);
|
||||||
celltype_t *findcelltype(enum CELLTYPE cid);
|
celltype_t *findcelltype(enum CELLTYPE cid);
|
||||||
|
|
4
nexus.c
4
nexus.c
|
@ -1470,8 +1470,8 @@ void timeeffectsworld(map_t *map, int updategametime) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// water spreads...
|
// water/fire spreads...
|
||||||
if (dowaterspread(c) && haslos(player, c)) {
|
if (doelementspread(c) && haslos(player, c)) {
|
||||||
needredraw = B_TRUE;
|
needredraw = B_TRUE;
|
||||||
}
|
}
|
||||||
} // end if c
|
} // end if c
|
||||||
|
|
39
objects.c
39
objects.c
|
@ -89,21 +89,27 @@ enum OBCLASS sortorder[] = {
|
||||||
|
|
||||||
|
|
||||||
char *techadjective[] = {
|
char *techadjective[] = {
|
||||||
|
"bizzare",
|
||||||
"crazy",
|
"crazy",
|
||||||
|
"curious",
|
||||||
"mysterious",
|
"mysterious",
|
||||||
"odd",
|
"odd",
|
||||||
|
"peculiar",
|
||||||
"strange",
|
"strange",
|
||||||
"weird",
|
"weird",
|
||||||
"",
|
"",
|
||||||
};
|
};
|
||||||
char *technoun[] = {
|
char *technoun[] = {
|
||||||
|
"apparatus",
|
||||||
"contraption",
|
"contraption",
|
||||||
"device",
|
"device",
|
||||||
"doodad",
|
"doodad",
|
||||||
"doohickey",
|
"doohickey",
|
||||||
"gadget",
|
"gadget",
|
||||||
"thing",
|
"gizmo",
|
||||||
|
"thingamajig",
|
||||||
"object",
|
"object",
|
||||||
|
"widget",
|
||||||
"",
|
"",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1080,6 +1086,13 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int wantlinkholes
|
||||||
changemat(o, wantdiffmat);
|
changemat(o, wantdiffmat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// extra chance of bone items being cursed
|
||||||
|
if (o->type->material->id == MT_BONE) {
|
||||||
|
if (pctchance(15)) {
|
||||||
|
o->blessed = B_CURSED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// fill in sign text
|
// fill in sign text
|
||||||
if (signtext) {
|
if (signtext) {
|
||||||
addflag(o->flags, F_SIGNTEXT, NA, NA, NA, signtext);
|
addflag(o->flags, F_SIGNTEXT, NA, NA, NA, signtext);
|
||||||
|
@ -5027,7 +5040,7 @@ char *real_getrandomob(map_t *map, char *buf, int cond, int cval, int forcedepth
|
||||||
pluralname = strdup(ot->name);
|
pluralname = strdup(ot->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// blessed or cursed? 15% chance each way
|
// chance to be blessed or cursed? 15% chance each way
|
||||||
strcpy(cursestr, "");
|
strcpy(cursestr, "");
|
||||||
if (!hasflag(ot->flags, F_NOBLESS)) {
|
if (!hasflag(ot->flags, F_NOBLESS)) {
|
||||||
int num;
|
int num;
|
||||||
|
@ -5298,12 +5311,12 @@ int getthrowdam(object_t *o) {
|
||||||
if (f) {
|
if (f) {
|
||||||
dam = f->val[0];
|
dam = f->val[0];
|
||||||
} else {
|
} else {
|
||||||
// base damage is = kilograms.
|
// base damage is = kilograms/5.
|
||||||
// ie. 1 kg object does 1 damage
|
// ie. 1 kg object does 0 damage
|
||||||
// ie. 5 kg object does 5 damage
|
// ie. 5 kg object does 1 damage
|
||||||
// ie. 100 kg object does 100 damage (person)
|
// ie. 100 kg object does 20 damage (person)
|
||||||
// ie. 1 tonne object does 1000 damage (car)
|
// ie. 1 tonne object does 200 damage (car)
|
||||||
dam = ceil((double)getobunitweight(o));
|
dam = ceil((double)getobunitweight(o)) / 2;
|
||||||
// missile objects do extra damage
|
// missile objects do extra damage
|
||||||
if (hasflag(o->flags, F_THROWMISSILE)) {
|
if (hasflag(o->flags, F_THROWMISSILE)) {
|
||||||
dam *= 2;
|
dam *= 2;
|
||||||
|
@ -5451,6 +5464,14 @@ object_t *hasobofclass(obpile_t *op, enum OBCLASS cid) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object_t *hasobofmaterial(obpile_t *op, enum MATERIAL mid) {
|
||||||
|
object_t *o;
|
||||||
|
for (o = op->first ; o ; o = o->next) {
|
||||||
|
if (o->type->material->id == mid) return o;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
int hasobmod(object_t *o, obmod_t *om) {
|
int hasobmod(object_t *o, obmod_t *om) {
|
||||||
flag_t *omf;
|
flag_t *omf;
|
||||||
int found = B_TRUE;
|
int found = B_TRUE;
|
||||||
|
@ -6137,6 +6158,8 @@ int isthrownmissile(object_t *o) {
|
||||||
int isweapon(object_t *o) {
|
int isweapon(object_t *o) {
|
||||||
if (o->type->obclass->id == OC_WEAPON) {
|
if (o->type->obclass->id == OC_WEAPON) {
|
||||||
return B_TRUE;
|
return B_TRUE;
|
||||||
|
} else if (hasflag(o->flags, F_DAM)) {
|
||||||
|
return B_TRUE;
|
||||||
}
|
}
|
||||||
return B_FALSE;
|
return B_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,6 +139,7 @@ object_t *hasknownob(obpile_t *op, enum OBTYPE oid);
|
||||||
object_t *hasob(obpile_t *op, enum OBTYPE oid);
|
object_t *hasob(obpile_t *op, enum OBTYPE oid);
|
||||||
object_t *hasobletter(obpile_t *op, char letter);
|
object_t *hasobletter(obpile_t *op, char letter);
|
||||||
object_t *hasobofclass(obpile_t *op, enum OBCLASS cid);
|
object_t *hasobofclass(obpile_t *op, enum OBCLASS cid);
|
||||||
|
object_t *hasobofmaterial(obpile_t *op, enum MATERIAL mid);
|
||||||
int hasobmod(object_t *o, obmod_t *om);
|
int hasobmod(object_t *o, obmod_t *om);
|
||||||
object_t *hasobmulti(obpile_t *op, enum OBTYPE *oid, int noids);
|
object_t *hasobmulti(obpile_t *op, enum OBTYPE *oid, int noids);
|
||||||
object_t *hasobwithflag(obpile_t *op, enum FLAG flagid);
|
object_t *hasobwithflag(obpile_t *op, enum FLAG flagid);
|
||||||
|
|
23
spell.c
23
spell.c
|
@ -7621,9 +7621,23 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((power < 5) || !isplayer(caster)) {
|
if ((power < 5) || !isplayer(caster)) {
|
||||||
// random
|
c = NULL;
|
||||||
while (!c || c->type->solid || haslf(c)) {
|
if (blessed == B_CURSED) {
|
||||||
c = getrandomcell(target->cell->map);
|
lifeform_t *lf;
|
||||||
|
// next to a random monster
|
||||||
|
for (lf = target->cell->map->lf ; lf ; lf = lf->next) {
|
||||||
|
if (areenemies(lf, target)) {
|
||||||
|
c = getrandomadjcell(lf->cell, WE_WALKABLE, B_NOEXPAND);
|
||||||
|
if (c) break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!c) {
|
||||||
|
// random
|
||||||
|
while (!c || c->type->solid || haslf(c)) {
|
||||||
|
c = getrandomcell(target->cell->map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (power >= 8) {
|
} else if (power >= 8) {
|
||||||
// controlled
|
// controlled
|
||||||
|
@ -9000,6 +9014,9 @@ int getspellpower(lifeform_t *lf, enum OBTYPE spellid) {
|
||||||
// +/- 1 for iq
|
// +/- 1 for iq
|
||||||
power += (getstatmod(lf, A_IQ) / 50);
|
power += (getstatmod(lf, A_IQ) / 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// plus your school skill
|
||||||
|
power += schoolskill;
|
||||||
} else {
|
} else {
|
||||||
// for monsters, just based on hitdice:
|
// for monsters, just based on hitdice:
|
||||||
power = gethitdice(lf);
|
power = gethitdice(lf);
|
||||||
|
|
Loading…
Reference in New Issue