You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have a tool which allows you to select a unit and then get suggestions for units which counter that unit.
Probably combined with a selector for the current age to make the computation easier.
I think it would be possible to compute this dynamically from the unit stats.
Here's one potential approach:
(Countered unit: CU; Other unit: OU)
Take the HP and armor against OU of the CU: HP_CU, AR_CU.
Take the attack damage, bonus attack damage against CU and the attack speed of the OU: AD_OU, BD_OU, AS_OU.
Compute the effective attack damage of the OU against the CU: EAD_OU = max(0, AD_OU + BD_OU - AR_CU).
Compute the number of OU hits needed to kill CU: HK_OU = ceil(HP_CU / EAD_OU).
Compute the (approximate) time for OU to kill CU: HT_OU = HK_OU * AS_OU
Do the same in reverse to obtain HT_CU.
Calculate the counter ratio: CR = HT_CU / HT_OU.
This ratio is > 1 when OU counters CU (kills them faster than they are killed).
The higher the number, the stronger the counter.
Of course this can probably be improved in many ways, for example it would probably be good to factor in the resource costs of each unit.
When you consider two armies fighting, it might also make more sense to not ignore the hits and just talk about average damage per second to calculate the time to kill.
Corner cases like splash damage are also not considered in this approach.
I think this would be a very interesting and useful tool, but of course also requires a lot of work to get implemented.
Feel free to close this issue if it doesn't align with the scope of this project.
The text was updated successfully, but these errors were encountered:
For reference here's an initial working implementation cf6a00a
I am in favor of furthering this idea with more/similar statistics around unit counters and building a table of units to compare against for various user inputs.
Related to #7.
It would be nice to have a tool which allows you to select a unit and then get suggestions for units which counter that unit.
Probably combined with a selector for the current age to make the computation easier.
I think it would be possible to compute this dynamically from the unit stats.
Here's one potential approach:
(Countered unit: CU; Other unit: OU)
HP_CU
,AR_CU
.AD_OU
,BD_OU
,AS_OU
.EAD_OU = max(0, AD_OU + BD_OU - AR_CU)
.HK_OU = ceil(HP_CU / EAD_OU)
.HT_OU = HK_OU * AS_OU
HT_CU
.CR = HT_CU / HT_OU
.This ratio is > 1 when OU counters CU (kills them faster than they are killed).
The higher the number, the stronger the counter.
Of course this can probably be improved in many ways, for example it would probably be good to factor in the resource costs of each unit.
When you consider two armies fighting, it might also make more sense to not ignore the hits and just talk about average damage per second to calculate the time to kill.
Corner cases like splash damage are also not considered in this approach.
I think this would be a very interesting and useful tool, but of course also requires a lot of work to get implemented.
Feel free to close this issue if it doesn't align with the scope of this project.
The text was updated successfully, but these errors were encountered: