-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into tes-candy-cane-sword-cane
- Loading branch information
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
Source/relay/TourGuide/Items of the Month/2024/Chest Mimic.ash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters