# Fighting system in RPG type game

This topic is 4704 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

My current hit calculation is pretty simple, hit power is calculated in this way hitpower = random(weapon_min_hit_power + Char_STRENGTH, weapon_max_hit_power + Char_LUCK) Maximum allowed Luck & Strength is 10. And health is reduced like this: Health -= hitpower-random(Char_DEX + ARMOR ,hitpower) Any better solutions?

##### Share on other sites
Your formulas correspond to the following health decrease expectation:

1/4 WEPatk + 1/4 STRatk + 1/4 LUKatk - 1/2 DEXdef - 1/2 ARMdef

(with WEP being the average hit power of a weapon).

Assuming that STR and DEX are intended to have equal ranges, then defending is twice as easy as attacking (because the impact of DEX is twice as large as that of STR). Similarly, ARM is twice as important as WEP, so the armor values will tend
to cost twice as much as weapons.

To determine whether this is adapted to the rest of the game, I'd also need formulas for health increase, and how the player can choose to increase his different stats (health, STR, DEX, LUK)...

##### Share on other sites
Health is increased by using Herbs or medkits. Their price is unknown by this time. Formula is as simple as Health += medkit_points.

So, the problem lies int this line:
Health -= hitpower-random(Char_DEX + ARMOR ,hitpower)

i want to keep MAX random value to hitpower because i want that there is chance that no damage is caused. Any good solution for MIN value then?

##### Share on other sites
Divide the minimum value by 2.

##### Share on other sites
I thought that too, ok thanks in advance!

1. 1
Rutin
42
2. 2
3. 3
4. 4
5. 5

• 9
• 27
• 20
• 14
• 14
• ### Forum Statistics

• Total Topics
633388
• Total Posts
3011620
• ### Who's Online (See full list)

There are no registered users currently online

×