Path of Exile Wiki

Wiki поддерживается сообществом, поэтому подумайте над тем, чтобы внести свой вклад.

ПОДРОБНЕЕ

Path of Exile Wiki
(Новая страница: «-- ---------------------------------------------------------------------------- -- Imports -- --------------------------------------------------------------------…»)
 
Нет описания правки
Строка 2: Строка 2:
 
-- Imports
 
-- Imports
 
-- ----------------------------------------------------------------------------
 
-- ----------------------------------------------------------------------------
 
 
local m_cargo = require('Module:Cargo')
 
local m_cargo = require('Module:Cargo')
 
local getArgs = require('Module:Arguments').getArgs
 
local getArgs = require('Module:Arguments').getArgs
Строка 29: Строка 28:
 
field = 'metadata_id',
 
field = 'metadata_id',
 
type = 'String',
 
type = 'String',
required = true,
 
 
},
 
},
 
monster_type_id = {
 
monster_type_id = {
Строка 110: Строка 108:
 
field = 'id',
 
field = 'id',
 
type = 'String',
 
type = 'String',
required = true,
 
 
},
 
},
 
tags = {
 
tags = {
Строка 120: Строка 117:
 
type = 'String',
 
type = 'String',
 
},
 
},
--[[
 
 
armour_multiplier = {
 
armour_multiplier = {
 
field = 'armour_multiplier',
 
field = 'armour_multiplier',
Строка 137: Строка 133:
 
type = 'Float',
 
type = 'Float',
 
},
 
},
]]
 
 
}
 
}
 
}
 
}
Строка 148: Строка 143:
 
field = 'id',
 
field = 'id',
 
type = 'String',
 
type = 'String',
required = true,
 
 
},
 
},
 
part1_fire = {
 
part1_fire = {
field = 'size',
+
field = 'part1_fire',
 
type = 'Integer',
 
type = 'Integer',
 
},
 
},
 
part1_cold = {
 
part1_cold = {
field = 'size',
+
field = 'part1_cold',
 
type = 'Integer',
 
type = 'Integer',
 
},
 
},
 
part1_lightning = {
 
part1_lightning = {
field = 'size',
+
field = 'part1_lightning',
 
type = 'Integer',
 
type = 'Integer',
 
},
 
},
 
part1_chaos = {
 
part1_chaos = {
field = 'size',
+
field = 'part1_chaos',
 
type = 'Integer',
 
type = 'Integer',
 
},
 
},
 
part2_fire = {
 
part2_fire = {
field = 'size',
+
field = 'part2_fire',
 
type = 'Integer',
 
type = 'Integer',
 
},
 
},
 
part2_cold = {
 
part2_cold = {
field = 'size',
+
field = 'part2_cold',
 
type = 'Integer',
 
type = 'Integer',
 
},
 
},
 
part2_lightning = {
 
part2_lightning = {
field = 'size',
+
field = 'part2_lightning',
 
type = 'Integer',
 
type = 'Integer',
 
},
 
},
 
part2_chaos = {
 
part2_chaos = {
field = 'size',
+
field = 'part2_chaos',
 
type = 'Integer',
 
type = 'Integer',
 
},
 
},
 
maps_fire = {
 
maps_fire = {
field = 'size',
+
field = 'maps_fire',
 
type = 'Integer',
 
type = 'Integer',
 
},
 
},
 
maps_cold = {
 
maps_cold = {
field = 'size',
+
field = 'maps_cold',
 
type = 'Integer',
 
type = 'Integer',
 
},
 
},
 
maps_lightning = {
 
maps_lightning = {
field = 'size',
+
field = 'maps_lightning',
 
type = 'Integer',
 
type = 'Integer',
 
},
 
},
 
maps_chaos = {
 
maps_chaos = {
field = 'size',
+
field = 'maps_chaos',
 
type = 'Integer',
 
type = 'Integer',
 
},
 
},
Строка 201: Строка 195:
 
}
 
}
   
