Mtarnuhal / FrozenCookies

An automated Cookie Clicker tool.
27 stars 22 forks source link

autoGodzamok, autoSL & autoRigidel #45

Closed Mtarnuhal closed 3 years ago

Mtarnuhal commented 3 years ago

Fix #18 autoSL + autoRigidel bug where sugar lumps were collected to quickly autoGodzamok Sane & Insane options Restored

Mtarnuhal commented 3 years ago

The Intent of autoGodz is to trigger on Clickfrenzies or Dragonflight. Selling all of the cursors and farms. Normal mode it will keep selling them no matter what. which is not ideal. Sane mode stops selling them if devastation is active. It will sell again if Clickfrenzie or Dragonflight is still active. Insane mode will quickly sell and buy the sold amount. Which is ridiculous and should not be used.

I think Sane mode is what should be kept in the code.

I've just checked and selling the farms doesn't increase the percentages on the buff. Selling 500 cursors and 500 farms gives me a 500% buff and selling only 500 cursors also gives me a 500% buff.

As of your rewrite autoGodz looks promising I'm looking forward to a finished version. I think it's best to wait till you finished then with the rewrite of the autoGodz.

Maybe we should setup a discord to discuss certain behaviors of the game and the intended code of Frozencookies

adavidw commented 3 years ago

Yeah, I'm up for a Discord or something. In terms of intended behavior, I don't see much need for the three modes. For the moment, let's ignore my experiments in maximizing gain. If I wasn't doing that, here's how I think I would do it (to keep it as simple as possible:

And are you sure about the farms not adding to the bonus? The graphic on screen won't update, but when you call Game.buffs["Devastation"].multClick after selling some more buildings, the value is added.

Mtarnuhal commented 3 years ago

Ok i'll setup a discord for the development of this addon. ill update it on readme.md when ready.

I totally agree with you to keep it as simple as possible. annoying that it doesn't update the graphics. with Game.buffs["Devastation"].multClick I was seeing an increase when selling more buildings. 6 for 500 cursors and 11 for 500 cursors and 500 farms.

I'll make the necessary changes.

Mtarnuhal commented 3 years ago

Just to clarify further.

Should the bought buildings be sold because Devastation is active? to gain more as seen in Game.buffs["Devastation"].multClick OR Should the bought buildings not be sold because Devastation is active?

adavidw commented 3 years ago

For the duration of that one devastation buff, there should be no more further selling of buildings.

If buildings were sold (triggering a buff), then rebought, everything just sits there for the duration of the ten seconds. When that's expired, if there's still a dragon flight or click frenzy active, the cycle might repeat.

This mimics the "sane" mode of the previous implementation as far as I know just with the added bit of buying the buildings back in one bunch if auto buy is already on, rather than waiting for auto buy to buy them back one at a time (as would happen if the autogodz function didn't do the buying.

Mtarnuhal commented 3 years ago

Since you left 1 farm behind when selling the farms. buying farmMax farms in line 2200 will end up with one farm over the limit. Should probably be safeBuy( Game.Objects['Farm'], FrozenCookies.farmMax - 1 );

Yeah true but this way you get the full 500% potential instead of the 490% you would get if you sold 499 farms

Mtarnuhal commented 3 years ago

We should also take a look at the recommendation list cause it is getting out of wack due to the limit on the cursors, farms, and wizard towers. image

Mtarnuhal commented 3 years ago

For some reason, I was thinking about every 10 buildings = 1%. Also, I don't think you need to check if the building is under 10. This just makes it an extra unnecessary step.

adavidw commented 3 years ago

That <10 thing was in the code before, so I left it as an extra check in case the sell failed and the cursors/farms didn't actually get down that low. If the sell failed, you'd essentially double your existing cursors/farms.

I don't know if it's possible for the sell to fail, though. Sure, a buy can fail if you don't have cookies in the bank, but is there any scenario where a sell can fail? I can't think of one, so you're probably right that it's pointless.