Does not take into account the resistance from the equipment (e.g. from the stone leather amulet)
game.cpp:
game.cpp:
C++:
if (attacker && target->getMonster()) {
uint32_t primaryReflect = target->getMonster()->getReflectValue(damage.primary.type);
if (primaryReflect > 0) {
damageReflected.primary.type = damage.primary.type;
damageReflected.primary.value = std::ceil((damage.primary.value) * (primaryReflect / 100.));
damageReflected.extension = true;
damageReflected.exString = "(damage reflection)";
canReflect = true;
}
}