Skip to content

[Feature]: organ extender megatile #282

@uthuluc

Description

@uthuluc

BIG WIP

RegisterResourceGenerationFunction("OrganoGenerateResource");
void OrganoGenerateResource(ChecklistEntry [int] resource_entries)
{
	int bonusStomach;
	int bonusLiver;
	int bonusSpleen;
	string [int] description;
	string [int] stomachDescription;
	string [int] liverDescription;
	string [int] spleenDescription;
	string title = "Organ Extenders";
	
	// Build out all the organ extendres.
	if (get_property_boolean("spiceMelangeUsed") == false) {
		bonusStomach += 3;
		bonusLiver += 3;
		stomachDescription.listAppend("+3: Spice melange");
		liverDescription.listAppend("+3: Spice melange");
	}
	if (get_property_boolean("_ultraMegaSourBallUsed") == false) {
		bonusStomach += 3;
		bonusLiver += 3;
		stomachDescription.listAppend("+3: UMSB");
		liverDescription.listAppend("+3: UMSB");
	}	
	int mojosLeft = clampi(3 - get_property_int("currentMojoFilters"), 0, 3);
	if (mojosLeft > 0) {
		bonusSpleen += mojosLeft;
		spleenDescription.listAppend("+" + mojosLeft + ": mojo filter");
	}	
	if ($item[august scepter].available_amount() > 0 && get_property_boolean("_aug16Cast") == false) {
		bonusStomach += 1;
		stomachDescription.listAppend("+1: Aug 16 Roller Coaster");
	}	
	if (get_property_boolean("_distentionPillUsed") == false) {
		bonusStomach += 1;
		stomachDescription.listAppend("+1: distension pill");
	}	
	int pantsgivingSpace = clampi(2 - get_property_int("_pantsgivingFullness"), 0, 2);
	if (pantsgivingSpace > 0) {
		bonusStomach += pantsgivingSpace;
		stomachDescription.listAppend("+" + pantsgivingSpace + ": Pantsgiving charges (" + (get_property_int("_pantsgivingCount")) + "/50 combats)");
	}
	if (get_property_boolean("_porkElfToiletUsed") == false) {
		bonusStomach += 1;
		stomachDescription.listAppend("+1: Pork Elf toilet rest");
	}	
	if (get_property_boolean("_sweetToothUsed") == false) {
		bonusStomach += 1;
		stomachDescription.listAppend("+1: sweet tooth");
	}	
	if (get_property_boolean("_voraciTeaUsed") == false) {
		bonusStomach += 1;
		stomachDescription.listAppend("+1: voraci tea");
	}	
	int sweatsLeft = clampi(3 - get_property_int("_sweatOutSomeBoozeUsed"), 0, 3);
	if ($item[designer sweatpants].available_amount() > 0 && sweatsLeft > 0) {
		bonusLiver += sweatsLeft;
		liverDescription.listAppend("+" + sweatsLeft + ": sweatpants sweat");
	}	
	if (get_property_boolean("_sobrieTeaUsed") == false) {
		bonusLiver += 1;
		liverDescription.listAppend("+1: sobrie tea");
	}	
	if (get_property_boolean("_syntheticDogHairPillUsed") == false) {
		bonusLiver += 1;
		liverDescription.listAppend("+1: synthetic dog hair pill");
	}
	//equippable +stomach
	if ($item[devilbone greaves].available_amount() > 0) {
		bonusSpleen += 1;
		spleenDescription.listAppend(HTMLGenerateSpanFont("+1: devilbone greaves", "purple") + "");
	}		
	if ($item[angelbone totem].available_amount() > 0) {
		bonusSpleen += 1;
		spleenDescription.listAppend(HTMLGenerateSpanFont("+1: angelbone totem", "purple") + "");
	}	//equippable +liver
	if ($item[angelbone dice].available_amount() > 0) {
		bonusLiver += 1;
		liverDescription.listAppend(HTMLGenerateSpanFont("+1: angelbone dice", "purple") + "");
	}		
	if ($item[devilbone rosary].available_amount() > 0) {
		bonusLiver += 1;
		liverDescription.listAppend(HTMLGenerateSpanFont("+1: devilbone rosary", "purple") + "");
	}	
	if (lookupFamiliar("Stooper").familiar_is_usable()) {
		bonusLiver += 1;
		liverDescription.listAppend(HTMLGenerateSpanFont("+1: Stooper", "purple") + "");
	}	//equippable +spleen
	if ($item[angelbone chopsticks].available_amount() > 0) {
		bonusStomach += 1;
		stomachDescription.listAppend(HTMLGenerateSpanFont("+1: angelbone chopsticks", "purple") + "");
	}	
	if ($item[devilbone corset].available_amount() > 0) {
		bonusStomach += 1;
		stomachDescription.listAppend(HTMLGenerateSpanFont("+1: devilbone corset", "purple") + "");
	}	
	//tally 'em up
	if (stomachDescription.count() > 0) {
		description.listAppend(HTMLGenerateSpanOfClass("" + bonusStomach + " extra stomach", "r_bold") + ":|*" + stomachDescription.listJoinComponents("|*"));
	}
	if (liverDescription.count() > 0) {
		description.listAppend(HTMLGenerateSpanOfClass("" + bonusLiver + " extra Liver", "r_bold") + ":|*" + liverDescription.listJoinComponents("|*"));
	}
	if (spleenDescription.count() > 0) {
		description.listAppend(HTMLGenerateSpanOfClass("" + bonusSpleen + " extra Spleen", "r_bold") + ":|*" + spleenDescription.listJoinComponents("|*"));
	}
	resource_entries.listAppend(ChecklistEntryMake("__item moveable feast", "", ChecklistSubentryMake(title, description), 999).ChecklistEntrySetIDTag("organs resource"));
}```

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions