Feature - Implemented Fortune Cookie Counter

Grotfang

Developer
Upon ascension, your cookie counter is removed and set the first time you visit adventure.php. Given mafia already inserts a pair of counters to represent your semi-rare window after finding a semi-rare, would it be possible to produce a similar window the first time in an ascension you visit adventure.php?

This is by no means a crucial issue - it's just that I ascended today and ate a fortune cookie, one number of which was over 100 turns greater than that possible, but not rejected by mafia.

xx
 

Bale

Minion
I would also enjoy this feature a lot. As Grotfang notes, if you know when your first adventure.php is, it isn't too hard to figure out when your fortune cookie window begins. It's generally at adventure 103-120 (Oxy drop ftw of course), but I do have to pay attention to my adventure number so this would be very convenient.
 

yueli7

Member
Initial SR

ok i've done this in 3 HCNP runs in a row now and its annoying me how stupid I am. Basically, add the SR begin and end window counters to turn 0 of a run, upon the start of a new life. This is because I eat 5 boring/spicy pasta on day 1 and forget to eat a fortune cookie on day 2 and just totally skip over the first SR
 

Spiny

Member
Go Oxy so you can't eat, then you'll remember why you can't eat and drop to eat a cookie ;) j/k

I thought this had come up before and don't recall why it wasn't implemented upon ascension. Maybe I'm just imagining things
 

lostcalpolydude

Developer
Staff member
The counters can't be set when you ascend. If you start the run with sewer trips, guild unlock, shore trips, any non-adventure.php location, then the counter isn't set yet (this is common in speed softcore). Mafia would have to track that you ascended this session and that it hasn't set a counter yet, then recognize the first time you go to an adventure.php location, even if you use a free runaway.
 

Bale

Minion
It would be nice if mafia set a semi-rare window when you hit your first adventure.php of the ascension. That would be a nice feature.

Right now I'm waiting for combat macro support. That would be an awesome feature.
 
you could just start the semirare window at 100 turns at call it a potential, since it's never certain. even if I shore, the counter will be early
+1 for this
 

StDoodle

Minion
you could just start the semirare window at 100 turns at call it a potential, since it's never certain. even if I shore, the counter will be early
+1 for this

No need; the counter does not exist until adventure.php has been visited. Also, the counter window doesn't account for "missed" adventures at non-adventure.php locations; the window will still have the same starting range regardless of how many adventures it takes to be activated.
 

bumcheekcity

Active member
100 turns is the absolute minimum, oxydropping or not, or shoring/sewering or not. Making that appear as an ABSOLUTE minimum would be a fair idea. If it appears, it would remind people if they've forgotten.
 

Bale

Minion
Why is that even being discussed still. Just set the semi-rare window when you hit your first adventure.php of the ascension. That does what you actually want, not what you're mistakenly asking for.
 

jasonharper

Developer
Ok, great. Now, would someone care to explain how mafia could unambiguously identify a given visit to adventure.php as the first such visit of an ascension, given the possibility of having spent turns outside of mafia, or of the user deleting the semirare window counters that were added on the actual first visit?
 

Bale

Minion
given the possibility of having spent turns outside of mafia

That's the only question I cannot answer.

The rest of the problems are reasonably simple to solve by following the same way other features in mafia work. One new property: firstAdventureReset which records the last ascension when mafia set semirare window counters for first adventure.php visit. If mafia does not currently have that property variables, then set firstAdventureReset to the current ascension so that mafia knows not to set semirare window counters on adventure.php. That will deal with the possibility of the user deleting the actual semirare window counters.

Unfortunately the possibility of spending a first adventure outside of mafia totally screws it up. The best way to handle that would be to have this feature be "opt in" only. That way it can be assumed that only people who know not to adventure outside of mafia for their first adventure will do that. Not foolproof, but most fools won't know to turn on the feature.

Does that answer your questions sufficiently? Perhaps we can work out something better if I'm still missing something.
 

yueli7

Member
what about a postascension script that sets a manual cookie counter of 150 or so turns, that is purely informational and does not actually indicate the precise a start of an SR window (due to non adventure.php) but is there to remind the player that a cookie should be eaten soon roughly before it runs out. i.e. more of a "remember to eat a cookie" counter, than a SR window counter
 

StDoodle

Minion
I would probably go with 80 adventures to be safe, in case one used a large number of non-adventure.php adventures to start AND oxydropped. Adding the line:
Code:
cli_execute("counters add 80 Eat a Cookie! fortune.gif");
to your postAscensionScript should work.

Edit: as far as automagic stuff goes, one could also throw in the condition that the player must still be level 1 (or even at starting stats) to have the 1st-turn @ adventure.php counter added. Sure, it's possible to do some weird stuff (especially in Normal) that would result in the counter NOT getting set, but that's no worse than the current situation. For most people who are of the trying-to-be-optimal but sometimes forgetful vein, this would work.
 
Last edited:

heeheehee

Developer
Staff member
If you want it to consider not oxy-dropping as well, a slight modification is needed:
Code:
cli_execute("counters add "+((can_drink() || can_eat()).to_int()*80+80)+" Eat a Cookie! fortune.gif");

And, uh, there's a lot of things that those silly softcore ascenders do that'd make that not happen. Like pulling lunchboxen. Then again, they're silly by nature of being softcore ascenders. I mean, what's up with that? =D
 

Bale

Minion
Actually, I'm thinking that it would be better to use an adventure.php relay script to set a beginning and ending range for the semi-rare window. It can set firstAdventureReset when it does this and if firstAdventureReset is the current ascension, then it won't set the counters.

That's much more useful than your postAscensionScript idea.
 

yueli7

Member
Code:
cli_execute("counters add "+((can_drink() || can_eat()).to_int()*80+80)+" Eat a Cookie! fortune.gif");

what does that add to StDoodle's?
 
Top