tables.monster_stats = {
+
tables.monster_base_stats = {
table = 'monster_stats',
+
table = 'monster_base_stats',
 
order = {'level', 'damage', 'evasion', 'accuracy', 'life', 'experience', 'summon_life'},
 
order = {'level', 'damage', 'evasion', 'accuracy', 'life', 'experience', 'summon_life'},
 
fields = {
 
fields = {
Строка 279: Строка 273:
 
p.table_monster_types = m_cargo.declare_factory{data=tables.monster_types}
 
p.table_monster_types = m_cargo.declare_factory{data=tables.monster_types}
 
p.table_monster_resistances = m_cargo.declare_factory{data=tables.monster_resistances}
 
p.table_monster_resistances = m_cargo.declare_factory{data=tables.monster_resistances}
p.table_monster_stats = m_cargo.declare_factory{data=tables.monster_stats}
+
p.table_monster_base_stats = m_cargo.declare_factory{data=tables.monster_base_stats}
p.table_monster_map_multiplier = m_cargo.declare_factory{data=tables.monster_map_multipliers}
+
p.table_monster_map_multipliers = m_cargo.declare_factory{data=tables.monster_map_multipliers}
   
  +
--[[
 
function p.monster_resistance_table (frame)
+
function p.monster (frame)
  +
-- Get args
local tpl_args = getArgs(frame, {
+
tpl_args = getArgs(frame, {
 
parentFirst = true
 
parentFirst = true
 
})
 
})
 
frame = m_util.misc.get_frame(frame)
 
frame = m_util.misc.get_frame(frame)
  +
-- parse
end]]
 
  +
m_util.args.from_cargo_map{
  +
tpl_args=tpl_args,
  +
frame=frame,
  +
table_map=tables.monsters,
  +
}
 
end
   
 
return p
 
return p

Версия от 16:44, 25 мая 2019

-- ----------------------------------------------------------------------------
-- Imports
-- ----------------------------------------------------------------------------
local m_cargo = require('Module:Cargo')
local getArgs = require('Module:Arguments').getArgs
local m_util = require('Module:Util')

local p = {}

-- ----------------------------------------------------------------------------
-- Strings
-- ----------------------------------------------------------------------------

local i18n = {
    arg = {        
    },
}
-- ----------------------------------------------------------------------------
-- Tables
-- ----------------------------------------------------------------------------
local tables = {}

tables.monsters = {
    table = 'monsters',
    order = {'metadata_id', 'monster_type_id', 'mod_ids', 'part1_mod_ids', 'part2_mod_ids', 'endgame_mod_ids', 'tags', 'skill_ids', 'name', 'size', 'minimum_attack_distance', 'maximum_attack_distance', 'model_size_multiplier', 'experience_multiplier', 'damage_multiplier', 'health_multiplier', 'critical_strike_chance', 'attack_speed'},
    fields = {
        metadata_id = {
            field = 'metadata_id',
            type = 'String',
        },
        monster_type_id = {
            field = 'monster_type_id',
            type = 'String',
        },
        mod_ids = {
            field = 'mod_ids',
            type = 'List (,) of String',
        },
        part1_mod_ids = {
            field = 'part1_mod_ids',
            type = 'List (,) of String',
        },
        part2_mod_ids = {
            field = 'part2_mod_ids',
            type = 'List (,) of String',
        },
        endgame_mod_ids = {
            field = 'endgame_mod_ids',
            type = 'List (,) of String',
        },
        tags = {
            field = 'tags',
            type = 'List (,) of String',
        },
        skill_ids = {
            field = 'skill_ids',
            type = 'List (,) of String',
        },
        -- add base type info or just parse it?
        name = {
            field = 'name',
            type = 'String',
        },
        size = {
            field = 'size',
            type = 'Integer',
        },
        minimum_attack_distance = {
            field = 'minimum_attack_distance',
            type = 'Integer',
        },
        maximum_attack_distance = {
            field = 'maximum_attack_distance',
            type = 'Integer',
        },
        model_size_multiplier = {
            field = 'model_size_multiplier',
            type = 'Float',
        },
        experience_multiplier = {
            field = 'experience_multiplier',
            type = 'Float',
        },
        damage_multiplier = {
            field = 'damage_multiplier',
            type = 'Float',
        },
        health_multiplier = {
            field = 'health_multiplier',
            type = 'Float',
        },
        critical_strike_chance = {
            field = 'critical_strike_chance',
            type = 'Float',
        },
        attack_speed = {
            field = 'attack_speed',
            type = 'Float',
        },
    }
}

tables.monster_types = {
    table = 'monster_types',
    order = {'id', 'tags', 'monster_resistance_id'},
    fields = {
        id = {
            field = 'id',
            type = 'String',
        },
        tags = {
            field = 'tags',
            type = 'List (,) of String',
        },
        monster_resistance_id = {
            field = 'monster_resistance_id',
            type = 'String',
        },
        armour_multiplier = {
            field = 'armour_multiplier',
            type = 'Float',
        },
        evasion_multiplier = {
            field = 'evasion_multiplier',
            type = 'Float',
        },
        energy_shield_multiplier = {
            field = 'energy_shield_multiplier',
            type = 'Float',
        },
        damage_spread = {
            field = 'damage_spread',
            type = 'Float',
        },
    }
}

tables.monster_resistances = {
    table = 'monster_resistances',
    order = {'id', 'part1_fire', 'part1_cold', 'part1_lightning', 'part1_chaos', 'part2_fire', 'part2_cold', 'part2_lightning', 'part2_chaos', 'maps_fire', 'maps_cold', 'maps_lightning', 'maps_chaos'},
    fields = {
        id = {
            field = 'id',
            type = 'String',
        },
        part1_fire = {
            field = 'part1_fire',
            type = 'Integer',
        },
        part1_cold = {
            field = 'part1_cold',
            type = 'Integer',
        },
        part1_lightning = {
            field = 'part1_lightning',
            type = 'Integer',
        },
        part1_chaos = {
            field = 'part1_chaos',
            type = 'Integer',
        },
        part2_fire = {
            field = 'part2_fire',
            type = 'Integer',
        },
        part2_cold = {
            field = 'part2_cold',
            type = 'Integer',
        },
        part2_lightning = {
            field = 'part2_lightning',
            type = 'Integer',
        },
        part2_chaos = {
            field = 'part2_chaos',
            type = 'Integer',
        },
        maps_fire = {
            field = 'maps_fire',
            type = 'Integer',
        },
        maps_cold = {
            field = 'maps_cold',
            type = 'Integer',
        },
        maps_lightning = {
            field = 'maps_lightning',
            type = 'Integer',
        },
        maps_chaos = {
            field = 'maps_chaos',
            type = 'Integer',
        },
    }
}

tables.monster_base_stats = {
    table = 'monster_base_stats',
    order = {'level', 'damage', 'evasion', 'accuracy', 'life', 'experience', 'summon_life'},
    fields = {
        level = {
            field = 'level',
            type = 'Integer',
        },
        damage = {
            field = 'damage',
            type = 'Float',
        },
        evasion = {
            field = 'evasion',
            type = 'Integer',
        },
        accuracy = {
            field = 'accuracy',
            type = 'Integer',
        },
        life = {
            field = 'life',
            type = 'Integer',
        },
        experience = {
            field = 'experience',
            type = 'Integer',
        },
        summon_life = {
            field = 'summon_life',
            type = 'Integer',
        },
        -- whole bunch of other values I have no clue about ...
    }
}

tables.monster_map_multipliers = {
    table = 'monster_map_multipliers',
    order = {'level', 'health', 'damage', 'boss_health', 'boss_damage', 'boss_item_rarity', 'boss_item_quantity'},
    fields = {
        level = {
            field = 'level',
            type = 'Integer',
        },
        health = {
            field = 'health',
            type = 'Integer',
        },
        damage = {
            field = 'damage',
            type = 'Integer',
        },
        boss_health = {
            field = 'boss_health',
            type = 'Integer',
        },
        boss_damage = {
            field = 'boss_damage',
            type = 'Integer',
        },
        boss_item_rarity = {
            field = 'boss_item_rarity',
            type = 'Integer',
        },
        boss_item_quantity = {
            field = 'boss_item_quanity',
            type = 'Integer',
        },
    }
}

-- ----------------------------------------------------------------------------
-- Page views
-- ----------------------------------------------------------------------------

p.table_monsters = m_cargo.declare_factory{data=tables.monsters}
p.table_monster_types = m_cargo.declare_factory{data=tables.monster_types}
p.table_monster_resistances = m_cargo.declare_factory{data=tables.monster_resistances}
p.table_monster_base_stats = m_cargo.declare_factory{data=tables.monster_base_stats}
p.table_monster_map_multipliers = m_cargo.declare_factory{data=tables.monster_map_multipliers}


function p.monster (frame)
    -- Get args
    tpl_args = getArgs(frame, {
        parentFirst = true
    })
    frame = m_util.misc.get_frame(frame)
    -- parse 
    m_util.args.from_cargo_map{
        tpl_args=tpl_args,
        frame=frame,
        table_map=tables.monsters,
    }
end

return p