- [+] ENLARGE spell

- [+] grant extra hp too (*2)
    - [+] grant extra strength (+50)
    - [+] sizetimer text:
        - [+] orighp^origstr
    - [+] polymorph while resized will just return you to your original
          size.
    - [+] high level: enlarge your armour/weapons with you!
        - [+] need to change resizelf() too to take an extra arg
        - [+] need to chance F_SIZETIMER too
- [+] diurnal/nocturnal monsters get a penalty to listen checks during night/day
- [+] spriggan - green 'n'. ugly. can change size.
- [+] weed sprite - evil fairy, wild magic - orange 'n'
- [+] bog wraith - destroy food on touch. wants food. blight.
    * [+] can use "blight" spell
- [+] Unicorn
    - [+] white 'u'
    - [+] good
    - [+] teleport 
    - [+] nocharm
    - [+] good spell resistanve (high wis)
    - [+] drop a horn on death, which grants poison resistant when held
This commit is contained in:
Rob Pearce 2012-03-27 10:49:23 +00:00
parent d872098c48
commit eb859a4889
7 changed files with 430 additions and 31 deletions

2
ai.c
View File

@ -2633,7 +2633,7 @@ int aispellok(lifeform_t *lf, enum OBTYPE spellid, lifeform_t *victim, enum FLAG
specificcheckok = B_FALSE;
} else if (getcelldist(lf->cell, victim->cell) > srange) {
specificcheckok = B_FALSE;
} else if (getcelldist(lf->cell, victim->cell) == 1) { // ie already adjacent
} else if (getcelldist(lf->cell, victim->cell) < 2) { // ie too close
specificcheckok = B_FALSE;
}
}

201
data.c
View File

