- [+] entering water should put out fires even if you can't swim.
- [+] problem: - [+] i get teleported into deep water then - [+] you are drowning - [+] you are drowning - [+] you are drowning - [+] you die. - [+] was calling checkfordrowning() too often. - [+] also prevent random teleports into dangerous cells - [+] accuracy bonus for weapon skill wasn't working!! fixed. - [+] remove damage done to armour - [+] rename greater mummy to mummy king - [+] most robots shouldn't be able to use stairs. F_NOSTAIRS - [+] most undead don't use stairs either - [+] rename "donate" to"offer an item" - [+] high speech or racial knowledge should list possible items when you offer - [+] insert this at adept level - [+] bump everything else upwards - [+] when offering objects, use SPEECH check, not MORALE. - [+] felix shoud like offering bribes - [+] yumi should like calming people down
This commit is contained in:
parent
0a06d06374
commit
653b5ac864
2
attack.c
2
attack.c
|
@ -28,13 +28,11 @@ int applyarmourdamage(lifeform_t *lf, object_t *wep, int dam, enum DAMTYPE damty
|
|||
object_t *armour = NULL;
|
||||
int damtaken = 0;
|
||||
|
||||
/*
|
||||
// first of all, only apply some of the damage
|
||||
dam /= 2;
|
||||
if (dam == 0) {
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
// special case - missiles always hit flak jacket
|
||||
if (damtype == DT_PROJECTILE) {
|
||||
|
|
32
data.c
32
data.c
|
@ -5856,7 +5856,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_ARMOURRATING, 3, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_EQUIPCONFER, F_ARMOURPENALTY, 5, 5, NULL);
|
||||
addflag(lastot->flags, F_EQUIPCONFER, F_DTRESIST, DT_COLD, NA, NULL);
|
||||
addflag(lastot->flags, F_OBHP, 20, 20, NA, NULL);
|
||||
addflag(lastot->flags, F_OBHP, 30, 30, NA, NULL);
|
||||
addflag(lastot->flags, F_ATTREQ, A_STR, 15, NA, NULL);
|
||||
addflag(lastot->flags, F_CRITPROTECTION, 80, NA, NA, NULL);
|
||||
|
||||
|
@ -8298,6 +8298,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_FEET, "wheels");
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_VERYRARE, NULL);
|
||||
|
@ -8328,6 +8329,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_FEET, "wheels");
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_LOW, NA, NULL);
|
||||
|
@ -8359,6 +8361,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 1, NA, 4, NULL);
|
||||
|
@ -8382,6 +8385,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_LOW, NA, NULL);
|
||||
|
@ -8410,6 +8414,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 0, 1, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_LOW, NA, NULL);
|
||||
|
@ -8503,6 +8508,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_ADEPT, NA, NULL);
|
||||
addrace(R_BEGGAR, "beggar", 50, '@', C_BROWN, MT_FLESH, RC_HUMANOID, "Beggar roam the streets of towns, pleading for any spare cash.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_VILLAGE, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
|
@ -8812,6 +8818,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_GODLIKES, NA, NA, NA, "backstabbing");
|
||||
addflag(lastrace->flags, F_GODLIKES, NA, NA, NA, "stealing items");
|
||||
addflag(lastrace->flags, F_GODLIKES, NA, NA, NA, "lockpicking");
|
||||
addflag(lastrace->flags, F_GODLIKES, NA, NA, NA, "bribery");
|
||||
addflag(lastrace->flags, F_GODDISLIKES, NA, NA, NA, "purchasing items");
|
||||
addflag(lastrace->flags, F_GODDISLIKES, NA, NA, NA, "giving away or discarding money");
|
||||
addflag(lastrace->flags, F_GODDISLIKES, NA, NA, NA, "opening locked objects through force");
|
||||
|
@ -9037,6 +9044,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_GODPOISON, B_FALSE, 25, NA, NULL);
|
||||
addflag(lastrace->flags, F_GODLIKES, NA, NA, NA, "allowing fleeing creatures to escape");
|
||||
addflag(lastrace->flags, F_GODLIKES, NA, NA, NA, "knocking enemies unconscious");
|
||||
addflag(lastrace->flags, F_GODLIKES, NA, NA, NA, "calming others");
|
||||
addflag(lastrace->flags, F_GODLIKES, NA, NA, NA, "acts of charity");
|
||||
addflag(lastrace->flags, F_GODDISLIKES, NA, NA, NA, "attacking the innocent or helpless");
|
||||
addflag(lastrace->flags, F_GODDISLIKES, NA, NA, NA, "sneak attacks");
|
||||
|
@ -11196,6 +11204,7 @@ void initrace(void) {
|
|||
|
||||
addrace(R_OOZEGREY, "sizzling slime", 10, 'j', C_GREEN, MT_SLIME, RC_SLIME, "Exactly what it sounds like - a small lump of green ooze. Green, acidic ooze.");
|
||||
addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "puddle of slime");
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, 80, RR_UNCOMMON, NULL);
|
||||
|
@ -14818,6 +14827,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_VLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NUMAPPEAR, 1, 3, NA, NULL);
|
||||
|
@ -14869,6 +14879,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "5-20 bones");
|
||||
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 1, NA, NA, NULL);
|
||||
|
@ -14908,6 +14919,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_EXLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "5-20 flaming bones");
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
|
@ -14939,6 +14951,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_LEVITATING, B_TRUE, NA, NA, NULL);
|
||||
|
@ -15030,6 +15043,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
|
@ -15134,6 +15148,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_LTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_VLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_VLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL);
|
||||
|
@ -15156,7 +15171,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
|
||||
|
||||
addrace(R_MUMMYG, "greater mummy", 54, 'M', C_MAGENTA, MT_FLESH, RC_UNDEAD, "A hugely muscled rotting figure, wearing priestly garments.");
|
||||
addrace(R_MUMMYG, "mummy king", 54, 'M', C_MAGENTA, MT_FLESH, RC_UNDEAD, "A hugely muscled rotting figure, wearing priestly garments.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_VHIGH, NA, NULL);
|
||||
|
@ -15777,9 +15792,10 @@ void initskills(void) {
|
|||
addskilldesc(SK_SPEECH, PR_NOVICE, "^gYou can now question people about nearby traps or monsters.", B_TRUE);
|
||||
addskilldesc(SK_SPEECH, PR_NOVICE, "^gYou can now offer gems as payment in shops.", B_TRUE);
|
||||
addskilldesc(SK_SPEECH, PR_BEGINNER, "^gYou can now question people about items on the current level.", B_TRUE);
|
||||
addskilldesc(SK_SPEECH, PR_ADEPT, "^gYou can now trade knowledge and spells with other people.", B_TRUE);
|
||||
addskilldesc(SK_SPEECH, PR_SKILLED, "^gYou can now persuade people to join to as followers.", B_TRUE);
|
||||
addskilldesc(SK_SPEECH, PR_EXPERT, "^gYou can now choose which skills to learn from people.", B_TRUE);
|
||||
addskilldesc(SK_SPEECH, PR_ADEPT, "^gYou can now recognise which items others desire.", B_TRUE);
|
||||
addskilldesc(SK_SPEECH, PR_SKILLED, "^gYou can now trade knowledge and spells with other people.", B_TRUE);
|
||||
addskilldesc(SK_SPEECH, PR_EXPERT, "^gYou can now persuade people to join to as followers.", B_TRUE);
|
||||
addskilldesc(SK_SPEECH, PR_MASTER, "^gYou can now choose which skills to learn from people.", B_TRUE);
|
||||
addskill(SK_PERCEPTION, "Perception", "Your ability to notice hidden details, from simple footprints to sinister traps.", 50);
|
||||
addskilldesc(SK_PERCEPTION, PR_INEPT, "- At higher levels this skill will also let you obscure your own tracks.", B_TRUE);
|
||||
addskilldesc(SK_PERCEPTION, PR_NOVICE, "^gYou can now see footprints.^n", B_TRUE);
|
||||
|
@ -15991,13 +16007,13 @@ void initskills(void) {
|
|||
|
||||
if (isweaponskill(sk->id) || (sk->id == SK_UNARMED)) {
|
||||
addskilldesc(sk->id, PR_INEPT, "This skill increases your accuracy and damage when using matching weapons.", B_FALSE);
|
||||
addskilldesc(sk->id, PR_NOVICE, "^g-2 accuracy penalty.^n", B_FALSE);
|
||||
if (sk->id == SK_CLUBS) addskilldesc(sk->id, PR_NOVICE, "^gYou gain the 'merciful fighting' ability.^n", B_FALSE);
|
||||
addskilldesc(sk->id, PR_BEGINNER, "^g-1 accuracy penalty^n", B_FALSE);
|
||||
addskilldesc(sk->id, PR_BEGINNER, "^g+1 accuracy.^n", B_FALSE);
|
||||
addskilldesc(sk->id, PR_BEGINNER, "^gYou gain the 'wild strike' ability.^n", B_FALSE);
|
||||
addskilldesc(sk->id, PR_ADEPT, "^g+10% damage bonus.^n", B_FALSE);
|
||||
addskilldesc(sk->id, PR_ADEPT, "^g+2 accuracy.^n", B_FALSE);
|
||||
addskilldesc(sk->id, PR_ADEPT, "^gYou can now alter your attack style to deal different damage types^n.", B_FALSE);
|
||||
addskilldesc(sk->id, PR_SKILLED, "^g+2 accuracy, +20% damage bonus.^n", B_FALSE);
|
||||
addskilldesc(sk->id, PR_SKILLED, "^g+3 accuracy, +20% damage bonus.^n", B_FALSE);
|
||||
addskilldesc(sk->id, PR_SKILLED, "^gYou can now block certain attacks with this kind of weapon.^n", B_FALSE);
|
||||
addskilldesc(sk->id, PR_EXPERT, "^g+4 accuracy, +30% damage bonus.^n", B_FALSE);
|
||||
addskilldesc(sk->id, PR_MASTER, "^g+6 accuracy, +40%% damage bonus, combination strike ability.^n", B_FALSE);
|
||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
1
defs.h
1
defs.h
|
@ -2838,6 +2838,7 @@ enum FLAG {
|
|||
F_ACCURACYMOD, // modify your accuracy by val0
|
||||
F_PLAYABLE, // player can select to be this race.
|
||||
F_RACESLAY, // deal 4x damage to creatures of raceclass v0
|
||||
F_NOSTAIRS, // lf can't use stairs
|
||||
F_VAMPIRIC, // when on a lf:
|
||||
// successful bite attacks from this lf will heal it
|
||||
// when on an object
|
||||
|
|
100
io.c
100
io.c
|
@ -3984,6 +3984,7 @@ void doclose(void) {
|
|||
void docomms(lifeform_t *lf) {
|
||||
cell_t *where = NULL;
|
||||
int i;
|
||||
int askforob = B_FALSE;
|
||||
char buf[BUFLEN];
|
||||
char lfname[BUFLEN];
|
||||
char ch;
|
||||
|
@ -4049,7 +4050,7 @@ void docomms(lifeform_t *lf) {
|
|||
} else if (ishirable(lf) ) {
|
||||
if (lfhasflag(lf, F_ISPRISONER)) {
|
||||
addchoice(&prompt, 'j', "Join me, and I will help you escape.", NULL, NULL, NULL);
|
||||
} else if (getskill(player, SK_SPEECH) >= PR_SKILLED) {
|
||||
} else if (getskill(player, SK_SPEECH) >= PR_EXPERT) {
|
||||
addchoice(&prompt, 'j', "Join me on my quest!", NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -4064,7 +4065,7 @@ void docomms(lifeform_t *lf) {
|
|||
addchoice(&prompt, 'i', "What can you tell me about this area?", NULL, NULL, NULL);
|
||||
}
|
||||
if (!areallies(player, lf)) {
|
||||
if (slev >= PR_ADEPT) {
|
||||
if (slev >= PR_SKILLED) {
|
||||
addchoice(&prompt, 'k', "Care to trade knowledge?", NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -4074,7 +4075,7 @@ void docomms(lifeform_t *lf) {
|
|||
if (areenemies(player, lf)) {
|
||||
addchoice(&prompt, 'm', "Have mercy!", NULL, NULL, NULL);
|
||||
}
|
||||
// if yo are allies, use 'trade items' instead
|
||||
// if you are allies, use 'trade items' instead
|
||||
if (!areallies(player, lf)) {
|
||||
if (isgod(lf)) {
|
||||
// may only donate the godstone
|
||||
|
@ -4083,10 +4084,10 @@ void docomms(lifeform_t *lf) {
|
|||
char buf[BUFLEN],obname[BUFLEN];
|
||||
getobname(godstone, obname, 1);
|
||||
sprintf(buf, "(offer %s)", obname);
|
||||
addchoice(&prompt, 'd', buf, NULL, NULL, NULL);
|
||||
addchoice(&prompt, 'o', buf, NULL, NULL, NULL);
|
||||
}
|
||||
} else {
|
||||
addchoice(&prompt, 'd', "(donate an item)", NULL, NULL, NULL);
|
||||
addchoice(&prompt, 'o', "(offer a bribe)", NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4173,14 +4174,48 @@ void docomms(lifeform_t *lf) {
|
|||
aigoto(lf, c, MR_OTHER, NULL, DEF_AIFOLLOWTIME);
|
||||
}
|
||||
break;
|
||||
case 'd': // donate
|
||||
case 'o': // donate
|
||||
// giving godstone to a god?
|
||||
if (godstone) {
|
||||
o = godstone;
|
||||
count = 1;
|
||||
askforob = B_FALSE;
|
||||
} else if ( (getskill(player, SK_SPEECH) >= PR_ADEPT) ||
|
||||
(getlorelevel(player, lf->race->raceclass->id) >= PR_BEGINNER)) {
|
||||
object_t *oo;
|
||||
char ch;
|
||||
count = 1;
|
||||
// ask what to give, but only include items they want.
|
||||
snprintf(buf, BUFLEN, "What will you offer to %s?",lfname);
|
||||
initprompt(&prompt, buf);
|
||||
for (oo = player->pack->first ; oo ; oo = oo->next) {
|
||||
char ooname[BUFLEN];
|
||||
char why[BUFLEN];
|
||||
getobname(oo, ooname, oo->amt);
|
||||
if (getoboffermod(oo,lf, why) > 0) {
|
||||
sprintf(buf, "%s (%s)", ooname, why);
|
||||
addchoice(&prompt, oo->letter, buf, NULL, oo, NULL);
|
||||
}
|
||||
}
|
||||
addchoice(&prompt, '/', "(something else)", NULL, NULL, NULL);
|
||||
addchoice(&prompt, '-', "(nothing)", NULL, NULL, NULL);
|
||||
ch = getchoice(&prompt);
|
||||
if (ch == '-') {
|
||||
o = NULL;
|
||||
askforob = B_FALSE;
|
||||
} else if (ch == '/') {
|
||||
askforob = B_TRUE;
|
||||
} else {
|
||||
o = (object_t *)prompt.result;
|
||||
askforob = B_FALSE;
|
||||
}
|
||||
} else {
|
||||
askforob = B_TRUE;
|
||||
}
|
||||
|
||||
if (askforob) {
|
||||
// ask what to give
|
||||
snprintf(buf, BUFLEN, "What will you give to %s?",lfname);
|
||||
snprintf(buf, BUFLEN, "What will you offer to %s?",lfname);
|
||||
o = askobject(player->pack, buf, NULL, &count, '\0', AO_NONE);
|
||||
}
|
||||
if (o) {
|
||||
|
@ -4207,10 +4242,16 @@ void docomms(lifeform_t *lf) {
|
|||
msg("You give %s to %s.", buf, lfname);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
msg("Cancelled.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (givenob) {
|
||||
if ((lf->race->id == R_BEGGAR) && (givenob->type->id == OT_GOLD)) {
|
||||
int wasgold = B_FALSE;
|
||||
if (givenob->type->id == OT_GOLD) wasgold = B_TRUE;
|
||||
|
||||
if ((lf->race->id == R_BEGGAR) && wasgold) {
|
||||
// begger effects
|
||||
if (!countmoney(lf->pack)) {
|
||||
i = rnd(1,100);
|
||||
|
@ -4276,35 +4317,22 @@ void docomms(lifeform_t *lf) {
|
|||
// chance of calming hostile intelligen, monsters
|
||||
if ((getallegiance(lf) == AL_HOSTILE) && (iqb >= IQ_ANIMAL) && cansee(lf, player)) {
|
||||
int mod = 0;
|
||||
int covets = B_FALSE;
|
||||
// healing object and they were bleeding?
|
||||
if ((islowhp(lf) || isbleeding(lf)) && hasflag(givenob->flags, F_AIHEALITEM)) {
|
||||
if (aiobok(lf, givenob, lf)) {
|
||||
mod += 3;
|
||||
}
|
||||
}
|
||||
// object which ai wants?
|
||||
if (aiwants(lf, givenob, &covets)) {
|
||||
if (covets) {
|
||||
mod += 5;
|
||||
} else {
|
||||
mod += 3;
|
||||
}
|
||||
}
|
||||
mod = getoboffermod(givenob,lf, NULL);
|
||||
|
||||
// only get speech bonus if humanoid (ie they can understand you)
|
||||
if (cantalk(lf)) {
|
||||
mod += getskill(player, SK_SPEECH);
|
||||
if (!cantalk(lf)) {
|
||||
// this will counteract the bonus given in skillcheck()
|
||||
mod -= (getskill(player, SK_SPEECH)*2);
|
||||
}
|
||||
|
||||
if (skillcheckvs(player, SC_MORALE, mod, lf, SC_MORALE, 0)) {
|
||||
if (skillcheckvs(player, SC_SPEECH, mod, lf, SC_SPEECH, 0)) {
|
||||
// if humanoid+intelligent, say thanks.
|
||||
if (cantalk(lf)) sayphrase(lf, SP_THANKS, SV_TALK, NA, NULL);
|
||||
// calm down
|
||||
makepeaceful(lf, player);
|
||||
// chance of becoming a pet if you gave something other than
|
||||
// money
|
||||
if (givenob->type->id != OT_GOLD) {
|
||||
if (!wasgold) {
|
||||
f = lfhasflag(lf, F_TAMABLE);
|
||||
if (f && skillcheck(lf, SC_SPEECH, f->val[0], mod + alignmod)) {
|
||||
petify(lf, player);
|
||||
|
@ -4316,8 +4344,14 @@ void docomms(lifeform_t *lf) {
|
|||
sayphrase(lf, SP_RECRUIT_ACCEPT, SV_TALK, NA, p);
|
||||
}
|
||||
}
|
||||
pleasegodmaybe(R_GODTHIEVES, 10);
|
||||
}
|
||||
} else {
|
||||
// yumi always likes giving things away, as long as
|
||||
// don't keep any for yourself.
|
||||
if (count == givenob->amt) {
|
||||
pleasegodmaybe(R_GODMERCY, 2);
|
||||
}
|
||||
pleasegodmaybe(R_GODMERCY, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5619,7 +5653,7 @@ char *makedesc_ob(object_t *o, char *retbuf) {
|
|||
f = hasflag(o->flags, F_ACCURACY);
|
||||
if (f) {
|
||||
int acc,accnum;
|
||||
acc = getobaccuracy(o, NULL);
|
||||
acc = getobaccuracy(o, NULL, B_FALSE);
|
||||
accnum = getaccuracynum(acc);
|
||||
sprintf(buf, "@It has a base accuracy of %c%d (%s).\n",(accnum < 0) ? '-' : '+', abs(accnum), getaccuracyname(acc));
|
||||
strncat(retbuf, buf, HUGEBUFLEN);
|
||||
|
@ -5785,12 +5819,12 @@ char *makedesc_ob(object_t *o, char *retbuf) {
|
|||
f = hasflag(o->flags, F_ACCURACY);
|
||||
if (f) {
|
||||
int acc,accnum;
|
||||
acc = getobaccuracy(o, NULL);
|
||||
acc = getobaccuracy(o, NULL, B_FALSE);
|
||||
accnum = getaccuracynum(acc);
|
||||
sprintf(buf, "@It has an accuracy modifier of %c%d (%s)",(accnum < 0) ? '-' : '+', abs(accnum) , getaccuracyname(acc));
|
||||
if (compareob && hasflag(compareob->flags, F_ACCURACY)) {
|
||||
int cacc,caccnum,diff;
|
||||
cacc = getobaccuracy(compareob, NULL);
|
||||
cacc = getobaccuracy(compareob, NULL, B_FALSE);
|
||||
caccnum = getaccuracynum(cacc);
|
||||
diff = accnum - caccnum;
|
||||
if (diff == 0) {
|
||||
|
@ -12597,6 +12631,9 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
wrapprint(mainwin, &y, &x, 0, buf);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (showall || (lorelev >= PR_BEGINNER) || (getskill(player, SK_SPEECH) >= PR_ADEPT)) {
|
||||
// wants/desires
|
||||
if (!isplayer(lf)) {
|
||||
getflags(lf->flags, retflag, &nretflags, F_WANTS, F_WANTSOBFLAG, F_WANTSBETTERWEP, F_WANTSBETTERARM, F_NONE);
|
||||
|
@ -12630,7 +12667,6 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// show intrinsics
|
||||
|
|
24
lf.c
24
lf.c
|
@ -5642,7 +5642,7 @@ int flee(lifeform_t *lf) {
|
|||
|
||||
// can we flee via stairs?
|
||||
stairs = hasobwithflag(lf->cell->obpile, F_CLIMBABLE);
|
||||
if (stairs) {
|
||||
if (stairs && !lfhasflag(lf, F_NOSTAIRS)) {
|
||||
if (db) dblog("%s - trying to flee via %s", lfname, stairs->type->name);
|
||||
if (!usestairs(lf, stairs, B_TRUE, B_TRUE)) {
|
||||
return B_TRUE;
|
||||
|
@ -6230,7 +6230,7 @@ void getwhowillfollow(lifeform_t *lf, object_t *stairob, lifeform_t **adjally, i
|
|||
cell_t *c;
|
||||
c = getcellat(lf->cell->map, x, y);
|
||||
if (c && c->lf && (c->lf != lf)) {
|
||||
if (!isimmobile(c->lf) && !lfhasflag(c->lf, F_DOESNTMOVE)) {
|
||||
if (!isimmobile(c->lf) && !lfhasflag(c->lf, F_DOESNTMOVE) && !lfhasflag(c->lf, F_NOSTAIRS)) {
|
||||
int ok = B_FALSE;
|
||||
if (areallies(lf, c->lf) && haslof(c->lf->cell, lf->cell, LOF_NEED, NULL)) {
|
||||
// ally with a clear path to you (even if they can't see you, we assume
|
||||
|
@ -7352,7 +7352,7 @@ int getlfaccuracy(lifeform_t *lf, object_t *wep) {
|
|||
|
||||
// get weapon
|
||||
if (wep) {
|
||||
acc = getobaccuracy(wep, lf);
|
||||
acc = getobaccuracy(wep, lf, B_FALSE);
|
||||
} else {
|
||||
acc = 100; // innate attack
|
||||
}
|
||||
|
@ -13226,6 +13226,7 @@ void makepeaceful(lifeform_t *who, lifeform_t *causedby) {
|
|||
|
||||
if (causedby && isplayer(causedby)) {
|
||||
angergodmaybe(R_GODBATTLE, 5, GA_COWARD);
|
||||
pleasegodmaybe(R_GODMERCY, 10);
|
||||
}
|
||||
|
||||
addflag(who->flags, F_XPVAL, 0, NA, NA, NULL);
|
||||
|
@ -16337,9 +16338,9 @@ int recruit(lifeform_t *lf) {
|
|||
int result;
|
||||
int difficulty;
|
||||
int minmult,maxmult;
|
||||
// since you have to be at least speech=4(skilled) to ask someone to
|
||||
// join, add +8 to difficulty (pr_skilled * 2)
|
||||
difficulty = 25 + 8 + ((gettr(player) - gettr(lf))*2);
|
||||
// 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);
|
||||
|
||||
if (real_skillcheck(player, SC_SPEECH, difficulty, 0, &result)) {
|
||||
minmult = 10;
|
||||
|
@ -18016,7 +18017,7 @@ int real_skillcheck(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod, int *r
|
|||
attrib = (getskill(lf, SK_PERCEPTION)*2);
|
||||
break;
|
||||
case SC_SPEECH:
|
||||
attrib = getattr(lf, A_CHA)/5;
|
||||
attrib = (getattr(lf, A_CHA)/10) + (getattr(lf, A_IQ)/10);
|
||||
break;
|
||||
case SC_STEAL:
|
||||
attrib = (getskill(lf, SK_THIEVERY));
|
||||
|
@ -19372,13 +19373,10 @@ void startlfturn(lifeform_t *lf) {
|
|||
}
|
||||
|
||||
// for flags which can occur multiple times
|
||||
getflags(o->flags, retflag, &nretflags, F_DEEPWATER, F_WALKDAMBP, F_NONE);
|
||||
getflags(o->flags, retflag, &nretflags, F_WALKDAMBP, F_NONE);
|
||||
for (i = 0; i < nretflags; i++) {
|
||||
f = retflag[i];
|
||||
if ((f->id == F_DEEPWATER) && !isairborne(lf)) {
|
||||
checkfordrowning(lf, o);
|
||||
if (isdead(lf)) return;
|
||||
} else if (f->id == F_WALKDAMBP) {
|
||||
if (f->id == F_WALKDAMBP) {
|
||||
if (!isairborne(lf)) {
|
||||
object_t *armour;
|
||||
int dam;
|
||||
|
@ -20239,7 +20237,7 @@ int tradeknowledge(lifeform_t *lf) {
|
|||
// does lf have a skill which the player needs?
|
||||
getteachableskills(lf, player, poss, tradetype, &nposs);
|
||||
if (nposs) {
|
||||
if (getskill(player, SK_SPEECH) >= PR_EXPERT) {
|
||||
if (getskill(player, SK_SPEECH) >= PR_MASTER) {
|
||||
int i;
|
||||
// you can pick which one to learn.
|
||||
snprintf(buf, BUFLEN, "What would you like to learn from %s?",lfname);
|
||||
|
|
14
move.c
14
move.c
|
@ -1340,13 +1340,16 @@ int movelf(lifeform_t *lf, cell_t *newcell) {
|
|||
|
||||
f = hasflag(o->flags, F_DEEPWATER);
|
||||
if (f) {
|
||||
/*
|
||||
if (checkfordrowning(lf, o)) {
|
||||
didmsg = B_TRUE;
|
||||
if (isdead(lf)) return B_TRUE;
|
||||
}
|
||||
*/
|
||||
// did you just enter the water?
|
||||
if (!prewater) {
|
||||
if ((getobdepth(o, lf) >= DP_WAIST) && getskill(lf, SK_SWIMMING)) {
|
||||
if ((getobdepth(o, lf) >= DP_WAIST)) {
|
||||
if (getskill(lf, SK_SWIMMING)) {
|
||||
if (isplayer(lf)) {
|
||||
msg("You start swimming.");
|
||||
didmsg = B_TRUE;
|
||||
|
@ -1355,6 +1358,15 @@ int movelf(lifeform_t *lf, cell_t *newcell) {
|
|||
msg("%s starts swimming.", lfname);
|
||||
didmsg = B_TRUE;
|
||||
}
|
||||
} else {
|
||||
if (isplayer(lf)) {
|
||||
msg("You enter the water.");
|
||||
didmsg = B_TRUE;
|
||||
} else if (cansee(player, lf)) {
|
||||
msg("%s enters the water.", lfname);
|
||||
didmsg = B_TRUE;
|
||||
}
|
||||
}
|
||||
// put out fires
|
||||
extinguishlf(lf);
|
||||
|
||||
|
|
51
objects.c
51
objects.c
|
@ -3848,9 +3848,9 @@ int getcharges(object_t *o) {
|
|||
return amt;
|
||||
}
|
||||
|
||||
// return the base accuracy for the firearm 'wep', or for a throw if wep is null.
|
||||
// return the base accuracy for the weapon 'wep', or for a throw/unarmed attack if wep is null.
|
||||
// (ie. the accuracy for a range of 0).
|
||||
int getobaccuracy(object_t *wep, lifeform_t *weilder) {
|
||||
int getobaccuracy(object_t *wep, lifeform_t *weilder, int forthrow) {
|
||||
int acc;
|
||||
flag_t *f;
|
||||
|
||||
|
@ -3873,6 +3873,21 @@ int getobaccuracy(object_t *wep, lifeform_t *weilder) {
|
|||
acc += (getobbonus(wep, B_FALSE)*10);
|
||||
|
||||
}
|
||||
|
||||
if (weilder && !forthrow) {
|
||||
enum SKILLLEVEL weplev = PR_INEPT;
|
||||
// adjust for weapon skill
|
||||
weplev = getweaponskill(weilder, wep);
|
||||
switch (weplev) {
|
||||
case PR_BEGINNER: acc += 5; break;
|
||||
case PR_ADEPT: acc += 10; break;
|
||||
case PR_SKILLED: acc += 15; break;
|
||||
case PR_EXPERT: acc += 20; break;
|
||||
case PR_MASTER: acc += 30; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
return acc;
|
||||
}
|
||||
|
||||
|
@ -3901,6 +3916,32 @@ lifeform_t *getobcreatedby(object_t *o) {
|
|||
return creator;
|
||||
}
|
||||
|
||||
// returns the amount to adjust a skillcheck roll if you give object 'o' to lifeform 'lf'
|
||||
//
|
||||
// if 'why' is provided, it will be populated with the reason the monster wants it.
|
||||
int getoboffermod(object_t *o, lifeform_t *lf, char *why) {
|
||||
int mod = 0,covets = B_FALSE;
|
||||
if (why) strcpy(why, "");
|
||||
// healing object and they were bleeding?
|
||||
if ((islowhp(lf) || isbleeding(lf)) && hasflag(o->flags, F_AIHEALITEM)) {
|
||||
if (aiobok(lf, o, lf)) {
|
||||
mod += 3;
|
||||
if (why) strcpy(why, "healing object");
|
||||
}
|
||||
}
|
||||
// object which ai wants?
|
||||
if (aiwants(lf, o, &covets)) {
|
||||
if (covets) {
|
||||
mod += 5;
|
||||
if (why) strcpy(why, "greatly desired object");
|
||||
} else {
|
||||
mod += 3;
|
||||
if (why) strcpy(why, "desired object");
|
||||
}
|
||||
}
|
||||
return mod;
|
||||
}
|
||||
|
||||
int getobpoints(object_t *o) {
|
||||
if (hasflag(o->flags, F_NOPOINTS)) {
|
||||
return 0;
|
||||
|
@ -6745,8 +6786,8 @@ int isbetterwepthan(object_t *a, object_t *b, lifeform_t *owner) {
|
|||
modifybetterwepdam(b, owner, &damb);
|
||||
|
||||
// modify with accuracy
|
||||
acca = getobaccuracy(a, owner);
|
||||
accb = getobaccuracy(b, owner);
|
||||
acca = getobaccuracy(a, owner, B_FALSE);
|
||||
accb = getobaccuracy(b, owner, B_FALSE);
|
||||
|
||||
if (db) {
|
||||
msg("PREACC:a=%s:%d(acc %d), b=%s:%d(acc %d)",namea,dama,(int)acca, nameb, damb,(int)accb);
|
||||
|
@ -14647,7 +14688,7 @@ int getmissileaccuracy(lifeform_t *thrower, cell_t *where, object_t *missile, ob
|
|||
|
||||
// base accuracy to hit your own cell
|
||||
// (firearm == null) means we are throwing.
|
||||
acc = getobaccuracy(firearm, thrower);
|
||||
acc = getobaccuracy(firearm, thrower, B_TRUE);
|
||||
|
||||
// for each cell travelled after the first, lower accuracy, based on skill.
|
||||
slev = getskill(thrower, whichskill);
|
||||
|
|
|
@ -82,9 +82,10 @@ objecttype_t *getlinkspell(object_t *o);
|
|||
enum COLOUR getmaterialcolour(enum MATERIAL mat );
|
||||
enum MATSTATE getmaterialstate(enum MATERIAL mat);
|
||||
int getmissileaccuracy(lifeform_t *thrower, cell_t *where, object_t *missile, object_t *firearm, flag_t *tkthrow);
|
||||
int getobaccuracy(object_t *wep, lifeform_t *weilder);
|
||||
int getobaccuracy(object_t *wep, lifeform_t *weilder, int forthrow);
|
||||
int getobbonus(object_t *o, int onlyknown);
|
||||
lifeform_t *getobcreatedby(object_t *o);
|
||||
int getoboffermod(object_t *o, lifeform_t *lf, char *why);
|
||||
int getobpoints(object_t *o);
|
||||
skill_t *getobskill(flagpile_t *fp);
|
||||
enum LFSIZE getobsize(object_t *o);
|
||||
|
|
2
spell.c
2
spell.c
|
@ -10528,7 +10528,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
|
||||
if (!c) {
|
||||
// random
|
||||
while (!c || c->type->solid || haslf(c)) {
|
||||
while (!c || !cellwalkable(target, c, NULL) || celldangerous(target, c, B_FALSE, NULL)) {
|
||||
c = getrandomcell(target->cell->map);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue