Feature - Implemented Support for portable photocopier / photocopied monster

slyz

Developer
Here is a patch that implements the handling of portable photocopiers and photocopied monsters. I mostly copied the code I found for the 4D-Camera, and tested the changes as much as I could.

One specificity of the portable photocopier is that it is useable from the inventory, creating a photocopied monster containing the "Your butt" monster (it is consumed on use). This part was tested.

Two new preferences were added: _photocopyUsed and photocopyMonster. I also added the "Your butt" and "someone else's butt" monsters.

Ideally, for photocopied monster obtained from a fax machine, KoLMafia could extract the name of the photocopied monster from the item description, but apparently it doesn't contain the full name of the monster, so some sort of fyzzy matching should be worked out. This part isn't done at all.

There is no support whatsoever for the Fax Machine though (see this feature request for implementation of Fax Machine support).
 

Attachments

  • photocopy.patch
    12.4 KB · Views: 38
Last edited:
Does this also work properly with respect to semi-rares?

I just used a KGE captain fax copy, and mafia thought it meant I just saw an actual semi-rare adventure and reset it's SR window counters. I'd definitely like to see that handled better.
 

slyz

Developer
In GenericRequest.java (copied from the 4D Camera part):
Code:
case ItemPool.PHOTOCOPIED_MONSTER:
	itemName = "photocopied monster";
	Preferences.setString( "photocopyMonster", "" );
	Preferences.setBoolean( "_photocopyUsed", true );
	consumed = true;
	[B]KoLmafia.ignoreSemirare();[/B]
	break;
so that's what this line does, I was wondering.

I guess it will work properly, the same way it does with putty and 4d cameras.
 
Last edited:

Theraze

Active member
If the 4D code was copied, it should work properly... there's special handling applied to hipster combats as well so it doesn't increment on camera/puttied.

Memory serves, the line that's important is the 'ignoreSemirare' in terms of making it skip the counters.
 

jasonharper

Developer
Would anyone object if I removed the automatic use of a photocopier if you have no remaining Spooky Putty or 4D camera uses? Consuming an irreplaceable item without warning strikes me as a horribly bad idea...
 
Top