Differenze tra le versioni di "Modulo:DebRes/base"

Adding Teraguscio and Astral type to DebRes *** sovrascritto il testo esistente ***
(Updating some table functions to work better with mw.loaddata, and using them in various DebRes *** sovrascritto il testo esistente ***)
(Adding Teraguscio and Astral type to DebRes *** sovrascritto il testo esistente ***)
 
end)
this.footer = tab.append(this.footer, maybeLines)
end
 
-- Adding ASTRAL footer line for gen 9
if this.gen == 9 then
table.insert(
this.footer,
dr.EffTable.FooterLine.new("ASTRAL", types, "nessuna", etdata)
)
end
 
-- Magidifesa text
MAGIDIFESA = "solo le mosse di tipo ${types} continuano a non avere effetto.",
 
-- Teraguscio text
TERAGUSCIO = "Se Terapagos Forma Teracristal ha tutti i PS e gli effetti di [[${abil}]] non sono stati annullati, l'efficacia di qualsiasi mossa non di tipo ${types} è x0,5",
 
-- Astral type
ASTRAL = "Se questo Pokémon è [[Teracristal|teracristallizzato]], ",
}
 
-- Sorting categories to sort footerlines
dr.EffTable.FooterLine.kindOrder = { "MAYBE", "TAKENOFF", "RINGTARGET" }
{ "MAYBE", "TAKENOFF", "RINGTARGET", "ASTRAL" }
 
-- This table holds functions to generate the initial part of a FooterLine based
 
return table.concat(pieces)
end
 
-- Initial part for ASTRAL category.
dr.EffTable.FooterLine.init.ASTRAL = function()
return dr.EffTable.FooterLine.strings.ASTRAL
.. txt.interp(
dr.EffTable.FooterLine.strings.EFF,
{ types = "[[Astrale]]", eff = "2" }
)
end
 
 
-- Initial part of the footer line
this.init = "\n* "
.. dr.EffTable.FooterLine.init[kind](abil, types.type1, etdata)
 
-- Handling corner case abilities
if this:makeSpecialAbil(abil, types) then
return this
end
-- ASTRAL kind
if kind == "ASTRAL" then
return this
end
 
This method takes care of corner case abilities that need to be treated
separately when calculating new effectiveness. It takes as argument athethe
ability to be checked and possibly handled, and the types to be used when
calculating the new effectiveness. If the ability is a corner case, true is
returned, false otherwise. Such abilities are so far Filtro, Solidroccia,
Scudoprisma, Magidifesa and MagidifesaTeraguscio.
 
--]]
this.tostring = string.interp(
table.concat({
"\n* ",
dr.EffTable.FooterLine.strings.TAKENOFF,
dr.EffTable.FooterLine.strings.MAGIDIFESA,
}
)
 
return true
elseif abil == "teraguscio" then
this.tostring =
string.interp("\n* " .. dr.EffTable.FooterLine.strings.TERAGUSCIO, {
abil = "Teraguscio",
types = link.colorType("Spettro"),
})
 
return true
79 547

contributi