Constructor






Methods


Item:addFlag(name: any, amount: any)

Arguments:

name: any
amount: any

Returns:

1: unknown


Item:applyMoneyBonus(gold: any)

Arguments:

gold: any

Returns:

1: unknown


Item:canEquip(character: any, slot_type: any, slot_index: any)

Arguments:

character: any
slot_type: any
slot_index: any

Returns:

1: boolean|unknown


Item:convertToDark(inventory: any)

Arguments:

inventory: any

Returns:

1: boolean|Item|nil


Item:convertToDarkEquip(chara: any)

Arguments:

chara: any

Returns:

1: boolean|Item|nil


Item:convertToLight(inventory: any)

Arguments:

inventory: any

Returns:

1: boolean|Item|nil


Item:convertToLightEquip(chara: any)

Arguments:

chara: any

Returns:

1: boolean|Item|nil






Item:getBattleText(user: any, target: any)

Arguments:

user: any
target: any

Returns:

1: unknown








Item:getCheck()

Returns:

1: string




Item:getFlag(name: any, default: any)

Arguments:

name: any
default: any

Returns:

1: unknown


Item:getName()

Returns:

1: string


Item:getPrice()

Returns:

1: integer


Item:getReaction(user_id: any, reactor_id: any)

Arguments:

user_id: any
reactor_id: any

Returns:

1: unknown|nil








Item:getStatBonus(stat: any)

Arguments:

stat: any

Returns:

1: integer






Item:getUseName()

Returns:

1: string








Item:load(data: any)

Arguments:

data: any


Item:onBattleDeselect(user: any, target: any)

Arguments:

user: any
target: any


Item:onBattleSelect(user: any, target: any)

Arguments:

user: any
target: any


Item:onBattleUpdate(battler: any)

Arguments:

battler: any


Item:onBattleUse(user: any, target: any)

Arguments:

user: any
target: any


Item:onCheck()

Light world / Dark world stuff



Item:onEquip(character: any, replacement: any)

Arguments:

character: any
replacement: any

Returns:

1: boolean


Item:onLoad(data: any)

Arguments:

data: any


Item:onMenuClose(menu: any)

Arguments:

menu: any


Item:onMenuDraw(menu: any)

Arguments:

menu: any


Item:onMenuOpen(menu: any)

Arguments:

menu: any


Item:onMenuUpdate(menu: any)

Arguments:

menu: any


Item:onSave(data: any)

Arguments:

data: any


Item:onToss()

Returns:

1: boolean


Item:onUnequip(character: any, replacement: any)

Arguments:

character: any
replacement: any

Returns:

1: boolean


Item:onWorldUpdate(chara: any)

Only for equipped

Arguments:

chara: any


Item:onWorldUse(target: any)

Arguments:

target: any


Item:save()

Returns:

1: table


Item:setFlag(name: any, value: any)

Arguments:

name: any
value: any



Fields



Undocumented



Item.bonus_color: unknown

The color of the bonus icon, always orange in DELTARUNE





Item.bonus_name: nil

Bonus name and icon (displayed in equip menu)



Item.bonuses: table

Equip bonuses (for weapons and armor)



Item.buy_price: nil

Shop buy price (optional)



Item.can_equip: table

Equippable characters (default true for armors, false for weapons)



Item.can_sell: boolean

Whether the item can be sold



Item.check: string

Light world check text



Item.dark_item: nil

Values saved for light/dark world item conversion











Item.description: string

Menu description



Item.effect: string

Battle description



Item.flags: table

Item flags (for saving values to the save file)





Item.icon: nil

Item icon (for equipment)



Item.instant: boolean

Will this item be instantly consumed in battles?



Item.light: boolean

Whether this item is for the light world













Item.name: string

Display name



Item.price: integer

Default shop price (sell price is halved)



Item.reactions: table

Character reactions (key = party member id)



Item.result_item: nil

Item this item will get turned into when consumed



Item.sell_price: nil

Shop sell price (optional, default half of buy price)



Item.shop: string

Shop description



Item.target: string

Consumable target mode (ally, party, enemy, enemies, or none)



Item.type: string

Item type (item, key, weapon, armor)



Item.usable_in: string

Where this item can be used (world, battle, all, or none)



Item.use_name: nil

Name displayed when used in battle (optional)