mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-08-04 03:44:04 +01:00
Merge branch 'devel-3.21.1' of https://github.com/Chris-plus-alphanumericgibberish/dNAO.git into devel-3.21.1
This commit is contained in:
commit
0941055f95
23 changed files with 148 additions and 64 deletions
|
@ -1542,8 +1542,15 @@ moveloop()
|
|||
for(obj = mtmp->minvent; obj; obj = obj->nobj)
|
||||
if (obj->owornmask & W_SWAPWEP) break;
|
||||
if (!obj || mtmp->msw != obj){
|
||||
struct obj * obj2;
|
||||
int nswapweps = 0;
|
||||
boolean msw_carried_by_mon = FALSE;
|
||||
for(obj2 = mtmp->minvent; obj2; obj2 = obj2->nobj) {
|
||||
if (mtmp->msw == obj2) msw_carried_by_mon = TRUE;
|
||||
if (obj2->owornmask & W_SWAPWEP) nswapweps++;
|
||||
}
|
||||
impossible("bad monster swap weapon detected (and fixed) (for devs: %d;%d)", msw_carried_by_mon, nswapweps);
|
||||
MON_NOSWEP(mtmp);
|
||||
impossible("bad monster swap weapon detected (and fixed)");
|
||||
}
|
||||
}
|
||||
/* Some bugs cause mtame and mpeaceful to diverge, fix w/ a warning */
|
||||
|
|
|
@ -2842,6 +2842,7 @@ struct obj *sensor;
|
|||
case WAN_PROBING:{
|
||||
struct obj *pobj;
|
||||
if (!getdir((char *)0)) return 0;
|
||||
if (!isok(u.ux+u.dx,u.uy+u.dy)) return 0;
|
||||
if (u.dz < 0) {
|
||||
You("scan the %s thoroughly. It seems it is %s.", ceiling(u.ux,u.uy), an(ceiling(u.ux,u.uy)));
|
||||
} else if(u.dz > 0) {
|
||||
|
@ -3518,7 +3519,9 @@ struct obj **optr;
|
|||
mtmp = m_at(rx, ry);
|
||||
ttmp = t_at(rx, ry);
|
||||
|
||||
if (Stunned)
|
||||
if (!isok(rx, ry))
|
||||
what = "here";
|
||||
else if (Stunned)
|
||||
what = "while stunned";
|
||||
else if (u.uswallow)
|
||||
what = is_animal(u.ustuck->data) ? "while swallowed" :
|
||||
|
@ -3635,6 +3638,10 @@ struct obj *obj;
|
|||
if (Stunned || (Confusion && !rn2(5))) confdir();
|
||||
rx = u.ux + u.dx;
|
||||
ry = u.uy + u.dy;
|
||||
if (!isok(rx,ry)) {
|
||||
pline("%s",msg_snap);
|
||||
return 1;
|
||||
}
|
||||
mtmp = m_at(rx, ry);
|
||||
|
||||
/* fake some proficiency checks */
|
||||
|
|
|
@ -4640,7 +4640,7 @@ boolean * messaged;
|
|||
if (youagr){
|
||||
if (mdef->minvent && (Role_if(PM_PIRATE) || !rn2(10))){
|
||||
struct obj *otmp2;
|
||||
long unwornmask;
|
||||
long unwornmask = 0L;
|
||||
|
||||
/* Don't steal worn items, and downweight wielded items */
|
||||
if ((otmp2 = mdef->minvent) != 0) {
|
||||
|
@ -8303,13 +8303,19 @@ arti_invoke(obj)
|
|||
if(getdir((char *)0)){
|
||||
struct obj *ocur,*onxt;
|
||||
struct monst *mtmp;
|
||||
for(ocur = level.objects[u.ux+u.dx][u.uy+u.dy]; ocur; ocur = onxt) {
|
||||
onxt = ocur->nexthere;
|
||||
if (ocur->otyp == EGG) revive_egg(ocur);
|
||||
else revive(ocur, FALSE);
|
||||
int tx = u.ux + u.dx;
|
||||
int ty = u.uy + u.dy;
|
||||
if (isok(tx, ty)) {
|
||||
for(ocur = level.objects[tx][ty]; ocur; ocur = onxt) {
|
||||
onxt = ocur->nexthere;
|
||||
if (ocur->otyp == EGG) revive_egg(ocur);
|
||||
else revive(ocur, FALSE);
|
||||
}
|
||||
}
|
||||
if(!(u.dx || u.dy)) unturn_dead(&youmonst);
|
||||
else if((mtmp = m_at(u.ux+u.dx,u.uy+u.dy)) != 0) unturn_dead(mtmp);
|
||||
if(!(u.dx || u.dy))
|
||||
unturn_dead(&youmonst);
|
||||
else if((mtmp = m_at(tx, ty)) != 0)
|
||||
unturn_dead(mtmp);
|
||||
}
|
||||
break;
|
||||
case SINGING:{
|
||||
|
@ -9865,6 +9871,10 @@ read_necro(VOID_ARGS)
|
|||
case SELECT_CANCELLATION:
|
||||
booktype = SPE_CANCELLATION;
|
||||
break;
|
||||
default:
|
||||
impossible("bad necro_effect for necronomicon %d", necro_effect);
|
||||
return(0);
|
||||
break;
|
||||
}
|
||||
Sprintf(splname, objects[booktype].oc_name_known ?
|
||||
"\"%s\"" : "the \"%s\" spell",
|
||||
|
|
|
@ -555,6 +555,8 @@ boolean you_abilities;
|
|||
case AD_DRST: mtyp = PM_GREEN_DRAGON; break;
|
||||
case AD_SLEE: mtyp = PM_ORANGE_DRAGON; break;
|
||||
case AD_ACID: mtyp = PM_YELLOW_DRAGON; break;
|
||||
case AD_MAGM: mtyp = PM_GRAY_DRAGON; break;
|
||||
default: impossible("unhandled HD type %d", flags.HDbreath); mtyp = PM_RED_DRAGON; break;
|
||||
}
|
||||
/* note: when shield and armor match despite color differences, it is the shield's color that is used */
|
||||
armormatch = Dragon_shield_to_pm(uarms) == &mons[mtyp];
|
||||
|
|
|
@ -1602,7 +1602,7 @@ int x, y;
|
|||
struct obj *otmp;
|
||||
struct monst *mon;
|
||||
register struct rm *lev;
|
||||
int mid;
|
||||
int mid = PM_LAMB;
|
||||
if(cansee(x, y)){
|
||||
pline("The hellish seal shatters and dissolves into magenta fog!");
|
||||
}
|
||||
|
|
1
src/do.c
1
src/do.c
|
@ -1209,6 +1209,7 @@ int portal;
|
|||
if (Punished) unplacebc();
|
||||
u.utrap = 0; /* needed in level_tele */
|
||||
fill_pit(u.ux, u.uy);
|
||||
u.ux = u.uy = 0; /* temporary */
|
||||
u.ustuck = 0; /* idem */
|
||||
u.uinwater = 0;
|
||||
u.usubwater = 0;
|
||||
|
|
|
@ -2609,7 +2609,7 @@ int depth;
|
|||
}
|
||||
/* Vaul is not randomized, and contributes to magical DR */
|
||||
if (u.uvaul) {
|
||||
int offset;
|
||||
int offset = 0;
|
||||
switch (slot)
|
||||
{
|
||||
case UPPER_TORSO_DR: offset = 3; break;
|
||||
|
|
|
@ -931,7 +931,7 @@ struct monst *shkp; /* shopkeepr that owns the object (may be null) */
|
|||
} else if ((mtmp = m_at(bhitpos.x, bhitpos.y)) != 0) {
|
||||
if (scflags & MAY_HITMON) {
|
||||
struct obj ** s_p = &(stmp->obj);
|
||||
int loss_cost;
|
||||
int loss_cost = 0;
|
||||
stmp->range--;
|
||||
int dieroll = rnd(20);
|
||||
if (tohitval((struct monst *)0, mtmp, (struct attack *)0, stmp->obj, (void *)0, HMON_FIRED, 0, (int *) 0) > dieroll || dieroll == 1) {
|
||||
|
@ -950,7 +950,7 @@ struct monst *shkp; /* shopkeepr that owns the object (may be null) */
|
|||
if (scflags & MAY_HITYOU) {
|
||||
if (multi) nomul(0, NULL);
|
||||
struct obj ** s_p = &(stmp->obj);
|
||||
int loss_cost;
|
||||
int loss_cost = 0;
|
||||
int hitu, hitvalu;
|
||||
int dieroll;
|
||||
hitvalu = tohitval((struct monst *)0, &youmonst, (struct attack *)0, stmp->obj, (void *)0, HMON_FIRED, 8, (int *) 0);
|
||||
|
|
|
@ -2051,7 +2051,7 @@ void
|
|||
mkHVstatue(x, y, hv_id)
|
||||
int x, y, hv_id;
|
||||
{
|
||||
int mid;
|
||||
int mid = PM_LAMB;
|
||||
struct obj* obj;
|
||||
switch(hv_id){
|
||||
case VN_AKKABISH:
|
||||
|
|
|
@ -4980,7 +4980,7 @@ long mfaction;
|
|||
int cnt = (level_difficulty() + 1)/10 + rnd(5);
|
||||
struct permonst *mdat;
|
||||
struct obj *otmp;
|
||||
struct monst *mon;
|
||||
struct monst *mon = (struct monst *)0;
|
||||
coord cc;
|
||||
|
||||
while (cnt--) {
|
||||
|
|
|
@ -2093,6 +2093,7 @@ const char *in_str;
|
|||
#endif
|
||||
{ "olog hai", PM_OLOG_HAI },
|
||||
{ "arch lich", PM_ARCH_LICH },
|
||||
{ "green steel golem", PM_GREEN_STEEL_GOLEM },
|
||||
/* spacing */
|
||||
{ "mindflayer", PM_MIND_FLAYER },
|
||||
{ "master mindflayer", PM_MASTER_MIND_FLAYER },
|
||||
|
|
|
@ -321,7 +321,7 @@ int force_linedup; /* if TRUE, we have some offensive item ready that will work
|
|||
|
||||
/* set tbx, tby */
|
||||
/* caller has to know to reject tbx==0, tby==0 if called with force_linedup */
|
||||
if (!linedup(tarx, tary, magr->mx, magr->my)) {
|
||||
if (best_target && !linedup(tarx, tary, magr->mx, magr->my)) {
|
||||
tbx = tby = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1536,7 +1536,7 @@ SPELL(("teleport away", "gold"), P_ESCAPE_SPELL, 15, 6, 1, IMMEDIATE,
|
|||
SPELL(("create familiar", "glittering"), P_CLERIC_SPELL, 10, 6, 1, NODIR, CLR_WHITE),
|
||||
SPELL(("cancellation", "shining"), P_MATTER_SPELL, 15, 6, 1, IMMEDIATE, CLR_WHITE),
|
||||
SPELL(("protection", "dull"), P_CLERIC_SPELL, 18, 1, 1, NODIR, HI_PAPER),
|
||||
SPELL(("antimagic shield","ebony"), P_CLERIC_SPELL, 10, 5, 1, IMMEDIATE, CLR_BLACK),
|
||||
SPELL(("abjuration","ebony"), P_CLERIC_SPELL, 10, 7, 1, NODIR, CLR_BLACK),
|
||||
SPELL(("jumping", "thin"), P_ESCAPE_SPELL, 20, 1, 1, IMMEDIATE, HI_PAPER),
|
||||
SPELL(("stone to flesh", "thick"), P_HEALING_SPELL, 15, 3, 1, IMMEDIATE, HI_PAPER),
|
||||
#if 0 /* DEFERRED */
|
||||
|
|
78
src/objnam.c
78
src/objnam.c
|
@ -36,6 +36,7 @@ struct Jitem {
|
|||
typ != BLACK_OPAL && \
|
||||
typ != ANTIMAGIC_RIFT && \
|
||||
typ != CATAPSI_VORTEX && \
|
||||
typ != DOLL_S_TEAR && \
|
||||
typ != EMERALD && typ != OPAL)))
|
||||
|
||||
#ifndef OVLB
|
||||
|
@ -394,9 +395,6 @@ register int otyp;
|
|||
case RING_CLASS:
|
||||
Strcpy(buf, "ring");
|
||||
break;
|
||||
case BED_CLASS:
|
||||
Strcpy(buf, "bed");
|
||||
break;
|
||||
case AMULET_CLASS:
|
||||
if(nn)
|
||||
Strcpy(buf,actualn);
|
||||
|
@ -3205,8 +3203,11 @@ const char *oldstr;
|
|||
(p = strstri(bp, " called ")) != 0) {
|
||||
/* don't singularize these: */
|
||||
if (!BSTRNCMPI(bp, p- 4, "Eyes of the Overworld", 21) ||
|
||||
!BSTRNCMPI(bp, p-11, "Great Claws of Urdlen", 21) ||
|
||||
!BSTRNCMPI(bp, p-12, "Steel Scales of Kurtulmak", 25))
|
||||
!BSTRNCMPI(bp, p-11, "Great Claws of Urdlen", 21) ||
|
||||
!BSTRNCMPI(bp, p- 5, "Claws of the Revenancer", 23) ||
|
||||
!BSTRNCMPI(bp, p-12, "Steel Scales of Kurtulmak", 25) ||
|
||||
!BSTRNCMPI(bp, p- 9, "Wrappings of the Sacred Fist", 28) ||
|
||||
!BSTRNCMPI(bp, p-22, "Spell-warded Wrappings of Nitocris", 34))
|
||||
return bp;
|
||||
else {
|
||||
/* save the string from " of " onwards */
|
||||
|
@ -3265,19 +3266,20 @@ const char *oldstr;
|
|||
if (!BSTRCMP(bp, p-6, "gloves") ||
|
||||
!BSTRCMP(bp, p-6, "lenses") ||
|
||||
!BSTRCMP(bp, p-10, "sunglasses") ||
|
||||
!BSTRCMPI(bp, p-8, "shackles") ||
|
||||
!BSTRCMP(bp, p-5, "shoes") ||
|
||||
!BSTRCMPI(bp, p-9, "vs curses") ||
|
||||
!BSTRCMPI(bp, p-13, "versus curses") ||
|
||||
!BSTRCMP(bp, p-6, "scales") ||
|
||||
!BSTRCMPI(bp, p-6, "scales") ||
|
||||
!BSTRCMP(bp, p-6, "wishes") || /* ring */
|
||||
!BSTRCMPI(bp, p-10, "Lost Names")) /* book */
|
||||
return bp;
|
||||
|
||||
} else if (!BSTRCMPI(bp, p-5, "boots") ||
|
||||
!BSTRCMPI(bp, p-4, "mass") ||
|
||||
!BSTRCMPI(bp, p-7, "sandals") ||
|
||||
!BSTRCMPI(bp, p-9, "gauntlets") ||
|
||||
!BSTRCMPI(bp, p-5, "bands") ||
|
||||
!BSTRCMPI(bp, p-8, "shackles") ||
|
||||
!BSTRCMPI(bp, p-6, "tricks") ||
|
||||
!BSTRCMPI(bp, p-9, "paralysis") ||
|
||||
!BSTRCMPI(bp, p-5, "glass") ||
|
||||
|
@ -3287,7 +3289,9 @@ const char *oldstr;
|
|||
!BSTRCMP(bp, p-4, "ness") ||
|
||||
!BSTRCMPI(bp, p-14, "shape changers") ||
|
||||
!BSTRCMPI(bp, p-15, "detect monsters") ||
|
||||
!BSTRCMPI(bp, p-15, "Hawaiian shorts") ||
|
||||
!BSTRCMPI(bp, p-5, "Chaos") ||
|
||||
!BSTRCMPI(bp, p-8, "Nitocris") ||
|
||||
!BSTRCMPI(bp, p-13, "Wand of Orcus") || /* wand */
|
||||
!BSTRCMPI(bp, p-12, "Gear-spirits") || /* crossbow*/
|
||||
!BSTRCMPI(bp, p-10, "Rod of Dis") || /* mace */
|
||||
|
@ -3672,7 +3676,7 @@ int wishflags;
|
|||
while(digit(*bp)) bp++;
|
||||
while(*bp == ' ') bp++;
|
||||
l = 0;
|
||||
} else if (*bp == '+' || *bp == '-') {
|
||||
} else if ((*bp == '+' || *bp == '-') && digit(bp[1])) {
|
||||
spesgn = (*bp++ == '+') ? 1 : -1;
|
||||
spe = atoi(bp);
|
||||
while(digit(*bp)) bp++;
|
||||
|
@ -3856,7 +3860,7 @@ int wishflags;
|
|||
viperheads = 1;
|
||||
} else if (!strncmpi(bp, "2-headed ", l=9) || !strncmpi(bp, "two-headed ", l=11)) {
|
||||
viperheads = 2;
|
||||
} else if (!strncmpi(bp, "3-headed ", l=9) || !strncmpi(bp, "three-headed ", l=13)) {
|
||||
} else if (!strncmpi(bp, "3-headed ", l=9) || (!strncmpi(bp, "three-headed ", l=13) && strncmpi(bp, "Three-Headed Flail", 18))) {
|
||||
viperheads = 3;
|
||||
} else if (!strncmpi(bp, "4-headed ", l=9) || !strncmpi(bp, "four-headed ", l=12)) {
|
||||
viperheads = 4;
|
||||
|
@ -3870,7 +3874,7 @@ int wishflags;
|
|||
viperheads = 8;
|
||||
} else if (!strncmpi(bp, "eclipse ", l=8)) {
|
||||
moonphase = ECLIPSE_MOON;
|
||||
} else if (!strncmpi(bp, "crescent ", l=9)) {
|
||||
} else if (!strncmpi(bp, "crescent ", l=9) && strncmpi(bp, "Crescent Blade", 14)) {
|
||||
moonphase = CRESCENT_MOON;
|
||||
} else if (!strncmpi(bp, "half ", l=5)) {
|
||||
moonphase = HALF_MOON;
|
||||
|
@ -3924,10 +3928,11 @@ int wishflags;
|
|||
} else if (!strncmpi(bp, "leather ", l=8) && strncmpi(bp, "leather spellbook", 17)
|
||||
&& strncmpi(bp, "leather armor", 13) && strncmpi(bp, "leather armour", 14)
|
||||
&& strncmpi(bp, "leather helm", 12) && strncmpi(bp, "leather hat", 11)
|
||||
&& strncmpi(bp, "leather golem", 13)
|
||||
) {
|
||||
mat = LEATHER;
|
||||
} else if ((!strncmpi(bp, "wood ", l=5) || !strncmpi(bp, "wooden ", l=7))
|
||||
&& strncmpi(bp, "wooden ring", 12) && strncmpi(bp, "wood golem", 11)
|
||||
&& strncmpi(bp, "wooden ring", 12) && strncmpi(bp, "wood golem", 10)
|
||||
) {
|
||||
mat = WOOD;
|
||||
} else if ((!strncmpi(bp, "bone ", l=5))
|
||||
|
@ -3947,8 +3952,8 @@ int wishflags;
|
|||
&& strncmpi(bp, "Iron Ball of Levitation", 23) && strncmpi(bp, "Iron Spoon of Liberation", 24)
|
||||
) {
|
||||
mat = IRON;
|
||||
} else if (!strncmpi(bp, "green-steel ", l=12)
|
||||
|| !strncmpi(bp, "green steel ", l=12)
|
||||
} else if ((!strncmpi(bp, "green-steel ", l=12) || !strncmpi(bp, "green steel ", l=12))
|
||||
&& strncmpi(bp, "green-steel golem", l=17) && strncmpi(bp, "green steel golem", l=17)
|
||||
) {
|
||||
mat = GREEN_STEEL;
|
||||
} else if ((!strncmpi(bp, "metal ", l=6) || !strncmpi(bp, "metallic ", l=9) || !strncmpi(bp, "tin whistle", (l=4)?11:0))
|
||||
|
@ -4006,6 +4011,7 @@ int wishflags;
|
|||
mat = GEMSTONE;
|
||||
} else if ((!strncmpi(bp, "stone ", l=6) || !strncmpi(bp, "ceramic ", l=8))
|
||||
&& strncmpi(bp, "stone to flesh", 14) && strncmpi(bp, "stone dragon shield", 19)
|
||||
&& strncmpi(bp, "stone golem", 11)
|
||||
) {
|
||||
mat = MINERAL;
|
||||
} else if (!strncmpi(bp, "salt ", l=5)) {
|
||||
|
@ -4037,10 +4043,11 @@ int wishflags;
|
|||
} else if (!strncmpi(bp, "disintegration-proof ", l=21)) {
|
||||
add_oprop_list(oprop_list, OPROP_DISN);
|
||||
|
||||
} else if (!strncmpi(bp, "prayer-warded ", l=14) && strncmpi(bp, "prayer-warded wrapping ", 23)) {
|
||||
} else if (!strncmpi(bp, "prayer-warded ", l=14) && strncmpi(bp, "prayer-warded wrapping", 22)) {
|
||||
add_oprop_list(oprop_list, OPROP_BCRS);
|
||||
|
||||
} else if (!strncmpi(bp, "healing ", l=8)) {
|
||||
} else if (!strncmpi(bp, "healing ", l=8)
|
||||
&& strncmpi(bp, "healing potion", 14) && strncmpi(bp, "healing spellbook", 17)) {
|
||||
add_oprop_list(oprop_list, OPROP_HEAL);
|
||||
|
||||
} else if (!strncmpi(bp, "anarchic-armor ", l=15)) {
|
||||
|
@ -4172,7 +4179,7 @@ int wishflags;
|
|||
iscursed = !(uncursed + blessed);
|
||||
add_oprop_list(oprop_list, OPROP_LESSER_UNHYW);
|
||||
|
||||
} else if (!strncmpi(bp, "life-drinking ", l=14) && strncmpi(bp, "Vorpal Blade", 12)) {
|
||||
} else if (!strncmpi(bp, "life-drinking ", l=14)) {
|
||||
add_oprop_list(oprop_list, OPROP_DRANW);
|
||||
|
||||
} else if (!strncmpi(bp, "vorpal ", l=7) && strncmpi(bp, "Vorpal Blade", 12)) {
|
||||
|
@ -4185,7 +4192,7 @@ int wishflags;
|
|||
iscursed = !(uncursed + blessed);
|
||||
add_oprop_list(oprop_list, OPROP_LESSER_MORGW);
|
||||
|
||||
} else if (!strncmpi(bp, "wrathful ", l=9)) {
|
||||
} else if (!strncmpi(bp, "wrathful ", l=9) && strncmpi(bp, "Wrathful Wind", 13) && strncmpi(bp, "Wrathful Spider", 15)) {
|
||||
add_oprop_list(oprop_list, OPROP_WRTHW);
|
||||
|
||||
} else if (!strncmpi(bp, "flaying ", l=8)) {
|
||||
|
@ -4366,20 +4373,37 @@ int wishflags;
|
|||
|
||||
/*
|
||||
* Find corpse type using "of" (figurine of an orc, tin of orc meat)
|
||||
* Don't check if it's a wand or spellbook.
|
||||
* (avoid "wand/finger of death" confusion).
|
||||
* (avoid "wand/finger of death" confusion, "scroll of ward").
|
||||
*/
|
||||
if (!strstri(bp, "wand ")
|
||||
&& !strstri(bp, "spellbook ")
|
||||
&& !strstri(bp, "book ")
|
||||
&& !strstri(bp, "lump ")
|
||||
&& !strstri(bp, "rod ")
|
||||
&& !strstri(bp, "finger ")
|
||||
&& !strstri(bp, "set of ")) {
|
||||
if (strncmpi(bp, "finger of death", 15))
|
||||
if (strncmpi(bp, "wand of death", 13))
|
||||
if (strncmpi(bp, "spellbook of wizard lock", 24))
|
||||
if (strncmpi(bp, "spellbook of fire storm", 23))
|
||||
if (strncmpi(bp, "scroll of ward", 14)) /* also gets "scroll of warding" */
|
||||
if (strncmpi(bp, "scroll of stinking cloud", 24))
|
||||
if (strncmpi(bp, "set of crow talons", 18))
|
||||
if (strncmpi(bp, "Eye of Vecna", 12))
|
||||
if (strncmpi(bp, "Hand of Vecna", 13))
|
||||
if (strncmpi(bp, "Sword of Erathaol", 17))
|
||||
if (strncmpi(bp, "Wand of Orcus", 13))
|
||||
if (strncmpi(bp, "Rod of Lordly Might", 19))
|
||||
if (strncmpi(bp, "Spell-warded Wrappings of Nitocris", 34))
|
||||
if (!strstri(bp, "Key of Chaos")) /* prefixed by First, Second, or Third */
|
||||
if (strncmpi(bp, "lump of ", 8) || !strstri(bp, " jelly"))
|
||||
if (strncmpi(bp, "shard of ", 9) || !strstri(bp, " glyph"))
|
||||
if (strncmpi(bp, "potion of ", 10) || !strstri(bp, " blood"))
|
||||
{
|
||||
if ((p = strstri(bp, " of ")) != 0
|
||||
&& (mntmp = name_to_mon(p+4)) >= LOW_PM)
|
||||
*p = 0;
|
||||
}
|
||||
|
||||
/* we actually do need corpsenm for potions of blood */
|
||||
/* strip off "potion of ", so the corpse type code can then handle "foo blood" */
|
||||
if (!(strncmpi(bp, "potion of ", 10) || !strstri(bp, " blood"))) {
|
||||
bp += 10;
|
||||
}
|
||||
|
||||
/* Find corpse type w/o "of" (red dragon scale mail, yeti corpse) */
|
||||
if (strncmpi(bp, "samurai sword", 13)) /* not the "samurai" monster! */
|
||||
if (strncmpi(bp, "wizard lock", 11)) /* not the "wizard" monster! */
|
||||
|
@ -4406,6 +4430,7 @@ int wishflags;
|
|||
if (strncmpi(bp, "frosted lake", 12)) /* not a "frosted lake" */
|
||||
if (strncmpi(bp, "chromatic dragon scales", 23)) /* not a "dragon" */
|
||||
if (strncmpi(bp, "platinum dragon plate", 21)) /* not a "dragon" */
|
||||
if (strncmpi(bp, "Peace Keeper", 12)) /* not "Peace" */
|
||||
if (strncmpi(bp, "thief doll", 10)) /* not the "thief" player monster */
|
||||
if (strncmpi(bp, "bard doll", 9)) /* not the "bard" player monster */
|
||||
if (strncmpi(bp, "priest doll", 11)) /* not the "priest" monster */
|
||||
|
@ -4516,7 +4541,6 @@ int wishflags;
|
|||
if (strlen(bp) == 1 &&
|
||||
(i = def_char_to_objclass(*bp)) < MAXOCLASSES && i > ILLOBJ_CLASS
|
||||
&& (wizwish || i != VENOM_CLASS)
|
||||
&& i != VENOM_CLASS
|
||||
) {
|
||||
oclass = i;
|
||||
goto any;
|
||||
|
|
|
@ -2531,9 +2531,8 @@ struct obj *sobj;
|
|||
(void) create_gas_cloud(cc.x, cc.y, 3+bcsign(sobj), 8+4*bcsign(sobj), TRUE);
|
||||
break;
|
||||
}
|
||||
case SPE_ANTIMAGIC_SHIELD:
|
||||
case SCR_ANTIMAGIC:{
|
||||
int amt = (sobj->otyp == SPE_ANTIMAGIC_SHIELD) ? 50 : 400;
|
||||
int amt = 400;
|
||||
if(confused && sobj->cursed){
|
||||
//Confused
|
||||
pline("Shimmering sparks shoot into your body!");
|
||||
|
@ -3366,7 +3365,7 @@ int gen_restrict;
|
|||
tries = 0;
|
||||
do {
|
||||
which = urole.malenum; /* an arbitrary index into mons[] */
|
||||
maketame = makeloyal = makepeaceful = makehostile = FALSE;
|
||||
maketame = makeloyal = makepeaceful = makehostile = makesummoned = FALSE;
|
||||
getlin("Create what kind of monster? [type the name or symbol]",
|
||||
buf);
|
||||
bufp = mungspaces(buf);
|
||||
|
|
|
@ -2613,6 +2613,7 @@ int dz;
|
|||
}
|
||||
|
||||
tx = u.ux+u.dx; ty = u.uy+u.dy;
|
||||
if (!isok(tx, ty)) return 0;
|
||||
mtmp = m_at(tx, ty);
|
||||
|
||||
if(In_quest(&u.uz) && urole.neminum == PM_DURIN_S_BANE && artifact_door(tx, ty)){
|
||||
|
|
54
src/spell.c
54
src/spell.c
|
@ -43,6 +43,7 @@ STATIC_DCL void FDECL(describe_spell, (int));
|
|||
STATIC_DCL int FDECL(percent_success, (int));
|
||||
STATIC_DCL int NDECL(throwspell);
|
||||
STATIC_DCL void NDECL(cast_protection);
|
||||
STATIC_DCL void NDECL(cast_abjuration);
|
||||
STATIC_DCL boolean FDECL(sightwedge, (int,int, int,int, int,int));
|
||||
STATIC_DCL void FDECL(spell_backfire, (int));
|
||||
STATIC_DCL int FDECL(spellhunger, (int));
|
||||
|
@ -957,7 +958,6 @@ int spell;
|
|||
case SPE_INVISIBILITY:
|
||||
case SPE_DETECT_UNSEEN:
|
||||
case SPE_PROTECTION:
|
||||
case SPE_ANTIMAGIC_SHIELD:
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
@ -1017,12 +1017,6 @@ int spell;
|
|||
cast = TRUE;
|
||||
}
|
||||
break;
|
||||
case SPE_ANTIMAGIC_SHIELD:
|
||||
if ((HNullmagic&TIMEOUT) < 10) {
|
||||
incr_itimeout(&HNullmagic, 100);
|
||||
cast = TRUE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
impossible("player maintaining an unmaintainable spell? (%d)", spell);
|
||||
spell_unmaintain(spell);
|
||||
|
@ -1725,6 +1719,34 @@ cast_protection()
|
|||
}
|
||||
}
|
||||
|
||||
/* Attempts to abjure all adjacent summoned creatures
|
||||
* Monsters may roll to resist.
|
||||
* If they fail, they are immediately dispelled.
|
||||
* If they suceeed, non-permanent summons' durations are halved.
|
||||
*/
|
||||
STATIC_OVL void
|
||||
cast_abjuration()
|
||||
{
|
||||
struct monst * mtmp;
|
||||
int i, x, y;
|
||||
boolean resisted;
|
||||
int dur;
|
||||
|
||||
for (i=0; i<8; i++) {
|
||||
x = u.ux + xdir[i];
|
||||
y = u.uy + ydir[i];
|
||||
if ((mtmp = m_at(x, y)) && get_mx(mtmp, MX_ESUM)) {
|
||||
resisted = resist(mtmp, SPBOOK_CLASS, 0, TRUE);
|
||||
dur = timer_duration_remaining(get_timer(mtmp->timed, DESUMMON_MON));
|
||||
if (!resisted)
|
||||
mtmp->mextra_p->esum_p->permanent = 0;
|
||||
else
|
||||
dur /= 2;
|
||||
abjure_summon(mtmp, dur);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* attempting to cast a forgotten spell will cause disorientation */
|
||||
STATIC_OVL void
|
||||
spell_backfire(spell)
|
||||
|
@ -2246,7 +2268,7 @@ spiriteffects(power, atme)
|
|||
break;
|
||||
case PWR_ICY_GLARE:{
|
||||
int range = (u.ulevel/2+1),dmg;
|
||||
struct monst *mprime, *mon, *nxtmon;
|
||||
struct monst *mprime = (struct monst *)0, *mon, *nxtmon;
|
||||
xchar sx, sy;
|
||||
boolean gx=FALSE, gy=FALSE;
|
||||
sx = u.ux;
|
||||
|
@ -4650,7 +4672,6 @@ dothrowspell:
|
|||
case SPE_MAGIC_MAPPING:
|
||||
case SPE_CREATE_MONSTER:
|
||||
case SPE_IDENTIFY:
|
||||
case SPE_ANTIMAGIC_SHIELD:
|
||||
(void) seffects(pseudo);
|
||||
break;
|
||||
|
||||
|
@ -4706,6 +4727,9 @@ dothrowspell:
|
|||
if (!jump(max(role_skill,1)))
|
||||
pline1(nothing_happens);
|
||||
break;
|
||||
case SPE_ABJURATION:
|
||||
cast_abjuration();
|
||||
break;
|
||||
default:
|
||||
impossible("Unknown spell %d attempted.", spell);
|
||||
obfree(pseudo, (struct obj *)0);
|
||||
|
@ -5518,11 +5542,11 @@ int spellID;
|
|||
strcat(desc3, "");
|
||||
strcat(desc4, "");
|
||||
break;
|
||||
case SPE_ANTIMAGIC_SHIELD:
|
||||
strcat(desc1, "Temporarily protects you from magic.");
|
||||
strcat(desc2, "While active, you cannot cast any spell but this.");
|
||||
strcat(desc3, "Recasting increases the duration of the effect.");
|
||||
strcat(desc4, "Can be maintained.");
|
||||
case SPE_ABJURATION:
|
||||
strcat(desc1, "Attempts to dispel adjacent summoned creatures.");
|
||||
strcat(desc2, "Monsters may resist.");
|
||||
strcat(desc3, "");
|
||||
strcat(desc4, "");
|
||||
break;
|
||||
case SPE_PROTECTION:
|
||||
strcat(desc1, "Temporarily improves your AC. AC from this spell is better than normal.");
|
||||
|
@ -5649,7 +5673,7 @@ int spell;
|
|||
if(Deadmagic && base_casting_stat() == A_INT) return 0;
|
||||
if(Catapsi && base_casting_stat() == A_CHA) return 0;
|
||||
if(Misotheism && base_casting_stat() == A_WIS) return 0;
|
||||
if(Nullmagic && spellid(spell)!=SPE_ANTIMAGIC_SHIELD) return 0;
|
||||
if(Nullmagic) return 0;
|
||||
|
||||
/* Calculate intrinsic ability (splcaster) */
|
||||
|
||||
|
|
|
@ -3089,7 +3089,8 @@ int amt;
|
|||
if (!esum) return;
|
||||
if (esum->permanent) return;
|
||||
if (!(tm = get_timer(mon->timed, DESUMMON_MON))) return;
|
||||
adjust_timer_duration(tm, -min(amt, monstermoves - tm->timeout - 1));
|
||||
adjust_timer_duration(tm, -min(amt, tm->timeout - monstermoves));
|
||||
run_timers();
|
||||
}
|
||||
/* when a summoner dies or changes levels, all of its summons disappear */
|
||||
void
|
||||
|
|
|
@ -4463,6 +4463,7 @@ struct obj * tool;
|
|||
if(!getdir((char *)0)) return(0);
|
||||
x = u.ux + u.dx;
|
||||
y = u.uy + u.dy;
|
||||
if(!isok(x,y)) return(0);
|
||||
|
||||
for(otmp = level.objects[x][y]; otmp; otmp = otmp->nexthere) {
|
||||
if(Is_box(otmp) && !u.dx && !u.dy) {
|
||||
|
|
|
@ -2746,7 +2746,7 @@ int enhance_skill(boolean want_dump)
|
|||
boolean speedy = FALSE;
|
||||
#ifdef DUMP_LOG
|
||||
char buf2[BUFSZ];
|
||||
boolean logged;
|
||||
boolean logged = FALSE;
|
||||
#endif
|
||||
|
||||
#ifdef WIZARD
|
||||
|
|
|
@ -2201,6 +2201,7 @@ def_beastmastery()
|
|||
case P_BASIC: bm = 2; break;
|
||||
case P_SKILLED: bm = 5; break;
|
||||
case P_EXPERT: bm = 10; break;
|
||||
default: impossible(">Expert beast mastery unhandled"); bm = 10; break;
|
||||
}
|
||||
if((uwep && uwep->oartifact == ART_CLARENT) || (uswapwep && uswapwep->oartifact == ART_CLARENT))
|
||||
bm *= 2;
|
||||
|
@ -2217,6 +2218,7 @@ def_mountedCombat()
|
|||
case P_BASIC: bm = 2; break;
|
||||
case P_SKILLED: bm = 5; break;
|
||||
case P_EXPERT: bm = 10; break;
|
||||
default: impossible(">Expert riding unhandled"); bm = 10; break;
|
||||
}
|
||||
return bm;
|
||||
}
|
||||
|
|
|
@ -15177,6 +15177,7 @@ int vis; /* True if action is at all visible to the player */
|
|||
}
|
||||
else {
|
||||
impossible("hurtle with no direction");
|
||||
dx = dy = 0;
|
||||
}
|
||||
|
||||
/* boulders can knock to the side as well -- 2/3 chance to move out of the way, 1/3 to go straight back and be struck again*/
|
||||
|
@ -16608,6 +16609,7 @@ android_combo()
|
|||
if (!mdef || DEADMONSTER(mdef))
|
||||
You("swing wildly!");
|
||||
else {
|
||||
vis = (VIS_MAGR | VIS_NONE) | (canseemon(mdef) ? VIS_MDEF : 0);
|
||||
xmeleehity(&youmonst, mdef, &finisher, (struct obj **)0, vis, 0, FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1274,6 +1274,7 @@ beastmastery()
|
|||
case P_BASIC: bm = 2; break;
|
||||
case P_SKILLED: bm = 5; break;
|
||||
case P_EXPERT: bm = 10; break;
|
||||
default: impossible(">Expert beast mastery unhandled"); bm = 10; break;
|
||||
}
|
||||
if ((uwep && uwep->oartifact == ART_CLARENT) || (uswapwep && uswapwep->oartifact == ART_CLARENT))
|
||||
bm *= 2;
|
||||
|
@ -1289,6 +1290,7 @@ mountedCombat()
|
|||
case P_BASIC: bm = 2; break;
|
||||
case P_SKILLED: bm = 5; break;
|
||||
case P_EXPERT: bm = 10; break;
|
||||
default: impossible(">Expert riding unhandled"); bm = 10; break;
|
||||
}
|
||||
return bm;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue