Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Alium58 committed Sep 20, 2023
1 parent 62bd963 commit c96000a
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 6 deletions.
4 changes: 2 additions & 2 deletions RELEASE/scripts/autoscend.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ boolean doTasks()
if(my_familiar() == $familiar[Stooper] && pathAllowsChangingFamiliar())
{
auto_log_info("Avoiding stooper stupor...", "blue");
familiar fam = (is100FamRun() ? get_property("auto_100familiar").to_familiar() : $familiar[Mosquito]);
familiar fam = (is100FamRun() ? get_property("auto_100familiar").to_familiar() : findNonRockFamiliarInTerrarium());
use_familiar(fam);
}
if(my_inebriety() > inebriety_limit())
Expand Down Expand Up @@ -1970,7 +1970,7 @@ void auto_begin()
if(my_familiar() == $familiar[Stooper] && pathAllowsChangingFamiliar())
{
auto_log_info("Avoiding stooper stupor...", "blue");
familiar fam = (is100FamRun() ? get_property("auto_100familiar").to_familiar() : $familiar[Mosquito]);
familiar fam = (is100FamRun() ? get_property("auto_100familiar").to_familiar() : findNonRockFamiliarInTerrarium());
use_familiar(fam);
}

Expand Down
2 changes: 1 addition & 1 deletion RELEASE/scripts/autoscend/auto_consume.ash
Original file line number Diff line number Diff line change
Expand Up @@ -2064,7 +2064,7 @@ void consumeStuff()
if (my_familiar() == $familiar[Stooper] && to_familiar(get_property("auto_100familiar")) != $familiar[Stooper]
&& pathAllowsChangingFamiliar()) //check path allows changing of familiars
{
use_familiar($familiar[Mosquito]);
use_familiar(findNonRockFamiliarInTerrarium());
}

ConsumeAction bestAction = auto_findBestConsumeAction();
Expand Down
10 changes: 8 additions & 2 deletions RELEASE/scripts/autoscend/auto_equipment.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1043,8 +1043,14 @@ void equipRollover(boolean silent)
to_max += ",switch Trick-or-Treating Tot";
if(auto_have_familiar($familiar[Left-Hand Man]))
to_max += ",switch Left-Hand Man";
if(my_familiar() == $familiar[none] && auto_have_familiar($familiar[Mosquito]))
to_max += ",switch Mosquito";
if(my_familiar() == $familiar[none])
{
familiar anyFam = findNonRockFamiliarInTerrarium();
if(anyFam != $familiar[none])
{
to_max += ",switch " + anyFam.to_string();
}
}
maximize(to_max, false);
Expand Down
26 changes: 26 additions & 0 deletions RELEASE/scripts/autoscend/auto_familiar.ash
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,32 @@ boolean canChangeToFamiliar(familiar target)
return true;
}

familiar findNonRockFamiliarInTerrarium()
{
static boolean[familiar] blacklistFamiliars = $familiars[pet rock,
toothsome rock,
bulky buddy box,
holiday log,
software bug,
bad vibe,
pet coral,
synthetic rock,
pixel rock];

foreach fam in $familiars[]
{
if(blacklistFamiliars contains fam)
{
continue;
}
if(in_terrarium(fam) && auto_have_familiar(fam))
{
return fam;
}
}
return $familiar[none];
}

familiar lookupFamiliarDatafile(string type)
{
//This function looks through /data/autoscend_familiars.txt for the matching "type" in order and selects the first match whose conditions are met. Said conditions typically include path exclusions and a check to see if that familiar dropped something today.
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 @@ -1385,6 +1385,7 @@ boolean pathAllowsChangingFamiliar();
boolean auto_have_familiar(familiar fam);
boolean canChangeFamiliar();
boolean canChangeToFamiliar(familiar target);
familiar findNonRockFamiliarInTerrarium();
familiar lookupFamiliarDatafile(string type);
boolean handleFamiliar(string type);
boolean handleFamiliar(familiar fam);
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 @@ -432,7 +432,7 @@ void auto_scepterSkills()
{
if(!is100FamRun())
{
use_familiar($familiar[Mosquito]); //equipping Mosquito so we don't get a big rock
use_familiar(findNonRockFamiliarInTerrarium()); //equipping any non-rock fam so we don't get a big rock
}
use_skill($skill[Aug. 28th: Race Your Mouse Day!]); //Fam equipment
}
Expand Down

0 comments on commit c96000a

Please sign in to comment.