loathers / autoscend

An ascension script for KoLMafia
Other
45 stars 67 forks source link

On Dependence Day use green rocket #347

Closed taltamir closed 4 years ago

taltamir commented 4 years ago

Dependence day is a holiday that occurs on the 4th of bors. During it you can buy green rockets from the general store at 600 meat each. You are allowed to use one of them to get 3 disassembled clovers.

I can confirm this works on hardcore ed and on hardcore sneaky pete.

Concerns I had (all solved / were not actually a problem):

  1. [not an issue]. mafia disassembled it automatically and i didn't notice at first.

Original concern: "Not sure if it would work on g-lover (since you cannot use disassembled clovers in that path and must get ten-leaf clovers and keep them assembled)."

  1. fixed upstream. https://kolmafia.us/showthread.php?24907

Original concern: "CLI buy command does not work on green rockets. might have to resort to visiting URL to buy one. Or wait until mafia implements it."

  1. Not an issue. testers confirm it does.

Original concern: Does ascending reset the count?

taltamir commented 4 years ago

Trying to use one when you already used one that day does not throw an error. it just fails to produce clovers. I think the use succeeds but does not consume the rocket, instead giving a message that you can only use one a day.

To prevent unnecessary server hits, maybe have it be used immediately after buying?

taltamir commented 4 years ago

Mafia now tracks fireworks usage via _fireworkUsed

jeparo commented 4 years ago

So this is a quick fix of

if (holiday() == "Dependence Day" && !(get_property(_fireworkUsed).to_boolean()))
{
  // buy and use
}
taltamir commented 4 years ago

So this is a quick fix of

if (holiday() == "Dependence Day" && !(get_property(_fireworkUsed).to_boolean()))
{
  // buy and use
}

Pretty much, yes. just will be a while until we can actually test it.

taltamir commented 4 years ago

Today is dependence day. perfect time to test the above mentioned function But I am not managing to get holiday() to work CLI command holiday does nothing print (holiday()); does nothing and print (holiday() == "Dependence Day") gives me false

edit: so, this issue is probably caused by being dependence day based on real calendar rather than kol calendar. which mafia does not recognize