New Content - Implemented Deck of Every Card

Magus_Prime

Well-known member
Code:
use 1 Deck of Every Card
Encounter: Deck of Every Card
Took choice 1085/1: unknown
choice.php?whichchoice=1085&pwd&option=1
--------------------
1912	Strongly Motivated	barbell.gif	dd62de877d5d9821d08cd919ed8ac2cf
Effect	Strongly Motivated	Muscle Percent: +200
--------------------
You acquire an effect: Strongly Motivated (20)
 

Veracity

Developer
Staff member
How about if we just make this into the "New Content" thread for everything to do with the new IOTM? I realize that lost submitted a ton of stuff yesterday without the benefit of a thread, but having one "official" thread will make it easier to track the expected numerous additional little things that will be discovered as days go by.
 

Veracity

Developer
Staff member
For example, Dark Ritual uses a black mana and Ancestral Recall uses a blue mana. Both are noncombat skills, so the SkillBuffFrame presumably would know about them, and UseSkillRequest should deduct mana, and so on.
 

heeheehee

Developer
Staff member
For example, Dark Ritual uses a black mana and Ancestral Recall uses a blue mana. Both are noncombat skills, so the SkillBuffFrame presumably would know about them, and UseSkillRequest should deduct mana, and so on.

Maybe this is unnecessary, but I feel that a more appropriate way to handle this would be to update the format of classskills.txt to include item costs if any.

