<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://wiki.chatmon.ru/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3A%D0%A2%D0%B8%D0%BF%D1%8B</id>
	<title>Модуль:Типы - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.chatmon.ru/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3A%D0%A2%D0%B8%D0%BF%D1%8B"/>
	<link rel="alternate" type="text/html" href="https://wiki.chatmon.ru/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:%D0%A2%D0%B8%D0%BF%D1%8B&amp;action=history"/>
	<updated>2026-12-01T22:56:14Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.12</generator>
	<entry>
		<id>https://wiki.chatmon.ru/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:%D0%A2%D0%B8%D0%BF%D1%8B&amp;diff=15820&amp;oldid=prev</id>
		<title>ChatmonWikiEditor: Покемоны и атаки по типам</title>
		<link rel="alternate" type="text/html" href="https://wiki.chatmon.ru/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:%D0%A2%D0%B8%D0%BF%D1%8B&amp;diff=15820&amp;oldid=prev"/>
		<updated>2026-12-01T19:31:53Z</updated>

		<summary type="html">&lt;p&gt;Покемоны и атаки по типам&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local dex = require(&amp;#039;Module:Покемоны&amp;#039;)&lt;br /&gt;
local dexData = mw.loadData(&amp;#039;Module:Покемоны/данные&amp;#039;)&lt;br /&gt;
local export = {}&lt;br /&gt;
&lt;br /&gt;
local function badge(id)&lt;br /&gt;
    local kind = dexData.types[id]&lt;br /&gt;
    return &amp;#039;{{Метка покедекса||&amp;#039; .. kind[2] .. &amp;#039;|&amp;#039; .. kind[3] .. &amp;#039;}}&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function tableStart(class, headings)&lt;br /&gt;
    local lines = {&amp;#039;{| class=&amp;quot;wikitable sortable &amp;#039; .. class .. &amp;#039;&amp;quot;&amp;#039;}&lt;br /&gt;
    for _, heading in ipairs(headings) do&lt;br /&gt;
        local numeric = type(heading) == &amp;#039;table&amp;#039;&lt;br /&gt;
        local label = numeric and heading[1] or heading&lt;br /&gt;
        local attr = numeric and &amp;#039; data-sort-type=&amp;quot;number&amp;quot;&amp;#039; or &amp;#039;&amp;#039;&lt;br /&gt;
        lines[#lines + 1] = &amp;#039;! scope=&amp;quot;col&amp;quot;&amp;#039; .. attr .. &amp;#039; | &amp;#039; .. label&lt;br /&gt;
    end&lt;br /&gt;
    return lines&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function addRow(lines, values)&lt;br /&gt;
    lines[#lines + 1] = &amp;#039;|-\n| &amp;#039; .. table.concat(values, &amp;#039;\n| &amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function render(frame, lines)&lt;br /&gt;
    lines[#lines + 1] = &amp;#039;|}&amp;#039;&lt;br /&gt;
    return frame:preprocess(table.concat(lines, &amp;#039;\n&amp;#039;))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function hasType(types, kind)&lt;br /&gt;
    for _, id in ipairs(types) do&lt;br /&gt;
        if id == kind then return true end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
export[&amp;#039;покемоны&amp;#039;] = function(frame)&lt;br /&gt;
    local kind = frame.args[1]&lt;br /&gt;
    assert(dexData.types[kind], &amp;#039;Неизвестный тип&amp;#039;)&lt;br /&gt;
    local lines = tableStart(&amp;#039;chatmon-type-pokemon&amp;#039;, {{&amp;#039;№&amp;#039;}, &amp;#039;Покемон&amp;#039;, &amp;#039;Тип&amp;#039;})&lt;br /&gt;
    for _, id in ipairs(dexData.order) do&lt;br /&gt;
        local types = dexData.pokemon[id].types&lt;br /&gt;
        if hasType(types, kind) then&lt;br /&gt;
            local number, label = dex.numberAndSprite(id)&lt;br /&gt;
            local badges = {}&lt;br /&gt;
            for _, typeId in ipairs(types) do&lt;br /&gt;
                local markup = badge(typeId)&lt;br /&gt;
                if typeId ~= kind then&lt;br /&gt;
                    markup = &amp;#039;[[&amp;#039; .. dexData.types[typeId][2] .. &amp;#039; тип|&amp;#039; .. markup .. &amp;#039;]]&amp;#039;&lt;br /&gt;
                end&lt;br /&gt;
                badges[#badges + 1] = markup&lt;br /&gt;
            end&lt;br /&gt;
            addRow(lines, {number, label, table.concat(badges, &amp;#039; &amp;#039;)})&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return render(frame, lines)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
export[&amp;#039;атаки&amp;#039;] = function(frame)&lt;br /&gt;
    local kind = assert(dexData.types[frame.args[1]], &amp;#039;Неизвестный тип&amp;#039;)&lt;br /&gt;
    local effects = require(&amp;#039;Module:Эффекты&amp;#039;)&lt;br /&gt;
    local metadata = mw.loadData(&amp;#039;Module:Приёмы/данные&amp;#039;).moves&lt;br /&gt;
    local details = mw.loadData(&amp;#039;Module:Эффекты/данные&amp;#039;).moves&lt;br /&gt;
    local headings = effects.moveHeadings()&lt;br /&gt;
    table.remove(headings, 2)&lt;br /&gt;
    local lines = tableStart(&amp;#039;chatmon-type-moves&amp;#039;, headings)&lt;br /&gt;
    local ids, names = {}, {}&lt;br /&gt;
    for id, description in pairs(details) do&lt;br /&gt;
        local label = metadata[id][2]:match(&amp;#039;{{Метка покедекса|[^|]*|([^|]+)|&amp;#039;)&lt;br /&gt;
        if label == kind[2] then&lt;br /&gt;
            ids[#ids + 1] = id&lt;br /&gt;
            names[id] = description.title:gsub(&amp;#039;ё&amp;#039;, &amp;#039;е&amp;#039;):gsub(&amp;#039;Ё&amp;#039;, &amp;#039;Е&amp;#039;)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    table.sort(ids, function(a, b)&lt;br /&gt;
        if names[a] == names[b] then return details[a].title &amp;lt; details[b].title end&lt;br /&gt;
        return names[a] &amp;lt; names[b]&lt;br /&gt;
    end)&lt;br /&gt;
    for _, id in ipairs(ids) do&lt;br /&gt;
        local row = effects.moveRow(id)&lt;br /&gt;
        table.remove(row, 2)&lt;br /&gt;
        addRow(lines, row)&lt;br /&gt;
    end&lt;br /&gt;
    return render(frame, lines)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return export&lt;/div&gt;</summary>
		<author><name>ChatmonWikiEditor</name></author>
	</entry>
</feed>