New Content - Implemented Deck of Every Card

Magus_Prime

Well-known member
play random; repeat 14

With r16065 the above yields the following:

Code:
> play random; repeat 14

[3526] Deck of Every Card
Encounter: Healing Salve
You acquire an item: white mana
Repetition 1 of 14...
Repetition 2 of 14...
Repetition 3 of 14...
Repetition 4 of 14...
Repetition 5 of 14...
Repetition 6 of 14...
Repetition 7 of 14...
Repetition 8 of 14...
Repetition 9 of 14...
Repetition 10 of 14...
Repetition 11 of 14...
Repetition 12 of 14...
Repetition 13 of 14...
Repetition 14 of 14...

The command only played one random draw. This is the first time I tried to automate playing via the gCLI. Any thoughts?
 

fronobulax

Developer
Staff member
play random; repeat 15

worked for me with r16065. The 15 was deliberate because I wanted to see some kind of indication that all the draws had been used in the gCLI. Not sure how to explain the difference between Magnus_Prime's and my experience without discussion of specific cards.

The recovery routines were run after every card so that seems to have been addressed and works as expected. Thanks.
 

Veracity

Developer
Staff member
> print abc; repeat 4

abc
Repetition 1 of 4...
abc
Repetition 1 of 4...
abc
Repetition 1 of 4...
abc
Repetition 1 of 4...
abc
... ad infinitum...
Yea, I think there's something I don't understand about the "repat" command.
 

heeheehee

Developer
Staff member
I made a very small change for debugging purposes:
Code:
	public void run( final String cmd, final String parameters )
	{
		KoLmafiaCLI CLI = this.CLI;
		String previousLine = CLI.previousLine;
		if ( previousLine != null )
		{
			int repeatCount = parameters.length() == 0 ? 1 : StringUtilities.parseInt( parameters );
			for ( int i = 0; i < repeatCount && KoLmafia.permitsContinue(); ++i )
			{
				RequestLogger.printLine( previousLine + " repetition " + ( i + 1 ) + " of " + repeatCount + "..." );
				CLI.executeLine( previousLine );
			}
		}
	}
With Veracity's sample input, previousLine was... wait for it... "print abc; repeat 4". The infinite loop makes sense now, I guess.
 

Veracity

Developer
Staff member
> print abc

abc

> repeat 5

Repetition 1 of 5...
abc
Repetition 2 of 5...
abc
Repetition 3 of 5...
abc
Repetition 4 of 5...
abc
Repetition 5 of 5...
abc
What I've learned is that putting the repeat command on the same line as the command you want to repeat doesn't seem to work the way I expected it to.

That might be worth a bug report; inadvertent infinite loops don't seem like they should be so easy to force.
 

ereinion

Member
There seems to be some formatting issues in the gcli, when the Deck of Every Card is autopulled at the start of an ascension:

As you can see, the formatting issues carry on to the next line entered into the gcli.

It's easily fixed by doing a "cls", but I figured it may be something you want to look into even so.
 

ereinion

Member
I don't think it was an issue before the deck was introduced though? Even if it is the image of the key which shows up, I never had any troubles with the autopull of it before? Of course, if this is a separate issue from the introduction of the deck, feel free to splitting off this to a separate thread :)
 

Veracity

Developer
Staff member
What did you do to get that in your CLI? I ascended this afternoon into an OCRS run and it autopulled the VIP key and the Deck of Every card for me, but I never saw anything in the gCLI or the Relay Browser that told me it did that; they were just in my inventory.
 

Darzil

Developer
I don't think it was an issue before the deck was introduced though? Even if it is the image of the key which shows up, I never had any troubles with the autopull of it before? Of course, if this is a separate issue from the introduction of the deck, feel free to splitting off this to a separate thread :)
Autopulling by KoL was added in the last few days.
 

ereinion

Member
What did you do to get that in your CLI? I ascended this afternoon into an OCRS run and it autopulled the VIP key and the Deck of Every card for me, but I never saw anything in the gCLI or the Relay Browser that told me it did that; they were just in my inventory.

I simply ascended into a new SC Standard run (as an AT, and then visited main.php. I can't remember if the message appeared in the cli before or after visiting the actual page in the relay browser, but I suspect it may not have. I'll try to pay closer attention next time. As to why it didn't show up for you, I am not sure, but could it be that you have broadcastEvents set to false? I am not entirely sure if that is the setting, but I am thinking of the same thing which shows e.g. buff messages at the top of main.php when you visit it after something's happened:



Could of course be that I have some relay-script doing this too, which you don't have, but a quick look at my relay-folder doesn't show any scripts which seems immediately suspicious :) Have you got any suggestions for how I'd go about tracking down the problem?

