Board |
Mechanics.old [context] |
Sender |
Bobble |
Date |
Sat Jun 6 22:25:20 2015 |
To |
harmoni,all |
Subject |
Damage reduction by saves |
|
I've been asked what the new formula is that reduces damage from "normal" hits
based on saving throws (replacing the "save for half damage"). Well, here it
is (in the form of code):
bool physical = first_dam_type == DAM_BASH
|| first_dam_type == DAM_SLASH
|| first_dam_type == DAM_PIERCE;
int saves = -get_save(victim, physical);
int pow = 2 * (10 + ch->level) + get_hitroll(ch);
dam -= dam * saves / (saves + pow) / 2;
So the reduction will lie somewhere between 0 and 50%, dependeing on attacker's
hitroll and level and defender's saves.
|