Line 1: |
Line 1: |
− | local encounter = {}
| |
− | local abyssaldb = require("Module:AbyssalDatabase")
| |
− | local equipmentdb = require("Module:EquipmentDatabase")
| |
− | encounter.abyssaldata = abyssaldb.AbyssalData
| |
− | encounter.equipmentdata = equipmentdb.EquipmentData
| |
| | | |
− | function encounter.Node(frame)
| |
− | --name
| |
− | --node
| |
− | --battle type
| |
− | --formation
| |
− | --enemies
| |
− |
| |
− | local html = ""
| |
− |
| |
− | --See how a frame table stores passed arguments
| |
− | --for key, value in pairs(frame.args) do
| |
− | -- html = html .. 'Key: ' .. key .. '. Value: ' .. value .. '<br>'
| |
− | --end
| |
− |
| |
− |
| |
− | --first enemy
| |
− | local abyssal = encounter.abyssaldata[ mw.text.split( frame.args["enemies"], ' ')[1] ]
| |
− |
| |
− | --get equipment
| |
− | --for i = 1, #abyssal.equip do
| |
− | -- html = html .. abyssal.equip[i]
| |
− | --end
| |
− |
| |
− | --first equipment
| |
− | --local equipment = encounter.equipmentdata[ equipmentdb.findID(abyssal.equip[1]) ].aa
| |
− |
| |
− | html = abyssal.equip[1]
| |
− |
| |
− | return html
| |
− | end
| |
− |
| |
− | return encounter
| |