Skip to content

Commit

Permalink
Merge branch 'main' into EagleScepter
Browse files Browse the repository at this point in the history
  • Loading branch information
dsimich committed Jan 7, 2025
2 parents 5adb109 + 9ebb776 commit 24fb96e
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Setup Java 17
uses: actions/setup-java@v2
- name: Setup Java 21
uses: actions/setup-java@v4.6.0
with:
distribution: "temurin"
java-version: "17"
java-version: "21"

- name: Determine KoLmafia version
id: mafia
Expand Down
29 changes: 29 additions & 0 deletions RELEASE/relay/relay_autoscend.ash
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,32 @@ void write_settings_key()
writeln("</table>");
}

void write_locations_visited()
{
// Display the locations we've spent turns

// Make a list of the locations we've visited
location[int] ranked_list;
foreach loc in $locations[]
{
if (loc.turns_spent > 0)
{
ranked_list[count(ranked_list)] = loc;
}
}
// Sort in descending order
sort ranked_list by -value.turns_spent;

// Write the table
writeln("<table style=\"margin-left:auto;margin-right:auto;\">");
writeln("<tr><th>Location</th> <th>Turns</th></tr>");
foreach i,loc in ranked_list
{
writeln("<tr><td>"+loc.to_string()+"</td><td>"+loc.turns_spent+"</td></tr>");
}
writeln("</table>");
}

void main()
{
auto_settings(); //runs every time. upgrades old settings to newest format, delete obsolete settings, and configures defaults.
Expand Down Expand Up @@ -345,6 +371,9 @@ void main()

//TODO: need way to track version independent of svn branch since you can have different branches checked out
writeln("Autoscend Version: " + autoscend_current_version() + "<br>");

writeln("<h2>Locations visited</h2>");
write_locations_visited();

writeln("<br>");
writeln("</body></html>");
Expand Down
2 changes: 2 additions & 0 deletions RELEASE/scripts/autoscend/auto_buff.ash
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
{
useSkill = $skill[Astral Shell];
} break;
case $effect[Attracting Snakes]: useSkill = $skill[Attract Snakes]; break;
case $effect[Attractive to Fire Ants]: useItem = $item[fire ant pheromones]; break;
case $effect[Aware of Bees]:
if(!get_property("_aug19Cast").to_boolean())
Expand Down Expand Up @@ -460,6 +461,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
case $effect[Heart of White]: useItem = $item[white candy heart]; break;
case $effect[Heart of Yellow]: useItem = $item[yellow candy heart]; break;
case $effect[Hide of Sobek]: useSkill = $skill[Hide of Sobek]; break;
case $effect[Hiding From Seekers]: useSkill = $skill[Hide From Seekers]; break;
case $effect[High Colognic]: useItem = $item[Musk Turtle]; break;
case $effect[Hippy Antimilitarism]: useItem = $item[mini kiwi antimilitaristic hippy petition]; break;
case $effect[Hippy Stench]: useItem = $item[reodorant]; break;
Expand Down
2 changes: 2 additions & 0 deletions RELEASE/scripts/autoscend/auto_providers.ash
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ float providePlusCombat(int amt, location loc, boolean doEquips, boolean specula
if (tryEffects($effects[
Musk of the Moose,
Carlweather's Cantata of Confrontation,
Attracting Snakes,
Blinking Belly,
Song of Battle,
Frown,
Expand Down Expand Up @@ -301,6 +302,7 @@ float providePlusNonCombat(int amt, location loc, boolean doEquips, boolean spec
Muffled,
Smooth Movements,
The Sonata of Sneakiness,
Hiding From Seekers,
Song of Solitude,
Inked Well,
Bent Knees,
Expand Down
10 changes: 10 additions & 0 deletions RELEASE/scripts/autoscend/auto_util.ash
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,12 @@ boolean canYellowRay(monster target)
{
return true;
}

// roman candelabra, also a 75 turn cooldown
if(auto_haveRoman() && auto_can_equip($item[Roman Candelabra]) && auto_is_valid($skill[Blow the Yellow Candle\!]))
{
return yellowRayCombatString(target, false, $monsters[bearpig topiary animal, elephant (meatcar?) topiary animal, spider (duck?) topiary animal, Knight (Snake)] contains target) != "";
}

if(auto_hasRetrocape())
{
Expand Down Expand Up @@ -1080,6 +1086,10 @@ boolean adjustForYellowRay(string combat_string)
{
auto_configureRetrocape("heck", "kiss");
}
if(combat_string == ("skill " + $skill[Blow the Yellow Candle\!]))
{
return autoEquip($slot[off-hand], wrap_item($item[Roman candelabra]));
}
// craft and consume 9-volt battery if we are using shocking lick and don't have any charges already
if(combat_string == ("skill " + $skill[Shocking Lick]) && get_property("shockingLickCharges").to_int() < 1)
{
Expand Down
2 changes: 1 addition & 1 deletion RELEASE/scripts/autoscend/iotms/mr2023.ash
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ boolean auto_circadianRhythmTarget(phylum target)
{
return false;
}
if (!($phylums[Orc, Hippy] contains target) && $locations[The Battlefield (Hippy Uniform), The Battlefield (Frat Uniform)] contains my_location())
if (!($phylums[Orc, Hippy] contains target && $locations[The Battlefield (Hippy Uniform), The Battlefield (Frat Uniform)] contains my_location()))
{
return false;
}
Expand Down

0 comments on commit 24fb96e

Please sign in to comment.