summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/mon-util.cc4
-rw-r--r--crawl-ref/source/monstuff.cc34
-rw-r--r--crawl-ref/source/player.cc2
3 files changed, 20 insertions, 20 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 981e6298f8..d7f8d89bfb 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -3534,8 +3534,8 @@ int monsters::shield_bonus() const
if (incapacitated())
return (0);
- const int shld_c = property(*shld, PARM_AC);
- return (random2(1 + shld_c) + random2(hit_dice / 2));
+ int shld_c = property(*shld, PARM_AC);
+ return (random2avg(shld_c + hit_dice * 2 / 3, 2));
}
return (-100);
}
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 6dbcdb0e4f..09c20b2016 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -2444,23 +2444,23 @@ static void handle_nearby_ability(monsters *monster)
}
if (monster_can_submerge(monster, grd[monster->x][monster->y])
- && ( !player_beheld_by(monster) // no submerging if player entranced
- && (one_chance_in(5)
- || ((grid_distance( monster->x, monster->y,
- you.x_pos, you.y_pos ) > 1
- // FIXME This is better expressed as a
- // function such as
- // monster_has_ranged_attack:
- && monster->type != MONS_ELECTRICAL_EEL
- && monster->type != MONS_LAVA_SNAKE
- && (monster->type != MONS_MERMAID
- || you.species == SP_MERFOLK)
- // Don't submerge if we just unsubmerged for
- // the sake of shouting.
- && monster->seen_context != "bursts forth shouting"
- && !one_chance_in(20)) ))
- || monster->hit_points <= monster->max_hit_points / 2)
- || env.cgrid[monster->x][monster->y] != EMPTY_CLOUD)
+ && !player_beheld_by(monster) // no submerging if player entranced
+ && (one_chance_in(5)
+ || ((grid_distance( monster->x, monster->y,
+ you.x_pos, you.y_pos ) > 1
+ // FIXME This is better expressed as a
+ // function such as
+ // monster_has_ranged_attack:
+ && monster->type != MONS_ELECTRICAL_EEL
+ && monster->type != MONS_LAVA_SNAKE
+ && (monster->type != MONS_MERMAID
+ || you.species == SP_MERFOLK)
+ // Don't submerge if we just unsubmerged for
+ // the sake of shouting.
+ && monster->seen_context != "bursts forth shouting"
+ && !one_chance_in(20)) )
+ || monster->hit_points <= monster->max_hit_points / 2
+ || env.cgrid[monster->x][monster->y] != EMPTY_CLOUD))
{
monster->add_ench(ENCH_SUBMERGED);
update_beholders(monster);
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 02e6358443..0b69753383 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5926,7 +5926,7 @@ int player::shield_bonus() const
int player::shield_bypass_ability(int tohit) const
{
- return (10 + tohit * 2);
+ return (15 + tohit / 2);
}
void player::shield_block_succeeded()