summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/beam.cc10
-rw-r--r--crawl-ref/source/player.cc33
2 files changed, 19 insertions, 24 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index f64a782711..2581ea6cd7 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -2775,7 +2775,7 @@ bool poison_monster( monsters *monster,
}
// Actually napalms a monster (w/ message).
-void _sticky_flame_monster( int mn, kill_category who, int levels )
+void _sticky_flame_monster(int mn, kill_category who, int levels)
{
monsters *monster = &menv[mn];
@@ -4241,7 +4241,7 @@ static int _affect_player( bolt &beam, item_def *item )
&& (you.species != SP_MOTTLED_DRACONIAN
|| you.experience_level < 6))
{
- if (!player_equip( EQ_BODY_ARMOUR, ARM_MOTTLED_DRAGON_ARMOUR ))
+ if (!player_equip(EQ_BODY_ARMOUR, ARM_MOTTLED_DRAGON_ARMOUR))
{
you.duration[DUR_LIQUID_FLAMES] += random2avg(7, 3) + 1;
was_affected = true;
@@ -4788,11 +4788,9 @@ static int _affect_monster(bolt &beam, monsters *mon, item_def *item)
// sticky flame
if (beam.name == "sticky flame")
{
- int levels = 1 + random2( hurt_final ) / 2;
- if (levels > 4)
- levels = 4;
+ int levels = std::min(4, 1 + random2(hurt_final) / 2);
- _sticky_flame_monster( tid, _whose_kill(beam), levels );
+ _sticky_flame_monster(tid, _whose_kill(beam), levels);
}
// Handle missile effects.
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index b3187aa42a..11cc2a9088 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -1208,20 +1208,6 @@ int player_res_magic(void)
return rm;
}
-// If temp is set to false, temporary sources or resistance won't be counted.
-int player_res_steam(bool calc_unid, bool temp, bool items)
-{
- int res = 0;
-
- if (you.species == SP_PALE_DRACONIAN && you.experience_level > 5)
- res += 2;
-
- if (items && player_equip(EQ_BODY_ARMOUR, ARM_STEAM_DRAGON_ARMOUR))
- res += 2;
-
- return (res + player_res_fire(calc_unid, temp, items) / 2);
-}
-
bool player_can_smell()
{
return (you.species != SP_MUMMY);
@@ -1299,6 +1285,19 @@ int player_res_fire(bool calc_unid, bool temp, bool items)
return (rf);
}
+int player_res_steam(bool calc_unid, bool temp, bool items)
+{
+ int res = 0;
+
+ if (you.species == SP_PALE_DRACONIAN && you.experience_level > 5)
+ res += 2;
+
+ if (items && player_equip(EQ_BODY_ARMOUR, ARM_STEAM_DRAGON_ARMOUR))
+ res += 2;
+
+ return (res + player_res_fire(calc_unid, temp, items) / 2);
+}
+
int player_res_cold(bool calc_unid, bool temp, bool items)
{
int rc = 0;
@@ -1329,7 +1328,6 @@ int player_res_cold(bool calc_unid, bool temp, bool items)
break;
}
-
if (you.species == SP_VAMPIRE)
{
if (you.hunger_state <= HS_NEAR_STARVING)
@@ -1383,8 +1381,7 @@ int player_res_acid(bool calc_unid, bool items)
int res = 0;
if (!transform_changed_physiology())
{
- if (you.species == SP_YELLOW_DRACONIAN
- && you.experience_level >= 7)
+ if (you.species == SP_YELLOW_DRACONIAN && you.experience_level > 6)
res += 2;
res += player_mutation_level(MUT_YELLOW_SCALES) * 2 / 3;
@@ -1560,7 +1557,7 @@ int player_res_poison(bool calc_unid, bool temp, bool items)
rp = 1;
return (rp);
-} // end player_res_poison()
+}
int player_spec_death()
{