Damage and AC


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

Lair Larrikin

Posts: 18

Joined: Tuesday, 31st May 2016, 23:17

Post Tuesday, 31st May 2016, 23:20

Damage and AC

I don't know where to post this really, so I apologize if this isn't the right place, but I just had a DeFe with 15ac get hit by Gastronok for 35 damage. From what I can see, Gastronok's attack is 40 and ac reduces damage by 15, so shouldn't he be able to do at most 25 damage. There's probably more to the calculation, but please point me in the right direction. Also, I can post the log later, it's on a different computer, if that's even helpful.

Ziggurat Zagger

Posts: 6454

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

Post Tuesday, 31st May 2016, 23:25

Re: Damage and AC

Ac is rolled, so 15 ac means you reduce damage taken by 0 to 15 points on each hit.
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:
joyousshower

Lair Larrikin

Posts: 18

Joined: Tuesday, 31st May 2016, 23:17

Post Tuesday, 31st May 2016, 23:38

Re: Damage and AC

Oh, well that's an important piece of information I missed, dang. Anyone know about monster damage as well, would Gastronok just roll a d40, for instance?

Ziggurat Zagger

Posts: 6454

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

Post Wednesday, 1st June 2016, 00:02

Re: Damage and AC

Ahappydouche wrote:Oh, well that's an important piece of information I missed, dang. Anyone know about monster damage as well, would Gastronok just roll a d40, for instance?

In most cases, it's just a direct roll of the monster's damage (for melee attacks anyway) There are cases where the monster rolls more than one time, but it's not the common case.
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!

Slime Squisher

Posts: 395

Joined: Monday, 28th April 2014, 19:50

Post Wednesday, 1st June 2016, 03:31

Re: Damage and AC

Ahappydouche wrote:Oh, well that's an important piece of information I missed, dang. Anyone know about monster damage as well, would Gastronok just roll a d40, for instance?


Generally yeah. Monsters with weapons add their damage stat to the weapons, so an Orc Warlord with a dagger will still hit for 36 damage, not just 4.

Also, gastronok can hit for up to 70ish damage by casting Airstrike, so if the 35 from a melee hit scares you you probably shouldn't be anywhere near him.

Vestibule Violator

Posts: 1601

Joined: Sunday, 14th July 2013, 16:36

Post Wednesday, 1st June 2016, 06:43

Re: Damage and AC

Player airstrike is a monstrosity that usually rolls low damage and only very rarely rolls high. Is Gastronok's the same?

Halls Hopper

Posts: 89

Joined: Friday, 8th January 2016, 15:50

Post Wednesday, 1st June 2016, 08:23

Re: Damage and AC

Ahappydouche wrote:Oh, well that's an important piece of information I missed, dang. Anyone know about monster damage as well, would Gastronok just roll a d40, for instance?


Additionally Armour have a guaranteed damage reduction that will increase the minimum value the range of your AC roll.

If you have a GDR of 50% and AC20, your AC roll is a value between 10 and 20 instead of 0 and 20 (if you had 0% GDR)

http://crawl.chaosforge.org/index.php?t ... _reduction

But this is more geared towards Heavy armour wearer, as a caster you were probably wearing a lighter armour anyway.

Slime Squisher

Posts: 332

Joined: Wednesday, 19th December 2012, 13:23

Post Wednesday, 1st June 2016, 14:15

Re: Damage and AC

genericpseudonym wrote:Also, gastronok can hit for up to 70ish damage by casting Airstrike, so if the 35 from a melee hit scares you you probably shouldn't be anywhere near him.

His max Airstrike damage is "just" 50 and while he pretty much never rolls that high (and he has four less lethal spells in his arsenal), the entire possibility of that should force you to avoid or kite him.
Offline greaterplayer (who cares). I don't always play online, but when i do, i streak felids.
Zot:5 on easy mode video
Double Skullcrusher

Ziggurat Zagger

Posts: 4432

Joined: Friday, 8th May 2015, 17:51

Post Wednesday, 1st June 2016, 15:51

Re: Damage and AC

seren wrote:If you have a GDR of 50% and AC20, your AC roll is a value between 10 and 20 instead of 0 and 20 (if you had 0% GDR)

http://crawl.chaosforge.org/index.php?t ... _reduction


This is wrong. If you are attacked by unarmed goblin with max damage 4, your AC roll is guaranteed to get at least 1, even if you are Gr in CPA. So you can still get 3 damage from that goblin.

That wiki page is confusing, it provides 2 examples when monster has max damage higher than your AC but no examples when lower.

https://github.com/crawl/crawl/blob/mas ... or.cc#L399
Underestimated: cleaving, Deep Elf, Formicid, Vehumet, EV
Overestimated: AC, GDS
Twin account of Sandman25

For this message the author VeryAngryFelid has received thanks: 2
Sar, seren

Ziggurat Zagger

Posts: 6454

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

Post Wednesday, 1st June 2016, 16:25

Re: Damage and AC

VeryAngryFelid wrote:
seren wrote:If you have a GDR of 50% and AC20, your AC roll is a value between 10 and 20 instead of 0 and 20 (if you had 0% GDR)

