Auxiliary attacks


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

Crypt Cleanser

Posts: 724

Joined: Tuesday, 29th November 2011, 11:04

Post Tuesday, 27th June 2017, 17:22

Auxiliary attacks

What is the exact formula for triggering an auxiliary attack in 0.20? I'm interested in particular in the bite attack, both for VS and Vp (assuming it works different for VS than for other races with bite).
"Damned, damned be the legions of the damned..."
User avatar

Ziggurat Zagger

Posts: 4478

Joined: Wednesday, 23rd October 2013, 07:56

Post Tuesday, 27th June 2017, 19:24

Re: Auxiliary attacks

This returns your to_hit value:
  Code:
int melee_attack::calc_your_to_hit_unarmed(int uattack)
{
    int your_to_hit;

    your_to_hit = 1300
                + you.dex() * 75
                + you.skill(SK_FIGHTING, 30);
    your_to_hit /= 100;

    your_to_hit -= 5 * you.inaccuracy();

    if (you.get_mutation_level(MUT_EYEBALLS))
        your_to_hit += 2 * you.get_mutation_level(MUT_EYEBALLS) + 1;

    if (you.species != SP_VAMPIRE && you.hunger_state <= HS_STARVING)
        your_to_hit -= 3;

    your_to_hit += slaying_bonus();

    return your_to_hit;
}

So for your_to_hit, there's a base value of 13 and each point of dex gives +0.75 and fighting skill gives +fighting*0.3. This is modifed by inaccuracy, eyeball mutation and being a starving non-vampire. Slaying bonus is added.

This value is given to random2 function and if the result if greater than or equal to monster evasion value, or you pass a one_chance_in_30 test, you score a hit.

Being under Elyvilon penance can block your attack.

I hope someone will correct all mistakes I may have done in interpreting this :) At least I hope I looked at the right piece of code...
DCSS: 97:...MfCj}SpNeBaEEGrFE{HaAKTrCK}DsFESpHu{FoArNaBe}
FeEE{HOIEMiAE}GrGlHuWrGnWrNaAKBaFi{MiDeMfDe}{DrAKTrAMGhEnGnWz}
{PaBeDjFi}OgAKPaCAGnCjOgCKMfAEAtCKSpCjDEEE{HOSu
Bloat: 17: RaRoPrPh{GuStGnCa}{ArEtZoNb}KiPaAnDrBXDBQOApDaMeAGBiOCNKAsFnFlUs{RoBoNeWi

Return to Dungeon Crawling Advice

Who is online

Users browsing this forum: No registered users and 18 guests

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