I learned how to program in Java last year, and I'm thinking of making my own minor sort of RPG game, not fully final fantasy style, more like a Roguelike, at least the battles will be. So you run around and if you see an enemy you run into them and then have a real-time combat, mostly auto attack, spells and stuff will be cast outside of battle. anyway, I was wondering how I wanted to decide how much damage is dealt, so I thought I'd put this out here to see what people thought of my formula.
Basically I want:
A) Damage will never be reduced to just 1 damage. In so many games, if a character is like 1/2 the strength of another, he ends up doing 1 damage as opposed to like 50, making him 50 times weaker! AKA useless. I want weaker people and enemies to still have some impact that doesn't decrease exponentially, so a swarm of small enemies is still a threat. So something like (Attack - Enemy Defense/2) would not work.
B) defense and hp are unique. If I just take someone's attack and divide it by the opponent's defense, then your effective "Ability to absorb damage" is equal to your hp times your defense. so instead of multiplying your defense and hp both by 1.1, you could just multiply one of them by 1.21.
So i came up with the formula where when someone attacks, you take a random number from A/10 to A, so there's variation in their damage, and set that equal to F, and the enemies defense is D, so then the damage dealt will be:
F^(1/D)
Clearly here, defense would be a small value, for some enemies just 1, some would be like 1.1, or 1.2. What this does is it takes the root of F, such that larger values of F are reduced more than smaller values. So against an enemy with large D, larger hits would do less, so many many smaller hits would be more effective. If someone wants to run a list of numbers on this to get a better feel go ahead, I looked at some of them. So like D = 2 would take the square root of all damages. 1->1 4->2 9->3 and damages in between would be fractions of hitpoints (which would be acceptable) 2 would be pretty rare though, I might make some weird type of enemy with really high defense and really low hp so that it takes a bunch of small hits against him. But yeah, what do you guys think?
I learned how to program in Java last year, and I'm thinking of making my own minor sort of RPG game, not fully final fantasy style, more like a Roguelike, at least the battles will be. So you run around and if you see an enemy you run into them and then have a real-time combat, mostly auto attack, spells and stuff will be cast outside of battle. anyway, I was wondering how I wanted to decide how much damage is dealt, so I thought I'd put this out here to see what people thought of my formula.
Basically I want:
A) Damage will never be reduced to just 1 damage. In so many games, if a character is like 1/2 the strength of another, he ends up doing 1 damage as opposed to like 50, making him 50 times weaker! AKA useless. I want weaker people and enemies to still have some impact that doesn't decrease exponentially, so a swarm of small enemies is still a threat. So something like (Attack - Enemy Defense/2) would not work.
B) defense and hp are unique. If I just take someone's attack and divide it by the opponent's defense, then your effective "Ability to absorb damage" is equal to your hp times your defense. so instead of multiplying your defense and hp both by 1.1, you could just multiply one of them by 1.21.
So i came up with the formula where when someone attacks, you take a random number from A/10 to A, so there's variation in their damage, and set that equal to F, and the enemies defense is D, so then the damage dealt will be:
F^(1/D)
Clearly here, defense would be a small value, for some enemies just 1, some would be like 1.1, or 1.2. What this does is it takes the root of F, such that larger values of F are reduced more than smaller values. So against an enemy with large D, larger hits would do less, so many many smaller hits would be more effective. If someone wants to run a list of numbers on this to get a better feel go ahead, I looked at some of them. So like D = 2 would take the square root of all damages. 1->1 4->2 9->3 and damages in between would be fractions of hitpoints (which would be acceptable) 2 would be pretty rare though, I might make some weird type of enemy with really high defense and really low hp so that it takes a bunch of small hits against him. But yeah, what do you guys think?