Skip to content

Commit

Permalink
bugfixes + finalizing scepter hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
docrostov committed Aug 7, 2023
1 parent bee97ee commit 11f2e0e
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 18 deletions.
91 changes: 78 additions & 13 deletions Source/relay/TourGuide/Items of the Month/2023/August Scepter.ash
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,46 @@ static {
initializeAugustSkills();
}


// Associate skill names with the thing they give you
static {
string [string] __augSkillsToValue;
void initializeAugustSkills() {
__augSkillsToValue["Aug. 1st: Mountain Climbing Day!"] = "a +adv buff";
__augSkillsToValue["Aug. 2nd: Find an Eleven-Leaf Clover Day"] = "lucky!";
__augSkillsToValue["Aug. 3rd: Watermelon Day!"] = "a watermelon";
__augSkillsToValue["Aug. 4th: Water Balloon Day!"] = "three water balloons";
__augSkillsToValue["Aug. 5th: Oyster Day!"] = "some oyster eggs";
__augSkillsToValue["Aug. 6th: Fresh Breath Day!"] = "a +com buff";
__augSkillsToValue["Aug. 7th: Lighthouse Day!"] = "a item/meat buff";
__augSkillsToValue["Aug. 8th: Cat Day!"] = "a catfight, meow";
__augSkillsToValue["Aug. 9th: Hand Holding Day!"] = "a foe's hand held";
__augSkillsToValue["Aug. 10th: World Lion Day!"] = "roars like a lion";
__augSkillsToValue["Aug. 11th: Presidential Joke Day!"] = "myst stats";
__augSkillsToValue["Aug. 12th: Elephant Day!"] = "mus stats";
__augSkillsToValue["Aug. 13th: Left/Off Hander's Day!"] = "double offhands";
__augSkillsToValue["Aug. 14th: Financial Awareness Day!"] = "bad meatgain";
__augSkillsToValue["Aug. 15th: Relaxation Day!"] = "a full heal";
__augSkillsToValue["Aug. 16th: Roller Coaster Day!"] = "-full & +food%";
__augSkillsToValue["Aug. 17th: Thriftshop Day!"] = "a 1000 meat coupon";
__augSkillsToValue["Aug. 18th: Serendipity Day!"] = "a bunch of items";
__augSkillsToValue["Aug. 19th: Honey Bee Awareness Day!"] = "stalked by bees";
__augSkillsToValue["Aug. 20th: Mosquito Day!"] = "HP regen";
__augSkillsToValue["Aug. 21st: Spumoni Day!"] = "stats of all kinds";
__augSkillsToValue["Aug. 22nd: Tooth Fairy Day!"] = "a free tooth monster";
__augSkillsToValue["Aug. 23rd: Ride the Wind Day!"] = "mox stats";
__augSkillsToValue["Aug. 24th: Waffle Day!"] = "three waffles";
__augSkillsToValue["Aug. 25th: Banana Split Day!"] = "a banana split";
__augSkillsToValue["Aug. 26th: Toilet Paper Day!"] = "some toilet paper";
__augSkillsToValue["Aug. 27th: Just Because Day!"] = "three random effects";
__augSkillsToValue["Aug. 28th: Race Your Mouse Day!"] = "a melting fam equip";
__augSkillsToValue["Aug. 29th: More Herbs, Less Salt Day!"] = "a food stat enhancer";
__augSkillsToValue["Aug. 30th: Beach Day!"] = "a +7 adv accessory";
__augSkillsToValue["Aug. 31st: Cabernet Sauvignon Day!"] = "two bottles of +booze% wine";
}
initializeAugustSkills();
}

