[Suggestion] Buy Max button change (bad pseudocode inside ^^)

Discussion in 'Time Clickers' started by stevie123, Aug 27, 2015.

  1. stevie123

    stevie123 Specialist

    Joined:
    Aug 21, 2015
    Messages:
    63
    Likes Received:
    39
    We just had this question in the chat if the "buy Max" button could be changed. It's currently capped at level 1000 unpromoted. The suggestions went from "change cap to each 500 levels" to "buy to highest multiple of 100".

    Being capped at 500 would basically work like it does now. It buys 500 each time you click it and can afford 500 or more. If you can only afford less than 500 it would buy that amount, sometimes leaving you at unwanted upgrade positions, like 902 where you have no speed upgrades. Just like the current cap at 1000 would also do.

    The other suggestion to buy to highest multiple of 100: If you can afford 500, it buys 500. If you can afford 902, it buys 900. So far so good. The downside here is that it can buy you into a low level of training where you don't have attackspeed upgrades. It's a common tactic to stay, for example, at level 1500 and farm gold with a high attckspeed until you can directly buy the weapons to 1700 or better 1800, to directly get as much attackspeed upgrades back as possible. The "buy to highest multiple of 100" would buy you to 1600 in the low level training if you can afford like 1637. Not what we want.

    My idea is to combine those two ideas. I have prepared some pseudocode, I hope you get the idea behind it :) if not, feel free to ask


    if
    max_affordable_weaponlevel - current_weaponlevel >= 500;
    then
    switch(max_affordable_weaponlevel)
    case max_affordable_weaponlevel >= 5000: buy_weaponlevel 5000;
    case max_affordable_weaponlevel >= 4500: buy_weaponlevel 4500;
    ...
    case max_affordable_weaponlevel >= 500: buy_weaponlevel 500;
    default: ;​
    end if​
    else
    rounded_weaponlevel_purchase_difference = ((max_affordable_weaponlevel - current_weaponlevel) div 100) * 100;
    buy_weaponlevel (rounded_weaponlevel_purchase_difference);​


    Let's take Kenzies level 902 as an example ;)

    You timewarped and have 0 weaponlevels. current_weaponlevel = 0
    You can afford 902. max_affordable_weaponlevel = 902
    "if 902 - 0 >= 500" is true, so we enter "then" and directly enter "switch".
    All cases are not true until "max_affordable_weaponlevel >= 500" so we buy the weapon to level 500 and go out of the whole "if".

    Everything recalculates.
    current_weaponlevel = 500 and max_affordable_weaponlevel is still = 902.
    "if 902 - 500 >= 500" is false, so we enter "else".
    The calculation
    "rounded_weaponlevel_purchase_difference = ((max_affordable_weaponlevel - current_weaponlevel) div 100) * 100"
    with actual numbers inserted would look like
    rounded_weaponlevel_purchase_difference = ((902 - 500) div 100) * 100
    ((902 - 500) div 100) * 100 = (402 div 100) * 100 = 4 * 100 = 400​
    rounded_weaponlevel_purchase_difference = 400
    In the last step we take the value of "rounded_weaponlevel_purchase_difference" and give it to "buy_weaponlevel" to buy that 400 levels to reach the round level 900.


    What it still misses is the behaviour if "rounded_weaponlevel_purchase_difference" = 0 and if "max_affordable_weaponlevel" = 0.

    Feel free to comment and/or ask.
     
    opti, RebelKeithy and Dimps like this.
  2. opti

    opti Elite

    Joined:
    Aug 9, 2015
    Messages:
    12
    Likes Received:
    1
    some more options like this would be nice, i have similar frustrations with the current 4 settings
     
  3. Ottest

    Ottest Rookie

    Joined:
    Sep 4, 2015
    Messages:
    10
    Likes Received:
    0
    I would like to see another option that is called "Buy Max x100"

    Buy as many full 100's as possible (or let's say full promotions)

    That would help a lot in higher levels :)
     
  4. Proton

    Proton Administrator
    Developer Moderator

    Joined:
    May 5, 2015
    Messages:
    267
    Likes Received:
    419
    This is a good idea. I've been starting to run into the same problem after Time Warping. Once you have enough Start Gold it can be tricky to spend it effectively.

    Added a task to Make Buy Max stop at the highest promotion (without buying it).
     
  5. stevie123

    stevie123 Specialist

    Joined:
    Aug 21, 2015
    Messages:
    63
    Likes Received:
    39
    Please don't only get it to buy the highest multiple of 100. It will become useless for most of us then.
    If we can buy 1600 or more it will get us to 1600 but we might want to idle and farm at 1500 for some more waves. Full Spec Ops is better than Training x.1 or x.2.

    That's why I tried to describe in the pseudocode above to first go to the highest multiple of 500 (500, 1000, 1500, ...) and only if no next multiple of 500 is in reach to have it buy the highest multiple of 100.