Module:Item2/testcases

From Path of Exile Wiki
Jump to navigation Jump to search

This module implements the test cases for Module:Item2.

N2 tests failed.

Name Expected Actual
YesY test_f_mods_local_stat_addition_and_quality
YesY test_f_mods_local_stat_addition_from_extra_stats
YesY test_f_mods_local_stat_addition_from_mods
YesY test_f_mods_sell_price_override
YesY test_f_mods_sell_prices
YesY test_f_mods_stats_addition
YesY test_ic_normal_active_skill_gem
YesY test_ic_normal_body_armour
YesY test_ic_normal_claw
N test_ic_normal_critical_utility_flask Lua error -- Module:Item2/core/sandbox:503: The item class id "UtilityFlaskCritical" is invalid. Using the correct item class id is required for the template to work correctly.
YesY test_ic_normal_divi_card
YesY test_ic_normal_harvest_seed
YesY test_ic_normal_hybrid_flask
YesY test_ic_normal_jewel
YesY test_ic_normal_life_flask
YesY test_ic_normal_mana_flask
YesY test_ic_normal_map
YesY test_ic_normal_mtx
YesY test_ic_normal_quest_item
YesY test_ic_normal_shield
YesY test_ic_normal_stackable_currency
YesY test_ic_normal_support_skill_gem
YesY test_ic_normal_utility_flask
YesY test_ic_unique_amulet
YesY test_ic_unique_belt
YesY test_ic_unique_body_armour
YesY test_ic_unique_boots
YesY test_ic_unique_bow
YesY test_ic_unique_claw
YesY test_ic_unique_dagger
YesY test_ic_unique_fishing_rod
YesY test_ic_unique_gloves
YesY test_ic_unique_helmet
YesY test_ic_unique_hybrid_flask
YesY test_ic_unique_jewel
YesY test_ic_unique_life_flask
YesY test_ic_unique_mana_flask
YesY test_ic_unique_map
YesY test_ic_unique_one_hand_axe
YesY test_ic_unique_one_hand_mace
YesY test_ic_unique_one_hand_sword
YesY test_ic_unique_piece
YesY test_ic_unique_quiver
YesY test_ic_unique_ring
YesY test_ic_unique_sceptre
YesY test_ic_unique_shield
YesY test_ic_unique_staff
YesY test_ic_unique_thrusting_one_hand_sword
YesY test_ic_unique_two_hand_axe
YesY test_ic_unique_two_hand_mace
YesY test_ic_unique_two_hand_sword
YesY test_ic_unique_utility_flask
YesY test_ic_unique_wand
N test_release_version_unknown_succeeds Lua error -- Module:Util:202: "?" is not a recognized version number
local m_item = require('Module:Item2/sandbox') -- the module to be tested
local ScribuntoUnit = require('Module:ScribuntoUnit')
local suite = ScribuntoUnit:new()

-- ----------------------------------------------------------------------------
-- Testing base items for various item classes
-- ----------------------------------------------------------------------------

function suite:test_ic_normal_divi_card()
    m_item.item{test=1, rarity_id = "normal", name = "The Risk", class_id = "DivinationCard", size_x = "1", size_y = "1", flavour_text = "\"There is no right or wrong choice, no best or worst. There are only choices and their consequences.\"", drop_level = "1", tags = "divination_card, default", stack_size = "3", description = "{{c|unique|{{il|Ventor's Gamble|html=}}}}", stack_size_currency_tab = "5000", help_text = "Shift click to unstack."}
end

function suite:test_ic_normal_mana_flask()
    m_item.item{test=1, rarity_id = "normal", name = "Small Mana Flask", class_id = "ManaFlask", size_x = "1", size_y = "2", drop_level = "1", drop_rarities = "Normal, Magic, Unique", tags = "mana_flask, flask, default", help_text = "Right click to drink. Can only hold charges while in belt. Refills as you kill monsters.", purchase_cost_normal1_name = "Scroll of Wisdom", purchase_cost_normal1_amount = "3", purchase_cost_magic1_name = "Orb of Transmutation", purchase_cost_magic1_amount = "3", purchase_cost_rare1_name = "Chaos Orb", purchase_cost_rare1_amount = "1", purchase_cost_unique1_name = "Chaos Orb", purchase_cost_unique1_amount = "5", required_level = "1", flask_mana = "60", flask_duration = "5", charges_max = "30", charges_per_use = "10"}
end

function suite:test_ic_normal_life_flask()
    m_item.item{test=1, rarity_id = "normal", name = "Small Life Flask", class_id = "LifeFlask", size_x = "1", size_y = "2", drop_level = "1", drop_rarities = "Normal, Magic, Unique", tags = "life_flask, flask, default", help_text = "Right click to drink. Can only hold charges while in belt. Refills as you kill monsters.", purchase_cost_normal1_name = "Scroll of Wisdom", purchase_cost_normal1_amount = "1", purchase_cost_magic1_name = "Orb of Transmutation", purchase_cost_magic1_amount = "1", purchase_cost_rare1_name = "Chaos Orb", purchase_cost_rare1_amount = "1", purchase_cost_unique1_name = "Chaos Orb", purchase_cost_unique1_amount = "5", required_level = "1", flask_life = "70", flask_duration = "6", charges_max = "21", charges_per_use = "7"}
end

function suite:test_ic_normal_hybrid_flask()
    m_item.item{test=1, rarity_id = "normal", name = "Small Hybrid Flask", class_id = "HybridFlask", size_x = "1", size_y = "2", drop_level = "10", drop_rarities = "Normal, Magic, Unique", tags = "hybrid_flask, flask, default", help_text = "Right click to drink. Can only hold charges while in belt. Refills as you kill monsters.", implicit1 = "FlaskLevelRequirement10", purchase_cost_normal1_name = "Orb of Transmutation", purchase_cost_normal1_amount = "2", purchase_cost_magic1_name = "Orb of Transmutation", purchase_cost_magic1_amount = "3", purchase_cost_rare1_name = "Chaos Orb", purchase_cost_rare1_amount = "1", purchase_cost_unique1_name = "Chaos Orb", purchase_cost_unique1_amount = "5", required_level = "10", flask_life = "100", flask_mana = "70", flask_duration = "5", charges_max = "40", charges_per_use = "20"}
end

function suite:test_ic_normal_utility_flask()
    m_item.item{test=1, rarity_id = "normal", name = "Granite Flask", class_id = "UtilityFlask", size_x = "1", size_y = "2", drop_level = "27", drop_rarities = "Normal, Magic, Unique", tags = "not_for_sale, utility_flask, flask, default", help_text = "Right click to drink. Can only hold charges while in belt. Refills as you kill monsters.", implicit1 = "FlaskLevelRequirement27", purchase_cost_normal1_name = "Chaos Orb", purchase_cost_normal1_amount = "1", purchase_cost_magic1_name = "Chaos Orb", purchase_cost_magic1_amount = "2", purchase_cost_rare1_name = "Chaos Orb", purchase_cost_rare1_amount = "3", purchase_cost_unique1_name = "Chaos Orb", purchase_cost_unique1_amount = "5", required_level = "27", flask_duration = "4", buff_id = "flask_utility_ironskin", buff_value1 = "3000", buff_stat_text = "+3000 to [[Armour]]", charges_max = "60", charges_per_use = "30"}
end


function suite:test_ic_normal_critical_utility_flask()
    m_item.item{test=1, rarity_id = "normal", name = "Diamond Flask", class_id = "UtilityFlaskCritical", size_x = "1", size_y = "2", drop_level = "27", drop_rarities = "Normal, Magic, Unique", tags = "not_for_sale, no_effect_flask_mod, critical_utility_flask, utility_flask, flask, default", help_text = "Right click to drink. Can only hold charges while in belt. Refills as you kill monsters.", implicit1 = "FlaskLevelRequirement27", purchase_cost_normal1_name = "Chaos Orb", purchase_cost_normal1_amount = "1", purchase_cost_magic1_name = "Chaos Orb", purchase_cost_magic1_amount = "2", purchase_cost_rare1_name = "Chaos Orb", purchase_cost_rare1_amount = "3", purchase_cost_unique1_name = "Chaos Orb", purchase_cost_unique1_amount = "5", required_level = "27", flask_duration = "4", buff_id = "flask_utility_critical_strike_chance", buff_value1 = "1", buff_stat_text = "Your [[Critical Strike Chance]] is Lucky", charges_max = "40", charges_per_use = "20"}
end

function suite:test_ic_normal_shield()
    m_item.item{test=1, rarity_id = "normal", name = "Rawhide Tower Shield", class_id = "Shield", size_x = "2", size_y = "4", drop_level = "11", drop_rarities = "Normal, Magic, Rare, Unique", tags = "str_armour, str_shield, shield, armour, default", implicit1 = "MovementVelocityPenaltyHeavyShieldImplicit", implicit2 = "IncreasedLifeImplicitShield1", purchase_cost_normal1_name = "Orb of Transmutation", purchase_cost_normal1_amount = "1", purchase_cost_magic1_name = "Orb of Transmutation", purchase_cost_magic1_amount = "2", purchase_cost_rare1_name = "Chaos Orb", purchase_cost_rare1_amount = "1", purchase_cost_unique1_name = "Chaos Orb", purchase_cost_unique1_amount = "5", required_level = "11", required_strength = "33", armour = "53", block = "26"}
