I've been experimenting with ways to transform a monster (CLEESH, Macrometeorite, CHEAT CODE: REPLACE MONSTER) and attempting to figure out what the new monster is before you sibmit an action and get the new response text. We will re-read MONSTERID from the next responseText, and we will accurately know what the monster is, but you'd probably like to know what the monster is before you submit the next action. Twiddling your thumbs will count as an action, but it's an extra step.
What we used to do:
Leave last_monster() unchanged and discover the actual monster next round.
What we do now:
Attempt to look up the new monster by name (which is provided).
If found, cool.
If ambiguous, attempt to look up the new monster by image (which is provided)
If found, take it - but images are shared, so no guarantees.
This is revision 20208.
I've been diving into transforming monsters and how to recognize which monster you end up with.
It works like this.
I am in fight.php. I see monster X.
I submit an action which transforms the monster - CLEESH, CHEAT CODE: REPALCE MONSTER, Macrometeorite, etc.
The response shows me the picture of monster X - and MONSTERID is for X.
The text says that the monster is replaced. Depending on the skill, it may tell you what the new monster is. CLEESH does, CHEAT CODE: REPLACE ENEMY does not.
The following script runs:
newpic("/iii/adventureimages/newt.gif", "a newt",100,100);
newpic("/iii/adventureimages/fratboy.gif", "an Orcish Frat Boy",100,100);
newpic("/iii/adventureimages/darkness.gif", "the darkness",100,100);
Those are 3 examples. It is not really "/iii", although it could be.
So How do I tell, for sure, what the new monster is? MONSTERID on the page is the old monster.
The response to the next action - which could twiddling your thumbs - has the new MONSTERID.
So that is the guaranteed way to tell what the replacement monster is. Unfortunately, it requires an action.
How about looking up the monster by name? That works for "a newt", but there multiple Orcish Frat Boys:
62 = fratboy.gif
63 = fratboy.gif
64 = fratskirt.gif
527 = fratboy.gif (War Pledge)
(War Pledge shares the same image, which makes looking up by image even more complicated.)
Similarly for Ninja Snowman:
338 = ninjarice.gif
137 = snowman.gif
100 = snowman.gif
factory workers and factory overseers and mine workers and mine overseers all have male and female versions - but the images are distinct, at least.
I would like to be able to get the MONSTERID of the transformed monster from the same response text where the transformation happens.
I suggest the following:
newpic("/iii/adventureimages/newt.gif", "a newt",100,100,MONSTERID);
newpic("/iii/adventureimages/fratboy.gif", "an Orcish Frat Boy",100,100,MONSTERID);
newpic("/iii/adventureimages/darkness.gif", "the darkness",100,100,-1);
KoL doesn't need that in order to render the monster transformation, but it would make KoLmafia's life a lot easier.
Thanks for reading this bug report.