Combat mechanics - a study

General MajorMUD Discussion
Post Reply
PaladinePSoT
Posts: 5
Joined: Sun Jul 04, 2021 2:36 am

Combat mechanics - a study

Post by PaladinePSoT »

For a player attacking a monster

Roll chance to dodge (some cap possibly) (monster dodge * .9)
If success -> dodged, end
if fail -> Roll acc vs AC
if success -> miss, end
if hit -> roll crit
if success -> roll critical damage
if fail -> roll damage
if damage <= dr -> hit glances, end
if damage > dr -> hit is damage -dr

for a monster attacking a player
Roll acc vs ac
if success -> missed, end
if fail -> roll acc vs dodge
if success -> dodged, end
if fail -> roll damage
if damage <= DR -> hit glances, end
if damage > dr -> hit is damage -dr
Last edited by PaladinePSoT on Wed Jul 07, 2021 10:43 pm, edited 1 time in total.


PaladinePSoT
Posts: 5
Joined: Sun Jul 04, 2021 2:36 am

Re: Combat mechanics - a study

Post by PaladinePSoT »

Placeholder for Accuracy discussion


PaladinePSoT
Posts: 5
Joined: Sun Jul 04, 2021 2:36 am

Re: Combat mechanics - a study

Post by PaladinePSoT »

dodge = (dodge from items, spells, abilities, etc)

if enc == light, dodge = dodge + 1
else if enc == none, dodge = dodge + 9

if agility >=50, dodge = dodge + floor((agility-50)/3)
if agility < 50, dodge = dodge + ceiling((agility-50)/3)

if charm >=50, dodge = dodge + floor((agility-50)/5)
if charm < 50, dodge = dodge + ceiling((agility-50)/5)

chance to dodge a dodgeable hit:
if acc > 7, min(95, dodge/(floor(acc/8)*10))
else 0

Player dodge <=0 will prevent dodging entirely. There is a cap at 95% of all dodgeable hits dodged. You can not dodge a monster attack with 7 or less accuracy to prevent a div/0 error in the formula. It should be noted that when a player is being attacked by a monster, the accuracy vs ac calculation will happen first, and if it is deemed a hit, you will then calculate whether or not that hit was dodged. This can create a point of diminishing returns at higher AC levels where you require significantly more +dodge to get a single percent of total attacks dodged. Total dodge needed to have a 50%/95% chance of dodging a 250 acc hit: 155/294
Last edited by PaladinePSoT on Tue Jul 20, 2021 12:44 am, edited 6 times in total.


PaladinePSoT
Posts: 5
Joined: Sun Jul 04, 2021 2:36 am

Re: Combat mechanics - a study

Post by PaladinePSoT »

Placeholder for damage discussion


Post Reply