- [+] better alignment picking
- [+] only show valid alignment choices (ie. race & job & subjob alignments don't conflict) - [+] don't show subjobs which aren't valid (ie. vell warrior/paladin) - [+] don't shows jobs which aren't valid (ie. vell druid) - [+] monsters with low wisdom should be able to flee into dangerous cells - [+] ie. wisdom < average - [+] allow selecting your subjob directly, instead of haveing to pick your base job first - [+] restrict low level monsters to only "common" weapons - [+] make consumesouls only work in a given distance - [+] bug: player start room not being linked to rest of map - [+] hawks etc can't swoop away if they somehow get killed/fall asleep during their attack - [+] use adverbs when describing misses ("narrowly miss" "wildly miss" ) - [+] make map light level (well lit etc) determine: - [+] visibility range (remove this from habitat!) - [+] stealth check modifier - [+] show material vulnerabilities in EFFECTS - [+] poison checks are too easy. i had fitness 33 and passed in 1 turn! - [+] i know this is baed on timeleft, so maybe make timeleft count for more ? - [+] bug: infinite loop when player fleeing - [+] imp - [+] TR2 - [+] damage low (sting) - [+] invisibility - [+] immune to cold, fire, electric - [+] magic resist (demon) - [+] regnerate 1hp per turn - [+] remove "modification" school with "wild" - [+] prevent constant 6th sense warnings when something is chasing you - [+] speak with dead should be a divination spell, not death. - [+] hecta worshippers get bonusses for bone weapons - +1 damage. - [+] same with Ekrub and wood weapons
This commit is contained in:
parent
e805e9dc01
commit
c06ebff882
49
attack.c
49
attack.c
|
@ -759,6 +759,7 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag)
|
|||
int aidb = B_FALSE;
|
||||
flag_t *f;
|
||||
enum BODYPART critpos = BP_NONE;
|
||||
int missby = 0;
|
||||
|
||||
if (wep) {
|
||||
wepsk = getobskill(wep->flags);
|
||||
|
@ -890,7 +891,7 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag)
|
|||
// did you hit?
|
||||
ndam = 0;
|
||||
|
||||
hit = rolltohit(lf, victim, wep, &critical, &fumble);
|
||||
hit = rolltohit(lf, victim, wep, &critical, &fumble, &missby);
|
||||
if (lfhasflag(victim, F_HEAVENARM)) {
|
||||
critical = B_FALSE;
|
||||
}
|
||||
|
@ -1036,15 +1037,24 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag)
|
|||
// modify for size
|
||||
modifyforsize(&dam[0], lf, victim, 10, M_PCT);
|
||||
|
||||
// hecta worshippers get bonus for bone weapons
|
||||
if (wep && isplayer(lf)) {
|
||||
int matbonus = 0;
|
||||
if ((wep->material->id == MT_BONE) && godprayedto(R_GODDEATH)) {
|
||||
matbonus = rnd(1,2);
|
||||
} else if ((wep->material->id == MT_WOOD) && godprayedto(R_GODNATURE)) {
|
||||
matbonus = rnd(1,2);
|
||||
}
|
||||
dam[0] += matbonus;
|
||||
}
|
||||
|
||||
// backstab?
|
||||
if (willbackstab(lf, victim, wep)) {
|
||||
//addflag(victim->flags, F_STABBEDBY, lf->id, NA, NA, NULL);
|
||||
dam[0] *= (getskill(lf, SK_BACKSTAB));
|
||||
firstisbackstab = B_TRUE;
|
||||
}
|
||||
|
||||
} else if (lfhasflag(victim, F_ASLEEP)) {
|
||||
// target asleep?
|
||||
if (lfhasflag(victim, F_ASLEEP)) {
|
||||
dam[0] *= 2;
|
||||
}
|
||||
|
||||
|
@ -1072,7 +1082,6 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag)
|
|||
getextradamwep(wep, &dam[0], &damtype[0], &ndam, B_FALSE);
|
||||
getextradamlf(lf, &dam[0], &damtype[0], &ndam, B_FALSE);
|
||||
}
|
||||
|
||||
} else {
|
||||
hit = B_FALSE;
|
||||
ndam = 0;
|
||||
|
@ -1191,14 +1200,13 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag)
|
|||
cell_t *adj;
|
||||
int candodge = B_FALSE;
|
||||
|
||||
if (isplayer(victim)) {
|
||||
if (getstamina(victim)) {
|
||||
if (isplayer(victim)) {
|
||||
candodge = B_TRUE;
|
||||
}
|
||||
} else if (onein(3)) {
|
||||
candodge = B_TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
if (candodge) {
|
||||
adj = getdodgecell(victim);
|
||||
if (adj) {
|
||||
|
@ -1551,16 +1559,24 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag)
|
|||
buf, getpossessive(buf));
|
||||
}
|
||||
} else {
|
||||
char missamt[BUFLEN];
|
||||
flag_t *anticipated = NULL;
|
||||
anticipated = lfhasflagval(victim, F_ANTICIPATE, lf->id, NA, NA, NULL);
|
||||
if (anticipated || (missby >= 50)) {
|
||||
strcpy(missamt, "wildly ");
|
||||
} else if (missby <= 10) {
|
||||
strcpy(missamt, "narrowly ");
|
||||
} else {
|
||||
strcpy(missamt, "");
|
||||
}
|
||||
if (isplayer(lf)) {
|
||||
msg("You %smiss %s.", anticipated ? "wildly " : "", victimname);
|
||||
msg("You %smiss %s.", missamt, victimname);
|
||||
} else {
|
||||
if (cansee(player, lf)) {
|
||||
// capitalise first letter
|
||||
snprintf(buf, BUFLEN, "%s",attackername);
|
||||
|
||||
msg("%s %smisses %s.", buf, anticipated ? "wildly " : "", victimname);
|
||||
msg("%s %smisses %s.", buf, missamt, victimname);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2742,7 +2758,7 @@ void modifyforsize(int *val, lifeform_t *lf, lifeform_t *victim, int howmuch, en
|
|||
}
|
||||
|
||||
// returns true if we hit. also sets 'critical' if passed
|
||||
int rolltohit(lifeform_t *lf, lifeform_t *victim, object_t *wep, int *critical, int *fumble) {
|
||||
int rolltohit(lifeform_t *lf, lifeform_t *victim, object_t *wep, int *critical, int *fumble, int *missby) {
|
||||
int acc,baseacc,ev;
|
||||
int gothit = B_FALSE;
|
||||
enum SKILLLEVEL lorelev = PR_INEPT;
|
||||
|
@ -2751,6 +2767,7 @@ int rolltohit(lifeform_t *lf, lifeform_t *victim, object_t *wep, int *critical,
|
|||
// default
|
||||
if (critical) *critical = 0;
|
||||
if (fumble) *fumble = B_FALSE;
|
||||
if (missby) *missby = 0;
|
||||
|
||||
// anticipate action spell?
|
||||
if (lfhasflagval(victim, F_ANTICIPATE, lf->id, NA, NA, NULL)) {
|
||||
|
@ -2772,6 +2789,7 @@ int rolltohit(lifeform_t *lf, lifeform_t *victim, object_t *wep, int *critical,
|
|||
// forced critical?
|
||||
gothit = B_TRUE;
|
||||
} else {
|
||||
int myroll;
|
||||
int reachpenalty = 0;
|
||||
// actually roll...
|
||||
baseacc = getlfaccuracy(lf, wep);
|
||||
|
@ -2833,7 +2851,13 @@ int rolltohit(lifeform_t *lf, lifeform_t *victim, object_t *wep, int *critical,
|
|||
limit(&acc, 0, 100);
|
||||
|
||||
//if (aidb) dblog(".oO { my modified chance to hit is %d %% }", acc);
|
||||
if (pctchance(acc)) gothit = B_TRUE;
|
||||
myroll = rnd(1,100);
|
||||
if (myroll <= acc) {
|
||||
gothit = B_TRUE;
|
||||
} else {
|
||||
gothit = B_FALSE;
|
||||
if (missby) *missby = myroll - acc;
|
||||
}
|
||||
}
|
||||
|
||||
// critical chance
|
||||
|
@ -2870,6 +2894,7 @@ int rolltohit(lifeform_t *lf, lifeform_t *victim, object_t *wep, int *critical,
|
|||
}
|
||||
if (nfailed >= nrolls) {
|
||||
*fumble = B_TRUE;
|
||||
if (missby) *missby = 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
2
attack.h
2
attack.h
|
@ -29,5 +29,5 @@ int getstrdammod(lifeform_t *lf);
|
|||
int ismeleedam(enum DAMTYPE damtype);
|
||||
int isphysicaldam(enum DAMTYPE damtype);
|
||||
void modifyforsize(int *val, lifeform_t *lf, lifeform_t *victim, int howmuch, enum MODTYPE how);
|
||||
int rolltohit(lifeform_t *lf, lifeform_t *victim, object_t *wep, int *critical, int *fumble);
|
||||
int rolltohit(lifeform_t *lf, lifeform_t *victim, object_t *wep, int *critical, int *fumble, int *missby);
|
||||
void wepeffects(flagpile_t *fp, cell_t *where, flag_t *damflag, int dam, int isunarmed);
|
||||
|
|
439
data.c
439
data.c
|
@ -227,7 +227,7 @@ void initjobs(void) {
|
|||
addsubjob(SJ_PALADIN, "Paladin", "Paladins are holy warriors dedicated to the Goddess of Life. They gain powerful abilities and have access to healing magics, but these powers are dependant upon their goddess' approval. Paladins must take holy vows to only ever use battle equipiment which has first been blessed.", 'p');
|
||||
addsubjob(SJ_SCOURGE, "Scourge", "Scourges have dedicated their life to ridding the world of magic. Strict training has granted them an innate immunity to magic, but this immunity also extends to beneficial effects.", 's');
|
||||
addsubjob(SJ_AIRMAGE, "Skymage", "Initially the weakest of the mages, higher level Skymages become both extremely versatile and extremely power.", 's');
|
||||
addsubjob(SJ_WILDMAGE, "Wild Mage", "Wild mages specialise in the random power of wild magic.", 'w');
|
||||
addsubjob(SJ_WILDMAGE, "Wild Mage", "Wild mages specialise in the random power of Wild magic.", 'w');
|
||||
|
||||
// job definitions
|
||||
|
||||
|
@ -842,7 +842,6 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_CANLEARN, SK_TWOWEAPON, PR_EXPERT, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_UNARMED, PR_EXPERT, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_SS_DIVINATION, PR_ADEPT, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_SS_MODIFICATION, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_SS_MENTAL, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_SS_TRANSLOCATION, PR_ADEPT, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_LORE_ARCANA, PR_ADEPT, NA, NULL);
|
||||
|
@ -943,7 +942,6 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_SS_DIVINATION, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SS_FIRE, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SS_COLD, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SS_MODIFICATION, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SS_SUMMONING, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SS_TRANSLOCATION, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SS_WILD, PR_NOVICE, NA, NULL);
|
||||
|
@ -3780,7 +3778,6 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_ALLY, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
addot(OT_S_FREEZEOB, "freezing touch", "Changes the next thing touched into solid ice. The effect is permenant for inanimate objects, but will wear off on living creatures.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_COLD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, NA, NA, NULL);
|
||||
|
@ -3893,7 +3890,7 @@ void initobjects(void) {
|
|||
///////////////////
|
||||
// l1
|
||||
addot(OT_S_CALMANIMALS, "calm animals", "Makes animals within the casters line of sight become peaceful.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell's power determines how many hit dice worth of creatures will be affected.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell's power determines how many TR worth of creatures will be affected.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_NATURE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MENTAL, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
|
@ -3914,7 +3911,7 @@ void initobjects(void) {
|
|||
addot(OT_S_STICKTOSNAKE, "sticks to snakes", "Transforms all rod-shaped objects in sight into allied snakes.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "This spell does not affect the caster's equipment.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_NATURE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 1, NA, NA, NULL);
|
||||
// l2
|
||||
|
@ -3924,7 +3921,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_ONGOING, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, NA, NA, NULL);
|
||||
addot(OT_S_CHARMANIMAL, "befriend animal", "Temporarily makes a single animal friendly to you.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell's power determines how the maximum hit dice creature which can be affected.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell's power determines the maximum enemy TR which can be affected.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_NATURE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
|
@ -4149,7 +4146,7 @@ void initobjects(void) {
|
|||
addot(OT_S_SPEAKDEAD, "speak with dead", "When one stands upon a corpse and casts this spell, the corpse will temporarily be able to answer questions about its former life.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell will only function correctly on races capable of speech.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_LIFE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_DEATH, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_DIVINATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
|
||||
addot(OT_S_SMITEEVIL, "smite evil", "Instantly deals 1-^bpower*2^n damage to evil creatures.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
|
@ -4347,171 +4344,12 @@ 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_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
///////////////////
|
||||
// modification
|
||||
///////////////////
|
||||
// l1
|
||||
addot(OT_S_OBJECTGROWTH, "enlarge object", "Causes the target object to grow to an enormous size.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_OBJECT, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
addot(OT_S_HOLDPORTAL, "seal entrance", "Magically closes and jams a door, preventing it from opening.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_DOOR, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
//addot(OT_S_INSCRIBE, "inscribe", "Creates a magical inscription viewable to anyone standing nearby.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
//addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
//addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
addot(OT_S_KNOCK, "knock", "Magically opens doors or other such barriers.\n", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At Power VII, this spell will also knock back living creatures.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_DOOR|TT_IMPASSABLE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
addflag(lastot->flags, F_PLEASESGOD, R_GODTHIEVES, 5, NA, NULL);
|
||||
addot(OT_S_LIGHT, "light area", "Creates a temporary light source centred on the caster.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At Power III, you can control where the light appears.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At Power V, the light will blind creatures with night vision.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At Power VIII, the light becomes permenant.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_LIFE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_NATURE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_ANYWHERE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_FALSE, LOF_DONTNEED, NA, NULL);
|
||||
addot(OT_S_CREATEWATER, "create water", "Creates a large pool of shallow water.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell's power determines the size of the pool.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_NATURE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, 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_AICASTTOFLEE, ST_VICTIM, NA, NA, NULL);
|
||||
// l2
|
||||
addot(OT_S_OBJECTSHRINK, "shrink object", "Causes the target object to shrink to a tiny size.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_OBJECT, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
addot(OT_S_SIZEUP, "unnatural growth", "Causes the target's body to grow in size. They will become easier to hit, but deal more damage.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines how long the effect will last.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At power level V, self-targetted spells will also resize your armour.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 5, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, NA, NA, NULL);
|
||||
addot(OT_S_SIZEDOWN, "unnatural shrinkage", "Causes the target's body to shrink in size. They will deal less damage, but become harder to hit.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines how long the effect will last.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At power level V, self-targetted spells will also resize your armour.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 5, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addot(OT_S_MIRRORIMAGE, "mirror image", "Creates ^bpower^n illusionary clones of the caster to distract enemies. These clones cannot deal damage, and vanish when hit.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines how many clones are created, and how many hits they can sustain.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_VARPOWER, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_FALSE, LOF_DONTNEED, NA, NULL);
|
||||
addot(OT_S_DARKNESS, "darkness", "Permenantly darkens the area around the caster.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At Power III, you can control where the darkness appears.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At Power VIII, the darkness becomes permenant.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_ANYWHERE, NA, NA, NULL);
|
||||
addot(OT_S_MENDING, "mending", "Repairs minor damage to objects (1d6 + ^bpower^n).", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_NATURE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
|
||||
addot(OT_S_GREASE, "grease", "Creates a large pool of greasy oil.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell's power determines the size of the grease pool.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, 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_AICASTTOFLEE, ST_VICTIM, NA, NA, NULL);
|
||||
|
||||
// l3
|
||||
addot(OT_S_INVISIBILITY, "invisibility", "Temporarily renders the target invisible.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell's power determines how long the invisibility will last.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 3, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOFLEE, ST_SELF, NA, NA, NULL);
|
||||
//addflag(lastot->flags, F_XPVAL, 50, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_LFSSTOP, NA, NULL);
|
||||
addot(OT_S_PASSWALL, "passwall", "Allows the caster to temporarily walk through a single wall.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell's power determines how long the caster can wait before entering a wall.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_TRANSLOCATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOFLEE, ST_SELF, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ONGOING, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 3, NA, NA, NULL);
|
||||
addot(OT_S_ANIMATESTATUE, "animate statue", "Temporarily brings a statue to life, under control of the caster. Also stops stoning.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell only affects stone which is in the form of a living creature.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_OBJECT|TT_PLAYER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_RANGE, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 3, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
addflag(lastot->flags, F_PLEASESGOD, R_GODNATURE, 25, NA, NULL);
|
||||
// l4
|
||||
addot(OT_S_EXCAVATE, "excavate", "Creates a large open area surrounding the caster. No effect on living creatures.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 4, NA, NA, NULL);
|
||||
addot(OT_S_SHAPESHIFT, "shapeshift", "Causes the caster to take on the form of any creature within sight.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines how powerful a creature you can become.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 4, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, 10, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOFLEE, ST_SELF, NA, NA, NULL);
|
||||
// l5
|
||||
addot(OT_S_GASEOUSFORM, "gaseous form", "Changes the caster into a cloud of gas.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_NATURE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 5, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOFLEE, ST_SELF, NA, NA, NULL);
|
||||
addot(OT_S_QUICKENSTONE, "quicken stone", "Crafts nearby stone into powerful stone primalities.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines how many creatures will be created.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At power level VI, stronger creatures will be created.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 8, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 5, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_ANYWHERE, NA, NA, NULL);
|
||||
// l6
|
||||
addot(OT_S_ENCHANT, "enhancement", "Magically enhances a weapon or piece of armour.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_MAXPOWER, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 6, NA, NA, NULL);
|
||||
// TODO: hardcode how ai casts this spell
|
||||
addot(OT_S_PETRIFY, "petrify", "Causes a living creature to turn into stone.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines resistability.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 6, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addot(OT_S_POLYMORPH, "polymorph", "Transmutes the target into a new living race.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines resistability.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At power V, you can choose what kind of creature to polymorph into.");
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 6, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, 10, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOFLEE, ST_SELF, NA, NA, NULL);
|
||||
|
||||
///////////////////
|
||||
// summoning
|
||||
///////////////////
|
||||
// l1
|
||||
addot(OT_S_GLYPHWARDING, "glyph of warding", "Inscribes a magical glyph in the ground which wards off monsters.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The glyph will stop monsters up to ^bpower^n/2 hit dice.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The glyph will stop monsters up to 2+ (^bpower^n/2) TR.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The glyph will last for ^bpower^n*5 turns.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_SUMMONING, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
|
@ -4671,6 +4509,45 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 3, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_FALSE, LOF_NEED, NA, NULL);
|
||||
addot(OT_S_OBJECTGROWTH, "enlarge object", "Causes the target object to grow to an enormous size.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_OBJECT, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
addot(OT_S_HOLDPORTAL, "seal entrance", "Magically closes and jams a door, preventing it from opening.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_DOOR, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
//addot(OT_S_INSCRIBE, "inscribe", "Creates a magical inscription viewable to anyone standing nearby.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
//addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
//addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
addot(OT_S_KNOCK, "knock", "Magically opens doors or other such barriers.\n", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At Power VII, this spell will also knock back living creatures.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_DOOR|TT_IMPASSABLE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
addflag(lastot->flags, F_PLEASESGOD, R_GODTHIEVES, 5, NA, NULL);
|
||||
addot(OT_S_LIGHT, "light area", "Creates a temporary light source centred on the caster.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At Power III, you can control where the light appears.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At Power V, the light will blind creatures with night vision.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At Power VIII, the light becomes permenant.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_LIFE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_NATURE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_ANYWHERE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_FALSE, LOF_DONTNEED, NA, NULL);
|
||||
addot(OT_S_CREATEWATER, "create water", "Creates a large pool of shallow water.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell's power determines the size of the pool.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_NATURE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, 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_AICASTTOFLEE, ST_VICTIM, NA, NA, NULL);
|
||||
// l2
|
||||
addot(OT_S_ENERGYBOLT, "energy bolt", "Fires a medium-sized bolt of wild magic, dealing 2d4 damage per power level.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
|
@ -4684,6 +4561,50 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_SPELLLEVEL, 2, 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_OBJECTSHRINK, "shrink object", "Causes the target object to shrink to a tiny size.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_OBJECT, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
addot(OT_S_SIZEUP, "unnatural growth", "Causes the target's body to grow in size. They will become easier to hit, but deal more damage.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines how long the effect will last.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At power level V, self-targetted spells will also resize your armour.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 5, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, NA, NA, NULL);
|
||||
addot(OT_S_SIZEDOWN, "unnatural shrinkage", "Causes the target's body to shrink in size. They will deal less damage, but become harder to hit.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines how long the effect will last.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At power level V, self-targetted spells will also resize your armour.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 5, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addot(OT_S_MIRRORIMAGE, "mirror image", "Creates ^bpower^n illusionary clones of the caster to distract enemies. These clones cannot deal damage, and vanish when hit.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines how many clones are created, and how many hits they can sustain.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_VARPOWER, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_FALSE, LOF_DONTNEED, NA, NULL);
|
||||
addot(OT_S_DARKNESS, "darkness", "Permenantly darkens the area around the caster.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At Power III, you can control where the darkness appears.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At Power VIII, the darkness becomes permenant.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_ANYWHERE, NA, NA, NULL);
|
||||
addot(OT_S_MENDING, "mending", "Repairs minor damage to objects (1d6 + ^bpower^n).", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_NATURE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
|
||||
addot(OT_S_GREASE, "grease", "Creates a large pool of greasy oil.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell's power determines the size of the grease pool.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, 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_AICASTTOFLEE, ST_VICTIM, NA, NA, NULL);
|
||||
// l3
|
||||
addot(OT_S_ENERGYBLAST, "energy blast", "Causes a ring of energy to expand from the caster, causing 2d6 damage to anything in sight.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines the radius of the blast.");
|
||||
|
@ -4696,6 +4617,30 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_SPELLSCHOOL, SS_NATURE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 3, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_ANYWHERE, NA, NA, NULL);
|
||||
addot(OT_S_INVISIBILITY, "invisibility", "Temporarily renders the target invisible.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell's power determines how long the invisibility will last.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 3, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOFLEE, ST_SELF, NA, NA, NULL);
|
||||
//addflag(lastot->flags, F_XPVAL, 50, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_LFSSTOP, NA, NULL);
|
||||
addot(OT_S_PASSWALL, "passwall", "Allows the caster to temporarily walk through a single wall.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell's power determines how long the caster can wait before entering a wall.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_TRANSLOCATION, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOFLEE, ST_SELF, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ONGOING, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 3, NA, NA, NULL);
|
||||
addot(OT_S_ANIMATESTATUE, "animate statue", "Temporarily brings a statue to life, under control of the caster. Also stops stoning.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell only affects stone which is in the form of a living creature.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_OBJECT|TT_PLAYER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_RANGE, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 3, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
addflag(lastot->flags, F_PLEASESGOD, R_GODNATURE, 25, NA, NULL);
|
||||
// l4
|
||||
addot(OT_S_NULLIFY, "nullify", "Permenantly removes the target's ability to use one or more spells/abilities.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines the amount of spells nullified.");
|
||||
|
@ -4716,6 +4661,15 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 5, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_FALSE, LOF_NEED, NA, NULL);
|
||||
addot(OT_S_EXCAVATE, "excavate", "Creates a large open area surrounding the caster. No effect on living creatures.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 4, NA, NA, NULL);
|
||||
addot(OT_S_SHAPESHIFT, "shapeshift", "Causes the caster to take on the form of any creature within sight.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines how powerful a creature you can become.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 4, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, 10, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOFLEE, ST_SELF, NA, NA, NULL);
|
||||
// l5
|
||||
addot(OT_S_DETONATEDELAY, "delayed detonation", "Causes a given area to explode after a short delay.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
|
@ -4724,6 +4678,19 @@ 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_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
|
||||
addot(OT_S_GASEOUSFORM, "gaseous form", "Changes the caster into a cloud of gas.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_NATURE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 5, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOFLEE, ST_SELF, NA, NA, NULL);
|
||||
addot(OT_S_QUICKENSTONE, "quicken stone", "Crafts nearby stone into powerful stone primalities.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines how many creatures will be created.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At power level VI, stronger creatures will be created.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 8, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 5, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_ANYWHERE, NA, NA, NULL);
|
||||
// l6
|
||||
addot(OT_S_DETONATE, "detonate", "Causes a given area to explode with massive force.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines the size of the explosion.");
|
||||
|
@ -4732,6 +4699,25 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER|TT_DOOR, 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_ENCHANT, "enhancement", "Magically enhances a weapon or piece of armour.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_MAXPOWER, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 6, NA, NA, NULL);
|
||||
// TODO: hardcode how ai casts this spell
|
||||
addot(OT_S_PETRIFY, "petrify", "Causes a living creature to turn into stone.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines resistability.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 6, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addot(OT_S_POLYMORPH, "polymorph", "Transmutes the target into a new living race.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines resistability.");
|
||||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At power V, you can choose what kind of creature to polymorph into.");
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_WILD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 6, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, 10, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOFLEE, ST_SELF, NA, NA, NULL);
|
||||
|
||||
// divine powers (spells/abilities)
|
||||
addot(OT_A_BLINDALL, "nosight", "Make everyone on the level blind.", MT_NOTHING, 0, OC_ABILITY, SZ_TINY);
|
||||
|
@ -7217,7 +7203,7 @@ void initobjects(void) {
|
|||
addot(OT_AMU_SOULS, "amulet of soul feasting", "Allows the caster to consume souls of the recently dead.", MT_METAL, 0.3, OC_AMULET, SZ_TINY);
|
||||
// no autoid!
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_EQUIPCONFER, F_CONSUMESOULS, 25, NA, NULL);
|
||||
addflag(lastot->flags, F_EQUIPCONFER, F_CONSUMESOULS, 25, 2, NULL);
|
||||
addflag(lastot->flags, F_VALUE, 900, NA, NA, NULL);
|
||||
addot(OT_AMU_SPELLBOOST, "archmage's amulet", "Greatly increases the power of the wearer's spells.", MT_METAL, 0.3, OC_AMULET, SZ_TINY);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_RARE, "");
|
||||
|
@ -7790,8 +7776,8 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
|
||||
|
||||
addot(OT_BATTLEAXE, "battleaxe", "An large axe specifically designed for combat.", MT_METAL, 8, OC_WEAPON, SZ_MEDIUM);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 70, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 70, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_ARMOURPIERCE, 6, NA, NA, "");
|
||||
addflag(lastot->flags, F_DAM, DT_CHOP, 11, NA, NULL);
|
||||
addflag(lastot->flags, F_ALTDAM, DT_BASH, 5, NA, "flat of blade");
|
||||
|
@ -7799,8 +7785,8 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_USESSKILL, SK_AXES, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ATTREQ, A_STR, 65, 75, "10");
|
||||
addot(OT_GREATAXE, "greataxe", "An enormous axe made designed for combat.", MT_METAL, 10, OC_WEAPON, SZ_MEDIUM);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 50, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 50, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 50, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 50, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_OBATTACKDELAY, 180, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ARMOURPIERCE, 10, NA, NA, "");
|
||||
addflag(lastot->flags, F_DAM, DT_CHOP, 18, NA, NULL);
|
||||
|
@ -7832,8 +7818,8 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_ATTREQ, A_STR, 40, 60, "5");
|
||||
addflag(lastot->flags, F_CRITCHANCE, 6, NA, NA, NULL);
|
||||
addot(OT_WARAXE, "war axe", "An axe made for combat.", MT_METAL, 7, OC_WEAPON, SZ_MEDIUM);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 80, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 80, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_ARMOURPIERCE, 8, NA, NA, "");
|
||||
addflag(lastot->flags, F_DAM, DT_CHOP, 12, NA, NULL);
|
||||
addflag(lastot->flags, F_ALTDAM, DT_BASH, 5, NA, "flat of blade");
|
||||
|
@ -7917,8 +7903,8 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_USESSKILL, SK_SHORTBLADES, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CRITCHANCE, 2, NA, NA, NULL);
|
||||
addot(OT_CUTLASS, "cutlass", "An accurate, light-weight pirate blade.", MT_METAL, 4, OC_WEAPON, SZ_MEDIUM);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 80, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 80, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_OBATTACKDELAY, 75, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_DAM, DT_SLASH, 9, NA, NULL);
|
||||
addflag(lastot->flags, F_ALTDAM, DT_PIERCE, 5, NA, NULL);
|
||||
|
@ -8027,8 +8013,8 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_RODSHAPED, B_TRUE, NA, NA, NULL);
|
||||
|
||||
addot(OT_EPEE, "epee", "A short, narrow French sword made for fast movement and stabbing.", MT_METAL, 3.5, OC_WEAPON, SZ_MEDIUM);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 80, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 80, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_DAM, DT_PIERCE, 8, NA, NULL);
|
||||
addflag(lastot->flags, F_ALTDAM, DT_BASH, 2, NA, "hilt bash"); // with the hilt
|
||||
addflag(lastot->flags, F_OBATTACKDELAY, 75, NA, NA, NULL);
|
||||
|
@ -8040,8 +8026,8 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_CANBLOCK, DT_SLASH, NA, NA, NULL);
|
||||
|
||||
addot(OT_SABRE, "sabre", "Despite being a showy captain's sword, sabres are finely balanced and deadly.", MT_METAL, 3.5, OC_WEAPON, SZ_MEDIUM);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 80, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 80, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_DAM, DT_SLASH, 10, NA, NULL);
|
||||
addflag(lastot->flags, F_ALTDAM, DT_PIERCE, 8, NA, NULL);
|
||||
addflag(lastot->flags, F_ALTDAM, DT_BASH, 3, NA, "hilt bash"); // with the hilt
|
||||
|
@ -8117,8 +8103,8 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_CANBLOCK, DT_SLASH, NA, NA, NULL);
|
||||
|
||||
addot(OT_CLAYMORE, "claymore", "A massive two-handed blade with an oversized hilt. Its weight lends it to various forms of attack.", MT_METAL, 9, OC_WEAPON, SZ_MEDIUM);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 70, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 70, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_ARMOURPIERCE, 2, NA, NA, "");
|
||||
addflag(lastot->flags, F_DAM, DT_SLASH, 12, NA, NULL);
|
||||
addflag(lastot->flags, F_ALTDAM, DT_PIERCE, 12, NA, NULL);
|
||||
|
@ -8990,7 +8976,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "cackles");
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "gestures");
|
||||
addflag(lastrace->flags, F_CASTCHANCE, 50, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CONSUMESOULS, 50, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CONSUMESOULS, 50, 5, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "cackles evilly^an evil cackling");
|
||||
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
|
||||
|
||||
|
@ -9135,7 +9121,6 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_NOSKILL, SK_SS_FIRE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSKILL, SK_SS_COLD, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSKILL, SK_SS_LIFE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSKILL, SK_SS_MODIFICATION, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSKILL, SK_SS_SUMMONING, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSKILL, SK_SS_TRANSLOCATION, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSKILL, SK_SS_WILD, NA, NA, NULL);
|
||||
|
@ -9395,12 +9380,13 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_MPMOD, 3, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_SS_DEATH, PR_NOVICE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_STEALTH, PR_NOVICE, NA, NULL);
|
||||
addflag(lastrace->flags, F_CONSUMESOULS, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_SHORTBLADES, PR_NOVICE, NA, NULL);
|
||||
addflag(lastrace->flags, F_CONSUMESOULS, 10, 1, NA, NULL);
|
||||
// penalties
|
||||
addflag(lastrace->flags, F_MATVULN, MT_METAL, 200, NA, NULL);
|
||||
//addbonustext(lastrace->flags, F_PENDESC, "Slightly below average Hit Points.");
|
||||
addflag(lastrace->flags, F_TAMABLE, 175, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "ne");
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "e");
|
||||
|
||||
addrace(R_MAMMOAN, "mammoan", 150, '@', C_GREY, MT_LEATHER, RC_HUMANOID, "Mammoans are huge, elephant-like humanoids. Their have great senses of hearing and smell, a photographic memory, and leather skin which greatly lessens damage. On the other hand they vision is poor, their movement slow, and their digestive system cannot cope with meat.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
|
@ -11176,9 +11162,9 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "1-25 gold dollars");
|
||||
addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "sling");
|
||||
f = addflag(lastrace->flags, F_STARTOBWEPSK, 100, SK_SHORTBLADES, NA, NULL);
|
||||
f = addflag(lastrace->flags, F_STARTOBWEPSK, 100, SK_SHORTBLADES, NA, "common");
|
||||
addcondition(f, FC_NOCONDITION, 90);
|
||||
addaltval(f, F_STARTOBWEPSK, 100, SK_WHIPS, NA, NULL);
|
||||
addaltval(f, F_STARTOBWEPSK, 100, SK_WHIPS, NA, "common");
|
||||
addflag(lastrace->flags, F_STARTOBCLASS, 40, OC_POTION, NA, NULL);
|
||||
addflag(lastrace->flags, F_WANTSBETTERWEP, B_TRUE, B_COVETS, NA, NULL);
|
||||
addflag(lastrace->flags, F_WANTS, OT_GOLD, B_COVETS, NA, NULL);
|
||||
|
@ -11381,7 +11367,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 50, SK_CLUBS, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 50, SK_CLUBS, NA, "common");
|
||||
addflag(lastrace->flags, F_STARTOB, 80, NA, NA, "leather armour");
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout");
|
||||
addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL);
|
||||
|
@ -11461,7 +11447,6 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANCAST, OT_S_GASEOUSFORM, NA, NA, "pw:1;");
|
||||
// gremlins also cause tech to fail around them.
|
||||
|
@ -11696,7 +11681,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 40, SK_SHORTBLADES, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 40, SK_SHORTBLADES, NA, "common");
|
||||
addflag(lastrace->flags, F_STARTOBCLASS, 25, OC_POTION, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_THROWING, PR_ADEPT, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOB, 33, NA, NA, "1-3 darts");
|
||||
|
@ -11736,7 +11721,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_TAIL, 2, NA, NULL);
|
||||
addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 50, SK_CLUBS, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 50, SK_CLUBS, NA, "common");
|
||||
addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "buckler");
|
||||
addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "1-10 gold dollars");
|
||||
addflag(lastrace->flags, F_DTVULN, DT_COLD, B_TRUE, NA, NULL);
|
||||
|
@ -12140,9 +12125,9 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL);
|
||||
f = addflag(lastrace->flags, F_STARTOBWEPSK, 100, SK_CLUBS, NA, NULL);
|
||||
f = addflag(lastrace->flags, F_STARTOBWEPSK, 100, SK_CLUBS, NA, "common");
|
||||
addcondition(f, FC_NOCONDITION, 70);
|
||||
addaltval(f, F_STARTOBWEPSK, 50, SK_SHORTBLADES, NA, NULL);
|
||||
addaltval(f, F_STARTOBWEPSK, 50, SK_SHORTBLADES, NA, "common");
|
||||
addflag(lastrace->flags, F_STARTOBCLASS, 30, OC_POTION, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "leather armour");
|
||||
addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "bone helmet");
|
||||
|
@ -12754,7 +12739,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_HIGH, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_BUTT, 8, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 50, SK_SHORTBLADES, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 50, SK_SHORTBLADES, NA, "common");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "panpipes");
|
||||
addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "short bow");
|
||||
addflag(lastrace->flags, F_STARTOB, 75, NA, NA, "1-10 arrows");
|
||||
|
@ -12891,9 +12876,9 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "gestures");
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 3, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "dagger");
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 60, SK_POLEARMS, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 60, SK_POLEARMS, NA, "common");
|
||||
addflag(lastrace->flags, F_STARTOB, 25, NA, NA, "mace");
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 25, SK_LONGBLADES, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 25, SK_LONGBLADES, NA, "common");
|
||||
addflag(lastrace->flags, F_STARTOBCLASS, 80, OC_ARMOUR, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBCLASS, 50, OC_ARMOUR, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_ADEPT, NA, NULL);
|
||||
|
@ -16676,6 +16661,41 @@ void initrace(void) {
|
|||
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_IMP, "imp", 4, '&', C_BROWN, MT_FLESH, RC_DEMON, "A tiny, bald humanoid with small spiked horns running down the middle of its scalp, leathery bat-like wings and of course sharp claws...");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addbodypart(lastrace, BP_WINGS, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_HEAVEN, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_UNCOMMON, NULL);
|
||||
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_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 2, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_REGENERATES, 1, NA, NA, NULL);
|
||||
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_STR, AT_LTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_LOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_HIGH, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_VLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_STING, 3, NA, NULL);
|
||||
//addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 100, "3-5");
|
||||
//addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 2, NA, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTIMMUNE, DT_POISON, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTIMMUNE, DT_POISONGAS, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTRESIST, DT_FIRE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTRESIST, DT_COLD, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DETECTMAGIC, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_STEALTH, PR_ADEPT, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANCAST, OT_S_INVISIBILITY, 30, 30, "pw:1;");
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "narrows its eyes");
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "screechs^an other-wordly screech");
|
||||
|
||||
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);
|
||||
|
@ -16792,7 +16812,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "grins");
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "screechs^an other-wordly screech");
|
||||
|
||||
addrace(R_QUASIT, "quasit", 4, '&', C_BROWN, MT_FLESH, RC_DEMON, "A tiny, bald humanoid with small spiked horns running down the middle of its scalp, leathery bat-like wings and of course sharp claws...");
|
||||
addrace(R_QUASIT, "quasit", 8, '&', C_YELLOW, MT_FLESH, RC_DEMON, "A small humanoid held aloft on leathery wings. Two small horns protude from its scalp, and the tip of its tail is adorned with a large stinger.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addbodypart(lastrace, BP_WINGS, NULL);
|
||||
|
@ -16802,7 +16822,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 7, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_REGENERATES, 2, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ARMOURRATING, 18, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
|
@ -16814,13 +16834,14 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_VLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 2, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_STING, 3, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 100, "3-5");
|
||||
addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 2, NA, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTIMMUNE, DT_POISON, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTIMMUNE, DT_POISONGAS, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTRESIST, DT_FIRE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTIMMUNE, DT_FIRE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTIMMUNE, DT_COLD, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DETECTMAGIC, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_STEALTH, PR_ADEPT, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANCAST, OT_S_FEAR, 20, 20, "pw:1;");
|
||||
|
@ -16903,7 +16924,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 50, SK_AXES, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 50, SK_AXES, NA, "common");
|
||||
addflag(lastrace->flags, F_STARTOB, 25, NA, NA, "buckler");
|
||||
addflag(lastrace->flags, F_DTVULN, DT_BASH, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTVULN, DT_FALL, NA, NA, "1d3+3");
|
||||
|
@ -17450,7 +17471,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_REGENERATES, 1, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANCAST, OT_S_SHAPESHIFT, 3, 3, "pw:1;race:plague rat;");
|
||||
addflag(lastrace->flags, F_CANCAST, OT_S_SUMMONANIMALSSM, 10, 10, "pw:5;race:giant rat;count:5;");
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 40, SK_SHORTBLADES, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBWEPSK, 40, SK_SHORTBLADES, NA, "common");
|
||||
addflag(lastrace->flags, F_STARTOB, 10, NA, NA, "potion of rum");
|
||||
addflag(lastrace->flags, F_AISPELLTARGETOVERRIDE, OT_S_SHAPESHIFT, F_AICASTTOFLEE, ST_SELF, "100");
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_SKILLED, NA, NULL);
|
||||
|
@ -17758,7 +17779,7 @@ void initrace(void) {
|
|||
addflag(r->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
|
||||
}
|
||||
|
||||
// fill in missins alignments
|
||||
// fill in missing alignments
|
||||
if (!hasflag(r->flags, F_ALIGNMENT)) {
|
||||
addflag(r->flags, F_ALIGNMENT, AL_NEUTRAL, NA, NA, NULL);
|
||||
}
|
||||
|
@ -18082,14 +18103,6 @@ void initskills(void) {
|
|||
addskilldesc(SK_SS_LIFE, PR_SKILLED, "Allows you to cast Life Magic spells up to level 4.", B_FALSE);
|
||||
addskilldesc(SK_SS_LIFE, PR_EXPERT, "Allows you to cast Life Magic spells up to level 5.", B_FALSE);
|
||||
addskilldesc(SK_SS_LIFE, PR_MASTER, "Allows you to cast Life Magic spells up to level 6.", B_FALSE);
|
||||
addskill(SK_SS_MODIFICATION, "Sorcery:Modification", "Boosts casting of spells from this school.", 50);
|
||||
addskilldesc(SK_SS_MODIFICATION, PR_INEPT, "- Spell power power depends on your Level and Intelligence.", B_FALSE);
|
||||
addskilldesc(SK_SS_MODIFICATION, PR_NOVICE, "Allows you to cast Modification spells up to level 1.", B_FALSE);
|
||||
addskilldesc(SK_SS_MODIFICATION, PR_BEGINNER, "Allows you to cast Modification spells up to level 2.", B_FALSE);
|
||||
addskilldesc(SK_SS_MODIFICATION, PR_ADEPT, "Allows you to cast Modification spells up to level 3.", B_FALSE);
|
||||
addskilldesc(SK_SS_MODIFICATION, PR_SKILLED, "Allows you to cast Modification spells up to level 4.", B_FALSE);
|
||||
addskilldesc(SK_SS_MODIFICATION, PR_EXPERT, "Allows you to cast Modification spells up to level 5.", B_FALSE);
|
||||
addskilldesc(SK_SS_MODIFICATION, PR_MASTER, "Allows you to cast Modification spells up to level 6.", B_FALSE);
|
||||
addskill(SK_SS_SUMMONING, "Sorcery:Summoning", "Boosts casting of spells from this school.", 50);
|
||||
addskilldesc(SK_SS_SUMMONING, PR_INEPT, "- Spell power power depends on your Level and Intelligence.", B_FALSE);
|
||||
addskilldesc(SK_SS_SUMMONING, PR_NOVICE, "Allows you to cast Summoning spells up to level 1.", B_FALSE);
|
||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
59
defs.h
59
defs.h
|
@ -698,12 +698,11 @@ enum SKILL {
|
|||
SK_SS_FIRE,
|
||||
SK_SS_COLD,
|
||||
SK_SS_LIFE,
|
||||
SK_SS_MODIFICATION,
|
||||
SK_SS_SUMMONING,
|
||||
SK_SS_TRANSLOCATION,
|
||||
SK_SS_WILD,
|
||||
};
|
||||
#define MAXSKILLS 54
|
||||
#define MAXSKILLS 53
|
||||
|
||||
// proficiency levels
|
||||
enum SKILLLEVEL {
|
||||
|
@ -884,7 +883,6 @@ enum SPELLSCHOOL {
|
|||
SS_FIRE,
|
||||
SS_COLD,
|
||||
SS_LIFE,
|
||||
SS_MODIFICATION,
|
||||
SS_MENTAL,
|
||||
SS_NATURE,
|
||||
SS_SUMMONING,
|
||||
|
@ -1259,6 +1257,7 @@ enum RACE {
|
|||
R_GRIDDLER,
|
||||
R_LURKINGHORROR,
|
||||
R_ICEDEMON,
|
||||
R_IMP,
|
||||
R_LINGEXTERMINATOR,
|
||||
R_LINGHARVESTER,
|
||||
R_LINGPARASITE,
|
||||
|
@ -1738,29 +1737,6 @@ enum OBTYPE {
|
|||
OT_S_STUN,
|
||||
OT_S_STUNMASS,
|
||||
OT_S_TELEKINESIS,
|
||||
// -- modification
|
||||
OT_S_ANIMATESTATUE,
|
||||
OT_S_CREATEWATER, // also nature
|
||||
OT_S_DARKNESS,
|
||||
OT_S_ENCHANT,
|
||||
OT_S_GASEOUSFORM,
|
||||
OT_S_GREASE,
|
||||
OT_S_HOLDPORTAL,
|
||||
//OT_S_INSCRIBE,
|
||||
OT_S_INVISIBILITY,
|
||||
OT_S_KNOCK,
|
||||
OT_S_LIGHT,
|
||||
OT_S_MENDING,
|
||||
OT_S_OBJECTGROWTH,
|
||||
OT_S_OBJECTSHRINK,
|
||||
OT_S_PASSWALL,
|
||||
OT_S_PETRIFY,
|
||||
OT_S_POLYMORPH,
|
||||
OT_S_POLYMORPHRND,
|
||||
OT_S_QUICKENSTONE,
|
||||
OT_S_SHAPESHIFT,
|
||||
OT_S_SIZEUP,
|
||||
OT_S_SIZEDOWN,
|
||||
// nature / enviromancy
|
||||
OT_S_ANIMATETREE,
|
||||
OT_S_BARKSKIN,
|
||||
|
@ -1820,16 +1796,38 @@ enum OBTYPE {
|
|||
OT_S_TRAVEL,
|
||||
OT_S_TWIDDLE,
|
||||
// -- wild magic
|
||||
//OT_S_INSCRIBE,
|
||||
OT_S_ALARM,
|
||||
OT_S_ANIMATESTATUE,
|
||||
OT_S_CREATEWATER, // also nature
|
||||
OT_S_DARKNESS,
|
||||
OT_S_FIREWORKS,
|
||||
OT_S_MANASPIKE,
|
||||
OT_S_DETONATE,
|
||||
OT_S_DETONATEDELAY,
|
||||
OT_S_ENERGYBOLT,
|
||||
OT_S_ENERGYBLAST,
|
||||
OT_S_ENCHANT,
|
||||
OT_S_FLASH,
|
||||
OT_S_GASEOUSFORM,
|
||||
OT_S_GREASE,
|
||||
OT_S_HOLDPORTAL,
|
||||
OT_S_INVISIBILITY,
|
||||
OT_S_KNOCK,
|
||||
OT_S_LIGHT,
|
||||
OT_S_MANASPIKE,
|
||||
OT_S_MENDING,
|
||||
OT_S_NULLIFY,
|
||||
OT_S_OBJECTGROWTH,
|
||||
OT_S_OBJECTSHRINK,
|
||||
OT_S_PASSWALL,
|
||||
OT_S_PETRIFY,
|
||||
OT_S_POLYMORPH,
|
||||
OT_S_POLYMORPHRND,
|
||||
OT_S_QUICKENSTONE,
|
||||
OT_S_REPLENISH,
|
||||
OT_S_SHAPESHIFT,
|
||||
OT_S_SIZEUP,
|
||||
OT_S_SIZEDOWN,
|
||||
OT_S_SPIKEVOLLEY,
|
||||
// -- divine powers
|
||||
OT_S_CREATEVAULT,
|
||||
|
@ -3111,7 +3109,7 @@ enum FLAG {
|
|||
F_GAVEMONEY, // v0 tracks how much money we gave away this turn
|
||||
// used for r_godgreed anger effects.
|
||||
F_CLIMBING, // lf is currently climbing a wall
|
||||
F_CONSUMESOULS, // lf gains hp from those who die nearby.
|
||||
F_CONSUMESOULS, // lf gains hp from those who die within v1 cells.
|
||||
// up to v0% of their maxhp.
|
||||
F_COUNTER, // generic counter flag for race abilities.
|
||||
F_DEBUG, // debugging enabled
|
||||
|
@ -3523,6 +3521,8 @@ enum FLAG {
|
|||
// if (v0 == -1), then create object in front
|
||||
F_PHALANX, // gain v0 AR if v2 or more adj monsters matching f->text
|
||||
F_MORALE, // gain +v0 in morale checks.
|
||||
F_6SENSEWARNED, // player's th sense spell has warned them
|
||||
// about this lf already.
|
||||
F_SPOTTED, // you have spotted hiding lf id v0. you lsoe this if they
|
||||
// go out of sight.
|
||||
F_TIMID, // monster will only move close if behind its target.
|
||||
|
@ -4269,7 +4269,7 @@ typedef struct habitat_s {
|
|||
int randthingpct; // % chance each empty cell has something
|
||||
int randobpct; // % chance that 'something' is an ob rather than monster
|
||||
int randvaultpct; // % chance that a room will be a vault
|
||||
int maxvisrange;
|
||||
//int maxvisrange;
|
||||
enum OBTYPE upstairtype, downstairtype;
|
||||
enum CELLTYPE emptycelltype,solidcelltype;
|
||||
struct habitat_s *next, *prev;
|
||||
|
@ -4301,6 +4301,7 @@ typedef struct room_s {
|
|||
int id;
|
||||
int x1,y1,x2,y2;
|
||||
struct vault_s *vault;
|
||||
int prevault; // don't need to save this
|
||||
int exitslinked; // don't need to save this.
|
||||
} room_t;
|
||||
|
||||
|
|
22
io.c
22
io.c
|
@ -1267,6 +1267,11 @@ void announcearrival(lifeform_t *lf, map_t *newmap) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// show light level
|
||||
if (newmap->illumination != IL_FULLLIT) {
|
||||
msg("%s", getilluminationdesc(newmap->illumination));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13245,6 +13250,23 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
wrapprint(mainwin, &y, &x, 0, buf);
|
||||
}
|
||||
|
||||
// material vulnerabilities
|
||||
getflags(lf->flags, retflag, &nretflags, F_MATVULN, F_NONE);
|
||||
for (i = 0; i < nretflags; i++) {
|
||||
material_t *mt;
|
||||
f = retflag[i];
|
||||
mt = findmaterial(f->val[0]);
|
||||
if (mt) {
|
||||
mvwprintw(mainwin, y, 0, "%s take%s %d%% damage from %s weapons.", you(lf),
|
||||
isplayer(lf) ? "" : "s", f->val[1], mt->name);
|
||||
y++;
|
||||
if (f->val[2] > 0) {
|
||||
mvwprintw(mainwin, y, 0, "Touching %s objects will hurt %s (%d dam).",
|
||||
mt->name, you(lf), f->val[2]);
|
||||
y++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (showall || (lorelev >= PR_BEGINNER) || (getskill(player, SK_SPEECH) >= PR_ADEPT)) {
|
||||
|
|
274
lf.c
274
lf.c
|
@ -83,6 +83,15 @@ int xplistlen;
|
|||
|
||||
int notime = B_FALSE; // prevent taketime from doing anything
|
||||
|
||||
void add_subjob_alignment_restrictions(flagpile_t *fp, enum SUBJOB sj) {
|
||||
if (sj == SJ_PALADIN) {
|
||||
addflag(fp, F_ALIGNMENT, AL_NONE, NA, NA, "g");
|
||||
} else if (sj == SJ_NECROMANCER) {
|
||||
addflag(fp, F_ALIGNMENT, AL_NONE, NA, NA, "e");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void autoweild(lifeform_t *lf) {
|
||||
object_t *bestwep,*bestfirearm;
|
||||
object_t *o,*firearm;
|
||||
|
@ -3335,12 +3344,13 @@ void die(lifeform_t *lf) {
|
|||
flag_t *soulflag = NULL;
|
||||
|
||||
// soul consumed?
|
||||
if (corpsecell) {
|
||||
if (corpsecell && hassoul(lf)) {
|
||||
// can you consume them?
|
||||
lifeform_t *l;
|
||||
for (l = lf->cell->map->lf ; l ; l = l->next) {
|
||||
if (haslos(l, lf->cell)) {
|
||||
if (haslos(l, lf->cell) && (l->hp < l->maxhp)) {
|
||||
soulflag = lfhasflag(l, F_CONSUMESOULS);
|
||||
if (soulflag) {
|
||||
if (soulflag && (getcelldist(l->cell, lf->cell) <= soulflag->val[1])) {
|
||||
souleater = l;
|
||||
break;
|
||||
}
|
||||
|
@ -3880,45 +3890,126 @@ void genareaknowledge(flagpile_t *fp, int chancemod) {
|
|||
addflag(fp, F_KNOWSABOUT, NA, NA, NA, knownstuff);
|
||||
}
|
||||
|
||||
// if alignment needs to be generated randomly (or selected in the case of the player), do so.
|
||||
void generatealignment(lifeform_t *lf) {
|
||||
flag_t *f;
|
||||
// populates 'buf' with a string containing
|
||||
// G, N or E based on possible alignments from
|
||||
// the given flagpile's F_ALIGNMENT flags.
|
||||
//
|
||||
// returns # of possibilities
|
||||
int genalignmentlist(flagpile_t *fp, char *buf) {
|
||||
flag_t *retflag[MAXCANDIDATES];
|
||||
int nretflags,i,n,nposs = 0;
|
||||
char allaligns[] = {
|
||||
'g','n','e'
|
||||
};
|
||||
char localposs[BUFLEN];
|
||||
|
||||
// sometimes alignment is forced.
|
||||
switch (getsubjob(lf)) {
|
||||
case SJ_NECROMANCER:
|
||||
setalignment(lf, AL_EVIL);
|
||||
return;
|
||||
case SJ_PALADIN:
|
||||
setalignment(lf, AL_GOOD);
|
||||
return;
|
||||
default: break;
|
||||
// start with no possibilities
|
||||
strcpy(localposs, "");
|
||||
|
||||
// get a list of any conditions...
|
||||
getflags(fp, retflag, &nretflags, F_ALIGNMENT, F_NONE);
|
||||
|
||||
// for each G, N, E
|
||||
for (n = 0; n < 3; n++ ) {
|
||||
char candidate;
|
||||
candidate = allaligns[n];
|
||||
|
||||
// does it match all flags?
|
||||
for (i = 0; i < nretflags; i++) {
|
||||
char this[BUFLEN];
|
||||
strcpy(this, "");
|
||||
|
||||
switch (retflag[i]->val[0]) {
|
||||
case AL_GOOD: strcpy(this, "g"); break;
|
||||
case AL_NEUTRAL: strcpy(this, "n"); break;
|
||||
case AL_EVIL: strcpy(this, "e"); break;
|
||||
|
||||
default:
|
||||
case AL_NONE:
|
||||
strcpy(this, retflag[i]->text);
|
||||
break;
|
||||
}
|
||||
|
||||
f = hasflagval(lf->flags, F_ALIGNMENT, AL_NONE, NA, NA, NULL);
|
||||
if (f && strlen(f->text)) {
|
||||
char buf[BUFLEN];
|
||||
char buf2[BUFLEN],ch;
|
||||
if (!strchr(this, candidate)) {
|
||||
// not possible
|
||||
candidate = '\0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// still possible?
|
||||
if (candidate != '\0') {
|
||||
if (!strchr(localposs, candidate)) { // not already in list?
|
||||
char letter[2];
|
||||
// this one is okay.
|
||||
sprintf(letter, "%c", candidate);
|
||||
strcat(localposs, letter);
|
||||
nposs++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (buf) {
|
||||
strcpy(buf, localposs);
|
||||
}
|
||||
|
||||
return nposs;
|
||||
}
|
||||
|
||||
// if alignment needs to be generated randomly (or selected in the case of the player), do so.
|
||||
void generatealignment(lifeform_t *lf) {
|
||||
int nposs,i;
|
||||
char possbuf[BUFLEN],buf[BUFLEN],buf2[BUFLEN],ch;
|
||||
enum FLAG wantalignment = AL_NONE;
|
||||
|
||||
// get a list of all possible alignments
|
||||
nposs = genalignmentlist(lf->flags, possbuf);
|
||||
|
||||
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);
|
||||
|
||||
|
||||
if (isplayer(lf)) {
|
||||
dblog("xx");
|
||||
}
|
||||
|
||||
if (nposs == 0) {
|
||||
if (isplayer(lf)) {
|
||||
assert("Error - no possible alignment for player." == 0);
|
||||
} else {
|
||||
// monster has no alignment
|
||||
addchoice(&prompt, '-', "None", NULL, NULL, NULL);
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < strlen(possbuf); i++) {
|
||||
if (possbuf[i] == 'g') addchoice(&prompt, 'g', "Good", NULL, NULL, NULL);
|
||||
if (possbuf[i] == 'n') addchoice(&prompt, 'n', "Neutral", NULL, NULL, NULL);
|
||||
if (possbuf[i] == 'e') addchoice(&prompt, 'e', "Evil", NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
assert(prompt.nchoices > 0);
|
||||
|
||||
if (prompt.nchoices == 1) {
|
||||
ch = prompt.choice[0].ch;
|
||||
} else if (isplayer(lf)) {
|
||||
ch = getchoice(&prompt);
|
||||
} else {
|
||||
ch = prompt.choice[rnd(0,prompt.nchoices-1)].ch;
|
||||
}
|
||||
|
||||
// remove other flags
|
||||
killflagsofid(lf->flags, F_ALIGNMENT);
|
||||
|
||||
// now set alignment
|
||||
switch (ch) {
|
||||
case 'g': f->val[0] = AL_GOOD; break;
|
||||
case 'e': f->val[0] = AL_EVIL; break;
|
||||
case 'g': wantalignment = AL_GOOD; break;
|
||||
case 'n': wantalignment = AL_NEUTRAL; break;
|
||||
case 'e': wantalignment = AL_EVIL; break;
|
||||
default:
|
||||
case 'n': f->val[0] = AL_NEUTRAL; break;
|
||||
}
|
||||
free(f->text);
|
||||
f->text = strdup("");
|
||||
case '-': wantalignment = AL_NONE; break;
|
||||
}
|
||||
addflag(lf->flags, F_ALIGNMENT, wantalignment, NA, NA, NULL);
|
||||
}
|
||||
|
||||
void genxplist(void) {
|
||||
|
@ -5967,6 +6058,14 @@ subjob_t *findsubjob(enum SUBJOB sjid) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
subjob_t *findsubjobbyletter(char letter) {
|
||||
subjob_t *j;
|
||||
for (j = firstsubjob ; j ; j = j->next) {
|
||||
if (j->letter == letter) return j;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// returns true if we did somethign
|
||||
int fixcurses(lifeform_t *lf) {
|
||||
int donesomething = B_FALSE;
|
||||
|
@ -10556,7 +10655,10 @@ void givebehaviour(lifeform_t *lf, enum BEHAVIOUR bid) {
|
|||
}
|
||||
}
|
||||
|
||||
void givejob(lifeform_t *lf, enum JOB jobid) {
|
||||
// subjobid is ONLY used when giving the player their initial job.
|
||||
//
|
||||
// in other cases, use givesubjob() directly.
|
||||
void givejob(lifeform_t *lf, enum JOB jobid, enum SUBJOB sj) {
|
||||
job_t *j;
|
||||
flag_t *f;
|
||||
int i;
|
||||
|
@ -10591,10 +10693,15 @@ void givejob(lifeform_t *lf, enum JOB jobid) {
|
|||
killflag(f);
|
||||
}
|
||||
}
|
||||
// override alignment from race
|
||||
// for monsters, override alignment from race
|
||||
//
|
||||
// for players, keep it, we'll use it to figure out our
|
||||
// choices when generating our alignment.
|
||||
if (!isplayer(lf)) {
|
||||
if (hasflag(j->flags, F_ALIGNMENT)) {
|
||||
killflagsofid(lf->flags, F_ALIGNMENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// apply attrib mods from this job
|
||||
|
@ -10768,20 +10875,19 @@ void givejob(lifeform_t *lf, enum JOB jobid) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// select subjobs
|
||||
if ((gamemode == GM_CHARGEN) && isplayer(lf)) {
|
||||
/*
|
||||
subjob_t *sub;
|
||||
enum SUBJOB sj = SJ_NONE;
|
||||
flag_t *retflag[MAXCANDIDATES];
|
||||
int nretflags;
|
||||
getflags(j->flags, retflag, &nretflags, F_CANHAVESUBJOB, F_NONE);
|
||||
else {
|
||||
initprompt(&prompt, "Select your job specialty:");
|
||||
for (sub = firstsubjob ; sub ; sub = sub->next) {
|
||||
if (hasflagval(j->flags, F_CANHAVESUBJOB, sub->id, NA, NA, NULL)) {
|
||||
if (jobpossible(lf->flags, J_NONE, sub->id)) {
|
||||
addchoice(&prompt, sub->letter, sub->name, NULL, sub, sub->desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addchoice(&prompt, '-', "(none)", NULL, NULL, NULL);
|
||||
if (prompt.nchoices > 1) {
|
||||
|
@ -10793,11 +10899,11 @@ void givejob(lifeform_t *lf, enum JOB jobid) {
|
|||
sj = SJ_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
givesubjob(lf, sj);
|
||||
|
||||
|
||||
|
||||
|
||||
if (j->id == J_WIZARD) {
|
||||
object_t *sb2;
|
||||
skill_t *sk;
|
||||
|
@ -10818,7 +10924,6 @@ void givejob(lifeform_t *lf, enum JOB jobid) {
|
|||
// wizards with sub-jobs now get a secondary school
|
||||
initprompt(&prompt, "Select your secondary spell school:");
|
||||
addchoice(&prompt, 'd', getskillname(SK_SS_DIVINATION), NULL, findskill(SK_SS_DIVINATION), NULL);
|
||||
addchoice(&prompt, 'm', getskillname(SK_SS_MODIFICATION), NULL, findskill(SK_SS_MODIFICATION), NULL);
|
||||
addchoice(&prompt, 's', getskillname(SK_SS_SUMMONING), NULL, findskill(SK_SS_SUMMONING), NULL);
|
||||
addchoice(&prompt, 't', getskillname(SK_SS_TRANSLOCATION), NULL, findskill(SK_SS_TRANSLOCATION), NULL);
|
||||
getchoice(&prompt);
|
||||
|
@ -10827,9 +10932,6 @@ void givejob(lifeform_t *lf, enum JOB jobid) {
|
|||
case SK_SS_DIVINATION:
|
||||
sb2 = addob(lf->pack, "spellbook of divination magic");
|
||||
break;
|
||||
case SK_SS_MODIFICATION:
|
||||
sb2 = addob(lf->pack, "spellbook of modification magic");
|
||||
break;
|
||||
case SK_SS_SUMMONING:
|
||||
sb2 = addob(lf->pack, "spellbook of summoning magic");
|
||||
break;
|
||||
|
@ -10921,7 +11023,6 @@ void givesubjob(lifeform_t *lf, enum SUBJOB sj) {
|
|||
addtempflag(lf->flags, F_CANLEARN, SK_SS_FIRE, PR_ADEPT, NA, NULL, FROMJOB);
|
||||
addtempflag(lf->flags, F_CANLEARN, SK_SS_COLD, PR_ADEPT, NA, NULL, FROMJOB);
|
||||
addtempflag(lf->flags, F_CANLEARN, SK_SS_AIR, PR_ADEPT, NA, NULL, FROMJOB);
|
||||
addtempflag(lf->flags, F_CANLEARN, SK_SS_MODIFICATION, PR_ADEPT, NA, NULL, FROMJOB);
|
||||
addtempflag(lf->flags, F_CANLEARN, SK_SS_TRANSLOCATION, PR_ADEPT, NA, NULL, FROMJOB);
|
||||
addtempflag(lf->flags, F_CANLEARN, SK_SS_WILD, PR_ADEPT, NA, NULL, FROMJOB);
|
||||
// raise IQ to average so that we aren't too dumb to cast L1 spells
|
||||
|
@ -10982,6 +11083,7 @@ void givesubjob(lifeform_t *lf, enum SUBJOB sj) {
|
|||
addflag(lf->flags, F_RNDSPELLCOUNT, rnd(2,4), NA, NA, NULL);
|
||||
addflag(lf->flags, F_RNDSPELLSCHOOL, SS_LIFE, 1, 6, NULL);
|
||||
}
|
||||
|
||||
break;
|
||||
case SJ_SCOURGE:
|
||||
// remove warrior's level abilities
|
||||
|
@ -11017,7 +11119,6 @@ void givesubjob(lifeform_t *lf, enum SUBJOB sj) {
|
|||
addtempflag(lf->flags, F_NOSKILL, SK_SS_FIRE, NA, NA, NULL,FROMJOB);
|
||||
addtempflag(lf->flags, F_NOSKILL, SK_SS_COLD, NA, NA, NULL,FROMJOB);
|
||||
addtempflag(lf->flags, F_NOSKILL, SK_SS_LIFE, NA, NA, NULL,FROMJOB);
|
||||
addtempflag(lf->flags, F_NOSKILL, SK_SS_MODIFICATION, NA, NA, NULL,FROMJOB);
|
||||
addtempflag(lf->flags, F_NOSKILL, SK_SS_SUMMONING, NA, NA, NULL,FROMJOB);
|
||||
addtempflag(lf->flags, F_NOSKILL, SK_SS_TRANSLOCATION, NA, NA, NULL,FROMJOB);
|
||||
addtempflag(lf->flags, F_NOSKILL, SK_SS_WILD, NA, NA, NULL,FROMJOB);
|
||||
|
@ -11055,6 +11156,8 @@ void givesubjob(lifeform_t *lf, enum SUBJOB sj) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
add_subjob_alignment_restrictions(lf->flags, sj);
|
||||
}
|
||||
|
||||
|
||||
|
@ -12084,6 +12187,18 @@ int hassubjob(lifeform_t *lf, enum SUBJOB id) {
|
|||
return B_FALSE;
|
||||
}
|
||||
|
||||
int hassoul(lifeform_t *lf) {
|
||||
switch (getraceclass(lf)) {
|
||||
case RC_HUMANOID:
|
||||
case RC_ANIMAL:
|
||||
case RC_DRAGON:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return B_FALSE;
|
||||
}
|
||||
|
||||
void inc_quad_range(enum QUADRANT *start, enum QUADRANT *end, int howmuch) {
|
||||
int i;
|
||||
for (i = 0; i < abs(howmuch); i++) {
|
||||
|
@ -13433,11 +13548,8 @@ object_t *isdualweilding(lifeform_t *lf) {
|
|||
return B_FALSE;
|
||||
}
|
||||
|
||||
int isfleeing(lifeform_t *lf) {
|
||||
if (lfhasflag(lf, F_FLEEFROM)) {
|
||||
return B_TRUE;
|
||||
}
|
||||
return B_FALSE;
|
||||
flag_t *isfleeing(lifeform_t *lf) {
|
||||
return lfhasflag(lf, F_FLEEFROM);
|
||||
}
|
||||
|
||||
int isfreebp(lifeform_t *lf, enum BODYPART bp) {
|
||||
|
@ -13616,6 +13728,9 @@ int isimmobile(lifeform_t *lf) {
|
|||
if (lfhasflag(lf, F_PARALYZED)) {
|
||||
return B_TRUE;
|
||||
}
|
||||
if (isdead(lf)) {
|
||||
return B_TRUE;
|
||||
}
|
||||
return B_FALSE;
|
||||
}
|
||||
|
||||
|
@ -13665,7 +13780,6 @@ int isspellskill(enum SKILL skid) {
|
|||
case SK_SS_FIRE:
|
||||
case SK_SS_COLD:
|
||||
case SK_SS_LIFE:
|
||||
case SK_SS_MODIFICATION:
|
||||
case SK_SS_SUMMONING:
|
||||
case SK_SS_TRANSLOCATION:
|
||||
case SK_SS_WILD:
|
||||
|
@ -15232,6 +15346,32 @@ enum FLAG iswoozy(lifeform_t *lf) {
|
|||
return F_NONE;
|
||||
}
|
||||
|
||||
// check if this job/subjob is possible
|
||||
int jobpossible(flagpile_t *basefp, enum JOB jid, enum SUBJOB sjid) {
|
||||
int ok = B_FALSE;
|
||||
job_t *j;
|
||||
flagpile_t *fp;
|
||||
|
||||
fp = addflagpile(NULL, NULL);
|
||||
|
||||
// take lifeform/race's alignment restrictions
|
||||
copyflag(fp, basefp, F_ALIGNMENT);
|
||||
|
||||
// take job's alignment restrictions
|
||||
j = findjob(jid);
|
||||
if (j) {
|
||||
copyflag(fp, j->flags, F_ALIGNMENT);
|
||||
}
|
||||
|
||||
// take subjob's alignment restrictions
|
||||
add_subjob_alignment_restrictions(fp, sjid);
|
||||
if (genalignmentlist(fp, NULL)) {
|
||||
ok = B_TRUE;
|
||||
}
|
||||
killflagpile(fp);
|
||||
return ok;
|
||||
}
|
||||
|
||||
void killjob(job_t *job) {
|
||||
job_t *nextone, *lastone;
|
||||
|
||||
|
@ -17469,7 +17609,8 @@ void precalclos(lifeform_t *lf) {
|
|||
nlos = 0;
|
||||
nlosdark = 0;
|
||||
|
||||
maxvisrange = getvisrange(lf, B_FALSE);
|
||||
//maxvisrange = getvisrange(lf, B_FALSE);
|
||||
maxvisrange = getvisrange(lf, B_TRUE);
|
||||
nightvisrange = getnightvisrange(lf);
|
||||
plev = getskill(lf, SK_PERCEPTION);
|
||||
|
||||
|
@ -19964,6 +20105,17 @@ int modskillcheckroll(lifeform_t *lf, enum CHECKTYPE ct, int *roll) {
|
|||
othermod += 5;
|
||||
}
|
||||
*/
|
||||
if (!islit(lf->cell)) {
|
||||
othermod += 50;
|
||||
} else {
|
||||
switch (lf->cell->map->illumination) {
|
||||
case IL_FULLLIT: break;
|
||||
case IL_WELLLIT: othermod += 10; break;
|
||||
case IL_DIM: othermod += 20; break;
|
||||
case IL_SHADOWY: othermod += 30; break;
|
||||
case IL_FULLDARK: othermod += 40; break;
|
||||
}
|
||||
}
|
||||
} else if (ct == SC_WILL) {
|
||||
// level counts for more
|
||||
levmod *= 2;
|
||||
|
@ -20660,7 +20812,7 @@ void startlfturn(lifeform_t *lf) {
|
|||
int nretcells;
|
||||
getradiuscells(lf->cell, 2, DT_COMPASS, B_FALSE, LOF_WALLSTOP, B_FALSE, retcell, &nretcells, 0);
|
||||
for (i = 0; i < nretcells; i++) {
|
||||
if (retcell[i]->lf && areenemies(lf, retcell[i]->lf)) {
|
||||
if (retcell[i]->lf && areenemies(lf, retcell[i]->lf) && !lfhasflag(retcell[i]->lf, F_6SENSEWARNED)) {
|
||||
int dir,reldir;
|
||||
dir = getdirtowards(lf->cell, retcell[i], NULL, B_FALSE, DT_ORTH);
|
||||
reldir = getrelativedir(lf, dir);
|
||||
|
@ -20689,6 +20841,10 @@ void startlfturn(lifeform_t *lf) {
|
|||
} else {
|
||||
more();
|
||||
}
|
||||
addtempflag(retcell[i]->lf->flags, F_6SENSEWARNED, B_TRUE, NA, NA, NULL, 10);
|
||||
} else {
|
||||
// monsters just turn to face you
|
||||
turntoface(lf, retcell[i]);
|
||||
}
|
||||
//killflag(f);
|
||||
break;
|
||||
|
@ -21148,7 +21304,7 @@ void startlfturn(lifeform_t *lf) {
|
|||
pt = findpoisontype(f->val[0]);
|
||||
// chance of fighting it off - gets easier over time.
|
||||
//
|
||||
if ((f->lifetime > 0) && skillcheck(lf, SC_POISON, (f->lifetime * 5), -(f->val[1]*5) )) {
|
||||
if ((f->lifetime > 0) && skillcheck(lf, SC_POISON, (f->lifetime * 20), -(f->val[1]*10) )) {
|
||||
killflag(f);
|
||||
} else {
|
||||
flag_t *asleep;
|
||||
|
@ -22618,7 +22774,7 @@ int real_touch(lifeform_t *lf, object_t *o, int onpurpose) {
|
|||
obname, getpossessive(obname), o->material->name);
|
||||
}
|
||||
sprintf(buf, "the touch of %s", o->material->name);
|
||||
losehp(lf, pctof(f->val[1], f->val[2], DT_DIRECT, NULL, buf);
|
||||
losehp(lf, f->val[2], DT_DIRECT, NULL, buf);
|
||||
return B_TRUE;
|
||||
}
|
||||
|
||||
|
@ -24780,6 +24936,16 @@ int weild(lifeform_t *lf, object_t *o) {
|
|||
msg("^gYour %s seems unnaturally sharp!",noprefix(buf));
|
||||
f->known = B_TRUE;
|
||||
}
|
||||
|
||||
if ((o->material->id == MT_BONE) && godprayedto(R_GODDEATH)) {
|
||||
lifeform_t *g;
|
||||
g = findgod(R_GODDEATH);
|
||||
if (g) msg("You sense %s's approval.",g->race->name);
|
||||
} else if (o->material->id == MT_WOOD) && godprayedto(R_GODNATURE)) {
|
||||
lifeform_t *g;
|
||||
g = findgod(R_GODNATURE);
|
||||
if (g) msg("You sense %s's approval.",g->race->name);
|
||||
}
|
||||
}
|
||||
|
||||
return B_FALSE;
|
||||
|
|
9
lf.h
9
lf.h
|
@ -1,5 +1,6 @@
|
|||
#include "defs.h"
|
||||
|
||||
void add_subjob_alignment_restrictions(flagpile_t *fp, enum SUBJOB sj);
|
||||
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);
|
||||
|
@ -123,6 +124,7 @@ skill_t *findskill(enum SKILL id);
|
|||
skill_t *findskillbyname(char *name);
|
||||
enum SKILLLEVEL findskilllevbyname(char *name);
|
||||
subjob_t *findsubjob(enum SUBJOB sjid);
|
||||
subjob_t *findsubjobbyletter(char letter);
|
||||
int fixcurses(lifeform_t *lf);
|
||||
int flee(lifeform_t *lf);
|
||||
void fleefrom(lifeform_t *lf, lifeform_t *enemy, int howlong, int onpurpose);
|
||||
|
@ -133,6 +135,7 @@ void gainlevel(lifeform_t *lf, int autotrain);
|
|||
void gainmp(lifeform_t *lf, int amt);
|
||||
void gainxp(lifeform_t *lf, long amt);
|
||||
void genareaknowledge(flagpile_t *fp, int chancemod);
|
||||
int genalignmentlist(flagpile_t *fp, char *buf);
|
||||
void generatealignment(lifeform_t *lf);
|
||||
void genxplist(void);
|
||||
int get_adjacent_quadrants(int dir, enum QUADRANT *start, enum QUADRANT *end);
|
||||
|
@ -284,7 +287,7 @@ int getweapons(lifeform_t *lf, int meleeonly, object_t **wep, flag_t **damflag,
|
|||
enum SKILLLEVEL getweaponskill(lifeform_t *lf, object_t *o);
|
||||
long getxpforlev(int level);
|
||||
void givebehaviour(lifeform_t *lf, enum BEHAVIOUR bid);
|
||||
void givejob(lifeform_t *lf, enum JOB jobid);
|
||||
void givejob(lifeform_t *lf, enum JOB jobid, enum SUBJOB sj);
|
||||
void givesubjob(lifeform_t *lf, enum SUBJOB sj);
|
||||
int givemoney(lifeform_t *from, lifeform_t *to, int amt);
|
||||
void giveobflags(lifeform_t *lf, object_t *o, enum FLAG whattype);
|
||||
|
@ -303,6 +306,7 @@ int real_hasfreeaction(lifeform_t *lf, enum FLAG exception);
|
|||
int hashealableinjuries(lifeform_t *lf);
|
||||
job_t *hasjob(lifeform_t *lf, enum JOB job);
|
||||
int hassubjob(lifeform_t *lf, enum SUBJOB id);
|
||||
int hassoul(lifeform_t *lf);
|
||||
void inc_quad_range(enum QUADRANT *start, enum QUADRANT *end, int howmuch);
|
||||
int injure(lifeform_t *lf, enum BODYPART where, enum DAMTYPE damtype, enum INJURY forcetype);
|
||||
int lfcanbekod(lifeform_t *lf);
|
||||
|
@ -335,7 +339,7 @@ int isclimbing(lifeform_t *lf);
|
|||
int isdead(lifeform_t *lf);
|
||||
int isdeaf(lifeform_t *lf);
|
||||
object_t *isdualweilding(lifeform_t *lf);
|
||||
int isfleeing(lifeform_t *lf);
|
||||
flag_t *isfleeing(lifeform_t *lf);
|
||||
int isfreebp(lifeform_t *lf, enum BODYPART bp);
|
||||
int isfriendly(lifeform_t *lf);
|
||||
int isfullyhealed(lifeform_t *lf);
|
||||
|
@ -376,6 +380,7 @@ flag_t *isvulnto(flagpile_t *fp, enum DAMTYPE dt, int onlytemp);
|
|||
int isweaponbp(enum BODYPART bp);
|
||||
int isweaponskill(enum SKILL skid);
|
||||
enum FLAG iswoozy(lifeform_t *lf);
|
||||
int jobpossible(flagpile_t *basefp, enum JOB jid, enum SUBJOB sjid);
|
||||
void killjob(job_t *job);
|
||||
void killlf(lifeform_t *lf);
|
||||
void killpoisontype(poisontype_t *pt);
|
||||
|
|
83
map.c
83
map.c
|
@ -117,7 +117,7 @@ habitat_t *addhabitat(enum HABITAT id, char *name, enum CELLTYPE emptycell, enum
|
|||
a->randthingpct = thingchance;
|
||||
a->randobpct = obchance;
|
||||
a->randvaultpct = vaultchance;
|
||||
a->maxvisrange = maxvisrange;
|
||||
//a->maxvisrange = maxvisrange;
|
||||
a->upstairtype = upstairtype;
|
||||
a->downstairtype = downstairtype;
|
||||
return a;
|
||||
|
@ -333,7 +333,7 @@ lifeform_t *addmonster(cell_t *c, enum RACE rid, char *racename, int randomjobok
|
|||
} else {
|
||||
wantsubjob = f->val[2];
|
||||
}
|
||||
givejob(lf, wantjob);
|
||||
givejob(lf, wantjob, SJ_NONE);
|
||||
|
||||
j = findjob(wantjob);
|
||||
// subjob ?
|
||||
|
@ -357,7 +357,7 @@ lifeform_t *addmonster(cell_t *c, enum RACE rid, char *racename, int randomjobok
|
|||
}
|
||||
}
|
||||
} else {
|
||||
givejob(lf, wantjob);
|
||||
givejob(lf, wantjob, SJ_NONE);
|
||||
}
|
||||
if (wantsubjob != SJ_NONE) {
|
||||
givesubjob(lf, wantsubjob);
|
||||
|
@ -653,7 +653,19 @@ map_t *getmapindir(map_t *src, int dir) {
|
|||
int getmapmaxvisrange(map_t *m) {
|
||||
int maxrange;
|
||||
|
||||
maxrange = m->habitat->maxvisrange;
|
||||
//maxrange = m->habitat->maxvisrange;
|
||||
|
||||
// set visrange based on light level
|
||||
maxrange = MAXVISRANGE;
|
||||
switch (m->illumination) {
|
||||
case IL_FULLLIT: break;
|
||||
case IL_WELLLIT: maxrange -= 3; break;
|
||||
case IL_DIM: maxrange -= 5; break;
|
||||
case IL_SHADOWY: maxrange -= 7; break;
|
||||
default: // ie. fulldark
|
||||
maxrange = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
// modify for darkness outside ?
|
||||
if (isoutdoors(m)) {
|
||||
|
@ -672,10 +684,6 @@ int getmapmaxvisrange(map_t *m) {
|
|||
maxrange = pctof( 100 - pct, maxrange);
|
||||
limit(&maxrange, 1, NA);
|
||||
}
|
||||
} else if (m->habitat->id == H_DUNGEON) {
|
||||
// in dungeon, reduce distance based on depth (ie. ambient light)
|
||||
maxrange -= m->depth;
|
||||
limit(&maxrange, 1, NA);
|
||||
}
|
||||
|
||||
limit(&maxrange, 0, MAXVISRANGE);
|
||||
|
@ -2028,7 +2036,8 @@ int fix_reachability(map_t *m) {
|
|||
floodfill(c);
|
||||
// any remaining non-filled empty cells?
|
||||
for (i = 0; i < m->w * m->h; i++) {
|
||||
if (!m->cell[i]->type->solid && !m->cell[i]->filled && !m->cell[i]->locked) {
|
||||
if (!m->cell[i]->type->solid && !m->cell[i]->filled &&
|
||||
((m->cell[i]->room && m->cell[i]->room->prevault) || !m->cell[i]->locked ) ) {
|
||||
vault_t *v;
|
||||
v = getcellvault(m->cell[i]);
|
||||
if (v && hasflag(v->flags, F_VAULTNOLINK)) {
|
||||
|
@ -2514,9 +2523,16 @@ void calclight(map_t *map) {
|
|||
}
|
||||
*/
|
||||
//if ((map->depth <= 5) && (c->lit != L_PERMDARK)) {
|
||||
|
||||
|
||||
/*
|
||||
if ((map->illumination == IL_FULLLIT) && (c->lit != L_PERMDARK)) {
|
||||
makelit(c, L_PERMLIGHT, -1);
|
||||
}
|
||||
*/
|
||||
if (c->lit != L_PERMDARK) {
|
||||
makelit(c, L_PERMLIGHT, -1);
|
||||
}
|
||||
|
||||
// TODO: has dark producing lf?
|
||||
// TODO: has dark producing object?
|
||||
|
@ -3077,7 +3093,16 @@ void createcave(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *
|
|||
}
|
||||
}
|
||||
*/
|
||||
map->illumination = IL_FULLLIT;
|
||||
switch (depth) {
|
||||
case 1:
|
||||
map->illumination = IL_FULLLIT; break;
|
||||
case 2:
|
||||
map->illumination = IL_WELLLIT; break;
|
||||
case 3:
|
||||
map->illumination = IL_DIM; break;
|
||||
default:
|
||||
map->illumination = IL_SHADOWY; break;
|
||||
}
|
||||
|
||||
// what kind of cells will 'empty' ones be?
|
||||
emptycell = getmapempty(map);
|
||||
|
@ -3281,23 +3306,17 @@ void createdungeon(map_t *map, int depth, map_t *parentmap, int exitdir, object_
|
|||
}
|
||||
|
||||
// is the map lit?
|
||||
/*
|
||||
|
||||
XXX: have removed this code for now as light recalc code is VERY slow.
|
||||
|
||||
if (depth <= 5) {
|
||||
if (depth < 5) {
|
||||
map->illumination = IL_FULLLIT;
|
||||
} else if (depth < 10) {
|
||||
map->illumination = IL_WELLLIT;
|
||||
} else if (depth < 15) {
|
||||
map->illumination = IL_DIM;
|
||||
} else {
|
||||
int chance;
|
||||
chance = (depth - 5) * 10;
|
||||
if (pctchance(chance)) {
|
||||
map->illumination = rnd(IL_WELLLIT,IL_FULLDARK);
|
||||
} else {
|
||||
map->illumination = IL_FULLLIT;
|
||||
map->illumination = IL_SHADOWY;
|
||||
}
|
||||
}
|
||||
*/
|
||||
map->illumination = IL_FULLLIT;
|
||||
//map->illumination = IL_FULLLIT;
|
||||
|
||||
// what kind of cells will 'empty' ones be?
|
||||
emptycell = getmapempty(map);
|
||||
|
@ -4127,7 +4146,8 @@ void createmap(map_t *map, int depth, region_t *region, map_t *parentmap, int ex
|
|||
if (v) {
|
||||
room_t *r;
|
||||
int x,y;
|
||||
// lock all vault's cells
|
||||
// lock all vault's cells. BUT we'll unlock them
|
||||
// again when doing fix_reachability
|
||||
r = &map->room[map->nrooms-1];
|
||||
for (y = r->y1; y <= r->y2; y++) {
|
||||
for (x = r->x1; x <= r->x2; x++) {
|
||||
|
@ -4136,6 +4156,10 @@ void createmap(map_t *map, int depth, region_t *region, map_t *parentmap, int ex
|
|||
c->locked = B_TRUE;
|
||||
}
|
||||
}
|
||||
// remember that this room was made before the rest of the map.
|
||||
// it will counteract the fact that we locked this room's cells
|
||||
// when we call fix_reachability().
|
||||
r->prevault = B_TRUE;
|
||||
nprevaults++;
|
||||
}
|
||||
} // for each remembered thing
|
||||
|
@ -4852,6 +4876,7 @@ int createvault(map_t *map, int roomid, vault_t *v, int *retw, int *reth, int *r
|
|||
map->room[map->nrooms].y2 = maxy;
|
||||
map->room[map->nrooms].vault = v;
|
||||
map->room[map->nrooms].exitslinked = B_FALSE;
|
||||
map->room[map->nrooms].prevault = B_FALSE;
|
||||
thisroom = &(map->room[map->nrooms]);
|
||||
map->nrooms++;
|
||||
|
||||
|
@ -5699,6 +5724,7 @@ void createroom(map_t *map, int roomid, int x1, int y1, int x2, int y2, int forc
|
|||
map->room[map->nrooms].y2 = y2;
|
||||
map->room[map->nrooms].vault = NULL;
|
||||
map->room[map->nrooms].exitslinked = B_FALSE;
|
||||
map->room[map->nrooms].prevault = B_FALSE;
|
||||
thisroom = &(map->room[map->nrooms]);
|
||||
map->nrooms++;
|
||||
|
||||
|
@ -6013,9 +6039,9 @@ void finalisemap(map_t *map, object_t *entryob, int exitdir) {
|
|||
enum OBTYPE upstairtype, downstairtype;
|
||||
int i,d,x,y;
|
||||
int linkedentry = B_FALSE;
|
||||
char roomlightob[BUFLEN],corridorlightob[BUFLEN];
|
||||
int roomlightchance = 0;
|
||||
int corridorlightfreq = 0;
|
||||
//char roomlightob[BUFLEN],corridorlightob[BUFLEN];
|
||||
//int roomlightchance = 0;
|
||||
//int corridorlightfreq = 0;
|
||||
int nupstairsreq = 0,ndownstairsreq = 0;
|
||||
int nupstairsneeded = 0,ndownstairsneeded = 0;
|
||||
cell_t *c;
|
||||
|
@ -6208,6 +6234,7 @@ void finalisemap(map_t *map, object_t *entryob, int exitdir) {
|
|||
}
|
||||
|
||||
// if map if not fully lit, scatter light sources around.
|
||||
/*
|
||||
switch (map->illumination) {
|
||||
case IL_FULLLIT: break;
|
||||
case IL_WELLLIT:
|
||||
|
@ -6258,6 +6285,8 @@ void finalisemap(map_t *map, object_t *entryob, int exitdir) {
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// in swamps, replace all walls with deep water
|
||||
|
|
32
move.c
32
move.c
|
@ -2839,7 +2839,7 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
|
|||
int srcmoney = 0;
|
||||
int prebattle = B_FALSE;
|
||||
int prebattlearmed = B_FALSE;
|
||||
flag_t *f;
|
||||
flag_t *f,*fleeing = NULL;
|
||||
// are we next to an enemy who we can see?
|
||||
prebattle = isinbattle(lf, B_NODISTANT, B_FALSE);
|
||||
if (isplayer(lf)) {
|
||||
|
@ -2851,6 +2851,8 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
|
|||
|
||||
reldir = getrelativedir(lf, dir);
|
||||
|
||||
fleeing = isfleeing(lf);
|
||||
|
||||
if (isclimbing(lf)) strafe = B_TRUE;
|
||||
|
||||
if (onpurpose) {
|
||||
|
@ -2964,6 +2966,7 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
|
|||
lifeform_t *alf;
|
||||
if (initiatemove(lf, cell, onpurpose, &dontclearmsg)) {
|
||||
// failed?
|
||||
if (fleeing) taketime(lf, getmovespeed(lf)); // still take time
|
||||
return B_TRUE;
|
||||
}
|
||||
|
||||
|
@ -3167,7 +3170,7 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
|
|||
losehp(lf, 1, DT_BASH, NULL, buf);
|
||||
}
|
||||
}
|
||||
if (onpurpose) taketime(lf, getmovespeed(lf));
|
||||
if (onpurpose || fleeing) taketime(lf, getmovespeed(lf));
|
||||
break;
|
||||
case E_DOORINWAY:
|
||||
// can't open doors while climbing
|
||||
|
@ -3188,7 +3191,7 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
|
|||
setcellknown(cell, B_FALSE);
|
||||
snprintf(buf, BUFLEN, "%sing into a door", getmoveverb(lf));
|
||||
losehp(lf, 1, DT_BASH, NULL, buf);
|
||||
if (onpurpose) taketime(lf, getmovespeed(lf));
|
||||
if (onpurpose || fleeing) taketime(lf, getmovespeed(lf));
|
||||
}
|
||||
} else {
|
||||
if (cansee(player, lf)) {
|
||||
|
@ -3197,7 +3200,7 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
|
|||
}
|
||||
snprintf(buf, BUFLEN, "%sing into a door", getmoveverb(lf));
|
||||
losehp(lf, 1, DT_BASH, NULL, buf);
|
||||
if (onpurpose) taketime(lf, getmovespeed(lf));
|
||||
if (onpurpose || fleeing) taketime(lf, getmovespeed(lf));
|
||||
}
|
||||
} else {
|
||||
if (lfhasflag(lf, F_RAGE)) {
|
||||
|
@ -3329,7 +3332,7 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
|
|||
getlfname(lf, lfname);
|
||||
msg("%s bumps into %s.", lfname, inwayname);
|
||||
}
|
||||
if (onpurpose) taketime(lf, getmovespeed(lf));
|
||||
if (onpurpose || fleeing) taketime(lf, getmovespeed(lf));
|
||||
} else {
|
||||
if (canswapwith(lf, cell->lf)) {
|
||||
lifeform_t *lfinway;
|
||||
|
@ -3361,7 +3364,7 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
|
|||
if (isplayer(lf)) {
|
||||
msg("You cannot move!");
|
||||
}
|
||||
if (onpurpose) taketime(lf, getmovespeed(lf));
|
||||
if (onpurpose || fleeing) taketime(lf, getmovespeed(lf));
|
||||
break;
|
||||
case E_GRABBEDBY:
|
||||
if (rdata) {
|
||||
|
@ -3389,19 +3392,19 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
|
|||
msg("You cannot get away from whatever is holding you!");
|
||||
}
|
||||
}
|
||||
if (onpurpose) taketime(lf, getmovespeed(lf));
|
||||
if (onpurpose || fleeing) taketime(lf, getmovespeed(lf));
|
||||
break;
|
||||
case E_PENTAGRAM:
|
||||
if (isplayer(lf)) {
|
||||
msg("You cannot seem to enter the pentagram.");
|
||||
}
|
||||
if (onpurpose) taketime(lf, getmovespeed(lf));
|
||||
if (onpurpose || fleeing) taketime(lf, getmovespeed(lf));
|
||||
break;
|
||||
case E_TOOHEAVY:
|
||||
if (isplayer(lf)) {
|
||||
msg("Your load is too heavy to move with!");
|
||||
}
|
||||
if (onpurpose) taketime(lf, getmovespeed(lf));
|
||||
if (onpurpose || fleeing) taketime(lf, getmovespeed(lf));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -3531,12 +3534,14 @@ int walkoffmap(lifeform_t *lf, int dir, int onpurpose) {
|
|||
int willmove(lifeform_t *lf, int dir, enum ERROR *error) {
|
||||
cell_t *cell;
|
||||
enum ATTRBRACKET iq;
|
||||
enum ATTRBRACKET wis;
|
||||
object_t *o;
|
||||
char buf[BUFLEN];
|
||||
flag_t *f;
|
||||
|
||||
//object_t *o;
|
||||
iq = getattrbracket(getattr(lf, A_IQ), A_IQ, NULL);
|
||||
wis = getattrbracket(getattr(lf, A_WIS), A_WIS, NULL);
|
||||
|
||||
// default
|
||||
if (error) {
|
||||
|
@ -3555,9 +3560,14 @@ int willmove(lifeform_t *lf, int dir, enum ERROR *error) {
|
|||
}
|
||||
|
||||
if (celldangerous(lf, cell, B_TRUE, error)) {
|
||||
// if lfs are fleeing and have below average wisdom,
|
||||
// they will walk onto dangerous cells
|
||||
if (isfleeing(lf) && (wis < AT_AVERAGE)) {
|
||||
} else {
|
||||
if (error) *error = E_WONT;
|
||||
return B_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
// dont move out of range of lifeobs, but attacking out of range lfs is ok
|
||||
if (!cell->lf) {
|
||||
|
@ -3659,8 +3669,8 @@ int willmove(lifeform_t *lf, int dir, enum ERROR *error) {
|
|||
}
|
||||
}
|
||||
|
||||
// for at least average iq things...
|
||||
if (iq >= AT_AVERAGE) {
|
||||
// for at least average wisdom things...
|
||||
if (wis >= AT_AVERAGE) {
|
||||
// don't move if in pain
|
||||
if (move_will_hurt(lf) && !isfleeing(lf)) {
|
||||
if (error) *error = E_WONT;
|
||||
|
|
29
nexus.c
29
nexus.c
|
@ -207,6 +207,7 @@ int main(int argc, char **argv) {
|
|||
if (!foundsavegame) {
|
||||
char *user,pname[BUFLEN],buf[BUFLEN];
|
||||
job_t *j = NULL;
|
||||
enum SUBJOB wantsubjob = SJ_NONE;
|
||||
race_t *startrace = NULL;
|
||||
char ch;
|
||||
//object_t *o;
|
||||
|
@ -265,18 +266,41 @@ int main(int argc, char **argv) {
|
|||
initprompt(&prompt, "Select your base job:");
|
||||
ch = 'a';
|
||||
for (j = firstjob ; j ; j = j->next) {
|
||||
if (jobpossible(startrace->flags, j->id, SJ_NONE)) {
|
||||
subjob_t *sub;
|
||||
char *longdesc;
|
||||
longdesc = malloc(HUGEBUFLEN * sizeof(char));
|
||||
makedesc_job(j, longdesc);
|
||||
if (!hasflag(j->flags, F_NOPLAYER)) {
|
||||
addchoice(&prompt, ch++, (j->id == J_GOD) ? "Diety (for debugging)" : j->name, NULL, j, longdesc);
|
||||
// letter isn't used
|
||||
addchoice(&prompt, '-', (j->id == J_GOD) ? "Diety (for debugging)" : j->name, NULL, j, longdesc);
|
||||
}
|
||||
free(longdesc);
|
||||
// show subjobs of this one too...
|
||||
for (sub = firstsubjob ; sub ; sub = sub->next) {
|
||||
if (hasflagval(j->flags, F_CANHAVESUBJOB, sub->id, NA, NA, NULL)) {
|
||||
if (jobpossible(startrace->flags, J_NONE, sub->id)) {
|
||||
char thisname[BUFLEN];
|
||||
sprintf(thisname, "%s:%s", j->name, sub->name);
|
||||
addchoice(&prompt, sub->letter, thisname, NULL, j, sub->desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
j = NULL;
|
||||
while (!j) {
|
||||
getchoicestr(&prompt, B_FALSE, B_TRUE);
|
||||
j = prompt.result;
|
||||
if (prompt.selection != '-') {
|
||||
subjob_t *sj;
|
||||
// ie. selected a subjob
|
||||
// find the subjob with this letter....
|
||||
sj = findsubjobbyletter(prompt.choice[prompt.selection].ch);
|
||||
if (sj) {
|
||||
wantsubjob = sj->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -367,7 +391,7 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
|
||||
// give the player their job
|
||||
givejob(player, j->id);
|
||||
givejob(player, j->id, wantsubjob);
|
||||
//////////////////////
|
||||
|
||||
// read cheat info from player file
|
||||
|
@ -796,7 +820,6 @@ void donextturn(map_t *map) {
|
|||
// skip turn
|
||||
taketime(who, SPEED_DEAD);
|
||||
} else {
|
||||
|
||||
// do we need to run away from something?
|
||||
if (!flee(who)) {
|
||||
int donormalmove = B_TRUE;
|
||||
|
|
|
@ -1688,13 +1688,12 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum
|
|||
// select actual random schools to use.
|
||||
for (i = 0; i < nschools; i++) {
|
||||
if (where->owner && hassubjob(where->owner, SJ_BATTLEMAGE)) {
|
||||
switch (rnd(1,6)) {
|
||||
switch (rnd(1,5)) {
|
||||
case 1: school[i] = SS_FIRE; break;
|
||||
case 2: school[i] = SS_COLD; break;
|
||||
case 3: school[i] = SS_AIR; break;
|
||||
case 4: school[i] = SS_MODIFICATION; break;
|
||||
case 5: school[i] = SS_TRANSLOCATION; break;
|
||||
case 6: school[i] = SS_WILD; break;
|
||||
case 4: school[i] = SS_TRANSLOCATION; break;
|
||||
case 5: school[i] = SS_WILD; break;
|
||||
}
|
||||
} else if (where->owner && hasjob(where->owner, J_WIZARD)) {
|
||||
school[i] = getrandomspellschool(where->owner, B_TRUE);
|
||||
|
|
20
spell.c
20
spell.c
|
@ -2255,6 +2255,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
|
|||
if (f) killflag(f);
|
||||
|
||||
// teleport back to initial pos
|
||||
if (hasfreeaction(user)) {
|
||||
movelf(user, origcell);
|
||||
if (haslos(player, adjcell)) {
|
||||
msg("%s swoop%s away!",username,isplayer(user) ? "" : "s");
|
||||
|
@ -2264,6 +2265,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
|
|||
//if (!isplayer(user)) {
|
||||
//}
|
||||
}
|
||||
}
|
||||
} else if (abilid == OT_A_THRUST) {
|
||||
object_t *wep;
|
||||
flag_t *f;
|
||||
|
@ -2910,7 +2912,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
|
|||
askstring(question, '?', buf, BUFLEN, NULL);
|
||||
j = findjobbyname(buf);
|
||||
if (j) {
|
||||
givejob(target, j->id);
|
||||
givejob(target, j->id, SJ_NONE);
|
||||
msg("%s is now a %s.", lfname, j->name);
|
||||
} else {
|
||||
fizzle(user);
|
||||
|
@ -3235,7 +3237,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
|
|||
|
||||
// use empty handed attack accuracy
|
||||
wep = getweapon(user);
|
||||
if (rolltohit(user, target, wep, NULL, NULL)) {
|
||||
if (rolltohit(user, target, wep, NULL, NULL, NULL)) {
|
||||
// success!
|
||||
failed = B_FALSE;
|
||||
if (steal(user, target->pack, F_NONE)) {
|
||||
|
@ -6383,7 +6385,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
} else if (spellid == OT_S_GLYPHWARDING) {
|
||||
char buf[BUFLEN];
|
||||
int gpower;
|
||||
gpower = power / 2;
|
||||
gpower = 2 + (power / 2);
|
||||
limit(&gpower, 1, NA);
|
||||
sprintf(buf, "^g*WARD%d*^n", gpower);
|
||||
writetextonground(caster, caster->cell, buf, power*5);
|
||||
|
@ -7718,7 +7720,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
return B_TRUE;
|
||||
}
|
||||
getlfname(target, targname);
|
||||
if (rolltohit(caster, target, NULL, NULL, NULL)) {
|
||||
if (rolltohit(caster, target, NULL, NULL, NULL, NULL)) {
|
||||
if (isplayer(caster) || cansee(player, caster)) {
|
||||
construct_hit_string(caster, target, castername, targname, targname, NULL, DT_TOUCH, 0, target->maxhp,
|
||||
0, B_FALSE, B_FALSE, B_FALSE, B_TRUE, buf);
|
||||
|
@ -7999,7 +8001,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
// copy caster's job
|
||||
j = getjob(caster);
|
||||
if (j) {
|
||||
givejob(lf, j->id);
|
||||
givejob(lf, j->id, SJ_NONE);
|
||||
}
|
||||
addflag(lf->flags, F_NOTIME, B_TRUE, NA, NA, NULL);
|
||||
lf->created = B_FALSE; // to avoid "the xxx puts on armour" messages
|
||||
|
@ -12739,7 +12741,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
c = getrandomadjcell(caster->cell, WE_WALKABLE, B_ALLOWEXPAND);
|
||||
j = getrandomjob(B_TRUE);
|
||||
lf = addlf(c, R_HUMAN, target->level);
|
||||
givejob(lf, j->id);
|
||||
givejob(lf, j->id, SJ_NONE);
|
||||
getlfnamea(lf, lfname);
|
||||
if (cansee(player, lf)) {
|
||||
msg("%s appears!", lfname);
|
||||
|
@ -13008,8 +13010,6 @@ enum OBTYPE getfirstwizspell(enum SPELLSCHOOL school) {
|
|||
case SS_FIRE: firstspell = OT_S_SPARK; break;
|
||||
case SS_DEATH: firstspell = OT_S_STENCH; break;
|
||||
case SS_DIVINATION: firstspell = OT_S_SIXTHSENSE; break;
|
||||
//case SS_MODIFICATION: firstspell = OT_S_HOLDPORTAL; break;
|
||||
case SS_MODIFICATION: firstspell = OT_S_OBJECTGROWTH; break;
|
||||
case SS_TRANSLOCATION: firstspell = OT_S_APPORTATION; break;
|
||||
case SS_SUMMONING: firstspell = OT_S_GLYPHWARDING; break;
|
||||
case SS_LIFE: firstspell = OT_S_HEALINGMIN; break;
|
||||
|
@ -13180,8 +13180,6 @@ enum SKILL getschoolskill(enum SPELLSCHOOL ss) {
|
|||
return SK_SS_COLD;
|
||||
case SS_LIFE:
|
||||
return SK_SS_LIFE;
|
||||
case SS_MODIFICATION:
|
||||
return SK_SS_MODIFICATION;
|
||||
case SS_MENTAL:
|
||||
return SK_SS_MENTAL;
|
||||
case SS_SUMMONING:
|
||||
|
@ -13215,8 +13213,6 @@ enum SPELLSCHOOL getskillschool(enum SKILL skid) {
|
|||
return SS_COLD;
|
||||
case SK_SS_LIFE:
|
||||
return SS_LIFE;
|
||||
case SK_SS_MODIFICATION:
|
||||
return SS_MODIFICATION;
|
||||
case SK_SS_MENTAL:
|
||||
return SS_MENTAL;
|
||||
case SK_SS_SUMMONING:
|
||||
|
|
13
text.c
13
text.c
|
@ -1289,6 +1289,17 @@ char *getdrunktext(flag_t *drunkflag) {
|
|||
return "??drunk??";
|
||||
}
|
||||
|
||||
char *getilluminationdesc(enum ILLUMINATION il) {
|
||||
switch (il) {
|
||||
case IL_FULLLIT: return "This area is fully lit.";
|
||||
case IL_WELLLIT: return "The light here is a little dim.";
|
||||
case IL_DIM: return "The light here is very dim.";
|
||||
case IL_SHADOWY: return "It is almost completely dark here.";
|
||||
case IL_FULLDARK: return "It is completely dark here.";
|
||||
}
|
||||
return "xxx_unknown_illumination_xxx";
|
||||
}
|
||||
|
||||
char *getinjuredbpname(enum BODYPART bp) {
|
||||
switch (bp) {
|
||||
case BP_HEAD: return "head";
|
||||
|
@ -1657,7 +1668,6 @@ char *getschoolname(enum SPELLSCHOOL sch) {
|
|||
case SS_AIR: return "Air Magic";
|
||||
case SS_FIRE: return "Fire Magic";
|
||||
case SS_COLD: return "Cold Magic";
|
||||
case SS_MODIFICATION: return "Modification Magic";
|
||||
case SS_DEATH: return "Necromancy";
|
||||
case SS_NATURE: return "Enviromancy";
|
||||
case SS_LIFE: return "Life Magic";
|
||||
|
@ -1682,7 +1692,6 @@ char *getschoolnameshort(enum SPELLSCHOOL sch) {
|
|||
case SS_DEATH: return "Necromancy";
|
||||
case SS_LIFE: return "Life Magic";
|
||||
case SS_MENTAL: return "Psionic Powers";
|
||||
case SS_MODIFICATION: return "Modification";
|
||||
case SS_NATURE: return "Nature";
|
||||
case SS_DIVINATION: return "Divination";
|
||||
case SS_TRANSLOCATION: return "Translocation";
|
||||
|
|
2
text.h
2
text.h
|
@ -26,11 +26,13 @@ char *getfillingname(int nutrition);
|
|||
char *getflagsourcetext(flag_t *f);
|
||||
int gethitconferlifetime(char *text, int *min, int *max);
|
||||
char *getkillverb(lifeform_t *victim, object_t *wep, enum DAMTYPE damtype, int dam, int maxhp);
|
||||
char *getpctname(int pct);
|
||||
char *getpoisondamverb(enum POISONTYPE ptype);
|
||||
//char *getpoisondesc(enum POISONTYPE ptype);
|
||||
//char *getpoisonname(enum POISONTYPE ptype);
|
||||
char *getpossessive(char *text);
|
||||
char *getdrunktext(flag_t *drunkflag);
|
||||
char *getilluminationdesc(enum ILLUMINATION il);
|
||||
char *getinjuredbpname(enum BODYPART bp);
|
||||
char *getinjuryname(enum DAMTYPE dt);
|
||||
char *getinjurydesc(enum BODYPART bp, enum DAMTYPE dt);
|
||||
|
|
Loading…
Reference in New Issue