Module:An: Difference between revisions

From Heroes 3 wiki
Jump to navigation Jump to search
m (Formatting)
No edit summary
 
Line 1: Line 1:
local p = {} --p stands for package
local p = {} --p stands for package
local artifacts = {
["Armor of the Damned"]={["cost"]=12000,["desc"]="All opponents have these spells effective on them for fifty turns: Slow, Curse, Weakness, and Misfortune.<br>Component effects: +3 to Attack and Defense, +2 to Spell Power and Knowledge."},
["Horn of the Abyss"]={["cost"]=50000,["desc"]="After a stack of living creatures is slain, a stack of Fangarms will rise in their stead and will stay loyal to the hero after the battle concludes."},
}


function p.hover( frame )
function p.hover( frame )
if frame.args[1] == 'Armor of the Damned'  then
if not artifacts[frame.args[1]] then
return 'All opponents have these spells effective on them for fifty turns: Slow, Curse, Weakness, and Misfortune.<br>Component effects: +3 to Attack and Defense, +2 to Spell Power and Knowledge.'
    return ""
elseif frame.args[1] == 'Horn of the Abyss'  then
return 'After a stack of living creatures is slain, a stack of Fangarms will rise in their stead and will stay loyal to the hero after the battle concludes.'
else
return frame.args[1]
end
end
return artifacts[frame.args[1]]["desc"]
end
end


return p
return p

Latest revision as of 04:19, 25 September 2024

usage[edit | hide]

[[File:Horn of the Abyss_am-artif.gif|{{#invoke:an|hover|Horn of the Abyss}}]]

After a stack of living creatures is slain, a stack of Fangarms will rise in their stead and will stay loyal to the hero after the battle concludes.


local p = {} --p stands for package

local artifacts = {
	["Armor of the Damned"]={["cost"]=12000,["desc"]="All opponents have these spells effective on them for fifty turns: Slow, Curse, Weakness, and Misfortune.<br>Component effects: +3 to Attack and Defense, +2 to Spell Power and Knowledge."},
	["Horn of the Abyss"]={["cost"]=50000,["desc"]="After a stack of living creatures is slain, a stack of Fangarms will rise in their stead and will stay loyal to the hero after the battle concludes."},
}

function p.hover( frame )
	if not artifacts[frame.args[1]] then
    	return ""
	end
	return artifacts[frame.args[1]]["desc"]
end

return p