end

function suite:test_ic_normal_body_armour()
    m_item.item{test=1, rarity_id = "normal", name = "Simple Robe", class_id = "Body Armour", size_x = "2", size_y = "3", drop_level = "3", drop_rarities = "Normal, Magic, Rare, Unique", tags = "int_armour, body_armour, armour, default", implicit1 = "MovementVelocityPenaltyLightArmourImplicit", purchase_cost_normal1_name = "Scroll of Wisdom", purchase_cost_normal1_amount = "1", purchase_cost_magic1_name = "Scroll of Wisdom", purchase_cost_magic1_amount = "1", purchase_cost_rare1_name = "Chaos Orb", purchase_cost_rare1_amount = "1", purchase_cost_unique1_name = "Chaos Orb", purchase_cost_unique1_amount = "5", required_level = "3", required_intelligence = "17", energy_shield = "12"}
end

function suite:test_ic_normal_active_skill_gem()
    m_item.item{test=1, rarity_id = "normal", name = "Fireball", class_id = "Active Skill Gem", size_x = "1", size_y = "1", drop_level = "5", tags = "gem, default", help_text = "Place into an item socket of the right colour to gain this skill. Right click to remove from a socket.", purchase_cost_normal1_name = "Scroll of Wisdom", purchase_cost_normal1_amount = "1", intelligence_percent = "100", gem_tags = "Projectile, Spell, AoE, Fire", cast_time = "0.85", gem_description = "Unleashes a ball of fire towards a target which explodes, damaging nearby foes.", active_skill_name = "Fireball", projectile_speed = "1040", skill_id = "Fireball", is_support_gem = "False", required_level = "1", static_critical_strike_chance = "6", static_damage_effectiveness = "100", static_damage_multiplier = "100", static_stat1_id = "base_is_projectile", static_stat1_value = "1", stat_text = "Deals (7-739) to (10-1109) Fire Damage<br>(20-39)% chance to Ignite enemies<br>+(0-3) to radius", quality_stat_text = "0.5% chance to Ignite enemies", static_quality_stat1_id = "base_chance_to_ignite_%", static_quality_stat1_value = "0.5", level1 = "True", level1_level_requirement = "1", level1_intelligence_requirement = "0", level1_mana_cost = "6", level1_stat_text = "Deals 7 to 10 Fire Damage<br>20% chance to Ignite enemies", level1_stat1_id = "spell_minimum_base_fire_damage", level1_stat1_value = "7", level1_stat2_id = "spell_maximum_base_fire_damage", level1_stat2_value = "10", level1_stat3_id = "base_chance_to_ignite_%", level1_stat3_value = "20", level1_experience = "0", level2 = "True", level2_level_requirement = "2", level2_intelligence_requirement = "0", level2_mana_cost = "6", level2_stat_text = "Deals 8 to 11 Fire Damage<br>21% chance to Ignite enemies", level2_stat1_id = "spell_minimum_base_fire_damage", level2_stat1_value = "8", level2_stat2_id = "spell_maximum_base_fire_damage", level2_stat2_value = "11", level2_stat3_id = "base_chance_to_ignite_%", level2_stat3_value = "21", level2_experience = "70", level3 = "True", level3_level_requirement = "4", level3_intelligence_requirement = "16", level3_mana_cost = "7", level3_stat_text = "Deals 10 to 14 Fire Damage<br>22% chance to Ignite enemies", level3_stat1_id = "spell_minimum_base_fire_damage", level3_stat1_value = "10", level3_stat2_id = "spell_maximum_base_fire_damage", level3_stat2_value = "14", level3_stat3_id = "base_chance_to_ignite_%", level3_stat3_value = "22", level3_experience = "378", level4 = "True", level4_level_requirement = "7", level4_intelligence_requirement = "22", level4_mana_cost = "8", level4_stat_text = "Deals 13 to 20 Fire Damage<br>23% chance to Ignite enemies", level4_stat1_id = "spell_minimum_base_fire_damage", level4_stat1_value = "13", level4_stat2_id = "spell_maximum_base_fire_damage", level4_stat2_value = "20", level4_stat3_id = "base_chance_to_ignite_%", level4_stat3_value = "23", level4_experience = "1932", level5 = "True", level5_level_requirement = "11", level5_intelligence_requirement = "31", level5_mana_cost = "9", level5_stat_text = "Deals 19 to 29 Fire Damage<br>24% chance to Ignite enemies", level5_stat1_id = "spell_minimum_base_fire_damage", level5_stat1_value = "19", level5_stat2_id = "spell_maximum_base_fire_damage", level5_stat2_value = "29", level5_stat3_id = "base_chance_to_ignite_%", level5_stat3_value = "24", level5_experience = "8599", level6 = "True", level6_level_requirement = "16", level6_intelligence_requirement = "41", level6_mana_cost = "10", level6_stat_text = "Deals 29 to 43 Fire Damage<br>25% chance to Ignite enemies<br>+1 to radius", level6_stat1_id = "spell_minimum_base_fire_damage", level6_stat1_value = "29", level6_stat2_id = "spell_maximum_base_fire_damage", level6_stat2_value = "43", level6_stat3_id = "base_chance_to_ignite_%", level6_stat3_value = "25", level6_stat4_id = "active_skill_base_radius_+", level6_stat4_value = "1", level6_experience = "34646", level7 = "True", level7_level_requirement = "20", level7_intelligence_requirement = "50", level7_mana_cost = "11", level7_stat_text = "Deals 39 to 58 Fire Damage<br>26% chance to Ignite enemies<br>+1 to radius", level7_stat1_id = "spell_minimum_base_fire_damage", level7_stat1_value = "39", level7_stat2_id = "spell_maximum_base_fire_damage", level7_stat2_value = "58", level7_stat3_id = "base_chance_to_ignite_%", level7_stat3_value = "26", level7_stat4_id = "active_skill_base_radius_+", level7_stat4_value = "1", level7_experience = "84371", level8 = "True", level8_level_requirement = "24", level8_intelligence_requirement = "58", level8_mana_cost = "12", level8_stat_text = "Deals 52 to 77 Fire Damage<br>27% chance to Ignite enemies<br>+1 to radius", level8_stat1_id = "spell_minimum_base_fire_damage", level8_stat1_value = "52", level8_stat2_id = "spell_maximum_base_fire_damage", level8_stat2_value = "77", level8_stat3_id = "base_chance_to_ignite_%", level8_stat3_value = "27", level8_stat4_id = "active_skill_base_radius_+", level8_stat4_value = "1", level8_experience = "180085", level9 = "True", level9_level_requirement = "28", level9_intelligence_requirement = "67", level9_mana_cost = "13", level9_stat_text = "Deals 67 to 101 Fire Damage<br>28% chance to Ignite enemies<br>+1 to radius", level9_stat1_id = "spell_minimum_base_fire_damage", level9_stat1_value = "67", level9_stat2_id = "spell_maximum_base_fire_damage", level9_stat2_value = "101", level9_stat3_id = "base_chance_to_ignite_%", level9_stat3_value = "28", level9_stat4_id = "active_skill_base_radius_+", level9_stat4_value = "1", level9_experience = "349680", level10 = "True", level10_level_requirement = "32", level10_intelligence_requirement = "75", level10_mana_cost = "15", level10_stat_text = "Deals 87 to 131 Fire Damage<br>29% chance to Ignite enemies<br>+1 to radius", level10_stat1_id = "spell_minimum_base_fire_damage", level10_stat1_value = "87", level10_stat2_id = "spell_maximum_base_fire_damage", level10_stat2_value = "131", level10_stat3_id = "base_chance_to_ignite_%", level10_stat3_value = "29", level10_stat4_id = "active_skill_base_radius_+", level10_stat4_value = "1", level10_experience = "633439", level11 = "True", level11_level_requirement = "36", level11_intelligence_requirement = "83", level11_mana_cost = "16", level11_stat_text = "Deals 112 to 168 Fire Damage<br>30% chance to Ignite enemies<br>+1 to radius", level11_stat1_id = "spell_minimum_base_fire_damage", level11_stat1_value = "112", level11_stat2_id = "spell_maximum_base_fire_damage", level11_stat2_value = "168", level11_stat3_id = "base_chance_to_ignite_%", level11_stat3_value = "30", level11_stat4_id = "active_skill_base_radius_+", level11_stat4_value = "1", level11_experience = "1087435", level12 = "True", level12_level_requirement = "40", level12_intelligence_requirement = "92", level12_mana_cost = "17", level12_stat_text = "Deals 142 to 213 Fire Damage<br>31% chance to Ignite enemies<br>+2 to radius", level12_stat1_id = "spell_minimum_base_fire_damage", level12_stat1_value = "142", level12_stat2_id = "spell_maximum_base_fire_damage", level12_stat2_value = "213", level12_stat3_id = "base_chance_to_ignite_%", level12_stat3_value = "31", level12_stat4_id = "active_skill_base_radius_+", level12_stat4_value = "2", level12_experience = "1790563", level13 = "True", level13_level_requirement = "44", level13_intelligence_requirement = "100", level13_mana_cost = "18", level13_stat_text = "Deals 180 to 270 Fire Damage<br>32% chance to Ignite enemies<br>+2 to radius", level13_stat1_id = "spell_minimum_base_fire_damage", level13_stat1_value = "180", level13_stat2_id = "spell_maximum_base_fire_damage", level13_stat2_value = "270", level13_stat3_id = "base_chance_to_ignite_%", level13_stat3_value = "32", level13_stat4_id = "active_skill_base_radius_+", level13_stat4_value = "2", level13_experience = "2851786", level14 = "True", level14_level_requirement = "48", level14_intelligence_requirement = "109", level14_mana_cost = "19", level14_stat_text = "Deals 226 to 339 Fire Damage<br>33% chance to Ignite enemies<br>+2 to radius", level14_stat1_id = "spell_minimum_base_fire_damage", level14_stat1_value = "226", level14_stat2_id = "spell_maximum_base_fire_damage", level14_stat2_value = "339", level14_stat3_id = "base_chance_to_ignite_%", level14_stat3_value = "33", level14_stat4_id = "active_skill_base_radius_+", level14_stat4_value = "2", level14_experience = "4917656", level15 = "True", level15_level_requirement = "52", level15_intelligence_requirement = "117", level15_mana_cost = "21", level15_stat_text = "Deals 283 to 424 Fire Damage<br>34% chance to Ignite enemies<br>+2 to radius", level15_stat1_id = "spell_minimum_base_fire_damage", level15_stat1_value = "283", level15_stat2_id = "spell_maximum_base_fire_damage", level15_stat2_value = "424", level15_stat3_id = "base_chance_to_ignite_%", level15_stat3_value = "34", level15_stat4_id = "active_skill_base_radius_+", level15_stat4_value = "2", level15_experience = "7424766", level16 = "True", level16_level_requirement = "56", level16_intelligence_requirement = "125", level16_mana_cost = "22", level16_stat_text = "Deals 352 to 528 Fire Damage<br>35% chance to Ignite enemies<br>+2 to radius", level16_stat1_id = "spell_minimum_base_fire_damage", level16_stat1_value = "352", level16_stat2_id = "spell_maximum_base_fire_damage", level16_stat2_value = "528", level16_stat3_id = "base_chance_to_ignite_%", level16_stat3_value = "35", level16_stat4_id = "active_skill_base_radius_+", level16_stat4_value = "2", level16_experience = "13223702", level17 = "True", level17_level_requirement = "60", level17_intelligence_requirement = "134", level17_mana_cost = "23", level17_stat_text = "Deals 437 to 655 Fire Damage<br>36% chance to Ignite enemies<br>+2 to radius", level17_stat1_id = "spell_minimum_base_fire_damage", level17_stat1_value = "437", level17_stat2_id = "spell_maximum_base_fire_damage", level17_stat2_value = "655", level17_stat3_id = "base_chance_to_ignite_%", level17_stat3_value = "36", level17_stat4_id = "active_skill_base_radius_+", level17_stat4_value = "2", level17_experience = "28307621", level18 = "True", level18_level_requirement = "64", level18_intelligence_requirement = "142", level18_mana_cost = "24", level18_stat_text = "Deals 540 to 810 Fire Damage<br>37% chance to Ignite enemies<br>+3 to radius", level18_stat1_id = "spell_minimum_base_fire_damage", level18_stat1_value = "540", level18_stat2_id = "spell_maximum_base_fire_damage", level18_stat2_value = "810", level18_stat3_id = "base_chance_to_ignite_%", level18_stat3_value = "37", level18_stat4_id = "active_skill_base_radius_+", level18_stat4_value = "3", level18_experience = "56100356", level19 = "True", level19_level_requirement = "67", level19_intelligence_requirement = "148", level19_mana_cost = "25", level19_stat_text = "Deals 632 to 948 Fire Damage<br>38% chance to Ignite enemies<br>+3 to radius", level19_stat1_id = "spell_minimum_base_fire_damage", level19_stat1_value = "632", level19_stat2_id = "spell_maximum_base_fire_damage", level19_stat2_value = "948", level19_stat3_id = "base_chance_to_ignite_%", level19_stat3_value = "38", level19_stat4_id = "active_skill_base_radius_+", level19_stat4_value = "3", level19_experience = "99970095", level20 = "True", level20_level_requirement = "70", level20_intelligence_requirement = "155", level20_mana_cost = "26", level20_stat_text = "Deals 739 to 1109 Fire Damage<br>39% chance to Ignite enemies<br>+3 to radius", level20_stat1_id = "spell_minimum_base_fire_damage", level20_stat1_value = "739", level20_stat2_id = "spell_maximum_base_fire_damage", level20_stat2_value = "1109", level20_stat3_id = "base_chance_to_ignite_%", level20_stat3_value = "39", level20_stat4_id = "active_skill_base_radius_+", level20_stat4_value = "3", level20_experience = "342051651", level21 = "True", level21_level_requirement = "72", level21_intelligence_requirement = "159", level21_mana_cost = "27", level21_stat_text = "Deals 819 to 1229 Fire Damage<br>40% chance to Ignite enemies<br>+3 to radius", level21_stat1_id = "spell_minimum_base_fire_damage", level21_stat1_value = "819", level21_stat2_id = "spell_maximum_base_fire_damage", level21_stat2_value = "1229", level21_stat3_id = "base_chance_to_ignite_%", level21_stat3_value = "40", level21_stat4_id = "active_skill_base_radius_+", level21_stat4_value = "3", level22 = "True", level22_level_requirement = "74", level22_mana_cost = "27", level22_stat_text = "Deals 908 to 1362 Fire Damage<br>41% chance to Ignite enemies<br>+3 to radius", level22_stat1_id = "spell_minimum_base_fire_damage", level22_stat1_value = "908", level22_stat2_id = "spell_maximum_base_fire_damage", level22_stat2_value = "1362", level22_stat3_id = "base_chance_to_ignite_%", level22_stat3_value = "41", level22_stat4_id = "active_skill_base_radius_+", level22_stat4_value = "3", level23 = "True", level23_level_requirement = "76", level23_mana_cost = "28", level23_stat_text = "Deals 1005 to 1508 Fire Damage<br>42% chance to Ignite enemies<br>+3 to radius", level23_stat1_id = "spell_minimum_base_fire_damage", level23_stat1_value = "1005", level23_stat2_id = "spell_maximum_base_fire_damage", level23_stat2_value = "1508", level23_stat3_id = "base_chance_to_ignite_%", level23_stat3_value = "42", level23_stat4_id = "active_skill_base_radius_+", level23_stat4_value = "3", level24 = "True", level24_level_requirement = "78", level24_mana_cost = "28", level24_stat_text = "Deals 1113 to 1669 Fire Damage<br>43% chance to Ignite enemies<br>+4 to radius", level24_stat1_id = "spell_minimum_base_fire_damage", level24_stat1_value = "1113", level24_stat2_id = "spell_maximum_base_fire_damage", level24_stat2_value = "1669", level24_stat3_id = "base_chance_to_ignite_%", level24_stat3_value = "43", level24_stat4_id = "active_skill_base_radius_+", level24_stat4_value = "4", level25 = "True", level25_level_requirement = "80", level25_mana_cost = "29", level25_stat_text = "Deals 1231 to 1847 Fire Damage<br>44% chance to Ignite enemies<br>+4 to radius", level25_stat1_id = "spell_minimum_base_fire_damage", level25_stat1_value = "1231", level25_stat2_id = "spell_maximum_base_fire_damage", level25_stat2_value = "1847", level25_stat3_id = "base_chance_to_ignite_%", level25_stat3_value = "44", level25_stat4_id = "active_skill_base_radius_+", level25_stat4_value = "4", level26 = "True", level26_level_requirement = "82", level26_mana_cost = "30", level26_stat_text = "Deals 1361 to 2042 Fire Damage<br>45% chance to Ignite enemies<br>+4 to radius", level26_stat1_id = "spell_minimum_base_fire_damage", level26_stat1_value = "1361", level26_stat2_id = "spell_maximum_base_fire_damage", level26_stat2_value = "2042", level26_stat3_id = "base_chance_to_ignite_%", level26_stat3_value = "45", level26_stat4_id = "active_skill_base_radius_+", level26_stat4_value = "4", level27 = "True", level27_level_requirement = "84", level27_mana_cost = "30", level27_stat_text = "Deals 1504 to 2257 Fire Damage<br>46% chance to Ignite enemies<br>+4 to radius", level27_stat1_id = "spell_minimum_base_fire_damage", level27_stat1_value = "1504", level27_stat2_id = "spell_maximum_base_fire_damage", level27_stat2_value = "2257", level27_stat3_id = "base_chance_to_ignite_%", level27_stat3_value = "46", level27_stat4_id = "active_skill_base_radius_+", level27_stat4_value = "4", level28 = "True", level28_level_requirement = "86", level28_mana_cost = "31", level28_stat_text = "Deals 1662 to 2493 Fire Damage<br>47% chance to Ignite enemies<br>+4 to radius", level28_stat1_id = "spell_minimum_base_fire_damage", level28_stat1_value = "1662", level28_stat2_id = "spell_maximum_base_fire_damage", level28_stat2_value = "2493", level28_stat3_id = "base_chance_to_ignite_%", level28_stat3_value = "47", level28_stat4_id = "active_skill_base_radius_+", level28_stat4_value = "4", level29 = "True", level29_level_requirement = "88", level29_mana_cost = "31", level29_stat_text = "Deals 1835 to 2752 Fire Damage<br>48% chance to Ignite enemies<br>+4 to radius", level29_stat1_id = "spell_minimum_base_fire_damage", level29_stat1_value = "1835", level29_stat2_id = "spell_maximum_base_fire_damage", level29_stat2_value = "2752", level29_stat3_id = "base_chance_to_ignite_%", level29_stat3_value = "48", level29_stat4_id = "active_skill_base_radius_+", level29_stat4_value = "4", level30 = "True", level30_level_requirement = "90", level30_mana_cost = "32", level30_stat_text = "Deals 2025 to 3038 Fire Damage<br>49% chance to Ignite enemies<br>+5 to radius", level30_stat1_id = "spell_minimum_base_fire_damage", level30_stat1_value = "2025", level30_stat2_id = "spell_maximum_base_fire_damage", level30_stat2_value = "3038", level30_stat3_id = "base_chance_to_ignite_%", level30_stat3_value = "49", level30_stat4_id = "active_skill_base_radius_+", level30_stat4_value = "5"}
