Skip to content

Commit

Permalink
feat: never stun tool gremlins, and don't stasis them either (#1512)
Browse files Browse the repository at this point in the history
* feat: never stun tool gremlins, and don't stasis them either

* feat: more seriously avoid avoiding attacks
  • Loading branch information
midgleyc authored Oct 17, 2024
1 parent e480102 commit 739be92
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 39 deletions.
2 changes: 1 addition & 1 deletion RELEASE/scripts/autoscend.ash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
since r28084; // feat: make bat wings rest always available
since r28092; // feat: add 'avoid attack' modifier
/***
autoscend_header.ash must be first import
All non-accessory scripts must be imported here
Expand Down
40 changes: 3 additions & 37 deletions RELEASE/scripts/autoscend/combat/auto_combat_quest.ash
Original file line number Diff line number Diff line change
Expand Up @@ -57,36 +57,11 @@ string auto_JunkyardCombatHandler(int round, monster enemy, string text)
return useItem($item[Molybdenum Magnet]);
}

if (canUse($skill[Curse Of Weaksauce]))
{
return useSkill($skill[Curse Of Weaksauce]);
}

if (canUse($skill[Curse Of The Marshmallow]))
{
return useSkill($skill[Curse Of The Marshmallow]);
}

if (canUse($skill[Summon Love Scarabs]))
{
return useSkill($skill[Summon Love Scarabs]);
}

if (canUse($skill[Summon Love Gnats]))
{
return useSkill($skill[Summon Love Gnats]);
}

if(canUse($skill[Beanscreen]))
{
return useSkill($skill[Beanscreen]);
}

if(canUse($skill[Bad Medicine]))
{
return useSkill($skill[Bad Medicine]);
}

if(canUse($skill[Good Medicine]) && canSurvive(2.1))
{
return useSkill($skill[Good Medicine]);
Expand Down Expand Up @@ -142,20 +117,11 @@ string auto_JunkyardCombatHandler(int round, monster enemy, string text)
}
}

if (get_property("auto_gremlinMoly").to_boolean() && !canSurvive(20) && !stunned && !staggeringFlyer) //don't flyer tool gremlins if it's dangerous to survive them for long
if (get_property("auto_gremlinMoly").to_boolean()) //don't ever stun tool gremlins
{
if(monster_attack() > ( my_buffedstat($stat[moxie]) + 10) && !canSurvive(10) && haveUsed($skill[Curse Of Weaksauce]))
{
//if after all deleveling it's still too strong to safely stasis let weaksauce delevel it more in exchange for a few turns
//except if stuck with an attack familiar or unforeseen passive damage effects that can kill the gremlin
if(!gremlinTakesDamage && round < 10 && stunner != $skill[none])
{
combat_status_add("stunned");
return useSkill(stunner);
}
}
stunner = $skill[none];
}
else if (canUse(flyer) && get_property("flyeredML").to_int() < 10000 && !get_property("auto_ignoreFlyer").to_boolean())
if (canUse(flyer) && get_property("flyeredML").to_int() < 10000 && !get_property("auto_ignoreFlyer").to_boolean())
{
if(!staggeringFlyer && stunner != $skill[none] && !stunned)
{
Expand Down
3 changes: 2 additions & 1 deletion RELEASE/scripts/autoscend/quests/level_12.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,8 @@ boolean L12_gremlins()
gremlinsFamiliar();

auto_log_info("Doing them gremlins", "blue");
addToMaximize("20dr,1da 1000max,3hp,-3ml");
// ideally we want to survive a single attack
addToMaximize("20dr,1da 1000max,-ml,-1000avoid attack");
acquireHP();
if(!bat_wantHowl($location[over where the old tires are]))
{
Expand Down

0 comments on commit 739be92

Please sign in to comment.