summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-11-05 19:07:51 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-11-05 19:09:22 +1000
commit1c37881948d0880f83edeb7429819483766a0a81 (patch)
tree46e0637c33840d49c6883c02a080a191371d996d /crawl-ref/source
parentd6b92b199da74a1cb8cfc30322befbfae01f5621 (diff)
downloadcrawl-ref-1c37881948d0880f83edeb7429819483766a0a81.tar.gz
crawl-ref-1c37881948d0880f83edeb7429819483766a0a81.zip
New monsters: golden eyes.
Small, blinking, and fast, these eyes come in packs and are found natively in Slime (though somewhat rarely). Their confusion ability does check MR before passing, however, and can be completely avoided by having Clarity.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/dat/database/quotes.txt8
-rw-r--r--crawl-ref/source/dat/descript/monsters.txt4
-rw-r--r--crawl-ref/source/enum.h5
-rw-r--r--crawl-ref/source/mon-abil.cc56
-rw-r--r--crawl-ref/source/mon-data.h11
-rw-r--r--crawl-ref/source/mon-pick.cc5
-rw-r--r--crawl-ref/source/mon-util.cc3
-rw-r--r--crawl-ref/source/monplace.cc9
-rw-r--r--crawl-ref/source/monplace.h1
-rw-r--r--crawl-ref/source/monster.cc1
10 files changed, 90 insertions, 13 deletions
diff --git a/crawl-ref/source/dat/database/quotes.txt b/crawl-ref/source/dat/database/quotes.txt
index 1de77e5784..0e700f14ea 100644
--- a/crawl-ref/source/dat/database/quotes.txt
+++ b/crawl-ref/source/dat/database/quotes.txt
@@ -666,6 +666,14 @@ goblin
Below, my lad!"
-J.R.R. Tolkien, _The Hobbit_
%%%%
+golden eye
+
+"No coveting nor envy burns
+ In thy bright golden eye,
+ That calm and innocently turns
+ On all below the sky."
+ -Hannah Flagg Gould, _The Youth's Coronal_
+%%%%
griffon
"As when a Gryphon through the wilderness,
diff --git a/crawl-ref/source/dat/descript/monsters.txt b/crawl-ref/source/dat/descript/monsters.txt
index fb8a0f237a..bd73bbefba 100644
--- a/crawl-ref/source/dat/descript/monsters.txt
+++ b/crawl-ref/source/dat/descript/monsters.txt
@@ -132,6 +132,10 @@ Gloorx Vloq
A shadowy figure clothed in profound darkness.
%%%%
+golden eye
+
+Tiny and shimmering, glistening like gold. It is eager to get inside your head.
+%%%%
greater naga
A hybrid; human from the chest up, with a scaly, muscular torso trailing off like that of a snake.
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 8a269abacd..b4ddaa5a94 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2058,7 +2058,10 @@ enum monster_type // (int) menv[].type
MONS_GASTRONOK,
MONS_MAURICE,
MONS_KHUFU,
- MONS_NIKOLA,
+ MONS_NIKOLA, // 470
+
+ // New set of monsters {november, 2009}
+ MONS_GOLDEN_EYE,
// Testing monsters
MONS_TEST_SPAWNER,
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc
index 69fbcf3a03..93a79b534b 100644
--- a/crawl-ref/source/mon-abil.cc
+++ b/crawl-ref/source/mon-abil.cc
@@ -1047,6 +1047,7 @@ bool mon_special_ability(monsters *monster, bolt & beem)
case MONS_BLINK_FROG:
case MONS_KILLER_KLOWN:
case MONS_PRINCE_RIBBIT:
+ case MONS_GOLDEN_EYE:
if (one_chance_in(7) || mons_is_caught(monster) && one_chance_in(3))
used = monster_blink(monster);
break;
@@ -1287,6 +1288,17 @@ bool mon_special_ability(monsters *monster, bolt & beem)
return (used);
}
+// Combines code using in Confusing Eye, Giant Eye and Eye of Draining to
+// reduce clutter.
+bool _eyeball_will_use_ability (monsters *monster)
+{
+ return (coinflip()
+ && !mons_is_wandering(monster)
+ && !mons_is_fleeing(monster)
+ && !mons_is_pacified(monster)
+ && !player_or_mon_in_sanct(monster));
+}
+
//---------------------------------------------------------------
//
// mon_nearby_ability
@@ -1369,12 +1381,38 @@ void mon_nearby_ability(monsters *monster)
monster->colour = random_colour();
break;
+ case MONS_GOLDEN_EYE:
+ if (_eyeball_will_use_ability(monster))
+ {
+ if (you.can_see(monster) && you.can_see(foe))
+ mprf("%s blinks at %s.",
+ monster->name(DESC_CAP_THE).c_str(),
+ foe->name(DESC_NOCAP_THE).c_str());
+
+ int confuse_power = 2 + random2(3);
+
+ if (foe->atype() == ACT_PLAYER
+ && you_resist_magic((monster->hit_dice * 5) * confuse_power))
+ {
+ canned_msg(MSG_YOU_RESIST);
+ break;
+ }
+ else if (foe->atype() == ACT_MONSTER)
+ {
+ const monsters* foe_mons = dynamic_cast<const monsters*>(foe);
+ if (check_mons_resist_magic(foe_mons, (monster->hit_dice * 5) * confuse_power))
+ {
+ simple_monster_message(foe_mons, mons_resist_string(foe_mons));
+ break;
+ }
+ }
+
+ foe->confuse(monster, 2 + random2(3));
+ }
+ break;
+
case MONS_GIANT_EYEBALL:
- if (coinflip()
- && !mons_is_wandering(monster)
- && !mons_is_fleeing(monster)
- && !mons_is_pacified(monster)
- && !player_or_mon_in_sanct(monster))
+ if (_eyeball_will_use_ability(monster))
{
if (you.can_see(monster) && you.can_see(foe))
mprf("%s stares at %s.",
@@ -1388,12 +1426,8 @@ void mon_nearby_ability(monsters *monster)
break;
case MONS_EYE_OF_DRAINING:
- if (coinflip()
- && foe->atype() == ACT_PLAYER
- && !mons_is_wandering(monster)
- && !mons_is_fleeing(monster)
- && !mons_is_pacified(monster)
- && !player_or_mon_in_sanct(monster))
+ if (_eyeball_will_use_ability(monster)
+ && foe->atype() == ACT_PLAYER)
{
simple_monster_message(monster, " stares at you.");
diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h
index 1fdb1710b7..721ebd27b6 100644
--- a/crawl-ref/source/mon-data.h
+++ b/crawl-ref/source/mon-data.h
@@ -2133,6 +2133,17 @@ static monsterentry mondata[] = {
HT_LAND, 7, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_BIG
},
+{
+ MONS_GOLDEN_EYE, 'G', ETC_GOLD, "golden eye",
+ M_NO_SKELETON | M_LEVITATE | M_BATTY,
+ MR_RES_ASPHYX,
+ 0, 17, MONS_GIANT_EYEBALL, MONS_GOLDEN_EYE, MH_NATURAL, MAG_IMMUNE,
+ { AT_NO_ATK, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
+ { 6, 1, 2, 0 },
+ 0, 20, MST_NO_SPELLS, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, I_PLANT,
+ HT_LAND, 13, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_TINY
+},
+
// hybrids ('H')
{
MONS_HIPPOGRIFF, 'H', BROWN, "hippogriff",
diff --git a/crawl-ref/source/mon-pick.cc b/crawl-ref/source/mon-pick.cc
index 4861ef5011..72fa8efbf5 100644
--- a/crawl-ref/source/mon-pick.cc
+++ b/crawl-ref/source/mon-pick.cc
@@ -220,6 +220,7 @@ bool mons_abyss(int mcls)
case MONS_GIANT_ORANGE_BRAIN:
case MONS_GIANT_SPORE:
case MONS_GREAT_ORB_OF_EYES:
+ case MONS_GOLDEN_EYE:
case MONS_GREEN_DEATH:
case MONS_GUARDIAN_NAGA:
case MONS_HAIRY_DEVIL:
@@ -364,6 +365,7 @@ int mons_rare_abyss(int mcls)
case MONS_INSUBSTANTIAL_WISP:
case MONS_UNSEEN_HORROR:
+ case MONS_GOLDEN_EYE:
return 12;
case MONS_HELL_HOUND:
@@ -517,6 +519,7 @@ bool mons_pan(int mcls)
case MONS_EYE_OF_DRAINING:
case MONS_GIANT_EYEBALL:
case MONS_GREAT_ORB_OF_EYES:
+ case MONS_GOLDEN_EYE:
// malign beings
case MONS_EFREET:
case MONS_RAKSHASA:
@@ -1873,6 +1876,7 @@ int mons_pitslime_level(int mcls)
case MONS_GIANT_AMOEBA:
case MONS_AZURE_JELLY:
case MONS_SHINING_EYE:
+ case MONS_GOLDEN_EYE:
mlev += 3;
break;
@@ -1927,6 +1931,7 @@ int mons_pitslime_rare(int mcls)
case MONS_DEATH_OOZE:
case MONS_GREAT_ORB_OF_EYES:
case MONS_EYE_OF_DEVASTATION:
+ case MONS_GOLDEN_EYE:
return 30;
case MONS_PULSATING_LUMP:
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index f8fedade1a..52befdeb7f 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -2703,7 +2703,8 @@ bool mons_has_los_ability(int mclass)
return (true);
// These eyes only need LOS, as well. (The other eyes use spells.)
- if (mclass == MONS_GIANT_EYEBALL || mclass == MONS_EYE_OF_DRAINING)
+ if (mclass == MONS_GIANT_EYEBALL || mclass == MONS_EYE_OF_DRAINING
+ || mclass == MONS_GOLDEN_EYE)
return (true);
// Although not using spells, these are exceedingly dangerous.
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 3a08420791..0bfa4d2897 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -1941,6 +1941,11 @@ static band_type _choose_band(int mon_type, int power, int &band_size)
band = BAND_KHUFU;
band_size = 3;
break;
+
+ case MONS_GOLDEN_EYE:
+ band = BAND_GOLDEN_EYE;
+ band_size = 1 + random2(5);
+ break;
} // end switch
if (band != BAND_NO_BAND && band_size == 0)
@@ -2247,6 +2252,10 @@ static monster_type _band_member(band_type band, int power)
mon_type = coinflip()? MONS_GREATER_MUMMY : MONS_MUMMY;
break;
+ case BAND_GOLDEN_EYE:
+ mon_type = MONS_GOLDEN_EYE;
+ break;
+
default:
break;
}
diff --git a/crawl-ref/source/monplace.h b/crawl-ref/source/monplace.h
index 6cddbc695d..de0a2a175f 100644
--- a/crawl-ref/source/monplace.h
+++ b/crawl-ref/source/monplace.h
@@ -67,6 +67,7 @@ enum band_type
BAND_AZRAEL,
BAND_DUVESSA, // 50
BAND_KHUFU,
+ BAND_GOLDEN_EYE,
NUM_BANDS // always last
};
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index 58b4f53462..64c71a0486 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -2411,6 +2411,7 @@ std::string monsters::hand_name(bool plural, bool *can_plural) const
case MONS_EYE_OF_DRAINING:
case MONS_SHINING_EYE:
case MONS_EYE_OF_DEVASTATION:
+ case MONS_GOLDEN_EYE:
*can_plural = false;
// Deliberate fallthrough.
case MONS_GREAT_ORB_OF_EYES: