Feature - Implemented Time-Spinner

Sytras

Member
Any chance we can get option handling for the time spinner choice, so if I use the time-spinner it can automatically pick based on a preference in the choice adv tab?
Right now the relay interface shows "secret choice" for all of the options and i don't see where i can set the preference.

Adding it to daily deeds with an interface like the deck of every card would work for me as well, but daily deeds is a bit long as it is.
 

lostcalpolydude

Developer
Staff member
Eating food using the Time-Spinner ends with a URL like inv_eat.php?pwd&whichitem=2527&ts=1, which currently removes the item from mafia's inventory (but shouldn't). The response looks identical to normal consumption, and adding ts=1 to normal consumption doesn't do anything noticeable.
 
In The Far Future, an item can be replicated only once/day. So it would be awesome to have a preference to track whether that's been done.

When an item is successfully replicated:
"Like magic, an item appears in the replicator."
When the replicator has already been used, so the attempt fails:
"Looks like the convoluted nature of time-travel has caught up with you and your daily replicator credit is still used up from the last time you were in the far-future/the past present."

(_farFutureReplicatorUsed should be set = true in either case.)
 

Bale

Minion
We're spinning a new release soon, so I'd like to suggest we implement a couple of key features for this item before we do that.

  • Preference for _timeSpinnerMinutesUsed
  • Preference for _timeSpinnerReplicated
  • timespin CLI command

Those three items and I think it would be fully implemneted, but at least please add the preferences before we spin a release. I understand that the CLI command might require more time.

Note: I think that the preferences should be similar, therefore I am ignoring the proposed preference name in the previous post.
 

Boesbert

Member
It looks like the way the "recent fight" feature of the time-spinner is handled confuses the wandering tracker. In the following log excerpt, mafia's tracker showed me a 0 for the digitized racecar tracker when I encountered the portrait. I am thinking "recent fights" might be another case of "encounter that does not actually start the wanderer counter"?

Code:
[368] The Haunted Storage Room
Encounter: Bob Racecar
Round 0: Boesbert loses initiative!
Round 1: Boesbert casts SUMMON LOVE MOSQUITO!
Round 2: Bob Racecar takes 15 damage.
Round 2: You gain 15 hit points
Round 2: Boesbert casts CENSURIOUS LECTURE!
Round 3: Bob Racecar drops 9 attack power.
Round 3: Bob Racecar drops 10 defense.
Round 3: Boesbert casts DIGITIZE!
Round 4: Boesbert attacks!
Round 5: Bob Racecar takes 467 damage.
Round 5: Boesbert wins the fight!
You acquire an item: rad
You gain 149 Meat
You acquire an item: mesh cap
You acquire an item: stunt nuts
You acquire an item: ketchup hound
You acquire an item: rad (8)
After Battle: ONN catches one of her poorly antialiased corners on the scenery, knocking loose a pixel.
You acquire an item: yellow pixel
After Battle: You gain 26 Muscleboundness
After Battle: You gain 14 Mysteriousness
After Battle: You gain 12 Cheek

familiar Intergnat (31 lbs)

use 1 Time-Spinner
Took choice 1195/1: (secret choice)
choice.php?pwd&whichchoice=1195&option=1
Encounter: Travel to a Recent Fight
Took choice 1196/1: Spin and Fight!
choice.php?pwd&whichchoice=1196&option=1&monid=1432
Encounter: pygmy bowler NAMED NEIL
Round 0: Boesbert loses initiative!
Round 1: Boesbert casts SUMMON LOVE MOSQUITO!
Round 2: pygmy bowler takes 16 damage.
Round 2: You gain 16 hit points
Round 2: LOL says, "As Neil Gaiman once said, 'The imagination is a muscle. If it is not exercised, it atrophies,'" and beats the enemy with outrageous imagination for 21 damage.
Round 2: pygmy bowler takes 21 damage.
Round 2: Boesbert casts CENSURIOUS LECTURE!
Round 3: pygmy bowler drops 8 attack power.
Round 3: pygmy bowler drops 6 defense.
Round 3: LOL says, "As Neil Peart once said, 'If you've got a problem, take it out on a drum,'" and takes it out on your opponent for 32 damage.
Round 3: pygmy bowler takes 32 damage.
Round 3: Boesbert attacks!
Round 4: pygmy bowler takes 471 damage.
Round 4: LOL says, "As Neil Patrick Harris once said, 'When you're sad, stop being sad and be awesome instead!'" and beats the enemy with outrageous awesomeness for 23 damage.
Round 4: pygmy bowler takes 23 damage.
Round 4: Boesbert wins the fight!
After Battle: A love grub shyly approaches you and hands you some extra Meat.
You gain 190 Meat
After Battle: LOL does the Harlem Shake, kind of. I mean it doesn't have quite the right anatomy for it but you guess that's what it's going for.
You acquire an item: bowling ball
You acquire an item: imitation White Russian
You acquire an item: rad (8)
You acquire an item: BACON
After Battle: You gain 40 Fortitude
After Battle: You gain 11 Magicalness
After Battle: You gain 11 Cheek

use 1 Time-Spinner

add to closet: 1 bowling ball

[370] The Hidden Bowling Alley
Encounter: Life is Like a Cherry of Bowls
Took choice 788/6: skip adventure
choice.php?pwd&whichchoice=788&option=6

add to closet: 1 bowling ball

[370] The Hidden Bowling Alley
Encounter: mutant pygmy bowler AND TESLA!
Round 0: Boesbert wins initiative!
Round 1: Boesbert casts CENSURIOUS LECTURE!
Round 2: pygmy bowler drops 5 attack power.
Round 2: pygmy bowler drops 7 defense.
Round 2: Boesbert attacks!
Round 3: pygmy bowler takes 471 damage.
Round 3: Boesbert wins the fight!
After Battle: A love dragonfly buzzes softly in your ear.
After Battle: You gain 5 Chutzpah
You gain 163 Meat
After Battle: LOL does a strange, angry-looking stompy sort of dance, while shouting "DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS".
You acquire an item: bowling ball
You acquire an item: tiny bowler
You acquire an item: imitation White Russian
You acquire an item: rad (8)
After Battle: LOL accidentally nudges your hand into the nearby tesla coil. BZAP!
After Battle: You gain 55 Muscularity Points
You acquire an item: BACON
After Battle: You gain 29 Fortitude
After Battle: You gain 17 Enchantedness
You gain a Mysticality point!
After Battle: You gain 18 Sarcasm

add to closet: 1 bowling ball

[371] The Hidden Bowling Alley
Encounter: drunk pygmy WITH BACON!!!
Round 0: Boesbert wins initiative!
Round 1: Boesbert casts CENSURIOUS LECTURE!
Round 2: drunk pygmy drops 5 attack power.
Round 2: drunk pygmy drops 10 defense.
Round 2: Boesbert casts SUMMON LOVE MOSQUITO!
Round 3: drunk pygmy takes 17 damage.
Round 3: You gain 17 hit points
Round 3: Boesbert casts COMPRESS!
Round 4: drunk pygmy takes 39 damage.
Round 4: Boesbert attacks!
Round 5: drunk pygmy takes 474 damage.
Round 5: Boesbert wins the fight!
You gain 127 Meat
After Battle: LOL does the Harlem Shake, kind of. I mean it doesn't have quite the right anatomy for it but you guess that's what it's going for.
You acquire an item: cold water bottle
You acquire an item: pygmy phone number
You acquire an item: gold Boozehounds Anonymous token
You acquire an item: rad (8)
You acquire an item: BACON (5)
After Battle: You gain 37 Beefiness
After Battle: You gain 13 Wizardliness
After Battle: You gain 10 Sarcasm

[372] The Hidden Bowling Alley
Encounter: pygmy bowler WITH SCIENCE!
Round 0: Boesbert wins initiative!
Round 1: Boesbert casts CENSURIOUS LECTURE!
Round 2: pygmy bowler drops 10 attack power.
Round 2: pygmy bowler drops 9 defense.
Round 2: Boesbert casts COMPRESS!
Round 3: pygmy bowler takes 42 damage.
Round 3: Boesbert casts SCIENCE!  FIGHT WITH INTERNET DEBATE!
You acquire an effect: Internate Debatable (1)
Round 4: pygmy bowler takes 30 damage.
Round 4: Boesbert casts SUMMON LOVE MOSQUITO!
Round 5: pygmy bowler takes 10 damage.
Round 5: You gain 10 hit points
Round 5: Boesbert attacks!
Round 6: pygmy bowler takes 465 damage.
Round 6: Boesbert wins the fight!
You gain 184 Meat
After Battle: LOL does the Harlem Shake, kind of. I mean it doesn't have quite the right anatomy for it but you guess that's what it's going for.
You acquire an item: bowling ball
You acquire an item: imitation White Russian
You acquire an item: rad (8)
After Battle: LOL says, "Did you know: Most of the universe is made up of a substance called Salmon Matter!"
You acquire an item: BACON
After Battle: You gain 37 Fortitude
You gain a Muscle point!
After Battle: You gain 10 Magicalness
After Battle: You gain 14 Cheek

add to closet: 1 bowling ball

[373] The Hidden Bowling Alley
Encounter: Wooof! Wooooooof!
Took choice 1106/3: acquire familiar food
choice.php?pwd&whichchoice=1106&option=3
You acquire an item: Ghost Dog Chow

[373] The Hidden Bowling Alley
Encounter: Armchair Quarterback
Took choice 946/1: Walk the line
choice.php?pwd&whichchoice=946&option=1
You acquire an item: programmable turtle

[373] The Hidden Bowling Alley
Encounter: mutant pygmy bowler WITH BACON!!!
Round 0: Boesbert loses initiative!
Round 1: Boesbert casts CENSURIOUS LECTURE!
Round 2: pygmy bowler drops 8 attack power.
Round 2: pygmy bowler drops 9 defense.
Round 2: Boesbert casts COWBOY KICK!
Round 3: pygmy bowler takes 42 damage.
Round 3: Boesbert casts SUMMON LOVE MOSQUITO!
Round 4: pygmy bowler takes 16 damage.
Round 4: You gain 16 hit points
Round 4: Boesbert attacks!
Round 5: pygmy bowler takes 403 damage.
Round 5: Boesbert wins the fight!
After Battle: A love dragonfly buzzes softly in your ear.
After Battle: You gain 5 Cheek
You gain 158 Meat
After Battle: LOL finds a leek somewhere and sings a polka while twirling it around.
You acquire an item: bowling ball
You acquire an item: rad (8)
You acquire an item: BACON (5)
After Battle: You gain 37 Strongness
After Battle: You gain 16 Magicalness
After Battle: You gain 16 Chutzpah

take from closet: 4 bowling ball
You acquire bowling ball (4)

Combine 1 skeleton bone + 1 loose teeth
You acquire an item: skeleton key
Crafting used 1 each of skeleton bone and loose teeth

buy 1 alpine watercolor set for 5000 each from Chateau Mantenga Gift Shop
You spent 5,000 Meat
You acquire an item: alpine watercolor set

cast 1 Self-Combing Hair
You acquire an effect: Impeccable Coiffure (10)

cast 1 Steroid Bladder
You acquire an effect: Juiced and Loose (10)

cast 1 Flappy Ears
You acquire an effect: Ear Winds (10)

Visiting Precinct Materiel Division

buy 1 Superdrifter holo-record for 300 each from Fallout Shelter Electronics Supply
Superdrifter holo-record is multiusable, but KoLmafia thought it was not
You spent 300 Meat
You acquire an item: Superdrifter holo-record

use 1 Superdrifter holo-record
You acquire an effect: Superdrifting (10)

buy 1 ceiling fan for 1500 each from Chateau Mantenga Gift Shop
You spent 1,500 Meat
You acquire an item: ceiling fan

[374] Rest in your bed in the Chateau
You gain 98 hit points
You gain 90 Muscularity Points
You gain 155 Strongness

cast 1 Flappy Ears
You acquire an effect: Ear Winds (10)

cast 1 Intracranial Eye
You acquire an effect: Mind Vision (10)

cast 1 Magic Sweat
You acquire an effect: Hardened Sweatshirt (10)

cast 1 Self-Combing Hair
You acquire an effect: Impeccable Coiffure (10)

cast 1 Steroid Bladder
You acquire an effect: Juiced and Loose (10)

cast 1 Flappy Ears
You acquire an effect: Ear Winds (10)

cast 1 Intracranial Eye
You acquire an effect: Mind Vision (10)

cast 1 Magic Sweat
You acquire an effect: Hardened Sweatshirt (10)

cast 1 Self-Combing Hair
You acquire an effect: Impeccable Coiffure (10)

[374] Rest in your bed in the Chateau
You gain 133 Muscularity Points
You gain 155 Strongness
You gain a Muscle point!

[374] Rest in your bed in the Chateau
You gain 6 hit points
You gain 138 Muscularity Points
You gain 155 Muscleboundness
You gain a Muscle point!

cast 1 Steroid Bladder
You acquire an effect: Juiced and Loose (10)

cast 1 Flappy Ears
You acquire an effect: Ear Winds (10)

cast 1 Intracranial Eye
You acquire an effect: Mind Vision (10)

cast 1 Magic Sweat
You acquire an effect: Hardened Sweatshirt (10)

cast 1 Self-Combing Hair
You acquire an effect: Impeccable Coiffure (10)

cast 1 Steroid Bladder
You acquire an effect: Juiced and Loose (10)

cast 1 Flappy Ears
You acquire an effect: Ear Winds (10)

cast 1 Intracranial Eye
You acquire an effect: Mind Vision (10)

cast 1 Magic Sweat
You acquire an effect: Hardened Sweatshirt (10)

[374] Rest in your bed in the Chateau
You gain 6 hit points
You gain 122 Muscularity Points
You gain 155 Strongness

[374] Rest in your bed in the Chateau
You gain 130 Muscularity Points
You gain 155 Strengthliness
You gain a Muscle point!

[374] An Overgrown Shrine (Southwest)
Encounter: Water You Dune
Took choice 783/1: Unlock Hidden Hospital
choice.php?pwd&whichchoice=783&option=1

[375] An Overgrown Shrine (Northwest)
Encounter: Earthbound and Down
Took choice 781/1: Unlock Hidden Apartment Building
choice.php?pwd&whichchoice=781&option=1

familiar Ms. Puck Man (29 lbs)

showplayer.php?who=1560469

[376] The Haunted Storage Room
Encounter: mutant ancestral Spookyraven portrait
Round 0: Boesbert loses initiative!
Round 1: Boesbert casts CENSURIOUS LECTURE!
Round 2: ancestral Spookyraven portrait drops 8 attack power.
Round 2: ancestral Spookyraven portrait drops 7 defense.
Round 2: Boesbert attacks!
Round 3: ancestral Spookyraven portrait takes 486 damage.
Round 3: Boesbert wins the fight!
You acquire an item: rad
After Battle: ONN eats your opponent -- except for the eyes, which start to float away. You catch them and eat them yourself, and they're quite satisfying.
After Battle: You gain 22 hit points
After Battle: You gain 24 Muscularity Points
You acquire an item: rad (8)
After Battle: ONN tries to eat a rock, and loses a pixel in the process.
You acquire an item: yellow pixel
After Battle: You gain 25 Fortitude
After Battle: You gain 16 Enchantedness
After Battle: You gain 12 Smarm
You gain a Moxie point!

[377] The Haunted Storage Room
Encounter: Bob Racecar
Round 0: Boesbert loses initiative!
Round 1: Boesbert casts CENSURIOUS LECTURE!
Round 2: Bob Racecar drops 10 attack power.
Round 2: Bob Racecar drops 6 defense.
Round 2: Boesbert casts DIGITIZE!
Round 3: Boesbert casts COMPRESS!
Round 4: Bob Racecar takes 39 damage.
Round 4: Boesbert casts COWBOY KICK!
Round 5: Bob Racecar takes 43 damage.
Round 5: Boesbert attacks!
Round 6: Bob Racecar takes 456 damage.
Round 6: Boesbert wins the fight!
You acquire an item: rad
After Battle: ONN barfs some chewed-up dots into your mouth, like a mother bird feeding her young.
After Battle: You gain 40 hit points
After Battle: You gain 42 Muscularity Points
You gain 150 Meat
You acquire an item: leather chaps
You acquire an item: stunt nuts
You acquire an item: ketchup hound
You acquire an item: normal barrel
You acquire an item: rad (8)
After Battle: ONN coughs up a pixel.
You acquire an item: yellow pixel
After Battle: You gain 42 Fortitude
After Battle: You gain 10 Magicalness
After Battle: You gain 17 Chutzpah
 

Darzil

Developer
r17208 adds consumable spading (actually 5-6 adventures and 5-10 stats in addition to the 3 pvp fights).
r17209 adds tracking for replicator use and minutes used.
 

Darzil

Developer
Ok, no idea when or if I'd be able to do it (would need aftercore between NA runs to fall on a day when I have loads of free time), but what I'd like to see is:

timespinner command, with options :
timespinner recent = shows all available fights based on queue records (will hopefully also help us make queues meet what KoL has).
timespinner recent monster = fight monster (verify based on queue records / choice list and give appropriate errors if necessary).
timespinner meal = shows all available meals based on a new _preference to be added to whenever we eat something (and parse choice list and correct).
timespinner meal food = eat food (verify based on queue records / choice list and give appropriate errors if necessary).
timespinner back = fight monster back in time.
timespinner future = start Far Future choice.
timespinner prank target = use prank on target.

Would also like a food concoction to be created and handled by consumption managers to show that food as consumable at a cost of 3 time-spinner minutes as appropriate.
 
I'm looking forward to all of this functionality, but

a food concoction to be created and handled by consumption managers to show that food as consumable at a cost of 3 time-spinner minutes as appropriate.

... is particularly exciting. That alone will make the Time-Spinner much more valuable to me, in terms of instantly reducing the real-life time required.

Thanks in advance for all the hard work involved!
 

lostcalpolydude

Developer
Staff member
timespinner recent needs to be an ash command yielding a record so that it can be parsed.

It's going to display information available to ASH already, based on iterating through each location and checking combat_queue.

I'm not very sure that a list of 100 monsters (could be smaller, could also be much larger) in the CLI is actually useful, though.
 

xKiv

Active member
I can imagine it filter available mobs based on (partial) monster/location name. (or is there already a CLI command like that?)
 

lostcalpolydude

Developer
Staff member
I can imagine it filter available mobs based on (partial) monster/location name. (or is there already a CLI command like that?)

Code:
boolean[string] mons;

void setup()
{

	foreach loc in $locations[]
	{
		string queue = loc.combat_queue;
		if ( queue != "" )
		{
			string[int] list = split_string( queue, "; " );
			for i from 0 upto ( count(list) - 1 )
			{
				mons[ list[i] ] = true;
			}
		}
	}
	sort mons by to_lower_case( index );
}

void main( string check )
{
	setup();
	foreach x in mons
	{
		if ( check == "" || x.to_lower_case().contains_text( check ) )
		{
			print_html( x );
		}
	}
}

Here's a script for that. It prints all monsters with an empty input, otherwise it filters on the input. My simple attempt to do a case-insensitive sort on the monster list failed, and there are probably other improvements that can be made, but this works pretty well.
 
Could we get the medals tracking? In exchange, I will provide my diff that might do this.

Code:
Index: src/data/defaults.txt
===================================================================
--- src/data/defaults.txt   (revision 17213)
+++ src/data/defaults.txt   (working copy)
@@ -1095,6 +1101,7 @@
 user   testudinalTeachings
 user   textColors  crappy:#999999|good:green|awesome:blue|epic:#8a2be2|junk:gray|memento:olive|notavailable:gray
 user   thanksMessage   Thank you for the donation!
+user   timeSpinnerMedals   0
 user   timesRested 99
 user   timeTowerAvailable  false
 user   tomeSkillsHardcore  Summon Snowcone
Index: src/net/sourceforge/kolmafia/session/ChoiceManager.java
===================================================================
--- src/net/sourceforge/kolmafia/session/ChoiceManager.java (revision 17213)
+++ src/net/sourceforge/kolmafia/session/ChoiceManager.java (working copy)
@@ -236,6 +236,7 @@
    private static final Pattern ENLIGHTENMENT_PATTERN = Pattern.compile( "achieved <b>(\\d+)</b> enlightenment" );
    private static final Pattern ORACLE_QUEST_PATTERN = Pattern.compile( "don't remember leaving any spoons in (.*?)"" );
    private static final Pattern CASE_PATTERN = Pattern.compile( "\\((\\d+) more case" );
+   private static final Pattern TIME_SPINNER_MEDALS_PATTERN = Pattern.compile( "(?:At|at) least I have the memory of earning <b>(\\d+) medal(?:s?)</b> in (?:past|the) future(?:s?)." );

    public static final Pattern DECISION_BUTTON_PATTERN = Pattern.compile( "<input type=hidden name=option value=(\\d+)>(?:.*?)<input +class=button type=submit value=\"(.*?)\">" );

@@ -9310,8 +9344,22 @@
                Preferences.increment( "_timeSpinnerMinutesUsed", 3 );
            }
            break;
+
+       case 1199:
+       {
+           // Visit the Far Future
+           Matcher matcher = ChoiceManager.TIME_SPINNER_MEDALS_PATTERN.matcher( text );
+           if ( matcher.find() )
+           {
+               Preferences.setInteger( "timeSpinnerMedals", StringUtilities.parseInt( matcher.group( 1 ) ) );
+           }
+
+           break;
        }

+
+       }
+
        // Certain choices cost meat or items when selected
        ChoiceManager.payCost( ChoiceManager.lastChoice, ChoiceManager.lastDecision );
    }
 

Bale

Minion
Cheesecookie asked for it. Oh dear, I can only imagine that snapshot just became a little more challenging.
 
Top