// Convert the user's mainstat to an August statgain skill
int mainstatAugustSkill() {
switch (my_primestat())
Expand Down Expand Up @@ -72,8 +112,8 @@ void IOTMAugustScepterGenerateResource(ChecklistEntry [int] resource_entries)
int skillsAvailable = 5 - get_property_int("_augSkillsCast");
if (skillsAvailable < 1) return;

// Initialize a list of "used" skills for tooltip purposes later.
string [int] usedAugustSkills;
// A string for demarcation of 30 turn buffs
string buffString = HTMLGenerateSpanFont(" (buff)", "gray", "0.9em");

// Similar to calculate the universe, store reasons why things have value while using
// the day as the key. Should make the tile less painful to read, though a bit more
Expand All @@ -92,7 +132,6 @@ void IOTMAugustScepterGenerateResource(ChecklistEntry [int] resource_entries)

// Skip the tile-creation logic for that guy if the skill has already been cast.
if (get_property_boolean(augSkillPref)) {
usedAugustSkills.listAppend(augSkillName);
continue;
}

Expand Down Expand Up @@ -120,7 +159,7 @@ void IOTMAugustScepterGenerateResource(ChecklistEntry [int] resource_entries)
}

if (augSkillNumber == 30) {
usefulAugustSkills[30] = "+7 advs rollover accessory"+HTMLGenerateSpanFont("(melting)", "gray", "0.9em");
usefulAugustSkills[30] = "+7 advs rollover accessory "+HTMLGenerateSpanFont("(melting)", "gray", "0.9em");
}
}

Expand All @@ -135,13 +174,13 @@ void IOTMAugustScepterGenerateResource(ChecklistEntry [int] resource_entries)
if (manorCheck) {
// Only need booze drop if you don't already have vinegar
if ($item[bottle of Chateau de Vinegar].available_amount() == 0) {
if (augSkillNumber == 31) usefulAugustSkills[31] = "+100% booze drop liquor "+HTMLGenerateSpanFont("(Chateau de Vinegar!)", "gray", "0.9em");
if (augSkillNumber == 31) usefulAugustSkills[31] = "+100% booze drop wine "+HTMLGenerateSpanFont("(chateau de vinegar!)", "gray", "0.9em");
}

}

// +item/meat is always good times
if (augSkillNumber == 7) usefulAugustSkills[7] = "+50% item, +100% meat "+HTMLGenerateSpanFont("(30 turns)", "gray", "0.9em");
if (augSkillNumber == 7) usefulAugustSkills[7] = "+50% item, +100% meat"+buffString;

// LUCKY!; 2, but important! 21/31 skills
if (augSkillNumber == 2) usefulAugustSkills[2] = "get Lucky!";
Expand All @@ -157,34 +196,34 @@ void IOTMAugustScepterGenerateResource(ChecklistEntry [int] resource_entries)

// +COM FOR NINJAS; kind of a crock but why not (6) 25/31
if (!__quest_state["Level 8"].state_boolean["Mountain climbed"]) {
if (augSkillNumber == 6) usefulAugustSkills[6] = "+10% combat "+HTMLGenerateSpanFont("(30 turns)", "gray", "0.9em");
if (augSkillNumber == 6) usefulAugustSkills[6] = "+10% combat"+buffString;
}

// HAND HOLDING; we still don't know exactly what this does (9) 26/31
if (augSkillNumber == 9) usefulAugustSkills[9] = "hold hands for a minor sniff";

// LION BANISH; definitely worth calling out; NOT a killbanish (10) 27/31
if (augSkillNumber == 10) usefulAugustSkills[10] = "non-free reusable banishes"+HTMLGenerateSpanFont("(30 turns)", "gray", "0.9em");
if (augSkillNumber == 10) usefulAugustSkills[10] = "non-free reusable banishes"+buffString;

// OFFHAND DOUBLER; wild stuff folks (13) 28/31
int usefulOffhands = $item[deck of lewd playing cards].available_amount();
int protestorsRemaining = clampi(80 - get_property_int("zeppelinProtestors"), 0, 80);

