Talk:StendhalRefactoringRP

From Arianne
Jump to navigation Jump to search

Melee Combat

Does source[ARMOR] refer to the characters DEF value?

If so is the the DEF value displayed on the left in the client which looks like 10x7 when you have only the Leather Armor equipped (the 7 would be source[ARMOR] then) or is it the actual DEF displayed when you look at the single pieces of the Equipemnt (the DEF 3 of the Leather Armor would be source[ARMOR] then)? Or does it not refer to the character at all?

Because if source[ARMOR] refers to the characters DEF value (one of them no matter which) the damage is smaller the better the equipment (Armor, Helmet, Legs, Boots, Shield, Cloak) the character wears is. Since source[ARMOR] is part of max_defense the higher source[Armor] is the higher is max_defence and max_defence is part of damage.

According to the formula max_defence gets subtracted from max_attack and also divides (8 * max_attack * random[0..1] - max_defense * random[0..1]). So it decreases the damage.

damage = (8 * max_attack * random[0..1] - max_defence * random[0..1]) / max_defence);

If I interpreted this correctly the source[Armor] changes the max_defence value of the attacked target. This makes me wonder why, because I don't see any connection between the defensive equipment the character wears and the max_defence value of the target. The better the character's equipment (Armor, Helmet, Legs, Boots, Shield, Cloak) is the higher is the target's defence? I believe it should be target[ARMOR] instead but as mentioned in the article there doesn't seem to be a target[ARMOR] value for creatures. Another option is to simply leave the source[ARMOR] out of the max_defence formula and replace it with a static value so that only the target[DEF] value and the target[LEVEL] value matter.

I don't know if the max_defence also refers to the DEF value of the character but that wouldn't make any sense since the character's DEF value shouldn't be changed by the target's DEF value. Just like the target's DEF value shouldn't be changed by the attacker's DEF value as it is in the formula.


Btw, the last closing bracket in the damage formula should be removed since there is no opening bracket to it.


I hope you understand what I am talking about since talking about formulas in text form can be quite confusing. Also I assume that the source[ARMOR] refers to the attacker because he is the source of the attack. I also think I repeat myself a bit but that is to explain why the formula looks strange to me. If I'm right and you agree that there is a problem with the formula I could take some time to develop a new max_defense formula which doesn't include the source [ARMOR]anymore and we could test it and if it works use it in the game.

- Suppenkasper