mouseas / steamSummerMinigame

Steam Summer Sale 2015 - Auto-play Optimizer
MIT License
136 stars 189 forks source link

Use treasure on bosses when triggering metal detector #90

Closed gapple closed 9 years ago

gapple commented 9 years ago

If the boss is below 30% health, attempt to trigger Treasure in addition to Metal Detector.

Since treasure has a short cooldown (5s), it may trigger it multiple times on the same boss.

I also attempted to estimate the time till the boss will be defeated, to do a better triggering condition for bosses that may take longer than the 20 second effect time, but just calculating health / dps was usually not very correct.

JCKE commented 9 years ago

The problem with bosses is that the number steadily rise as more players switch to the lane

JCKE commented 9 years ago

Perhaps if you checked the dps in each lane combined (minus what the abilities contribute), then assume something like ~75-80% of that will be coming to the boss lane?

gapple commented 9 years ago

The boss's health meter was stalling frequently, so I don't know if network or server load were affecting it, or maybe it's just that the DPS really isn't high enough to kill bosses quickly without items, but I was getting extremely large numbers even when the boss levels were completed within a minute, and after plenty of time for people to switch lanes.

From some recent logs of boss levels:

g_Minigame.m_CurrentScene.m_rgLaneData[ g_Minigame.m_CurrentScene.m_rgPlayerData.current_lane ].friendly_dps / g_Minigame.m_CurrentScene.GetEnemy(g_Minigame.m_CurrentScene.m_rgPlayerData.current_lane, g_Minigame.m_CurrentScene.m_rgPlayerData.target).m_flDisplayedHP
Run 1 Run 2 (1:23) Run 3 (0:33)
2.80 1.29 214939
6.33 176514 198838
5.49 176513 208256
10.30 199698 298684
0.83 150598 99427
433744 203636
0.37