Make KOPS unconditional.

This commit is contained in:
Sean Hunt
2015-02-13 22:01:44 -05:00
parent 9e65758947
commit b066b7c170
16 changed files with 9 additions and 89 deletions

View File

@@ -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 */

View File

@@ -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!" */

View File

@@ -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 || \

View File

@@ -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

View File

@@ -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 :

View File

@@ -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);

View File

@@ -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}
};

View File

@@ -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
*/

View File

@@ -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...

View File

@@ -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 */

View File

@@ -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)

View File

@@ -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 */

View File

@@ -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);

View File

@@ -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 *

View File

@@ -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

View File

@@ -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" },