From: Sean Hunt Date: Sat, 14 Feb 2015 03:01:44 +0000 (-0500) Subject: Make KOPS unconditional. X-Git-Tag: NetHack-3.6.0_RC01~670 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b066b7c170a3d71fd7fe2d292a7f3e19f2103285;p=nethack Make KOPS unconditional. --- diff --git a/include/config.h b/include/config.h index 715fc746a..3e06382b8 100644 --- a/include/config.h +++ b/include/config.h @@ -423,7 +423,6 @@ typedef unsigned char uchar; #define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */ #define REINCARNATION /* Special Rogue-like levels */ /* monsters & objects */ -#define KOPS /* Keystone Kops by Scott R. Turner */ #define SEDUCE /* Succubi/incubi seduction, by KAA, suggested by IM */ #define TOURIST /* Tourist players with cameras and Hawaiian shirts */ /* I/O */ diff --git a/include/monflag.h b/include/monflag.h index 103060a41..bf6875581 100644 --- a/include/monflag.h +++ b/include/monflag.h @@ -29,9 +29,7 @@ #define MS_IMITATE 19 /* imitates others (leocrotta) */ #define MS_ORC MS_GRUNT /* intelligent brutes */ #define MS_HUMANOID 20 /* generic traveling companion */ -#ifdef KOPS #define MS_ARREST 21 /* "Stop in the name of the law!" (Kops) */ -#endif #define MS_SOLDIER 22 /* army and watchmen expressions */ #define MS_GUARD 23 /* "Please drop that gold and follow me." */ #define MS_DJINNI 24 /* "Thank you for freeing me!" */ diff --git a/include/obj.h b/include/obj.h index 8d302c0ae..3d0e5d88d 100644 --- a/include/obj.h +++ b/include/obj.h @@ -312,12 +312,8 @@ struct obj { (obj)->otyp == TOUCHSTONE) /* misc */ -#ifdef KOPS #define is_flimsy(otmp) (objects[(otmp)->otyp].oc_material <= LEATHER || \ (otmp)->otyp == RUBBER_HOSE) -#else -#define is_flimsy(otmp) (objects[(otmp)->otyp].oc_material <= LEATHER) -#endif /* helpers, simple enough to be macros */ #define is_plural(o) ((o)->quan > 1 || \ diff --git a/src/bones.c b/src/bones.c index 1d3b54eec..e6c33a262 100644 --- a/src/bones.c +++ b/src/bones.c @@ -372,9 +372,7 @@ struct obj *corpse; (mptr == &mons[PM_ORACLE] && !fixuporacle(mtmp))) mongone(mtmp); } -#ifdef STEED if (u.usteed) dismount_steed(DISMOUNT_BONES); -#endif dmonsfree(); /* discard dead or gone monsters */ /* mark all fruits as nonexistent; when we come to them we'll mark diff --git a/src/makemon.c b/src/makemon.c index 11051eab5..72f3ae6b9 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -313,14 +313,12 @@ register struct monst *mtmp; } } break; -# ifdef KOPS case S_KOP: /* create Keystone Kops with cream pies to * throw. As suggested by KAA. [MRS] */ if (!rn2(4)) m_initthrow(mtmp, CREAM_PIE, 2); if (!rn2(3)) (void)mongets(mtmp,(rn2(2)) ? CLUB : RUBBER_HOSE); break; -# endif case S_ORC: if(rn2(2)) (void)mongets(mtmp, ORCISH_HELM); switch (mm != PM_ORC_CAPTAIN ? mm : diff --git a/src/mon.c b/src/mon.c index 917e919c9..5be8c8e8a 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1626,7 +1626,6 @@ register struct monst *mtmp; if (tmp == PM_MAIL_DAEMON) mvitals[tmp].mvflags |= G_GENOD; #endif -#ifdef KOPS if (mtmp->data->mlet == S_KOP) { /* Dead Kops may come back. */ switch(rnd(5)) { @@ -1640,7 +1639,6 @@ register struct monst *mtmp; break; } } -#endif if(mtmp->iswiz) wizdead(); if(mtmp->data->msound == MS_NEMESIS) nemdead(); if(glyph_is_invisible(levl[mtmp->mx][mtmp->my].glyph)) @@ -1992,10 +1990,8 @@ int dest; if (!rn2(6) && !(mvitals[mndx].mvflags & G_NOCORPSE) && /* no extra item from swallower or steed */ (x != u.ux || y != u.uy) && -#ifdef KOPS /* no extra item from kops--too easy to abuse */ mdat->mlet != S_KOP && -#endif /* reduced chance of item from cloned monster */ (!mtmp->mcloned || !rn2(mvitals[mndx].died / 5 + 1))) { otmp = mkobj(RANDOM_CLASS, TRUE); diff --git a/src/mondata.c b/src/mondata.c index 2cdf41cef..98c3244f5 100644 --- a/src/mondata.c +++ b/src/mondata.c @@ -858,11 +858,9 @@ static const short grownups[][2] = { {PM_ACOLYTE, PM_PRIEST}, {PM_APPRENTICE, PM_WIZARD}, {PM_MANES,PM_LEMURE}, -#ifdef KOPS {PM_KEYSTONE_KOP, PM_KOP_SERGEANT}, {PM_KOP_SERGEANT, PM_KOP_LIEUTENANT}, {PM_KOP_LIEUTENANT, PM_KOP_KAPTAIN}, -#endif {NON_PM,NON_PM} }; diff --git a/src/monst.c b/src/monst.c index d774d1f2a..b85449ca2 100644 --- a/src/monst.c +++ b/src/monst.c @@ -1595,7 +1595,6 @@ struct permonst _mons2[] = { M1_ANIMAL|M1_FLY|M1_CARNIVORE, M2_HOSTILE|M2_STRONG|M2_NASTY|M2_COLLECT, M3_INFRAVISIBLE, HI_LORD), #endif -#ifdef KOPS /* * Kops */ @@ -1627,7 +1626,6 @@ struct permonst _mons2[] = { SIZ(WT_HUMAN, 200, MS_ARREST, MZ_HUMAN), 0, 0, M1_HUMANOID, M2_HUMAN|M2_WANDER|M2_HOSTILE|M2_STRONG|M2_MALE|M2_COLLECT, M3_INFRAVISIBLE, HI_LORD), -#endif /* * Liches */ diff --git a/src/muse.c b/src/muse.c index cc540ebb0..a404071c7 100644 --- a/src/muse.c +++ b/src/muse.c @@ -920,11 +920,8 @@ struct monst *mtmp; int trycnt = 0; if(is_animal(pm) || attacktype(pm, AT_EXPL) || mindless(mtmp->data) - || pm->mlet == S_GHOST -# ifdef KOPS - || pm->mlet == S_KOP -# endif - ) return 0; + || pm->mlet == S_GHOST || pm->mlet == S_KOP) + return 0; try_again: switch (rn2(8 + (difficulty > 3) + (difficulty > 6) + (difficulty > 8))) { @@ -1535,11 +1532,8 @@ struct monst *mtmp; int difficulty = monstr[(monsndx(pm))]; if(is_animal(pm) || attacktype(pm, AT_EXPL) || mindless(mtmp->data) - || pm->mlet == S_GHOST -# ifdef KOPS - || pm->mlet == S_KOP -# endif - ) return 0; + || pm->mlet == S_GHOST || pm->mlet == S_KOP) + return 0; if (difficulty > 7 && !rn2(35)) return WAN_DEATH; switch (rn2(9 - (difficulty < 4) + 4 * (difficulty > 6))) { case 0: { @@ -1943,11 +1937,8 @@ struct monst *mtmp; int difficulty = monstr[(monsndx(pm))]; if(is_animal(pm) || attacktype(pm, AT_EXPL) || mindless(mtmp->data) - || pm->mlet == S_GHOST -# ifdef KOPS - || pm->mlet == S_KOP -# endif - ) return 0; + || pm->mlet == S_GHOST || pm->mlet == S_KOP) + return 0; /* Unlike other rnd_item functions, we only allow _weak_ monsters * to have this item; after all, the item will be used to strengthen * the monster and strong monsters won't use it at all... diff --git a/src/objects.c b/src/objects.c index 86d65a214..1de8dfffe 100644 --- a/src/objects.c +++ b/src/objects.c @@ -242,10 +242,8 @@ WEAPON("war hammer", (char *)0, /* +1 small */ WEAPON("club", (char *)0, 1, 0, 0, 12, 30, 3, 6, 3, 0, B, P_CLUB, WOOD, HI_WOOD), -#ifdef KOPS WEAPON("rubber hose", (char *)0, 1, 0, 0, 0, 20, 3, 4, 3, 0, B, P_WHIP, PLASTIC, CLR_BROWN), -#endif WEAPON("quarterstaff", "staff", 0, 0, 1, 11, 40, 5, 6, 6, 0, B, P_QUARTERSTAFF, WOOD, HI_WOOD), /* two-piece */ diff --git a/src/shk.c b/src/shk.c index 7a4edcbdc..63596950f 100644 --- a/src/shk.c +++ b/src/shk.c @@ -13,11 +13,9 @@ #define PAY_SKIP (-1) #define PAY_BROKE (-2) -#ifdef KOPS STATIC_DCL void FDECL(makekops, (coord *)); STATIC_DCL void FDECL(call_kops, (struct monst *,BOOLEAN_P)); STATIC_DCL void FDECL(kops_gone, (BOOLEAN_P)); -#endif /* KOPS */ #define NOTANGRY(mon) ((mon)->mpeaceful) #define ANGRY(mon) (!NOTANGRY(mon)) @@ -313,7 +311,6 @@ register struct monst *shkp; return(total); } -#ifdef KOPS STATIC_OVL void call_kops(shkp, nearshop) register struct monst *shkp; @@ -364,7 +361,6 @@ register boolean nearshop; makekops(&mm); } } -#endif /* KOPS */ /* x,y is strictly inside shop */ char @@ -420,11 +416,7 @@ boolean newlev; } if (rob_shop(shkp)) { -#ifdef KOPS call_kops(shkp, (!newlev && levl[u.ux0][u.uy0].edge)); -#else - (void) angry_guards(FALSE); -#endif } } @@ -445,12 +437,8 @@ xchar x, y; return; if (rob_shop(shkp)) { -#ifdef KOPS /*[might want to set 2nd arg based on distance from shop doorway]*/ call_kops(shkp, FALSE); -#else - (void) angry_guards(FALSE); -#endif } } @@ -941,11 +929,7 @@ register boolean killkops; (void) mnearto(shkp, x, y, TRUE); level.flags.has_shop = 1; if (killkops) { -#ifdef KOPS kops_gone(TRUE); -#else - You_feel("vaguely apprehensive."); -#endif pacify_guards(); } after_shk_move(shkp); @@ -1065,9 +1049,7 @@ make_happy_shoppers(silentkops) boolean silentkops; { if (!angry_shk_exists()) { -#ifdef KOPS kops_gone(silentkops); -#endif pacify_guards(); } } @@ -3655,7 +3637,6 @@ register int fall; } } -#ifdef KOPS STATIC_OVL void makekops(mm) coord *mm; @@ -3680,7 +3661,6 @@ coord *mm; (void) makemon(&mons[mndx], mm->x, mm->y, NO_MM_FLAGS); } } -#endif /* KOPS */ void pay_for_damage(dmgstr, cant_mollify) @@ -4052,7 +4032,6 @@ struct monst *shkp; pline("%s talks about the problem of shoplifters.",shkname(shkp)); } -#ifdef KOPS STATIC_OVL void kops_gone(silent) register boolean silent; @@ -4071,7 +4050,6 @@ register boolean silent; pline_The("Kop%s (disappointed) vanish%s into thin air.", plur(cnt), cnt == 1 ? "es" : ""); } -#endif /* KOPS */ STATIC_OVL long cost_per_charge(shkp, otmp, altusage) diff --git a/src/sit.c b/src/sit.c index 4b8e2e7d1..c91a96a24 100644 --- a/src/sit.c +++ b/src/sit.c @@ -43,12 +43,10 @@ dosit() register struct trap *trap = t_at(u.ux,u.uy); register int typ = levl[u.ux][u.uy].typ; -#ifdef STEED if (u.usteed) { You("are already sitting on %s.", mon_nam(u.usteed)); return (0); } -#endif if (u.uundetected && is_hider(youmonst.data) && u.umonnum != PM_TRAPPER) u.uundetected = 0; /* no longer on the ceiling */ diff --git a/src/sounds.c b/src/sounds.c index 27749d8b0..bd20178c0 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -834,7 +834,6 @@ register struct monst *mtmp; } } break; -#ifdef KOPS case MS_ARREST: if (mtmp->mpeaceful) verbalize("Just the facts, %s.", @@ -848,7 +847,6 @@ register struct monst *mtmp; verbl_msg = arrest_msg[rn2(3)]; } break; -#endif case MS_BRIBE: if (mtmp->mpeaceful && !mtmp->mtame) { (void) demon_talk(mtmp); diff --git a/src/weapon.c b/src/weapon.c index fc3258c6b..796fba66a 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -370,7 +370,6 @@ static NEARDATA const int rwep[] = ORCISH_ARROW, CROSSBOW_BOLT, SILVER_DAGGER, ELVEN_DAGGER, DAGGER, ORCISH_DAGGER, KNIFE, FLINT, ROCK, LOADSTONE, LUCKSTONE, DART, /* BOOMERANG, */ CREAM_PIE - /* note: CREAM_PIE should NOT be #ifdef KOPS */ }; static NEARDATA const int pwep[] = @@ -389,16 +388,12 @@ register struct monst *mtmp; boolean mweponly; int i; -#ifdef KOPS char mlet = mtmp->data->mlet; -#endif propellor = &zeroobj; Oselect(EGG); /* cockatrice egg */ -#ifdef KOPS if(mlet == S_KOP) /* pies are first choice for Kops */ Oselect(CREAM_PIE); -#endif if(throws_rocks(mtmp->data)) /* ...boulders for giants */ Oselect(BOULDER); @@ -508,12 +503,8 @@ static const NEARDATA short hwep[] = { MORNING_STAR, ELVEN_SHORT_SWORD, DWARVISH_SHORT_SWORD, SHORT_SWORD, ORCISH_SHORT_SWORD, MACE, AXE, DWARVISH_SPEAR, SILVER_SPEAR, ELVEN_SPEAR, SPEAR, ORCISH_SPEAR, FLAIL, BULLWHIP, QUARTERSTAFF, - JAVELIN, AKLYS, CLUB, PICK_AXE, -#ifdef KOPS - RUBBER_HOSE, -#endif /* KOPS */ - WAR_HAMMER, SILVER_DAGGER, ELVEN_DAGGER, DAGGER, ORCISH_DAGGER, - ATHAME, SCALPEL, KNIFE, WORM_TOOTH + JAVELIN, AKLYS, CLUB, PICK_AXE, RUBBER_HOSE, WAR_HAMMER, SILVER_DAGGER, + ELVEN_DAGGER, DAGGER, ORCISH_DAGGER, ATHAME, SCALPEL, KNIFE, WORM_TOOTH }; struct obj * diff --git a/util/makedefs.c b/util/makedefs.c index c4ac5f3b5..57493448b 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -995,11 +995,8 @@ make_version() | (1L << 2) #endif /* monsters (5..9) */ -#ifdef KOPS - | (1L << 6) -#endif #ifdef MAIL - | (1L << 7) + | (1L << 6) #endif /* objects (10..14) */ #ifdef TOURIST @@ -1263,9 +1260,6 @@ static const char *build_opts[] = { #ifdef INSURANCE "insurance files for recovering from crashes", #endif -#ifdef KOPS - "Keystone Kops", -#endif #ifdef HOLD_LOCKFILE_OPEN "exclusive lock on level 0 file", #endif diff --git a/win/share/tilemap.c b/win/share/tilemap.c index 9672b6568..97fc7acc4 100644 --- a/win/share/tilemap.c +++ b/win/share/tilemap.c @@ -42,12 +42,6 @@ struct conditionals { { MON_GLYPH, PM_BABY_SILVER_DRAGON, "baby shimmering dragon" }, { MON_GLYPH, PM_SILVER_DRAGON, "shimmering dragon" }, { MON_GLYPH, PM_JABBERWOCK, "vorpal jabberwock" }, -#ifndef KOPS - { MON_GLYPH, PM_JABBERWOCK, "Keystone Kop" }, - { MON_GLYPH, PM_JABBERWOCK, "Kop Sergeant" }, - { MON_GLYPH, PM_JABBERWOCK, "Kop Lieutenant" }, - { MON_GLYPH, PM_JABBERWOCK, "Kop Kaptain" }, -#endif { MON_GLYPH, PM_VAMPIRE_LORD, "vampire mage" }, #ifndef CHARON /* not supported yet */ { MON_GLYPH, PM_CROESUS, "Charon" }, @@ -69,9 +63,6 @@ struct conditionals { { MON_GLYPH, PM_NEANDERTHAL, "High-elf" }, #ifndef TOURIST { MON_GLYPH, PM_ROSHI, "guide" }, -#endif -#ifndef KOPS - { OBJ_GLYPH, CLUB, "rubber hose" }, #endif /* objects commented out in objects.c at present */ { OBJ_GLYPH, SILVER_DRAGON_SCALE_MAIL, "shimmering dragon scale mail" },