Shop refund resets gealth to level it was at when shop page was opened

FactualAction·12/8/2014, 6:19:10 PM·12 votes·7,521 views

I've noticed that occasionally when I refund an item (like a potion or a ward) I take a ton of damage. You can see the same bug happen to Trick2g at 1:30 in the video I linked where he refunds a potion and takes 300ish damage. After some testing in custom games, I think I have a way to consistently reproduce the bug:

1 Take in a lot of damage in a custom game, down to something like 10% of max. 2 While casting the recall, open the shop and try to buy an item continuously while recalling. Any item works. 3 Once you are back at the pool, let yourself regen. 4 Stay in the pool and return/refund the item you just bought while watching your health. 5 See tons of damage from refunding the item.

It's not usually a game breaking bug, but it forces me to sit in the fountain an extra 5ish seconds so I can regen health that I already regenerated, and those seconds can make a big difference when trying to get back to lane.

19 Comments

RiotRiot Afic12/8/2014, 10:57:40 PM8 votes

Thanks for this report!

Although this isn't ideal, it is actually intended.

Gonna go into waaaay too much detail, but if you are curious read on! The first reason it was implemented this way is to prevent players from buying/undoing item buys to heal faster. The way it works, is when you buy an item with health, the game will increase your max health, and then on the next tick heals you for an amount equal to the amount of health you gained. The obvious solution is then on item undo, also reduce your current health by the amount of health the item had. The problem with this solution is with the old item Spirit of the Ancient Golem (which gave you more health based on a % of your current max health). This made it so the amount of health an item gave wasn't always the same, and ultimately the current implementation is a result of that. We could probably address this (there are likely other abuse cases I am missing) but there is also a possibility we introduce another item with a similar effect, in which case this bug will return.

TL;DR the game will remember your health when you buy an item, and revert to that value after an undo.

Again, this isn't ideal, but I hope it at least gives some insight into why it is this way.

Hope this helps!

Coffee Ray Gun12/8/2014, 7:03:55 PM4 votes

I think it resets you to the state you were in when you bought the item, I wonder if buying an item while a debuff is on you (e.g. Morde's ult) and then undoing would reset the debuff.

Also, there's a small typo in the thread title, see if you can find it :3.

FactualAction12/8/2014, 7:12:43 PM1 votes

Looks like Coffee Ray Gun is right, it's health state at item purchase, not shop page open. Still a bug! :)

Be Kind Rewind12/8/2014, 9:04:31 PM1 votes

Why do you think it's a bug? I was always pretty sure it was intentional.
What if you buy an HP5 item, and then resell it a few moments later? You keep all the hp regen it just gave you temporarily?
What about the same for mana regen?
What about weird situations like buying a tank item, getting hit in the fountain, then re-selling it? You get to have tanked temporarily, without paying for the item?
Heck, what about flat max HP / max Mana boosting items? How would you handle % regen with those? Imagine buying something like chalice and tear. Mana font increases your mana, and the tear's max mana increase makes Mana font increase it even more rapidly. So then you resell them both and get to have all of that mana restore, temporarily, for free?

These might sound silly and insignificant, but I'm pretty sure the whole point is to avoid these situations. **It makes sure you didn't get any unfair advantage by temporarily owning an item before re-selling it - by just reverting you to your pre-item-buy state. **

I think the reason it seems like a glitch is because it's shown as if you actually just took damage, though, instead of just reverting back to a different health amount.

GundayMonday12/8/2014, 9:13:00 PM1 votes

Happened to me last night. Messed up a teamfight when I had WAY less health than expected. https://www.youtube.com/watch?v=uY_46Pp-ejs

TheKingDodo12/8/2014, 10:06:32 PM1 votes