Talk:Sublimation of Blood

From CrawlWiki
Jump to: navigation, search

Formula Wrong?

I received the following message from a Tavern user:

"Hi. says " At maximum power, this can be as much as 20 MP." but it can be much higher really.

I lost about 60 hp while generating about 45 MP once.

int food = 0; // Take at most 90% of currhp. const int minhp = max(div_rand_round(you.hp, 10), 1);

while (you.magic_points < you.max_magic_points && you.hp > minhp && (you.is_undead != US_SEMI_UNDEAD || you.hunger - food >= HUNGER_SATIATED)) { fail_check(); success = true;

inc_mp(1); dec_hp(1, false);

if (you.is_undead == US_SEMI_UNDEAD) food += 15;

for (int loopy = 0; loopy < (you.hp > minhp ? 3 : 0); ++loopy) if (x_chance_in_y(6, pow)) dec_hp(1, false);

if (x_chance_in_y(6, pow)) break; } if (success) mpr("You draw magical energy from your own body!"); else mpr("Your attempt to draw power from your own body fails.");"

Can anyone who can read Crawl code determine what needs adjusting here, if anything?

The amount of MP recovered with this spell has two completely different formulas. One for self-sublimation (a negative binomial random var) and another for chunk-sublimation (which appears in the article). --CommanderC (talk) 23:35, 12 November 2013 (CET)