Skip to content

Commit

Permalink
2.2.0; pull list rework, banisher bugfixes, ghosts
Browse files Browse the repository at this point in the history
rework of tourguide pull list & minor bugfixes
  • Loading branch information
docrostov authored Sep 9, 2023
2 parents 09e0658 + d7681cf commit a63913b
Show file tree
Hide file tree
Showing 8 changed files with 857 additions and 421 deletions.
1,216 changes: 816 additions & 400 deletions Source/relay/TourGuide/Pulls.ash

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Source/relay/TourGuide/Quests/Spookyraven Lights Out.ash
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void QSpookyravenLightsOutGenerateEntry(ChecklistEntry [int] task_entries, Check
available_questlines.listAppend("Elizabeth");
if (available_questlines.count() > 0)
{
optional_task_entries.listAppend(ChecklistEntryMake("__half Lights Out", "", ChecklistSubentryMake("Lights Out in " + pluralise(turns_until_next_lights_out, "adventure", "adventures"), "", available_questlines.listJoinComponents(",", "and") + " quest " + (available_questlines.count() > 1 ? "lines" : "line") + "."), (from_task ? 5 : 8)).ChecklistEntrySetIDTag("Manor lights out prediction")); //difference if they come from task or not?
optional_task_entries.listAppend(ChecklistEntryMake("__half Lights Out", "", ChecklistSubentryMake("Lights Out in " + pluralise(turns_until_next_lights_out, "adventure", "adventures"), "", available_questlines.listJoinComponents(", ", "and") + " quest " + (available_questlines.count() > 1 ? "lines" : "line") + "."), (from_task ? 5 : 8)).ChecklistEntrySetIDTag("Manor lights out prediction")); //difference if they come from task or not?
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/relay/TourGuide/Sections/Messages.ash
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ string generateRandomMessage()
}
while (commands.count() > 6)
remove commands[commands.listKeyForIndex(0)];
set_property("__voices", commands.listJoinComponents(",") + "|"); //we add an ending sentinel because set_property() will remove ";" if it's at the end of the string. set_property() is not guaranteed to keep data integrity
set_property("__voices", commands.listJoinComponents(", ") + "|"); //we add an ending sentinel because set_property() will remove ";" if it's at the end of the string. set_property() is not guaranteed to keep data integrity

random_messages.listClear();

Expand Down
8 changes: 6 additions & 2 deletions Source/relay/TourGuide/Sets/Active Banishes.ash
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ string DescribeThisBanish(Banish b) {
int turnsSinceBanish = my_turncount() - banishTurn;
int turnsOfBanishLeft = banishLength - turnsSinceBanish;

if (source == "Bowl a Curveball") {
turnsOfBanishLeft = get_property_int("cosmicBowlingBallReturnCombats");
}

if (turnsOfBanishLeft < 0) {
return "";
}
Expand Down Expand Up @@ -73,7 +77,7 @@ string DescribeThisBanish(BanishedPhylum b) {

int turnsSinceBanish = my_turncount() - banishTurn;
int turnsOfBanishLeft = banishLength - turnsSinceBanish;

if (turnsOfBanishLeft < 0) {
return "";
}
Expand Down Expand Up @@ -166,7 +170,7 @@ void ActiveBanishesList(ChecklistEntry [int] resource_entries)
phylum phylumBanished = $phylum[none];
int monsterCount = 0;

if (phylaResult.length() > 0) {
if (phylaResult.count() > 0) {
name = "Current Phyla Banished";

int screechCharge = get_property_int("screechCombats");
Expand Down
28 changes: 14 additions & 14 deletions Source/relay/TourGuide/Sets/Fax.ash
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ string [int] SFaxGeneratePotentialFaxes(boolean suggest_less_powerful_faxes, boo

if (__misc_state["in run"])
{

if (!familiar_is_usable($familiar[angry jung man]))
{
//Can't pull for jar of psychoses, no jung man...
//It's time for a g-g-g-ghost! zoinks!
if (!__quest_state["Level 13"].state_boolean["digital key used"] && ($item[digital key].available_amount() + creatable_amount($item[digital key])) == 0)
{
string line = "Ghost - only if you can copy it.";
if (can_arrow)
line += " (arrow?)";
line += "|*5 white pixels drop per ghost, speeds up digital key. Run +150% item.";
potential_faxes.listAppend(line);
}
}
// Remove Ghost because it is now bad now that you don't actually need white pixels.
// if (!familiar_is_usable($familiar[angry jung man]))
// {
// //Can't pull for jar of psychoses, no jung man...
// //It's time for a g-g-g-ghost! zoinks!
// if (!__quest_state["Level 13"].state_boolean["digital key used"] && ($item[digital key].available_amount() + creatable_amount($item[digital key])) == 0)
// {
// string line = "Ghost - only if you can copy it.";
// if (can_arrow)
// line += " (arrow?)";
// line += "|*5 white pixels drop per ghost, speeds up digital key. Run +150% item.";
// potential_faxes.listAppend(line);
// }
// }
//sleepy mariachi
if (familiar_is_usable($familiar[fancypants scarecrow]) || familiar_is_usable($familiar[mad hatrack]))
{
Expand Down
2 changes: 1 addition & 1 deletion Source/relay/TourGuide/Settings.ash
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//These settings are for development. Don't worry about editing them.
string __version = "2.1.0";
string __version = "2.2.0"; // pushed to 2.2.0 on new pull list refactor

//Path and name of the .js file. In case you change either.
string __javascript = "TourGuide/TourGuide.js";
Expand Down
17 changes: 16 additions & 1 deletion Source/relay/TourGuide/State.ash
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,22 @@ void setUpState()
//monster.monster_initiative() is usually what you need, but just in case:
__misc_state_float["init ML penalty"] = monsterExtraInitForML(monster_level_adjustment_ignoring_plants());
// Make a state variable re: zap wand ownership
__misc_state["zap wand owned"] = false;
item zap_wand_owned;
if (true) {
zap_wand_owned = $item[none];
foreach wand in $items[aluminum wand,ebony wand,hexagonal wand,marble wand,pine wand] {
if (wand.available_amount() > 0) {
zap_wand_owned = wand;
break;
}
}
}
if (zap_wand_owned != $item[none]) __misc_state["zap wand owned"] = true;
int ngs_needed = 0;
Expand Down
3 changes: 2 additions & 1 deletion Source/relay/TourGuide/Support/Banishers.ash
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ static
__banish_source_length["system sweep"] = -1;
__banish_source_length["feel hatred"] = 50;
__banish_source_length["show your boring familiar pictures"] = 100;
__banish_source_length["bowl a curveball"] = 5;
__banish_source_length["patriotic screech"] = 100;
__banish_source_length["bowl a curveball"] = get_property_int("cosmicBowlingBallReturnCombats");
__banish_source_length["monkey slap"] = 1234567; // this, for some reason, was not properly respecting the reset condition. so imma just do this to hopefully solve it.

int [string] __banish_simultaneous_limit;
Expand Down Expand Up @@ -145,6 +145,7 @@ Banish [int] BanishesActive()
b.banish_turn_length = 0;
if (__banish_source_length contains b.banish_source.to_lower_case())
b.banish_turn_length = __banish_source_length[b.banish_source.to_lower_case()];
if (b.banish_source == "bowl a curveball") b.banish_turn_length = get_property_int("cosmicBowlingBallReturnCombats");
if (b.banish_source == "batter up!" || b.banish_source == "deathchucks" || b.banish_source == "dirty stinkbomb" || b.banish_source == "nanorhino" || b.banish_source == "spooky music box mechanism" || b.banish_source == "ice hotel bell" || b.banish_source == "beancannon" || b.banish_source == "monkey slap")
b.custom_reset_conditions = "rollover";
if (b.banish_source == "ice house" && (!$item[ice house].is_unrestricted() || in_bad_moon())) //not relevant
Expand Down

0 comments on commit a63913b

Please sign in to comment.