Closed taltamir closed 4 years ago
int n_healing_items = item_amount($item[gauze garter]) + item_amount($item[filthy poultice]);
if(in_zelda())
{
n_healing_items = item_amount($item[super deluxe mushroom]);
if(n_healing_items < 5)
{
retrieve_item(5 - n_healing_items, $item[super deluxe mushroom]);
n_healing_items = item_amount($item[super deluxe mushroom]);
}
}
if(n_healing_items < 5)
{
abort("We only have " + n_healing_items + "healing items, I'm not sure we can do the shadow.");
}
I'm not sure what's going on here, the code looks fine.
Yea, this is weird. Because as you said the code looks fine
Oh, retrieve_item(n, it)
doesn't get n
of the item, it gets up to n
. So the subtraction is dumb, should be 5
. I'll fix it.
fixed by #257
Context
Current Behavior
autoscend quit with an error saying I only have 4 healing items to fight the shadow and its not sure if its enough. I had over 5000 coins which is enough to buy 250+ more super deluxe mushrooms.
It did correctly count my super deluxe mushrooms. (I had 12 normal healing items like filthy poultice and gauze garter, but plumbers only use mushrooms). And it looks like it actually bought 3 super deluxe mushrooms beforehand. So I think the error is that it is aiming to purchase 4 but then aborting with the complaint we only have four? raise it to acquire 5 instead?
Failure Information (for bugs)