Autopulling by KoL was added in the last few days.

Ah, that would explain it - most probably not an issue with the deck, then :)
 

Veracity

Developer
Staff member
Well, my OCRS run started with a choice adventure:

Code:
Ascend as a Hardcore Female Disco Bandit under the Vole sign on the One Crazy Random Summer path, banking 23905 Karma.
Encounter: One Crazy Random Summer
Took choice 1077/1: unknown
choice.php?pwd&whichchoice=1077&option=1
You acquire an item: dice ring
You acquire an item: dice belt buckle
You acquire an item: dice-print pajama pants
You acquire an item: dice-shaped backpack
You acquire an item: dice-print do-rag
You acquire an item: dice sunglasses
You acquire an item: kill screen
I then clicked the "main" link on the topmenu and was shown the map. It said nothing whatsoever about "Welcome to KoL! Noob" or "Since you have a VIP key, we pulled it for you.".

I'm pretty sure I've seen the first message for ascensions that do not go through a choice - like Standard, as you did. I guess it doesn't show those messages for OCRS, at least.

Next time you are in Valhalla, before you click the "that's right, send me back down to the Kingdom" button, turn on the DEBUG log. Visit main.php. See the Event messages. Turn off the DEBUG log and post it.
 

Darzil

Developer
Interesting, looks like it may be a some paths thing.

My session log for going into Standard Hardcore shows, after using telegram from Lady Spookyraven:
main.php?refreshtop=true&noobmessage=true
You acquire an item: Clan VIP Lounge key
You acquire an item: Deck of Every Card

Going into Summer path Hardcore shows, before "Beginning New Ascension":
Encounter: One Crazy Random Summer
Took choice 1077/1: unknown
choice.php?pwd&whichchoice=1077&option=1
You acquire an item: dice ring
You acquire an item: dice belt buckle
You acquire an item: dice-print pajama pants
You acquire an item: dice-shaped backpack
You acquire an item: kill screen

It never shows acquisition of VIP key, Deck of Cards or the main refresh.

So looks like it doesn't do the main refresh which generates that information in paths where we show a choice adventure, or OCRS at least. So we'll need to capture the new main text and work out why we aren't parsing it cleanly, but it'll only appear in non choice starting paths (also didn't appear in Ed, has only appeared in 4 runs for me this year).
 

Theraze

Active member
Interestingly, it appears that for non-choice-beginning paths, the top menu IS supposed to refresh automatically after Valhalla. It's probably technically a KoL bug that they forget to do that (without the standard noob message) when a choice adventure is done.
 

Veracity

Developer
Staff member
So looks like it doesn't do the main refresh which generates that information in paths where we show a choice adventure, or OCRS at least.
Somebody should make a KoL bug report for this. Or some KoL dev should investigate and raise the issue in /dev

So we'll need to capture the new main text and work out why we aren't parsing it cleanly, but it'll only appear in non choice starting paths (also didn't appear in Ed, has only appeared in 4 runs for me this year).
session/EventManager takes the events from pages we visit and prints them to the gCLI. Looks like addNormalEvent strips out everything that is not a link before printing it there, but, there must be something it doesn't handle correctly with item acquisitions - which I expect have a desc_item link, at least.
 

Bale

Minion
It's entirely possible that one or more of our devs added this to the code while sourceForge has been down, but I'll post it anyway. New item:

Code:
--------------------
8405	talking spade	617691448	gardenspade.gif	usable		0
Item	talking spade	Free Pull
--------------------
 

Veracity

Developer
Staff member
I have a submit ready to go with a variety of things which personally affect me, including that. It is reusable, by the way. Or, for us, it is "message", since when you use it, we want to show you what it said.
 

Veracity

Developer
Staff member
FWIW, here is a "diff" of what I have ready to go

- new consumables (and a new effect).
- checkitems checks consumable size as well as level requirement
- change in level requirements and sizes for various foods
- talking spade
- Astronomer (obsolete), skeletal sommelier (obsolete), and mimic (obsolete)
- Monster ID fixes as reported by ckb. (lost already has this waiting, as well)
- Deck of Every Card can't be used without adventures left. At least, it recognizes the message when you try...
- clingy monsters in the Arid, Extra Dry Desert only explore on the initial monster. Detect by looking for "Desert Exploration" in the responseText
- Unknown items in storage can't be examined via api.php. Could have sworn they used to be allowed, but not now.

Considering that I'm only doing things that personally affect me, that's actually a fair amount of stuff...
 

Attachments

  • kolmafia.diff
    28.5 KB · Views: 53
Top