Skip to content

Commit

Permalink
Add support for burning leaf fights to powerlevel task
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewRhoades committed Jan 14, 2025
1 parent 57d5219 commit e3e90b7
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
22 changes: 22 additions & 0 deletions RELEASE/scripts/autoscend/auto_powerlevel.ash
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,28 @@ boolean LX_freeCombats(boolean powerlevel)
adv_done = autoAdv(1, $location[An Unusually Quiet Barroom Brawl]);
if(adv_done) return true;
}
if(auto_haveBurningLeaves() && get_property("_leafMonstersFought).to_int() < 5) {
auto_log_debug("LX_freeCombats is summoning leaf monsters");
int remainingLeafFights = get_property("_leafMonstersFought).to_int();
while(remainingLeafFights > 0 && item_amount($item[inflammable leaf]) >= 11){
remainingLeafFights--;
if(item_amount($item[inflammable leaf]) >= 666 + (11 * remainingLeafFights)) {
if (!fightLeaviathan()) {
auto_log_debug("Failed to summon leaviathan");
}
} else if(item_amount($item[inflammable leaf]) >= 111 + (11 * remainingLeafFights)) {
if (!fightFlamingMonstera()) {
auto_log_debug("Failed to summon flaming monstera");
}
} else {
if (!fightFlamingLeaflet()) {
auto_log_debug("Failed to summon flaming leaflet");
}
}
}
}
// tentacle should be last so it can be backed up, if script wants to
// see auto_backupTarget()
Expand Down
33 changes: 33 additions & 0 deletions RELEASE/scripts/autoscend/iotms/mr2023.ash
Original file line number Diff line number Diff line change
Expand Up @@ -989,3 +989,36 @@ void auto_useWardrobe()
// let maximizer handle if any of it is worth equipping
use($item[wardrobe-o-matic]);
}

boolean fightFlamingLeaflet() {
if(item_amount($item[inflammable leaf]) >= 11) {
auto_log_debug("summoning flaming leaflet (2389)");
leaves 11;

return true;
}

return false;
}

boolean fightFlamingMonstera() {
if(item_amount($item[inflammable leaf]) >= 111) {
auto_log_debug("summoning flaming monstera (2390)");
leaves 111;

retun true;
}

return false;
}

boolean fightLeaviathan() {
if(item_amount($item[inflammable leaf]) >= 666) {
auto_log_debug("summoning leaviathan (2391)");
leaves 666;

return true;
}

return false;
}

0 comments on commit e3e90b7

Please sign in to comment.