http://crawl.chaosforge.org/index.php?t ... _reduction


This is wrong. If you are attacked by unarmed goblin with max damage 4, your AC roll is guaranteed to get at least 1, even if you are Gr in CPA. So you can still get 3 damage from that goblin.

That wiki page is confusing, it provides 2 examples when monster has max damage higher than your AC but no examples when lower.

https://github.com/crawl/crawl/blob/mas ... or.cc#L399

Yeah there is a reason i didn't mention gdr, it is confusing, weird and should almost never factor into your decisions, throwing it at someone who is new to the game is more likely to lead to bad game play than to be of any help.

If you want a short correct short explanation anyway:

Spoiler: show
Gdr is the minimum percentage of the creature's max damage that armor will reduce an attack by, up to half your ac.

Note that gdr doesn't effect the distibution of the ac roll, you still roll the full range of ac, you just substitute the lower rolls for the guarantee.

So if you have 20% gdr, and a critter does 20 points of damage max, you are guaranteed 4 points of protection as long as your ac is above 8, otherwise, it is half your ac if its below 8. If you had say 15 ac, you would roll between 0 and 15, and if you rolled less than 4 you would use 4 instead of your roll for damage reduction.
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: 4
genericpseudonym, nago, seren, TwoLeggedMammal

Halls Hopper

Posts: 76

Joined: Tuesday, 16th September 2014, 15:52

Post Wednesday, 1st June 2016, 19:58

Re: Damage and AC

Ah, I didn't know that it was based on monster damage. That means GDR is still pretty valuable even as a lowish AC character.

Ziggurat Zagger

Posts: 6454

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

Post Wednesday, 1st June 2016, 20:06

Re: Damage and AC

TwoLeggedMammal wrote:Ah, I didn't know that it was based on monster damage. That means GDR is still pretty valuable even as a lowish AC character.

Sort of, it maxes out at half your ac, so no matter how good your gdr, low ac chars aren't going to get a lot from it, it is also important to note the a lot of "non regular" attacks simply bypass it entirely, which is another reason that relying on it isn't a very good idea.
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!
User avatar

Dungeon Master

Posts: 431

Joined: Tuesday, 13th September 2011, 17:34

Post Wednesday, 1st June 2016, 20:14

Re: Damage and AC

Siegurt wrote:
TwoLeggedMammal wrote:Ah, I didn't know that it was based on monster damage. That means GDR is still pretty valuable even as a lowish AC character.
a lot of "non regular" attacks simply bypass it entirely

Note that "a lot of non-regular attacks" here means "literally every single source of damage that isn't a basic melee strike."

For this message the author ontoclasm has received thanks: 6
duvessa, genericpseudonym, nago, Sar, tedric, ydeve

Lair Larrikin

Posts: 18

Joined: Tuesday, 31st May 2016, 23:17

Post Thursday, 2nd June 2016, 04:17

Re: Damage and AC

Glad I asked, I never knew about GDR, good thread, good thread.
User avatar

Ziggurat Zagger

Posts: 4478

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

Post Thursday, 2nd June 2016, 07:20

Re: Damage and AC

Ahappydouche wrote:Glad I asked, I never knew about GDR, good thread, good thread.

