AlexMulkerrin / PocketCiv

Minimal Civilisation-like game. Made a pathfinder and wanting to use it in a project :)
8 stars 3 forks source link

What are combat odds? #4

Open AlexMulkerrin opened 7 years ago

AlexMulkerrin commented 7 years ago

I wrote the algorithm so I know it's always 50:50, equal chance of winning or losing. :P

It might not feel like that in-game so will add a UI element to show those odds explictly.

Perhaps there should be combat modifiers :?

spasquini commented 7 years ago

I suggest that a unit within the range of one of its cities, get a major chance to win. Let's say a 5% more. Also to be in the sight range of another unit should increase of a 5% the probability to win.

spasquini commented 7 years ago

You can also show, in the vertical sidebar, what is the probability to win that the selected unit has, before taking action.

spasquini commented 7 years ago

Another combat modifier should be taking in count if more units are standing in the same place. In PocketCiv, two or more units can stand in the same box. When attacked, they should act like a single unit with doubled chance of victory.

AlexMulkerrin commented 7 years ago

hmm thats not a bad idea :) stacks of units have always been troublesome in Civilisation games; mostly because you have to move them unit by unit. Each game in the series seems to have tried to get around this hassle in a different manner: civ4 let you combine units into armies and civ5 forced one unit per tile rules (which I wasn't a fan of...)

Now in the original civ units could stack up but they didn't receive any bonuses. In fact if an attacking unit won against a defender who was part of a stack, the whole stack was wiped out! :o This added some interesting tactical decisions where if you had a large force you wanted to keep it spread out. There were also rules for zones of control and other good stuff :) One exception to the stacks getting wiped out if attacked and defeated was cities. If there were units in a city they had to be attacked and destroyed one by one :)

I quite liked this distinction where a stack in the field was actually vulnerable and it made sense to build a city on a defensible choke point because you would be able to stack defenders :)

Currently stacks get wiped out all at once (I haven't added the city exception yet :P ) It kinda helps keep down the number of units the AI's have on the field.

Your idea of grouping units together into an army is good though, would make moving them around quicker and easier :)

spasquini commented 7 years ago

Another addition can be the experience of the unit. It's probability to win a combat should increase after a victory. You can also show the number of victories for such unit, so as to being able to see if you are facing a veteran unit or a newbie.

AlexMulkerrin commented 7 years ago

veteran status is good for creating stories and attachment to specific armies :)