Skip to content

Commit

Permalink
remove NSA summons, add early avalanche support
Browse files Browse the repository at this point in the history
  • Loading branch information
HippoKingKoL committed Jan 5, 2025
1 parent edec8f5 commit 15d793f
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 112 deletions.
4 changes: 3 additions & 1 deletion RELEASE/scripts/autoscend/auto_post_adv.ash
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ boolean auto_post_adventure()
if(get_property("auto_forceNonCombatSource") != "" && !auto_haveQueuedForcedNonCombat())
{
// possible to get desired NC when preparing spikes. Only log usage if NC was actually forced
// possible to get desired NC when preparing spikes/avalanche. Only log usage if NC was actually forced
// I have no idea how to make this check work for avalanche too?
if(get_property("auto_forceNonCombatSource") != "jurassic parka" || get_property("auto_parkaSpikesDeployed").to_boolean())
{
auto_log_info("Encountered forced noncombat: " + get_property("lastEncounter"), "blue");
Expand All @@ -86,6 +87,7 @@ boolean auto_post_adventure()
set_property("auto_forceNonCombatSource", "");
set_property("auto_forceNonCombatLocation", "");
set_property("auto_parkaSpikesDeployed", false);
set_property("auto_avalancheDeployed", false);
}
if(get_property("auto_instakillSource") != "" && get_property("auto_instakillSuccess").to_boolean())
Expand Down
5 changes: 5 additions & 0 deletions RELEASE/scripts/autoscend/auto_pre_adv.ash
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,11 @@ boolean auto_pre_adventure()
}
}
if(get_property("auto_forceNonCombatSource") == "McHugeLarge left ski" && !get_property("auto_avalancheDeployed").to_boolean())
{
autoForceEquip(wrap_item($item[McHugeLarge left ski]));
}
if(get_property("auto_forceNonCombatSource") == "jurassic parka" && !get_property("auto_parkaSpikesDeployed").to_boolean())
{
autoForceEquip(wrap_item($item[jurassic parka])); //equips parka and forbids maximizer tampering with shirt slot
Expand Down
2 changes: 0 additions & 2 deletions RELEASE/scripts/autoscend/auto_sim.ash
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ void printSimSuggested()
formattedSimPrint(auto_monsterInLocket(mon), `Locket Monster: {mon.to_string()}`, "Fighting 5x in a day will get you a fat loot token");
mon = $monster[screambat];
formattedSimPrint(auto_monsterInLocket(mon), `Locket Monster: {mon.to_string()}`, "Lets you break a wall in the Bat Hole");
mon = $monster[ninja snowman assassin];
formattedSimPrint(auto_monsterInLocket(mon), `Locket Monster: {mon.to_string()}`, "Fighting 3x is optimal for L8 quest");
mon = $monster[lobsterfrogman];
formattedSimPrint(auto_monsterInLocket(mon), `Locket Monster: {mon.to_string()}`, "Need 5x for war sidequest");
mon = $monster[Astronomer];
Expand Down
23 changes: 10 additions & 13 deletions RELEASE/scripts/autoscend/auto_util.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1881,19 +1881,6 @@ boolean LX_summonMonster()
if(summonMonster($monster[mountain man])) return true;
}

// only summon NSA if in hardcore as we will pull items in normal runs
if(internalQuestStatus("questL08Trapper") < 3 && in_hardcore() && my_level() >= 8 && !get_property("auto_L8_extremeInstead").to_boolean())
{
auto_log_debug("Thinking about summoning ninja snowman assassin");
boolean wantSummonNSA = item_amount($item[ninja rope]) < 1 ||
item_amount($item[ninja carabiner]) < 1 ||
item_amount($item[ninja crampons]) < 1;
if(wantSummonNSA && canSummonMonster($monster[Ninja Snowman Assassin]))
{
if(summonMonster($monster[Ninja Snowman Assassin])) return true;
}
}