@ -2835,6 +2835,16 @@ void initobjects(void) {
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
addflag(lastot->flags, F_PLEASESGOD, R_GODDEATH, 1, NA, NULL);
addot(OT_S_BLIGHT, "blight", "Covers the target location with a miasma of decay, tainting food and damaging living beings.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines damage and amount of food affected.");
addflag(lastot->flags, F_SPELLSCHOOL, SS_DEATH, NA, NA, NULL);
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
addflag(lastot->flags, F_MAXPOWER, 10, NA, NA, NULL);
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER|TT_OBJECT, NA, NA, NULL);
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
addflag(lastot->flags, F_RANGE, 2, NA, NA, NULL);
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
addflag(lastot->flags, F_PLEASESGOD, R_GODDEATH, 1, NA, NULL);
// l2
addot(OT_S_BLINDNESS, "blindness", "Temporarily blinds the target.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines resistability and duration.");
@ -3984,15 +3994,19 @@ void initobjects(void) {
// l2
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.");
@ -4873,6 +4887,10 @@ void initobjects(void) {
addflag(lastot->flags, F_VALUE, 15, NA, NA, NULL);
addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL);
addot(OT_UNICORNHORN, "unicorn horn", "A two-foot long conical horn, glowing faintly.", MT_BONE, 2, OC_TOOLS, SZ_SMALL);
addflag(lastot->flags, F_VALUE, 1000, NA, NA, NULL);
addflag(lastot->flags, F_HOLDCONFER, F_DTIMMUNE, DT_POISON, NA, NULL);
// tech - l0
addot(OT_CREDITCARD, "credit card", "A rectangular plastic card.", MT_PLASTIC, 0.01, OC_TECH, SZ_TINY);
addflag(lastot->flags, F_RARITY, H_ALL, 90, NA, NULL);
@ -6683,6 +6701,13 @@ void initobjects(void) {
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
addot(OT_HORN, "horn", "unicorn horn object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
addflag(lastot->flags, F_DAM, DT_PIERCE, 2, NA, NULL);
addflag(lastot->flags, F_NOSTRDAMMOD, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_USESSKILL, SK_NONE, NA, NA, NULL);
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
addot(OT_BUTT, "headbutt", "headbutt object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
addflag(lastot->flags, F_DAM, DT_BASH, 2, NA, NULL);
addflag(lastot->flags, F_NOSTRDAMMOD, B_TRUE, NA, NA, NULL);
@ -6784,6 +6809,13 @@ void initobjects(void) {
addflag(lastot->flags, F_NOSTRDAMMOD, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_USESSKILL, SK_NONE, NA, NA, NULL);
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
addot(OT_TOUCHPOISON, "poisonous touch", "poison touch object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
addflag(lastot->flags, F_ARMOURPIERCE, 100, NA, NA, "");
addflag(lastot->flags, F_ATTACKVERB, NA, NA, NA, "touch");
addflag(lastot->flags, F_DAM, DT_TOUCH, 1, NA, NULL);
addflag(lastot->flags, F_NOSTRDAMMOD, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_USESSKILL, SK_NONE, NA, NA, NULL);
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
// missiles
addot(OT_DART, "dart", "A small, sharp projectile weapon.", MT_WOOD, 0.5, OC_MISSILE, SZ_SMALL);
@ -9306,7 +9338,7 @@ void initrace(void) {
addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_NIGHTVISRANGEMOD, 1, NA, "75");
addrace(R_DRYAD, "dryad", 65, 'n', C_BROWN, MT_WOOD, RC_MAGIC, "Dryads are gentle forest spirits. These peaceful creatures prefer the tranquility of nature, and will avoid fighting if possible.");
addrace(R_DRYAD, "dryad", 65, 'p', C_BROWN, MT_WOOD, RC_MAGIC, "Dryads are gentle forest spirits. These peaceful creatures prefer the tranquility of nature, and will avoid fighting if possible.");
setbodytype(lastrace, BT_HUMANOID);
addflag(lastrace->flags, F_ALIGNMENT, AL_GOOD, NA, NA, NULL);
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
@ -10543,7 +10575,7 @@ void initrace(void) {
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_STARTJOB, 20, J_WIZARD, SJ_RANDOM, NULL);
addrace(R_NAIAD, "naiad", 5, 'n', C_BLUE, MT_FLESH, RC_MAGIC, "A small, beautiful water spirit with webbed hands and feet.");
addrace(R_NIXIE, "nixie", 5, 'n', C_BLUE, MT_FLESH, RC_MAGIC, "A small, beautiful water spirit with webbed hands and feet.");
setbodytype(lastrace, BT_HUMANOID);
addflag(lastrace->flags, F_ALIGNMENT, AL_GOOD, NA, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL);
@ -10946,7 +10978,7 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_SKILLED, NA, NULL);
addflag(lastrace->flags, F_EQUINE, B_TRUE, NA, NA, NULL);
addrace(R_PIXIE, "pixie", 5, 'n', C_GREEN, MT_FLESH, RC_MAGIC, "A small magical woodland creature, flying around on moth-like wings.");
addrace(R_PIXIE, "pixie", 5, 'n', C_MAGENTA, MT_FLESH, RC_MAGIC, "A small magical woodland creature, flying around on moth-like wings.");
setbodytype(lastrace, BT_HUMANOID);
addbodypart(lastrace, BP_WINGS, NULL);
addflag(lastrace->flags, F_EXTRACORPSE, 15, NA, NA, "pile of prankster's dust");
@ -11288,7 +11320,7 @@ void initrace(void) {
addflag(lastrace->flags, F_DTIMMUNE, DT_COLD, NA, NA, NULL);
addrace(R_SATYR, "satyr", 80, 'h', C_GREEN, MT_FLESH, RC_HUMANOID, "A goat-like humanoid equipped with a set of magical panpipes.");
addrace(R_SATYR, "satyr", 80, 'h', C_YELLOW, MT_FLESH, RC_HUMANOID, "A goat-like humanoid equipped with a set of magical panpipes.");
setbodytype(lastrace, BT_HUMANOID);
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
@ -11417,6 +11449,48 @@ void initrace(void) {
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "pounds its drills into the ground");
addflag(lastrace->flags, F_EATCONFER, F_MUTABLE, B_TRUE, NA, "100");
addrace(R_SPRIGGAN, "spriggan", 10, 'n', C_GREEN, MT_FLESH, RC_MAGIC, "Small, grotesque, and green. All words used to describe the diminuative spriggan race.");
setbodytype(lastrace, BT_HUMANOID);
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, NA, NA, "55-100");
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_HIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_VLOW, NA, NULL);
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, 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, 5, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, 10, 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_CANCAST, OT_S_SIZEUP, NA, NA, "pw:5;");
addflag(lastrace->flags, F_CANCAST, OT_S_SHATTER, NA, NA, "pw:1;");
addflag(lastrace->flags, F_CANCAST, OT_S_FEAR, 10, 10, "pw:2;");
addflag(lastrace->flags, F_CANCAST, OT_S_PYROMANIA, NA, NA, "pw:1;");
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_STARTOB, 25, NA, NA, "mace");
addflag(lastrace->flags, F_STARTOBWEPSK, 25, SK_LONGBLADES, NA, NULL);
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);
addflag(lastrace->flags, F_STARTSKILL, SK_TRAPS, PR_ADEPT, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_LOCKPICKING, PR_ADEPT, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_STEALTH, PR_ADEPT, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_LISTEN, PR_ADEPT, NA, NULL);
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL);
addflag(lastrace->flags, F_CASTCHANCE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_WANTSBETTERWEP, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_WANTSBETTERARM, B_TRUE, NA, NA, NULL);
addrace(R_SPRITEFIRE, "fire sprite", 5, 'n', C_RED, MT_FIRE, RC_MAGIC, "A small magical creature surrounded by crackling flames.");
setbodytype(lastrace, BT_HUMANOID);
addflag(lastrace->flags, F_EXTRACORPSE, NA, NA, NA, "small fire");
@ -11431,7 +11505,7 @@ void initrace(void) {
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_RARE, 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_TR, 3, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL);
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
@ -11474,7 +11548,7 @@ void initrace(void) {
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_FREQUENT, 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_TR, 3, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL);
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
@ -11512,7 +11586,7 @@ void initrace(void) {
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_FREQUENT, 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_TR, 3, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL);
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
@ -11538,6 +11612,41 @@ void initrace(void) {
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_COLD, NA, "25");
addflag(lastrace->flags, F_WANTSOBFLAG, F_GEM, B_COVETS, NA, NULL);
addrace(R_SPRITEWEED, "weed sprite", 5, 'n', C_ORANGE, MT_FLESH, RC_MAGIC, "The bright colour of weed sprites belies their evil nature.");
setbodytype(lastrace, BT_HUMANOID);
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_HIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LTAVERAGE, NA, NULL);
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, 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, 4, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL);
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_CANCAST, OT_S_SMITEGOOD, NA, NA, "pw:1;");
addflag(lastrace->flags, F_RNDSPELLCOUNT, 3, NA, NA, NULL);
addflag(lastrace->flags, F_RNDSPELLSCHOOL, SS_WILD, 1, 3, NULL);
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "gestures");
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL);
addflag(lastrace->flags, F_DTIMMUNE, DT_COLD, NA, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_SS_WILD, PR_ADEPT, NA, NULL);
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL);
addflag(lastrace->flags, F_CASTCHANCE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, UNLIMITED, NA, NA, NULL);
addrace(R_TROLL, "troll", 100, 't', C_GREEN, MT_FLESH, RC_HUMANOID, "A savage, hairy green monster. Trolls are extremely muscular, move abnormally quickly and regenerate.");
setbodytype(lastrace, BT_HUMANOID);
setbodypartname(lastrace, BP_HANDS, "claws");
@ -15134,6 +15243,41 @@ void initrace(void) {
addflag(lastrace->flags, F_CASTCHANCE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
addrace(R_WRAITHBOG, "bog wraith", 20, 'Z', C_BROWN, MT_PLANT, RC_UNDEAD, "Bog wraiths take the form of vaguely humanoid blobs of putrid mud.");
setbodytype(lastrace, BT_HUMANOID);
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_HUMAN, NA, NA, NULL);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_GTAVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_HASATTACK, OT_TOUCHPOISON, 4, NA, NULL);
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 32, "5-10");
addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 3, NA, NULL);
addflag(lastrace->flags, F_DTVULN, DT_FIRE, NA, NA, NULL);
addflag(lastrace->flags, F_CANCAST, OT_S_BLIGHT, NA, NA, "pw:5;");
addflag(lastrace->flags, F_CANCAST, OT_S_POISONBOLT, NA, NA, "pw:7;");
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "undulates");
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "screeches^a screech");
addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_POISONCORPSE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_POISON, NA, "15");
addrace(R_WRAITHICE, "ice wraith", 20, 'Z', C_CYAN, MT_ICE, RC_UNDEAD, "Ice wraiths look like frozen humanoid forms, often garbed in threadbare clothing.");
setbodytype(lastrace, BT_HUMANOID);
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
@ -15154,6 +15298,7 @@ void initrace(void) {
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_HASATTACK, OT_TOUCHCHILL, 7, NA, NULL);
addflag(lastrace->flags, F_DTIMMUNE, DT_COLD, NA, NA, NULL);
addflag(lastrace->flags, F_DTVULN, DT_FIRE, NA, NA, NULL);
addflag(lastrace->flags, F_DAMAGEGROUNDOBS, 4, DT_COLD, B_TRUE, NULL);
addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "shoddy cloak");
@ -15409,6 +15554,48 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTJOB, 100, J_WIZARD, SJ_RANDOM, NULL);
addflag(lastrace->flags, F_REVIVETIMER, 0, 25, R_REVENANT, NULL);
addrace(R_UNICORN, "unicorn", 500, 'u', C_WHITE, MT_FLESH, RC_ANIMAL, "Powerful steeds with gleaming coats of pure white, and a single ivory horn protruding from their forehead.");
setbodytype(lastrace, BT_QUADRAPED);
addflag(lastrace->flags, F_ALIGNMENT, AL_GOOD, NA, NA, NULL);
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_CANTALK, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_GTAVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_HIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_EXHIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_VHIGH, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_HOOF, 6, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_HORN, 12, NA, NULL);
addflag(lastrace->flags, F_MAXATTACKS, 3, 3, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, "range:5;");
//addflag(lastrace->flags, F_CANCAST, OT_S_SMITEEVIL, NA, NA, "pw:8;");
addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 4, NA, "screams in pain^screams of pain");
addflag(lastrace->flags, F_RESISTMAG, 10, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 25, NA, NA, NULL);
addflag(lastrace->flags, F_ENHANCESMELL, 3, NA, NA, NULL);
addflag(lastrace->flags, F_VEGETARIAN, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_DTIMMUNE, DT_POISON, NA, NA, NULL);
addflag(lastrace->flags, F_DTIMMUNE, DT_NECROTIC, NA, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_SKILLED, NA, NULL);
addflag(lastrace->flags, F_NOCHARM, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_CANCAST, OT_S_TELEPORT, 20, 20, "pw:8;");
addflag(lastrace->flags, F_CANCAST, OT_S_CUREPOISON, 20, 20, "pw:10;");
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "raises its horn");
addflag(lastrace->flags, F_EQUINE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_HATESRACE, R_ORC, NA, NA, NULL);
addflag(lastrace->flags, F_HATESRACE, R_GRIFFON, NA, NA, NULL);
addflag(lastrace->flags, F_HATESRACECLASS, RC_DRAGON, NA, NA, NULL);
addflag(lastrace->flags, F_EXTRACORPSE, 100, NA, NA, "unicorn horn");
addrace(R_VAMPIRE, "vampire", 75, 'V', C_BLUE, MT_FLESH, RC_UNDEAD, "Blood-drinking creatures of the night, vampires have pale white skin and prominent fangs protuding from their mouthes. They are said to be near immortal, able to survive even seemingly fatal attacks by converting themselves to a gaseous form.");
setbodytype(lastrace, BT_HUMANOID);
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);

