|
From: <gi...@cr...> - 2012-02-28 19:06:39
|
via 2a3aa8409dcb82be84ea38ef7dc8802f0a79dd37 (commit)
via 8b9966146b44130ad09a1bf625687a2694a7a062 (commit)
from 28819cb77ceb5f7688fc0b8bd1a804f2e725ebd8 (commit)
-----------------------------------------------------------------------
commit 2a3aa8409dcb82be84ea38ef7dc8802f0a79dd37
Author: Eino Keskitalo <ein...@gm...>
Date: Tue Feb 28 20:30:54 2012 +0200
Remove fire resistance items from ice cave cavern loot; make cavern loot placement into their own functions.
The loot itself sure could use some improvement, I think. Any takers?
commit 8b9966146b44130ad09a1bf625687a2694a7a062
Author: Eino Keskitalo <ein...@gm...>
Date: Tue Feb 28 19:43:19 2012 +0200
Make the messages for calling the dead and animating remains canned.
-----------------------------------------------------------------------
Summary of changes:
crawl-ref/source/dat/des/portals/icecave.des | 77 +++++++++++---------------
crawl-ref/source/enum.h | 2 +
crawl-ref/source/godabil.cc | 4 +-
crawl-ref/source/spl-summoning.cc | 5 +-
crawl-ref/source/stuff.cc | 6 ++
5 files changed, 45 insertions(+), 49 deletions(-)
diff --git a/crawl-ref/source/dat/des/portals/icecave.des b/crawl-ref/source/dat/des/portals/icecave.des
index c28693f..6b1fe64 100644
--- a/crawl-ref/source/dat/des/portals/icecave.des
+++ b/crawl-ref/source/dat/des/portals/icecave.des
@@ -222,6 +222,32 @@ function ice_cave_caverns_natural_giant_monster_set(e)
end
}}
+# : ice_cave_caverns_undead_demon_loot(_G)
+{{
+function ice_cave_caverns_undead_demon_loot(e)
+ e.item("cloak ego:cold_resistance good_item / wizard hat good_item / \
+ pair of gloves good_item / pair of boots good_item / nothing")
+ e.item("book of ice / book of unlife / staff of cold / staff of death / \
+ nothing w:30")
+ e.item("ring of ice / ring of protection from cold / \
+ ring of life protection / wand of cold / wand of draining / nothing")
+end
+}}
+
+# : ice_cave_caverns_natura_giant_loot(_G)
+{{
+function ice_cave_caverns_natural_giant_loot(e)
+ e.item("animal skin good_item ego:cold_resistance / \
+ battleaxe good_item ego:freezing w:4 / \
+ glaive good_item ego:freezing w:4 / \
+ great sword good_item ego:freezing w:2 / nothing")
+ e.item("book of ice / crossbow ego:frost good_item no_uniq / \
+ longbow ego:frost good_item no_uniq / nothing w:20")
+ e.item("ring of ice / ring of protection from cold / wand of cold / \
+ arrow ego:ice q:25 / bolt ego:ice q:20 / nothing")
+end
+}}
+
# Add a milestone for entering the Ice Cave.
{{
function ice_cave_milestone(e)
@@ -870,24 +896,11 @@ ice_cave_milestone(_G)
: if you.level_type_tag() == "ice_cave_hard" then
: ice_cave_random_monster_list_undead_demon(_G)
: ice_cave_caverns_undead_demon_monster_set(_G)
-ITEM: cloak ego:fire_resistance good_item / wizard hat good_item / \
- pair of gloves good_item / pair of boots good_item / nothing
-ITEM: book of ice / book of unlife / staff of cold / staff of death / \
- nothing w:30
-ITEM: ring of ice / ring of protection from fire / ring of life protection / \
- wand of cold / wand of draining / nothing
+: ice_cave_caverns_undead_demon_loot(_G)
: else
: ice_cave_random_monster_list_natural_giant(_G)
: ice_cave_caverns_natural_giant_monster_set(_G)
-ITEM: animal skin good_item ego:fire_resistance / \
- battleaxe good_item ego:freezing w:4 / \
- glaive good_item ego:freezing w:4 / \
- great sword good_item ego:freezing w:2 / nothing
-ITEM: book of ice / \
- crossbow ego:frost good_item no_uniq / \
- longbow ego:frost good_item no_uniq / nothing w:20
-ITEM: ring of ice / ring of protection from fire / wand of cold / \
- arrow ego:ice q:25 / bolt ego:ice q:20 / nothing
+: ice_cave_caverns_natural_giant_loot(_G)
: end
ITEM: any wand / any potion w:5 / any scroll w:5
MAP
@@ -930,12 +943,7 @@ ORIENT: encompass
: if you.level_type_tag() == "ice_cave_hard" then
: ice_cave_random_monster_list_undead_demon(_G)
: ice_cave_caverns_undead_demon_monster_set(_G)
-ITEM: cloak ego:fire_resistance good_item / wizard hat good_item / \
- pair of gloves good_item / pair of boots good_item / nothing
-ITEM: book of ice / book of unlife / staff of cold / staff of death / \
- nothing w:30
-ITEM: ring of ice / ring of protection from fire / ring of life protection / \
- wand of cold / wand of draining / nothing
+: ice_cave_caverns_undead_demon_loot(_G)
# Take out ';' safety padding.
SUBST: ; = .
# Place the fog generators:
@@ -945,15 +953,7 @@ KFEAT: ! = .
: else
: ice_cave_random_monster_list_natural_giant(_G)
: ice_cave_caverns_natural_giant_monster_set(_G)
-ITEM: animal skin good_item ego:fire_resistance / \
- battleaxe good_item ego:freezing w:4 / \
- glaive good_item ego:freezing w:4 / \
- great sword good_item ego:freezing w:2 / nothing
-ITEM: book of ice / \
- crossbow ego:frost good_item no_uniq / \
- longbow ego:frost good_item no_uniq / nothing w:20
-ITEM: ring of ice / ring of protection from fire / wand of cold / \
- arrow ego:ice q:25 / bolt ego:ice q:20 / nothing
+: ice_cave_caverns_natural_giant_loot(_G)
# Place the fog generators. The predetermined ones are mild.
: place_fog(_G, "freezing vapour", 5)
# Place a few random, mild ones.
@@ -1011,12 +1011,7 @@ ORIENT: encompass
: if you.level_type_tag() == "ice_cave_hard" then
: ice_cave_random_monster_list_undead_demon(_G)
: ice_cave_caverns_undead_demon_monster_set(_G)
-ITEM: cloak ego:fire_resistance good_item / wizard hat good_item / \
- pair of gloves good_item / pair of boots good_item / nothing
-ITEM: book of ice / book of unlife / staff of cold / staff of death / \
- nothing w:30
-ITEM: ring of ice / ring of protection from fire / ring of life protection / \
- wand of cold / wand of draining / nothing
+: ice_cave_caverns_undead_demon_loot(_G)
# Place fog generators.
SUBST: 3 = 3!
: place_fog(_G, "freezing vapour", 25)
@@ -1028,15 +1023,7 @@ KFEAT: ! = .
: else
: ice_cave_random_monster_list_natural_giant(_G)
: ice_cave_caverns_natural_giant_monster_set(_G)
-ITEM: animal skin good_item ego:fire_resistance / \
- battleaxe good_item ego:freezing w:4 / \
- glaive good_item ego:freezing w:4 / \
- great sword good_item ego:freezing w:2 / nothing
-ITEM: book of ice / \
- crossbow ego:frost good_item no_uniq / \
- longbow ego:frost good_item no_uniq / nothing w:20
-ITEM: ring of ice / ring of protection from fire / wand of cold / \
- arrow ego:ice q:25 / bolt ego:ice q:20 / nothing
+: ice_cave_caverns_natural_giant_loot(_G)
# Place fog generators.
SUBST: 3 = 3!
: place_fog(_G, "freezing vapour", 20)
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index eafb076..321f601 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -515,6 +515,8 @@ enum canned_message_type
MSG_DISORIENTED,
MSG_TOO_HUNGRY,
MSG_DETECT_NOTHING,
+ MSG_CALL_DEAD,
+ MSG_ANIMATE_REMAINS,
};
enum char_set_type
diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc
index cb1af68..e6e7f6f 100644
--- a/crawl-ref/source/godabil.cc
+++ b/crawl-ref/source/godabil.cc
@@ -1590,14 +1590,14 @@ void yred_animate_remains_or_dead()
{
if (yred_can_animate_dead())
{
- mpr("You call on the dead to rise...");
+ canned_msg(MSG_CALL_DEAD);
animate_dead(&you, you.skill_rdiv(SK_INVOCATIONS) + 1, BEH_FRIENDLY,
MHITYOU, &you, "", GOD_YREDELEMNUL);
}
else
{
- mpr("You attempt to give life to the dead...");
+ canned_msg(MSG_ANIMATE_REMAINS);
if (animate_remains(you.pos(), CORPSE_BODY, BEH_FRIENDLY,
MHITYOU, &you, "", GOD_YREDELEMNUL) < 0)
diff --git a/crawl-ref/source/spl-summoning.cc b/crawl-ref/source/spl-summoning.cc
index 51010b2..365c922 100644
--- a/crawl-ref/source/spl-summoning.cc
+++ b/crawl-ref/source/spl-summoning.cc
@@ -39,6 +39,7 @@
#include "player-stats.h"
#include "religion.h"
#include "shout.h"
+#include "stuff.h"
#include "teleport.h"
#include "terrain.h"
#include "xom.h"
@@ -1858,7 +1859,7 @@ int animate_dead(actor *caster, int pow, beh_type beha, unsigned short hitting,
spret_type cast_animate_skeleton(god_type god, bool fail)
{
fail_check();
- mpr("You attempt to give life to the dead...");
+ canned_msg(MSG_ANIMATE_REMAINS);
// First, we try to animate a skeleton if there is one.
if (animate_remains(you.pos(), CORPSE_SKELETON, BEH_FRIENDLY,
@@ -1896,7 +1897,7 @@ spret_type cast_animate_skeleton(god_type god, bool fail)
spret_type cast_animate_dead(int pow, god_type god, bool fail)
{
fail_check();
- mpr("You call on the dead to rise...");
+ canned_msg(MSG_CALL_DEAD);
if (!animate_dead(&you, pow + 1, BEH_FRIENDLY, MHITYOU, &you, "", god))
canned_msg(MSG_NOTHING_HAPPENS);
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index af5f6cc..1191411 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -487,6 +487,12 @@ void canned_msg(canned_message_type which_message)
case MSG_DETECT_NOTHING:
mpr("You detect nothing.");
break;
+ case MSG_CALL_DEAD:
+ mpr("You call on the dead to rise...");
+ break;
+ case MSG_ANIMATE_REMAINS:
+ mpr("You attempt to give life to the dead...");
+ break;
}
}
--
Dungeon Crawl Stone Soup
|