Is this 'Slow Monster probability' spoiler correct?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Patashu
    Knight
    • Jan 2008
    • 528

    Is this 'Slow Monster probability' spoiler correct?

    GF_DO_SLOW with pow 20
    if already slowed, the power is the new value it'd take on e.g. slow once, slowing more is much easier

    resist_chance = r_ptr->level + 40 - (v / 2);

    if (randint0(100) < resist_chance) return (TRUE);

    uniques roll twice

    ------------==============------------------

    >>> for i in range (0, 71, 5):
    ... print "{0}: {1} chance, {2} for a unique".format(i, 1.0-(i+30.0)/100.0, (
    (100.0-i-30.0)/100.0)**2)
    ...
    0: 0.7 chance, 0.49 for a unique
    5: 0.65 chance, 0.4225 for a unique
    10: 0.6 chance, 0.36 for a unique
    15: 0.55 chance, 0.3025 for a unique
    20: 0.5 chance, 0.25 for a unique
    25: 0.45 chance, 0.2025 for a unique
    30: 0.4 chance, 0.16 for a unique
    35: 0.35 chance, 0.1225 for a unique
    40: 0.3 chance, 0.09 for a unique
    45: 0.25 chance, 0.0625 for a unique
    50: 0.2 chance, 0.04 for a unique
    55: 0.15 chance, 0.0225 for a unique
    60: 0.1 chance, 0.01 for a unique
    65: 0.05 chance, 0.0025 for a unique
    70: 0.0 chance, 0.0 for a unique
    My Chiptune music, made in Famitracker: http://soundcloud.com/patashu
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    #2
    It's a while since I looked at the mon-timed code, but that looks about right, yes.
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

    Comment

    Working...
    😀
    😂
    🥰
    😘
    🤢
    😎
    😞
    😡
    👍
    👎