Mines Malingerer
Posts: 48
Joined: Sunday, 20th August 2017, 06:29
Ask fellow adventurers how to stay alive in the deep, dark, dangerous dungeon below, or share your own accumulated wisdom.
Mines Malingerer
Posts: 48
Joined: Sunday, 20th August 2017, 06:29
Tartarus Sorceror
Posts: 1698
Joined: Saturday, 18th June 2016, 13:57
Spider Stomper
Posts: 245
Joined: Sunday, 1st March 2015, 19:26
Ziggurat Zagger
Posts: 6454
Joined: Tuesday, 30th October 2012, 19:06
Shtopit wrote:Related question: what does rMiss exactly do?
Blades Runner
Posts: 616
Joined: Thursday, 25th October 2012, 03:19
Cocytus Succeeder
Posts: 2229
Joined: Sunday, 18th December 2011, 13:31
Shoals Surfer
Posts: 268
Joined: Tuesday, 4th October 2016, 09:32
Dungeon Dilettante
Posts: 3
Joined: Thursday, 12th October 2017, 21:25
Vaults Vanquisher
Posts: 443
Joined: Thursday, 16th February 2017, 15:23
watertreatmentRL wrote:You should take the 4 ac. The kind of effects I would worry about with a character like this are high damage bolt spells, as from an OOF or electric golem.
Vaults Vanquisher
Posts: 443
Joined: Thursday, 16th February 2017, 15:23
Tartarus Sorceror
Posts: 1739
Joined: Tuesday, 13th March 2012, 02:48
Ziggurat Zagger
Posts: 4432
Joined: Friday, 8th May 2015, 17:51
Vaults Vanquisher
Posts: 443
Joined: Thursday, 16th February 2017, 15:23
Vaults Vanquisher
Posts: 443
Joined: Thursday, 16th February 2017, 15:23
static bool _test_beam_hit(int attack, int defence, bool pierce,
int defl, defer_rand &r)
{
if (attack == AUTOMATIC_HIT)
return true;
if (pierce)
{
if (defl > 1)
attack = r[0].random2(attack * 2) / 3;
else if (defl && attack >= 2) // don't increase acc of 0
attack = r[0].random_range((attack + 1) / 2 + 1, attack);
}
else if (defl)
attack = r[0].random2(attack / defl);
dprf(DIAG_BEAM, "Beam attack: %d, defence: %d", attack, defence);
attack = r[1].random2(attack);
defence = r[2].random2avg(defence, 2);
dprf(DIAG_BEAM, "Beam new attack: %d, defence: %d", attack, defence);
return attack >= defence;
}
function test_beam_hit(attack, defence, pierce, defl)
if pierce then
if defl > 1 then
attack = math.floor(random2(attack*2)/3)
elseif defl > 0 and attack >= 2 then
attack = random_range(math.floor((attack+1)/2)+1,attack)
end
elseif defl > 0 then
attack = random2(math.floor(attack/defl))
end
attack = random2(attack)
defence = random2avg2(defence)
return attack >= defence
end
function random2(n)
return math.random(1,n)-1
end
function random2avg2(n)
return math.floor((random2(n)+random2(n+1))/2)
end
function random_range(a,b)
return a+random2(b-a+1)
end
print("hit\t21 EV\t16 EV+rMsl")
print("===\t=====\t==========")
local trials = 1000000
for tohit=1,50 do
local hits21 = 0
local hits16 = 0
for i=1,trials do
if test_beam_hit(tohit,21,true,0) then
hits21 = hits21+1
end
if test_beam_hit(tohit,16,true,1) then
hits16 = hits16+1
end
end
print(string.format("%2d\t%4.1f%%\t%4.1f%%",tohit,hits21/trials*100,hits16/trials*100))
end
hit 21 EV 16 EV+rMsl
=== ===== ==========
1 0.7% 1.1%
2 1.4% 2.4%
3 2.5% 4.2%
4 3.8% 5.3%
5 5.4% 7.8%
6 7.3% 9.3%
7 9.5% 12.6%
8 12.0% 14.5%
9 14.8% 18.5%
10 17.8% 20.6%
11 21.2% 25.1%
12 24.7% 27.3%
13 28.2% 31.8%
14 31.6% 33.8%
15 35.1% 38.1%
16 38.4% 40.0%
17 41.6% 43.8%
18 44.7% 45.4%
19 47.3% 48.8%
20 49.9% 50.2%
21 52.4% 53.2%
22 54.5% 54.4%
23 56.5% 57.0%
24 58.4% 58.0%
25 60.0% 60.3%
26 61.5% 61.0%
27 63.0% 63.1%
28 64.2% 63.8%
29 65.5% 65.6%
30 66.6% 66.1%
31 67.8% 67.7%
32 68.8% 68.2%
33 69.7% 69.5%
34 70.6% 70.1%
35 71.4% 71.3%
36 72.3% 71.7%
37 72.9% 72.8%
38 73.7% 73.1%
39 74.3% 74.2%
40 75.1% 74.4%
41 75.5% 75.4%
42 76.2% 75.6%
43 76.8% 76.5%
44 77.3% 76.7%
45 77.7% 77.5%
46 78.3% 77.7%
47 78.7% 78.4%
48 79.2% 78.6%
49 79.6% 79.3%
50 80.0% 79.5%
Vaults Vanquisher
Posts: 443
Joined: Thursday, 16th February 2017, 15:23
Dungeon Master
Posts: 625
Joined: Thursday, 23rd October 2014, 03:08
Vaults Vanquisher
Posts: 443
Joined: Thursday, 16th February 2017, 15:23
Cocytus Succeeder
Posts: 2184
Joined: Tuesday, 3rd February 2015, 22:05
Return to Dungeon Crawling Advice
Users browsing this forum: No registered users and 14 guests