-
Notifications
You must be signed in to change notification settings - Fork 60
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
Cockroach copy target #2070
base: main
Are you sure you want to change the base?
Cockroach copy target #2070
Conversation
function checkAndFixOvercapStats(): void { | ||
if (myBuffedstat($stat`Muscle`) >= 100) { | ||
if (have($effect`Gummiheart`)) uneffect($effect`Gummiheart`); | ||
} | ||
if (myBuffedstat($stat`Mysticality`) >= 100) { | ||
if (have($effect`Gummibrain`)) uneffect($effect`Gummibrain`); | ||
} | ||
if (myBuffedstat($stat`Moxie`) >= 100) { | ||
if (have($effect`Gummiskin`)) uneffect($effect`Gummiskin`); | ||
} | ||
if ( | ||
myBuffedstat($stat`Moxie`) >= 100 || | ||
myBuffedstat($stat`Mysticality`) >= 100 || | ||
myBuffedstat($stat`Muscle`) >= 100 | ||
) { | ||
uneffect($effect`Having a Ball!`); | ||
} | ||
if ( | ||
myBuffedstat($stat`Moxie`) >= 100 || | ||
myBuffedstat($stat`Mysticality`) >= 100 || | ||
myBuffedstat($stat`Muscle`) >= 100 | ||
) { | ||
abort( | ||
"Buffed stats are too high for PirateRealm! Check for equipment or buffs that we can add to prevent in the script", | ||
); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be streamlined through iteration
have($skill`Just the Facts`) && | ||
have($skill`Meteor Lore`) && | ||
have($item`Powerful Glove`) && | ||
(get("_prToday") || get("prAlways")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use realmAvailable
have($skill`Meteor Lore`) && | ||
have($item`Powerful Glove`) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a function that essentially boils down to "how many monster replacers are available"
@@ -107,6 +108,15 @@ function ensureBarfAccess() { | |||
} | |||
|
|||
function defaultTarget() { | |||
// Can we account for re-entry if we only have certain amounts of copiers left in each of these? | |||
if ( | |||
have($skill`Just the Facts`) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should have a function that boils down to "do we expect to fight gregs today"
* Push some improvements and fixes to make this more accessible. * Update packages/garbo/src/tasks/cockroachPrep.ts Co-authored-by: neil <[email protected]> * Fix the overcapstat element * Add bonuses for fun equipment and carnplant * Do effect removal first, shruggable first * Genericize our debuff picker * Add some breaks * Fix the debuff item logic and other small things * Use the pref for clipper unlocked rather than the proxy of storm runs * Move final cockroach fight to later to benefit from buffs * Update packages/garbo/src/index.ts Co-authored-by: neil <[email protected]> * Filter debuff items down to potions * Optimize Giant Giant crab, further limit debuff scope to buyable or have() * 100 stat is fine; > 100 isn't * Avoid certain debuff items * fix the avoid bad debuff function, add avoid candelabara * refactor --------- Co-authored-by: neil <[email protected]> Co-authored-by: horrible little slime <[email protected]>
What else does this need to move to live? Anything we're waiting on? |
We can just check here to see which comments/reviews are still active: https://github.com/loathers/garbage-collector/pull/2070/files Also, I'm unsure about having two |
Works great! Been running it for two? Three? months that way |
for (const isShruggablePass of [true, false]) { | ||
for (const ef of getActiveEffects()) { | ||
// First check all shruggable buffs, then all unshruggable | ||
if (isShruggable(ef) !== isShruggablePass) continue; | ||
// Only shrug effects that buff at least one stat that's too high | ||
if (!improvedStats(ef).some((stat) => myBuffedstat(stat) > 100)) continue; | ||
// Don't shrug effects that give meat or other stuff | ||
if (isValuable(ef)) continue; | ||
|
||
uneffect(ef); | ||
|
||
if (debuffedEnough()) return; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This definitely needs optimizing. We'll be spending a lot on SGEEA's debuffing things that make almost no difference like Sugar Rush or Seal Clubbing Frenzy. Especially bad if we're just going to end up using debuff items like mush mouth anyway
return maxBy( | ||
debuffs, | ||
({ item, effect }) => | ||
mallPrice(item) / getModifier(stat.toString(), effect), | ||
).item; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems pretty possible this debuffs array could end up empty, how can we prevent that?
Just trying to block out the structure a bit in this draft