Off the top of my head, this would lead to cleaner handling of Shrap, Volcanometeor, these skills, and very arguably Rainbow Gravitation (although that last one probably would be more effort than it's worth).
 

Veracity

Developer
Staff member
Yesterday, before I ascended, I used 15 random draws from the deck.

Code:
use 1 Deck of Every Card
Encounter: Deck of Every Card
Took choice 1085/1: unknown
choice.php?whichchoice=1085&pwd&option=1
Encounter: Ninja Snowman
(I do not have "fast draw" selected.) Which card was it? Well, it was the Fire Elemental (or whatever) which led to a fight with an Elemental.

Code:
use 1 Deck of Every Card
Encounter: Deck of Every Card
Took choice 1085/1: unknown
choice.php?whichchoice=1085&pwd&option=1
You acquire an item: black mana
Aha! A Swamp! Well, I assume it was. I started playing MTG, back when Alpha was all there was, so that is what I expect gives a black mana.

Huh. Well, I'd sure like it we logged which card we drew.

Here is after I ascended and used the "cheat" option 3 times.

Code:
use 1 Deck of Every Card
Encounter: Pick a Card
Took choice 1086/1: unknown
choice.php?whichchoice=1086&option=1&pwd&which=70
Encounter: Deck of Every Card
Took choice 1085/1: unknown
choice.php?whichchoice=1085&pwd&option=1
You gain 550 Magicalness
You gain some Mysticality points!

use 1 Deck of Every Card
Encounter: Pick a Card
Took choice 1086/1: unknown
choice.php?whichchoice=1086&option=1&pwd&which=40
Encounter: Deck of Every Card
Took choice 1085/1: unknown
choice.php?whichchoice=1085&pwd&option=1
You learned a new skill: Ancestral Recall

use 1 Deck of Every Card
Encounter: Pick a Card
Took choice 1086/1: unknown
choice.php?whichchoice=1086&option=1&pwd&which=38
Encounter: Deck of Every Card
Took choice 1085/1: unknown
choice.php?whichchoice=1085&pwd&option=1
You learned a new skill: Lightning Bolt
I don't care about "optimal", but I want to HCPerm two more skills (having gotten Healing Salve and Giant Growth via random draws before I ascended, which means they are now permed).

In any case, I want the session log to tell me exactly what card I drew, whether via random pick or "cheating". And since drawing a card can lead to a fight, we should probably log the turn count. when we do a draw.
 

lostcalpolydude

Developer
Staff member
There are now two skills with the same name, Lightning Bolt. They are both combat skills. Only the new one can be permed (the other is from Heavy Rains), but the pre-ascension reminder list did not include the new skill. Skill ids are on charsheet, but the first thing we do for parsing that page is strip out all HTML tags, which includes those ids. That's going to need some rethinking, or maybe skills will just need to be parsed separately from everything else.
 

Veracity

Developer
Staff member
It might be useful to be able to "cheat Island" to get blue mana or "cheat The Magician" to get the Magicianship status effect, for example. Using fuzzy matching for the card name, of course. Such a command would allow us to put those commands into statuseffects.txt as the way to get the effect.
 

Veracity

Developer
Staff member
OK, I'm working on DeckOfEveryCardRequest. We need to log better, we need to recognize the puzzle letters in the Spades, we need to be able to make random or selected draws, and so on.

Here is a random draw leading to a combat:

Code:
use 1 Deck of Every Card
Encounter: Deck of Every Card
Took choice 1085/1: unknown
choice.php?whichchoice=1085&pwd&option=1
Encounter: Ninja Snowman
Here is a random draw leading to a noncombat

Code:
use 1 Deck of Every Card
Encounter: Deck of Every Card
Took choice 1085/1: unknown
choice.php?whichchoice=1085&pwd&option=1
You acquire an item: black mana
Here is cheating:

Code:
use 1 Deck of Every Card
Encounter: Pick a Card
Took choice 1086/1: unknown
choice.php?whichchoice=1086&option=1&pwd&which=70
Encounter: Deck of Every Card
Took choice 1085/1: unknown
choice.php?whichchoice=1085&pwd&option=1
You gain 550 Magicalness
You gain some Mysticality points!
I do not have "fast draw mode" (or whatever it is) enabled. I assume that just affects the Javascript that does the card animation. I assume that selecting it make a request of KoL, so that subsequent draws are also fast.

Also, we have some new monsters:

legal alien
The Emperor

Unfortunately, I'm out of draws today. If anybody can save a debug log of cheating, that would help me assign card names to numbers. Otherwise, I'll get it myself tomorrow. Thanks.
 

heeheehee

Developer
Staff member
If that's all you want,
1. X of Clubs
2. X of Hearts
3. X of Diamonds
4. X of Spades
5. X of Cups
6. X of Wands
7. X of Swords
8. X of Coins
9. XIII - Death
10. Goblin Sapper
11. The Hive
12. Hunky Fireman Card
13. V - The Hierophant
14. XVIII - The Moon
15. Werewolf
16. XV - The Devil
17. Fire Elemental
18. Slimer Trading Card
19. VII - The Chariot
20. II - The High Priestess
21. XII - The Hanged Man
22. Plantable Greeting Card
23. Pirate Birthday Card
24. XIV - Temperance
25. Unstable Portal
26. XVII - The Star
27. Suit Warehouse Discount Card
28. Christmas Card
29. Go Fish
30. Aquarius Horoscope
31. Plains
32. Swamp
33. Mountain
34. Forest
35. Island
36. Healing Salve
37. Dark Ritual
38. Lightning Bolt
39. Giant Growth
41. Gift Card
42. X of Papayas
43. X of Salads
44. IX - The Hermit
45. IV - The Emperor
46. Green Card
48. The Race Card
49. 0 - The Fool
50. I - The Magician
51. XI - Strength
52. Lead Pipe
53. Rope
54. Wrench
55. Candlestick
56. Knife
57. Revolver
58. 1952 Mickey Mantle
59. Spare Tire
60. Extra Tank
61. Sheep
62. Year of Plenty
63. Mine
64. Laboratory
65. X of Kumquats
66. Professor Plum
67. X - The Wheel of Fortune
68. XXI - The World
69. VI - The Lovers
70. III - The Empress

I guess I'm missing a few, since I cheated earlier. 40, 47 are Ancestral Recall and The Tower, most likely in that order.
 
Last edited:

Veracity

Developer
Staff member
Thanks! That's all I needed to code up this prototype:

> play

Play what?

> play random

Playing a random card

> play random dude

Playing V - The Hierophant (13)

> play random booger

What kind of random monster is a booger?

> play the race card

Playing The Race Card (48)

> play X

'X' is an ambiguous card name

> play mickey

Playing 1952 Mickey Mantle (58)

> play nothing

I don't know how to play nothing
The actual class doesn't submit a request, yet; the run() method just prints "Playing xxx", as you can see. But this was enough to get the "play" command operating the way I want it to.

I'll submit what I have so far - just so there is a DeckOfEveryCardRequest class, in case anybody else needs to put something in there - and will finish implementing the request/response interaction with KoL over the next few days, as I have time.
 
This seems like something that would be useful to access via daily deeds. So, something like "play x random" would also complete any combats encountered. The cheat option could be a dropdown choice from all available cards, perhaps? With the tradeoff in random and cheat counts being recognized to control availability.

Is this more likely to be left to scripting, via the support that's in progress?
 

Veracity

Developer
Staff member
"Fast draw mode" does have an account option:

account.php?pwd&action=flag_fastdecking&value=1&ajax=1

Near as I can tell, you can't change it from KoL options, only from the Deck of Every Card. It's also not in api.php. I'm not sure we care; I haven't tried turning it on yet to see what, if anything, it does to the request sequence to draw cards.
 

Veracity

Developer
Staff member
Here is the request sequence with "fast draw" mode NOT active:

Code:
inv_use.php?cheat=1&pwd&whichitem=8382&ajax=1
choice.php?forceoption=0 (whichchoice=1086)
choice.php?whichchoice=1086&option=1&pwd&which=37
choice.php?forceoption=0 (whichchoice=1085)
<div id="blurb">You draw a card: <b>Ten of Spades</b><p>You notice a stack of shovels on the ground in front of a nearby stack of tombstones.</div>
choice.php?whichchoice=1085&pwd&option=1
You grab the shovels.  There's something written on the ground under the shovels: GGUGEWCCCI
You acquire <b>10 grave robbing shovels</b>
and here is how it should log:

Code:
[785] Deck of Every Card
Encounter: Pick a Card
play X of Spades (4)
You draw a card: Ten of Spades
Encounter: Deck of Every Card
Spade letters: GGUGEWCCCI
You acquire grave robbing shovel (10)
And I have it coded to work that way - except the "You draw a card: Ten of Spades" doesn't show up, yet. I don't know why, since I stuck that in to a visitChoice method in DeckOfEveryCardRequest and when I put the responseText from the choice.php?forceoption=0 (whichchoice=1085) into ts.html, I get this:

> test load ts.html

Read 10,434 bytes into a 10,434 character string

> test visit-choice

You draw a card: Ten of Spades
choice = 1085
In other words, my method was called and did the right thing.

So, apparently, in actual operation, my method is not being called. Unfortunately, I've cheated 3 times today and can no longer test. I am ready to ascend - although I probably don't have time, today.

I'll look at this in Eclipse, by and by. Revision 16025 has what I've done so far.
 

Veracity

Developer
Staff member
Hopefully 16027 should fix the logging for drawing from the deck - including cheating, drawing a random card, and fast draw mode.

As I suspected, fast draw mode simply skips the animation from showing the card back to pressing the button to showing the card face; the actual response when you play a card shows the "You draw the XXX card", but if you are not in fast draw mode, the browser waits until you click the "Draw a card" button to show it to you. So, there is no change to the actual request/response sequence if you have that interface option enabled or disabled.

I guess the next step is to actually connect the "play" command to make KoL requests.

I am considering the following for UI:

play random - play a random card
play random PHYLUM - fight a random monster in the specified phylum
play stat STAT - Muscle, Mysticality, or Moxie. Fuzzy match, I suppose
play buff BUFF - initiative, muscle, mysticality, moxie, items. Again, with fuzzy matching
play CARD - fuzzy matched card name

Everything other than "play random" is a "cheat". Any other ideas?
 

Darzil

Developer
I'd suggest play phylum PHYLUM rather, or play monster PHYLUM, so it's not so easy to confuse with play random.
 

Veracity

Developer
Staff member
Yeah, I was thinking that, too. There are also three other monsters - The Emperor, The Hermit, and legal alien - that you can fight. Using fuzzy matching, you can "play The Hermit", "play The Emperor" and "play Green Card" to get those, so we probably don't need to handle them specially.
 

ereinion

Member
In the maximizer it suggests playing cards, even if the character the maximizer is run for hasn't got a deck. Tried checking to see if it wanted to buy an item making it possible to play the card, but no price came up for the action when I checked the option to display the cost of all consumables.
 
Top