end

function suite:test_ic_normal_support_skill_gem()
    m_item.item{test=1, rarity_id = "normal", name = "Brutality Support", class_id = "Support Skill Gem", size_x = "1", size_y = "1", drop_level = "38", tags = "support_gem, gem, default", help_text = "This is a Support Gem. It does not grant a bonus to your character, but to skills in sockets connected to it. Place into an item socket connected to a socket containing the Active Skill Gem you wish to augment. Right click to remove from a socket.", purchase_cost_normal1_name = "Orb of Alchemy", purchase_cost_normal1_amount = "1", strength_percent = "100", gem_tags = "Support", gem_description = "Supports any skill that hits enemies.", skill_id = "SupportBrutality", is_support_gem = "True", support_gem_letter = "U", required_level = "38", static_mana_multiplier = "130", static_damage_effectiveness = "100", static_damage_multiplier = "100", static_stat1_id = "deal_no_elemental_damage", static_stat1_value = "1", static_stat2_id = "base_deal_no_chaos_damage", static_stat2_value = "1", stat_text = "Supported Skills deal (40-59)% more Physical Damage<br>Supported Skills deal no Elemental Damage<br>Supported Skills deal no Chaos Damage", quality_stat_text = "Supported Skills deal 0.5% increased Physical Damage", static_quality_stat1_id = "physical_damage_+%", static_quality_stat1_value = "0.5", level1 = "True", level1_level_requirement = "38", level1_strength_requirement = "63", level1_stat_text = "Supported Skills deal 40% more Physical Damage", level1_stat1_id = "support_brutality_physical_damage_+%_final", level1_stat1_value = "40", level1_experience = "0", level2 = "True", level2_level_requirement = "40", level2_strength_requirement = "66", level2_stat_text = "Supported Skills deal 41% more Physical Damage", level2_stat1_id = "support_brutality_physical_damage_+%_final", level2_stat1_value = "41", level2_experience = "388734", level3 = "True", level3_level_requirement = "42", level3_strength_requirement = "69", level3_stat_text = "Supported Skills deal 42% more Physical Damage", level3_stat1_id = "support_brutality_physical_damage_+%_final", level3_stat1_value = "42", level3_experience = "866171", level4 = "True", level4_level_requirement = "44", level4_strength_requirement = "72", level4_stat_text = "Supported Skills deal 43% more Physical Damage", level4_stat1_id = "support_brutality_physical_damage_+%_final", level4_stat1_value = "43", level4_experience = "1449957", level5 = "True", level5_level_requirement = "46", level5_strength_requirement = "75", level5_stat_text = "Supported Skills deal 44% more Physical Damage", level5_stat1_id = "support_brutality_physical_damage_+%_final", level5_stat1_value = "44", level5_experience = "2160316", level6 = "True", level6_level_requirement = "48", level6_strength_requirement = "78", level6_stat_text = "Supported Skills deal 45% more Physical Damage", level6_stat1_id = "support_brutality_physical_damage_+%_final", level6_stat1_value = "45", level6_experience = "3515827", level7 = "True", level7_level_requirement = "50", level7_strength_requirement = "81", level7_stat_text = "Supported Skills deal 46% more Physical Damage", level7_stat1_id = "support_brutality_physical_damage_+%_final", level7_stat1_value = "46", level7_experience = "4654704", level8 = "True", level8_level_requirement = "52", level8_strength_requirement = "84", level8_stat_text = "Supported Skills deal 47% more Physical Damage", level8_stat1_id = "support_brutality_physical_damage_+%_final", level8_stat1_value = "47", level8_experience = "6022937", level9 = "True", level9_level_requirement = "54", level9_strength_requirement = "87", level9_stat_text = "Supported Skills deal 48% more Physical Damage", level9_stat1_id = "support_brutality_physical_damage_+%_final", level9_stat1_value = "48", level9_experience = "7661275", level10 = "True", level10_level_requirement = "56", level10_strength_requirement = "90", level10_stat_text = "Supported Skills deal 49% more Physical Damage", level10_stat1_id = "support_brutality_physical_damage_+%_final", level10_stat1_value = "49", level10_experience = "9617923", level11 = "True", level11_level_requirement = "58", level11_strength_requirement = "93", level11_stat_text = "Supported Skills deal 50% more Physical Damage", level11_stat1_id = "support_brutality_physical_damage_+%_final", level11_stat1_value = "50", level11_experience = "13273107", level12 = "True", level12_level_requirement = "60", level12_strength_requirement = "96", level12_stat_text = "Supported Skills deal 51% more Physical Damage", level12_stat1_id = "support_brutality_physical_damage_+%_final", level12_stat1_value = "51", level12_experience = "16290434", level13 = "True", level13_level_requirement = "62", level13_strength_requirement = "99", level13_stat_text = "Supported Skills deal 52% more Physical Damage", level13_stat1_id = "support_brutality_physical_damage_+%_final", level13_stat1_value = "52", level13_experience = "19866666", level14 = "True", level14_level_requirement = "64", level14_strength_requirement = "102", level14_stat_text = "Supported Skills deal 53% more Physical Damage", level14_stat1_id = "support_brutality_physical_damage_+%_final", level14_stat1_value = "53", level14_experience = "24098333", level15 = "True", level15_level_requirement = "65", level15_strength_requirement = "103", level15_stat_text = "Supported Skills deal 54% more Physical Damage", level15_stat1_id = "support_brutality_physical_damage_+%_final", level15_stat1_value = "54", level15_experience = "26493411", level16 = "True", level16_level_requirement = "66", level16_strength_requirement = "105", level16_stat_text = "Supported Skills deal 55% more Physical Damage", level16_stat1_id = "support_brutality_physical_damage_+%_final", level16_stat1_value = "55", level16_experience = "34914474", level17 = "True", level17_level_requirement = "67", level17_strength_requirement = "106", level17_stat_text = "Supported Skills deal 56% more Physical Damage", level17_stat1_id = "support_brutality_physical_damage_+%_final", level17_stat1_value = "56", level17_experience = "51074457", level18 = "True", level18_level_requirement = "68", level18_strength_requirement = "108", level18_stat_text = "Supported Skills deal 57% more Physical Damage", level18_stat1_id = "support_brutality_physical_damage_+%_final", level18_stat1_value = "57", level18_experience = "92244824", level19 = "True", level19_level_requirement = "69", level19_strength_requirement = "109", level19_stat_text = "Supported Skills deal 58% more Physical Damage", level19_stat1_id = "support_brutality_physical_damage_+%_final", level19_stat1_value = "58", level19_experience = "179039272", level20 = "True", level20_level_requirement = "70", level20_strength_requirement = "111", level20_stat_text = "Supported Skills deal 59% more Physical Damage", level20_stat1_id = "support_brutality_physical_damage_+%_final", level20_stat1_value = "59", level20_experience = "336444335", level21 = "True", level21_level_requirement = "72", level21_strength_requirement = "114", level21_stat_text = "Supported Skills deal 60% more Physical Damage", level21_stat1_id = "support_brutality_physical_damage_+%_final", level21_stat1_value = "60", level22 = "True", level22_level_requirement = "74", level22_stat_text = "Supported Skills deal 61% more Physical Damage", level22_stat1_id = "support_brutality_physical_damage_+%_final", level22_stat1_value = "61", level23 = "True", level23_level_requirement = "76", level23_stat_text = "Supported Skills deal 62% more Physical Damage", level23_stat1_id = "support_brutality_physical_damage_+%_final", level23_stat1_value = "62", level24 = "True", level24_level_requirement = "78", level24_stat_text = "Supported Skills deal 63% more Physical Damage", level24_stat1_id = "support_brutality_physical_damage_+%_final", level24_stat1_value = "63", level25 = "True", level25_level_requirement = "80", level25_stat_text = "Supported Skills deal 64% more Physical Damage", level25_stat1_id = "support_brutality_physical_damage_+%_final", level25_stat1_value = "64", level26 = "True", level26_level_requirement = "82", level26_stat_text = "Supported Skills deal 65% more Physical Damage", level26_stat1_id = "support_brutality_physical_damage_+%_final", level26_stat1_value = "65", level27 = "True", level27_level_requirement = "84", level27_stat_text = "Supported Skills deal 66% more Physical Damage", level27_stat1_id = "support_brutality_physical_damage_+%_final", level27_stat1_value = "66", level28 = "True", level28_level_requirement = "86", level28_stat_text = "Supported Skills deal 67% more Physical Damage", level28_stat1_id = "support_brutality_physical_damage_+%_final", level28_stat1_value = "67", level29 = "True", level29_level_requirement = "88", level29_stat_text = "Supported Skills deal 68% more Physical Damage", level29_stat1_id = "support_brutality_physical_damage_+%_final", level29_stat1_value = "68", level30 = "True", level30_level_requirement = "90", level30_stat_text = "Supported Skills deal 69% more Physical Damage", level30_stat1_id = "support_brutality_physical_damage_+%_final", level30_stat1_value = "69"}