if (usefulOffhands > 0 && protestorsRemaining > 10) {
// you could probably add a few other things to this, like -ML for goo or big smithsness. but eh.
if (augSkillNumber == 13) usefulAugustSkills[13] = "double offhand enchantments "+HTMLGenerateSpanOfClass("(sleaze for protestors)", "r_element_sleaze_desaturated");
if (augSkillNumber == 13) usefulAugustSkills[13] = "double offhand enchantments "+HTMLGenerateSpanOfClass("(sleaze ", "r_element_sleaze_desaturated")+"for protestors)";
}

// SAVE 1000 MEAT; barely useful, only show if they're strapped (17) 29/31

// CRAZY HORSE RETURNS; just because (27) 30/31
string randomInRainbow = HTMLGenerateSpanOfClass("r", "r_element_hot_desaturated")+HTMLGenerateSpanOfClass("a", "r_element_stench_desaturated")+HTMLGenerateSpanOfClass("n", "r_element_sleaze_desaturated")+HTMLGenerateSpanOfClass("d", "r_element_cold_desaturated")+HTMLGenerateSpanOfClass("o", "r_element_spooky_desaturated")+HTMLGenerateSpanOfClass("m", "r_element_hot_desaturated");
if (augSkillNumber == 27) usefulAugustSkills[27] = "+3 "+randomInRainbow+" effects"+HTMLGenerateSpanFont("(30 turns)", "gray", "0.9em");
if (augSkillNumber == 27) usefulAugustSkills[27] = "+3 "+randomInRainbow+" effects"+buffString;

// +10 FAM WEIGHT; this won't appear in modern standard lol (28) 31/31
if (__misc_state["free runs usable"] && ($familiar[pair of stomping boots].familiar_is_usable() || ($skill[the ode to booze].skill_is_usable() && $familiar[Frumious Bandersnatch].familiar_is_usable()))) {
if ($item[astral pet sweater].available_amount() == 0) {
if (augSkillNumber == 28) usefulAugustSkills[28] = "+10 weight familiar equipment"+HTMLGenerateSpanFont("(melting)", "gray", "0.9em");
if (augSkillNumber == 28) usefulAugustSkills[28] = "+10 weight familiar equipment "+HTMLGenerateSpanFont("(melting)", "gray", "0.9em");
}
}
}
Expand All @@ -203,7 +242,7 @@ void IOTMAugustScepterGenerateResource(ChecklistEntry [int] resource_entries)
table_description += "|*" + HTMLGenerateSimpleTableLines(table);

// Summary of the august tile
string summarizeAugust = "Celebrate August tidings with your cherished scepter; cast skills corresponding to the given day to get valuable buffs, items, and benefits.";
string summarizeAugust = "Celebrate August tidings; cast skills corresponding to the given day to get valuable benefits.";

if (table_description != "")
description.listAppend(summarizeAugust + table_description);
Expand All @@ -212,6 +251,32 @@ void IOTMAugustScepterGenerateResource(ChecklistEntry [int] resource_entries)

string title = "Cast "+pluralise(skillsAvailable, "August Scepter skill", "August Scepter skills");

resource_entries.listAppend(ChecklistEntryMake("__item August Scepter", "skillz.php", ChecklistSubentryMake(title, "", description), -1).ChecklistEntrySetIDTag("August Scepter resource"));
string subtitle = "all buffs are 30 turns";

// Make a big tooltip with all skills & their results listed out and colored
string [int] [int] allSkills;
int todaySkillInt = today_to_string().to_int() % 100;

allSkills.listAppend(listMake(HTMLGenerateSpanOfClass("Day", "r_bold"), HTMLGenerateSpanOfClass("Gives you...", "r_bold")));

foreach augSkill, augSkillValue in __augSkillsToValue {
string lineColor = "black";
int augSkillNumber = grabNumber(augSkill);

// Color the "free" skill in blue if they're in aftercore
if (!__misc_state["in run"] && augSkillNumber == todaySkillInt) lineColor = "blue";
if (get_property_boolean(__augSkillsToVars[augSkill])) lineColor = "gray";

allSkills.listAppend(listMake(HTMLGenerateSpanFont(augSkillNumber, lineColor),HTMLGenerateSpanFont(augSkillValue, lineColor)));
}

