Using Free Fights

syrinxlui

Member
Is there a way to make mafia use free fights that doesn't burn a turn? Like the 10 adventures in the snojo and the 5 adventures in the machine tunnels, etc. I know "adv 1 snojo" will use the 10 free fights and 1 paid one. Is there something like "adv 0 snojo"?

Thanks!
 

Crowther

Active member
I think the closest you can do is this:
Code:
while (get_property("_snojoFreeFights").to_int()<10) {
    adv1($location[The X-32-F Combat Training Snowman],-1,"");
}
If you need to use it on the CLI, then add "ashq " to the start and put it all on one line.
 

Crowther

Active member
You can look up properties using "prefref", but I didn't manage to figure out where the elf fights are stored. I don't have one myself.
 

ckb

Minion
Staff member
What is the difference between preference "_machineTunnelsAdv" and proxy record $familiar[machine elf].fights_today ?
 

heeheehee

Developer
Staff member
The latter doesn't require you to remember the preference name. Internally, it watches that same preference.
 

ckb

Minion
Staff member
Is there a reason that "_machineTunnelsAdv" is not included in defaults.txt?
Should it be?
 

Veracity

Developer
Staff member
All settings created and maintained by KoLmafia itself SHOULD be in defaults.txt. It's a common developer error to submit code that uses a new setting but to forget to put it there. It's a common developer response to fix it in a later submit. :)
 

syrinxlui

Member
So something changed. This line used to work fine (but it no longer stops since the variable seems to be always zero):
ashq while (get_property("_machineTunnelsAdv").to_int()<5) {adv1($location[the deep machine tunnels],-1,"");}

I'm thinking it might have something to do with this:
http://builds.kolmafia.us/job/Kolmafia/119/

So I tried this (but it doesn't stop either):
ashq while ($familiar[machine elf].fights_today<5) {adv1($location[the deep machine tunnels],-1,"");}

What am I doing incorrectly?
 

lostcalpolydude

Developer
Staff member
My first guess is that you aren't at the latest mafia version, because _machineTunnelsAdv is updating just fine for me.
 

Bale

Minion
Will verify that it works perfectly for me also...

PHP:
void machine_elf() {
	if(have_familiar($familiar[Machine Elf]) && $familiar[Machine Elf].fights_limit > $familiar[Machine Elf].fights_today) {
		use_familiar($familiar[Machine Elf]);
		while($familiar[Machine Elf].fights_limit > $familiar[Machine Elf].fights_today)
			adv1($location[The Deep Machine Tunnels], -1, "");
	}
}
 

syrinxlui

Member
Something strange seems to be going on for me then. I tried again with r16871. My script has this line:
ashq while (get_property("_machineTunnelsAdv").to_int()<5) {adv1($location[the deep machine tunnels],-1,"");}

And sure enough the fraction above the machine elf familiar icon didn't move and my elf started chewing adventures after 6 visits. So I did the stop all. Here's a screenshot of the state of things after I stopped it:
http://imgur.com/dWXgeUD

Any ideas what's going on?
 

lostcalpolydude

Developer
Staff member
My next guess is that you're wearing something that messes with text (maybe papier-mache stuff). Mafia looks for "time starts passing again" to increment that value.
 

syrinxlui

Member
Ahh, nice. I was using "maximize crit" right before and that was putting on the helps you sleep. Hopefully that fixes it up!
 
Top