end

function suite:test_ic_normal_claw()
    m_item.item{test=1, rarity_id = "normal", name = "Gemini Claw", class_id = "Claw", size_x = "2", size_y = "2", drop_level = "72", drop_rarities = "Normal, Magic, Rare, Unique", tags = "not_for_sale, maraketh, claw, one_hand_weapon, onehand, weapon, default", implicit1 = "LifeAndManaOnHitSeparatedImplicitMarakethClaw3", required_level = "72", required_dexterity = "121", required_intelligence = "121", critical_strike_chance = "6.3", attack_speed = "1.5", physical_damage_min = "23", physical_damage_max = "68", range = "9"}
end

function suite:test_ic_normal_quest_item()
    m_item.item{test=1, rarity_id = "normal", name = "Eyes of Zeal", class_id = "QuestItem", size_x = "1", size_y = "1", flavour_text = "Eyes blazing with holy flame, the Pilgrim saw<br>a great palace descend from the burgeoning sky,<br>its gates barred against the unfaithful.", drop_level = "1", tags = "default"}
end

function suite:test_ic_normal_stackable_currency()
    m_item.item{test=1, rarity_id = "normal", name = "Exalted Orb", class_id = "StackableCurrency", size_x = "1", size_y = "1", drop_level = "35", tags = "currency, default", purchase_cost_normal1_name = "Regal Orb", purchase_cost_normal1_amount = "5", stack_size = "10", description = "Enchants a rare item with a new random property", help_text = "Right click this item then left click a rare item to apply it. Rare items can have up to six random properties.<br>Shift click to unstack.", stack_size_currency_tab = "5000"}
