hefty.lua 545 B

1234567891011121314151617181920
  1. local Hefty = extend(Shruju)
  2. Hefty.name = 'Hefty'
  3. Hefty.description = 'Muju\'s maximum health is greatly increased.'
  4. Hefty.amount = 300
  5. function Hefty:apply()
  6. local ratio = ctx.player.health / ctx.player.maxHealth
  7. ctx.player.maxHealth = ctx.player.maxHealth + self.amount
  8. ctx.player.health = ctx.player.maxHealth * ratio
  9. end
  10. function Hefty:remove()
  11. local ratio = ctx.player.health / ctx.player.maxHealth
  12. ctx.player.maxHealth = ctx.player.maxHealth - self.amount
  13. ctx.player.health = ctx.player.maxHealth * ratio
  14. end
  15. return Hefty