So, I feel like a bit of a dummy not being able to figure this out. At work I've been goofing off with a mobile game called AstroNest, and its fun but their community is non-existent so I can't expect help from them.
Anyway, I'm trying to evaluate the different ships in the game and I cannot figure out the (should be simple) formula to adjust actual HP to account for "evasion" and "resistance" to give effective hp. Every formula I try I get way too high or negative.
So lets say a ship with evade of 60% and resist vs damage A of -40 (all this damage increased by 40%) and damage type b resist of 40% (this damage reduced by 40%). If we assume 1000 attacks dealing 1 damage each, then:
type A: 400 hits dealing 400 damage increased by 40% to 560
type B: 400 hits dealing 400 damage reduced by 40% to 240
What I can't figure out is how to reverse this and determine how much damage of type A vs Type B is required to kill a ship of a specific amount of hull. So for example destroyers have 955 hp each, and I can't figure how how to tell how to make a formula to tell the difference, and it's frustrating because I know it shouldn't be hard.
*hangs head in shame*
note: technically evasion is "chance for one attack to deal zero damage" and attacks are more than 1 damage base damage, but given one volley of attacks can be multiple tens of thousands of attacks, i figure simplifying evasion to attacks of 1 hp damage each is close enough for my purposes.
0
Comments
Resistance Multiplier = 1 - (Resistance / 100).
Ex: A 40 % damage reduction equals a resistance multiplier of 0.6.
A -40 % damage would equal a 1.4.
Effective Damage = Base Damage x Resistance Multiplier
If the resistances are basically applied sequentially, then you would multiply the resistance multipliers, too.
Effective Damage = Base Damage * Resistance Multiplier A * Resistance Multiplier B * ...
If Effective Damage is supposed to be equal to the "normal" hit points of the ship:
Ship Hit Points = Base Damage x Resistance Multiplier
Base Damage = Ship Hit Points / Resistance Multiplier = Effective Hit Points
This Base Damage is now the effective amount of hit points the ship has against attacks.
So for your 955 hit points destroyer with a resistance of 40 %:
Effective Hit Points = Ship Hit Points / Resistance Multiplier = 955 / 0.6 =~ 1.583
(You can also get an idea why most games work with diminishing returns for damage resistance - the closer you get to 100, the more effect each point of resistance has. Moving from 10 to 20 % resistance does little, but moving from 90 to 100 % makes a ship invulerable)
And if you now want to know the difference it makes between two different types of resistance, its simply subtracting the effective hit points from the two ships.
(Ship Hit Points / Resistance Multipler From Type A) - (Ship Hit Points / Resistance Multiplier from Type .
They don't stack resistances, each ship gets one weapon and the weapon is cannon,beam,fighter, or missile. Destroyers are weak vs missiles but strong vs cannons. Instead of diminishing returns they just use caps (no more than 95% evade and 95% resist).
My full goal is messy so I was trying to keep it simple. There are three options of tanking ships for fleets, I'm looking to determine hit points per point of leadership (determines how many per stack)
So the full info is:
Destroyer 955 hp, 50 evade all, -40 resist missiles, +40 resist cannons,1 leadership cost
Cruiser 5583 hp, 31 evade all, +5 evade beams, 21 resist all, 5 leadership
Mothership 55313hp, -10 evade all, +40 evade beams, +40 resist missiles, -40 resist cannons 40 leadership
So, if I have a stack of 40 destroyers its a total of 38,200 hp using 40 leadership
An equal stack of 8 cruisers has 44,664 hp
And one mothership by itself has 44,664 hp
Right here the cruiser and mothership look even and the destroyer looks gimpy. But if half of all incoming shots miss the destroyer it has at least 76,000 effective up in this stack. And 31% miss the cruiser so that's what, 58,000-ish?
This is where I start to get lost. I can see the mothership is actually the worst in every case except a missile armed enemy, but I can't figure out is the cruiser's resistance is enough to make them out perform destroyers as a tank always or just sometimes (like if destroyers are only worse vs missiles I'd run a destroyer tank, but if destroyers are only better vs cannons I'll run cruiser's).
Not sure if that helped or made it more confusing.
It depends ultimately how evade and resist stack, but if it works like this: First you evade, and then you calculate the remaining damage, applying resistance where applicable, then their combined effect is basically a (fractional) multiplier on damage.
Using my formula from before,but let's rename "Resistance Multiplier to something more generic, like "Damage Multiplier".
Effective Hit Points = Ship Hit Points / Damage Multiplier
The Damage Multiplier for the Destroyer would be derived from 0.5 (from Evade) and either 0.6 (from Resistance vs Cannons) or 1.4 (from the negative missile resistance).
Damage Multiplier vs Missiles: 0.5 * 1.4 = 0.7 => Even missiles won't have the full impact, despite the penalty.
Damage Multiplier vs Cannons: 0.5 * 0.6 = 0.3 => Only 1/3 of effective damage from cannons.
That gives us effective hit points:
vs Missiles: 955 / 0.84 ~= 1.136
vs Cannons: *9.8 ~= 2.850
The Cruiser and Mothership are a bit more complicated, since here you also need to consider how evade all and evade beams stack. Also multiplicatively? Or is it additive? Or does only the higher of both apply.
It's not possible to create an effective hit point account generically, unless you know the enemy weapon composition.