end

function suite:test_ic_normal_jewel()
    m_item.item{test=1, rarity_id = "normal", name = "Cobalt Jewel", class_id = "Jewel", size_x = "1", size_y = "1", drop_level = "20", drop_rarities = "Magic, Rare, Unique", tags = "jewel, not_dex, not_str, not_for_sale, intjewel, default", help_text = "Place into an allocated Jewel Socket on the Passive Skill Tree. Right click to remove from the Socket.", purchase_cost_unique1_name = "Chaos Orb", purchase_cost_unique1_amount = "8"}
end

function suite:test_ic_normal_mtx()
    m_item.item{test=1, rarity_id = "normal", name = "Abyss Portal Effect", class_id = "Microtransaction", size_x = "2", size_y = "2", tags = "not_for_sale, default", metadata_id="Metadata/Items/MicrotransactionItemEffects/MicrotransactionAbyssPortalEffect", description = "This character's portals use the Abyss Portal Effect.", cosmetic_type = "Portal", cosmetic_theme = "Abyss", release_version="3.1.0"}
end

function suite:test_ic_normal_map()
    m_item.item{test=1, rarity_id = "normal", name = "Atoll Map", class_id = "Map", size_x = "1", size_y = "1", drop_level = "73", drop_rarities = "Normal, Magic, Rare, Unique", tags = "mountain, mid_tier_map, high_level_map, map, default", help_text = "Travel to this Map by using it in the Templar Laboratory or a personal Map Device. Maps can only be used once.", purchase_cost_normal1_name = "Orb of Chance", purchase_cost_normal1_amount = "4", purchase_cost_magic1_name = "Orb of Chance", purchase_cost_magic1_amount = "5", purchase_cost_rare1_name = "Orb of Chance", purchase_cost_rare1_amount = "6", purchase_cost_unique1_name = "Chaos Orb", purchase_cost_unique1_amount = "10", map_tier = "6", map_guild_character = "Í", map_area_id = "MapWorldsAtoll", unique_map_guild_character = "Ç", unique_map_area_id = "MapWorldsAtollUnique", unique_map_area_level = "73", map_area_level = "73", inventory_icon = "Atoll Map (War for the Atlas)", map_series = "Atlas of Worlds"}
end

function suite:test_ic_normal_divi_card()
    m_item.item{test=1, rarity_id = "normal", name = "The Twins", class_id = "DivinationCard", size_x = "1", size_y = "1", flavour_text = "Two sides of a coin;<br>Heads for a friend,<br>tails a foe;<br>Gemini toss up", drop_level = "1", tags = "weapon_divination, divination_card, default", stack_size = "8", description = "{{c|magic|Gemini Claw of Celebration}}<br>{{c|default|Item Level:}} {{c|normal|83}}", stack_size_currency_tab = "5000", help_text = "Shift click to unstack.", debug_id = "1"}
end

-- 
-- Currency-like items
--
function suite:test_ic_normal_harvest_seed()
    m_item.item{test=1, rarity_id = "normal", name = "Primal Blisterfruit", class_id = "HarvestSeed", size_x = "1", size_y = "1", drop_level = "13", tags = "default", metadata_id = "Metadata/Items/Harvest/HarvestSeedBirdBoss", stack_size = "100", help_text = "Shift click to unstack.", seed_type_id = "primal", seed_effect = "Reveals a random crafting effect for Influenced items when Harvested", seed_tier = "4", seed_growth_cycles = "15", seed_required_nearby_seed_tier = "3", seed_required_nearby_seed_amount = "4", seed_consumed_wild_lifeforce_percentage = "50", seed_consumed_vivid_lifeforce_percentage = "25", seed_consumed_primal_lifeforce_percentage = "25", seed_granted_craft_option_ids = "ModInfluence_2,ModInfluence_3,ModInfluence_4,ModInfluence_5,ModInfluence_6,ModInfluence_7,ModInfluence_8", debug_id = "1"}
end

-- ----------------------------------------------------------------------------
-- Testing unique items for various item classes
-- ----------------------------------------------------------------------------
-- Note: Some of these may fail if there is a problem with the base item (i.e. if it does not exist). This will need to be fixed on the wiki first

--
-- armour
--
function suite:test_ic_unique_boots()
    m_item.item{test = "1", rarity_id = "unique", name = "Abberath's Hooves", class_id = "Boots", base_item = "Goathide Boots", explicit1 = "RepeatingShockwave", explicit2 = "StrengthUnique__7_", explicit3 = "MovementVelocityUnique__8", explicit4 = "ChanceToIgniteUnique__4", explicit5 = "IgniteNearbyEnemyOnIgnitedKillUnique__1", explicit6 = "FireDamagePerStrengthUnique__1", explicit7 = "GoatHoofFootprintsUnique__1", flavour_text = "The goat king knew not of war,<br>of the lands and laws he trampled.<br>The goat king knew only joy<br>at turning life into ash.", flavour_text_id = "UniqueBootsDex10"}
end

function suite:test_ic_unique_helmet()
    m_item.item{test = "1", rarity_id = "unique", name = "Abyssus", class_id = "Helmet", base_item = "Ezomyte Burgonet", explicit1 = "AddedPhysicalDamageUniqueHelmetStr3", explicit2 = "AllAttributesUniqueHelmetStr3", explicit3 = "MeleeWeaponCriticalStrikeMultiplierUniqueHelmetStr3", explicit4 = "LocalIncreasedPhysicalDamageReductionRatingUniqueHelmetStr3", explicit5 = "IncreasedPhysicalDamageTakenUniqueHelmetStr3", flavour_text = "When you have slain all of your enemies,<br>what is left to fear?", flavour_text_id = "UniqueHelmetStr3"}
end

function suite:test_ic_unique_shield()
    m_item.item{test = "1", rarity_id = "unique", name = "Aegis Aurora", class_id = "Shield", base_item = "Champion Kite Shield", flavour_text = "Born from the marriage of ice and sky,<br>the aurora evokes both awe and power.", flavour_text_id = "UniqueShieldStrInt4", explicit1 = "LocalIncreasedArmourAndEnergyShieldUniqueShieldStrInt4", explicit2 = "AllResistancesUniqueShieldStrInt4", explicit3 = "IncreasedMaximumColdResistUniqueShieldStrInt4", explicit4 = "AdditionalBlockChanceUniqueShieldStrInt4", explicit5 = "EnergyShieldGainedOnBlockUniqueShieldStrInt4", explicit6 = "WeaponElementalDamageUniqueShieldStrInt4"}
