return function(mod) mod.content.items:register("MODBERRY", { id = "MODBERRY", name = "MODBERRY", price = 250, tossable = true, effect = "MODBERRY_EFFECT", }) mod.content.item_effects:register("MODBERRY_EFFECT", { field = true, battle = false, needsTarget = true, use = function(ctx) local mon = ctx.target local max = mon and (mon.maxHp or mon.stats.hp) if not mon or mon.hp <= 0 or mon.hp >= max then return "failed", { "It had no effect." } end mon.hp = math.min(max, mon.hp + 10) return "consumed", { "Restored 10 HP!" } end, }) mod.content.text_pointers:patch("ViridianMart", { TEXT_VIRIDIANMART_CLERK = { mart = { __append = { "MODBERRY" } } }, }) end