[Search] Search   [Recent Topics] Recent   [Hottest Topics] Hottest   [Login] Login
Attack strength vs. Defense strength
Forum Index » General Discussion
Guidan01

Messages: 2,
Joined: Sep 02, 2012,
Offline

Guidan01

Messages: 2,
Joined: Sep 02, 2012,
Offline
How does attack vs. defense work? Obviously you don't simply subtract a units defensive strength from the strength of the attacking unit. A helicopters attack against aerial units is 9, while a Garudas defensive strength is 8. That would leave 1 damage which we all know is completely wrong. I've been trying to puzzle this out on my own for awhile now but i'm not getting it. Maybe some tremendous overachiever could post a nice chart or something?
[Avatar]
droidfreak36

Messages: 183,
Joined: Jan 23, 2012,
Offline

[Avatar]
droidfreak36

Messages: 183,
Joined: Jan 23, 2012,
Offline
A quick approximation of the damage dealt is [[Attacker HP (10 if full) + attack strength - defense strength] / 2] rounded down.

So assuming full attacker HP and no terrain or gangup effects, the expected damage values go as follows:

Attack-Defense _ _ _ _ Damage
_ _ _ -9 _ _ _ _ _ _ _ _ _ 0
_ _ _ -8 _ _ _ _ _ _ _ _ _ 1
_ _ _ -7 _ _ _ _ _ _ _ _ _ 1
_ _ _ -6 _ _ _ _ _ _ _ _ _ 2
_ _ _ -5 _ _ _ _ _ _ _ _ _ 2
_ _ _ -4 _ _ _ _ _ _ _ _ _ 3
_ _ _ -3 _ _ _ _ _ _ _ _ _ 3
_ _ _ -2 _ _ _ _ _ _ _ _ _ 4
_ _ _ -1 _ _ _ _ _ _ _ _ _ 4
_ _ _ 0 _ _ _ _ _ _ _ _ _ 5
_ _ _ 1 _ _ _ _ _ _ _ _ _ 5
_ _ _ 2 _ _ _ _ _ _ _ _ _ 6
_ _ _ 3 _ _ _ _ _ _ _ _ _ 6
_ _ _ 4 _ _ _ _ _ _ _ _ _ 7
_ _ _ 5 _ _ _ _ _ _ _ _ _ 7
_ _ _ 6 _ _ _ _ _ _ _ _ _ 8
_ _ _ 7 _ _ _ _ _ _ _ _ _ 8
_ _ _ 8 _ _ _ _ _ _ _ _ _ 9
_ _ _ 9 _ _ _ _ _ _ _ _ _ 9
_ _ _ 10 _ _ _ _ _ _ _ _ 10

This is not always true, however, as the true formula includes terrain, gangup and randomness factors. For the true damage formula, see this quote:

simsverd wrote: 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 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.


Translated into terms of my equation this is FLOOR(round down)[[Attacker HP + Attack - Defense + Attacker terrain - Defender terrain + Gangup bonus (see thread "Gangup bonus" for more details on that, including ranged gangup)] / 2] = Expected damage. Actual damage may still vary due to the randomness factor, but it's *usually* close to my expected value.

DroidFreak, the roboticist who plays as Khrals.

(Or Titans now that I realize how legit they are)
[WWW]
cytivrat

Messages: 67,
Joined: Jun 05, 2012,
Offline

cytivrat

Messages: 67,
Joined: Jun 05, 2012,
Offline
And if you have android (or android emulator on PC), then you can use this Uniwar Damage Calculator https://play.google.com/store/apps/details?id=cytivrat.uniwar.damage.calc to see probability of different damage based on the formula mentioned above
[Avatar]
StarryBlink

Messages: 184,
Joined: Jan 04, 2012,
Offline

[Avatar]
StarryBlink

Messages: 184,
Joined: Jan 04, 2012,
Offline
I usaully use the simplify formula from Waxoid :

If attacker has 1hp left, a "chance" that it can deliver 1hp damage to the target =

50 % + [ (all positive stat - all negative stat) x 5 ] % .

Positive stats are : attack strength, attacker's terrain bounus, gang-up bonus.

Negative stat are : defense strength, defender's terrain bonus.

If attacker has 10hp, this "chance" will roll for 10 times, according to its hp.

It's not the actual equation.
But it's easy and really works, thanks to Waxoid.
Just keep in mind there's a bit luck factors.

You can see the actual equation ( very complicate @_@* ) at Simsverd's attack formula topic.
marcyblaze

Messages: 12,
Joined: Dec 15, 2016,
Location: Italy
Offline

marcyblaze

Messages: 12,
Joined: Dec 15, 2016,
Location: Italy
Offline
With the AP how is calculated the damage?
Sorry for my English
Forum Index » General Discussion
Powered by JForum 2.1.9 © - 2020-04-14 v124 - UniWar website