Module:Moves

local moves_db = require("Module:MovesDB") local unknown_move = { name = "?????", power = 0, type = "?????", category = "?????", accuracy = 0, pp = 0 }

local type_colors_bg = { NORMAL = "A8A878", FIGHTING = "C03028", FLYING = "A890F0", POISON = "A040A0", GROUND = "E0C068", ROCK = "B8A038", BUG = "A8B820", GHOST = "705890", STEEL = "B8B8D0", FIRE = "F08030", WATER = "6890F0", GRASS = "78C850", ELECTRIC = "F8D030", PSYCHIC = "F85888", ICE = "98D8D8", DRAGON = "7038F8", DARK = "705848", FAIRY = "EE99AC",

PHYSICAL = "C92112", SPECIAL = "4F5870", STATUS = "8C888C",

["?????"] = "FFFFFF" }

local type_colors_fg = { NORMAL = "FFFFFF", FIGHTING = "FFFFFF", FLYING = "FFFFFF", POISON = "FFFFFF", GROUND = "FFFFFF", ROCK = "FFFFFF", BUG = "FFFFFF", GHOST = "FFFFFF", STEEL = "FFFFFF", FIRE = "FFFFFF", WATER = "FFFFFF", GRASS = "FFFFFF", ELECTRIC = "FFFFFF", PSYCHIC = "FFFFFF", ICE = "FFFFFF", DRAGON = "FFFFFF", DARK = "FFFFFF", FAIRY = "FFFFFF",

PHYSICAL = "F67A1A", SPECIAL = "FFFFFF", STATUS = "FFFFFF",

["?????"] = "000000" }

local module = {}

function get_acc_string(acc) if acc == 0 then return "—" else return string.format("%d%%", acc) end end

function get_move_data(move) local data = moves_db.moves[move] if data == nil then data = unknown_move data.name = move end return data end

function print_move_list(list) local text = [[  "

return text end

function module:all_moves return print_move_list(moves_db.order) end

function module:list return print_move_list(self.args) end

function module:level_up local text = [[  "

return text end

function module:tms local text = [[  "

return text end

return module