Attached Files |
0002-blue_anna-s-casket-of-three-fates.patch [^] (6,416 bytes) 2010-08-20 07:47 [Show Content] [Hide Content]From 2701d6c9f46c57080f4359324ea5938b99bd66cf Mon Sep 17 00:00:00 2001
From: Roberto <roberto.tomas.cuentas@gmail.com>
Date: Fri, 20 Aug 2010 01:42:52 -0400
Subject: [PATCH 2/2] blue_anna's casket of three fates
---
crawl-ref/source/dat/descript/items.txt | 4 ++
crawl-ref/source/it_use3.cc | 61 +++++++++++++++++++++++++++++++
crawl-ref/source/itemname.cc | 2 +
crawl-ref/source/itemprop-enum.h | 1 +
crawl-ref/source/tilepick-p.cc | 1 +
crawl-ref/source/tilepick.cc | 9 +++--
6 files changed, 75 insertions(+), 3 deletions(-)
diff --git a/crawl-ref/source/dat/descript/items.txt b/crawl-ref/source/dat/descript/items.txt
index 9d52460..63dffa8 100644
--- a/crawl-ref/source/dat/descript/items.txt
+++ b/crawl-ref/source/dat/descript/items.txt
@@ -349,6 +349,10 @@ cap
A cloth or leather cap.
%%%%
+casket of three fates
+
+A magical box containing many wild beasts. One may allow them to escape by opening the box's lid.
+%%%%
centaur barding
An armour made for centaurs, to wear over their equine half.
diff --git a/crawl-ref/source/it_use3.cc b/crawl-ref/source/it_use3.cc
index 53cfb69..89326ce 100644
--- a/crawl-ref/source/it_use3.cc
+++ b/crawl-ref/source/it_use3.cc
@@ -394,6 +394,62 @@ static bool _efreet_flask(int slot)
return (true);
}
+static bool _casket_of_three_fates(item_def &box)
+{
+
+ bool friendly, large;
+ int cnt = 0;
+ int monster;
+ monster_type type, sim_type;
+ for (int x=0; x<3; x++)
+ {
+ friendly = x_chance_in_y(1, 3);
+ large = x_chance_in_y(1, 2);
+
+ if (cnt == 0)
+ mpr("You open the casket...");
+
+ type = pick_local_zombifiable_monster(you.absdepth0,
+ false,
+ large ? MONS_SIMULACRUM_LARGE : MONS_SIMULACRUM_SMALL,
+ you.pos());
+ sim_type = large ? MONS_SIMULACRUM_LARGE : MONS_SIMULACRUM_SMALL;
+
+ if (friendly)
+ monster = create_monster(
+ mgen_data(sim_type, BEH_FRIENDLY, &you,
+ 6, SPELL_SIMULACRUM,
+ you.pos(), MHITYOU,
+ MG_FORCE_BEH, GOD_RANDOM, type));
+ else
+ monster = create_monster(
+ mgen_data(sim_type, BEH_HOSTILE, &you,
+ 6, SPELL_SIMULACRUM,
+ you.pos(), MHITYOU,
+ MG_FORCE_BEH, GOD_RANDOM, type));
+
+ if (monster != -1)
+ {
+ if (cnt == 0)
+ mpr("...and ice creatures start to come out!");
+
+ if (player_angers_monster(&menv[monster]))
+ friendly = false;
+
+ mpr(friendly ? "It looks admiringly at you."
+ : "It snorts in your direction!", MSGCH_TALK_VISUAL);
+ cnt++;
+ }
+ }
+
+ if (cnt == 0)
+ canned_msg(MSG_NOTHING_HAPPENS);
+
+ box.sub_type = MISC_EMPTY_EBONY_CASKET;
+
+ return (true);
+}
+
static bool _is_crystal_ball(const item_def &item)
{
return (item.base_type == OBJ_MISCELLANY
@@ -937,6 +993,11 @@ bool evoke_item(int slot)
if (_box_of_beasts(item))
pract = 1;
break;
+
+ case MISC_CASKET_OF_THREE_FATES:
+ if (_casket_of_three_fates(item))
+ pract = 2, ident = true;
+ break;
case MISC_CRYSTAL_BALL_OF_ENERGY:
if (_ball_of_energy())
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 48be216..f80f837 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -827,6 +827,7 @@ static const char* misc_type_name(int type, bool known)
case MISC_CRYSTAL_BALL_OF_SEEING: return "crystal ball of seeing";
case MISC_BOX_OF_BEASTS: return "box of beasts";
case MISC_EMPTY_EBONY_CASKET: return "empty ebony casket";
+ case MISC_CASKET_OF_THREE_FATES: return "casket of three fates";
case MISC_AIR_ELEMENTAL_FAN: return "air elemental fan";
case MISC_LAMP_OF_FIRE: return "lamp of fire";
case MISC_LANTERN_OF_SHADOWS: return "lantern of shadows";
@@ -862,6 +863,7 @@ static const char* misc_type_name(int type, bool known)
return "crystal ball";
case MISC_BOX_OF_BEASTS:
case MISC_EMPTY_EBONY_CASKET:
+ case MISC_CASKET_OF_THREE_FATES:
return "small ebony casket";
case MISC_AIR_ELEMENTAL_FAN: return "gauzy fan";
case MISC_LAMP_OF_FIRE: return "blazing lamp";
diff --git a/crawl-ref/source/itemprop-enum.h b/crawl-ref/source/itemprop-enum.h
index 32657c3..0db40bf 100644
--- a/crawl-ref/source/itemprop-enum.h
+++ b/crawl-ref/source/itemprop-enum.h
@@ -219,6 +219,7 @@ enum misc_item_type
MISC_BOX_OF_BEASTS,
MISC_CRYSTAL_BALL_OF_ENERGY,
MISC_EMPTY_EBONY_CASKET,
+ MISC_CASKET_OF_THREE_FATES,
MISC_CRYSTAL_BALL_OF_FIXATION,
MISC_DISC_OF_STORMS,
diff --git a/crawl-ref/source/tilepick-p.cc b/crawl-ref/source/tilepick-p.cc
index c921177..ff2264b 100644
--- a/crawl-ref/source/tilepick-p.cc
+++ b/crawl-ref/source/tilepick-p.cc
@@ -53,6 +53,7 @@ tileidx_t tilep_equ_weapon(const item_def &item)
case MISC_HORN_OF_GERYON: return TILEP_HAND1_HORN;
case MISC_BOX_OF_BEASTS:
+ case MISC_CASKET_OF_THREE_FATES:
case MISC_EMPTY_EBONY_CASKET: return TILEP_HAND1_BOX;
case MISC_DECK_OF_ESCAPE:
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index 49aea2c..991e500 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -2892,12 +2892,15 @@ static tileidx_t _tileidx_misc(const item_def &item)
case MISC_BOX_OF_BEASTS:
return TILE_MISC_BOX_OF_BEASTS;
- case MISC_CRYSTAL_BALL_OF_ENERGY:
- return TILE_MISC_CRYSTAL_BALL_OF_ENERGY;
-
case MISC_EMPTY_EBONY_CASKET:
return TILE_MISC_EMPTY_EBONY_CASKET;
+ case MISC_CASKET_OF_THREE_FATES:
+ return TILE_MISC_CASKET_OF_THREE_FATES;
+
+ case MISC_CRYSTAL_BALL_OF_ENERGY:
+ return TILE_MISC_CRYSTAL_BALL_OF_ENERGY;
+
case MISC_CRYSTAL_BALL_OF_FIXATION:
return TILE_MISC_CRYSTAL_BALL_OF_FIXATION;
--
1.7.0.4
0020-made-simalcrums-fromcas-ket-of-three-fates-permanent.patch [^] (1,252 bytes) 2010-09-19 14:56 [Show Content] [Hide Content]From 9e1ff7bbf0b679f2d18bbb3ad1807112655c6cde Mon Sep 17 00:00:00 2001
From: blue_anna <roberto.tomas.cuentas@gmail.com>
Date: Sun, 19 Sep 2010 08:54:50 -0400
Subject: [PATCH 20/20] made simalcrums fromcas ket of three fates permanent
---
crawl-ref/source/it_use3.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/crawl-ref/source/it_use3.cc b/crawl-ref/source/it_use3.cc
index 7324b8e..4660b79 100644
--- a/crawl-ref/source/it_use3.cc
+++ b/crawl-ref/source/it_use3.cc
@@ -427,13 +427,13 @@ static bool _casket_of_three_fates(item_def &box)
if (friendly)
monster = create_monster(
mgen_data(sim_type, BEH_FRIENDLY, &you,
- 6, SPELL_SIMULACRUM,
+ 0, SPELL_SIMULACRUM,
you.pos(), MHITYOU,
MG_FORCE_BEH, GOD_RANDOM, type));
else
monster = create_monster(
mgen_data(sim_type, BEH_HOSTILE, &you,
- 6, SPELL_SIMULACRUM,
+ 0, SPELL_SIMULACRUM,
you.pos(), MHITYOU,
MG_FORCE_BEH, GOD_RANDOM, type));
--
1.7.0.4
|