end

function suite:test_ic_unique_gloves()
    m_item.item{test = "1", rarity_id = "unique", name = "Allelopathy", class_id = "Gloves", base_item = "Sorcerer Gloves", explicit1 = "BlightSkillUnique__1", explicit2 = "DegenerationDamageUnique__2", explicit3 = "LocalIncreasedEnergyShieldPercentUnique__11", explicit4 = "AreaOfEffectUnique__3", explicit5 = "BlightSecondarySkillEffectDurationUnique__1", explicit6 = "YouCannotBeHinderedUnique__1", flavour_text = '"Nothing is more natural than competition.<br/>One feasts, another starves.<br/>One blossoms, another withers.<br/>And one cannot catch the golden sunlight<br/>without casting a bitter shadow."<br/>- Cadiro Perandus', flavour_text_id = "UniqueGlovesInt8"}
end

function suite:test_ic_unique_body_armour()
    m_item.item{test = "1", rarity_id = "unique", name = "Ambu's Charge", class_id = "Body Armour", base_item = "Crusader Chainmail", explicit1 = "LocalIncreasedArmourAndEnergyShieldUniqueBodyStrInt2", explicit2 = "IncreasedLifeUnique__38", explicit3 = "AllResistancesUniqueBodyStrInt2", explicit4 = "GainEnduranceChargeWhenCriticallyHit", explicit5 = "ShareEnduranceChargesWithParty", explicit6 = "LifeRegenerationIfHitRecentlyUnique__1", flavour_text = "Nothing stops the pain like a courageous rush into battle.", flavour_text_id = "UniqueBodyStrInt2"}
end

--
-- asccessory
--

function suite:test_ic_unique_ring()
    m_item.item{test = "1", rarity_id = "unique", name = "Ahkeli's Meadow", class_id = "Ring", base_item = "Ruby Ring", explicit1 = "StrengthUnique__15", explicit2 = "IncreasedEnergyShieldPercentUnique__4", explicit3 = "MaximumLifeUnique__14", flavour_text = "Where once had stood a village, lay naught but splinters.<br>Some had once been her home.<br>Some had once been her creations.<br>Some had once been her family.", flavour_text_id = "UniqueRing53b", help_text = "This item can be combined with a Mountain and Valley ring at a Vendor.", drop_leagues = "Delve", drop_text = "This item drops from [[Aul, the Crystal King]] and cannot be {{il|Orb of Chance|chanced}}."}
end


function suite:test_ic_unique_amulet()
    m_item.item{test = "1", rarity_id = "unique", name = "Araku Tiki", class_id = "Amulet", base_item_page = "Coral Amulet", explicit1 = "EvasionOnLowLifeUniqueAmulet4", explicit2 = "IncreasedLifeUniqueAmulet4", explicit3 = "FireResistUniqueAmulet4", explicit4 = "LifeRegenerationOnLowLifeUniqueAmulet4", flavour_text = "It is said to make you invisible when the Great<br />Spirit comes to take you on your final journey.", flavour_text_id = "UniqueAmulet4"}
end

function suite:test_ic_unique_belt()
    m_item.item{test = "1", rarity_id = "unique", name = "Ascent From Flesh", class_id = "Belt", base_item = "Chain Belt", explicit1 = "IncreasedEvasionRatingUnique__2", explicit2 = "IncreasedEnergyShieldUnique__4", explicit3 = "AllResistancesUnique__5", explicit4 = "PhasingOnBeginESRechargeUnique___1", explicit5 = "ChanceToDodgeAttacksWhilePhasingUnique___1", explicit6 = "MovementSpeedWhilePhasedUnique__2", flavour_text = "A single step forward<br>Snap free from the prison<br>Reborn into freedom eternal", flavour_text_id = "UniqueBelt20", alternate_art_inventory_icons = "Relic", drop_text = "This item can only be obtained by completing the [[Thaumaturgical History]] prophecy chain."}
end

function suite:test_ic_unique_quiver()
    m_item.item{test = "1", rarity_id = "unique", name = "Asphyxia's Wrath", class_id = "Quiver", base_item = "Two-Point Arrow Quiver", explicit1 = "GrantsFrostbiteUnique__1", explicit2 = "IncreasedAttackSpeedUniqueQuiver5", explicit3 = "ColdResistUniqueQuiver5", explicit4 = "IncreasedChillDurationUniqueQuiver5", explicit5 = "ConvertPhysicalToColdUniqueQuiver5", explicit6 = "ChanceToFreezeUniqueQuiver5", explicit7 = "CurseTransferOnKillUniqueQuiver5", flavour_text = "Mist of breath<br>Icing to lips and throat<br>As the warm ones choke and fall<br>Upon the frozen wasteland.", flavour_text_id = "UniqueQuiver5", alternate_art_inventory_icons = "winterheart"}
end


--
-- weapons
--
function suite:test_ic_unique_wand()
    m_item.item{test = "1", rarity_id = "unique", name = "Abberath's Horn", class_id = "Wand", base_item = "Goat's Horn", explicit1 = "FireDamagePercentUniqueWand10", explicit2 = "SpellAddedFireDamageUniqueWand10", explicit3 = "CriticalStrikeChanceUniqueWand10", explicit4 = "LifeGainedOnKillingIgnitedEnemiesUniqueWand10_", explicit5 = "BurnDurationUniqueWand10", flavour_text = "The Goat King drank the smoke and ate the flames<br>as his ruin spread across the land.", flavour_text_id = "UniqueWand10"}
end

function suite:test_ic_unique_claw()
    m_item.item{test = "1", rarity_id = "unique", name = "Advancing Fortress", class_id = "Claw", base_item = "Gut Ripper", flavour_text = '"A man cowers behind his walls.<br>A woman carries her fortress with her.<br>In heart, in mind, in hand."<br>- Sekhema Deshret', flavour_text_id = "UniqueOneHandClaw12", explicit1 = "SocketedGemsSupportedByFortifyUnique____1", explicit2 = "LocalIncreasedPhysicalDamagePercentUnique__10", explicit3 = "IncreasedEvasionRatingUnique___1", explicit4 = "IncreasedLifeUnique__8", explicit5 = "IncreasedEnergyShieldUnique__2", explicit6 = "AttackerTakesDamageUnique__1", explicit7 = "AdditionalBlockUnique__2"}
end

function suite:test_ic_unique_staff()
    m_item.item{test = "1", rarity_id = "unique", name = "Agnerod East", inventory_icon = "Agnerod", class_id = "Staff", base_item = "Imperial Staff", flavour_text = "One for each corner of the great Vinktar Square.", flavour_text_id = "UniqueStaff8", explicit1 = "LocalIncreaseSocketedLightningGemLevelUniqueStaff8", explicit2 = "IntelligenceUniqueStaff8", explicit3 = "LightningDamagePercentUniqueStaff8", explicit4 = "ShockDurationUniqueStaff8", explicit5 = "IncreasedStrengthRequirementUniqueStaff8", explicit6 = "LightningPenetrationUniqueStaff8"}
end

function suite:test_ic_unique_two_hand_sword()
    m_item.item{test = "1", rarity_id = "unique", name = "Doomsower", class_id = "Two Hand Sword", base_item = "Lion Sword", explicit1 = "SocketedMeleeGemsHaveIncreasedAoEUniqueTwoHandSword8", explicit2 = "SocketedRedGemsHaveAddedFireDamageUniqueTwoHandSword8_", explicit3 = "LocalIncreasedPhysicalDamagePercentUniqueTwoHandSword8", explicit4 = "LocalAddedPhysicalDamageUniqueTwoHandSword8", explicit5 = "LocalIncreasedAttackSpeedUniqueTwoHandSword8", flavour_text = "So the seed of hate was born,<br>Evil forged and Hope forsworn.", flavour_text_id = "UniqueTwoHandSword8"}
end

function suite:test_ic_unique_one_hand_axe()
    m_item.item{test = "1", rarity_id = "unique", name = "Dreadarc", class_id = "One Hand Axe", base_item = "Cleaver", flavour_text = "The fastest way to a man's heart<br>is through his sternum.", flavour_text_id = "UniqueOneHandAxe7", explicit1 = "LocalAddedPhysicalDamageUniqueOneHandAxe7", explicit2 = "LocalAddedFireDamageUniqueOneHandAxe7", explicit3 = "MovementVelocityUniqueOneHandAxe7", explicit4 = "LocalIncreasedAttackSpeedUniqueOneHandAxe7", explicit5 = "FireResistUniqueOneHandAxe7_", explicit6 = "FlammabilityOnHitUnique__1"}
end

function suite:test_ic_unique_fishing_rod()
    m_item.item{test = "1", rarity_id = "unique", name = "Reefbane", class_id = "FishingRod", base_item = "Fishing Rod", explicit1 = "IncreasedCastSpeedUnique__3", explicit2 = "FishingLureTypeUnique__1__", explicit3 = "FishingQuantityUnique__1", explicit4 = "FishDetectionUnique__1_", flavour_text = "He cast far into the ocean<br>And tore out her heart.", flavour_text_id = "UniqueFishingRod2", alternate_art_inventory_icons = "Relic"}