And now that you know abot GDR, you can go ahead and forget it :)
DCSS: 97:...MfCj}SpNeBaEEGrFE{HaAKTrCK}DsFESpHu{FoArNaBe}
FeEE{HOIEMiAE}GrGlHuWrGnWrNaAKBaFi{MiDeMfDe}{DrAKTrAMGhEnGnWz}
{PaBeDjFi}OgAKPaCAGnCjOgCKMfAEAtCKSpCjDEEE{HOSu
Bloat: 17: RaRoPrPh{GuStGnCa}{ArEtZoNb}KiPaAnDrBXDBQOApDaMeAGBiOCNKAsFnFlUs{RoBoNeWi

For this message the author Sprucery has received thanks:
Sar

Halls Hopper

Posts: 89

Joined: Friday, 8th January 2016, 15:50

Post Thursday, 2nd June 2016, 07:40

Re: Damage and AC

VeryAngryFelid wrote:That wiki page is confusing, it provides 2 examples when monster has max damage higher than your AC but no examples when lower.

https://github.com/crawl/crawl/blob/mas ... or.cc#L399


Thanks for pointing out the actual source code.

Effectively , gdr is always multiplied to max_damage, and not your AC.

I also wonder why there are different case like AC_PROPORTIONAL, AC_DOUBLED and so on..

I'll try to clarify the wiki.
User avatar

Slime Squisher

Posts: 354

Joined: Thursday, 14th April 2011, 17:28

Post Thursday, 2nd June 2016, 07:47

Re: Damage and AC

ontoclasm wrote:
Siegurt wrote:
TwoLeggedMammal wrote:Ah, I didn't know that it was based on monster damage. That means GDR is still pretty valuable even as a lowish AC character.
a lot of "non regular" attacks simply bypass it entirely

Note that "a lot of non-regular attacks" here means "literally every single source of damage that isn't a basic melee strike."


So.... what about standardizing what is and isn't reduced by armor?
All physical attacks (Melee, Ranged, Reaching) are affected by AC.
All magical attacks (Spells, Wands, Rods) are affected by MR
All types of attacks (the above) can be dodged via EV

Something like that. It's extremely unintuitive what is and isn't affected by a players different mitigaters.
infinitevox on akrasiac & berotato
Busy dying horrible deaths from chugging too many pots of Mutation.

Cocytus Succeeder

Posts: 2173

Joined: Saturday, 2nd February 2013, 09:52

Post Thursday, 2nd June 2016, 09:19

Re: Damage and AC

infinitevox wrote:So.... what about standardizing what is and isn't reduced by armor?
All physical attacks (Melee, Ranged, Reaching) are affected by AC.
All magical attacks (Spells, Wands, Rods) are affected by MR
All types of attacks (the above) can be dodged via EV

Something like that. It's extremely unintuitive what is and isn't affected by a players different mitigaters.

I think you misunderstand: Ontoclasm was talking about GDR, not about AC.

Also, you want firestorm to be resisted by EV? And also by MR? How is that making any sense?
User avatar

Slime Squisher

Posts: 354

Joined: Thursday, 14th April 2011, 17:28

Post Thursday, 2nd June 2016, 12:01

Re: Damage and AC

Well, the fire rains down from the sky.
So you dance around and try not to get hit, but when you do, your magic resistance allows you to shrug off some of the damage.
It makes perfect sense.
infinitevox on akrasiac & berotato
Busy dying horrible deaths from chugging too many pots of Mutation.

Tomb Titivator

Posts: 885

Joined: Sunday, 28th June 2015, 14:44

Post Thursday, 2nd June 2016, 16:50

Re: Damage and AC

MR is hex armor, not general magic armor

Ziggurat Zagger

Posts: 4432

Joined: Friday, 8th May 2015, 17:51

Post Thursday, 2nd June 2016, 17:04

Re: Damage and AC

seren wrote:I also wonder why there are different case like AC_PROPORTIONAL, AC_DOUBLED and so on..


AC_NONE is used by attacks that ignore AC like Freeze.
AC_HALF is used by attacks that half AC like Lightning Bolt.
AC_TRIPLE is used by attacks which check AC three times like Sandblast.
AC_PROPORTIONAL is new to me, I have just checked source code and found that it is used by Tornado, Summon forest and rod of lightining.

Edit. For proportional.

  Code:
// Reduce damage by AC.
// In most cases, we want AC to mostly stop weak attacks completely but affect
// strong ones less, but the regular formula is too hard to apply well to cases
// when damage is spread into many small chunks.
//
// Every point of damage is processed independently. Every point of AC has
// an independent 1/81 chance of blocking that damage.
//
// AC 20 stops 22% of damage, AC 40 -- 39%, AC 80 -- 63%.
int apply_chunked_AC(int dam, int ac)
{
    double chance = pow(80.0/81, ac);
    uint64_t cr = chance * (((uint64_t)1) << 32);

    int hurt = 0;
    for (int i = 0; i < dam; i++)
        if (get_uint32() < cr)
            hurt++;

    return hurt;
}
Underestimated: cleaving, Deep Elf, Formicid, Vehumet, EV
Overestimated: AC, GDS
Twin account of Sandman25

For this message the author VeryAngryFelid has received thanks:
Sar

Tartarus Sorceror

Posts: 1739

Joined: Tuesday, 13th March 2012, 02:48

Post Thursday, 2nd June 2016, 21:16

Re: Damage and AC

I'll bet there is a really close approximation to that which doesn't require calculating (80/81)^AC.

At the very least, it could all be precomputed and put in a lookup table, to save cpu.

EDIT:
  Code:
    double chance = 1 - ac/100;
    if (ac>40) chance+=ac/200.0 - 0.2;


(this would mean AC 160 equals immunity; I'm OK with that)
User avatar

Ziggurat Zagger

Posts: 4478

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

Post Thursday, 2nd June 2016, 22:46

Re: Damage and AC

Rast wrote:(this would mean AC 160 equals immunity; I'm OK with that)

No no it's better that AC over 159 is treated as 159 instead :)
DCSS: 97:...MfCj}SpNeBaEEGrFE{HaAKTrCK}DsFESpHu{FoArNaBe}
FeEE{HOIEMiAE}GrGlHuWrGnWrNaAKBaFi{MiDeMfDe}{DrAKTrAMGhEnGnWz}
{PaBeDjFi}OgAKPaCAGnCjOgCKMfAEAtCKSpCjDEEE{HOSu
Bloat: 17: RaRoPrPh{GuStGnCa}{ArEtZoNb}KiPaAnDrBXDBQOApDaMeAGBiOCNKAsFnFlUs{RoBoNeWi

For this message the author Sprucery has received thanks:
Sar

Return to Dungeon Crawling Advice

Who is online

Users browsing this forum: No registered users and 21 guests

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