mouseas / steamSummerMinigame

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

My version of auto purchase #48

Closed russeli closed 9 years ago

russeli commented 9 years ago

Buys the best weapon upgrade based on damage increase per dollars spent. Prioritizing between clicking and auto upgrades can be adjusted with avgClicksPerSecond parameter. Buys armor if best one(hp increase/$) can be bought and current health is below 30%. Left out elemental damage because it valued it too much, it could be fiddled with. *Also no crit damage

mouseas commented 9 years ago

I need two people one more person to independently test this for errors and functionality. (Thanks @gapple)

makaRTH commented 9 years ago

Maybe try using .25 for the oddsOfElement. This assumes that at any given time, there is a 1 in 4 chance that the enemy will be weak to that element. I don't believe this will entirely fix the problem though, as I think g_Minigame.CurrentScene().GetUpgradeCost(i) is returning a value that is far lower than the actual upgrade cost for the elemental upgrades. g_Minigame.CurrentScene().m_rgPlayerUpgrades[i].cost_for_next_level seems to be the more accurate source for the upgradeCost

You may also want to take into account click dps for elemental damage: dps = dps + (g_Minigame.CurrentScene().m_rgPlayerTechTree.damage_per_click * avgClicksPerSecond)

gapple commented 9 years ago

I resolved merge conflicts on my own branch in order to test (gapple/steamSummerMinigame:purchaser) No JS errors, and it seemed to do a good job of catching up on the minor upgrades that I had neglected manually.

Another upgrade manager (https://gist.github.com/meishuu/f83ee1de2992d5fc656c) has a check on the time it will take for the player to die based on the highest enemy DPS. This might be a good condition to skip other upgrades in order to save for and purchase the most affordable shield.

winneon commented 9 years ago

When this is ready for merge, inform me and I will fix the various merge issues due to the filename change.

gapple commented 9 years ago

The file rename made a merge or rebase fail, so I exported the commits as patches, edited them, then applied them to a new branch. My changes are at https://github.com/gapple/steamSummerMinigame/tree/purchaser

I can make a separate pull request if that will move things along better

winneon commented 9 years ago

@gapple Yes, that does help indeed. I was planning on doing that myself, but now I don't have to. When it is ready to be merged (soon?), feel free to make a PR.

winneon commented 9 years ago

This pull request has been moved to https://github.com/mouseas/steamSummerMinigame/issues/74. Closing for now. If this needs to be re-opened due to commit issues, feel free to ask.