Module:Item/testcases
Jump to navigation
Jump to search
Unit test page
This testcases page uses Module:ScribuntoUnit to show unit test results for Module:Item/sandbox
All tests passed.
Name | Expected | Actual | |
---|---|---|---|
test_attached_weapon_mod | |||
test_body_armor | |||
test_melee_mutator | |||
test_ring | |||
test_special_handgun | |||
test_special_melee_weapon | |||
test_standard_long_gun |
-- Test sandboxed version
local m_item = require('Module:Item/sandbox')
local ScribuntoUnit = require('Module:ScribuntoUnit')
local suite = ScribuntoUnit:new()
-- These are test values that do not necessarily reflect anything in-game
-- -----------------------------------------------------------------------------
-- Item classes
-- -----------------------------------------------------------------------------
-- Ring
function suite:test_ring()
m_item._main{name="Encrypted Ring", class_id="ring", description="Using a Mod regenerates {{v|20%}} of Max Health over {{v|10s}}. Can stack up to {{v|30s}}.", tags="heal", acquisition_tags="labyrinth"}
end
-- Body
function suite:test_body_armor()
m_item._main{name="Labyrinth Mantle", class_id="body_armor", armor="51", weight="21.6", bleed_res="0", fire_res="4", shock_res="6", corrosive_res="0", blight_res="0", armor_set="Labyrinth"}
end
-- Standard gun
function suite:test_standard_long_gun()
m_item._main{name="AS-10 \"Bulldog\"", class_id="long_gun", description="A brutal drum-fed fully-automatic 10 gauge shotgun designed for close-quarters combat.", damage="60", rps="2.5", magazine="12", accuracy="60", ideal="10", falloff="32", ammo="60", crit="5", weakspot="100", stagger="10", is_special=false, is_auto=false}
end
-- Special gun
function suite:test_special_handgun()
m_item._main{name="Anguish", class_id="handgun", description="Fires heated bits of molten slag. Can be charged to fire a single explosive rod at the cost of causing damage to the wielder while charging.", version_added = "396,261", require_dlc = "The Awakened King", damage="92", rps="1.7", magazine="5", accuracy="95", ideal="16", falloff="35", ammo="35", crit="5", weakspot="100", stagger="0", attached_mod="Loathe The Weak", is_special=true, is_auto=true}
end
-- Melee weapon
function suite:test_special_melee_weapon()
m_item._main{name="Spectral Blade", class_id="melee_weapon", description="A super-heated laser sword with an infinitely sharp edge. Perfect for cutting... anything.", damage="53", crit="8", weakspot="105", stagger="-25", attached_mod="Whirlwind", is_special="true"}
end
-- Weapon mod
function suite:test_attached_weapon_mod()
m_item._main{name="Loathe The Weak", class_id="weapon_mod", description="Rapidly fires volatile needles that explode after {{v|1.5s}} dealing {{v|30}} - {{v|90}} explosive damage. Deals additional damage to targets with lower health. Lasts {{v|10s}}.", version_added = "396,261", require_dlc = "The Awakened King", power_req=915, charges=1, is_attached=true, tags="explosive", acquisition_tags="dranception"}
end
-- Melee mutator
function suite:test_melee_mutator()
m_item._main{name="Gladiator", class_id="mutator", description="While brandishing a Melee Weapon, receiving Enemy Damage increases Melee Damage by {{v|25%}} - {{v|50%}} for {{v|5s}}.", version_added="417,127", require_dlc="The Forgotten Kingdom", max_desc="Level 10: Receiving Enemy Damage while brandishing a Melee Weapon grants {{v|1}} stack of {{s|BULWARK}} for {{v|5s}}.", slot="melee"}
end
return suite