if(auto_is_valid($item[Smut Orc Keepsake Box]) && item_amount($item[Smut Orc Keepsake Box]) == 0 && my_level() >= 9 &&
(lumberCount() < 30 || fastenerCount() < 30) && canSummonMonster($monster[smut orc pervert]))
{
Expand Down Expand Up @@ -4205,6 +4192,16 @@ boolean _auto_forceNextNoncombat(location loc, boolean speculative)
set_property("auto_forceNonCombatSource", "Apriling tuba");
return true;
}
else if(auto_haveMcHugeLargeSkis() && get_property("_mcHugeLargeAvalancheUses") < 3 && (!in_wereprof() || !is_professor())) // if we're a professor, we can't use the spikes
{
if(speculative) return true;
// avalanche require a combat to active
// this property will cause the left ski to be eqipped and avalanche deployed next combat
set_property("auto_forceNonCombatSource", "McHugeLarge left ski");
// track desired NC location so we know where to go when avalanche is ready
set_property("auto_forceNonCombatLocation", loc);
return true;
}
else if(auto_hasParka() && get_property("_spikolodonSpikeUses") < 5 && hasTorso() && (!in_wereprof() || !is_professor())) // if we're a professor, we can't use the spikes
{
if(speculative) return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ string auto_combatDefaultStage2(int round, monster enemy, string text)
couldInstaKill = false;
}
}
else if($monsters[Lobsterfrogman, Ninja Snowman Assassin] contains enemy)
else if($monsters[Lobsterfrogman] contains enemy)
{
if(auto_have_skill($skill[Digitize]) && (get_property("_sourceTerminalDigitizeMonster") != enemy))
{
Expand Down
20 changes: 10 additions & 10 deletions RELEASE/scripts/autoscend/combat/auto_combat_default_stage4.ash
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ string auto_combatDefaultStage4(int round, monster enemy, string text)
//iotm monster copier that works by creating wandering copies of the targetted monster
if(canUse($skill[Digitize]) && (get_property("_sourceTerminalDigitizeUses").to_int() == 0) && !inAftercore())
{
if($monsters[Ninja Snowman Assassin, Lobsterfrogman] contains enemy)
if($monsters[Lobsterfrogman] contains enemy)
{
if(get_property("_sourceTerminalDigitizeMonster") != enemy)
{
Expand All @@ -112,14 +112,6 @@ string auto_combatDefaultStage4(int round, monster enemy, string text)
}

//iotm monster duplicator that creates a chained fight of the current monster
if(have_equipped($item[Roman Candelabra]) && canUse($skill[Blow the Purple Candle\!]) && have_effect($effect[Everything Looks Purple]) == 0 && !ag_is_bodyguard())
{
if(enemy == $monster[Ninja Snowman Assassin])
{
handleTracker(enemy, $skill[Blow the Purple Candle\!], "auto_copies");
return useSkill($skill[Blow the Purple Candle\!]);
}
}
if(auto_wantToCopy(enemy, my_location()) && !ag_is_bodyguard())
{
skill copier = getCopier(enemy);
Expand Down Expand Up @@ -195,7 +187,7 @@ string auto_combatDefaultStage4(int round, monster enemy, string text)
}
if(wink_skill != $skill[none]) //we can wink / romatic arrow
{
if($monsters[Lobsterfrogman, Modern Zmobie, Ninja Snowman Assassin] contains enemy)
if($monsters[Lobsterfrogman, Modern Zmobie] contains enemy)
{
return useSkill(wink_skill);
}
Expand Down Expand Up @@ -380,6 +372,14 @@ string auto_combatDefaultStage4(int round, monster enemy, string text)
return auto_bowlingBallCombatString(my_location(), false);
}

// prep avalanche if requested
if(canUse($skill[McHugeLarge Avalanche]) && get_property("auto_forceNonCombatSource") == "McHugeLarge left ski"
&& !get_property("auto_avalancheDeployed").to_boolean())
{
set_property("auto_avalancheDeployed", true);
return useSkill($skill[McHugeLarge Avalanche]);
}

// prep parka NC forcing if requested
if(canUse($skill[Launch spikolodon spikes]) && get_property("auto_forceNonCombatSource") == "jurassic parka"
&& !get_property("auto_parkaSpikesDeployed").to_boolean())
Expand Down
9 changes: 8 additions & 1 deletion RELEASE/scripts/autoscend/combat/auto_combat_ed.ash
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ string auto_edCombatHandler(int round, monster enemy, string text)
# Instakill handler
boolean doInstaKill = true;
if($monsters[Lobsterfrogman, Ninja Snowman Assassin] contains enemy)
if($monsters[Lobsterfrogman] contains enemy)
{
if(auto_have_skill($skill[Digitize]) && (get_property("_sourceTerminalDigitizeMonster") != enemy))
{
Expand Down Expand Up @@ -746,6 +746,13 @@ string auto_edCombatHandler(int round, monster enemy, string text)
return auto_bowlingBallCombatString(my_location(), false);
}

// prep avalanche if requested
if(canUse($skill[McHugeLarge Avalanche]) && get_property("auto_forceNonCombatSource") == "McHugeLarge left ski"
&& !get_property("auto_avalancheDeployed").to_boolean())
{
set_property("auto_avalancheDeployed", true);
return useSkill($skill[McHugeLarge Avalanche]);
}
// prep parka NC forcing if requested
if(canUse($skill[Launch spikolodon spikes]) && get_property("auto_forceNonCombatSource") == "jurassic parka"
&& !get_property("auto_parkaSpikesDeployed").to_boolean())
Expand Down
19 changes: 0 additions & 19 deletions RELEASE/scripts/autoscend/iotms/mr2012.ash
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,6 @@ boolean handleRainDoh()
}
}
if(enemy == $monster[Ninja Snowman Assassin])
{
int count = item_amount($item[ninja rope]);
count += item_amount($item[ninja crampons]);
count += item_amount($item[ninja carabiner]);
if((count <= 1) && (get_property("_raindohCopiesMade").to_int() < 5))
{
set_property("auto_doCombatCopy", "yes");
}
handleCopiedMonster($item[Rain-Doh Box Full of Monster]);
validate_rainDohBox();
set_property("auto_doCombatCopy", "no");
if(count == 3)
{
set_property("auto_ninjasnowmanassassin", true);
}
return true;
}
if(enemy == $monster[Lobsterfrogman])
{
if(have_skill($skill[Rain Man]) && (item_amount($item[barrel of gunpowder]) < 4))
Expand Down
7 changes: 0 additions & 7 deletions RELEASE/scripts/autoscend/iotms/mr2015.ash
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,6 @@ boolean chateaumantegna_usePainting(string option)
return false;
}
}
if(get_property("chateauMonster") == $monster[Ninja Snowman Assassin])
{
if(((my_maxhp() <= expected_damage($monster[ninja snowman assassin]) * 1.2) && jump_chance($monster[ninja snowman assassin]) < 100 ) || ((item_amount($item[Ninja Carabiner]) > 0) && (item_amount($item[Ninja Crampons]) > 0) && (item_amount($item[Ninja Rope]) > 0)))
{
return false;
}
}
if(get_property("chateauMonster") == $monster[Mountain Man])
{
if(!needOre())
Expand Down
2 changes: 1 addition & 1 deletion RELEASE/scripts/autoscend/iotms/mr2017.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,7 @@ boolean canGenieCombat(monster mon)
}
// Per wiki page these can't be wished. Didn't bother to add other crypt monsters as we don't summon them
// https://kol.coldfront.net/thekolwiki/index.php/Rubbed_it_the_Right_Way
if ($monsters[Fantasy Bandit, Ninja Snowman Assassin, Modern Zmobie] contains mon)
if ($monsters[Fantasy Bandit, Modern Zmobie] contains mon)
{
return false;
}
Expand Down
7 changes: 1 addition & 6 deletions RELEASE/scripts/autoscend/iotms/mr2021.ash
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ boolean auto_backupTarget()

// determine if we want to backup
boolean wantBackupLFM = item_amount($item[barrel of gunpowder]) < 5 && get_property("sidequestLighthouseCompleted") == "none" && internalQuestStatus("questL12War") == 1 && !auto_hasAutumnaton() && !in_koe();
boolean wantBackupNSA = (item_amount($item[ninja rope]) < 1 || item_amount($item[ninja carabiner]) < 1 || item_amount($item[ninja crampons]) < 1) && internalQuestStatus("questL08Trapper") < 3 && !get_property("auto_L8_extremeInstead").to_boolean();
int habitatZombieEvil = (auto_habitatMonster() == $monster[modern zmobie] ? (auto_habitatFightsLeft() * (5 + cyrptEvilBonus())) : 0);
boolean wantBackupZmobie = get_property("cyrptAlcoveEvilness").to_int() > (14 + cyrptEvilBonus() + habitatZombieEvil) && internalQuestStatus("questL07Cyrptic") == 0;

Expand All @@ -342,16 +341,12 @@ boolean auto_backupTarget()
if(wantBackupLFM)
return true;
break;
case $monster[ninja snowman assassin]:
if(wantBackupNSA)
return true;
break;
case $monster[modern zmobie]:
if(wantBackupZmobie)
return true;
break;
case $monster[sausage goblin]:
if(!wantBackupLFM && !wantBackupNSA && !wantBackupZmobie && auto_backupUsesLeft() > 5)
if(!wantBackupLFM && !wantBackupZmobie && auto_backupUsesLeft() > 5)
return true;
break;
case $monster[eldritch tentacle]:
Expand Down
56 changes: 5 additions & 51 deletions RELEASE/scripts/autoscend/quests/level_08.ash
Original file line number Diff line number Diff line change
Expand Up @@ -447,13 +447,14 @@ boolean L8_trapperExtreme()
{
return true; //successfully finished this part of the quest
}
if(get_property("_sourceTerminalDigitizeMonster") == $monster[Ninja Snowman Assassin])

// First choice is the MtLargeHuge IOTM equipment
if(auto_haveMcHugeLargeSkis())
{
return false;
auto_equipAllMcHugeLarge();
}

// we should equip the extreme outfit if we have it
if(possessOutfit("eXtreme Cold-Weather Gear", true)) // own and can equip
else if(possessOutfit("eXtreme Cold-Weather Gear", true)) // own and can equip
{
autoOutfit("eXtreme Cold-Weather Gear");
}
Expand Down Expand Up @@ -553,43 +554,6 @@ void theeXtremeSlopeChoiceHandler(int choice)
}
}

