New Content - Implemented January 2016 IotM: X-32-F snowman crate

It would be a nice feature if fight.php was decorated with a count of the snowman's segments.

That way you could easily see when you'd defeated the ten-segment snowman, and no longer have free fights left.
 
and/or start annotating the fight again link with a '1 adventure' or whatever. something similar would be useful for under water areas (sea, ice hole, sunken party yacht) for when you run out of fishy.
 
Perhaps FightRequest.parseFightHTML could look for that kind of table node and parse it to call MonsterStatusTracker.setManuelStats( attack, defense, hp ), if there is no "var monsterstats" in the text.

That is done in 16608. Since the code has to be there to handle it regardless, stats are always parsed from there and the javascript variable is no longer used.
 
This is really darn simple, but maybe someone else will want to borrow it. I added this place.snojo.ash to my /relay folder...

Code:
// place.php?whichplace=snojo
buffer snojo(buffer page) {
	buffer snojo;
	snojo.append('<p><table style="border-spacing: 6px 0px; color:');
	if(get_property("_snojoFreeFights").to_int() > 9)
		snojo.append('red');
	else
		snojo.append('blue');
	snojo.append('"><tr><td>Free Fights Today</td><td>');
	snojo.append(get_property("_snojoFreeFights"));
	snojo.append(' / 10</td></tr><tr><td>Snojo Mode</td><td>');
	snojo.append(to_lower_case(get_property("snojoSetting")));
	snojo.append('</td></tr><tr><td>Moxie Wins</td><td>');
	snojo.append(get_property("snojoMoxieWins"));
	snojo.append('</td></tr><tr><td>Muscle Wins</td><td>');
	snojo.append(get_property("snojoMuscleWins"));
	snojo.append('</td></tr><tr><td>Myst Wins</td><td>');
	snojo.append(get_property("snojoMysticalityWins"));
	snojo.append('</td></tr></table>');
	
	int i = page.index_of('<p><a href=place.php');
	if(i> 0)
		page.insert(i, snojo);
	
	return page;
}


void main() {
	visit_url().snojo().write();
}
 
This is really darn simple, but maybe someone else will want to borrow it. I added this place.snojo.ash to my /relay folder...

Code:
// place.php?whichplace=snojo
buffer snojo(buffer page) {
	buffer snojo;
	snojo.append('<p><table style="border-spacing: 6px 0px; color:');
	if(get_property("_snojoFreeFights").to_int() > 9)
		snojo.append('red');
	else
		snojo.append('blue');
	snojo.append('"><tr><td>Free Fights Today</td><td>');
	snojo.append(get_property("_snojoFreeFights"));
	snojo.append(' / 10</td></tr><tr><td>Snojo Mode</td><td>');
	snojo.append(to_lower_case(get_property("snojoSetting")));
	snojo.append('</td></tr><tr><td>Moxie Wins</td><td>');
	snojo.append(get_property("snojoMoxieWins"));
	snojo.append('</td></tr><tr><td>Muscle Wins</td><td>');
	snojo.append(get_property("snojoMuscleWins"));
	snojo.append('</td></tr><tr><td>Myst Wins</td><td>');
	snojo.append(get_property("snojoMysticalityWins"));
	snojo.append('</td></tr></table>');
	
	int i = page.index_of('<p><a href=place.php');
	if(i> 0)
		page.insert(i, snojo);
	
	return page;
}


void main() {
	visit_url().snojo().write();
}

Thank you, Bale! This is wonderful.
 
Worked fine for me, did you have a text changing effect on at the time?

Code:
> prefref dna

_dnaHybrid(user, now 'false', default false)
_dnaPotionsMade(user, now '0', default 0)
dnaSyringe(user, now '', default )

[361] The X-32-F Combat Training Snowman
Encounter: the X-32-F Combat Training Snowman
Round 0: darzil wins initiative!
Round 1: You lose 1 hit point
Round 1: darzil uses the DNA extraction syringe!

> prefref dna

_dnaHybrid(user, now 'false', default false)
_dnaPotionsMade(user, now '0', default 0)
dnaSyringe(user, now 'construct', default )
 
Worked fine for me, did you have a text changing effect on at the time?

Sorry, you are absolutely right. I mixed up the snojo and the machine elf. I have re-confirmed that dnaSyringe does not update when extracting from an enemy in The Deep Machine Tunnels. I presume it is because of the different messaging. Here is the message I received:

Code:
A dim cylinder is here, and it performs its function.
 
This is the wrong thread for the problem then, but I'm not sure that KoLmafia could possibly figure out if it worked there since the DMT zone has messed up random combat messages.
 
Thank you, Bale! This is wonderful.

I've now got a much (MUCH!) better version of place.snojo.ash in my /relay folder...

Code:
buffer snojo_row(string mode, string it, item eq) {
	buffer row;
	int wins = to_int(get_property("snojo" + mode + "Wins"));
	row.append('<tr><td>');
	row.append(mode);
	row.append('</td><td>');
	row.append(wins);
	row.append('</td><td>');
	row.append(it);
	row.append('</td><td>');
	row.append(7 - wins % 7);
	row.append(' wins</td><td style="color:');
	if(available_amount(eq) > 0)
		row.append('green"> ✓ ');
	else 
		row.append('red"> ✗ ');
	row.append(eq);
	row.append('</td></tr>');
	return row;
}

// place.php?whichplace=snojo
buffer snojo(buffer page) {
	buffer snojo;
	
	// Snojo Training available today?
	snojo.append('<p><table style="border-spacing: 6px 0px; color:');
	if(get_property("_snojoFreeFights").to_int() > 9)
		snojo.append('red');
	else
		snojo.append('green');
	snojo.append('"><tr><td>Free Fights Today</td><td>');
	snojo.append(get_property("_snojoFreeFights"));
	snojo.append(' / 10</td></tr><tr><td>Snojo Mode</td><td>');
	snojo.append(to_lower_case(get_property("snojoSetting")));
	snojo.append('</td></tr></table>');
	
	// What's up in the Snojo next
	snojo.append('<p><table style="border-spacing: 6px 0px; color:blue"><tr><th>Mode</th><th>Wins</th><th>Consumable</th><th>Next</th><th>Equipment</th></tr>');
	snojo.append(snojo_row("Muscle", "ancient herbs", $item[training belt]));
	snojo.append(snojo_row("Mysticality", "ice rice", $item[training legwarmers]));
	snojo.append(snojo_row("Moxie", "iced plum wine", $item[training helmet]));
	snojo.append('</table>');
	
	int i = page.index_of('<p><a href=place.php');
	if(i> 0)
		page.insert(i, snojo);
	
	return page;
}


void main() {
	visit_url().snojo().write();
}

That version actually has all the information I need to make good judgments about my training mode. Anyone who was using the old version should update to this. Enjoy!
 
Back
Top