Skip to content

Instantly share code, notes, and snippets.

@demoth
Created April 22, 2015 22:06
Show Gist options
  • Save demoth/cb4b45d13112a8bd5946 to your computer and use it in GitHub Desktop.
Save demoth/cb4b45d13112a8bd5946 to your computer and use it in GitHub Desktop.
usable
case ItemType.USABLE:
if (item.quantity) {
item.effects*.apply this
item.quantity--
}
if (!item.quantity)
inventory.remove item
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment