summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-01 19:59:26 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-01 19:59:26 +0000
commit3c0a534b1b61101fcb2161bba1c03546933e8c1b (patch)
tree9aa367f88328f34901a07ff8a9021c2e7393edd3
parent085daf0f758627f85d8c940ac269129bcbfb17ea (diff)
downloadcrawl-ref-3c0a534b1b61101fcb2161bba1c03546933e8c1b.tar.gz
crawl-ref-3c0a534b1b61101fcb2161bba1c03546933e8c1b.zip
* Display level 0 magic contamination (harmless) on the status screen.
Disadvantage: doesn't match backlit() for the other Glow types. * Some more tutorial tweaks. * Really disable harpies in 0.5. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@9879 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/mon-pick.cc4
-rw-r--r--crawl-ref/source/output.cc16
-rw-r--r--crawl-ref/source/player.cc41
-rw-r--r--crawl-ref/source/player.h2
-rw-r--r--crawl-ref/source/tutorial.cc34
5 files changed, 66 insertions, 31 deletions
diff --git a/crawl-ref/source/mon-pick.cc b/crawl-ref/source/mon-pick.cc
index ddcbb83900..2007bb83ec 100644
--- a/crawl-ref/source/mon-pick.cc
+++ b/crawl-ref/source/mon-pick.cc
@@ -743,7 +743,7 @@ int mons_standard_level(int mcls)
case MONS_SKELETON_SMALL:
case MONS_SPINY_WORM:
case MONS_VERY_UGLY_THING:
- case MONS_HARPY:
+// case MONS_HARPY:
return 20;
case MONS_BOULDER_BEETLE:
@@ -1021,7 +1021,7 @@ int mons_standard_rare(int mcls)
case MONS_STORM_DRAGON:
case MONS_VERY_UGLY_THING:
case MONS_WIZARD:
- case MONS_HARPY:
+// case MONS_HARPY:
return 20;
case MONS_BORING_BEETLE:
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 4b366828dc..ddff3fdc7c 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -750,7 +750,7 @@ static void _get_status_lights(std::vector<status_light>& out)
if (you.attribute[ATTR_HELD])
out.push_back(status_light(RED, "Held"));
- if (you.backlit(false))
+ if (you.magic_contamination || you.backlit(false))
{
int color = you.magic_contamination > 5
? _bad_ench_colour( you.magic_contamination, 15, 25 )
@@ -2457,6 +2457,20 @@ std::string _status_mut_abilities()
status.push_back(help);
}
+ if (you.magic_contamination > 0)
+ {
+ const int cont = get_contamination_level();
+ snprintf(info, INFO_SIZE, "%sglowing",
+ (cont == 0) ? "very slightly " :
+ (cont == 1) ? "slightly " :
+ (cont == 2) ? "" :
+ (cont == 3) ? "moderately " :
+ (cont == 4) ? "heavily "
+ : "really heavily ");
+
+ status.push_back(info);
+ }
+
if (you.rotting || you.species == SP_GHOUL)
status.push_back("rotting");
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 1c1fae0b70..c47b0de6d2 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5098,7 +5098,7 @@ int get_real_mp(bool include_items)
return enp;
}
-static int _get_contamination_level()
+int get_contamination_level()
{
const int glow = you.magic_contamination;
@@ -5123,8 +5123,11 @@ void contaminate_player(int change, bool controlled, bool status_only)
{
ASSERT(!crawl_state.arena);
+ if (status_only && !you.magic_contamination)
+ return;
+
// get current contamination level
- int old_level = _get_contamination_level();
+ int old_level = get_contamination_level();
int new_level = 0;
#if DEBUG_DIAGNOSTICS
if (change > 0 || (change < 0 && you.magic_contamination))
@@ -5146,26 +5149,24 @@ void contaminate_player(int change, bool controlled, bool status_only)
}
// figure out new level
- new_level = _get_contamination_level();
+ new_level = get_contamination_level();
if (status_only || (new_level >= 1 && old_level == 0))
{
- if (new_level > 0)
+ if (new_level > 3)
{
- if (new_level > 3)
- {
- mpr( (new_level == 4) ?
- "Your entire body has taken on an eerie glow!" :
- "You are engulfed in a nimbus of crackling magics!");
- }
- else
- {
- mprf("You are %s with residual magics%s",
- (new_level == 3) ? "practically glowing" :
- (new_level == 2) ? "heavily infused"
- : "contaminated",
- (new_level == 3) ? "!" : ".");
- }
+ mpr( (new_level == 4) ?
+ "Your entire body has taken on an eerie glow!" :
+ "You are engulfed in a nimbus of crackling magics!");
+ }
+ else
+ {
+ mprf("You are %s with residual magics%s",
+ (new_level == 3) ? "practically glowing" :
+ (new_level == 2) ? "heavily infused" :
+ (new_level == 1) ? "contaminated"
+ : "lightly contaminated",
+ (new_level == 3) ? "!" : ".");
}
}
else if (new_level != old_level)
@@ -7121,8 +7122,8 @@ bool player::can_see(const actor *target) const
bool player::backlit(bool check_haloed) const
{
- return (_get_contamination_level() >= 1 || duration[DUR_BACKLIGHT]
- || ((check_haloed) ? haloed() : false));
+ return (get_contamination_level() >= 1 || duration[DUR_BACKLIGHT]
+ || (check_haloed ? haloed() : false));
}
bool player::haloed() const
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index e9d8e3b2ea..1cdf5ecd14 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -376,6 +376,8 @@ void set_hp(int new_amount, bool max_too);
int get_real_hp(bool trans, bool rotted = false);
int get_real_mp(bool include_items);
+int get_contamination_level();
+
void set_mp(int new_amount, bool max_too);
void contaminate_player(int change, bool controlled = false,
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index 01dc15f4c1..c58cf6cd91 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -557,11 +557,28 @@ static formatted_string _tutorial_map_intro()
linebreak_string2(result, _get_tutorial_cols());
return formatted_string::parse_block(result, false);
}
+#endif
-static formatted_string _tutorial_stats_intro()
+static void _tutorial_stats_intro()
{
std::ostringstream istr;
+#ifdef USE_TILE
+ istr << "To the upper right, important properties of the character are "
+ "displayed. The most basic one is Health, shown as "
+ "<w>Health: " << you.hp << "/" << you.hp_max << "</w> "
+ "and meaning current out of maximum health points. When Health "
+ "drops to zero, you die." EOL
+ "<w>Magic: " << you.magic_points << "/" << you.max_magic_points
+ << "</w> represents your energy for casting spells, although other "
+ "actions often draw from Magic, too." EOL
+ "<w>Str</w>ength, <w>Int</w>elligence, <w>Dex</w>terity below "
+ "below provide an all-around account of the character's "
+ "attributes. Don't worry about the rest for now.";
+
+ formatted_message_history(istr.str(), MSGCH_TUTORIAL, 0,
+ _get_tutorial_cols());
+#else
// Note: must fill up everything to override the map
istr << "<"
<< colour_to_str(channel_to_colour(MSGCH_TUTORIAL))
@@ -588,9 +605,10 @@ static formatted_string _tutorial_stats_intro()
" \n"
" \n";
- return formatted_string::parse_block(istr.str(), false);
-}
+ formatted_string::parse_block(istr.str(), false).display();
#endif
+}
+
static void _tutorial_message_intro()
{
@@ -665,16 +683,15 @@ void tut_starting_screen()
#endif
if (i == 0)
_tut_starting_info(width).display();
+ else if (i == 1)
#ifdef USE_TILE
- // Skip map and stats explanation for Tiles.
- else if (i > 0 && i < 3)
+ // Skip map explanation for Tiles.
continue;
#else
- else if (i == 1)
_tutorial_map_intro().display();
- else if (i == 2)
- _tutorial_stats_intro().display();
#endif
+ else if (i == 2)
+ _tutorial_stats_intro();
else if (i == 3)
_tutorial_message_intro();
else if (i == 4)
@@ -3221,6 +3238,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
case TUT_LOAD_SAVED_GAME:
{
+ viewwindow(true, false);
text << "Welcome back! If it's been a while since you last played this "
"character, you should take some time to refresh your memory "
"of your character's progress. It is recommended to at least "