boolean L8_trapperSlopeSoftcore()
{
// slope handling for softcore. we want to pull the ninja climbing gear. unless we are copying ninja assassins. in which case we want to go do something else.

// special path or IOTM handling
if(!get_property("auto_L8_ninjaAssassinFail").to_boolean()) // can defeat assassins
{
if(get_property("_sourceTerminalDigitizeMonster") == $monster[Ninja Snowman Assassin])
{
auto_log_info("Delay pulling ninja climbing gear. we have already digitized [ninja snowman assassin]", "blue");
return false;
}
}

// pull ninja climbing gear to skip the slope.
foreach it in $items[Ninja Carabiner, Ninja Crampons, Ninja Rope]
{
pullXWhenHaveY(it, 1, 0);
if(pulls_remaining() == 0 && item_amount(it) == 0)
{
return false; // out of pulls in softcore. come back tomorrow
}
}

// if we reached this point we have all the climbing gear. only need 5 cold res to progress
if(L8_trapperPeak()) // try to unlock peak with the pulled items
{
return true; // successfully finished this part of the quest
}
else if(!in_robot()) // robots need too many bodyparts for outfit.
{
// if we failed to unlock at this point it is because we do not have 5 cold res. So grab the outfit for that +5 cold res
return L8_trapperExtreme();
}
return false; // must have a return value. fallback option. should never actually be reached
}

