Difference between revisions of "Module:Sprite Damage"
From ALttP Speedrunning Wiki
(Created page with "local p = {} local damage_table = mw.loadData('Module:Sprite Damage/weapons table') local sprite_table = mw.loadData('Module:Sprite Damage/sprites table') function p.main(fr...") |
|||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
− | local damage_table = mw.loadData('Module:Sprite Damage/ | + | local damage_table = mw.loadData('Module:Sprite Damage/weapon table') |
local sprite_table = mw.loadData('Module:Sprite Damage/sprites table') | local sprite_table = mw.loadData('Module:Sprite Damage/sprites table') | ||
Revision as of 14:29, 14 December 2018
Documentation for this module may be created at Damage/doc&action=edit&redlink=1 Module:Sprite Damage/doc
local p = {} local damage_table = mw.loadData('Module:Sprite Damage/weapon table') local sprite_table = mw.loadData('Module:Sprite Damage/sprites table') function p.main(frame) local args = frame:getParent().args args[1] = args[1] or 'A' return p._main(args) end function p.getDamageForId(frame) local args = frame:getParent().args local m = args.id local d = args.weapon local monster = sprite_table[m] local damage = m[d] return damage end return p