Module:ItemPrices

From Chronicles of Torisia
Jump to navigation Jump to search

Documentation for this module may be created at Module:ItemPrices/doc

-- ITEM PRICE GENERATOR 
local global = require('Module:Var')
-- Every item uses base inflation

--FORMAT: ["Item name"] price (Estimated level of use, category multiplier)

-- Category multipliers
-- CONSUMABLES
-- Instant potion core
local m_instantHealthPot   = 2
local m_instantManaPot     = 2
local m_rejuvenationPot    = 1.8
local m_unlimitedHealthPot = 300
local m_unlimitedManaPot   = 300

-- Utility potion core
local m_travelPot        = 3
local m_wealthPot        = 5
local m_rarityPot        = 5
local m_gatheringPot     = 5
local m_waterMovementPot = 3
local m_craftingPot      = 4

-- Combat potion core
local m_damagePot     = 10
local m_critChancePot = 10
local m_critDamagePot = 10
local m_cooldownPot   = 10
local m_hastePot      = 10
local m_manaRegenPot  = 10

-- Food
local m_foodHP             = 10
local m_foodSpeed          = 10
local m_foodEvasion        = 10
local m_foodHealing        = 10
local m_foodShielding      = 10
local m_foodArmor          = 10
local m_foodPassiveHealing = 10
local m_foodPassiveShielding = 10
local m_ingredients        = 10

-- Elemental Essences
local m_fireEss   = 0.2
local m_shadowEss = 0.2
local m_iceEss    = 0.2
local m_stormEss  = 0.2
local m_lightEss  = 0.2
local m_natureEss = 0.2

-- CRAFTING MATERIALS
local m_basicMineral    = 1
local m_standardMineral = 10
local m_advancedMineral = 20
local m_crystal         = 1
local m_basicFlower     = 1
local m_standardFlower  = 10
local m_advancedFlower  = 20
local m_enemyMat        = 1

-- RECIPES
local m_recipeInstantPot   = 1
local m_recipeUnlimitedPot = 1
local m_recipeUtilityPot   = 1
local m_recipeCombatPot    = 1
local m_recipeFoodStandard = 1
local m_recipeFoodAdvanced = 1
local m_recipeLockpick     = 1
local m_recipeSlimeSet     = 1

--KEYS
local m_lockpick = 0.5
local m_key=5
local m_masterKey=10

--GEAR IS IN MODULE:VAR


local function price(level, mult)
  return (global.m_inflationPerLevel ^ (level-1)) * mult
end

