forest0xia / dota2bot-OpenHyperAI

A beta Dota2 Bot Script aims to provide better bot game experience
https://steamcommunity.com/sharedfiles/filedetails/?id=3246316298
MIT License
55 stars 11 forks source link

Remove quelling blade from sell list #31

Closed angpoginiko closed 1 month ago

angpoginiko commented 1 month ago

Makes PA not able to buy BF.

match code for reference: 7978520552

forest0xia commented 1 month ago
  1. This isn't the root cause. Why would pa buy a bkb before buying a bf?

  2. This fix will cause issues. You need to pair the items for selling. Items the selling list is paired with another item: when gets the first item -> sells the second item

forest0xia commented 1 month ago

Let me know if the above comment makes sense to you. I think without this code fix the PA should still be able to compete the BF. You can try to play a few more games and pick a PA for bots.

I'm going to close this issue in a few days since this won't fix any issue but can cause more issues.

angpoginiko commented 1 month ago

I just did this as a workaround, whenever they sell the quelling they wont be able to complete the BF. I'm not sure whats the correct fix.

angpoginiko commented 1 month ago

This workaround worked too, because I tried having PA in my next game and it was able to buy BF normally.

forest0xia commented 1 month ago

This workaround worked too, because I tried having PA in my next game and it was able to buy BF normally.

my point is bots can complete BF even without your fix. we need to know what is the actual root casue first before being able to fix it. And it seems we both dont know what the actual issue is here

forest0xia commented 1 month ago

it was because of

"item_power_treads",
"item_quelling_blade",

such that PA sells qb onces she gets pt I've fixed it in commit: https://github.com/forest0xia/dota2bot-OpenHyperAI/commit/e5a7891c5a1db49d416a366026cd3f4446eecc35

forest0xia commented 1 month ago

Thanks for reposting this issue

forest0xia commented 1 month ago

a reminder, don't change the code the way you did, even if you saw some issues got fixed, you introduced issues such that other heroes may not be able to sell items properly and potentially other issues .

forest0xia commented 1 month ago

But dont get me wrong. I like to see more changes from you, just not the same buggy code without understanding the larger picture. Hope what I said can be heard

angpoginiko commented 1 month ago

Oh no problem. Was just experimenting base on what I understand on the code. Thanks for fixing it,