<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.hoodedhorse.com/He_is_Coming/index.php?action=history&amp;feed=atom&amp;title=Module%3AKeyword</id>
	<title>Module:Keyword - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.hoodedhorse.com/He_is_Coming/index.php?action=history&amp;feed=atom&amp;title=Module%3AKeyword"/>
	<link rel="alternate" type="text/html" href="https://wiki.hoodedhorse.com/He_is_Coming/index.php?title=Module:Keyword&amp;action=history"/>
	<updated>2026-10-25T02:26:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.5</generator>
	<entry>
		<id>https://wiki.hoodedhorse.com/He_is_Coming/index.php?title=Module:Keyword&amp;diff=8133&amp;oldid=prev</id>
		<title>76561197995296537: Created page with &quot;-- Keyword explanations for He is Coming. -- Used by {{Keyword}}, by item effects (Module:ItemData) and by the Keywords page. -- The explanations are the ones the game shows when you hover a keyword. local p = {}  local STYLES = &#039;Template:Keyword/styles.css&#039;  -- order = order on the Keywords page p.list = { 	{name = &#039;Battle Start&#039;, page = &#039;Battle start&#039;, type = &#039;Trigger&#039;, text = &#039;Triggers at the very beginning of combat, before any actions are taken.&#039;}, 	{name = &#039;Tur...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.hoodedhorse.com/He_is_Coming/index.php?title=Module:Keyword&amp;diff=8133&amp;oldid=prev"/>
		<updated>2026-10-24T18:13:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- Keyword explanations for He is Coming. -- Used by {{Keyword}}, by item effects (Module:ItemData) and by the &lt;a href=&quot;/He_is_Coming/Keywords&quot; title=&quot;Keywords&quot;&gt;Keywords&lt;/a&gt; page. -- The explanations are the ones the game shows when you hover a keyword. local p = {}  local STYLES = &amp;#039;Template:Keyword/styles.css&amp;#039;  -- order = order on the Keywords page p.list = { 	{name = &amp;#039;Battle Start&amp;#039;, page = &amp;#039;Battle start&amp;#039;, type = &amp;#039;Trigger&amp;#039;, text = &amp;#039;Triggers at the very beginning of combat, before any actions are taken.&amp;#039;}, 	{name = &amp;#039;Tur...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Keyword explanations for He is Coming.&lt;br /&gt;
