Fix: SE064 Problem: WEAPON_SKILLS configuration switch is no longer supported and should be completely removed. There are a couple of matters in this that need attention due to unresolved compatibility issues with Slash'EM 0.0.5E7 and NetHack 3.3.0. Generally I have attempted to resolve these using 3.3.0 code whereever possible (to keep the differences with Vanilla down to a minimum), but maintaining Slash'EM functionality where this appears to make sense. More specifically: kickdmg - Slash'EM 0.0.5E7 uses experience level as the basis for the martial arts bonus, NetHack 3.3.0 uses dexterity. Since dexterity favours lower level characters, I have opted for this. - Slash'EM 0.0.5E7 adds skill bonuses. I have included these. - NetHack 3.3.0 adds special handling for shades. I have included this. - Slash'EM 0.0.5E7 only exercises dex if the damage is more than zero. I have retained this. Stormbringer as secondary weapon - NetHack 3.3.0 does not allow artifacts as secondary weapons. - Slash'EM 0.0.5E7 did strange things if Stormbringer was wielded in the other hand. First the player would be asked for confirmation on attacking a peaceful monster (primary weapon check) and then this would be ignored because you were wielding Stormbringer. - I have followed the basic idea of Slash'EM 0.0.5E7: If Stormbringer is wielded as the primary weapon then no confirmation is asked; you get the standard message and attack with both weapons (the justification being that with Stormbringer leading the attack you automatically attack with the secondary weapon). If Stormbringer is wielded in the off-hand then you _are_ asked for confirmation. If you give it then Stormbringer is happy. If not then you _don't_ attack with your primary weapon but Stormbringer attacks anyway. A slightly different message is generated in this case. Compatible with: Slash'EM 0.0.6E0F3 Author: J. Ali Harlow, ali@avrc.city.ac.uk Date: 13 Apr 2000 diff -Nacrd ../slashem-0.0.6E0F3/include/config.h ./include/config.h *** ../slashem-0.0.6E0F3/include/config.h Sat Mar 4 17:47:10 2000 --- ./include/config.h Thu Apr 13 19:25:33 2000 *************** *** 306,312 **** */ /* dungeon features */ - #define WEAPON_SKILLS /* Weapon skills - Stephen White */ #define SINKS /* Kitchen sinks - Janet Walz */ #define LIGHT_SRC_SPELL /* WAC Light sourced spells (wac@intergate.bc.ca)*/ --- 306,311 ---- diff -Nacrd ../slashem-0.0.6E0F3/include/extern.h ./include/extern.h *** ../slashem-0.0.6E0F3/include/extern.h Sat Mar 4 17:47:10 2000 --- ./include/extern.h Thu Apr 13 19:25:33 2000 *************** *** 1987,1993 **** /* ### uhitm.c ### */ E void FDECL(hurtmarmor,(struct permonst *,struct monst *,int)); ! E boolean FDECL(attack_checks, (struct monst *,struct obj *)); E schar FDECL(find_roll_to_hit, (struct monst *)); E boolean FDECL(attack, (struct monst *)); E boolean FDECL(hmon, (struct monst *,struct obj *,int)); --- 1987,1993 ---- /* ### uhitm.c ### */ E void FDECL(hurtmarmor,(struct permonst *,struct monst *,int)); ! E int FDECL(attack_checks, (struct monst *,boolean)); E schar FDECL(find_roll_to_hit, (struct monst *)); E boolean FDECL(attack, (struct monst *)); E boolean FDECL(hmon, (struct monst *,struct obj *,int)); diff -Nacrd ../slashem-0.0.6E0F3/include/skills.h ./include/skills.h *** ../slashem-0.0.6E0F3/include/skills.h Mon Jan 17 13:29:46 2000 --- ./include/skills.h Thu Apr 13 19:25:33 2000 *************** *** 15,21 **** * Positive values denote a wielded weapon or launcher. * Negative values denote ammunition or missiles. * Update weapon.c if you ammend any skills. ! * Not #ifdef WEAPON_SKILLS because they are used for object subtypes. */ #define P_DAGGER 1 #define P_KNIFE 2 --- 15,21 ---- * Positive values denote a wielded weapon or launcher. * Negative values denote ammunition or missiles. * Update weapon.c if you ammend any skills. ! * Also used for oc_subtyp. */ #define P_DAGGER 1 #define P_KNIFE 2 *************** *** 87,94 **** #define P_NUM_SKILLS (P_LAST_MISC+1) - #ifdef WEAPON_SKILLS - /* * These are the standard weapon skill levels. It is important that * the lowest "valid" skill be be 1. The code calculates the --- 87,92 ---- *************** *** 137,142 **** #else # define martial_bonus() (Role_if(PM_SAMURAI) || Role_if(PM_PRIEST) || Role_if(PM_MONK)) /*# define martial_bonus() (Role_is('S') || Role_is('P') || Role_is('M'))*/ - #endif /* WEAPON_SKILLS */ #endif /* SKILLS_H */ --- 135,139 ---- diff -Nacrd ../slashem-0.0.6E0F3/src/cmd.c ./src/cmd.c *** ../slashem-0.0.6E0F3/src/cmd.c Sat Mar 4 17:47:11 2000 --- ./src/cmd.c Thu Apr 13 19:25:33 2000 *************** *** 749,763 **** You("are not wielding a weapon!"); break; } else if(uwep->known == TRUE) { - #ifndef WEAPON_SKILLS - You("already know all about your weapon!"); - break; - #else You("study and practice with your %s %s.", uarmg ? "gloved" : "bare", /* Del Lamb */ makeplural(body_part(HAND))); practice_weapon(); - #endif } else { if (not_fully_identified(uwep)) { You("examine %s.", doname(uwep)); --- 749,758 ---- *************** *** 768,777 **** } else pline("Unfortunately, you didn't learn anything new."); } - #ifdef WEAPON_SKILLS /*WAC Added practicing code - in weapon.c*/ practice_weapon(); - #endif } u.unextuse = rn1(500,500); break; --- 763,770 ---- *************** *** 1743,1751 **** {'j', FALSE, dojump}, /* if number_pad is on */ {M('j'), FALSE, dojump}, {'k', FALSE, dokick}, /* if number_pad is on */ - #ifdef WEAPON_SKILLS {M('k'), TRUE, enhance_weapon_skill}, - #endif /* WEAPON_SKILLS */ {'l', FALSE, doloot}, /* if number_pad is on */ {M('l'), FALSE, doloot}, /* 'n' prefixes a count if number_pad is on */ --- 1736,1742 ---- diff -Nacrd ../slashem-0.0.6E0F3/src/dokick.c ./src/dokick.c *** ../slashem-0.0.6E0F3/src/dokick.c Mon Jan 17 13:29:48 2000 --- ./src/dokick.c Thu Apr 13 19:25:33 2000 *************** *** 35,68 **** int kick_skill = P_NONE; int blessed_foot_damage = 0; - /*** Calculate damage ***/ - /* KMH -- Rewritten to be more like weapons, - * and to make kicking boots reasonable. - * We begin by calculating the random part of the damage. - */ - if (martial()) - dmg += u.ulevel/2; if (uarmf && uarmf->otyp == KICKING_BOOTS) ! dmg += 5; ! if (dmg <= 0) ! dmg = 0; ! else { ! dmg = rnd(dmg); ! /* Now add bonuses and penalties */ ! #ifdef WEAPON_SKILLS ! if (martial()) ! dmg += weapon_dam_bonus((struct obj *)0); ! #endif ! if (uarmf) ! dmg += uarmf->spe; ! /* excessive wt affects dex, so it affects dmg */ ! if(clumsy) dmg = dmg/2; ! /* kicking a dragon or an elephant will not harm it */ ! if(thick_skinned(mon->data)) dmg = 0; ! } ! /*** Attacking monsters may have consequences... ***/ /* attacking a shade is useless */ if (mon->data == &mons[PM_SHADE]) --- 35,48 ---- int kick_skill = P_NONE; int blessed_foot_damage = 0; if (uarmf && uarmf->otyp == KICKING_BOOTS) ! dmg += 5; ! /* excessive wt affects dex, so it affects dmg */ ! if(clumsy) dmg = dmg/2; ! /* kicking a dragon or an elephant will not harm it */ ! if(thick_skinned(mon->data)) dmg = 0; /* attacking a shade is useless */ if (mon->data == &mons[PM_SHADE]) *************** *** 75,89 **** if (mon->data == &mons[PM_SHADE] && !blessed_foot_damage) pline_The("kick passes harmlessly through."); ! /* It is unchivalrous to attack the defenseless or from behind */ if (Role_if(PM_KNIGHT) && u.ualign.type == A_LAWFUL && u.ualign.record > -10 && (!mon->mcanmove || mon->msleeping || mon->mflee)) { ! You("feel like a caitiff!"); ! adjalign(-1); } ! /* Squeeze some guilt feelings... */ if(mon->mtame) { abuse_dog(mon); mon->mflee = mon->mtame ? 1 : 0; --- 55,73 ---- if (mon->data == &mons[PM_SHADE] && !blessed_foot_damage) pline_The("kick passes harmlessly through."); + /* a good kick exercises your dex */ + if (dmg > 0) + exercise(A_DEX, TRUE); ! /* it is unchivalrous to attack the defenseless or from behind */ if (Role_if(PM_KNIGHT) && u.ualign.type == A_LAWFUL && u.ualign.record > -10 && (!mon->mcanmove || mon->msleeping || mon->mflee)) { ! You_feel("like a caitiff!"); ! adjalign(-1); } ! ! /* squeeze some guilt feelings... */ if(mon->mtame) { abuse_dog(mon); mon->mflee = mon->mtame ? 1 : 0; *************** *** 92,98 **** #else mon->mfleetim += (dmg ? rnd(dmg) : 1); #endif ! } if (dmg > 0) { /* convert potential damage to actual damage */ --- 76,82 ---- #else mon->mfleetim += (dmg ? rnd(dmg) : 1); #endif ! } if (dmg > 0) { /* convert potential damage to actual damage */ *************** *** 100,127 **** if (martial()) { if (dmg > 1) kick_skill = P_MARTIAL_ARTS; dmg += rn2(ACURR(A_DEX)/2 + 1); } } if (blessed_foot_damage) dmg += rnd(4); if (uarmf) dmg += uarmf->spe; ! dmg += u.udaminc; ! ! /*** Did we hit? ***/ ! if (dmg <= 0) { ! Your("kick does no damage."); ! dmg = 0; ! } else { ! /* a good kick exercises your dex */ ! exercise(A_DEX, TRUE); ! } ! if (dmg > 0) { mon->mhp -= dmg; #ifdef SHOW_DMG showdmg(dmg); #endif } - if(mon->mhp > 0 && martial() && !bigmonst(mon->data) && !rn2(3) && mon->mcanmove && mon != u.ustuck) { /* see if the monster has a place to move into */ --- 84,101 ---- if (martial()) { if (dmg > 1) kick_skill = P_MARTIAL_ARTS; dmg += rn2(ACURR(A_DEX)/2 + 1); + dmg += weapon_dam_bonus((struct obj *)0); } } if (blessed_foot_damage) dmg += rnd(4); if (uarmf) dmg += uarmf->spe; ! dmg += u.udaminc; /* add ring(s) of increase damage */ if (dmg > 0) { mon->mhp -= dmg; #ifdef SHOW_DMG showdmg(dmg); #endif } if(mon->mhp > 0 && martial() && !bigmonst(mon->data) && !rn2(3) && mon->mcanmove && mon != u.ustuck) { /* see if the monster has a place to move into */ *************** *** 157,163 **** bhitpos.x = x; bhitpos.y = y; ! if (attack_checks(mon, (struct obj *)0)) return; setmangry(mon); /* Kick attacks by kicking monsters are normal attacks, not special. --- 131,137 ---- bhitpos.x = x; bhitpos.y = y; ! if (!attack_checks(mon, TRUE)) return; setmangry(mon); /* Kick attacks by kicking monsters are normal attacks, not special. diff -Nacrd ../slashem-0.0.6E0F3/src/dothrow.c ./src/dothrow.c *** ../slashem-0.0.6E0F3/src/dothrow.c Fri Jan 21 12:02:05 2000 --- ./src/dothrow.c Thu Apr 13 19:25:33 2000 *************** *** 311,317 **** { int result, shotlimit; ! if(check_capacity(NULL)) return(0); if (!uquiver) { if (!flags.autoquiver) { /* Don't automatically fill the quiver */ --- 311,317 ---- { int result, shotlimit; ! if(check_capacity((char *)0)) return(0); if (!uquiver) { if (!flags.autoquiver) { /* Don't automatically fill the quiver */ *************** *** 324,330 **** return(dothrow()); } else { You("fill your quiver:"); ! prinv(NULL, uquiver, 0L); } } --- 324,330 ---- return(dothrow()); } else { You("fill your quiver:"); ! prinv((char *)0, uquiver, 0L); } } *************** *** 342,348 **** shotlimit = (multi || save_cm) ? multi + 1 : 0; multi = 0; /* reset; it's been used up */ - #ifdef WEAPON_SKILLS if (u.twoweap) { if (!can_twoweapon()) untwoweapon(); else if (ammo_and_launcher(uquiver,uwep) --- 342,347 ---- *************** *** 354,360 **** return(result); } } - #endif /* WEAPON_SKILLS */ result = (throw_obj(uquiver, shotlimit, THROW_UWEP)); return result; --- 353,358 ---- diff -Nacrd ../slashem-0.0.6E0F3/src/invent.c ./src/invent.c *** ../slashem-0.0.6E0F3/src/invent.c Mon Jan 17 13:29:51 2000 --- ./src/invent.c Thu Apr 13 19:25:33 2000 *************** *** 2631,2639 **** any.a_int = 3; Sprintf (buf, "secondary %s: %s", body_part(HAND), uarms ? doname(uarms) : (uwep && bimanual(uwep)) ? doname(uwep) : - #ifdef WEAPON_SKILLS (u.twoweap && uswapwep) ? doname(uswapwep) : - #endif "nothing"); /* [Max] */ add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED); --- 2631,2637 ---- diff -Nacrd ../slashem-0.0.6E0F3/src/read.c ./src/read.c *** ../slashem-0.0.6E0F3/src/read.c Mon Jan 17 13:29:50 2000 --- ./src/read.c Thu Apr 13 19:25:33 2000 *************** *** 244,255 **** } else if(!objects[scroll->otyp].oc_uname) docall(scroll); } - #ifdef WEAPON_SKILLS if (spell_skilltype(scroll->otyp) != P_NONE) { use_skill(spell_skilltype(scroll->otyp), (scroll->blessed ? 2 : 1)); } - #endif if(scroll->otyp != SCR_BLANK_PAPER) { if (carried(scroll)) useup(scroll); else useupf(scroll, 1L); --- 244,253 ---- diff -Nacrd ../slashem-0.0.6E0F3/src/spell.c ./src/spell.c *** ../slashem-0.0.6E0F3/src/spell.c Sat Mar 4 17:47:10 2000 --- ./src/spell.c Thu Apr 13 19:25:33 2000 *************** *** 314,326 **** incrnknow(i); book->spestudied++; if (end_delay) { ! boostknow(i, end_delay * (book->spe > 0 ? 20 : 10)); ! #ifdef WEAPON_SKILLS ! use_skill(spell_skilltype(book->otyp), end_delay / (book->spe > 0 ? 10 : 20)); ! #endif } exercise(A_WIS, TRUE); /* extra study */ ! } else { /* MAX_CAN_STUDY < spellknow(i) <= MAX_KNOW */ You("know %s quite well already.", splname); costly = FALSE; } --- 314,326 ---- incrnknow(i); book->spestudied++; if (end_delay) { ! boostknow(i, ! end_delay * (book->spe > 0 ? 20 : 10)); ! use_skill(spell_skilltype(book->otyp), ! end_delay / (book->spe > 0 ? 10 : 20)); } exercise(A_WIS, TRUE); /* extra study */ ! } else { /* MAX_CAN_STUDY < spellknow(i) <= MAX_SPELL_STUDY */ You("know %s quite well already.", splname); costly = FALSE; } diff -Nacrd ../slashem-0.0.6E0F3/src/tech.c ./src/tech.c *** ../slashem-0.0.6E0F3/src/tech.c Mon Jan 17 13:29:50 2000 --- ./src/tech.c Thu Apr 13 19:25:33 2000 *************** *** 404,423 **** techtout(tech_no) = rn1(1000,500); break; case T_PRACTICE: ! if(!uwep ! #ifdef WEAPON_SKILLS ! || (weapon_type(uwep) == P_NONE) ! #endif /* WEAPON_SKILLS */ ! ) { You("are not wielding a weapon!"); return(0); } else if(uwep->known == TRUE) { - #ifndef WEAPON_SKILLS - You("already know all about your weapon!"); - return(0); - #else practice_weapon(); - #endif } else { if (not_fully_identified(uwep)) { You("examine %s.", doname(uwep)); --- 404,414 ---- techtout(tech_no) = rn1(1000,500); break; case T_PRACTICE: ! if(!uwep || (weapon_type(uwep) == P_NONE)) { You("are not wielding a weapon!"); return(0); } else if(uwep->known == TRUE) { practice_weapon(); } else { if (not_fully_identified(uwep)) { You("examine %s.", doname(uwep)); *************** *** 428,437 **** } else pline("Unfortunately, you didn't learn anything new."); } - #ifdef WEAPON_SKILLS /*WAC Added practicing code - in weapon.c*/ practice_weapon(); - #endif } techtout(tech_no) = rn1(500,500); break; --- 419,426 ---- diff -Nacrd ../slashem-0.0.6E0F3/src/timeout.c ./src/timeout.c *** ../slashem-0.0.6E0F3/src/timeout.c Fri Jan 21 12:02:05 2000 --- ./src/timeout.c Thu Apr 13 19:25:33 2000 *************** *** 1222,1234 **** (obj->where == OBJ_FLOOR) || (obj->where == OBJ_MINVENT && (!MON_WEP(obj->ocarry) || MON_WEP(obj->ocarry) != obj)) || - #ifdef WEAPON_SKILLS (obj->where == OBJ_INVENT && ((!uwep || uwep != obj) && (!u.twoweap || !uswapwep || obj != uswapwep)))) - #else - (obj->where == OBJ_INVENT && !uwep || uwep != obj)) - #endif lightsaber_deactivate(obj, FALSE); switch (obj->age) { case 100: --- 1222,1230 ---- *************** *** 1304,1314 **** } } if (obj->otyp == RED_DOUBLE_LIGHTSABER) obj->altmode = FALSE; ! if ((obj == uwep) ! #ifdef WEAPON_SKILLS ! || (u.twoweap && obj != uswapwep) ! #endif ! ) unweapon = TRUE; end_burn(obj, timer_attached); } --- 1300,1306 ---- } } if (obj->otyp == RED_DOUBLE_LIGHTSABER) obj->altmode = FALSE; ! if ((obj == uwep) || (u.twoweap && obj != uswapwep)) unweapon = TRUE; end_burn(obj, timer_attached); } diff -Nacrd ../slashem-0.0.6E0F3/src/u_init.c ./src/u_init.c *** ../slashem-0.0.6E0F3/src/u_init.c Sat Mar 4 17:47:10 2000 --- ./src/u_init.c Thu Apr 13 19:25:33 2000 *************** *** 1205,1213 **** knows_class(WEAPON_CLASS); knows_class(ARMOR_CLASS); knows_class(GEM_CLASS); - #ifdef WEAPON_SKILLS skill_init(Skill_Dwa); - #endif /* WEAPON_SKILLS */ break; #endif case PM_ELF: --- 1205,1211 ---- *************** *** 1419,1427 **** knows_class(SPBOOK_CLASS); if(!rn2(5)) ini_inv(Magicmarker); if(!rn2(5)) ini_inv(Blindfold); - #ifdef WEAPON_SKILLS skill_init(Skill_N); - #endif /* WEAPON_SKILLS */ break; case PM_PRIEST: switch (rnd(9)) { --- 1417,1423 ---- diff -Nacrd ../slashem-0.0.6E0F3/src/uhitm.c ./src/uhitm.c *** ../slashem-0.0.6E0F3/src/uhitm.c Mon Jan 17 13:29:50 2000 --- ./src/uhitm.c Thu Apr 13 20:33:30 2000 *************** *** 6,12 **** STATIC_DCL boolean FDECL(known_hitum, (struct monst *,int *,struct attack *)); STATIC_DCL void FDECL(steal_it, (struct monst *, struct attack *)); ! STATIC_DCL boolean FDECL(hitum, (struct monst *,int,struct attack *)); STATIC_DCL boolean FDECL(hmon_hitmon, (struct monst *,struct obj *,int)); STATIC_DCL boolean FDECL(m_slips_free, (struct monst *mtmp,struct attack *mattk)); STATIC_DCL int FDECL(explum, (struct monst *,struct attack *)); --- 6,12 ---- STATIC_DCL boolean FDECL(known_hitum, (struct monst *,int *,struct attack *)); STATIC_DCL void FDECL(steal_it, (struct monst *, struct attack *)); ! STATIC_DCL boolean FDECL(hitum, (struct monst *,int,int,struct attack *)); STATIC_DCL boolean FDECL(hmon_hitmon, (struct monst *,struct obj *,int)); STATIC_DCL boolean FDECL(m_slips_free, (struct monst *mtmp,struct attack *mattk)); STATIC_DCL int FDECL(explum, (struct monst *,struct attack *)); *************** *** 28,34 **** #define USWAPWEP_ROLL 1 /* Used to flag attacks caused by Stormbringer's maliciousness. */ ! static boolean override_confirmation = FALSE; /* WAC for mhit, two weapon attacking */ #define HIT_UWEP 1 --- 28,34 ---- #define USWAPWEP_ROLL 1 /* Used to flag attacks caused by Stormbringer's maliciousness. */ ! static boolean override_confirmation = 0; /* WAC for mhit, two weapon attacking */ #define HIT_UWEP 1 *************** *** 113,129 **** } } ! boolean ! attack_checks(mtmp, wep) register struct monst *mtmp; ! struct obj *wep; /* uwep for attack(), null for kick_monster() */ { char qbuf[QBUFSZ]; /* if you're close enough to attack, alert any waiting monster */ mtmp->mstrategy &= ~STRAT_WAITMASK; ! if (u.uswallow && mtmp == u.ustuck) return FALSE; if (flags.forcefight) { /* Do this in the caller, after we checked that the monster --- 113,140 ---- } } ! /* ! * Now returns a bit mask of attacks that may proceed. Note that barehanded ! * returns HIT_UWEP. -ALI ! */ ! ! int ! attack_checks(mtmp, barehanded) register struct monst *mtmp; ! boolean barehanded; { + int retval; char qbuf[QBUFSZ]; + if (barehanded || !u.twoweap || !uswapwep) + retval = HIT_UWEP; + else + retval = HIT_UWEP | HIT_USWAPWEP; + /* if you're close enough to attack, alert any waiting monster */ mtmp->mstrategy &= ~STRAT_WAITMASK; ! if (u.uswallow && mtmp == u.ustuck) return retval; if (flags.forcefight) { /* Do this in the caller, after we checked that the monster *************** *** 137,143 **** !glyph_is_invisible(levl[u.ux+u.dx][u.uy+u.dy].glyph)) map_invisible(u.ux+u.dx, u.uy+u.dy); */ ! return FALSE; } /* Put up an invisible monster marker, but one exception is for --- 148,154 ---- !glyph_is_invisible(levl[u.ux+u.dx][u.uy+u.dy].glyph)) map_invisible(u.ux+u.dx, u.uy+u.dy); */ ! return retval; } /* Put up an invisible monster marker, but one exception is for *************** *** 160,166 **** u.ustuck = mtmp; } wakeup(mtmp); /* always necessary; also un-mimics mimics */ ! return TRUE; } if(mtmp->m_ap_type && !Protection_from_shape_changers --- 171,177 ---- u.ustuck = mtmp; } wakeup(mtmp); /* always necessary; also un-mimics mimics */ ! return 0; } if(mtmp->m_ap_type && !Protection_from_shape_changers *************** *** 171,180 **** */ if (glyph_is_invisible(levl[mtmp->mx][mtmp->my].glyph)) { seemimic(mtmp); ! return(FALSE); } stumble_onto_mimic(mtmp); ! return TRUE; } if (mtmp->mundetected && !canseemon(mtmp) && --- 182,191 ---- */ if (glyph_is_invisible(levl[mtmp->mx][mtmp->my].glyph)) { seemimic(mtmp); ! return retval; } stumble_onto_mimic(mtmp); ! return 0; } if (mtmp->mundetected && !canseemon(mtmp) && *************** *** 183,189 **** newsym(mtmp->mx, mtmp->my); if (glyph_is_invisible(levl[mtmp->mx][mtmp->my].glyph)) { seemimic(mtmp); ! return(FALSE); } if (!(Blind ? Blind_telepat : Unblind_telepat)) { struct obj *obj; --- 194,200 ---- newsym(mtmp->mx, mtmp->my); if (glyph_is_invisible(levl[mtmp->mx][mtmp->my].glyph)) { seemimic(mtmp); ! return retval; } if (!(Blind ? Blind_telepat : Unblind_telepat)) { struct obj *obj; *************** *** 193,219 **** else if ((obj = level.objects[mtmp->mx][mtmp->my]) != 0) pline("Wait! There's %s hiding under %s!", an(l_monnam(mtmp)), doname(obj)); ! return TRUE; } } if (flags.confirm && mtmp->mpeaceful && !Confusion && !Hallucination && !Stunned) { /* Intelligent chaotic weapons (Stormbringer) want blood */ ! if (wep && wep->oartifact == ART_STORMBRINGER) { ! override_confirmation = TRUE; ! return(FALSE); } if (canspotmon(mtmp)) { Sprintf(qbuf, "Really attack %s?", mon_nam(mtmp)); if (yn(qbuf) != 'y') { flags.move = 0; ! return(TRUE); } } } ! return(FALSE); } schar --- 204,238 ---- else if ((obj = level.objects[mtmp->mx][mtmp->my]) != 0) pline("Wait! There's %s hiding under %s!", an(l_monnam(mtmp)), doname(obj)); ! return 0; } } if (flags.confirm && mtmp->mpeaceful && !Confusion && !Hallucination && !Stunned) { /* Intelligent chaotic weapons (Stormbringer) want blood */ ! if (!barehanded && ! uwep && uwep->oartifact == ART_STORMBRINGER) { ! override_confirmation = HIT_UWEP; ! return retval; } if (canspotmon(mtmp)) { Sprintf(qbuf, "Really attack %s?", mon_nam(mtmp)); if (yn(qbuf) != 'y') { + /* Stormbringer is not tricked so easily */ + if (!barehanded && u.twoweap && uswapwep && + uswapwep->oartifact == ART_STORMBRINGER) { + override_confirmation = HIT_USWAPWEP; + /* Lose primary attack */ + return HIT_USWAPWEP; + } flags.move = 0; ! return 0; } } } ! return retval; } schar *************** *** 312,317 **** --- 331,337 ---- { schar tmp; register struct permonst *mdat = mtmp->data; + int mhit; /* This section of code provides protection against accidentally * hitting peaceful (like '@') and tame (like 'd') monsters. *************** *** 325,335 **** /* Intelligent chaotic weapons (Stormbringer) want blood */ if (is_safepet(mtmp)) { if ((!uwep || uwep->oartifact != ART_STORMBRINGER) - #ifdef WEAPON_SKILLS && (!u.twoweap || !uswapwep ! || uswapwep->oartifact != ART_STORMBRINGER) ! #endif ! ){ /* there are some additional considerations: this won't work * if in a shop or Punished or you miss a random roll or * if you can walk thru walls and your pet cannot (KAA) or --- 345,352 ---- /* Intelligent chaotic weapons (Stormbringer) want blood */ if (is_safepet(mtmp)) { if ((!uwep || uwep->oartifact != ART_STORMBRINGER) && (!u.twoweap || !uswapwep ! || uswapwep->oartifact != ART_STORMBRINGER)){ /* there are some additional considerations: this won't work * if in a shop or Punished or you miss a random roll or * if you can walk thru walls and your pet cannot (KAA) or *************** *** 361,372 **** /* possibly set in attack_checks; examined in known_hitum, called via hitum or hmonas below */ ! override_confirmation = FALSE; ! if (attack_checks(mtmp, uwep) ! #ifdef WEAPON_SKILLS ! && (!u.twoweap || attack_checks(mtmp, uswapwep)) ! #endif ! ) return(TRUE); if (Upolyd) { /* certain "pacifist" monsters don't attack */ --- 378,386 ---- /* possibly set in attack_checks; examined in known_hitum, called via hitum or hmonas below */ ! override_confirmation = 0; ! mhit = attack_checks(mtmp, !uwep); ! if (!mhit) return(TRUE); if (Upolyd) { /* certain "pacifist" monsters don't attack */ *************** *** 383,393 **** if (u.twoweap && !can_twoweapon()) untwoweapon(); - #ifdef WEAPON_SKILLS - if (u.twoweap && !can_twoweapon()) - untwoweapon(); - #endif - if(unweapon) { unweapon = FALSE; if(flags.verbose) { --- 397,402 ---- *************** *** 421,427 **** if (Upolyd) (void) hmonas(mtmp, tmp); else ! (void) hitum(mtmp, tmp, youmonst.data->mattk); mtmp->mstrategy &= ~STRAT_WAITMASK; atk_done: --- 430,436 ---- if (Upolyd) (void) hmonas(mtmp, tmp); else ! (void) hitum(mtmp, tmp, mhit, youmonst.data->mattk); mtmp->mstrategy &= ~STRAT_WAITMASK; atk_done: *************** *** 449,463 **** if (override_confirmation) { /* this may need to be generalized if weapons other than Stormbringer acquire similar anti-social behavior... */ ! if (flags.verbose) Your("bloodthirsty blade attacks!"); } if(!*mhit) { missum(mon, tohit(UWEP_ROLL), dice(UWEP_ROLL), uattk); - #ifdef WEAPON_SKILLS if (u.twoweap) missum(mon, tohit(USWAPWEP_ROLL), dice(USWAPWEP_ROLL), uattk); - #endif } else { int oldhp = mon->mhp; --- 458,474 ---- if (override_confirmation) { /* this may need to be generalized if weapons other than Stormbringer acquire similar anti-social behavior... */ ! if (flags.verbose) ! if (override_confirmation == HIT_UWEP) ! Your("bloodthirsty blade attacks!"); ! else ! pline("The black blade will not be thwarted!"); } if(!*mhit) { missum(mon, tohit(UWEP_ROLL), dice(UWEP_ROLL), uattk); if (u.twoweap) missum(mon, tohit(USWAPWEP_ROLL), dice(USWAPWEP_ROLL), uattk); } else { int oldhp = mon->mhp; *************** *** 471,477 **** dieroll = dice(UWEP_ROLL); malive = hmon(mon, uwep, 0); } else missum(mon, tohit(UWEP_ROLL), dice(UWEP_ROLL), uattk); - #ifdef WEAPON_SKILLS if (u.twoweap && malive) { /* KMH, ethics */ if (*mhit & HIT_USWAPWEP) { --- 482,487 ---- *************** *** 480,486 **** malive = hmon(mon, uswapwep, 0); } else missum(mon, tohit(USWAPWEP_ROLL), dice(USWAPWEP_ROLL), uattk); } - #endif if(malive) { /* monster still alive */ if(!rn2(25) && mon->mhp < mon->mhpmax/2 --- 490,495 ---- *************** *** 499,512 **** if (mon->mhp == oldhp) *mhit = 0; if (mon->wormno && *mhit) { ! #ifdef WEAPON_SKILLS ! if (!u.twoweap || (*mhit & HIT_UWEP)) ! #endif cutworm(mon, u.ux+u.dx, u.uy+u.dy, uwep); ! #ifdef WEAPON_SKILLS ! if (u.twoweap && (*mhit & HIT_USWAPWEP)) ! cutworm(mon, u.ux+u.dx, u.uy+u.dy, uswapwep); ! #endif } } --- 508,517 ---- if (mon->mhp == oldhp) *mhit = 0; if (mon->wormno && *mhit) { ! if (!u.twoweap || (*mhit & HIT_UWEP)) cutworm(mon, u.ux+u.dx, u.uy+u.dy, uwep); ! if (u.twoweap && (*mhit & HIT_USWAPWEP)) ! cutworm(mon, u.ux+u.dx, u.uy+u.dy, uswapwep); } } *************** *** 547,586 **** } STATIC_OVL boolean ! hitum(mon, tmp, uattk) /* returns TRUE if monster still lives */ struct monst *mon; int tmp; struct attack *uattk; { boolean malive; ! int tmp1 = tmp, tmp2 = tmp, mhit = 0; ! if (uwep) tmp1 += hitval(uwep, mon); ! tohit(UWEP_ROLL) = tmp1; ! if (tmp1 > (dice(UWEP_ROLL) = rnd(20)) || u.uswallow) mhit |= HIT_UWEP; ! if (tmp1 > dice(UWEP_ROLL)) exercise(A_DEX, TRUE); ! #ifdef DEBUG ! pline("(%i/20)", tmp1); #endif ! #ifdef WEAPON_SKILLS ! if (u.twoweap) { if (uswapwep) tmp2 += hitval(uswapwep, mon) - 2; tohit(USWAPWEP_ROLL) = tmp2; ! if (tmp2 > (dice(USWAPWEP_ROLL) = rnd(20)) || u.uswallow) mhit |= HIT_USWAPWEP; if (tmp2 > dice(USWAPWEP_ROLL)) exercise(A_DEX, TRUE); #ifdef DEBUG ! pline("(%i/20)", tmp2); #endif } - #endif malive = known_hitum(mon, &mhit, uattk); (void) passive(mon, mhit, malive, AT_WEAP); --- 552,594 ---- } STATIC_OVL boolean ! hitum(mon, tmp, mhit, uattk) /* returns TRUE if monster still lives */ struct monst *mon; int tmp; + int mhit; struct attack *uattk; { boolean malive; ! int tmp1 = tmp, tmp2 = tmp; ! if (mhit & HIT_UWEP) ! { ! if (uwep) tmp1 += hitval(uwep, mon); ! tohit(UWEP_ROLL) = tmp1; ! if (tmp1 <= (dice(UWEP_ROLL) = rnd(20)) && !u.uswallow) ! mhit &= ~HIT_UWEP; ! if (tmp1 > dice(UWEP_ROLL)) exercise(A_DEX, TRUE); #ifdef DEBUG ! pline("(%i/20)", tmp1); #endif + } ! if (mhit & HIT_USWAPWEP && u.twoweap) { if (uswapwep) tmp2 += hitval(uswapwep, mon) - 2; tohit(USWAPWEP_ROLL) = tmp2; ! if (tmp2 <= (dice(USWAPWEP_ROLL) = rnd(20)) && !u.uswallow) ! mhit &= ~HIT_USWAPWEP; if (tmp2 > dice(USWAPWEP_ROLL)) exercise(A_DEX, TRUE); #ifdef DEBUG ! pline("((%i/20))", tmp2); #endif } malive = known_hitum(mon, &mhit, uattk); (void) passive(mon, mhit, malive, AT_WEAP); *************** *** 603,617 **** */ if ((Role_if(PM_MONK) && !Upolyd) - #ifdef WEAPON_SKILLS && (P_SKILL(P_MARTIAL_ARTS) == P_GRAND_MASTER) && (u.ulevel > 16)) damage = d(6,2); else if (u.ulevel > (2*(P_SKILL(P_MARTIAL_ARTS) - P_BASIC) + 5)) damage = d((int) (P_SKILL(P_MARTIAL_ARTS) - P_UNSKILLED),2); else - #else - ) - #endif /* WEAPON_SKILLS */ damage = d((int) ((u.ulevel+2)/3),2); if((!uarm || (uarm && (uarm->otyp >= ROBE && --- 611,621 ---- *************** *** 917,937 **** } } } else if(obj->oclass == POTION_CLASS) { - #ifdef WEAPON_SKILLS if (!u.twoweap || obj == uwep) { - #endif if (obj->quan > 1L) setworn(splitobj(obj, 1L), W_WEP); else setuwep((struct obj *)0); - #ifdef WEAPON_SKILLS } else if (u.twoweap && obj == uswapwep) { if (obj->quan > 1L) setworn(splitobj(obj, 1L), W_SWAPWEP); else setuswapwep((struct obj *)0); } - #endif freeinv(obj); potionhit(mon, obj, TRUE); if (mon->mhp <= 0) return FALSE; /* killed */ --- 921,937 ---- *************** *** 1002,1010 **** /* egg is always either used up or transformed, so next hand-to-hand attack should yield a "bashing" mesg */ if (obj == uwep) unweapon = TRUE; - #ifdef WEAPON_SKILLS - else if (u.twoweap && obj == uswapwep) unweapon = TRUE; - #endif if (obj->spe && obj->corpsenm >= LOW_PM) { if (obj->quan < 5) change_luck((schar) -(obj->quan)); --- 1002,1007 ---- *************** *** 1278,1286 **** /* fixed stupid mistake - check that obj exists before comparing...*/ if (obj && obj->otyp == WOODEN_STAKE && mdat->mlet == S_VAMPIRE) { if (Role_if(PM_UNDEAD_SLAYER) - #ifdef WEAPON_SKILLS || (P_SKILL(weapon_type(obj)) >= P_EXPERT) - #endif /* WEAPON_SKILLS */ || obj->oartifact == ART_STAKE_OF_VAN_HELSING) { if (!rn2(10)) { You("plunge your stake into the heart of %s.", --- 1275,1281 ---- diff -Nacrd ../slashem-0.0.6E0F3/src/zap.c ./src/zap.c *** ../slashem-0.0.6E0F3/src/zap.c Sat Mar 4 17:47:08 2000 --- ./src/zap.c Thu Apr 13 19:25:33 2000 *************** *** 2496,2507 **** boolean disclose = FALSE, was_unkn = !objects[otyp].oc_name_known; int skill = 0, skilldmg = 0; /*WAC - Skills damage bonus*/ - #ifdef WEAPON_SKILLS if (otyp >= SPE_MAGIC_MISSILE && otyp <= SPE_ACID_STREAM) { skill = P_SKILL(spell_skilltype(obj->otyp)); skilldmg = spell_damage_bonus(skill); } - #endif /* WEAPON_SKILLS */ #ifdef BLACKMARKET if (Is_blackmarket(&u.uz) && --- 2496,2505 ---- diff -Nacrd ../slashem-0.0.6E0F3/sys/amiga/amimenu.c ./sys/amiga/amimenu.c *** ../slashem-0.0.6E0F3/sys/amiga/amimenu.c Mon Jan 17 13:29:52 2000 --- ./sys/amiga/amimenu.c Thu Apr 13 19:25:33 2000 *************** *** 66,74 **** TEXT(T_Ma, "M-a #adjust inventory letters"); TEXT(T_Mc, "M-c #chat with someone"); TEXT(T_Md, "M-d #dip an object into something"); - #ifdef WEAPON_SKILLS TEXT(T_Me, "M-e #enhance weapon skills"); - #endif TEXT(T_Mf, "M-f #force a lock"); TEXT(T_Mi, "M-i #invoke an object's special powers"); TEXT(T_Mj, "M-j #jump to another location"); --- 66,72 ---- *************** *** 178,198 **** #undef MOFF #define MOFF -(442+312+8+3-640) - #ifdef WEAPON_SKILLS # define WS1 1 # define WS10 10 - #else - # define WS1 0 - # define WS10 0 - #endif static struct MenuItem extsub[] = { { &extsub[ 1], IDATA(128+'a', T_Ma, 0) }, { &extsub[ 2], IDATA(128+'c', T_Mc, 10) }, { &extsub[ 3], IDATA(128+'d', T_Md, 20) }, - #ifdef WEAPON_SKILLS { &extsub[ 4], IDATA(128+'e', T_Me, 30) }, - #endif { &extsub[ 4+WS1], IDATA(128+'f', T_Mf, 30+WS10) }, { &extsub[ 5+WS1], IDATA(128+'i', T_Mi, 40+WS10) }, { &extsub[ 6+WS1], IDATA(128+'j', T_Mj, 50+WS10) }, --- 176,189 ----