Dentosal / python-sc2

A StarCraft II bot api client library for Python 3
MIT License
586 stars 182 forks source link

Is there a way to calculate the bonus DPS based upon a unit-enemy combination #197

Closed ericbroda closed 5 years ago

ericbroda commented 5 years ago

Prior to entering a battle, it is useful to determine if your units have a chance of winning. There are many factors that influence this, including the potential "bonus" DPS (some units have a bonus DPS depending on the enemy's unit type - for example, a Colossus has +5 bonus DPS against "light" units).

Is there a way to determine the bonus DPS based upon a unit-enemy combination:

function would act something like the following (perhaps in "unit.py")

def bonus_ground_dps(enemy):...
def bonus_air_dps(enemy):...

Usage may be something like the following:

current_ground_dps = unit.ground_dps
total_ground_dps = current_ground_dps + unit.bonus_ground_dps(enemy)
tweakimp commented 5 years ago

yeah, i found it in the proto i will try to put it in :)