Skip to content

Commit

Permalink
support configuring LED candle
Browse files Browse the repository at this point in the history
  • Loading branch information
Alium58 committed Oct 7, 2023
1 parent e3fc285 commit 2184bb9
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
2 changes: 2 additions & 0 deletions RELEASE/scripts/autoscend/auto_familiar.ash
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ familiar lookupFamiliarDatafile(string type)
//we do not want a fallback here. if no matching familiar is found then do nothing here, a familiar will be automatically set in pre adventure

auto_log_debug("lookupFamiliarDatafile is checking for type [" + type + "]");
// store what type of fam we are looking for
set_property("auto_lastFamiliarLoopupType",type);
string [string,int,string] familiars_text;
if(!file_to_map("autoscend_familiars.txt", familiars_text))
{
Expand Down
1 change: 1 addition & 0 deletions RELEASE/scripts/autoscend/auto_pre_adv.ash
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,7 @@ boolean auto_pre_adventure()
equipMaximizedGear();
auto_handleRetrocape(); // has to be done after equipMaximizedGear otherwise the maximizer reconfigures it
auto_handleParka(); //same as retrocape above
auto_handleJillOfAllTrades(); // need to configure jill to have desired bonus
cli_execute("checkpoint clear");

//before guaranteed non combats that give stats, overrule maximized equipment to increase stat gains
Expand Down
1 change: 1 addition & 0 deletions RELEASE/scripts/autoscend/autoscend_header.ash
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ boolean auto_haveAugustScepter();
void auto_scepterSkills();
void auto_lostStomach();
boolean auto_haveJillOfAllTrades();
void auto_handleJillOfAllTrades();

########################################################################################################
//Defined in autoscend/paths/actually_ed_the_undying.ash
Expand Down
58 changes: 58 additions & 0 deletions RELEASE/scripts/autoscend/iotms/mr2023.ash
Original file line number Diff line number Diff line change
Expand Up @@ -483,3 +483,61 @@ boolean auto_haveJillOfAllTrades()
}
return false;
}

string getParsedCandleMode()
{
// returns candle mode which matches our familiar categories
switch(get_property("ledCandleMode"))
{
case "disco":
return "item";
case "ultraviolet":
return "meat";
case "reading":
return "stat";
case "red":
return "boss";
default:
return "unknown";

}
}

void auto_handleJillOfAllTrades()
{
if (!auto_haveJillOfAllTrades() || item_amount($item[LED candle]) == 0)
{
return;
}

string currentMode = getParsedCandleMode();
// want to configure jill to have bonus of whatever fam type we last looked up
string desiredCandleMode = get_property("auto_lastFamiliarLoopupType");

if(currentMode == desiredCandleMode)
{
return;
}

switch(desiredCandleMode)
{
case "item":
case "regen":
cli_execute("jillcandle item");
break;
case "meat":
cli_execute("jillcandle meat");
break;
case "stat":
case "drop":
cli_execute("jillcandle stat");
break;
case "boss":
cli_execute("jillcandle attack");
break;
default:
abort("tried to configure Jill's LED Candle with a non-supported type");
}

return;
}

0 comments on commit 2184bb9

Please sign in to comment.