boolean L8_trapperNinjaLair()
{
// adventure in the lair of the ninja snowmen to find and fight ninja snowman assassins.
Expand Down Expand Up @@ -629,12 +593,6 @@ boolean L8_trapperNinjaLair()
}
}

if(get_property("_sourceTerminalDigitizeMonster") == $monster[Ninja Snowman Assassin])
{
auto_log_info("Have a digitized Ninja Snowman Assassin, let's put off the Ninja Snowmen Lair", "blue");
return false;
}

if(have_effect($effect[Thrice-Cursed]) > 0 || have_effect($effect[Twice-Cursed]) > 0 || have_effect($effect[Once-Cursed]) > 0)
{
return false;
Expand Down Expand Up @@ -838,10 +796,6 @@ boolean L8_trapperSlope()
{
return L8_slopeCasual(); // mallbuy everything. or go do something else if too poor to do so
}
else if(!in_hardcore() && !in_lol()) // !casual && !postronin && !hardcore == in softcore. which requires special handling. LoL can't pull ninja gear
{
return L8_trapperSlopeSoftcore(); // pull ninja climbing gear. unless assassins are being copied, then go do something else
}
if(L8_trapperPeak()) // try to finish step2 of the quest.
{
return true;
Expand Down
4 changes: 4 additions & 0 deletions RELEASE/scripts/autoscend/quests/level_any.ash
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,10 @@ boolean LX_setWorkshed(){
boolean LX_ForceNC()
{
if(get_property("auto_forceNonCombatSource") != "McHugeLarge left ski" || !get_property("auto_avalancheDeployed").to_boolean())
{
return false;
}
if(get_property("auto_forceNonCombatSource") != "jurassic parka" || !get_property("auto_parkaSpikesDeployed").to_boolean())
{
return false;
Expand Down

0 comments on commit 15d793f

Please sign in to comment.