// give a tip of the cap to the ol tools here
buffer tooltip;
tooltip.append(HTMLGenerateTagWrap("div", "No, TourGuide, show me ALL the skills", mapMake("class", "r_bold r_centre", "style", "padding-bottom:0.25em;")));
tooltip.append(HTMLGenerateSimpleTableLines(allSkills));
string tooltipEnumerated = HTMLGenerateSpanOfClass(HTMLGenerateSpanOfClass(tooltip, "r_tooltip_inner_class r_tooltip_inner_class_margin") + "ALL the dang skills", "r_tooltip_outer_class");
description.listAppend(tooltipEnumerated);

resource_entries.listAppend(ChecklistEntryMake("__item August Scepter", "skillz.php", ChecklistSubentryMake(title, subtitle, description), -1).ChecklistEntrySetIDTag("August Scepter resource"));

}
9 changes: 5 additions & 4 deletions Source/relay/TourGuide/Sets/Lucky.ash
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ string [int] luckyOptions(int cloversAvailable) {
// Very basic protestors calculations with rough amounts for certain
// weird paths. Assumption in standard/unrestricted is 3-clover mob.
int protestorsRemaining = clampi(80 - get_property_int("zeppelinProtestors"), 0, 80);
int protestorsPerClover = 27;
if (__quest_state["Level 11"].mafia_internal_step < 3) protestorsRemaining = 80;
int protestorsPerClover = 27; // 3 clover mob

switch (my_path()) {
case $path[Legacy of Loathing]:
Expand All @@ -25,7 +26,7 @@ string [int] luckyOptions(int cloversAvailable) {

// Variables needed for a-boo nonsense
int aBooHauntedness = __quest_state["Level 9"].state_int["a-boo peak hauntedness"];
int cluesNeeded = ceil(MIN(aBooHauntedness, 90).to_float() / 30.0);
int cluesNeeded = ceil(MIN(aBooHauntedness, 100).to_float() / 30.0);
int aBooCloversNeeded = ceil(cluesNeeded/2);

// Desert ultrahydrated remaining
Expand All @@ -51,7 +52,7 @@ string [int] luckyOptions(int cloversAvailable) {

if (!__quest_state["Level 8"].state_boolean["Past mine"] && $location[Itznotyerzitz Mine].locationAvailable())
allTheLuckyStuff.listAppend("Ore");
if (protestorsRemaining > 10 && protestorsPerClover > 10)
if (protestorsRemaining > 10 && protestorsPerClover > 15)
allTheLuckyStuff.listAppend("Zeppelin Mob (x"+projectedZeppClovers+")");
cloversAdjusted = MAX(cloversAdjusted - projectedZeppClovers, 3);
if (__misc_state["wand of nagamar needed"] && lettersStillNeeded > 0)
Expand All @@ -67,7 +68,7 @@ string [int] luckyOptions(int cloversAvailable) {
string [int] selectedOptions;

foreach key, luckyStuff in allTheLuckyStuff {
if (key < cloversAdjusted + 1) selectedOptions.listAppend(luckyStuff);
if (key < cloversAdjusted) selectedOptions.listAppend(luckyStuff);
}

return selectedOptions;
Expand Down
2 changes: 1 addition & 1 deletion Source/relay/TourGuide/Sets/Sneaks.ash
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void SocialDistanceGenerator(ChecklistEntry [int] resource_entries)

int spikosLeft = clampi(5 - get_property_int("_spikolodonSpikeUses"), 0, 5);

final.sneakCondition = lookupItem("jurassic parka").have();
final.sneakCondition = __iotms_usable[$item[Jurassic Parka]];
final.sneakCount = spikosLeft;
final.tileDescription = `<b>{spikosLeft}x spikolodon spikes</b> left`;
return final;
Expand Down

0 comments on commit 11f2e0e

Please sign in to comment.