[Search] Search   [Recent Topics] Recent   [Hottest Topics] Hottest   [Login] Login
Attack formula
Forum Index » Guides & Tips
[Avatar]
simsverd

Messages: 921,
Joined: Dec 02, 2010,
Location: Bergen, Norway
Offline

[Avatar]
simsverd

Messages: 921,
Joined: Dec 02, 2010,
Location: Bergen, Norway
Offline
First, the variables:

A = Attack strength of the attacking unit
Ta = Terrain modifier for the attacking unit
D = Defense strength of the defending unit
Td = Terrain modifer for the defending unit
B = Gang up, re-surface, veteran bonus
H = The attacking unit's health points.

Next, the formula:
p = 0.05 * (((A + Ta) - (D + Td)) + B) + 0.5
if p < 0 then p = 0
if p > 1 then p = 1

This is how to figure out the damage:
1. Pick one unit to be the attacker and the other to be the defender.
2. Use the formula above to obtain p.
3. Take H and multiply by 6. This is the number of random numbers (r) generated between 0 and 1. For every r < p a hit is counted.
4. The total number of hits divided by 6 is the number of damage the defending unit will receive.
5. Switch roles between the units (attacker becomes the defender and vice versa).
6. Use the same formula above.
7. Once both units have attacked the damage points are calculated into their health points.

I will use a quick example:
Underling vs Marauder both on Plains
If you use the formula you see that the Underling has a 30% probability of dealing damage for each of its health points whereas the Marauder has a 75% probability of dealing damage for each of its health points.

If the Underling were on a Mountain though, the numbers change to 40% for the Underling and 55% for the Marauder.

That's it!

This message was edited 1 time. Last update was at May 15, 2012 13:03


Moderator of gamechat and forum. Tourney admin.

Send me a PM here or invite me to a game if you want to ask me something, suggest a map for tourney or just wanna play a game
[Email]
[Avatar]
waxoid

Messages: 442,
Joined: Aug 07, 2010,
Location: Seattle, WA
Offline

[Avatar]
waxoid

Messages: 442,
Joined: Aug 07, 2010,
Location: Seattle, WA
Offline
Shorthand, attack probability is 50% +/- 5% times (attack - defense), where attack and defense include modifiers. So if A-D is 3 (e.g. 8 attack vs. 5 defense) then p = 50% + 5% *3 = 65%. Then, for a 10 hit point unit, you can estimate that 65% probability for each hit point corresponds to likely 6 damage (due to rounddown), 60% is more of a split between 6 damage or 5 damage, etc.

The multiply/divide by 6 just reduces variance, so you don't have wild luck in the system (marauder randomly doing 9 damage to a pinzer, say – not statistically impossible strictly speaking but still not going to happen in our lifetimes.)

If you want PM me, I have a spreadsheet the does the precise calculation for fun, and can run lots of trials to give you the odds of doing at least n damage etc.
ratkitten

Messages: 3,
Joined: Dec 10, 2011,
Offline

ratkitten

Messages: 3,
Joined: Dec 10, 2011,
Offline
waxoid, that's pretty much how I think of it too. Something to add to the "shorthand" version is that damage is directly proportional to the HP of the one doing the damage. For example if a unit has 5 HP, it will do half the damage it would have done if it had 10 HP. Here's how I like to think about it:

Default damage is 5 (when the attacker has 10 HP and the attack-defense is zero).
When attack-defense is not zero, add (or subtract) 0.5 damage for every point that it is over or under.
If the attacker doesn't have 10 HP, multiply the damage by the attacker's HP and divide by 10.