-- Used by {{Keyword}}, by item effects (Module:ItemData) and by the [[Keywords]] page.&lt;br /&gt;
-- The explanations are the ones the game shows when you hover a keyword.&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local STYLES = &amp;#039;Template:Keyword/styles.css&amp;#039;&lt;br /&gt;
&lt;br /&gt;
-- order = order on the Keywords page&lt;br /&gt;
p.list = {&lt;br /&gt;
	{name = &amp;#039;Battle Start&amp;#039;, page = &amp;#039;Battle start&amp;#039;, type = &amp;#039;Trigger&amp;#039;, text = &amp;#039;Triggers at the very beginning of combat, before any actions are taken.&amp;#039;},&lt;br /&gt;
	{name = &amp;#039;Turn Start&amp;#039;, page = &amp;#039;Turn start&amp;#039;, type = &amp;#039;Trigger&amp;#039;, text = &amp;#039;Triggers at the beginning of your turn, before strikes and other on-turn effects resolve.&amp;#039;},&lt;br /&gt;
	{name = &amp;#039;First Turn&amp;#039;, page = &amp;#039;First Turn&amp;#039;, type = &amp;#039;Trigger&amp;#039;, text = &amp;#039;Triggers at the start of your first turn to give a temporary effect.&amp;#039;},&lt;br /&gt;
	{name = &amp;#039;On Hit&amp;#039;, page = &amp;#039;On hit&amp;#039;, type = &amp;#039;Trigger&amp;#039;, text = &amp;#039;Triggers when your strike hits.&amp;#039;},&lt;br /&gt;
	{name = &amp;#039;Exposed&amp;#039;, page = &amp;#039;Exposed&amp;#039;, type = &amp;#039;Trigger&amp;#039;, text = &amp;#039;Triggers when you lose all of your armor for the first time.&amp;#039;},&lt;br /&gt;
	{name = &amp;#039;Wounded&amp;#039;, page = &amp;#039;Wounded&amp;#039;, type = &amp;#039;Trigger&amp;#039;, text = &amp;#039;Triggers the first time your health drops to 50% or lower.&amp;#039;},&lt;br /&gt;
	{name = &amp;#039;Countdown&amp;#039;, page = &amp;#039;Countdown&amp;#039;, type = &amp;#039;Trigger&amp;#039;, text = &amp;#039;Triggers when the countdown reaches 0. Decreases by 1 at turn start.&amp;#039;},&lt;br /&gt;
	{name = &amp;#039;Symphony&amp;#039;, page = &amp;#039;Symphony&amp;#039;, type = &amp;#039;Trigger&amp;#039;, text = &amp;#039;Trigger the effect of another random instrument item.&amp;#039;},&lt;br /&gt;
	{name = &amp;#039;Acid&amp;#039;, page = &amp;#039;Acid&amp;#039;, type = &amp;#039;Status effect&amp;#039;, text = &amp;#039;Lose armor equal to acid at turn start.&amp;#039;},&lt;br /&gt;
	{name = &amp;#039;Freeze&amp;#039;, page = &amp;#039;Freeze&amp;#039;, type = &amp;#039;Status effect&amp;#039;, text = &amp;#039;Freeze halves attack. Remove 1 freeze at turn end.&amp;#039;},&lt;br /&gt;
	{name = &amp;#039;Poison&amp;#039;, page = &amp;#039;Poison&amp;#039;, type = &amp;#039;Status effect&amp;#039;, text = &amp;#039;Take damage equal to poison at turn start and remove 1 poison. Having armor prevents the damage.&amp;#039;},&lt;br /&gt;
	{name = &amp;#039;Purity&amp;#039;, page = &amp;#039;Purity&amp;#039;, type = &amp;#039;Status effect&amp;#039;, text = &amp;#039;When removed, purity restores 3 health and gives 1 attack.&amp;#039;},&lt;br /&gt;
	{name = &amp;#039;Regeneration&amp;#039;, page = &amp;#039;Regeneration&amp;#039;, type = &amp;#039;Status effect&amp;#039;, text = &amp;#039;Restore health equal to regeneration at turn end, then remove 1 regeneration.&amp;#039;},&lt;br /&gt;
	{name = &amp;#039;Riptide&amp;#039;, page = &amp;#039;Riptide&amp;#039;, type = &amp;#039;Status effect&amp;#039;, text = &amp;#039;Take 5 damage at turn end, then remove 1 riptide.&amp;#039;},&lt;br /&gt;
	{name = &amp;#039;Stun&amp;#039;, page = &amp;#039;Stun&amp;#039;, type = &amp;#039;Status effect&amp;#039;, text = &amp;#039;Stun prevents striking. Remove 1 stun for each strike.&amp;#039;},&lt;br /&gt;
	{name = &amp;#039;Thorns&amp;#039;, page = &amp;#039;Thorns&amp;#039;, type = &amp;#039;Status effect&amp;#039;, text = &amp;#039;Deal damage equal to thorns when struck. Then remove those thorns at turn end.&amp;#039;},&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-- lookup by any spelling a page might use (link target or the word itself)&lt;br /&gt;
local byKey = {}&lt;br /&gt;
local function key(s)&lt;br /&gt;
	return mw.ustring.lower(mw.text.trim((s or &amp;#039;&amp;#039;):gsub(&amp;#039;_&amp;#039;, &amp;#039; &amp;#039;)))&lt;br /&gt;
end&lt;br /&gt;
for _, k in ipairs(p.list) do&lt;br /&gt;
	byKey[key(k.name)] = k&lt;br /&gt;
	byKey[key(k.page)] = k&lt;br /&gt;
end&lt;br /&gt;
byKey[&amp;#039;thorn&amp;#039;] = byKey[&amp;#039;thorns&amp;#039;]&lt;br /&gt;
byKey[&amp;#039;stunned&amp;#039;] = byKey[&amp;#039;stun&amp;#039;]&lt;br /&gt;
byKey[&amp;#039;countdowns&amp;#039;] = byKey[&amp;#039;countdown&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
function p.get(name)&lt;br /&gt;
	return byKey[key(name)]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function styles(frame)&lt;br /&gt;
	return frame:extensionTag(&amp;#039;templatestyles&amp;#039;, &amp;#039;&amp;#039;, {src = STYLES})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- inner: the wikitext that is shown (a link, or a coloured word)&lt;br /&gt;
local function wrap(k, inner)&lt;br /&gt;
	return &amp;#039;&amp;lt;span class=&amp;quot;hic-kw&amp;quot;&amp;gt;&amp;#039; .. inner .. &amp;#039;&amp;lt;span class=&amp;quot;hic-kw-tip&amp;quot;&amp;gt;\&amp;#039;\&amp;#039;\&amp;#039;&amp;#039; .. k.name .. &amp;#039;:\&amp;#039;\&amp;#039;\&amp;#039; &amp;#039; .. k.text .. &amp;#039;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Add tooltips to text that is already expanded: links to keyword pages and coloured status words.&lt;br /&gt;
-- Returns the new text (with the stylesheet in front when anything was added).&lt;br /&gt;
function p.annotate(frame, text)&lt;br /&gt;
	if not text or text == &amp;#039;&amp;#039; then&lt;br /&gt;
		return text&lt;br /&gt;
	end&lt;br /&gt;
	local n = 0&lt;br /&gt;
	-- [[Target]] and [[Target|label]]  (links first, so a coloured word inside a link gets one tooltip, not two)&lt;br /&gt;
	text = text:gsub(&amp;#039;%[%[([^%[%]|]+)|?([^%[%]]*)%]%]&amp;#039;, function(target, label)&lt;br /&gt;
		local k = byKey[key(target)]&lt;br /&gt;
		if not k then&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
		n = n + 1&lt;br /&gt;
		local whole = label ~= &amp;#039;&amp;#039; and (&amp;#039;[[&amp;#039; .. target .. &amp;#039;|&amp;#039; .. label .. &amp;#039;]]&amp;#039;) or (&amp;#039;[[&amp;#039; .. target .. &amp;#039;]]&amp;#039;)&lt;br /&gt;
		return (wrap(k, whole):gsub(&amp;#039;&amp;lt;span style=&amp;quot;color:&amp;#039;, &amp;#039;&amp;lt;span data-kw=&amp;quot;1&amp;quot; style=&amp;quot;color:&amp;#039;))&lt;br /&gt;
	end)&lt;br /&gt;
	-- words coloured by Module:ColorText (status effects only; attack, armor, health and speed have no tooltip)&lt;br /&gt;
	text = text:gsub(&amp;#039;(&amp;lt;span style=&amp;quot;color:[^&amp;quot;]*&amp;quot;&amp;gt;)([^&amp;lt;]+)(&amp;lt;/span&amp;gt;)&amp;#039;, function(open, word, close)&lt;br /&gt;
		local k = byKey[key(word)]&lt;br /&gt;
		if not k or k.type ~= &amp;#039;Status effect&amp;#039; then&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
		n = n + 1&lt;br /&gt;
		return wrap(k, open .. word .. close)&lt;br /&gt;
	end)&lt;br /&gt;
	text = text:gsub(&amp;#039;&amp;lt;span data%-kw=&amp;quot;1&amp;quot; style=&amp;quot;color:&amp;#039;, &amp;#039;&amp;lt;span style=&amp;quot;color:&amp;#039;)&lt;br /&gt;
	if n &amp;gt; 0 then&lt;br /&gt;
		text = styles(frame) .. text&lt;br /&gt;
	end&lt;br /&gt;
	return text&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- {{Keyword|Exposed}} or {{Keyword|Exposed|exposes}}&lt;br /&gt;
function p.show(frame)&lt;br /&gt;
	local args = frame:getParent().args&lt;br /&gt;
	local name = mw.text.trim(args[1] or frame.args[1] or &amp;#039;&amp;#039;)&lt;br /&gt;
	local label = mw.text.trim(args[2] or frame.args[2] or &amp;#039;&amp;#039;)&lt;br /&gt;
	local k = p.get(name)&lt;br /&gt;
	if not k then&lt;br /&gt;
		return label ~= &amp;#039;&amp;#039; and label or name&lt;br /&gt;
	end&lt;br /&gt;
	local link = &amp;#039;[[&amp;#039; .. k.page .. &amp;#039;|&amp;#039; .. (label ~= &amp;#039;&amp;#039; and label or k.name) .. &amp;#039;]]&amp;#039;&lt;br /&gt;
	return styles(frame) .. wrap(k, link)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- table for the Keywords page&lt;br /&gt;
function p.table(frame)&lt;br /&gt;
	local out = {&amp;#039;{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;width:100%;&amp;quot;&amp;#039;, &amp;#039;! style=&amp;quot;width:150px;&amp;quot; | Keyword !! style=&amp;quot;width:110px;&amp;quot; | Type !! What it does&amp;#039;}&lt;br /&gt;
	for _, k in ipairs(p.list) do&lt;br /&gt;
		table.insert(out, &amp;#039;|-&amp;#039;)&lt;br /&gt;
		table.insert(out, &amp;#039;| [[&amp;#039; .. k.page .. &amp;#039;|&amp;#039; .. k.name .. &amp;#039;]] || &amp;#039; .. k.type .. &amp;#039; || &amp;#039; .. k.text)&lt;br /&gt;
	end&lt;br /&gt;
	table.insert(out, &amp;#039;|}&amp;#039;)&lt;br /&gt;
	return table.concat(out, &amp;#039;\n&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>76561197995296537</name></author>
	</entry>
</feed>