Maths


Ask fellow adventurers how to stay alive in the deep, dark, dangerous dungeon below, or share your own accumulated wisdom.

User avatar

Slime Squisher

Posts: 371

Joined: Friday, 17th December 2010, 15:27

Post Monday, 23rd September 2013, 14:42

Maths

I am not too good at it, so could anyone please tell me if Makhleb or TSO gives more HP for killing an evil monster:

Makhleb: HD - 1 + 1d(HD)
TSO: 1d(1 + 2*HD) - 1
Mangled by Mennas

Dis Charger

Posts: 2064

Joined: Wednesday, 9th January 2013, 19:44

Post Monday, 23rd September 2013, 14:44

Re: Maths

looks like TSO gives much more like twice as much or more

Abyss Ambulator

Posts: 1131

Joined: Tuesday, 4th January 2011, 15:03

Post Monday, 23rd September 2013, 15:11

Re: Maths

Based on your formulas:

Makhleb gives more HP on average iff the mosther has HD>1.
You may have a better view of the HP received if you visualize it as an interval (every integer value has the same probability):
Makhleb gives between [HD , 2*HD-1], while TSO gives between [0 , 2*HD].
User avatar

Slime Squisher

Posts: 371

Joined: Friday, 17th December 2010, 15:27

Post Monday, 23rd September 2013, 15:19

Re: Maths

Thanks, this makes more sense now.
I lifted the formulas from the learndb, so they should be correct.
Mangled by Mennas

Ziggurat Zagger

Posts: 6454

Joined: Tuesday, 30th October 2012, 19:06

Post Monday, 23rd September 2013, 15:52

Re: Maths

Here's the actual formulas from the code:
  Code:
int heal = (you_worship(GOD_MAKHLEB)) ?
                                mons->hit_dice + random2(mons->hit_dice) :
                                random2(1 + 2 * mons->hit_dice);

That is to say, Makhleb gives you a random number between (HD) and (HD*2) hit points (Average 1.5*HD), TSO gives you a random number between 0 and (2*HD)+1 Average of about 1*HD.

Makhleb's healing is better for HP, note however, that TSO also gives you Mana (Between 0 and (HD/3)+2)
Spoiler: show
This high quality signature has been hidden for your protection. To unlock it's secret, send 3 easy payments of $9.99 to me, by way of your nearest theta band or ley line. Complete your transmission by midnight tonight for a special free gift!

For this message the author Siegurt has received thanks:
starless

Dis Charger

Posts: 2064

Joined: Wednesday, 9th January 2013, 19:44

Post Tuesday, 24th September 2013, 05:06

Re: Maths

who gives more mp - veh or mak?

Ziggurat Zagger

Posts: 6454

Joined: Tuesday, 30th October 2012, 19:06

Post Tuesday, 24th September 2013, 05:17

Re: Maths

Well, Mak doesn't give any MP any more, only HP (I guess technically he give essence to djinn. so that's sorta MP)
Veh's MP restoration is Between 0 and (HD/2)
  Code:
           if (good_kill
                && (you_worship(GOD_VEHUMET)
                    || you_worship(GOD_SHINING_ONE)
                       && (mons->is_evil() || mons->is_unholy()))
                && !mons_is_object(mons->type)
                && !player_under_penance()
                && random2(you.piety) >= piety_breakpoint(0))
            {
                if (you.species != SP_DJINNI ?
                        you.magic_points < you.max_magic_points :
                        you.hp < you.hp_max)
                {
                    int mana = (you_worship(GOD_VEHUMET)) ?
                            1 + random2(mons->hit_dice / 2) :
                            random2(2 + mons->hit_dice / 3);
                    if (mana > 0)
                    {
                        mpr("You feel your power returning.");
                        inc_mp(mana);
                    }
                }
            }
Spoiler: show
This high quality signature has been hidden for your protection. To unlock it's secret, send 3 easy payments of $9.99 to me, by way of your nearest theta band or ley line. Complete your transmission by midnight tonight for a special free gift!

For this message the author Siegurt has received thanks:
Amnesiac

Return to Dungeon Crawling Advice

Who is online

Users browsing this forum: No registered users and 165 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.