end

function suite:test_ic_unique_one_hand_sword()
    m_item.item{test = "1", rarity_id = "unique", name = "Ahn's Might", class_id = "One Hand Sword", base_item = "Midnight Blade", explicit1 = "LocalAddedPhysicalDamageUnique__27", explicit2 = "LocalCriticalStrikeChanceUnique__12", explicit3 = "ReducedMaximumFrenzyChargesUnique__1", explicit4 = "AreaOfEffectUnique__5", explicit5 = "StrengthRequirementsUnique__1", explicit6 = "GlobalCriticalMultiplierWithNoFrenzyChargesUnique__1", explicit7 = "AccuracyRatingWithMaxFrenzyChargesUnique__1", flavour_text = '"Impossibly heavy, yet the ancient edge is keen as any modern blade.<br/>A reminder that, in the end, when we lie in the bellies of worms,<br/>it is what we make that makes us."<br/>- Icius Perandus, Antiquities Collection, Item 47', flavour_text_id = "UniqueOneHandSword24"}
end

function suite:test_ic_unique_dagger()
    m_item.item{test = "1", rarity_id = "unique", name = "Arakaali's Fang", class_id = "Rune Dagger", base_item = "Fiend Dagger", explicit1 = "SummonSpidersOnKillUnique__1", explicit2 = "LocalIncreasedPhysicalDamagePercentUnique__25", explicit3 = "LocalAddedPhysicalDamageUnique__25", explicit4 = "LocalAddedChaosDamageUnique___1", explicit5 = "LocalChanceToPoisonOnHitUnique__1", flavour_text = "All children must eat.", flavour_text_id = "UniqueDagger15"}
end

function suite:test_ic_unique_bow()
    m_item.item{test = "1", rarity_id = "unique", name = "Arborix", class_id = "Bow", base_item = "Assassin Bow", explicit1 = "LocalAddedPhysicalDamageUnique__29___", explicit2 = "IncreasedEvasionRatingPercentUnique__1_", explicit3 = "AdditionalArrowsUnique__2", explicit4 = "DisplayIronReflexesFor8SecondsUnique__1", explicit5 = "ArborixMoreDamageAtCloseRangeUnique__1", explicit6 = "AttackCastMovementSpeedWhileYouDoNotHaveIronReflexesUnique__1", explicit7 = "FarShotWhileYouDoNotHaveIronReflexesUnique__1_", flavour_text = "Through droughts, fires, floods and frost,<br />the ancient giants stand resolute,<br />while deep in the rich, dark earth,<br />their grasp stretches ever farther.", flavour_text_id = "UniqueBow20"}
end

function suite:test_ic_unique_one_hand_mace()
    m_item.item{test = "1", rarity_id = "unique", name = "Ashes of the Sun", class_id = "One Hand Mace", base_item = "Driftwood Club", flavour_text = "Into darkness, horror, madness...<br>So goes the descent.", flavour_text_id = "UniqueDescentOneHandMace1", explicit1 = "LocalAddedFireDamageUniqueDescentOneHandMace1", explicit2 = "LocalIncreasedAttackSpeedUniqueDescentOneHandMace1", explicit3 = "BurnDurationUniqueDescentOneHandMace1", explicit4 = "BurnDamageUniqueDescentOneHandMace1", explicit5 = "ChanceToIgniteUniqueDescentOneHandMace1", inventory_icon = "Driftwood Club", drop_enabled = "False"}
end

function suite:test_ic_unique_two_hand_axe()
    m_item.item{test = "1", rarity_id = "unique", name = "Atziri's Disfavour", class_id = "Two Hand Axe", base_item = "Vaal Axe", flavour_text = '"I do not believe in disguising my disappointment."<br>- Atziri, Queen of the Vaal', flavour_text_id = "UniqueTwoHandAxe7", explicit1 = "LocalIncreaseSocketedSupportGemLevelUniqueTwoHandAxe7", explicit2 = "LocalAddedPhysicalDamageUniqueTwoHandAxe7", explicit3 = "LocalIncreasedAttackSpeedUniqueTwoHandAxe7", explicit4 = "CausesBleedingUniqueTwoHandAxe7", explicit5 = "LocalIncreasedMeleeWeaponRangeUniqueTwoHandAxe7_", drop_text = "This item can only drop from uber [[Atziri]] in [[the Alluring Abyss]] and cannot be [[Orb of Chance|chanced]]."}
end

function suite:test_ic_unique_sceptre()
    m_item.item{test = "1", rarity_id = "unique", name = "Augyre", class_id = "Sceptre", base_item = "Void Sceptre", explicit1 = "LocalIncreasedPhysicalDamagePercentUnique__31", explicit2 = "LocalIncreasedAttackSpeedUnique__23", explicit3 = "LocalCriticalStrikeChanceUnique__14", explicit4 = "ConvertPhysicaltoLightningUnique__3", explicit5 = "GainElementalOverloadEvery16SecondsUnique__1", explicit6 = "GainResoluteTechniqueWithoutElementalOverloadUnique__1", explicit7 = "PhysicalDamageWhileResoluteTechniqueUnique__1__", flavour_text = "When the world spins out of control,<br />the safest place to be is in the centre.", flavour_text_id = "UniqueSceptre18", drop_level = "78", drop_text = "Can only drop from [[Elder Guardians]]. It cannot be {{il|Orb of Chance|chanced}}."}
end

function suite:test_ic_unique_thrusting_one_hand_sword()
    m_item.item{test = "1", rarity_id = "unique", name = "Aurumvorax", class_id = "Thrusting One Hand Sword", base_item = "Basket Rapier", explicit1 = "LocalIncreasedPhysicalDamagePercentUniqueRapier2", explicit2 = "ItemFoundRarityIncreaseUniqueRapier2", explicit3 = "AllResistancesUniqueRapier2", explicit4 = "LifeGainPerTargetUniqueRapier2", flavour_text = "Many a collector of rarities discovered to his dismay<br>that the intelligent spirit in this sword<br>does not like to share its master's attention", flavour_text_id = "UniqueRapier2", alternate_art_inventory_icons = "race season 6"}
end

function suite:test_ic_unique_two_hand_mace()
    m_item.item{test = "1", rarity_id = "unique", name = "Brain Rattler", class_id = "Two Hand Mace", base_item = "Meatgrinder", flavour_text = "The mind may have no limits, but the skull sure does.", flavour_text_id = "UniqueTwoHandMace11", explicit1 = "LocalAddedPhysicalDamageUnique__24", explicit2 = "ConvertPhysicaltoLightningUnique__1", explicit3 = "ChanceToShockUnique__2_", explicit4 = "HitsCauseMonsterFleeUnique__1", explicit5 = "ShockedEnemyCastSpeedUnique__1", explicit6 = "ShockedEnemyMovementSpeedUnique__1", explicit7 = "LightningPenetrationUnique__1"}
end

--
-- flasks
--

function suite:test_ic_unique_utility_flask()
    m_item.item{test = "1", rarity_id = "unique", name = "Atziri's Promise", class_id = "UtilityFlask", base_item = "Amethyst Flask", flavour_text = '"Death needs not your understanding. It needs only your loyalty." <br>- Atziri, Queen of the Vaal', flavour_text_id = "UniqueFlask5", explicit1 = "ChaosDamageLifeLeechPermyriadWhileUsingFlaskUniqueFlask5New", explicit2 = "AddedChaosDamageAsPercentOfPhysicalWhileUsingFlaskUniqueFlask5", explicit3 = "AddedChaosDamageAsPercentOfElementalWhileUsingFlaskUniqueFlask5", drop_text = "[[Atziri, Queen of the Vaal]]"}
end

function suite:test_ic_unique_life_flask()
    m_item.item{test = "1", rarity_id = "unique", name = "Blood of the Karui", class_id = "LifeFlask", base_item = "Sanctified Life Flask", explicit1 = "FlaskExtraLifeUnique__1", explicit2 = "FlaskIncreasedRecoverySpeedUniqueFlask3", explicit3 = "LocalFlaskLifeOnFlaskDurationEndUniqueFlask3", flavour_text = '"Kaom fought and killed for his people.<br>Kaom bled for his people.<br>And so the people gave, the people bled,<br>So their King might go on."<br>- Lavianga, Advisor to Kaom', flavour_text_id = "UniqueFlask3", drop_leagues = "Domination, Nemesis"}
end

function suite:test_ic_unique_hybrid_flask()
    m_item.item{test = "1", rarity_id = "unique", name = "Divination Distillate", class_id = "HybridFlask", base_item = "Large Hybrid Flask", explicit1 = "FlaskItemRarityUniqueFlask1", explicit2 = "FlaskItemQuantityUniqueFlask1", explicit3 = "FlaskLightRadiusUniqueFlask1", explicit4 = "FlaskElementalResistancesUniqueFlask1_", flavour_text = "Knowledge is fermented in pain and loss<br>Distilled with reflection<br>To quench the thirst of those<br>who dream of enlightenment", flavour_text_id = "UniqueFlask1", alternate_art_inventory_icons = "race season 5"}
