FANDOM


Evade is a character's chance to dodge a melee or ranged attack. It is derived from DV, Perception and Evasion.

The following pseudocode describes the Evade roll in detail.  It is based on stock Elona; Elona+ seems to have tweaked the equations somewhat.

The Evade roll has three possible results: !hit: normal hit. !nohit: miss. !crit: critical hit.

dim accp  //accuracy
dim evap  //dodge
if defender.dimmed
    if rand(4) < 1
        !crit
        end
if defender.sleep
    !hit
    end
if defender.blind
    evap = evap/2
if attacker.blind
    accp = accp/2
if attacker.confused or attacker.dimmed
    if attacker.isranged
        accp = accp/5
    else if attacker.ismelee
        accp = accp*2/3
if accp < defender.greaterEvasion *10
    if evap/accp > 3
        if rnd(defender.greaterEvasion +250) > 1
            !nohit
            end
    if evap/accp > 2
        if rnd(defender.greaterEvasion +250) > 150
            !nohit
            end   
    if evap/accp > 1.5
        if rnd(defender.greaterEvasion +250) > 200
            !nohit
            end   
if rnd(5000) < attacker.Perception +50
    !crit
    end
if attacker.critChance < rnd(200) //max critChance is 30, which requires ~840 Eye of Mind
    !crit
    end
if 1 >= rnd(20)
    !nohit
    end
if 1 >= rnd(20)
    !hit
    end
if accp < 1
    !nohit
    end
if evap < 1
    !hit
    end
if rnd(accp) > rnd(evap *3/2)
    !hit
    end
!nohit
end

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.