Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make sure CMG is equipped when burning delay and pre-charge it for subsequent days. #1373

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions RELEASE/scripts/autoscend.ash
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,7 @@ boolean LX_burnDelay()
boolean wannaDigitize = isOverdueDigitize();
boolean wannaSausage = auto_sausageGoblin();
boolean wannaBackup = auto_backupTarget();
// Cursed Magnifying Glass gives a void monster combat every 13 turns. The first 5 are free fights
// _voidFreeFights counts up from 0 and stays at 5 once all free fights are completed for the day
boolean voidMonsterNext = (get_property("_voidFreeFights").to_int() < 5) && (get_property("cursedMagnifyingGlassCount").to_int() == 13);
boolean voidMonsterNext = auto_voidMonster();

// if we're a plumber and we're still stuck doing a flat 15 damage per attack
// then a scaling monster is probably going to be a bad time
Expand Down Expand Up @@ -426,12 +424,10 @@ boolean LX_burnDelay()
if(voidMonsterNext)
{
auto_log_info("Burn some delay somewhere (cursed magnifying glass), if we found a place!", "green");
set_property("auto_nextEncounter","void guy"); //which of the 3 is random, but they're all same phylum and free under same conditions
if(autoAdv(burnZone))
if(auto_voidMonster(burnZone))
{
return true;
}
set_property("auto_nextEncounter","");
}
}
else if(wannaVote || wannaDigitize || wannaSausage || voidMonsterNext)
Expand Down
12 changes: 4 additions & 8 deletions RELEASE/scripts/autoscend/auto_equipment.ash
Original file line number Diff line number Diff line change
Expand Up @@ -688,25 +688,21 @@ void finalizeMaximize(boolean speculative)
addToMaximize("-equip " + wrap_item($item[Kramco Sausage-o-Matic&trade;]).to_string());
}
}
if (possessEquipment($item[Cursed Magnifying Glass]))
if (auto_haveCursedMagnifyingGlass())
{
if (get_property("cursedMagnifyingGlassCount").to_int() == 13)
{
if(get_property("mappingMonsters").to_boolean() || auto_backupTarget() || (get_property("_voidFreeFights").to_int() >= 5 && !in_hardcore()))
if(get_property("mappingMonsters").to_boolean() || auto_backupTarget() || (get_property("_voidFreeFights").to_int() >= 5 && get_property("cursedMagnifyingGlassCount").to_int() >= 13 && !in_hardcore()))
{
// don't equip for non free fights in softcore? (pending allowed conditions like delay zone && none of the monsters in the zone is a sniff/YR target?)
// don't interfere with backups or Map the Monsters
addToMaximize("-equip " + $item[Cursed Magnifying Glass].to_string());
}
else if(get_property("_voidFreeFights").to_int() < 5)
{
// add bonus if next fight is a free void monster
addBonusToMaximize($item[Cursed Magnifying Glass], 1000);
}
}
else if(!nextMonsterIsFree && get_property("_voidFreeFights").to_int() < 5 && solveDelayZone() != $location[none])
else if(!nextMonsterIsFree && (get_property("_voidFreeFights").to_int() < 5 || (get_property("_voidFreeFights").to_int() >= 5 && get_property("cursedMagnifyingGlassCount").to_int() < 13)) && solveDelayZone() != $location[none])
{
// add bonus to charge free fights. charge is added when completing nonfree fights only
// also we can pre-charge it for the next day once we have used our 5 free fights.
addBonusToMaximize($item[Cursed Magnifying Glass], 200);
}
}
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 @@ -456,6 +456,9 @@ void auto_CMCconsult();

########################################################################################################
//Defined in autoscend/iotms/mr2022.ash
boolean auto_haveCursedMagnifyingGlass();
boolean auto_voidMonster();
boolean auto_voidMonster(location loc);
boolean auto_haveCosmicBowlingBall();
string auto_bowlingBallCombatString(location place, boolean speculation);
boolean auto_haveCombatLoversLocket();
Expand Down
42 changes: 42 additions & 0 deletions RELEASE/scripts/autoscend/iotms/mr2022.ash
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# This is meant for items that have a date of 2022

boolean auto_haveCursedMagnifyingGlass()
{
if (possessEquipment($item[cursed magnifying glass]) && auto_can_equip($item[cursed magnifying glass])) {
return true;
}
return false;
}

boolean auto_voidMonster()
{
return auto_voidMonster($location[none]);
}

boolean auto_voidMonster(location loc)
{
// Cursed Magnifying Glass gives a void monster combat every 13 turns. The first 5 are free fights
// _voidFreeFights counts up from 0 and stays at 5 once all free fights are completed for the day
if (!auto_haveCursedMagnifyingGlass())
{
return false;
}

// return false if we've fought the 5 free void monsters already today or we're still charging up the counter
if (get_property("_voidFreeFights").to_int() >= 5 || get_property("cursedMagnifyingGlassCount").to_int() != 13)
{
return false;
}

if (loc == $location[none])
{
return true;
}

if (autoEquip($item[cursed magnifying glass]))
{
set_property("auto_nextEncounter","void guy"); //which of the 3 is random, but they're all same phylum and free under same conditions
return autoAdv(loc);
}
set_property("auto_nextEncounter","");
return false;
}

boolean auto_haveCosmicBowlingBall()
{
// ensure we not only own one but it's in allowed in path and also in inventory for us to do stuff with.
Expand Down
Loading