Skip to content

Commit

Permalink
Support Sept-Ember Censer (#1516)
Browse files Browse the repository at this point in the history
* initial checkin

* record cold res when using mouthwash

* wish for more cold res
  • Loading branch information
Alium58 authored Oct 22, 2024
1 parent 7999c8e commit 497fe68
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
1 change: 1 addition & 0 deletions RELEASE/scripts/autoscend.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,7 @@ boolean dailyEvents()
auto_useBlackMonolith();
auto_scepterSkills();
auto_getAprilingBandItems();
auto_buyFromSeptEmberStore();
return true;
}
Expand Down
3 changes: 3 additions & 0 deletions RELEASE/scripts/autoscend/autoscend_header.ash
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,9 @@ boolean auto_MayamClaimAll();
boolean auto_haveRoman();
boolean auto_haveBatWings();
boolean auto_canLeapBridge();
boolean auto_haveSeptEmberCenser();
int remainingEmbers();
void auto_buyFromSeptEmberStore();

########################################################################################################
//Defined in autoscend/paths/actually_ed_the_undying.ash
Expand Down
69 changes: 69 additions & 0 deletions RELEASE/scripts/autoscend/iotms/mr2024.ash
Original file line number Diff line number Diff line change
Expand Up @@ -381,3 +381,72 @@ boolean auto_canLeapBridge()
}
return true;
}

boolean auto_haveSeptEmberCenser()
{
if(auto_is_valid($item[Sept-Ember Censer]) && available_amount($item[Sept-Ember Censer]) > 0 )
{
return true;
}
return false;
}

int remainingEmbers()
{
if(!auto_haveSeptEmberCenser())
{
return 0;
}
if(!get_property("_septEmberBalanceChecked").to_boolean())
{
// go to ember shop to check our balance
use($item[Sept-Ember Censer]);
}
return get_property("availableSeptEmbers").to_int();
}

void auto_buyFromSeptEmberStore()
{
if(remainingEmbers() == 0)
{
return;
}
auto_log_debug("Have " + remainingEmbers() + " embers(s) to buy from Sept-Ember Censer. Let's spend them!");
// get structural ember if can't cross bridge
item itemConsidering = $item[Structural ember];
if(remainingEmbers() >= 4 && get_property("chasmBridgeProgress").to_int() < bridgeGoal() &&
!get_property("_structuralEmberUsed").to_boolean() && auto_is_valid(itemConsidering))
{
buy($coinmaster[Sept-Ember Censer], 1, itemConsidering);
use(itemConsidering);
}
// get 1 bembershoot to support mouthwash leveling or general quest help
itemConsidering = $item[bembershoot];
if(remainingEmbers() >= 1 && !possessEquipment(itemConsidering) && auto_is_valid(itemConsidering))
{
buy($coinmaster[Sept-Ember Censer], 1, itemConsidering);
}
// mouthwash for leveling
itemConsidering = $item[Mmm-brr! brand mouthwash];
if(remainingEmbers() >= 2 && (my_level() < 13 || get_property("auto_disregardInstantKarma").to_boolean()) && auto_is_valid(itemConsidering))
{
// get as much cold res as possible
int [element] resGoal;
resGoal[$element[cold]] = 100;
// get cold res. Use noob cave as generic place holder
auto_wishForEffect($effect[Fever From the Flavor]);
provideResistances(resGoal, $location[noob cave], true);
equipMaximizedGear();
// buy mouthwash and use it
buy($coinmaster[Sept-Ember Censer], 1, itemConsidering);
auto_log_debug(`Using mouthwash with {numeric_modifier("cold Resistance")} cold resistance`);
use(itemConsidering);
}
// if still have embers, get hat for mp regen
itemConsidering = $item[Hat of remembering];
if(remainingEmbers() >= 1 && !possessEquipment(itemConsidering) && auto_is_valid(itemConsidering))
{
buy($coinmaster[Sept-Ember Censer], 1, itemConsidering);
}
// consider throwin' ember for banish or summoning charm for pickpocket in future PR
}

0 comments on commit 497fe68

Please sign in to comment.