end

function suite:test_ic_unique_mana_flask()
    m_item.item{test = "1", rarity_id = "unique", name = "Doedre's Elixir", class_id = "ManaFlask", base_item = "Greater Mana Flask", explicit1 = "FlaskRemovePercentageOfEnergyShieldUniqueFlask2", explicit2 = "FlaskTakeChaosDamagePercentageOfLifeUniqueFlask2", explicit3 = "FlaskGainPowerChargeUniqueFlask2", explicit4 = "FlaskGainFrenzyChargeUniqueFlask2", explicit5 = "FlaskGainEnduranceChargeUniqueFlask2", explicit6 = "LocalFlaskChargesUsedUniqueFlask2", flavour_text = "Doedre Darktongue knew the Way of the Thaumaturge.<br>In order to receive, one must give... without hesitation.", flavour_text_id = "UniqueFlask2"}
end

--
-- other 
--

function suite:test_ic_unique_jewel()
    m_item.item{test = "1", rarity_id = "unique", name = "Anatomical Knowledge", class_id = "Jewel", base_item = "Cobalt Jewel", flavour_text = "Once you understand how your body truly works<br>you can't help but treat it better.", flavour_text_id = "UniqueJewel52", help_text = "Place into an allocated jewel socket on the Passive Skill Tree. Right click to remove from the Socket.", explicit1 = "MaximumLifeUniqueJewel52", explicit2 = "LifePerIntelligenceInRadusUniqueJewel52"}
end


function suite:test_ic_unique_piece()
    m_item.item{test = "1", rarity_id = "unique", name = "First Piece of Brutality", inventory_icon = "Imperial Staff Piece (1 of 3)", class_id = "UniqueFragment", base_item_page = "Imperial Staff Piece (1 of 3)", drop_leagues = "Harbinger", drop_areas = "MapAtlasHarbingerHigh, MapAtlasHarbingerMid, MapWorldsHarbingerMid, MapWorldsHarbingerHigh", drop_text = "This piece can only be obtained by defeating the Harbinger map boss in the unique map [[The Beachhead (Mid Tier)]] or [[The Beachhead (High Tier)]]."}
end

function suite:test_ic_unique_map()
    m_item.item{test = "1", rarity_id = "unique", name = "Acton's Nightmare", class_id = "Map", base_item_id = "Metadata/Items/Maps/MapAtlasOvergrownShrine", flavour_text = "Curious, she shook it then,<br>And tiny screams emerged.<br>Curiouser, she shook again,<br>And an eerie silence purred.", flavour_text_id = "MapWorldsOvergrownShrineUnique", explicit1 = "MapUniqueBurningGround", explicit2 = "MapMonsterPacksSkeletonsUnique", explicit3 = "MapItemDropRarityUniqueMap4", explicit4 = "DisplayMapRestlessDead", explicit5 = "RestlessDeadUniqueMap4", explicit6 = "DisplayMapLargerMaze", explicit7 = "DisplayMapLargeChest", drop_enabled = "False"}
end

-- ----------------------------------------------------------------------------
-- Functionality specific tests for modifiers
-- ----------------------------------------------------------------------------
-- Magic, rare and unique items derieve their sell prices from modifiers on them. 
-- We test against modifiers that have been in the game for a long  time and are randomly generated, as the price for unique items may change.

-- This test will only work for the english language.
function suite:test_f_mods_sell_prices()
    local tpl_args = m_item.item{test=1, rarity_id="rare", class_id="Claw", base_item="Imperial Claw", name="Test item", explicit1="Strength1", explicit2="Strength2"}
    self:assertFalse(
        tpl_args.sell_prices['Scroll Fragment'],
        "Item with modifiers should not have a sell value of wisdom scrolls"
    )
end

function suite:test_f_mods_sell_price_override()
    local tpl_args = m_item.item{test=1, rarity_id="rare", class_id="Claw", base_item="Imperial Claw", name="Test item", explicit1="Strength1", explicit2="Strength2", sell_price1_name="Alteration Shard", sell_price1_amount=500}
    local msg = "On overrides mod prices should not be added"
    self:assertEquals(
        500,
        tpl_args.sell_prices['Alteration Shard'],
        msg
    )
    self:assertFalse(
        tpl_args.sell_prices['Scroll Fragment'],
        msg
    )
end

-- At the time of writing, Strength1 gives 8-12 and Strength2 gives 13-17
-- Since this test may fail when mods change, we'll test against a range (21 +- 3), (29 +- 3)
function suite:test_f_mods_stats_addition()
    local tpl_args = m_item.item{test=1, rarity_id="rare", class_id="Claw", base_item="Imperial Claw", name="Test item", explicit1="Strength1", explicit2="Strength2"}
    local msg = "Stats from different modifiers should be added together"
    self:assertTrue(
        tpl_args._stats['additional_strength'].min > 18,
        msg
    )
    self:assertTrue(
        tpl_args._stats['additional_strength'].min < 24,
        msg
    )
    self:assertTrue(
        tpl_args._stats['additional_strength'].max > 26,
        msg
    )
    self:assertTrue(
        tpl_args._stats['additional_strength'].max < 32,
        msg
    )
end

-- Test stats added via mods
function suite:test_f_mods_local_stat_addition_from_mods()
    local tpl_args = m_item.item{test=1, rarity_id = "normal", name = "Imperial Claw", class_id = "Claw", size_x = "2", size_y = "2", implicit1 = "LifeGainPerTargetImplicit2Claw13", required_level = "68", required_dexterity = "131", required_intelligence = "95", critical_strike_chance = "6", attack_speed = "1.6", physical_damage_min = "10", physical_damage_max = "20", weapon_range = "9", explicit1="LocalAddedPhysicalDamage5"}
    local msg = "Local values from stats should be added to base item values"
    self:assertTrue(    
        tpl_args['physical_damage_min_range_minimum'] > 10,
        msg
    )
    self:assertTrue(
        tpl_args['physical_damage_max_range_minimum'] > 20,
        msg
    )
end

-- Test stats added via extra_stat<i>
function suite:test_f_mods_local_stat_addition_from_extra_stats()
    local tpl_args = m_item.item{test=1, rarity_id = "normal", name = "Imperial Claw", class_id = "Claw", size_x = "2", size_y = "2", implicit1 = "LifeGainPerTargetImplicit2Claw13", required_level = "68", required_dexterity = "131", required_intelligence = "95", critical_strike_chance = "6", attack_speed = "1.6", physical_damage_min = "10", physical_damage_max = "20", weapon_range = "9", extra_stat1_id="local_minimum_added_physical_damage", extra_stat1_value="10", extra_stat2_id="local_maximum_added_physical_damage", extra_stat2_value="10"}
    local msg = "Local values from stats should be added to base item values"
    self:assertEquals(
        20,
        tpl_args['physical_damage_min_range_minimum'],
        msg
    )
    self:assertEquals(
        30,
        tpl_args['physical_damage_max_range_minimum'],
        msg
    )
end

-- Test stat interaction with quality
function suite:test_f_mods_local_stat_addition_and_quality()
    local tpl_args = m_item.item{test=1, rarity_id = "normal", name = "Imperial Claw", class_id = "Claw", size_x = "2", size_y = "2", implicit1 = "LifeGainPerTargetImplicit2Claw13", required_level = "68", required_dexterity = "131", required_intelligence = "95", critical_strike_chance = "6", attack_speed = "1.6", physical_damage_min = "10", physical_damage_max = "20", weapon_range = "9", extra_stat1_id="local_minimum_added_physical_damage", extra_stat1_value="10", extra_stat2_id="local_maximum_added_physical_damage", extra_stat2_value="10", quality="100"}
    local msg = "Local values from stats should be added to base item values and multiplied with quality values on item"
    self:assertEquals(
        40,
        tpl_args['physical_damage_min_range_minimum'],
        msg
    )
    self:assertEquals(
        60,
        tpl_args['physical_damage_max_range_minimum'],
        msg
    )
end

function suite:test_release_version_unknown_succeeds()
    m_item.item{test=1, rarity_id = "normal", name = "Atoll Map", class_id = "Map", size_x = "1", size_y = "1", drop_level = "73", drop_rarities = "Normal, Magic, Rare, Unique", tags = "mountain, mid_tier_map, high_level_map, map, default", help_text = "Travel to this Map by using it in the Templar Laboratory or a personal Map Device. Maps can only be used once.", purchase_cost_normal1_name = "Orb of Chance", purchase_cost_normal1_amount = "4", purchase_cost_magic1_name = "Orb of Chance", purchase_cost_magic1_amount = "5", purchase_cost_rare1_name = "Orb of Chance", purchase_cost_rare1_amount = "6", purchase_cost_unique1_name = "Chaos Orb", purchase_cost_unique1_amount = "10", map_tier = "6", map_guild_character = "Í", map_area_id = "MapWorldsAtoll", unique_map_guild_character = "Ç", unique_map_area_id = "MapWorldsAtollUnique", unique_map_area_level = "73", map_area_level = "73", inventory_icon = "Atoll Map (War for the Atlas)", map_series = "Atlas of Worlds", release_version="?"}
end
--[[

]]--

return suite