summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-11-08 14:27:41 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-11-08 14:30:55 +1000
commit5f88766c2ade9a2061cc477ef7d2cef4fb4af547 (patch)
tree31d61fc4461a696b8b9eb0b03699dc02ef78fa03 /crawl-ref/source
parent4915a3d61f5c92669121713d4744fb60036dac2f (diff)
downloadcrawl-ref-5f88766c2ade9a2061cc477ef7d2cef4fb4af547.tar.gz
crawl-ref-5f88766c2ade9a2061cc477ef7d2cef4fb4af547.zip
New unique: Pikel, the big kobold slaver.
Appears from D:4 through D:9, and comes with a band of human slaves. They will turn neutral (and be pacified, granting 1/2 EXP) if you destroy Pikel before destroying them. Pikel generates with a whip (either flaming or pain), and a black robe. The "pikel_band_neutralise()" function is quite hacky and assumes that all MONS_HUMANS with MF_BAND_MEMBER are part of Pikel's band. This should be changed as soon as there is a better way of tracking who is in what band.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/beam.cc4
-rw-r--r--crawl-ref/source/dat/database/monspeak.txt57
-rw-r--r--crawl-ref/source/dat/descript/monsters.txt4
-rw-r--r--crawl-ref/source/dungeon.cc4
-rw-r--r--crawl-ref/source/enum.h1
-rw-r--r--crawl-ref/source/makeitem.cc10
-rw-r--r--crawl-ref/source/mon-data.h11
-rw-r--r--crawl-ref/source/mon-util.cc4
-rw-r--r--crawl-ref/source/monplace.cc10
-rw-r--r--crawl-ref/source/monplace.h1
-rw-r--r--crawl-ref/source/monstuff.cc29
-rw-r--r--crawl-ref/source/monstuff.h2
12 files changed, 135 insertions, 2 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index c5c342d9ed..66827f3b6c 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -5296,6 +5296,10 @@ mon_resist_type bolt::apply_enchantment_to_monster(monsters* mon)
if (!mon->has_ench(ENCH_CHARM))
{
+ // XXX: Another hackish thing for Pikel's band neutrality.
+ if (mon->type == MONS_PIKEL)
+ pikel_band_neutralise();
+
if (simple_monster_message(mon, " is charmed."))
obvious_effect = true;
mon->add_ench(ENCH_CHARM);
diff --git a/crawl-ref/source/dat/database/monspeak.txt b/crawl-ref/source/dat/database/monspeak.txt
index 10cda3a2a2..7115e12791 100644
--- a/crawl-ref/source/dat/database/monspeak.txt
+++ b/crawl-ref/source/dat/database/monspeak.txt
@@ -2545,6 +2545,63 @@ VISUAL:@The_monster@ looks very balanced.
@The_monster@ screams @at_foe@, "Blow your mind!"
## END Norris ##
%%%%
+############ Pikel ######## A big kobold slaver!
+Pikel
+
+@_Pikel_common_@
+
+w:5
+
+@_Pikel_rare_@
+%%%%
+_Pikel_common_
+
+@The_monster@ cracks his whip.
+
+@The_monster@ says, "You'll fetch a fair price!" @player_only@
+
+@The_monster@ says, "Slavery isn't that bad."
+
+@The_monster@ says @to_foe@, "You'll feel the lick of my whip!"
+
+VISUAL:@The_monster@ waves his whip at you.
+%%%%
+_Pikel_rare_
+
+VISUAL:@The_monster@ waves a pair of manacles at you. @player_only@
+
+@The_monster@ says @to_foe@, "Why not give it a go? You'll get fed. Maybe."
+
+@The_monster@ says, "Who am I kidding? They'll work you to death!"
+
+# Creepy Pikel
+@The_monster@ says @to_foe@, "You strike me more as a bedroom slave. Hm."
+
+# Greedy Pikel
+VISUAL:@The_monster@ checks his coin pouch and frowns.
+
+# Original FR speech
+@The_monster@ says, "It's all about the gold, really."
+
+@The_monster@ says, "I just want to get paid!"
+
+@The_mosnter@ says, "I'm sure they'll be treated well, anyway."
+# End original speech
+
+@The_monster@ says, "I'm sure the Orcish Mines are around here somewhere..."
+
+@The_monster@ says, "I knew I should've brought a map."
+
+# Stalker Pikel!
+@The_monster@ shouts, "If I can't have you, no one shall!"
+
+VISUAL:@The_monster@ scowls and wipes his hands on his robe.
+
+# Kinky Pikel
+@The_monster@ says @to_foe@, "I'm sure you'll love being tied up!"
+
+@The_monster@ sighs. "I should go into elves, they're easier to handle. And prettier!"
+%%%%
############ POLYPHEMUS ### The King of the Cyclopes from Homer's Odyssey!
# (A cyclops watching over a herd of yaks.)
Polyphemus
diff --git a/crawl-ref/source/dat/descript/monsters.txt b/crawl-ref/source/dat/descript/monsters.txt
index d099061810..ac6c0ed235 100644
--- a/crawl-ref/source/dat/descript/monsters.txt
+++ b/crawl-ref/source/dat/descript/monsters.txt
@@ -272,6 +272,10 @@ pandemonium lord
Powerful demons inhabiting the endless halls of Pandemonium, each is different, with its own set of strengths and weaknesses.
%%%%
+Pikel
+
+While kobolds are normally slaves, Pikel's rough life, selfish ambition and large stature have caused him to rise up and become a slaver himself. He is on his way to the Orcish Mines to sell his wares, a selection of timid humans that cower with every crack of his whip.
+%%%%
Pit Fiend
A huge winged fiend with incredibly tough skin.
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index c5ec7542e8..e9d13706b5 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -3346,12 +3346,12 @@ static monster_type _choose_unique_by_depth(int step)
case 1: // depth <= 7
ret = random_choose(MONS_IJYB, MONS_SIGMUND, MONS_BLORK_THE_ORC,
MONS_EDMUND, MONS_PRINCE_RIBBIT, MONS_PURGY,
- MONS_MENKAURE, MONS_DUVESSA, -1);
+ MONS_MENKAURE, MONS_DUVESSA, MONS_PIKEL, -1);
break;
case 2: // depth <= 9
ret = random_choose(MONS_BLORK_THE_ORC, MONS_EDMUND, MONS_PSYCHE,
MONS_EROLCHA, MONS_PRINCE_RIBBIT, MONS_GRUM,
- MONS_GASTRONOK, MONS_MAURICE, -1);
+ MONS_GASTRONOK, MONS_MAURICE, MONS_PIKEL, -1);
break;
case 3: // depth <= 13
ret = random_choose(MONS_PSYCHE, MONS_EROLCHA, MONS_DONALD, MONS_URUG,
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 4ea0c4fce5..64fa660478 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2061,6 +2061,7 @@ enum monster_type // (int) menv[].type
// New set of monsters {november, 2009}
MONS_GOLDEN_EYE,
MONS_AIZUL,
+ MONS_PIKEL,
// Testing monsters
MONS_TEST_SPAWNER,
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 37fd3086e6..cd1a53c301 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -3518,6 +3518,15 @@ static item_make_species_type _give_weapon(monsters *mon, int level,
}
break;
+ case MONS_PIKEL:
+ force_item = true; // guaranteed flaming or pain
+ item.base_type = OBJ_WEAPONS;
+ item.sub_type = WPN_WHIP;
+ set_item_ego_type(item, OBJ_WEAPONS, coinflip() ? SPWPN_PAIN : SPWPN_FLAMING);
+ item.plus += -2 + random2(4);
+ item.plus2 += -1 + random2(2);
+ break;
+
case MONS_GRUM:
force_item = true; // guaranteed reaching
item_race = MAKE_ITEM_NO_RACE;
@@ -4652,6 +4661,7 @@ void give_armour(monsters *mon, int level)
case MONS_FRANCIS:
case MONS_NECROMANCER:
case MONS_VAMPIRE_MAGE:
+ case MONS_PIKEL:
item.base_type = OBJ_ARMOUR;
item.sub_type = ARM_ROBE;
force_colour = DARKGREY;
diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h
index eea677371c..a6e1d36870 100644
--- a/crawl-ref/source/mon-data.h
+++ b/crawl-ref/source/mon-data.h
@@ -4279,6 +4279,17 @@ static monsterentry mondata[] = {
HT_LAND, FL_NONE, 15, DEFAULT_ENERGY, MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_LARGE
},
+{
+ MONS_PIKEL, 'K', BLUE, "Pikel",
+ M_WARM_BLOOD | M_SPEAKS | M_UNIQUE | M_NO_WAND,
+ MR_NO_FLAGS,
+ 500, 10, MONS_KOBOLD, MONS_BIG_KOBOLD, MH_NATURAL, -3,
+ { {AT_HIT, AF_PLAIN, 9}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
+ { 6, 0, 0, 40 },
+ 4, 12, MST_NO_SPELLS, CE_POISONOUS, Z_NOZOMBIE, S_SHOUT, I_NORMAL,
+ HT_LAND, FL_NONE, 10, DEFAULT_ENERGY, MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM
+},
+
// human uniques ('@')
{
MONS_TERENCE, '@', LIGHTCYAN, "Terence",
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 6d70c5effb..a4b88f7d4d 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -2075,6 +2075,10 @@ void mons_pacify(monsters *mon)
// Make the monster begin leaving the level.
behaviour_event(mon, ME_EVAL);
+
+ // XXX: Needs a better way to track Pikel's turning neutral.
+ if (mon->type == MONS_PIKEL)
+ pikel_band_neutralise();
}
static bool _mons_should_fire_beneficial(bolt &beam)
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 070ec3b9e1..e354a6e869 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -1945,6 +1945,12 @@ static band_type _choose_band(int mon_type, int power, int &band_size)
band = BAND_GOLDEN_EYE;
band_size = 1 + random2(5);
break;
+
+ case MONS_PIKEL:
+ band = BAND_PIKEL;
+ band_size = 1 + random2(3);
+ break;
+
} // end switch
if (band != BAND_NO_BAND && band_size == 0)
@@ -2255,6 +2261,10 @@ static monster_type _band_member(band_type band, int power)
mon_type = MONS_GOLDEN_EYE;
break;
+ case BAND_PIKEL:
+ mon_type = MONS_HUMAN;
+ break;
+
default:
break;
}
diff --git a/crawl-ref/source/monplace.h b/crawl-ref/source/monplace.h
index 148f0e82f6..20c1e8354e 100644
--- a/crawl-ref/source/monplace.h
+++ b/crawl-ref/source/monplace.h
@@ -68,6 +68,7 @@ enum band_type
BAND_DUVESSA, // 50
BAND_KHUFU,
BAND_GOLDEN_EYE,
+ BAND_PIKEL,
NUM_BANDS // always last
};
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index a9eccfda1d..e237ec119c 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1198,6 +1198,29 @@ void _monster_die_cloud(const monsters* monster, bool corpse, bool silent,
}
}
+void pikel_band_neutralise ()
+{
+ // XXX: This is a really ugly hack. It should be replaced by something else
+ // when band tracking is available. This assumes that the only human monsters
+ // with MF_BAND_MEMBER are Pikel's band members.
+ bool message_made = false;
+
+ for (int i = 0; i < MAX_MONSTERS; ++i)
+ {
+ monsters *monster = &menv[i];
+ if (monster->alive() && monster->type == MONS_HUMAN
+ && testbits(monster->flags, MF_BAND_MEMBER))
+ {
+ if (monster->observable() && !message_made)
+ {
+ mpr("Pikel's slaves thank you for their freedom.");
+ message_made = true;
+ }
+ mons_pacify(monster);
+ }
+ }
+}
+
static void _hogs_to_humans()
{
// Simplification: if, in a rare event, another hog which was not created
@@ -1990,6 +2013,12 @@ int monster_die(monsters *monster, killer_type killer,
{
_hogs_to_humans();
}
+ else if (monster->type == MONS_PIKEL)
+ {
+ // His slaves don't care if he's dead or not, just whether or not
+ // he goes away.
+ pikel_band_neutralise();
+ }
else if (monster->type == MONS_KRAKEN)
{
if (_destroy_tentacles(monster) && !in_transit)
diff --git a/crawl-ref/source/monstuff.h b/crawl-ref/source/monstuff.h
index 2457ba9b5e..a364b93a4f 100644
--- a/crawl-ref/source/monstuff.h
+++ b/crawl-ref/source/monstuff.h
@@ -176,4 +176,6 @@ int clone_mons(const monsters* orig, bool quiet = false,
std::string summoned_poof_msg(const monsters* monster, bool plural = false);
std::string summoned_poof_msg(const int midx, const item_def &item);
std::string summoned_poof_msg(const monsters* monster, const item_def &item);
+
+void pikel_band_neutralise();
#endif