-
Notifications
You must be signed in to change notification settings - Fork 70
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
LoL dailies & enabling Deck #1303
base: main
Are you sure you want to change the base?
Conversation
use(1, $item[Replica 2002 Mr. Store Catalog]); //get catalog credits | ||
} | ||
|
||
pullXWhenHaveY($item[Breathitin™], 1, 0); |
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.
I think breath is good enough to pull for all classes but Ed. Don't recall off hand where it is located, but there is code to handle daily activities for all classes. Move breath pull to there and make sure not ed
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.
Just using this may be a bit dangerous for all paths at the beginning of a run, because a charge will be wasted if the fight is free for some other reason and unrestricted has a ton of free kills and one of the first zones we go to is outdoors.
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.
Moved to level_05.ash to help with finding the encryption key
print("Failed to pull a Breathitin","red"); | ||
} | ||
|
||
if (get_property("homebodylCharges").to_int() == 0) |
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.
There is a function which returns number of free crafts left. Might be able to find if ya search for other places of thos hombodylCharges prop. It would be better to pull if we don't have any free crafts.
Also would be nice to put this somewhere that gets called when we attempt to craft. As is, this is only called at start of the day. What if we run out of crafts mid day. Don't recall off hand where a good spot is
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.
Moved to level_11.ash since that's the only necessary craft I can think of
} | ||
} | ||
|
||
if (get_property("chasmBridgeProgress").to_int() < 30) |
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.
Is pulling keepsake box already part of the chasm quest code? Sorry on mobile so not easy to search code
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.
No we don't pull them atm, I also agree it would be more prudent to try and pull in level_9.ash instead.
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.
I put a pull into level_09.ash, but left one in LoL dailies to grab one if no progress has been made on the bridge since we have dead pulls in LoL anyway
@@ -613,6 +613,7 @@ boolean chateauPainting() | |||
|
|||
boolean deck_available() | |||
{ | |||
//return (((item_amount($item[Deck of Every Card]) > 0) && is_unrestricted($item[Deck of Every Card]) && auto_is_valid($item[Deck of Every Card])) || ((item_amount($item[Replica Deck of Every Card]) > 0) && (in_lol()))); |
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.
My guess why it doesn't work is line 783 of mr2015 has a visit url hardcoded for the normal deck item number. Very well might be something else
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.
Thanks for making this! Great stuff. Have a few comments but they are all minor
use(1, $item[Homebodyl™]); // get free craft charges | ||
auto_log_info("Huffing some Homebodyl and hyperfocusing on kitchen-grade demolitions.","blue"); | ||
} | ||
else |
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.
No need to log when we can't pull it, can remove else statement
@@ -2205,6 +2205,19 @@ boolean L11_mauriceSpookyraven() | |||
{ | |||
auto_log_info("Time to cook up something explosive! Science fair unstable fulminate time!", "green"); | |||
ovenHandle(); | |||
if(freeCrafts() == 0) |
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 would be nice to add this to void initializeDay(int day)
in autoscend.ash as well. That way at start of day will get free crafts to catch other uses of it. I don't mind keeping it here too
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.
I see you are using dailyEvents()
for breath's above. That could be a good spot too, I'd have to look into it more to decide which is better
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.
I like dailyEvents()
better
@@ -2205,6 +2205,19 @@ boolean L11_mauriceSpookyraven() | |||
{ | |||
auto_log_info("Time to cook up something explosive! Science fair unstable fulminate time!", "green"); | |||
ovenHandle(); | |||
if(freeCrafts() == 0) |
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.
beyond having no free crafts, also check `auto_is_valid($item[home...]) and we have space in spleen
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.
as a note for later, canChew() checks auto_is_valid
|
||
string deckItemId = ""; | ||
if(in_lol()) | ||
{ |
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.
add comment that this is the replica version specifically for LoL so folks know why we have this if statement
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.
please add the same comment here that you did for deck_cheat
//replica Deck id for when in Legacy of Loathing
use(1, $item[Replica 2002 Mr. Store Catalog]); //get catalog credits | ||
} | ||
|
||
if (get_property("chasmBridgeProgress").to_int() == 0) |
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.
can this be removed now that it was moved to lvl 9 code?
@@ -215,4 +219,22 @@ void auto_LegacyOfLoathingDailies() | |||
{ | |||
use(1, $item[replica Smith\'s Tome]); // get items | |||
} | |||
|
|||
if(item_amount($item[Replica 2002 Mr. Store Catalog]) > 0) |
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.
also check prop _2002MrStoreCreditsCollected
is false
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.
speaking of which, would be good to update conditions above this as well if you are up for it.
_replicaSmithsTomeUsed
and _replicaResolutionLibramUsed
would be the prefs to check
@@ -30,6 +30,20 @@ boolean L5_getEncryptionKey() | |||
} | |||
} | |||
|
|||
if(!isActuallyEd()) |
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.
same comment as above. Add check for canChew and remove else
@@ -210,6 +210,19 @@ void prepareForSmutOrcs() | |||
|
|||
// This adds a tonne of damage and NC progress | |||
buffMaintain($effect[Triple-Sized]); | |||
|
|||
// pull a keepsake box if we can | |||
pullXWhenHaveY($item[smut orc keepsake box], 1, 0); |
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 would be better in L9_chasmBuild()
. It already has code to use keepsake boxes. Add the pull attempt right before that
@@ -310,6 +323,7 @@ boolean L9_chasmBuild() | |||
visit_url("place.php?whichplace=orc_chasm&action=bridge"+(to_int(get_property("chasmBridgeProgress")))); | |||
|
|||
// use any keepsake boxes we have | |||
|
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.
ah you must have been thinking about putting it here already. This is the spot attempting to pull should go
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.
Ty for moving it to here. Also delete your if statement. It is duplicate of the next line after it
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.
couple more minor things, but getting close!
@@ -30,6 +30,20 @@ boolean L5_getEncryptionKey() | |||
} | |||
} | |||
|
|||
if(!isActuallyEd() && canChew($item[Breathitin™]) && spleen_left() >= $item[Breathitin™].spleen)) |
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.
extra paren at the very end causing checks to fail
use(1, $item[Breathitin™]); // get free outdoor fight charges | ||
auto_log_info("Huffing some Breathitin before looking for the encryption key. That's the stuff!","blue"); | ||
} | ||
else |
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.
no need for else
@@ -310,6 +323,7 @@ boolean L9_chasmBuild() | |||
visit_url("place.php?whichplace=orc_chasm&action=bridge"+(to_int(get_property("chasmBridgeProgress")))); | |||
|
|||
// use any keepsake boxes we have | |||
|
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.
Ty for moving it to here. Also delete your if statement. It is duplicate of the next line after it
|
||
string deckItemId = ""; | ||
if(in_lol()) | ||
{ |
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.
please add the same comment here that you did for deck_cheat
//replica Deck id for when in Legacy of Loathing
@@ -1107,6 +1107,21 @@ boolean dailyEvents() | |||
} | |||
} | |||
|
|||
if(!isActuallyEd() && my_daycount() > 1) |
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.
Reminder to add canChew
check for breath before pulling it
Hello! It has been a few weeks. Let me know if you have questions on my comments! |
Description
Adding pull support for breathitin, homebodyl, and keepsake boxes since LoL has pulls left over every day. Also includes basic ("it exists") support for the 2002 catalog and an attempt to see if replica Deck "just works" (it does not)
How Has This Been Tested?
Ran it turn 0, re-entered gracefully
graceful re-entry after the deck change didn't work:
Checklist: