02 Jul, 2011, triskaledia wrote in the 21st comment:
Votes: 0
Not sure where you are with this, but this is what I did to implement some sort of damage modifer with ac.
// Made it so armor class affects damage dealt by weapons.
// Still need to make it so magic is affected.
// See very simple equation, could make it more random though.
if(victim_ac >= 100)
dam += victim_ac * 2;
else if(victim_ac >= 75)
dam += victim_ac * 1.75;
else if(victim_ac >=50)
dam += victim_ac * 1.50;
else if(victim_ac >= 25)
dam += victim_ac * 1.25;
else if(victim_ac >= 10)
dam += victim_ac;
else if(victim_ac >= 0)
dam += 0;
else
dam -= (victim_ac * -1) / 10;

Not sure where you would put that in your code, but I put mine right under:
dam += GET_DAMROLL (ch) * UMIN (100, skill) / 100;
and directly above that is where I have the circle and backstab damage setup.
12 Jul, 2011, David Haley wrote in the 22nd comment:
Votes: 0
Out of curiosity, is it important to have the different buckets here?

Just asking because you could greatly simplify your code by doing something like:

float modifier = 1.0 + min(victim_ac / 100.0, 1.0);
dam += victim_ac * modifier;

This doesn't work for the negative AC case, but that one is comparatively very simple.
12 Jul, 2011, Rarva.Riendf wrote in the 23rd comment:
Votes: 0
dam += GET_DAMROLL (ch) * UMIN (100, skill) / 100;

UMIN (100, skill) / 100; <- unless you use double/float this will only give 0 or 1 Be careful with that.
12 Jul, 2011, David Haley wrote in the 24th comment:
Votes: 0
Not necessarily. The macro will be expanded, and then the math will be done. So if the damroll is a float, it'll do floating point arithmetic. It's not a function, in most implementations at least.
13 Jul, 2011, Rarva.Riendf wrote in the 25th comment:
Votes: 0
David Haley said:
Not necessarily. The macro will be expanded, and then the math will be done. So if the damroll is a float, it'll do floating point arithmetic. It's not a function, in most implementations at least.

Sure but in most ROM dam is a long or int unless modified. Just a warning as most people think it only gets converted at the end.
14 Jul, 2011, David Haley wrote in the 26th comment:
Votes: 0
Yes, correct. I was referring only to the statement about the macro. It does not "return" a value as post #23 would suggest.
15 Jul, 2011, Littlehorn wrote in the 27th comment:
Votes: 0
I like to keep things simple and use positive double-digit AC values (negatives are confusing to newer players in my experience because they think it means bad than good) and separate to_hit mechanics altogether. Therefore, my AC is all about damage mitigation. You reduce incoming damage based on the damage type (to also separate magical damage from physical damage). Then to balance it out, you have weapon flags that have a slight chance of cutting through armor and reducing armor. On top of that, you also have critical hits that also increase damage potential on targets that have maxed AC.

The reason I went this route is because it's simple for players to understand. If you X amount of AC, then you know you reduce Y amount of incoming damage. There is no need to break out a calculator and everything else just to figure out what gear to wear and how to become more tank.

I also have caps on my AC to prevent players from reducing damage to 0 damage. Those caps scale based on armor so plate yields more reduction potential than cloth. I try to stay from being as realistic as possible though. If things were based on being realistic in my game, I guess a single blow to the throat with a sharp sword would make my combat, well suck.

It's all about being easy to understand as well being accessible.
15 Jul, 2011, Rarva.Riendf wrote in the 28th comment:
Votes: 0
Quote
I also have caps on my AC to prevent players from reducing damage to 0 damage.

Dunno how you did your cap but I think that it is better to have a 'diminishing return' instead of a pure cap. It makes it a little more interesting because player has to be smarter. If cap is fixed it is well too easy for them to build cookie cutter solution.
15 Jul, 2011, Rarva.Riendf wrote in the 29th comment:
Votes: 0
Quote
Fighting magic users? Mmmmmm, lightning attacks love metal armor! And fire attacks, oh my! Nothing like boiling a fighter alive as his shiny plate mail gets heated up to 400F. Leather gets hot and also starts to melt and crack when heated. Cloth, of course, just ignites and burns away.

In a magical world, your armor could be fireproof acid proof and weight lighter than it should, all that magically. Fighters are only great when magically equipped in the first place in a magical world anyway. Realistic in a world of magic?…huhu..I woudl say 'consistent' is a better word. (first rule:never allow time travelling :p)
15 Jul, 2011, triskaledia wrote in the 30th comment:
Votes: 0
Rarva.Riendf said:
dam += GET_DAMROLL (ch) * UMIN (100, skill) / 100;

UMIN (100, skill) / 100; <- unless you use double/float this will only give 0 or 1 Be careful with that.


That is the stock ROM code that came with QuickMUD. Glad someone pointed that out, never took the time to think about it.
15 Jul, 2011, Littlehorn wrote in the 31st comment:
Votes: 0
Rarva.Riendf said:
Quote
I also have caps on my AC to prevent players from reducing damage to 0 damage.

Dunno how you did your cap but I think that it is better to have a 'diminishing return' instead of a pure cap. It makes it a little more interesting because player has to be smarter. If cap is fixed it is well too easy for them to build cookie cutter solution.


If you're referring to reducing the amount of AC over a certain point, then it wouldn't matter. You will still have a hidden cap there established by players as the max amount of AC you should go with your build. For example, if AC calculations changed from 1 AC from items means 1 AC to your character until you have 50 AC on your character. Then it takes 2 AC from items to make 1 AC on your character until 55 AC on your character and then 3 AC from items to make 1 AC on your character over 55 AC etc. That just means instead of having a hard cap of say 60 AC, players will get the max amount of AC on their character with the diminishing return that they feel is safe/worth it.

It's not a problem for everyone to wear enough AC to hit the cap. If they go that route, the sacrifice damage for tank. Max damage will always counter max AC to put both fighters on a leveled playfield when comparing EQ builds. From there, you have other tricks to pull from in order to push the fight more or away in your favor.
15 Jul, 2011, Rarva.Riendf wrote in the 32nd comment:
Votes: 0
Err no I mean something simpler: a % of dam reduction compared to AC.
1200 ac -> 10 % reduction (with a cap of xx damage reduction)
2500 ac -> 25 % reduction (with a cap of yy damage reduction)
5000 ac -> 30% reduction (with a cap of zz damage reduction)

With some linear interpolation between (that is just an example out of my head)

Of course those numbers all depends on your average AC. The point is there is no cap, so it is harder to get the sweet spot where you should drop 1point of ac for one point of hitroll or damage. If you have an absolute cap you already know that past xxx there is no point in increasing the value at all.
But somebody who still want to be a tank and only that, still has a point in increasing its AC.
20.0/32