12
defs.h
View File

@ -1027,6 +1027,7 @@ enum RACE {
R_MALIK,
R_MINOTAUR,
R_NAIAD,
R_NIXIE,
R_OGRA,
R_OGRE,
R_OGREWARHULK,
@ -1051,9 +1052,11 @@ enum RACE {
R_SATYR,
R_SINKMITE,
R_SKOOB,
R_SPRIGGAN,
R_SPRITEFIRE,
R_SPRITEGRAVE,
R_SPRITEICE,
R_SPRITEWEED,
R_TREANTYOUNG,
R_TREANT,
R_TREANTOLD,
@ -1063,6 +1066,7 @@ enum RACE {
R_TROLLKIN,
R_TROLLSNOW,
R_TROLLSWAMP,
R_UNICORN,
R_VAMPIRE,
R_WEREBEAR,
R_WERERAT,
@ -1187,6 +1191,7 @@ enum RACE {
R_SKELETON,
R_SKELETONFIRE,
R_SKELLION,
R_WRAITHBOG,
R_WRAITHICE,
R_ZOMBIE,
// special
@ -1496,6 +1501,7 @@ enum OBTYPE {
OT_S_METALHEAL,
// -- death magic / necromency
OT_S_ANIMATEDEAD,
OT_S_BLIGHT,
OT_S_COMMANDUNDEAD,
OT_S_CURSE,
OT_S_DRAINLIFE,
@ -1811,6 +1817,7 @@ enum OBTYPE {
OT_SAFEBOX,
OT_TORCH,
OT_TOWEL,
OT_UNICORNHORN,
// tech l0
OT_CREDITCARD,
OT_PAPERCLIP,
@ -2034,6 +2041,7 @@ enum OBTYPE {
OT_STING,
OT_BUTT,
OT_HOOF,
OT_HORN,
OT_TAIL,
OT_TEETH,
OT_TEETHSM,
@ -2050,6 +2058,7 @@ enum OBTYPE {
OT_TOUCHNECROTIC,
OT_TOUCHPARALYZE,
OT_TOUCHPARALYZE2,
OT_TOUCHPOISON,
// missiles / ammo
OT_ARROW,
OT_BOLT,
@ -2886,6 +2895,8 @@ enum FLAG {
F_ATTRSET, // forces attribute val0 to be val1. ie. 0=A_STR,1=18
F_SIZE, // val0 = lf size (enum LFSIZE)
F_SIZETIMER, // lf weill resize to LFSIZE val0 in val1 turns.
// v2 = B_FALSE = don't resize armour.
// B_TRUE = resize armour too
F_UNSEENATTACKER, // this lf attacked lfid v0 while lfid v0 couldn't
// see them. used to mark 'X' on the player's map
// for unseen attackers.
@ -2959,6 +2970,7 @@ enum FLAG {
// if lf is not witihn v1 dist of this object(s),
// they lose v2 hp
// (used by ghosts)
F_NOCHARM, // monster is not charmable
F_NOCORPSE, // monster's body crumbles to dust after death
F_NOCTURNAL, // monster sleeps during the day
F_DIURNAL, // monster sleeps at night

2
god.c
View File

@ -1915,7 +1915,7 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
if (!donesomething) {
f = hasflag(lf->race->flags, F_SIZE);
if (f && (getlfsize(lf) != f->val[0])) {
resizelf(lf, f->val[0]);
resizelf(lf, f->val[0], B_TRUE);
donesomething = B_TRUE;
}
}

100
lf.c
View File

@ -7944,6 +7944,31 @@ glyph_t *getlfglyph(lifeform_t *lf) {
} else if ((f = lfhasflag(lf, F_GLYPH)) != NULL) {
tempglyph.ch = f->val[1];
tempglyph.colour = f->val[0];
} else if ((f = lfhasflag(lf, F_SIZETIMER)) != NULL) {
int newchar;
newchar = lf->race->glyph.ch;
// made larger?
if (getlfsize(lf) > f->val[0]) {
switch (lf->race->glyph.ch) {
case 'n':
case 'h':
case '@':
newchar = 'H'; break;
case 'g':
newchar = 'G'; break;
case 'i':
newchar = 'I'; break;
case 'q':
newchar = 'Q'; break;
case 'w':
newchar = 'W'; break;
default:
break;
}
}
tempglyph.ch = newchar;
tempglyph.colour = lf->race->glyph.colour;
} else {
tempglyph = lf->race->glyph;
}
@ -12178,7 +12203,7 @@ int ischarmable(lifeform_t *lf) {
reason = E_ALREADYUSING;
return B_FALSE;
}
if (hasflag(lf->flags, F_UNIQUE)) {
if (hasflag(lf->flags, F_UNIQUE) || hasflag(lf->flags, F_NOCHARM)) {
reason = E_NOEFFECT; // generic error
return B_FALSE;
}
@ -12492,6 +12517,19 @@ int isimmobile(lifeform_t *lf) {
return B_FALSE;
}
int isliving(lifeform_t *lf) {
switch (getraceclass(lf)) {
case RC_UNDEAD:
case RC_OTHER:
case RC_MAGIC:
case RC_ROBOT:
case RC_SLIME:
return B_FALSE;
default: break;
}
return B_TRUE;
}
int isloreskill(enum SKILL skid) {
switch (skid) {
case SK_LORE_ARCANA:
@ -18141,6 +18179,10 @@ int getskillcheckchance(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod) {
if (hasequippedobid(lf->pack, OT_AMU_LISTEN)) {
othermod += 20;
}
// nocturnal monsters asleep at night, or diurnal during the day
if (isasleep(lf) && issleepingtimefor(lf)) {
othermod -= 10;
}
} else if (ct == SC_MORALE) {
othermod += (getstatmod(lf, A_WIS) / 30); // ie. -1 to 1
} else if (ct == SC_OPENLOCKS) {
@ -19617,7 +19659,8 @@ void startlfturn(lifeform_t *lf) {
if (f->id == F_SIZETIMER) {
f->val[1]--;
if (f->val[1] <= 0) {
resizelf(lf, f->val[0]);
resizelf(lf, f->val[0], f->val[2]);
// resizelf will have now killed 'f'.
continue;
}
}
@ -20543,12 +20586,18 @@ int touch(lifeform_t *lf, object_t *o) {
}
}
if (isplayer(lf)) {
if (godprayedto(R_GODNATURE) && godisangry(R_GODNATURE) && isedible(o)) {
if (isedible(o)) {
int willrot = B_FALSE;
if (isplayer(lf) && godprayedto(R_GODNATURE) && godisangry(R_GODNATURE) ) {
willrot = B_TRUE;
} else if (lf->race->id == R_WRAITHBOG) {
willrot = B_TRUE;
}
if (willrot) {
char obname[BUFLEN];
getobname(o, obname, o->amt);
msg("A green miasma surrounds %s as you touch %s.", obname,
msg("A green miasma surrounds %s as %s touch%s %s.", obname, lfname,
isplayer(lf) ? "" : "es",
(o->amt == 1) ? "it" : "them");
if (!hasflag(o->flags, F_TAINTED)) {
addflag(o->flags, F_TAINTED, B_TRUE, NA, NA, NULL);
@ -21425,15 +21474,29 @@ int validateraces(void) {
}
// returns TRUE on error
int resizelf(lifeform_t *lf, enum LFSIZE newsize) {
int resizelf(lifeform_t *lf, enum LFSIZE newsize, int doobs) {
flag_t *f;
enum LFSIZE origsize,racesize = SZ_ANY;
int changedir;
char lfname[BUFLEN];
flag_t *reverting = NULL;
int origstr,origmaxhp;
object_t *o,*nexto;
getlfname(lf, lfname);
killflagsofid(lf->flags, F_SIZETIMER);
// already resized?
reverting = lfhasflag(lf, F_SIZETIMER);
if (reverting) {
char buf[BUFLEN], *p;
// override size.
newsize = reverting->val[0];
doobs = reverting->val[2];
// will revert str/hp
p = readuntil(buf, reverting->text, ',');
origstr = atoi(buf);
readuntil(buf, p, ',');
origmaxhp = atoi(buf);
}
f = hasflag(lf->race->flags, F_SIZE);
if (f) {
@ -21481,6 +21544,9 @@ int resizelf(lifeform_t *lf, enum LFSIZE newsize) {
if (isequipped(o)) {
// object is now the wrong size?
if (isarmour(o) && !armourfits(lf, o, NULL)) {
if (doobs) {
resizeobject(o, newsize);
} else {
char obname[BUFLEN];
getobname(o, obname, o->amt);
if (isplayer(lf)) {
@ -21492,6 +21558,7 @@ int resizelf(lifeform_t *lf, enum LFSIZE newsize) {
unequipeffects(lf, o);
if (isplayer(lf)) statdirty = B_TRUE; // might have impacted AR
}
}
if (isweapon(o)) {
flag_t *f;
@ -21513,7 +21580,7 @@ int resizelf(lifeform_t *lf, enum LFSIZE newsize) {
} else {
// was twohanded before, but isn't now?
f = hasflag(o->flags, F_TWOHANDED);
if ((f->val[0] < 0) || (origsize <= f->val[0])) {
if (f && ((f->val[0] < 0) || (origsize <= f->val[0]))) {
flag_t *f2;
if (isplayer(lf)) {
char obname[BUFLEN];
@ -21536,6 +21603,21 @@ int resizelf(lifeform_t *lf, enum LFSIZE newsize) {
}
}
if (reverting) {
// restore str etc.
setattr(lf, A_STR, origstr);
lf->maxhp = origmaxhp;
limit(&(lf->hp), 0, lf->maxhp);
if (isplayer(lf)) statdirty = B_TRUE;
killflag(reverting);
}
// resizing an lf might change its glyph...
if (cansee(player, lf)) {
needredraw = B_TRUE;
}
return B_FALSE;
}

3
lf.h
View File

@ -329,6 +329,7 @@ int isimmobile(lifeform_t *lf);
flag_t *isimmuneto(flagpile_t *fp, enum DAMTYPE dt, int onlytemp);
int isinbattle(lifeform_t *lf, int includedistant);
int isingunrange(lifeform_t *lf, cell_t *where);
int isliving(lifeform_t *lf);
int isloreskill(enum SKILL skid);
int islowhp(lifeform_t *lf);
int isspellskill(enum SKILL skid);
@ -404,7 +405,7 @@ int readytotrain(lifeform_t *lf);
int recruit(lifeform_t *lf);
void refreshlevelabilities(lifeform_t *lf);
void relinklf(lifeform_t *src, map_t *dst);
int resizelf(lifeform_t *lf, enum LFSIZE newsize);
int resizelf(lifeform_t *lf, enum LFSIZE newsize, int doobs);
lifeform_t *ressurect(object_t *o);
int rest(lifeform_t *lf, int onpurpose);
void setskillused(lifeform_t *lf, enum SKILL skid);

121
spell.c
View File

@ -137,6 +137,9 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
if (getcelldist(user->cell, targcell) > range) {
if (isplayer(user)) msg("You can't charge that far!");
return B_TRUE;
} else if (getcelldist(user->cell, targcell) < 2) {
if (isplayer(user)) msg("You don't have enough space to charge there!");
return B_TRUE;
}
// make sure we have LOF to there
@ -2146,6 +2149,9 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
if (getcelldist(user->cell, targcell) > srange) {
if (isplayer(user)) msg("You can't swoop that far!");
return B_TRUE;
} else if (getcelldist(user->cell, targcell) < 2) {
if (isplayer(user)) msg("You don't have enough space to charge there!");
return B_TRUE;
}
// make sure we have LOF to there
@ -4061,6 +4067,76 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
}
addtempflag(wep->flags, F_ONFIRE, B_TRUE, NA, NA, NULL, 10 + power*3);
} else if (spellid == OT_S_BLIGHT) {
char obname[BUFLEN];
if (targob) {
if (isedible(targob)) {
// just affect one item
targcell = targob->pile->where;
target = targob->pile->owner;
getobname(targob, obname, targob->amt);
if (target && cansee(player, target)) {
char lfname[BUFLEN];
getlfname(target, lfname);
msg("A green miasma surrounds %s%s %s.", lfname,
getpossessive(lfname), obname);
if (seenbyplayer) *seenbyplayer = B_TRUE;
} else if (targcell && haslos(player, targcell)) {
msg("A green miasma surrounds %s.", obname);
}
if (!hasflag(targob->flags, F_TAINTED)) {
addflag(targob->flags, F_TAINTED, B_TRUE, NA, NA, NULL);
}
return B_FALSE;
} else {
fizzle(caster);
return B_TRUE;
}
} else {
obpile_t *op;
object_t *o,*nexto;
int ndone = 0;
if (targcell->lf) {
op = targcell->lf->pack;
if (cansee(player, targcell->lf)) {
char lfname[BUFLEN];
getlfname(targcell->lf, lfname);
msg("A green miasma surrounds %s.", lfname);
if (seenbyplayer) *seenbyplayer = B_TRUE;
}
if (isliving(targcell->lf)) {
int dam;
char damstr[BUFLEN];
dam = rnd(1,power);
if (caster) {
char cname[BUFLEN];
real_getlfnamea(caster, cname, B_FALSE, B_FALSE);
sprintf(damstr, "%s%s blight spell.", cname, getpossessive(cname));
} else {
strcpy(damstr, "a blight spell.");
}
losehp(targcell->lf, dam, DT_DECAY, caster, damstr);
}
} else {
op = targcell->obpile;
}
// taint all objects here
for (o = op->first ; o ; o = nexto) {
if (isedible(o)) {
if (!targcell->lf && haslos(player, targcell)) {
char obname[BUFLEN];
getobname(o, obname, o->amt);
msg("A green miasma surrounds %s.", obname);
}
if (!hasflag(o->flags, F_TAINTED)) {
addflag(o->flags, F_TAINTED, B_TRUE, NA, NA, NULL);
}
if (++ndone >= power) {
break;
}
}
}
}
} else if (spellid == OT_S_BLINDNESS) {
int failed = B_FALSE;
target = targcell->lf;
@ -9260,6 +9336,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
} else if ((spellid == OT_S_POLYMORPH) || (spellid == OT_S_SHAPESHIFT)) {
race_t *r = NULL;
flag_t *f;
if (caster && (frompot || (spellid == OT_S_SHAPESHIFT))) {
target = caster;
} else {
@ -9285,6 +9362,22 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
}
}
// if target has been resized, just revert to original size
f = lfhasflag(target, F_SIZETIMER);
if (f) {
f->val[1] = 0;
if (isplayer(target)) {
msg("Your body seems to be changing shape!");
if (seenbyplayer) *seenbyplayer = B_TRUE;
} else if (cansee(player, target)) {
char tname[BUFLEN];
getlfname(target, tname);
msg("%s seems to be changing shape!", tname);
if (seenbyplayer) *seenbyplayer = B_TRUE;
}
return B_FALSE;
}
//if ((caster == target) && getforcedspellrace(caster, spellid, buf)) {
if (getforcedspellrace(target, spellid, buf, NULL)) {
r = findracebyname(buf);
@ -10085,12 +10178,20 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
f->obfrom = spellid;
} else if ((spellid == OT_S_SIZEUP) || (spellid == OT_S_SIZEDOWN)) {
enum LFSIZE origsize,newsize;
char origstats[BUFLEN];
int reverting = B_FALSE;
int doobs = B_FALSE;
target = targcell->lf;
if (!target) {
fizzle(caster);
return B_TRUE;
}
origsize = getlfsize(target);
if ((power >= 5) && areallies(target,caster)) {
doobs = B_TRUE;
}
if (spellid == OT_S_SIZEUP) {
if (origsize >= SZ_ENORMOUS) {
fizzle(caster);
@ -10104,14 +10205,30 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
}
newsize = origsize - 1;
}
if (resizelf(target, newsize)) {
if (lfhasflag(target, F_SIZETIMER)) {
reverting = B_TRUE;
}
if (resizelf(target, newsize, doobs)) {
// failed
fizzle(caster);
return B_TRUE;
}
if (!reverting) {
int newstr;
sprintf(origstats, "%d,%d", target->att[A_STR], target->maxhp);
// affect str / hp
newstr = target->att[A_STR] + 50;
target->att[A_STR] = newstr;
target->maxhp *= 2;
if (isplayer(target)) statdirty = B_TRUE;
// revert in a little while...
addflag(target->flags, F_SIZETIMER, origsize, power*10, NA, NULL);
addflag(target->flags, F_SIZETIMER, origsize, power*10, doobs, origstats);
}
if (isplayer(target) || cansee(player, target)) {
if (seenbyplayer) *seenbyplayer = B_TRUE;