- [+] replace causesvomit with vomitob
- [+] monsters shouldn't weild lit torches - [+] maybe reduce the damage that they do? - [+] change allomancy to work like psionics - [+] change colour of carpetted floor? to what though? red. - [+] amberon should only accept sacrifice of KNOWN cursed objects! - [+] infinite loop when going into a sewer. fix_reachability keeps failing. - [+] in linkexit() - [+] startdir getitng set to DC_E! should be orthog only! - [+] because forcedir is DC_E! - [+] Mummy? made of paper (ie flammable). rotting touch. curse. corpsetype = sand or ash, and blank paper. * [+] inflicts rotting disease "mummy's curse" - [+] can cast cause fear (but not very often, 50 turns or so) - [+] vuln to fire (1-8) - [+] vuln to holy (2-8) - [+] greater mummy - [+] more hd - [+] lots more damage - [+] stronger fear spell - [+] no vuln to anything - [+] magic resistance - [+] priest spells. - death disease evil revenge, guardianship. some new ones: - [+] rot: - [+] instead of losing hp, lose str+fit and just no healing ? - [+] wyvern - [+] wyrm without breath weapon - [+] ice demon - [+] shardshot, power 3 (ie 3d6) - [+] snow troll - [+] implement - [+] - frostbite, range 1 "exhales a freezing wind" - [+] griddler, small demon, fire dam attack, heat metal ability, carries a permenantly red-hot weapon - [+] curse (curses equipped objects) - [+] applys a curse to 1-power equipped objects. - [+] applies a -1 penalty too, if it's a weapon/armour/can have bonuses. - [+] protection from good. - [+] repel the next "power" attacks from good-aligned lfs - [+] casttoattack xxx - [+] this needs the player to have an alignment!!! (base it on the job) FROM PREVIOUS COMMITS: - [+] if you polymorph into something with nopack, MELD your pack ? - [+] move all from lf->pack to lf->meldpack - [+] have to SAVE meldpack too. - [+] monsters which attack if you get too close - [+] eg. wolf - [+] do they attack other monsters in range too? or just players?
This commit is contained in:
parent
5d7b3dedc6
commit
d2588bdd98
22
attack.c
22
attack.c
|
@ -656,6 +656,27 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag)
|
|||
}
|
||||
}
|
||||
|
||||
getflags(lf->flags, retflag, &nretflags, F_PROTALIGN, F_NONE);
|
||||
for (i = 0; i < nretflags; i++) {
|
||||
f = retflag[i];
|
||||
if (f->val[1] == getalignment(lf)) {
|
||||
if (isplayer(lf)) {
|
||||
msg("^wA %s force prevents you from attacking %s!",
|
||||
(f->val[1] == AL_GOOD) ? "demonic" : "holy",
|
||||
victimname);
|
||||
} else if (cansee(player, lf)) {
|
||||
msg("^wA %s force prevents %s from attacking %s!",
|
||||
(f->val[1] == AL_GOOD) ? "demonic" : "holy",
|
||||
attackername, victimname);
|
||||
}
|
||||
f->val[0]--;
|
||||
if (f->val[0] <= 0) {
|
||||
killflag(f);
|
||||
}
|
||||
return B_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (wep && lfhasflagval(victim, F_ASLEEP, NA, ST_KO, NA, NULL)) {
|
||||
f = hasflag(wep->flags, F_MERCIFUL);
|
||||
if (f) {
|
||||
|
@ -2439,7 +2460,6 @@ void wepeffects(flagpile_t *fp, cell_t *where, flag_t *damflag, int dam) {
|
|||
}
|
||||
|
||||
if (!passedcheck) {
|
||||
|
||||
howlong = gethitconferlifetime(f->text, NULL, NULL);
|
||||
|
||||
// get conferred flag values
|
||||
|
|
281
data.c
281
data.c
|
@ -175,6 +175,7 @@ void initjobs(void) {
|
|||
//addflag(lastjob->flags, F_OMNIPOTENT, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTATT, A_IQ, AT_VHIGH, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTATT, A_CHA, AT_EXHIGH, NA, NULL);
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_NEUTRAL, NA, NA, NULL);
|
||||
addflag(lastjob->flags, F_MPDICE, 100, NA, NA, NULL);
|
||||
//addflag(lastjob->flags, F_MPREGEN, 100, NA, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "gladius of pyromania");
|
||||
|
@ -218,6 +219,7 @@ void initjobs(void) {
|
|||
|
||||
addjob(J_ADVENTURER, "Adventurer", "Adventurers are a versatile jack-of-all-trades type job. They can learn all skills, and already have basic Cartography and Lore skills. They also start the game with three healing potions. Recommended for beginners.");
|
||||
// stat mods
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne"); // ie. select
|
||||
// initial objects
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "gladius");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "leather armour");
|
||||
|
@ -281,6 +283,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_JOBATTRMOD, A_IQ, 5, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_WIS, 5, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_CON, -10, NA, NULL);
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gn"); // ie. select
|
||||
// initial objects
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "meat cleaver");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "apron");
|
||||
|
@ -322,6 +325,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_JOBATTRMOD, A_STR, 10, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_IQ, -15, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_CON, 15, NA, NULL);
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_GOOD, NA, NA, NULL);
|
||||
// initial objects
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "combat knife");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "revolver");
|
||||
|
@ -363,6 +367,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_MPDICE, 1, 1, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_WIS, 15, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_CHA, 10, NA, NULL);
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_NEUTRAL, NA, NA, NULL);
|
||||
// initial objects
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "quarterstaff");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "sickle");
|
||||
|
@ -405,6 +410,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_JOBATTRMOD, A_STR, 5, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_AGI, 10, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_WIS, 10, NA, NULL);
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne"); // ie. select
|
||||
// initial objects
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "robe");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "2 loaf of stale bread");
|
||||
|
@ -471,6 +477,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_JOBATTRMOD, A_AGI, 5, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_CON, 5, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_WIS, 10, NA, NULL);
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_NEUTRAL, NA, NA, NULL);
|
||||
// initial objects
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "hatchet");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "bow");
|
||||
|
@ -520,6 +527,7 @@ void initjobs(void) {
|
|||
// stats
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_STR, 5, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_CHA, -20, NA, NULL);
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_GOOD, NA, NA, NULL);
|
||||
// initial objects
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "spanner");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "pair of safety goggles");
|
||||
|
@ -543,7 +551,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_CANLEARN, SK_PERCEPTION, PR_ADEPT, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_SWIMMING, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_THROWING, NA, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_SS_ALLOMANCY, PR_ADEPT, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_SS_ALLOMANCY, NA, NA, NULL);
|
||||
// abilities
|
||||
addflag(lastjob->flags, F_OBESE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastjob->flags, F_HIRABLE, B_TRUE, NA, NA, NULL);
|
||||
|
@ -556,6 +564,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_JOBATTRMOD, A_AGI, 10, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_CON, 5, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_CHA, -5, NA, NULL);
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
// initial objects
|
||||
//addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "balaclava");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "katana");
|
||||
|
@ -607,6 +616,7 @@ void initjobs(void) {
|
|||
// stats
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_CHA, 20, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_WIS, 10, NA, NULL);
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_GOOD, NA, NA, NULL);
|
||||
// initial objects
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "blessed ornamental sword");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "100 gold coins");
|
||||
|
@ -650,6 +660,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_JOBATTRMOD, A_CON, 20, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_WIS, -15, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_CHA, -15, NA, NULL);
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
// initial objects
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "cutlass");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "silk shirt");
|
||||
|
@ -695,6 +706,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_JOBATTRMOD, A_STR, -10, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_AGI, 15, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_CON, -10, NA, NULL);
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_NONE, NA, NA, "ne");
|
||||
// initial objects
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "dagger");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "leather cloak");
|
||||
|
@ -744,6 +756,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_JOBATTRMOD, A_CON, 10, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_CHA, -10, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_WIS, -20, NA, NULL);
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
|
||||
// initial objects
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "helmet");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "suit of ring mail");
|
||||
|
@ -765,6 +778,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_METALWORK, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_PERCEPTION, PR_NOVICE, NA, NULL);
|
||||
// learnable skills
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_ALLOMANCY, NA, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_CARTOGRAPHY, PR_SKILLED, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_CLIMBING, NA, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_COOKING, PR_ADEPT, NA, NULL); // limit
|
||||
|
@ -798,6 +812,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_JOBATTRMOD, A_STR, -20, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_IQ, 20, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_CON, -15, NA, NULL);
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
|
||||
// initial objects
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "enchanted neophyte staff");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "wizard hat");
|
||||
|
@ -883,11 +898,12 @@ void initobjects(void) {
|
|||
int i,n;
|
||||
|
||||
// init poison types
|
||||
addpoisontype(P_COLD, "hypothermia", "Sick", "cough", B_FALSE, 1, 25, PS_DISEASE);
|
||||
addpoisontype(P_FOOD, "gastroenteritis", "Poisoned", "vomit", B_TRUE, 1, 25, PS_POISON);
|
||||
addpoisontype(P_FOODBAD, "salmonella poisoning", "Poisoned", "vomit", B_TRUE, 2, 33, PS_POISON);
|
||||
addpoisontype(P_GAS, "gas inhalation", "Poisoned", "cough", B_FALSE, 1, 25, PS_POISON);
|
||||
addpoisontype(P_VENOM, "venom poisoning", "Poisoned", "vomit", B_TRUE, 1, 25, PS_POISON);
|
||||
addpoisontype(P_COLD, "hypothermia", "Sick", "^bYOU cough#S violently.", OT_NONE, 1, 25, PS_DISEASE);
|
||||
addpoisontype(P_FOOD, "gastroenteritis", "Poisoned", "^bYOU vomit#S violently.", OT_VOMITPOOL, 1, 25, PS_POISON);
|
||||
addpoisontype(P_FOODBAD, "salmonella poisoning", "Poisoned", "^bYOU vomit#S violently.", OT_VOMITPOOL, 2, 33, PS_POISON);
|
||||
addpoisontype(P_GAS, "gas inhalation", "Poisoned", "^bYOU cough#S.", OT_NONE, 1, 25, PS_POISON);
|
||||
addpoisontype(P_ROT, "the mummy's curse", "Cursed", "", OT_NONE, 0, 0, PS_CURSE);
|
||||
addpoisontype(P_VENOM, "venom poisoning", "Poisoned", "^bYOU cough#S up blood.", OT_BLOODSPLASH, 1, 25, PS_POISON);
|
||||
addpoisontype(P_WEAKNESS, "weakening poison", "Poisoned", "cough", B_FALSE, 0, 0, PS_POISON);
|
||||
|
||||
// generate hidden name text
|
||||
|
@ -1135,6 +1151,7 @@ void initobjects(void) {
|
|||
addflag(lastmaterial->flags, F_DTIMMUNE, DT_UNARMED, NA, NA, NULL);
|
||||
addflag(lastmaterial->flags, F_DTIMMUNE, DT_LIGHT, NA, NA, NULL);
|
||||
addflag(lastmaterial->flags, F_DTIMMUNE, DT_NECROTIC, NA, NA, NULL);
|
||||
addmaterial(MT_DIRT, "dirt", 1);
|
||||
addmaterial(MT_PLANT, "plant matter", 1);
|
||||
addflag(lastmaterial->flags, F_FLAMMABLE, PERMENANT, NA, NA, NULL);
|
||||
addflag(lastmaterial->flags, F_DTVULN, DT_FIRE, NA, NA, NULL);
|
||||
|
@ -2614,7 +2631,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, NA, NA, NULL);
|
||||
|
||||
///////////////////
|
||||
// death / necromancy
|
||||
// death magic / necromancy
|
||||
///////////////////
|
||||
// l1
|
||||
addot(OT_S_STENCH, "stench of death", "Nauseates the target with the smell of dying flesh.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
|
@ -2680,6 +2697,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_RANGE, 3, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_WALLSTOP, NA, NULL);
|
||||
addot(OT_S_PAIN, "pain", "Causes extreme pain in the target whenever they move.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines the duration of the pain effect.");
|
||||
|
@ -2690,6 +2708,20 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
// l4
|
||||
addot(OT_S_CURSE, "curse", "Bestow a curse upon the target's equipment, applying a -1 penalty and making them impossible to remove.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines how many objects will be cursed.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_ENCHANTMENT, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_DEATH, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 4, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
addot(OT_S_PROTGOOD, "protection from good", "Repels the next 5+(^bpower^n*2) attacks from Good-aligned creatures. ", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_DEATH, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 4, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_FALSE, LOF_DONTNEED, NA, NULL);
|
||||
addflag(lastot->flags, F_ONGOING, B_TRUE, NA, NA, NULL);
|
||||
addot(OT_S_WEAKEN, "weaken", "Temporarily lowers the target's muscle strength by ^bpower^n points.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines the duration of the weakness effect.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_ENCHANTMENT, NA, NA, NULL);
|
||||
|
@ -3468,6 +3500,12 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_FALSE, LOF_DONTNEED, NA, NULL);
|
||||
// l4
|
||||
addot(OT_S_PROTEVIL, "protection from evil", "Repels the next 5+(^bpower^n*2) attacks from Evil-aligned creatures. ", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_LIFE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 4, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_FALSE, LOF_DONTNEED, NA, NULL);
|
||||
addflag(lastot->flags, F_ONGOING, B_TRUE, NA, NA, NULL);
|
||||
addot(OT_S_HEAVENARM, "divine armour", "Protects the target from damage with a holy force field.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "This spell will prevent ^bpower * 10^n points worth of damage from any source.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_LIFE, NA, NA, NULL);
|
||||
|
@ -4464,7 +4502,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_RNDCHARGES, 100, 200, NA, NULL);
|
||||
addflag(lastot->flags, F_REFILLWITH, OT_POT_OIL, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_RODSHAPED, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_DAM, DT_FIRE, 4, NA, NULL);
|
||||
addflag(lastot->flags, F_DAM, DT_FIRE, 2, NA, NULL);
|
||||
addflag(lastot->flags, F_ACCURACY, 80, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_USESSKILL, SK_CLUBS, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LIGHTSOURCE, B_TRUE, NA, NA, NULL);
|
||||
|
@ -6185,11 +6223,13 @@ void initobjects(void) {
|
|||
addot(OT_ACIDATTACK, "acidattack", "acid attack object", MT_WATER, 0, OC_WEAPON, SZ_TINY);
|
||||
addflag(lastot->flags, F_DAM, DT_ACID, 2, NA, NULL);
|
||||
addflag(lastot->flags, F_ACCURACY, 75, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ATTACKVERB, NA, NA, NA, "touch");
|
||||
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);
|
||||
addot(OT_TOUCHBURN, "burning touch", "burning touch object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
|
||||
addflag(lastot->flags, F_DAM, DT_FIRE, 1, NA, NULL);
|
||||
addflag(lastot->flags, F_ATTACKVERB, NA, NA, NA, "touch");
|
||||
addflag(lastot->flags, F_ACCURACY, 100, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOSTRDAMMOD, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_USESSKILL, SK_NONE, NA, NA, NULL);
|
||||
|
@ -6197,6 +6237,7 @@ void initobjects(void) {
|
|||
addot(OT_TOUCHCHILL, "chilling touch", "chilling touch object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
|
||||
addflag(lastot->flags, F_DAM, DT_COLD, 1, NA, NULL);
|
||||
addflag(lastot->flags, F_ACCURACY, 100, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ATTACKVERB, NA, NA, NA, "touch");
|
||||
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);
|
||||
|
@ -6204,10 +6245,19 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_DAM, DT_HOLY, 1, NA, NULL);
|
||||
addflag(lastot->flags, F_ACCURACY, 100, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOSTRDAMMOD, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ATTACKVERB, NA, NA, NA, "touch");
|
||||
addflag(lastot->flags, F_USESSKILL, SK_NONE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
||||
addot(OT_TOUCHNECROTIC, "necrotic touch", "generic undead touch object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
|
||||
addflag(lastot->flags, F_DAM, DT_NECROTIC, 1, NA, NULL);
|
||||
addflag(lastot->flags, F_ACCURACY, 100, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ATTACKVERB, NA, NA, NA, "touch");
|
||||
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);
|
||||
addot(OT_TOUCHPARALYZE, "paralyzing touch", "paralyzing touch object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
|
||||
addflag(lastot->flags, F_ARMOURPIERCE, 90, NA, NA, "");
|
||||
addflag(lastot->flags, F_ATTACKVERB, NA, NA, NA, "touch");
|
||||
addflag(lastot->flags, F_DAM, DT_TOUCH, 1, NA, NULL);
|
||||
addflag(lastot->flags, F_ACCURACY, 100, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_HITCONFER, F_PARALYZED, SC_CON, 22, "1-2");
|
||||
|
@ -6217,6 +6267,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
||||
addot(OT_TOUCHPARALYZE2, "strong paralyzing touch", "strong paralyzing touch object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
|
||||
addflag(lastot->flags, F_ARMOURPIERCE, 90, NA, NA, "");
|
||||
addflag(lastot->flags, F_ATTACKVERB, NA, NA, NA, "touch");
|
||||
addflag(lastot->flags, F_DAM, DT_TOUCH, 1, NA, NULL);
|
||||
addflag(lastot->flags, F_ACCURACY, 100, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_HITCONFER, F_PARALYZED, SC_CON, 30, "3-5");
|
||||
|
@ -7472,6 +7523,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_CARTOGRAPHY, PR_NOVICE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_METALWORK, PR_NOVICE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_ALLOMANCY, PR_NOVICE, NA, NULL);
|
||||
// penalties
|
||||
addflag(lastrace->flags, F_MPMOD, -3, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTVULN, DT_LIGHT, NA, NA, "1d6");
|
||||
|
@ -9317,6 +9369,28 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_UNSUMMONOB, NA, NA, NA, "boulder");
|
||||
addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
|
||||
|
||||
addrace(R_SANDMAN, "sandman", 10, 'y', C_BROWN, MT_DIRT, RC_OTHER, "A whirling tornado of sand, with a humanoid figure dimly visible within.");
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, "small dust cloud");
|
||||
addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "large dust cloud");
|
||||
addflag(lastrace->flags, F_EXTRACORPSE, 50, NA, NA, "pile of sleeping powder");
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4");
|
||||
addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_SLEEP, NA, NA, "range:1;");
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_SLEEP, NA, B_APPENDYOU, "throws a handful of sand");
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_FLY, 1, NA, "^rushing air");
|
||||
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
|
||||
addrace(R_SATYR, "satyr", 80, 'h', C_GREEN, MT_FLESH, RC_HUMANOID, "A goat-like humanoid equipped with a set of magical panpipes.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
|
@ -9558,6 +9632,37 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_REVIVETIMER, 0, 25, R_TROLL, NULL);
|
||||
|
||||
addrace(R_TROLLSNOW, "snow troll", 100, 't', C_WHITE, MT_FLESH, RC_HUMANOID, "A savage, hairy monster covered with white fur. Trolls are extremely muscular, move abnormally quickly and regenerate.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
setbodypartname(lastrace, BP_HANDS, "claws");
|
||||
setbodypartname(lastrace, BP_RIGHTFINGER, "right foreclaw");
|
||||
setbodypartname(lastrace, BP_LEFTFINGER, "left foreclaw");
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4+0");
|
||||
addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_LOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 6, NA, NULL);
|
||||
addflag(lastrace->flags, F_EXTRADAM, DT_COLD, NA, NA, "1d6");
|
||||
addflag(lastrace->flags, F_REGENERATES, 2, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTIMMUNE, DT_COLD, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTVULN, DT_FIRE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FROSTBITE, NA, NA, "pw:1; range:1;");
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FROSTBITE, NA, NA, "exhales a freezing wind");
|
||||
addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_REVIVETIMER, 0, 25, R_TROLL, NULL);
|
||||
|
||||
addrace(R_XAT, "xat", 2, 'x', C_BROWN, MT_FLESH, RC_ANIMAL, "Xats are wild pigs with the claws of a dog.");
|
||||
setbodytype(lastrace, BT_QUADRAPED);
|
||||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
|
@ -10835,7 +10940,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FATALFOOD, OT_CHOCOLATE, NA, NA, NULL);
|
||||
|
||||
addrace(R_WORMGLUT, "glutwyrm", 25, 'W', C_MAGENTA, MT_FLESH, RC_DRAGON, "Gigantic nonflying wyrms who swallow their prey whole, slowly digesting their still living bodies.");
|
||||
addrace(R_WORMGLUT, "glutwyrm", 25, 'W', C_MAGENTA, MT_FLESH, RC_DRAGON, "Gigantic wyrms who have become so obese over the centuries that they have evolved without wings. They swallow their prey whole, slowly digesting their still living bodies.");
|
||||
addbodypart(lastrace, BP_HEAD, NULL);
|
||||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
|
@ -10861,6 +10966,39 @@ void initrace(void) {
|
|||
// end animals
|
||||
|
||||
// dragons / wyrms
|
||||
|
||||
addrace(R_WYVERN, "wyvern", 150, 'w', C_MAGENTA, MT_FLESH, RC_DRAGON, "Wyverns are smaller, malformed wyrms which were born without their usual breath powers.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addbodypart(lastrace, BP_WINGS, NULL);
|
||||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "10d4");
|
||||
addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 10, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_TAIL, 8, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_EXHIGH, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_HIGH, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_GTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_GTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 5, NA, "roars^a roar");
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_LORE_DRAGONS, PR_MASTER, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_LISTEN, PR_ADEPT, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_A_SWOOP, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MORALE, 15, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CARNIVORE, B_TRUE, NA, NA, NULL);
|
||||
|
||||
addrace(R_DRAGONBLUE, "blue wyrm", 400, 'W', C_BLUE, MT_FLESH, RC_DRAGON, "Blue wyrms are massive reptilian creatures who can (and will) consume almost any living creature.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addbodypart(lastrace, BP_WINGS, NULL);
|
||||
|
@ -11548,6 +11686,56 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "narrows its eyes");
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "roars^an other-wordly roar");
|
||||
|
||||
addrace(R_GRIDDLER, "griddler", 30, '&', C_RED, MT_FLESH, RC_DEMON, "A small, squat creature with firey red skin. It carries a small red-hot trident.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addbodypart(lastrace, BP_WINGS, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_HEAVEN, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4");
|
||||
addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_LOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTIMMUNE, DT_POISON, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTRESIST, DT_ACID, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTRESIST, DT_COLD, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTRESIST, DT_FIRE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_HEATMETAL, 5, 5, "pw:1;");
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "waves its trident");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "red-hot trident");
|
||||
addflag(lastrace->flags, F_NEEDOBFORSPELLS, OT_TRIDENT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RESISTMAG, 10, NA, NA, NULL);
|
||||
|
||||
addrace(R_ICEDEMON, "ice demon", 80, '&', C_WHITE, MT_ICE, RC_DEMON, "A dense, humanoid demon comprised of solid ice and covered with sharp icicles.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addbodypart(lastrace, BP_WINGS, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_HEAVEN, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4");
|
||||
addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL);
|
||||
addflag(lastrace->flags, F_EXTRADAM, DT_COLD, NA, NA, "2d4");
|
||||
addflag(lastrace->flags, F_DTIMMUNE, DT_COLD, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RETALIATE, 2, 3, DT_COLD, "icy spikes");
|
||||
addflag(lastrace->flags, F_SEEINDARK, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTIMMUNE, DT_POISON, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTRESIST, DT_ACID, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_SHARDSHOT, 5, 5, "pw:3;");
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "points its arm");
|
||||
addflag(lastrace->flags, F_RESISTMAG, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "roars^an other-wordly roar");
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "roars^an other-wordly roar");
|
||||
|
||||
addrace(R_LURKINGHORROR, "lurking horror", 100, 'U', C_MAGENTA, MT_FLESH, RC_DEMON, "A creeping, seething mass of pulsating flesh. A multitide of misshapen eyes and limbs protude from the writhing ooze in all directions. The very sight of this creature inspires a sense of cold dread.");
|
||||
addbodypart(lastrace, BP_BODY, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
|
@ -11572,7 +11760,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addbodypart(lastrace, BP_WINGS, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RETALIATE, 1, 4, DT_PIERCE, "spikes");
|
||||
addflag(lastrace->flags, F_RETALIATE, 1, 4, DT_PIERCE, "razor-sharp spikes");
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4");
|
||||
|
@ -11854,6 +12042,68 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SEEINDARK, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
|
||||
|
||||
addrace(R_MUMMY, "mummy", 54, 'M', C_GREY, MT_FLESH, RC_UNDEAD, "A rotting humanoid figure clad in bandages.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_LOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_VHIGH, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, 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_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4+3");
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_TOUCHNECROTIC, 12, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITCONFER, F_POISONED, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITCONFERVALS, P_ROT, 3, NA, NULL); // strong!
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FEAR, 50, 50, "pw:3;");
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FEAR, NA, B_APPENDYOU, "gazes");
|
||||
addflag(lastrace->flags, F_CASTTYPE, CT_GAZE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTVULN, DT_FIRE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, 6, NA, NA, NULL);
|
||||
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.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_EXHIGH, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_VHIGH, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, 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_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "8d4+3");
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "pw:8;");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "cursed robe");
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_TOUCHNECROTIC, 16, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITCONFER, F_POISONED, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITCONFERVALS, P_ROT, 5, NA, NULL);
|
||||
addflag(lastrace->flags, F_RESISTMAG, 15, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FEAR, 50, 50, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_STENCH, NA, NA, "pw:8;");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_BLINDNESS, NA, NA, "pw:8;");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_SMITEGOOD, 6, 6, "pw:5;");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_DRAINLIFE, 6, 6, "pw:8;");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLAYFLESH, 10, 10, "pw:1;");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_ANIMATEDEAD, NA, NA, "pw:10;");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_CHILL, 10, 10, "pw:1;");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_CURSE, 5, 5, "pw:1;");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_PROTGOOD, NA, NA, "pw:1;");
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "begins to chant"); // default
|
||||
addflag(lastrace->flags, F_CASTCHANCE, 40, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, 6, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
|
||||
|
||||
addrace(R_VAMPIRE, "vampire", 75, 'V', C_BLUE, MT_FLESH, RC_UNDEAD, "Blood-drinking creatures of the night, vampires have pale white skin and prominent fangs protuding from their mouthes. They are said to be near immortal, able to survive even seemingly fatal attacks by converting themselves to a gaseous form.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
|
@ -12058,7 +12308,15 @@ void initrace(void) {
|
|||
addflag(r->flags, F_DTIMMUNE, DT_POISONGAS, NA, NA, NULL);
|
||||
addflag(r->flags, F_DTIMMUNE, DT_DECAY, NA, NA, NULL);
|
||||
addflag(r->flags, F_DTIMMUNE, DT_NECROTIC, NA, NA, NULL);
|
||||
|
||||
switch (r->id) {
|
||||
case R_MUMMYG:
|
||||
break;
|
||||
default:
|
||||
addflag(r->flags, F_DTVULN, DT_HOLY, NA, NA, NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
addflag(r->flags, F_SEEINDARK, B_TRUE, NA, NA, NULL);
|
||||
addflag(r->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
|
||||
addflag(r->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
|
||||
|
@ -12288,6 +12546,7 @@ void initskills(void) {
|
|||
|
||||
// spell schools
|
||||
addskill(SK_SS_ALLOMANCY, "Allomancy", "Boosts casting of spells from this school.", 50);
|
||||
addskilldesc(SK_SS_MENTAL, PR_INEPT, "- Each rank gives you a 20% chance to learn a new allomantic ability when levelling up.", B_FALSE);
|
||||
addskilldesc(SK_SS_ALLOMANCY, PR_NOVICE, "You gain knowledge of all Allomancy spells.", B_FALSE);
|
||||
addskilldesc(SK_SS_ALLOMANCY, PR_NOVICE, "Allows you to cast Allomancy spells up to level 1.", B_FALSE);
|
||||
addskilldesc(SK_SS_ALLOMANCY, PR_BEGINNER, "Allows you to cast Allomancy spells up to level 2.", B_FALSE);
|
||||
|
@ -12296,7 +12555,7 @@ void initskills(void) {
|
|||
addskilldesc(SK_SS_ALLOMANCY, PR_EXPERT, "Allows you to cast Allomancy spells up to level 5.", B_FALSE);
|
||||
addskilldesc(SK_SS_ALLOMANCY, PR_MASTER, "Allows you to cast Allomancy spells up to level 6.", B_FALSE);
|
||||
addskill(SK_SS_MENTAL, "Psionics", "Boosts casting of spells from this school.", 50);
|
||||
addskilldesc(SK_SS_MENTAL, PR_INEPT, "- Each rank gives you a 10% chance to learn a new psionic ability when levelling up.", B_FALSE);
|
||||
addskilldesc(SK_SS_MENTAL, PR_INEPT, "- Each rank gives you a 20% chance to learn a new psionic ability when levelling up.", B_FALSE);
|
||||
addskilldesc(SK_SS_MENTAL, PR_NOVICE, "Allows you to cast Psionic spells up to level 1.", B_FALSE);
|
||||
addskilldesc(SK_SS_MENTAL, PR_BEGINNER, "Allows you to cast Psionic spells up to level 2.", B_FALSE);
|
||||
addskilldesc(SK_SS_MENTAL, PR_ADEPT, "Allows you to cast Psionic spells up to level 3.", B_FALSE);
|
||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
31
defs.h
31
defs.h
|
@ -966,6 +966,7 @@ enum RACE {
|
|||
R_PRIMALFIREL,
|
||||
R_PRIMALSTONE,
|
||||
R_PRIMALSTONEL,
|
||||
R_SANDMAN,
|
||||
R_SATYR,
|
||||
R_SHADOWCAT,
|
||||
R_SINKMITE,
|
||||
|
@ -976,6 +977,7 @@ enum RACE {
|
|||
R_TRICLOPS,
|
||||
R_TROGLODYTE,
|
||||
R_TROLL,
|
||||
R_TROLLSNOW,
|
||||
R_VAMPIRE,
|
||||
R_XAT,
|
||||
// fish
|
||||
|
@ -1043,6 +1045,7 @@ enum RACE {
|
|||
R_DRAGONWHITE,
|
||||
R_DRAGONWHITEY,
|
||||
R_DRAGONWHITEA,
|
||||
R_WYVERN,
|
||||
// insects
|
||||
R_BLASTBUG,
|
||||
R_BUTTERFLY,
|
||||
|
@ -1055,7 +1058,9 @@ enum RACE {
|
|||
R_STIRGE,
|
||||
// demons
|
||||
R_DRETCH,
|
||||
R_GRIDDLER,
|
||||
R_LURKINGHORROR,
|
||||
R_ICEDEMON,
|
||||
R_NECRONTRAPPER,
|
||||
R_NECRONREAPER,
|
||||
R_NECRONSOWER,
|
||||
|
@ -1066,6 +1071,8 @@ enum RACE {
|
|||
R_GHAST,
|
||||
R_GHOST,
|
||||
R_GHOUL,
|
||||
R_MUMMY,
|
||||
R_MUMMYG,
|
||||
R_SKELETON,
|
||||
R_SKELETONFIRE,
|
||||
R_WRAITHICE,
|
||||
|
@ -1141,6 +1148,7 @@ enum MATERIAL {
|
|||
MT_WIRE = 27,
|
||||
MT_SILVER = 28,
|
||||
MT_DRAGONWOOD = 29,
|
||||
MT_DIRT = 30,
|
||||
};
|
||||
|
||||
// Object Types
|
||||
|
@ -1343,15 +1351,17 @@ enum OBTYPE {
|
|||
OT_S_PULLMETAL,
|
||||
OT_S_MAGSHIELD,
|
||||
OT_S_METALHEAL,
|
||||
// -- death
|
||||
// -- death magic / necromency
|
||||
OT_S_ANIMATEDEAD,
|
||||
OT_S_COMMANDUNDEAD,
|
||||
OT_S_CURSE,
|
||||
OT_S_DRAINLIFE,
|
||||
OT_S_FEAR,
|
||||
OT_S_FLAYFLESH,
|
||||
OT_S_HECTASSERVANT,
|
||||
OT_S_PAIN,
|
||||
OT_S_PARALYZE,
|
||||
OT_S_PROTGOOD,
|
||||
OT_S_INFINITEDEATH,
|
||||
OT_S_WEAKEN,
|
||||
OT_S_FEEBLEMIND,
|
||||
|
@ -1425,12 +1435,13 @@ enum OBTYPE {
|
|||
OT_S_SLOW,
|
||||
OT_S_TRUESTRIKE,
|
||||
OT_S_WHATGOESUP,
|
||||
// -- life / cleric
|
||||
// -- life magic / cleric
|
||||
OT_S_HEALING,
|
||||
OT_S_HEALINGMIN,
|
||||
OT_S_HEALINGMAJ,
|
||||
OT_S_HEAVENARM,
|
||||
OT_S_HOLYAURA,
|
||||
OT_S_PROTEVIL,
|
||||
OT_S_SMITEEVIL,
|
||||
OT_S_SPEAKDEAD,
|
||||
OT_S_TURNUNDEAD,
|
||||
|
@ -1846,6 +1857,7 @@ enum OBTYPE {
|
|||
OT_TOUCHBURN,
|
||||
OT_TOUCHCHILL,
|
||||
OT_TOUCHHOLY,
|
||||
OT_TOUCHNECROTIC,
|
||||
OT_TOUCHPARALYZE,
|
||||
OT_TOUCHPARALYZE2,
|
||||
// missiles / ammo
|
||||
|
@ -2044,6 +2056,7 @@ enum ALIGNMENT {
|
|||
enum POISONSEVERITY {
|
||||
PS_DISEASE,
|
||||
PS_POISON,
|
||||
PS_CURSE,
|
||||
};
|
||||
|
||||
enum POISONTYPE {
|
||||
|
@ -2051,6 +2064,7 @@ enum POISONTYPE {
|
|||
P_FOOD,
|
||||
P_FOODBAD,
|
||||
P_GAS,
|
||||
P_ROT,
|
||||
P_VENOM,
|
||||
P_WEAKNESS,
|
||||
};
|
||||
|
@ -2210,6 +2224,7 @@ enum FLAG {
|
|||
F_HITCONFER, // hitting with this gives flagid=v0
|
||||
// with timeleft = text ("min-max")
|
||||
// unless you pass a val1 skillcheck, diff val2
|
||||
// if val1 = SC_NONE, no check.
|
||||
// MUST ALSO HAVE HITCONFERVALS.
|
||||
F_HITCONFERVALS,// specifies values for conferred flag.
|
||||
F_ACTIVATED, // val0 = is this object turned on?
|
||||
|
@ -2558,6 +2573,9 @@ enum FLAG {
|
|||
// v1 = total time rested
|
||||
// text = obid of hotel
|
||||
F_ALIGNMENT, // v0 = al_good, al_neutral, al_evil. default neutral.
|
||||
// if al_none is selected for the player, they
|
||||
// can pick what alignment they want to be.
|
||||
// text shows the choices ("g", "n" or "e")
|
||||
F_PIETY, // for god lifeforms - tracks player's piety with them
|
||||
F_HOMEMAP, // which map did this lf get created on?
|
||||
F_TOOKACTION, // lf purposely took action in their last turn.
|
||||
|
@ -2673,6 +2691,7 @@ enum FLAG {
|
|||
// v1->v0, v2->v1, text->text
|
||||
F_EXTRACORPSE, // text field specifies what additional corpse
|
||||
// obtype to leave
|
||||
// v0 = pct change for this to happen. NA = 100.
|
||||
F_MYCORPSE, // text field contains obid of my corpse.
|
||||
// (for ghosts)
|
||||
F_NOCORPSE, // monster's body crumbles to dust after death
|
||||
|
@ -2862,7 +2881,7 @@ enum FLAG {
|
|||
// if v1 is set, object must be the
|
||||
// corpse of something with raceclass v1.
|
||||
F_SACRIFICEOBCLASS, // v0 = can sacrifice obclass v0 to this god
|
||||
F_SACRIFICEOBBLESSED, // v0 = can sacrifice obs with ->blessed=v0
|
||||
F_SACRIFICEOBBLESSED, // v0 = can sacrifice obs with ->blessed=v0 and blessknown!
|
||||
|
||||
F_NAME, // text = lf's name
|
||||
F_XPMOD, // add/subtract this much from calculated xpval
|
||||
|
@ -2928,6 +2947,8 @@ enum FLAG {
|
|||
// rather than AGI and SK_THROWING like normal
|
||||
F_TRUESTRIKE, // your attacks ALWAYS hit. turnsleft=v0
|
||||
F_HURRICANESTRIKE, // lf is performing a hurricane strike
|
||||
F_PROTALIGN, // attacks from lfs with aligh = v1 are repelled.
|
||||
// turnsleft=v0
|
||||
// INTRINSICS
|
||||
F_MAGICARMOUR,// armour is magically boosted. f->text is the description
|
||||
// ie 'magic armour', 'force field'
|
||||
|
@ -3563,8 +3584,8 @@ typedef struct poisontype_s {
|
|||
enum POISONTYPE id;
|
||||
char *name;
|
||||
char *desc;
|
||||
char *damverb;
|
||||
int causesvomit;
|
||||
char *damverb; // can use macros: YOU YOUR and #S
|
||||
enum OBTYPE vomitob;
|
||||
int dam;
|
||||
int dampct;
|
||||
enum POISONSEVERITY severity;
|
||||
|
|
|
@ -26,6 +26,7 @@ I = large insect
|
|||
j = jelly/ooze/leech
|
||||
k = kobold
|
||||
m = mutant
|
||||
M = mummy
|
||||
n = small humanoid / nymph / sprite
|
||||
N = necron
|
||||
o = orc
|
||||
|
|
3
god.c
3
god.c
|
@ -541,7 +541,7 @@ void dooffer(void) {
|
|||
} else if ((f->id == F_SACRIFICEOBWITHFLAG) && hasflag(o->flags, f->val[0])) {
|
||||
ok = B_TRUE;
|
||||
thispiety = f->val[2];
|
||||
} else if ((f->id == F_SACRIFICEOBBLESSED) && (f->val[0] == o->blessed)) {
|
||||
} else if ((f->id == F_SACRIFICEOBBLESSED) && (f->val[0] == o->blessed) && (o->blessknown == B_TRUE)) {
|
||||
ok = B_TRUE;
|
||||
thispiety = f->val[2];
|
||||
}
|
||||
|
@ -1441,6 +1441,7 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
if (piety <= 99) {
|
||||
// piety between 0 and 99 = ignored
|
||||
//godsay(god->race->id, "Stop pestering me!");
|
||||
msg("%s doesn't respond.", god->race->name);
|
||||
angergod(god->race->id, 0, GA_PRAY);
|
||||
modpiety(god->race->id, -30);
|
||||
return B_FALSE;
|
||||
|
|
27
io.c
27
io.c
|
@ -1721,6 +1721,10 @@ int announceflaggain(lifeform_t *lf, flag_t *f) {
|
|||
msg("%s start%s producing light!", lfname, isplayer(lf) ? "" : "s");
|
||||
donesomething = B_TRUE;
|
||||
break;
|
||||
case F_PROTALIGN:
|
||||
msg("A sphere of %s force surrounds %s!", (f->val[1] == AL_GOOD) ? "demonic" : "holy", lfname);
|
||||
donesomething = B_TRUE;
|
||||
break;
|
||||
case F_RAGE:
|
||||
msg("%s enter%s a berzerker rage!", lfname, isplayer(lf) ? "" : "s");
|
||||
donesomething = B_TRUE;
|
||||
|
@ -2351,6 +2355,11 @@ int announceflagloss(lifeform_t *lf, flag_t *f) {
|
|||
msg("%s %s no longer producing light.", lfname, is(lf));
|
||||
donesomething = B_TRUE;
|
||||
break;
|
||||
case F_PROTALIGN:
|
||||
msg("%s%s sphere of %s force disappates.", lfname, getpossessive(lfname),
|
||||
(f->val[1] == AL_GOOD) ? "demonic" : "holy");
|
||||
donesomething = B_TRUE;
|
||||
break;
|
||||
case F_RAGE:
|
||||
msg("%s %s less angry now.", lfname, isplayer(lf) ? "feel" : "seems");
|
||||
donesomething = B_TRUE;
|
||||
|
@ -4981,13 +4990,13 @@ char *makedesc_god(lifeform_t *god, char *retbuf) {
|
|||
}
|
||||
switch (retflag[i]->val[0]) {
|
||||
case B_BLESSED:
|
||||
sprintf(thisline, "- blessed objects\n");
|
||||
sprintf(thisline, "- known blessed objects\n");
|
||||
break;
|
||||
case B_CURSED:
|
||||
sprintf(thisline, "- cursed objects\n");
|
||||
sprintf(thisline, "- known cursed objects\n");
|
||||
break;
|
||||
default:
|
||||
sprintf(thisline, "- uncursed objects\n");
|
||||
sprintf(thisline, "- known uncursed objects\n");
|
||||
break;
|
||||
}
|
||||
strncat(retbuf, thisline, HUGEBUFLEN);
|
||||
|
@ -6176,6 +6185,11 @@ char *makedesc_ob(object_t *o, char *retbuf) {
|
|||
sprintf(buf2, "%s protects you with %s.\n", buf, f->text);
|
||||
strncat(retbuf, buf2, HUGEBUFLEN);
|
||||
break;
|
||||
case F_PROTALIGN:
|
||||
sprintf(buf2, "%s repels attacks from %s aligned creatures.\n", buf,
|
||||
getalignmentname(f->val[1]));
|
||||
strncat(retbuf, buf2, HUGEBUFLEN);
|
||||
break;
|
||||
case F_RAGE:
|
||||
sprintf(buf2, "%s makes you enraged.\n", buf);
|
||||
strncat(retbuf, buf2, HUGEBUFLEN);
|
||||
|
@ -11249,7 +11263,6 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
wrapprint(mainwin, &y, &x, 0, "%s %s covered by %s ", you(lf), is(lf), f->text);
|
||||
}
|
||||
}
|
||||
|
||||
// fleeing?
|
||||
if (showall) {
|
||||
for (f = lf->flags->first ; f ; f = f->next) {
|
||||
|
@ -12250,6 +12263,12 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
mvwprintw(mainwin, y, 0, "%s do not forget your surroundings.", you(lf));
|
||||
y++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_PROTALIGN, NA, NULL, FROMRACE);
|
||||
if (f) {
|
||||
mvwprintw(mainwin, y, 0, "%s %s protected from attacks by %s-aligned creatures.", you(lf), is(lf),
|
||||
getalignmentname(f->val[1]));
|
||||
y++;
|
||||
}
|
||||
f = lfhasflag(lf, F_RAGE);
|
||||
if (f && (f->known)) {
|
||||
mvwprintw(mainwin, y, 0, "%s %s enraged, gaining accuracy, damage and hit point bonuses.", you(lf), is(lf));
|
||||
|
|
107
lf.c
107
lf.c
|
@ -1630,7 +1630,10 @@ int castspell(lifeform_t *lf, enum OBTYPE sid, lifeform_t *targlf, object_t *tar
|
|||
|
||||
// ask for target cell
|
||||
if ((f = hasflag(sp->flags, F_TARGETTEDSPELL)) != NULL) {
|
||||
if ((f->val[1] != NA) && (f->val[2] != NA) && (power >= f->val[1]) && (power <= f->val[2])) {
|
||||
if ((f->val[1] == NA) || (f->val[2] == NA)) {
|
||||
targettype = f->val[0];
|
||||
needtovalidate = B_TRUE;
|
||||
} else if ((power >= f->val[1]) && (power <= f->val[2])) {
|
||||
targettype = f->val[0];
|
||||
needtovalidate = B_TRUE;
|
||||
} else {
|
||||
|
@ -2787,8 +2790,10 @@ void die(lifeform_t *lf) {
|
|||
// some lfs have extra corpse objects
|
||||
getflags(lf->flags, retflag, &nretflags, F_EXTRACORPSE, F_NONE);
|
||||
for (i = 0; i < nretflags; i++) {
|
||||
if ((f->val[0] == NA) || pctchance(f->val[0])) {
|
||||
addob(corpsecell->obpile, retflag[i]->text);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -4251,6 +4256,28 @@ void enhanceskills(lifeform_t *lf) {
|
|||
}
|
||||
}
|
||||
|
||||
// allomancy sometimes lets you learn spells
|
||||
slev = getskill(lf, SK_SS_ALLOMANCY);
|
||||
if (pctchance(slev*20)) {
|
||||
char qbuf[BUFLEN];
|
||||
sprintf(qbuf, "Learn which allomantic ability (maxmp=%d):", getmaxmp(player));
|
||||
// construct list of castable mental spells
|
||||
makespellchoicelist(&prompt, lf, qbuf, "Describe which allomantic ability:", SS_ALLOMANCY, B_TRUE, B_FALSE, B_FALSE, player->maxmp);
|
||||
if (prompt.nchoices > 0) {
|
||||
objecttype_t *ot;
|
||||
msg("Your body has attuned itself to a new allomantic ability!"); more();
|
||||
getchoicestr(&prompt, B_TRUE, B_TRUE);
|
||||
ot = prompt.result;
|
||||
if (ot) {
|
||||
if (prompt.whichq == 0) { // learn the spell
|
||||
addflag(lf->flags, F_CANCAST, ot->id, NA, NA, NULL);
|
||||
} else {
|
||||
describespell(ot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// psionics sometimes lets you learn spells
|
||||
slev = getskill(lf, SK_SS_MENTAL);
|
||||
if (pctchance(slev*20)) {
|
||||
|
@ -8855,6 +8882,10 @@ void givejob(lifeform_t *lf, enum JOB jobid) {
|
|||
killflag(f);
|
||||
}
|
||||
}
|
||||
// override alignment from race
|
||||
if (hasflag(j->flags, F_ALIGNMENT)) {
|
||||
killflagsofid(lf->flags, F_ALIGNMENT);
|
||||
}
|
||||
|
||||
// apply attrib mods from this job
|
||||
getflags(j->flags, retflag, &nretflags, F_JOBATTRMOD, F_NONE);
|
||||
|
@ -9418,7 +9449,7 @@ flag_t *giveskill(lifeform_t *lf, enum SKILL id) {
|
|||
}
|
||||
} else if (id == SK_SS_ALLOMANCY) {
|
||||
// give all allomantic spells
|
||||
mayusespellschool(lf->flags, SS_ALLOMANCY, F_CANCAST , B_FALSE);
|
||||
//mayusespellschool(lf->flags, SS_ALLOMANCY, F_CANCAST , B_FALSE);
|
||||
} else if (id == SK_SS_MENTAL) {
|
||||
// give a spell
|
||||
/*
|
||||
|
@ -11472,7 +11503,7 @@ object_t *isstuck(lifeform_t *lf) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
poisontype_t *addpoisontype(enum POISONTYPE id, char *name, char *desc, char *damverb, int causesvomit, int dam, int dampct, enum POISONSEVERITY severity) {
|
||||
poisontype_t *addpoisontype(enum POISONTYPE id, char *name, char *desc, char *damverb, enum OBTYPE vomitob, int dam, int dampct, enum POISONSEVERITY severity) {
|
||||
poisontype_t *a;
|
||||
|
||||
// add to the end of the list
|
||||
|
@ -11494,8 +11525,8 @@ poisontype_t *addpoisontype(enum POISONTYPE id, char *name, char *desc, char *da
|
|||
a->id = id;
|
||||
a->name = strdup(name);
|
||||
a->desc = strdup(desc);
|
||||
a->damverb = strdup(desc);
|
||||
a->causesvomit = causesvomit;
|
||||
a->damverb = strdup(damverb);
|
||||
a->vomitob = vomitob;
|
||||
a->dam = dam;
|
||||
a->dampct = dampct;
|
||||
a->severity = severity;
|
||||
|
@ -14376,21 +14407,29 @@ void poison(lifeform_t *lf, int howlong, enum POISONTYPE ptype, int power, char
|
|||
poisontype_t *pt;
|
||||
pt = findpoisontype(ptype);
|
||||
|
||||
if (isimmuneto(lf->flags, DT_POISON, B_FALSE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// are you immune to disease?
|
||||
// are you immune to disease/poison?
|
||||
psev = pt->severity;
|
||||
if ((psev == PS_DISEASE) && hasflag(lf->flags, F_DISEASEIMMUNE)) {
|
||||
return;
|
||||
switch (psev) {
|
||||
case PS_POISON:
|
||||
if (isimmuneto(lf->flags, DT_POISON, B_FALSE)) return;
|
||||
break;
|
||||
case PS_DISEASE:
|
||||
if (isimmuneto(lf->flags, DT_POISON, B_FALSE)) return;
|
||||
if (hasflag(lf->flags, F_DISEASEIMMUNE)) return;
|
||||
break;
|
||||
case PS_CURSE:
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (psev != PS_CURSE) {
|
||||
// adjust time based on first aid skill
|
||||
howlong -= getskill(lf, SK_FIRSTAID);
|
||||
if (howlong <= 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
getflags(lf->flags, retflag, &nretflags, F_POISONED, F_NONE);
|
||||
|
@ -14426,9 +14465,19 @@ void poison(lifeform_t *lf, int howlong, enum POISONTYPE ptype, int power, char
|
|||
default:
|
||||
break;
|
||||
case P_WEAKNESS:
|
||||
f = addtempflag(lf->flags, F_ATTRMOD, A_STR, -power, NA, NULL, FROMPOISON);
|
||||
f = addtempflag(lf->flags, F_ATTRMOD, A_STR, -(power*10), NA, NULL, FROMPOISON);
|
||||
f->obfrom = ptype; // poison type
|
||||
break;
|
||||
case P_ROT:
|
||||
f = addtempflag(lf->flags, F_ATTRMOD, A_CHA, -(power*10), NA, NULL, FROMPOISON);
|
||||
f->obfrom = ptype;
|
||||
f = addtempflag(lf->flags, F_ATTRMOD, A_STR, -(power*5), NA, NULL, FROMPOISON);
|
||||
f->obfrom = ptype;
|
||||
f = addtempflag(lf->flags, F_ATTRMOD, A_CON, -(power*10), NA, NULL, FROMPOISON);
|
||||
f->obfrom = ptype;
|
||||
f = addtempflag(lf->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL, FROMPOISON);
|
||||
f->obfrom = ptype;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17358,7 +17407,7 @@ void startlfturn(lifeform_t *lf) {
|
|||
pt = findpoisontype(f->val[0]);
|
||||
// chance of fighting it off - gets easier over time.
|
||||
//
|
||||
if (skillcheck(lf, SC_POISON, (f->lifetime * 9), 0 )) {
|
||||
if ((f->lifetime > 0) && skillcheck(lf, SC_POISON, (f->lifetime * 9), 0 )) {
|
||||
killflag(f);
|
||||
} else {
|
||||
// chance of losing hp
|
||||
|
@ -17368,14 +17417,26 @@ void startlfturn(lifeform_t *lf) {
|
|||
// being asleep helps.
|
||||
|
||||
asleep = hasflag(lf->flags, F_ASLEEP);
|
||||
if (!asleep) {
|
||||
if (isplayer(lf)) {
|
||||
msg("^bYou %s violently.", pt->damverb);
|
||||
} else if (cansee(player, lf)) {
|
||||
char lfname[BUFLEN];
|
||||
if (!asleep && (isplayer(lf) || cansee(player, lf))) {
|
||||
char *p;
|
||||
char lfname[BUFLEN],lfnameposs[BUFLEN];
|
||||
getlfname(lf, lfname);
|
||||
msg("^%c%s %ss violently.",getlfcol(lf, CC_BAD), lfname, pt->damverb);
|
||||
sprintf(lfnameposs, "%s%s",lfname, getpossessive(lfname));
|
||||
|
||||
p = strdup(pt->damverb);
|
||||
if (isplayer(lf)) {
|
||||
p = strrep(p, "YOUR", "Your", NULL);
|
||||
p = strrep(p, "YOU", "You", NULL);
|
||||
p = strrep(p, "#S", "", NULL);
|
||||
} else {
|
||||
p = strrep(p, "YOUR", lfnameposs, NULL);
|
||||
p = strrep(p, "YOU", lfname, NULL);
|
||||
p = strrep(p, "#S", "s", NULL);
|
||||
}
|
||||
|
||||
msg("%s", p);
|
||||
free(p);
|
||||
|
||||
taketime(lf, getactspeed(lf));
|
||||
}
|
||||
|
||||
|
@ -17383,8 +17444,8 @@ void startlfturn(lifeform_t *lf) {
|
|||
losehp(lf, pt->dam * f->val[1], DT_DIRECT, NULL, buf);
|
||||
|
||||
if (!asleep) {
|
||||
if (pt->causesvomit) {
|
||||
addobfast(lf->cell->obpile, OT_VOMITPOOL);
|
||||
if (pt->vomitob != OT_NONE) {
|
||||
addobfast(lf->cell->obpile, pt->vomitob);
|
||||
}
|
||||
loseconcentration(lf);
|
||||
}
|
||||
|
@ -18598,7 +18659,7 @@ int touch(lifeform_t *lf, object_t *o) {
|
|||
}
|
||||
losehp(lf, dam, dt, NULL, buf);
|
||||
// drop the object if we're holding it
|
||||
if ((o->pile->owner == lf) && !isequipped(o)) {
|
||||
if ((o->pile->owner == lf) && isequipped(o)) {
|
||||
drop(o, ALL);
|
||||
}
|
||||
return B_TRUE;
|
||||
|
|
2
lf.h
2
lf.h
|
@ -3,7 +3,7 @@
|
|||
void addbodypart(race_t *r, enum BODYPART bp, char *name);
|
||||
lifeform_t *addlf(cell_t *cell, enum RACE rid, int level);
|
||||
lifeform_t *real_addlf(cell_t *cell, enum RACE rid, int level, int controller);
|
||||
poisontype_t *addpoisontype(enum POISONTYPE id, char *name, char *desc, char *damverb, int causesvomit, int dam, int dampct, enum POISONSEVERITY severity);
|
||||
poisontype_t *addpoisontype(enum POISONTYPE id, char *name, char *desc, char *damverb, enum OBTYPE vomitob, int dam, int dampct, enum POISONSEVERITY severity);
|
||||
job_t *addjob(enum JOB id, char *name, char *desc);
|
||||
race_t *addrace(enum RACE id, char *name, float weight, char glyph, int glyphcolour, enum MATERIAL mat, enum RACECLASS raceclass, char *desc);
|
||||
raceclass_t *addraceclass(enum RACECLASS id, char *name, char *pluralname, enum SKILL skill);
|
||||
|
|
23
map.c
23
map.c
|
@ -944,7 +944,7 @@ int autodoors(map_t *map, int roomid, int minx, int miny, int maxx, int maxy, in
|
|||
addflag(map->flags, F_ROOMEXIT, roomid, cell[sel]->x, cell[sel]->y, "from autodoors, forced at end");
|
||||
doorsadded++;
|
||||
}
|
||||
cell[sel]->isroomwall = d;
|
||||
cell[sel]->isroomwall = compassdir(d);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1128,7 +1128,7 @@ int adjcellokforreachability(cell_t *c, int srcroomid, int dir, int wantfilled)
|
|||
|
||||
// returns B_TRUE, B_FALSE or B_MAYBE
|
||||
int cellokforreachability(cell_t *startcell, cell_t *c, int srcroomid, int dir, int wantfilled, int *insameroom) {
|
||||
int db = B_TRUE;
|
||||
int db = B_FALSE;
|
||||
if (c->locked) {
|
||||
// locked cell. invalied.
|
||||
if (insameroom) *insameroom = B_FALSE;
|
||||
|
@ -1146,7 +1146,7 @@ int cellokforreachability(cell_t *startcell, cell_t *c, int srcroomid, int dir,
|
|||
// cell is in a different room, but not the correct edge
|
||||
// invalid
|
||||
if (insameroom) *insameroom = B_FALSE;
|
||||
if (db) dblog(" going %s hits wrong wall of different room. invalid.", getdirname(dir));
|
||||
if (db) dblog(" going %s hits wrong wall (%s) of different room. invalid.", getdirname(dir), getdirname(c->isroomwall));
|
||||
return B_FALSE;
|
||||
} else if (cellisfixedvaultwall(c)) {
|
||||
// cell is a wall of a maintain_edge vault, and not an exit cell
|
||||
|
@ -2077,7 +2077,7 @@ int countadjdoors(cell_t *cell) {
|
|||
for (d = DC_N; d <= DC_NW; d++) {
|
||||
cell_t *newcell;
|
||||
newcell = getcellindir(cell, d);
|
||||
if (newcell || hasobwithflag(newcell->obpile, F_DOOR)) {
|
||||
if (newcell && hasobwithflag(newcell->obpile, F_DOOR)) {
|
||||
doors++;
|
||||
}
|
||||
}
|
||||
|
@ -4230,12 +4230,15 @@ int linkexit(cell_t *startcell, int wantfilled, int *ncellsadded) {
|
|||
}
|
||||
}
|
||||
|
||||
assert(startdir != D_NONE);
|
||||
assert((startdir >= D_N) && (startdir <= D_W));
|
||||
|
||||
// figure out perpendicular dirs
|
||||
perpdir[0] = startdir - 1; if (perpdir[0] < D_N) perpdir[0] = D_W;
|
||||
perpdir[1] = startdir + 1; if (perpdir[1] > D_W) perpdir[1] = D_N;
|
||||
|
||||
assert(perpdir[0] != startdir);
|
||||
assert(perpdir[1] != startdir);
|
||||
|
||||
if (db) dblog(" Will walk %s (dist %d), checking %s and %s.", getdirname(startdir), maxdist,
|
||||
getdirname(perpdir[0]), getdirname(perpdir[1]));
|
||||
|
||||
|
@ -6225,7 +6228,7 @@ void initmap(void) {
|
|||
addcelltype(CT_FAKE, "fake cell", '.', C_GREEN, B_EMPTY, B_TRANS, MT_STONE, 0, -1);
|
||||
addcelltype(CT_CORRIDOR, "rock floor", '.', C_GREY, B_EMPTY, B_TRANS, MT_STONE, 0, -1);
|
||||
addcelltype(CT_LOOPCORRIDOR, "rock floor", 'L', C_GREY, B_EMPTY, B_TRANS, MT_STONE, 0, -1);
|
||||
addcelltype(CT_FLOORCARPET, "carpetted floor", '.', C_YELLOW, B_EMPTY, B_TRANS, MT_CLOTH, 0, -1);
|
||||
addcelltype(CT_FLOORCARPET, "carpetted floor", '.', C_RED, B_EMPTY, B_TRANS, MT_CLOTH, 0, -1);
|
||||
addcelltype(CT_FLOORWOOD, "wood floor", '.', C_BROWN, B_EMPTY, B_TRANS, MT_WOOD, 0, -1);
|
||||
addcelltype(CT_FLOORFLESH, "flesh floor", '.', C_RED, B_EMPTY, B_TRANS, MT_FLESH, 0, -1);
|
||||
addcelltype(CT_FLOORSHOP, "shop floor", '.', C_BROWN, B_EMPTY, B_TRANS, MT_WOOD, 0, -1);
|
||||
|
@ -6960,7 +6963,7 @@ void markroomwalls(map_t *m, room_t *r) {
|
|||
if (c->type->solid) {
|
||||
c2 = getcellindir(c, DC_S);
|
||||
if (c2 && !c2->type->solid) {
|
||||
c->isroomwall = DC_N;
|
||||
c->isroomwall = D_N;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6972,7 +6975,7 @@ void markroomwalls(map_t *m, room_t *r) {
|
|||
if (c->type->solid) {
|
||||
c2 = getcellindir(c, DC_W);
|
||||
if (c2 && !c2->type->solid) {
|
||||
c->isroomwall = DC_E;
|
||||
c->isroomwall = D_E;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6984,7 +6987,7 @@ void markroomwalls(map_t *m, room_t *r) {
|
|||
if (c->type->solid) {
|
||||
c2 = getcellindir(c, DC_N);
|
||||
if (c2 && !c2->type->solid) {
|
||||
c->isroomwall = DC_S;
|
||||
c->isroomwall = D_S;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6996,7 +6999,7 @@ void markroomwalls(map_t *m, room_t *r) {
|
|||
if (c->type->solid) {
|
||||
c2 = getcellindir(c, DC_E);
|
||||
if (c2 && !c2->type->solid) {
|
||||
c->isroomwall = DC_W;
|
||||
c->isroomwall = D_W;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
22
nexus.c
22
nexus.c
|
@ -425,6 +425,28 @@ int main(int argc, char **argv) {
|
|||
identify(sb1);
|
||||
identify(sb2);
|
||||
}
|
||||
//////////////////////
|
||||
|
||||
// select alignment?
|
||||
f = hasflagval(player->flags, F_ALIGNMENT, AL_NONE, NA, NA, NULL);
|
||||
if (f) {
|
||||
char buf2[BUFLEN],ch;
|
||||
getplayername(buf2);
|
||||
snprintf(buf, BUFLEN, "%s, select your alignment:", buf2);
|
||||
initprompt(&prompt, buf);
|
||||
if (strchr(f->text, 'g')) addchoice(&prompt, 'g', "Good", NULL, NULL, NULL);
|
||||
if (strchr(f->text, 'n')) addchoice(&prompt, 'n', "Neutral", NULL, NULL, NULL);
|
||||
if (strchr(f->text, 'e')) addchoice(&prompt, 'e', "Evil", NULL, NULL, NULL);
|
||||
ch = getchoice(&prompt);
|
||||
switch (ch) {
|
||||
case 'g': f->val[0] = AL_GOOD; break;
|
||||
case 'e': f->val[0] = AL_EVIL; break;
|
||||
default:
|
||||
case 'n': f->val[0] = AL_NEUTRAL; break;
|
||||
}
|
||||
free(f->text);
|
||||
f->text = strdup("");
|
||||
}
|
||||
|
||||
// read cheat info from player file
|
||||
if (playerfile) {
|
||||
|
|
28
objects.c
28
objects.c
|
@ -458,6 +458,7 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int wantlinkholes
|
|||
brand_t *br;
|
||||
obmod_t *om;
|
||||
obmod_t *wantom[MAXOBMODS];
|
||||
int wanthot = B_FALSE;
|
||||
regionthing_t *wantregionthing = NULL;
|
||||
int bonus = 0;
|
||||
int nom = 0;
|
||||
|
@ -636,6 +637,11 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int wantlinkholes
|
|||
wantblessed = B_CURSED;
|
||||
p += strlen("cursed ");
|
||||
donesomething = B_TRUE;
|
||||
// flags
|
||||
} else if (strstarts(p, "red-hot ")) {
|
||||
wanthot = B_TRUE;
|
||||
p += strlen("red-hot ");
|
||||
donesomething = B_TRUE;
|
||||
// armour flags
|
||||
} else if (strstarts(p, "gargantuan ")) {
|
||||
wantarmsize = SZ_ENORMOUS;
|
||||
|
@ -1328,6 +1334,10 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int wantlinkholes
|
|||
if (o && hasflag(o->flags, F_LIGHTSOURCE) && wantlit) {
|
||||
turnon(NULL, o);
|
||||
}
|
||||
// hot?
|
||||
if (o && wanthot) {
|
||||
addflag(o->flags, F_HOT, 3, NA, NA, "1d4");
|
||||
}
|
||||
|
||||
// firearms usually come loaded
|
||||
if (o && isfirearm(o)) {
|
||||
|
@ -4341,6 +4351,7 @@ int getmaterialvalue(enum MATERIAL mat) {
|
|||
case MT_FIRE:
|
||||
case MT_GAS:
|
||||
case MT_ACID:
|
||||
case MT_DIRT:
|
||||
return 0;
|
||||
case MT_WIRE:
|
||||
case MT_FOOD:
|
||||
|
@ -10009,6 +10020,8 @@ void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE
|
|||
if (i > 0) {
|
||||
modhunger(lf, -i);
|
||||
}
|
||||
// fix diseases (even magical ones)
|
||||
killflagsofid(lf->flags, F_POISONED);
|
||||
// fix hp
|
||||
if (lf->hp < lf->maxhp) {
|
||||
gainhp(lf, lf->maxhp); // ie. full hp
|
||||
|
@ -10237,6 +10250,8 @@ void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE
|
|||
failed = B_FALSE;
|
||||
}
|
||||
}
|
||||
// fix diseases (even magical ones)
|
||||
killflagsofid(lf->flags, F_POISONED);
|
||||
// blessed restores hp/mp to full
|
||||
if (potblessed == B_BLESSED) {
|
||||
hpheal = lf->maxhp;
|
||||
|
@ -10881,6 +10896,8 @@ int readsomething(lifeform_t *lf, object_t *o) {
|
|||
|
||||
} else if (o->type->id == OT_SCR_REMOVECURSE) {
|
||||
int seen = B_FALSE;
|
||||
flag_t *retflag[MAXCANDIDATES];
|
||||
int i,nretflags = 0;
|
||||
object_t *oo;
|
||||
// remove curses!
|
||||
for (oo = lf->pack->first ; oo ; oo = oo->next) {
|
||||
|
@ -10893,6 +10910,17 @@ int readsomething(lifeform_t *lf, object_t *o) {
|
|||
}
|
||||
}
|
||||
}
|
||||
// fix player curses
|
||||
getflags(lf->flags, retflag, &nretflags, F_POISONED, F_NONE);
|
||||
for (i = 0; i < nretflags; i++) {
|
||||
poisontype_t *pt;
|
||||
pt = findpoisontype(retflag[i]->val[0]);
|
||||
if (pt->severity == PS_CURSE) {
|
||||
} else {
|
||||
killflag(retflag[i]);
|
||||
if (isplayer(lf) || cansee(player, lf)) seen = B_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (seen) {
|
||||
// id the scroll now
|
||||
|
|
3
shops.c
3
shops.c
|
@ -979,7 +979,8 @@ enum SHOPRETURN shopresize(lifeform_t *lf, object_t *vm, int starty, char *topte
|
|||
mvwprintw(mainwin, y, 0, "For just $%d per item, we can resize weapons or armour to fit you.", resizecost); y ++;
|
||||
mvwprintw(mainwin, y, 0, "(item quality will not be affected)"); y += 2;
|
||||
if (countmoney(player->pack) < resizecost) {
|
||||
mvwprintw(mainwin, y, 0, "Sadly, you cannot afford the resizing fee.");
|
||||
mvwprintw(mainwin, y, 0, "Sadly, you cannot afford the resizing fee."); y += 2;
|
||||
mvwprintw(mainwin, y, 0, "[Press a key to return]");
|
||||
getch();
|
||||
return SR_BACK;
|
||||
} else {
|
||||
|
|
112
spell.c
112
spell.c
|
@ -4603,6 +4603,10 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
|
||||
dam = rnd(1,exposedlimbs);
|
||||
|
||||
if (isplayer(target)) {
|
||||
msg("The air around you feels icy cold!");
|
||||
}
|
||||
|
||||
if (isplayer(target)) {
|
||||
if (isimmuneto(target->flags, DT_COLD, B_FALSE)) {
|
||||
msg("You feel mildly chilly.");
|
||||
|
@ -4972,19 +4976,73 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
return B_TRUE;
|
||||
}
|
||||
} else if (spellid == OT_S_CUREPOISON) {
|
||||
flag_t *retflag[MAXCANDIDATES];
|
||||
int nretflags,i,donesomething = B_FALSE;
|
||||
target = targcell->lf;
|
||||
if (!target) {
|
||||
fizzle(caster);
|
||||
return B_TRUE;
|
||||
}
|
||||
killflagsofid(target->flags, F_POISONED);
|
||||
|
||||
if (cansee(player, target)) {
|
||||
if (seenbyplayer) *seenbyplayer = B_TRUE;
|
||||
getflags(target->flags, retflag, &nretflags, F_POISONED, F_NONE);
|
||||
for (i = 0; i < nretflags; i++) {
|
||||
poisontype_t *pt;
|
||||
pt = findpoisontype(retflag[i]->val[0]);
|
||||
if (pt->severity == PS_CURSE) {
|
||||
} else {
|
||||
killflag(retflag[i]);
|
||||
donesomething = B_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (donesomething && cansee(player, target)) {
|
||||
if (seenbyplayer) *seenbyplayer = B_TRUE;
|
||||
if (isplayer(caster) && !frompot) {
|
||||
pleasegodmaybe(R_GODLIFE, 3);
|
||||
}
|
||||
} else {
|
||||
fizzle(caster);
|
||||
}
|
||||
} else if (spellid == OT_S_CURSE) {
|
||||
int ndone = 0,i;
|
||||
object_t *o,*poss[MAXPILEOBS];
|
||||
int nposs = 0;
|
||||
if (!target) target = targcell->lf;
|
||||
if (!target) {
|
||||
fizzle(caster);
|
||||
return B_TRUE;
|
||||
}
|
||||
for (o = target->pack->first ; o ; o = o->next) {
|
||||
if (isequipped(o) && !iscursed(o) && !hasflag(o->flags, F_NOBLESS)) {
|
||||
poss[nposs++] = o;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0 ; nposs && (i < power); i++) {
|
||||
int n;
|
||||
// pick a random one
|
||||
o = poss[rnd(0,nposs-1)];
|
||||
curseob(o);
|
||||
if (o->blessed == B_CURSED) {
|
||||
// also apply a penalty
|
||||
if (isweapon(o) || isarmour(o)) {
|
||||
modbonus(o, -1);
|
||||
}
|
||||
}
|
||||
// remove this from the list
|
||||
for (n = i; n < nposs-1; n++) {
|
||||
poss[n] = poss[n+1];
|
||||
}
|
||||
nposs--;
|
||||
ndone++;
|
||||
}
|
||||
if (ndone) {
|
||||
if (isplayer(target) || cansee(player, target)) {
|
||||
if (seenbyplayer) *seenbyplayer = B_TRUE;
|
||||
}
|
||||
} else {
|
||||
fizzle(caster);
|
||||
return B_TRUE;
|
||||
}
|
||||
} else if (spellid == OT_S_DARKNESS) {
|
||||
if (!targcell) targcell = caster->cell;
|
||||
// centre on the caster
|
||||
|
@ -6498,10 +6556,19 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
if (killflagsofid(target->flags, F_PAIN)) {
|
||||
donesomething = B_TRUE;
|
||||
}
|
||||
if (killflagsofid(target->flags, F_POISONED)) {
|
||||
getflags(target->flags, retflag, &nretflags, F_POISONED, F_NONE);
|
||||
for (i = 0; i < nretflags; i++) {
|
||||
poisontype_t *pt;
|
||||
pt = findpoisontype(retflag[i]->val[0]);
|
||||
if (pt->severity == PS_CURSE) {
|
||||
} else {
|
||||
killflag(retflag[i]);
|
||||
donesomething = B_TRUE;
|
||||
if (seenbyplayer) *seenbyplayer = B_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!lfhasflagval(target, F_POISONED, P_ROT, NA, NA, NULL)) {
|
||||
// severed body parts
|
||||
getflags(target->flags, retflag, &nretflags, F_INJURY, F_NOBODYPART, F_NONE);
|
||||
for (i = 0; i < nretflags; i++) {
|
||||
|
@ -6529,12 +6596,13 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
donesomething = B_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((spellid == OT_S_HEALINGMIN) && donesomething) {
|
||||
// minor healing will stop here
|
||||
} else {
|
||||
if (target->hp < target->maxhp) {
|
||||
int min,max;
|
||||
int min,max,amt;
|
||||
switch (spellid) {
|
||||
case OT_S_HEALINGMIN:
|
||||
default:
|
||||
|
@ -6547,8 +6615,12 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
min = 20; max = 30;
|
||||
break;
|
||||
}
|
||||
gainhp(target, getspellduration(min,max,blessed) + (power*2));
|
||||
|
||||
amt = getspellduration(min,max,blessed) + (power*2);
|
||||
if (lfhasflagval(target, F_POISONED, P_ROT, NA, NA, NULL)) {
|
||||
amt /= 10;
|
||||
}
|
||||
if (amt > 0) {
|
||||
gainhp(target, amt);
|
||||
if (isplayer(target)) {
|
||||
if (target->hp >= target->maxhp) {
|
||||
switch (spellid) {
|
||||
|
@ -6583,6 +6655,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
msg("%s looks healthier!", buf);
|
||||
if (seenbyplayer) *seenbyplayer = B_TRUE;
|
||||
}
|
||||
}
|
||||
donesomething = B_TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -6707,7 +6780,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
fizzle(target);
|
||||
return B_TRUE;
|
||||
}
|
||||
f = addtempflag(caster->flags, F_HEAVENARM, power*10, NA, NA, "divine armour", FROMSPELL);
|
||||
f = addtempflag(target->flags, F_HEAVENARM, power*10, NA, NA, "divine armour", FROMSPELL);
|
||||
f->obfrom = spellid;
|
||||
} else if (spellid == OT_S_HOLDPORTAL) {
|
||||
object_t *o,*oo;
|
||||
|
@ -8734,6 +8807,16 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
fizzle(caster);
|
||||
return B_TRUE;
|
||||
}
|
||||
} else if ((spellid == OT_S_PROTGOOD) || (spellid == OT_S_PROTEVIL)) {
|
||||
flag_t *f;
|
||||
if (!targcell) targcell = caster->cell;
|
||||
target = targcell->lf;
|
||||
if (!target) {
|
||||
fizzle(caster);
|
||||
return B_TRUE;
|
||||
}
|
||||
f = addtempflag(target->flags, F_PROTALIGN, 5+(power*2), (spellid == OT_S_PROTGOOD) ? AL_GOOD : AL_EVIL, NA, NULL, FROMSPELL);
|
||||
f->obfrom = spellid;
|
||||
} else if (spellid == OT_S_PURIFYFOOD) {
|
||||
object_t *o,*nexto;
|
||||
obpile_t *op;
|
||||
|
@ -8971,6 +9054,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
if (f->id == F_POISONED) {
|
||||
poisontype_t *pt;
|
||||
pt = findpoisontype(f->val[0]);
|
||||
if (pt->severity != PS_CURSE) {
|
||||
// slightly lower time
|
||||
if (f->lifetime > 1) {
|
||||
f->lifetime--;
|
||||
|
@ -8983,6 +9067,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
ndone++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ndone) {
|
||||
if (seenbyplayer) *seenbyplayer = B_TRUE;
|
||||
} else {
|
||||
|
@ -11482,8 +11567,8 @@ int getspellpower(lifeform_t *lf, enum OBTYPE spellid) {
|
|||
if (isplayer(lf)) {
|
||||
int maxspelllevel = MAXSPELLLEV;
|
||||
// if (hasjob(lf, J_DRUID) && (school == SS_NATURE)) {
|
||||
if ((school == SS_ALLOMANCY) || (school == SS_MENTAL)) {
|
||||
} else {
|
||||
//if ((school == SS_ALLOMANCY) || (school == SS_MENTAL)) {
|
||||
//} else {
|
||||
switch (schoolskill) {
|
||||
case PR_INEPT: maxspelllevel = 0; break;
|
||||
case PR_NOVICE: maxspelllevel = 1; break;
|
||||
|
@ -11493,7 +11578,7 @@ int getspellpower(lifeform_t *lf, enum OBTYPE spellid) {
|
|||
case PR_EXPERT: maxspelllevel = 5; break;
|
||||
case PR_MASTER: maxspelllevel = 6; break;
|
||||
}
|
||||
}
|
||||
//}
|
||||
// player can only ever cast spells up to your level.
|
||||
if (!hasjob(lf, J_GOD)) limit(&maxspelllevel, NA, lf->level);
|
||||
|
||||
|
@ -11519,6 +11604,9 @@ int getspellpower(lifeform_t *lf, enum OBTYPE spellid) {
|
|||
} else if (school == SS_NATURE) {
|
||||
// +/- 1 for wisdom
|
||||
power += (getstatmod(lf, A_WIS) / 50);
|
||||
} else if (school == SS_ALLOMANCY) {
|
||||
// +/- 1 for strength
|
||||
power += (getstatmod(lf, A_STR) / 50);
|
||||
// TODO: clerical +/- 2 for wisdom
|
||||
} else {
|
||||
// +/- 1 for iq
|
||||
|
|
11
text.c
11
text.c
|
@ -388,6 +388,17 @@ int getaccuracynum(int accpct) {
|
|||
return num;
|
||||
}
|
||||
|
||||
char *getalignmentname(enum ALIGNMENT al) {
|
||||
switch (al) {
|
||||
case AL_NONE: return "none";
|
||||
case AL_GOOD: return "good";
|
||||
case AL_NEUTRAL: return "neutral";
|
||||
case AL_EVIL: return "evil";
|
||||
default: break;
|
||||
}
|
||||
return "?unknown_align?";
|
||||
}
|
||||
|
||||
// returns a const char *
|
||||
char *getattackverb(lifeform_t *lf, object_t *wep, enum DAMTYPE damtype, int dam, int maxhp) {
|
||||
//float pct;
|
||||
|
|
1
text.h
1
text.h
|
@ -10,6 +10,7 @@ int flip(int ch);
|
|||
char *getaccuracyname(int accpct);
|
||||
int getaccuracymodnum(int accmodpct);
|
||||
int getaccuracynum(int accpct);
|
||||
char *getalignmentname(enum ALIGNMENT al);
|
||||
char *getattackverb(lifeform_t *lf, object_t *wep, enum DAMTYPE damtype, int dam, int maxhp);
|
||||
char *getattrabbrev(enum ATTRIB att);
|
||||
char *getattrname(enum ATTRIB att);
|
||||
|
|
Loading…
Reference in New Issue