Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2007-05-28 21:05:46

rpgnerd
Guest

Nerdy Request

I hope it's ok to ask this here.

I'm working on an role playing game and I need help with a combat formula.

What formula would make all 3 of these statements true?

1) If attacker has Weapon Skill of 100 (maximum) and defender has Parry skill of 0 (minimum), then attacker has 100% chance of hitting defender.

2) If attacker has Weapon Skill of 0 (minimum) and defender has Parry skill of 100 (maximum), then attacker has 0% chance of hitting defender.

3) If Weapon Skill = Parry Skill, whether both 0 or both 100 (or anything in between) attacker has 50% chance of hitting defender.

dunno

So basically I need to be able to figure out the chance to hit for 0-100 vs 0-100
eg. attacker has a Weapon skill of 73 and the defender Parry skill of 29

#2 2007-05-28 23:33:14

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: Nerdy Request

I think I've got an answer.

If the attacker's weapon skill is W, and the defender's parry skill is P, then the % chance of a hit can be given by:

Using that, in your example the chance of a hit would be (100+73-29)/2 = 72%.


Why did the vector cross the road?
It wanted to be normal.

Offline

#3 2007-05-29 01:13:03

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Nerdy Request

And if the attacker has a Weapon skill of 90 and the defender Parry skill of 80, then the chance of a hit is 55%. Sounds fair.


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#4 2007-05-29 13:17:00

rpgnerd
Guest

Re: Nerdy Request

perfect! thanks guys smile

Board footer

Powered by FluxBB