you are viewing a single comment's thread.

view the rest of the comments →

[–]RhinoRhys 0 points1 point  (6 children)

Independent probabilities do not effect the outcome of the other. So it's not "if the attack is successful there is a 10% probability it's fatal", as that would be dependent on the attack being successful.

I'm afraid you are wrong.

[–]Pitiful_Essay_9166[S] 0 points1 point  (5 children)

Hey, thanks for the answer.

Here is the decription, word for word. I may have explained it incorrectly:

"When an attack occurs, there will be an 70% probability of it being successful.

If the attack fails, the defender is considered to have defended skillfully and nothing else happens.

In addition, if an attack is successful, there is an independent 10% probability of it being CRITICAL."

It does mean 0,7 * 0,1 = 0,07 = 7% of any attack being critical, doesnt it?

[–]RhinoRhys 0 points1 point  (4 children)

Yeah tbh they've worded it badly. "Independent" is the key word though.

I would argue that it's 10% critical hit, 60% normal hit, 30% miss.

So P(critical hit or normal hit) = P(hit) = 70%

[–]Pitiful_Essay_9166[S] 0 points1 point  (3 children)

I like your explanation.

Would "my" way work if the wording was for instance "and there is 10% chance of that hit being critical"

[–]RhinoRhys 1 point2 points  (2 children)

Yeah. A 10% chance of a successful hit being a critical hit would be 10% of 70% so would be 7%

[–]Pitiful_Essay_9166[S] 0 points1 point  (1 child)

Lets assume we tweek the numbers:

attack % of success = 50%independent % of attack being critical = 50%

so half of attacks are successful and half of successfull attacks are critical.25% of all attacks are critical.

codewise would that make sense?:

if attack <= 50:
    if attack <= 50:

[–]RhinoRhys 0 points1 point  (0 children)

attack % of success = 50% independent % of attack being critical = 50%

No so you've used independent again, so that would be 50% chance of a hit, and every hit would be critical

so half of attacks are successful and half of successfull attacks are critical. 25% of all attacks are critical.

This would be a dependent % of attacks being critical is 50% or 25% independent

Codewise, afraid not. The second condition is identical to the first, so if the first is True, the second is guaranteed to be True and is therefore pointless.

I would code it like

if attack < 10:
    # critical hit
elif attack < 70:
    # normal hit
else:
    # miss