Debriefing > Impressions & Feedback

Adjustable Health Levels

<< < (8/8)

VC:
Here's how homeboy does it in Live and Let Die:

def goldeneye_handicap(hc):
   return 2.0 ** (float(hc) / 3.0)

126% at 1, 1008% at 10.

You might choose to think that there is solid reasoning behind this exact expression, and choose to follow its example.

WNxEuphonic:
So more like this (ignore the variable being USER_HEALTH)


--- Code: ---
                        if not self.USER_HEALTH == 10 or not self.USER_HEALTH == -10:
                            player.SetDamageMultiplier(1.3 ** (-1 * self.USER_HEALTH))
                        elif self.USER_HEALTH == -10:
                            player.SetDamageMultiplier(10)
                        else:
                            player.SetDamageMultiplier(0.10)
--- End code ---

VC:
I would use my formula, but if you insist on being silly, at the least I would change the tests to stop being so damn ugly.

if self.USER_HEALTH <= -10:
  ...
elif self.USER_HEALTH >= 10:
  ...
else:
  ...

This does not assume, as your expression did, that the handicap level won't somehow escape ±10, and naturally clamps it while letting the normal range fall into its branch without that nasty (and at a casual glance, fucked-up) and partially-redundant test.

Entropy-Soldier:
I would use VC's formula, it's more consistent with regards to the higher values.

If you want to use the original formula, though, i would advise only allowing 1-4 and 10 to be selectable as handicap values; as opposed to the entire range of 1-10.

Navigation

[0] Message Index

[*] Previous page

Go to full version