When waxoid mentioned the "rounddown", he was referring to the fact that damage always rounds down to the nearest whole number. So if you end up rolling 6.9, you will do 6 damage, not 7. There is some randomness, but the damage will rarely vary by more than +/- 1 of the expected value. (Interestingly, damage is more random the fewer HP the attacker has, because the number of rolls varies with HP. There are 60 rolls if the attacker has 10 HP, but only 6 rolls if the attacker only has 1 HP. But that's not very important.)

Also, remember that defenders are "attackers" if they are in range. Meaning, if the defender does damage, it does the same damage it would have done if it had attacked; attack/defense bonuses apply to both attackers and defenders.

This message was edited 2 times. Last update was at Feb 08, 2012 11:39

tjans

Messages: 1,
Joined: Aug 22, 2010,
Offline

tjans

Messages: 1,
Joined: Aug 22, 2010,
Offline
Any idea how to convert this formula to a dice roll? I think it'd be fun to play this on a game board when I'm camping with my brothers (in that setting I'd rather be disconnected from a device and play in person)
s3m420

Messages: 40,
Joined: Apr 22, 2012,
Offline

s3m420

Messages: 40,
Joined: Apr 22, 2012,
Offline
You would have to simplify the formula to get a playable version on a board. I doubt you would want to do all the math involved for every single attack, or at least without a "device". I was going to make some suggestions, but now that i think about it, there would be too much without a computer. Keeping track of unit health would be difficult in itself. I could see a homemade board being made, but what kind of pieces would you use?
regard87

Messages: 97,
Joined: Mar 29, 2012,
Offline

regard87

Messages: 97,
Joined: Mar 29, 2012,
Offline
Use peices made of paper(different colors cut into shapes according to a legend) and write their health on them.


As for a dice roll if you used just the "Uniwar Damage Calculator" you could use dice to decide which of the three most probable damages you got.

Creator of Powerplay, Weakside, Strongside and Gap Control.
Also OddManBreak, IceRink, Breakout2v2

Testing FlyingV, MixNmatch, GatherRoundtheWell Give them a try!
[Avatar]
TheDragon

Messages: 316,
Joined: Mar 07, 2015,
Location: New England, USA
Offline

[Avatar]
TheDragon

Messages: 316,
Joined: Mar 07, 2015,
Location: New England, USA
Offline
  tjans wrote: Any idea how to convert this formula to a dice roll? I think it'd be fun to play this on a game board when I'm camping with my brothers (in that setting I'd rather be disconnected from a device and play in person)


If you have 20 sided dice (available from most gaming stores)
Then using the simplification stated by Waxoid:
Shorthand, attack probability is 50% +/- 5% times (attack - defense), where attack and defense include modifiers. So if A-D is 3 (e.g. 8 attack vs. 5 defense) then p = 50% + 5% *3 = 65%. Then, for a 10 hit point unit, you can estimate that 65% probability for each hit point corresponds to likely 6 damage (due to rounddown), 60% is more of a split between 6 damage or 5 damage, etc.

Change that to a 10 +/- the Attack/Defense mods (his example 10 + 3 = 13. You'd need to roll 13 or less for each hit point (simplify it for camping, yes damage will be slightly more random) so if you had 10 hit points you'd roll 10 dice for 13 or less to determine the hits (then before assesing them defender is now attacker and have them roll their attack, then assign the damage.

...The game of life is too short to be taken seriously...

Teams (Members)
2v Dragon Cheese - (Cheese, TheDragon)
3v bawwy Kwipke - (Kelwynish, Rikb, TheDragon) Retired: Lost Socks the Abyss - (onedirtrider, TheDragon, Mentalist)
4v Plush Pinzers II (Cheese, SnakPak, TheDragon Copeab) Retired: Plush Pinzers - (Thomas K., copeab, TheDragon, Cheese)
mistercreepy

Messages: 207,
Joined: May 15, 2012,
Location: Hong Kong
Offline

mistercreepy

Messages: 207,
Joined: May 15, 2012,
Location: Hong Kong
Offline
I wrote a lot about how I created a draft of a board game version of the game, linked to that post below. Still thinking about how to make it better. Going to 1) purchase a hexagonal hole puncher so I can easily get the pieces out, 2) glue the unit images to something heavier like card stock, and 3) spend a lot of time researching different maps to find something ideal. I think that Mercury could be a great one as the only terrain modifier is the bases, makes things simpler. Omega would also be interesting but I just don't really like that map.



http://forum.uniwar.com/posts/list/1951.page
anonym551653

Messages: 112,
Joined: Apr 06, 2014,
Offline

anonym551653

Messages: 112,
Joined: Apr 06, 2014,
Offline
I like mister creepy's idea but instead use a system like settlers of catan (look it up to see what I mean) and create your own map each time or have a tray of cards that have a map design on them. If you have more money, legos would work perfectly for pieces and board.
Forum Index » Guides & Tips
Powered by JForum 2.1.9 © - 2020-04-14 v124 - UniWar website