Skip to content

Commit

Permalink
Merge branch 'main' into tes-candy-cane-sword-cane
Browse files Browse the repository at this point in the history
  • Loading branch information
docrostov authored Mar 2, 2024
2 parents 0f3f04c + df623cd commit b60b304
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
27 changes: 27 additions & 0 deletions Source/relay/TourGuide/Items of the Month/2024/Chest Mimic.ash
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//2024
//Chest Mimic
RegisterResourceGenerationFunction("IOTMChestMimicGenerateResource");
void IOTMChestMimicGenerateResource(ChecklistEntry [int] resource_entries)
{
if (!lookupFamiliar("Chest Mimic").familiar_is_usable()) return;

// Title
int famExperienceGain = numeric_modifier("familiar experience") + 1;
int chestExperience = ($familiar[chest mimic].experience);
int famExpNeededForNextEgg = (50 - (chestExperience % 50));
string fightsForNextEgg = pluralise(ceil(to_float(famExpNeededForNextEgg) / famExperienceGain), "fight", "fights");
int mimicEggsLeft = clampi(11 - get_property_int("_mimicEggsObtained"), 0, 11);

string [int] description;
string url = "familiar.php";
description.listAppend(`Currently have {HTMLGenerateSpanOfClass(chestExperience, "r_bold")} experience, currently gain {HTMLGenerateSpanOfClass(famExperienceGain, "r_bold")} fam exp per fight.`);
description.listAppend(`Need {HTMLGenerateSpanOfClass(famExpNeededForNextEgg, "r_bold")} more famxp for next egg. ({fightsForNextEgg})`);
description.listAppend(`Can lay {HTMLGenerateSpanOfClass(mimicEggsLeft, "r_bold")} more eggs today.`);

resource_entries.listAppend(ChecklistEntryMake("__familiar chest mimic", url, ChecklistSubentryMake("Chest mimic fxp", "", description), -2));
if ($item[mimic egg].available_amount() > 0) {
string header = $item[mimic egg].pluralise().capitaliseFirstLetter();
string url = `inv_use.php?pwd={my_hash()}&whichitem=11542`;
resource_entries.listAppend(ChecklistEntryMake("__item mimic egg", url, ChecklistSubentryMake(header, "", "Fight some copies"), -1).ChecklistEntrySetCombinationTag("fax and copies"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,7 @@ import "relay/TourGuide/Items of the Month/2023/August Scepter.ash";
import "relay/TourGuide/Items of the Month/2023/Book of Facts.ash";
import "relay/TourGuide/Items of the Month/2023/Jill of all Trades.ash";
import "relay/TourGuide/Items of the Month/2023/A Guide to Burning Leaves.ash";
import "relay/TourGuide/Items of the Month/2023/Candy Cane Sword Cane.ash";
import "relay/TourGuide/Items of the Month/2023/Candy Cane Sword Cane.ash";

// 2024
import "relay/TourGuide/Items of the Month/2024/Chest Mimic.ash";

0 comments on commit b60b304

Please sign in to comment.