Announcement

Collapse
No announcement yet.

combat: do the math!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by freshman
    On to the real calculation...
    Each unit gets a randomly generated number from 0 to its modified value minus one, multiplied by a constant. This constant has been best-guessed (based on play testing) to be 8. The unit with the higher random number wins the combat, ties going to the defender.
    This is probably a wording issue (since your chart looks correct), but each unit gets a randomly generated whole number from 0 to ((its modified value multiplied by a constant) minus one). Make sure your program makes a unit's randomly generated number always be a whole number. (The Civ2 programmers abhorred real numbers.) Otherwise ties will be very rare and the defender advantage won't be shown.

    Tell me if I'm reading your chart correctly. Does it say that an attacker with a modified attack value of 1 attacking a defender with a modified defense value of 1 has a 29.0% chance of winning? If so, it looks to be right on track. Looking at your chart lets me see (what I already should have known) that a rivered forest makes for better defense than a hill. If you'd like to make your chart even longer, it doesn't look like it includes the settler-made fortress factor (x2 or +100%).

    Comment

    Working...
    X