New answers tagged rpg
Here is a suggestion: def compute_final_damage(self, raw_damage): """Apply armor to the damage""" return raw_damage * (self.armor / (100 + self.armor)) def take_damage(self, damage, attacker=None): """Takes damage from a source.""" final_damage = self.compute_final_damage(damage) self.base_health -= final_damage ...
You are constructing a function from several inputs to meet a desired output. This function should factor the amount of each attribute in conjunction with the importance. Your use of value pairs for such a function also coheres excellently with a documented decision model. I believe that a weighted sum is in order. The weighted sum model takes in each ...
What I usually do is just add more defense and more damage to the enemy as the difficulty increase. Since I'm no mathemagician, I just pick how much the rating it'll increase by difficulty. For example, Add 1000 to defense and 500 to damage each time they increase the difficulty. Sorta how they used to do it on classic games. But, that's just me lol
This may not be ideal, but I've found an answer on another Q/A-site. Multiply all AttackerValues (lets call it AttackRating) Multiply DefenderValues [Without DefenseFitness, see top] (lets call it DefenseRating) Divide AttackRating with DefenseRating (lets call it Rating) Divide Rating with DefenseFitness (lets call it RawDifficulty) Raw Difficulty is a ...
Top 50 recent answers are included