Differenze tra le versioni di "Modulo:Stats"

202 byte aggiunti ,  12:52, 20 ago 2017
m
Fix to type average, directly from devel
m (Quick fix from devel branch)
m (Fix to type average, directly from devel)
 
--[[
string.find is used instead of plain equality
equality because of coleot/coleottero dualism. stats[poke]
is checked first because it might be that
dualism.
statistics data and Pokémon data are not updated
together consistently.
--]]
local typedPokes = table.keys(table.filter(pokes, function(poke, key)
return poke.type1:find(type) or poke.type2:find(type)stats[key]
and not string.parseInt(key)
end, list.pokeNames))
and (poke.type1:find(type) or poke.type2:find(type))
end))
 
return boxStats(statsAvg(typedPokes), {type = type},