----------------------------------------------------------------------
local p = {
  items = {
    ------------------------------------------------------------------
    -- Instant Health Potions
    ["Minor health potion"]      = price( 5, m_instantHealthPot),
    ["Lesser health potion"]     = price(15, m_instantHealthPot),
    ["Standard health potion"]   = price(25, m_instantHealthPot),
    ["Greater health potion"]    = price(35, m_instantHealthPot),
    ["Superior health potion"]   = price(45, m_instantHealthPot),
    ["Celestial health potion"]  = price(60, m_instantHealthPot),

    -- Instant Mana Potions
    ["Minor mana potion"]        = price( 5, m_instantManaPot),
    ["Lesser mana potion"]       = price(15, m_instantManaPot),
    ["Standard mana potion"]     = price(25, m_instantManaPot),
    ["Greater mana potion"]      = price(35, m_instantManaPot),
    ["Superior mana potion"]     = price(45, m_instantManaPot),
    ["Celestial mana potion"]    = price(60, m_instantManaPot),

    -- Rejuvenation Potions
    ["Minor rejuvenation potion"]     = price( 5, m_rejuvenationPot),
    ["Lesser rejuvenation potion"]    = price(15, m_rejuvenationPot),
    ["Standard rejuvenation potion"]  = price(25, m_rejuvenationPot),
    ["Greater rejuvenation potion"]   = price(35, m_rejuvenationPot),
    ["Superior rejuvenation potion"]  = price(45, m_rejuvenationPot),
    ["Celestial rejuvenation potion"] = price(60, m_rejuvenationPot),

    -- Unlimited Health Potions
    ["Unlimited minor health potion"]     = price( 5, m_unlimitedHealthPot),
    ["Unlimited lesser health potion"]    = price(15, m_unlimitedHealthPot),
    ["Unlimited standard health potion"]  = price(25, m_unlimitedHealthPot),
    ["Unlimited greater health potion"]   = price(35, m_unlimitedHealthPot),
    ["Unlimited superior health potion"]  = price(45, m_unlimitedHealthPot),
    ["Unlimited celestial health potion"] = price(60, m_unlimitedHealthPot),

    -- Unlimited Mana Potions
    ["Unlimited minor mana potion"]     = price( 5, m_unlimitedManaPot),
    ["Unlimited lesser mana potion"]    = price(15, m_unlimitedManaPot),
    ["Unlimited standard mana potion"]  = price(25, m_unlimitedManaPot),
    ["Unlimited greater mana potion"]   = price(35, m_unlimitedManaPot),
    ["Unlimited superior mana potion"]  = price(45, m_unlimitedManaPot),
    ["Unlimited celestial mana potion"] = price(60, m_unlimitedManaPot),

    ------------------------------------------------------------------
    -- Utility Potions - Travel
    ["Minor travel potion"]   = price(10, m_travelPot),
    ["Standard travel potion"]= price(25, m_travelPot),
    ["Greater travel potion"] = price(40, m_travelPot),
    ["Superior travel potion"]= price(55, m_travelPot),

    -- Wealth Potions
    ["Minor wealth potion"]   = price(10, m_wealthPot),
    ["Standard wealth potion"]= price(25, m_wealthPot),
    ["Greater wealth potion"] = price(40, m_wealthPot),
    ["Superior wealth potion"]= price(55, m_wealthPot),

    -- Rarity Potions
    ["Minor rarity potion"]   = price(10, m_rarityPot),
    ["Standard rarity potion"]= price(25, m_rarityPot),
    ["Greater rarity potion"] = price(40, m_rarityPot),
    ["Superior rarity potion"]= price(55, m_rarityPot),

    -- Gathering Potions
    ["Minor gathering potion"]   = price(10, m_gatheringPot),
    ["Standard gathering potion"]= price(25, m_gatheringPot),
    ["Greater gathering potion"] = price(40, m_gatheringPot),
    ["Superior gathering potion"]= price(55, m_gatheringPot),

    -- Water Movement Potions
    ["Minor water movement potion"]   = price(10, m_waterMovementPot),
    ["Standard water movement potion"]= price(25, m_waterMovementPot),
    ["Greater water movement potion"] = price(40, m_waterMovementPot),
    ["Superior water movement potion"]= price(55, m_waterMovementPot),

    -- Crafting Potions
    ["Minor crafting potion"]   = price(10, m_craftingPot),
    ["Standard crafting potion"]= price(25, m_craftingPot),
    ["Greater crafting potion"] = price(40, m_craftingPot),
    ["Superior crafting potion"]= price(55, m_craftingPot),

    ------------------------------------------------------------------
    -- Combat Potions
    -- Damage
    ["Minor damage potion"]    = price(20, m_damagePot),
    ["Standard damage potion"] = price(40, m_damagePot),
    ["Superior damage potion"] = price(60, m_damagePot),

    -- Critical Chance
    ["Minor critical chance potion"]    = price(20, m_critChancePot),
    ["Standard critical chance potion"] = price(40, m_critChancePot),
    ["Superior critical chance potion"] = price(60, m_critChancePot),

    -- Critical Damage
    ["Minor critical damage potion"]    = price(20, m_critDamagePot),
    ["Standard critical damage potion"] = price(40, m_critDamagePot),
    ["Superior critical damage potion"] = price(60, m_critDamagePot),

    -- Cooldown Rate
    ["Minor cooldown rate potion"]    = price(20, m_cooldownPot),
    ["Standard cooldown rate potion"] = price(40, m_cooldownPot),
    ["Superior cooldown rate potion"] = price(60, m_cooldownPot),

    -- Haste
    ["Minor haste potion"]    = price(20, m_hastePot),
    ["Standard haste potion"] = price(40, m_hastePot),
    ["Superior haste potion"] = price(60, m_hastePot),

    -- Mana Regeneration
    ["Minor mana regeneration potion"]    = price(20, m_manaRegenPot),
    ["Standard mana regeneration potion"] = price(40, m_manaRegenPot),
    ["Superior mana regeneration potion"] = price(60, m_manaRegenPot),

    ------------------------------------------------------------------
    -- Food
    -- Hitpoints
    ["Egg"]        = price( 5, m_foodHP),
    ["Boiled egg"] = price(20, m_foodHP),
    ["Omelette"]   = price(50, m_foodHP),

    -- Speed
    ["Honey"]          = price( 5, m_foodSpeed),
    ["Sugar"]          = price(20, m_foodSpeed),
    ["Blueberry cake"] = price(50, m_foodSpeed),

    -- Evasion
    ["Carrot"]       = price( 5, m_foodEvasion),
    ["Blueberry jam"]= price(20, m_foodEvasion),
    ["Apple pie"]    = price(50, m_foodEvasion),

    -- Healing
    ["Parsley"] = price( 5, m_foodHealing),
    ["Butter"]  = price(20, m_foodHealing),
    ["Soup"]    = price(50, m_foodHealing),

    -- Shielding
    ["Mushroom"]    = price( 5, m_foodShielding),
    ["Apple"]       = price(20, m_foodShielding),
    ["French fries"] = price(50, m_foodShielding),

    -- Armor
    ["Potato"] = price( 5, m_foodArmor),
    ["Cheese"] = price(20, m_foodArmor),
    ["Salad"]  = price(55, m_foodArmor),

    -- Passive Healing
    ["Tomato"] = price( 5, m_foodPassiveHealing),
    ["Ketchup"] = price(20, m_foodPassiveHealing),
    ["Pizza"]   = price(55, m_foodPassiveHealing),

    -- Passive Shielding
    ["Blueberries"] = price( 5, m_foodPassiveShielding),
    ["Bread"]       = price(20, m_foodPassiveShielding),
    ["Garlic bread"] = price(55, m_foodPassiveShielding),

    -- Ingredients
    ["Garlic"] = price(5, m_ingredients),
    ["Milk"]   = price(5, m_ingredients),
    ["Flour"]  = price(5, m_ingredients),

    ------------------------------------------------------------------
    -- Elemental Essences
    -- Fire
    ["Minor fire essence"]    = price( 5, m_fireEss),
    ["Standard fire essence"] = price(10, m_fireEss),
    ["Superior fire essence"] = price(15, m_fireEss),

    -- Shadow
    ["Minor shadow essence"]    = price( 5, m_shadowEss),
    ["Standard shadow essence"] = price(10, m_shadowEss),
    ["Superior shadow essence"] = price(15, m_shadowEss),

    -- Ice
    ["Minor ice essence"]    = price( 5, m_iceEss),
    ["Standard ice essence"] = price(10, m_iceEss),
    ["Superior ice essence"] = price(15, m_iceEss),

    -- Storm
    ["Minor storm essence"]    = price( 5, m_stormEss),
    ["Standard storm essence"] = price(10, m_stormEss),
    ["Superior storm essence"] = price(15, m_stormEss),

    -- Light
    ["Minor light essence"]    = price( 5, m_lightEss),
    ["Standard light essence"] = price(10, m_lightEss),
    ["Superior light essence"] = price(15, m_lightEss),

    -- Nature
    ["Minor nature essence"]    = price( 5, m_natureEss),
    ["Standard nature essence"] = price(10, m_natureEss),
    ["Superior nature essence"] = price(15, m_natureEss),

    ------------------------------------------------------------------
    -- Minerals
    -- Basic
    ["Copper ingot"]    = price( 2, m_basicMineral),
    ["Iron ingot"]      = price( 8, m_basicMineral),
    ["Gold ingot"]      = price(14, m_basicMineral),
    ["Cobalt ingot"]    = price(20, m_basicMineral),
    ["Skysteel ingot"]  = price(26, m_basicMineral),
    ["Emeralite ingot"] = price(32, m_basicMineral),
    ["Mithril ingot"]   = price(38, m_basicMineral),
    ["Stardust ingot"]  = price(44, m_basicMineral),
    ["Celestium ingot"] = price(50, m_basicMineral),

    -- Standard
    ["Emberstone"]  = price( 5, m_standardMineral),
    ["Infernite"]   = price(10, m_standardMineral),
    ["Solar shard"] = price(15, m_standardMineral),
    ["Azure opal"]  = price(25, m_standardMineral),
    ["Sky shard"]   = price(30, m_standardMineral),
    ["Jade tear"]   = price(35, m_standardMineral),
    ["Aqua tear"]   = price(45, m_standardMineral),
    ["Moonstone"]   = price(55, m_standardMineral),
    ["Astral onyx"] = price(60, m_standardMineral),

    -- Advanced
    ["Zuzulite"] = price( 5, m_advancedMineral),
    ["Algazite"] = price(15, m_advancedMineral),
    ["Emirium"]  = price(30, m_advancedMineral),
    ["Lumenite"] = price(45, m_advancedMineral),
    ["Divinium"] = price(60, m_advancedMineral),

    ------------------------------------------------------------------
    -- Crystals
    ["Nature crystal"]  = price(1, m_crystal),
    ["Ice crystal"]     = price(1, m_crystal),
    ["Fire crystal"]    = price(1, m_crystal),
    ["Light crystal"]   = price(1, m_crystal),
    ["Storm crystal"]   = price(1, m_crystal),
    ["Shadow crystal"]  = price(1, m_crystal),

    ------------------------------------------------------------------
    -- Flower Materials
    -- Basic
    ["Sunflower seeds"] = price( 3, m_basicFlower),
    ["Glacial dust"]    = price( 6, m_basicFlower),
    ["Thorns"]          = price(10, m_basicFlower),
    ["Kindle rod"]      = price(15, m_basicFlower),
    ["Void seeds"]      = price(20, m_basicFlower),
    ["Nimbus sphere"]   = price(25, m_basicFlower),
    ["Terrabloom"]      = price(30, m_basicFlower),
    ["Icicle"]          = price(35, m_basicFlower),
    ["Glowleaf"]        = price(40, m_basicFlower),
    ["Ember leaf"]      = price(45, m_basicFlower),
    ["Twilight vine"]   = price(47, m_basicFlower),
    ["Thunder rod"]     = price(50, m_basicFlower),

    -- Standard
    ["Sunflower petals"] = price( 5, m_standardFlower),
    ["Glacial orb"]      = price(10, m_standardFlower),
    ["Pricklefiber"]     = price(15, m_standardFlower),
    ["Kindle ash"]       = price(20, m_standardFlower),
    ["Void dust"]        = price(25, m_standardFlower),
    ["Cloudroot"]        = price(30, m_standardFlower),
    ["Terravine"]        = price(35, m_standardFlower),
    ["Frost root"]       = price(40, m_standardFlower),
    ["Glowcore"]         = price(45, m_standardFlower),
    ["Ember seeds"]      = price(50, m_standardFlower),
    ["Twilight root"]    = price(55, m_standardFlower),
    ["Thunder seeds"]    = price(60, m_standardFlower),

    -- Advanced
    ["Everbloom dust"] = price(10, m_advancedFlower),

    ------------------------------------------------------------------
    -- Enemy Drop Material
    ["Slime glob"] = price(2, m_enemyMat),

    ------------------------------------------------------------------
    -- Recipes
    -- Instant Potions
    ["Recipe - Weak health potions"]       = price( 5, m_recipeInstantPot),
    ["Recipe - Strong health potions"]     = price(30, m_recipeInstantPot),
    ["Recipe - Weak mana potions"]         = price( 5, m_recipeInstantPot),
    ["Recipe - Strong mana potions"]       = price(30, m_recipeInstantPot),
    ["Recipe - Weak rejuvenation potions"] = price( 5, m_recipeInstantPot),
    ["Recipe - Strong rejuvenation potions"] = price(30, m_recipeInstantPot),

    -- Unlimited Potions
    ["Recipe - Unlimited minor health potion"]     = price( 5, m_recipeUnlimitedPot),
    ["Recipe - Unlimited lesser health potion"]    = price(15, m_recipeUnlimitedPot),
    ["Recipe - Unlimited standard health potion"]  = price(25, m_recipeUnlimitedPot),
    ["Recipe - Unlimited greater health potion"]   = price(35, m_recipeUnlimitedPot),
    ["Recipe - Unlimited superior health potion"]  = price(45, m_recipeUnlimitedPot),
    ["Recipe - Unlimited celestial health potion"] = price(55, m_recipeUnlimitedPot),
    ["Recipe - Unlimited minor mana potion"]       = price( 5, m_recipeUnlimitedPot),
    ["Recipe - Unlimited lesser mana potion"]      = price(15, m_recipeUnlimitedPot),
    ["Recipe - Unlimited standard mana potion"]    = price(25, m_recipeUnlimitedPot),
    ["Recipe - Unlimited greater mana potion"]     = price(35, m_recipeUnlimitedPot),
    ["Recipe - Unlimited superior mana potion"]    = price(45, m_recipeUnlimitedPot),
    ["Recipe - Unlimited celestial mana potion"]   = price(55, m_recipeUnlimitedPot),

    -- Utility Potions
    ["Recipe - Travel potions"]        = price(5, m_recipeUtilityPot),
    ["Recipe - Wealth potions"]        = price(5, m_recipeUtilityPot),
    ["Recipe - Rarity potions"]        = price(5, m_recipeUtilityPot),
    ["Recipe - Gathering potions"]     = price(5, m_recipeUtilityPot),
    ["Recipe - Water movement potions"]= price(5, m_recipeUtilityPot),
    ["Recipe - Crafting potions"]      = price(5, m_recipeUtilityPot),

    -- Combat Potions
    ["Recipe - Damage potions"]          = price(10, m_recipeCombatPot),
    ["Recipe - Critical chance potions"] = price(10, m_recipeCombatPot),
    ["Recipe - Critical damage potions"] = price(10, m_recipeCombatPot),
    ["Recipe - Cooldown rate potions"]   = price(10, m_recipeCombatPot),
    ["Recipe - Haste potions"]           = price(10, m_recipeCombatPot),
    ["Recipe - Mana regeneration potions"]= price(10, m_recipeCombatPot),

    -- Standard Food Recipes
    ["Recipe - Boiled egg"]    = price(10, m_recipeFoodStandard),
    ["Recipe - Sugar"]         = price(10, m_recipeFoodStandard),
    ["Recipe - Blueberry jam"] = price(10, m_recipeFoodStandard),
    ["Recipe - Butter"]        = price(10, m_recipeFoodStandard),
    ["Recipe - Cheese"]        = price(10, m_recipeFoodStandard),
    ["Recipe - Ketchup"]       = price(10, m_recipeFoodStandard),
    ["Recipe - Bread"]         = price(10, m_recipeFoodStandard),

    -- Advanced Food Recipes
    ["Recipe - Omelette"]      = price(30, m_recipeFoodAdvanced),
    ["Recipe - Blueberry cake"] = price(30, m_recipeFoodAdvanced),
    ["Recipe - Apple pie"]     = price(30, m_recipeFoodAdvanced),
    ["Recipe - Soup"]          = price(30, m_recipeFoodAdvanced),
    ["Recipe - French fries"]  = price(30, m_recipeFoodAdvanced),
    ["Recipe - Salad"]         = price(30, m_recipeFoodAdvanced),
    ["Recipe - Pizza"]         = price(30, m_recipeFoodAdvanced),
    ["Recipe - Garlic bread"]  = price(30, m_recipeFoodAdvanced),

    -- Lockpick Recipes
    ["Recipe - Copper lockpick"]   = price( 5, m_recipeLockpick),
    ["Recipe - Gold lockpick"]     = price(15, m_recipeLockpick),
    ["Recipe - Cobalt lockpick"]   = price(25, m_recipeLockpick),
    ["Recipe - Emeralite lockpick"]= price(35, m_recipeLockpick),
    ["Recipe - Mithril lockpick"]  = price(45, m_recipeLockpick),
    ["Recipe - Celestium lockpick"]= price(55, m_recipeLockpick),
    -- slime gear
    ["Recipe - Slime helmet"] = price(1, m_recipeSlimeSet),
    ["Recipe - Slime chestplate"] = price(5, m_recipeSlimeSet),
    ["Recipe - Slime pants"] = price(5, m_recipeSlimeSet),
    ["Recipe - Slime gloves"] = price(1, m_recipeSlimeSet),
    ["Recipe - Slime shoes"] = price(1, m_recipeSlimeSet),
    ["Recipe - Slime cloak"] = price(1, m_recipeSlimeSet),
    -------------------------------------------------------------------------------------------------------------------------------
    
    --Souls
    ["Soul of mana"]    = 100,
    ["Soul of power"]   = 100,
    ["Soul of vitality"]= 100,
    ["Soul of luck"]    = 100,
    
    -- Lockpicks
	["Copper lockpick"]     = price( 5, m_lockpick),
	["Gold lockpick"]       = price(15, m_lockpick),
	["Cobalt lockpick"]     = price(25, m_lockpick),
	["Emeralite lockpick"]  = price(35, m_lockpick),
	["Mithril lockpick"]    = price(45, m_lockpick),
	["Celestium lockpick"]  = price(55, m_lockpick),
	
	-- Keys
	["Copper key"]          = price( 5, m_key),
	["Gold key"]            = price(15, m_key),
	["Cobalt key"]          = price(25, m_key),
	["Emeralite key"]       = price(35, m_key),
	["Mithril key"]         = price(45, m_key),
	["Celestium key"]       = price(55, m_key),
	
	-- Master keys
	["Copper master key"]     = price( 5, m_masterKey),
	["Gold master key"]       = price(15, m_masterKey),
	["Cobalt master key"]     = price(25, m_masterKey),
	["Emeralite master key"]  = price(35, m_masterKey),
	["Mithril master key"]    = price(45, m_masterKey),
	["Celestium master key"]  = price(55, m_masterKey),
    
    -- GEAR
    --Common
    
    --Uncommon
    ["Grassy staff"] = price(1,global.m_gearUncommon)*global.m_weaponValue,
    
    ["Slime helmet"] = price(1,global.m_gearUncommon)*global.m_helmValue,
    
    ["Slime chestplate"] = price(1,global.m_gearUncommon)*global.m_chestValue,
    
    ["Slime pants"] = price(1,global.m_gearUncommon)*global.m_legsValue,
    
    ["Slime gloves"] = price(1,global.m_gearUncommon)*global.m_glovesValue,
    
    ["Slime shoes"] = price(1,global.m_gearUncommon)*global.m_shoesValue,
    
    ["Slime cloak"] = price(1,global.m_gearUncommon)*global.m_cloakValue 
    --Rare
    
    --Epic
    
    --Legendary
    
  }
}
----------------------------------------------------------------------
function p.getItemPrice(itemName)
    local name = itemName.args[1]
    local value = p.items[name]
    if value then
        return math.floor(value + 0.5) ..""
    else
        return "Where price"
    end
end

return p