From d55c844e48e7f56c4ec9b9bb6badd21a68022ea7 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Mon, 26 Oct 2009 00:16:31 -0700 Subject: Add stochastic torment resistance per dpeg The mutation comes in three levels and blocks 20%, 40%, or 60% (shown to the user) of torments. Right now, you can cast Symbol of Torment with it; I doubt this is too good. It is on the tier-1 list for demonspawn mutations, and I expect it to be balanced appropriately. Signed-off-by: Darshan Shaligram --- crawl-ref/source/player.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 42be71c2dd..bb9224de52 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -1615,11 +1615,12 @@ bool player_control_teleport(bool calc_unid, bool temp, bool items) || player_mutation_level(MUT_TELEPORT_CONTROL)); } -int player_res_torment(bool) +int player_res_torment(bool, bool temp) { return (player_mutation_level(MUT_TORMENT_RESISTANCE) || you.attribute[ATTR_TRANSFORMATION] == TRAN_LICH - || you.species == SP_VAMPIRE && you.hunger_state == HS_STARVING); + || you.species == SP_VAMPIRE && you.hunger_state == HS_STARVING + || temp && (20 * player_mutation_level(MUT_STOCHASTIC_TORMENT_RESISTANCE) >= random2(100))); } // Funny that no races are susceptible to poisons. {dlb} -- cgit v1.2.3-54-g00ecf