Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function loadMoves()
- handle = fs.open("moves", "r")
- loadedFile = textutils.unserialize(handle.readLine())
- handle.close()
- end
- moves = {}
- moves = {
- -- ############## NORMAL ###############
- Tackle = {
- name = "Tackle",
- type = "Normal",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 1,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 15
- },
- Growl = {
- name = "Growl",
- type = "Normal",
- doesDamage = false,
- attackForm = "phys",
- target = "opponent",
- power = 0,
- effect = {"debuffDefense"},
- effectValue = 10,
- accuracy = 100,
- pp = 15
- },
- Scratch = {
- name = "Scratch",
- type = "Normal",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 1,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 15
- },
- Harden = {
- name = "Harden",
- type = "Normal",
- doesDamage = false,
- attackForm = "phys",
- target = "self",
- power = 0,
- effect = {"buffDefense"},
- effectValue = 10,
- accuracy = 100,
- pp = 15
- },
- Smoke = {
- name = "Smoke",
- type = "Normal",
- doesDamage = false,
- attackForm = "phys",
- target = "opponent",
- power = 0,
- effect = {"debuffAccuracy"},
- effectValue = 10,
- accuracy = 100,
- pp = 5
- },
- BodySlam = {
- name = "Bodyslam",
- type = "Normal",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 2,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- },
- Stomp = {
- name = "Stomp",
- type = "Normal",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 3,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- },
- Screech = {
- name = "Screech",
- type = "Normal",
- doesDamage = false,
- attackForm = "phys",
- target = "opponent",
- power = 0,
- effect = {"debuffAttack"},
- effectValue = 10,
- accuracy = 100,
- pp = 10
- },
- Heal = {
- name = "Heal",
- type = "Normal",
- doesDamage = false,
- attackForm = "phys",
- target = "self",
- power = 0,
- effect = {"heal"},
- effectValue = 5,
- accuracy = 100,
- pp = 10
- },
- Restore = {
- name = "Restore",
- type = "Normal",
- doesDamage = false,
- attackForm = "phys",
- target = "self",
- power = 0,
- effect = {"heal"},
- effectValue = 10,
- accuracy = 100,
- pp = 5
- },
- Selfdestruct = {
- name = "Selfdestruct",
- type = "Normal",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 7,
- effect = {"selfdestruct"},
- effectValue = 0,
- accuracy = 100,
- pp = 5
- },
- Snore = {
- name = "Snore",
- type = "Normal",
- doesDamage = false,
- attackForm = "phys",
- target = "self",
- power = 0,
- effect = {"heal", "sleepSelf"},
- effectValue = 1000,
- accuracy = 100,
- pp = 5
- },
- -- ############## Grass ###############
- VineWhip = {
- name = "VineWhip",
- type = "Grass",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 2,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- },
- Sundance = {
- name = "Sundance",
- type = "Grass",
- doesDamage = false,
- attackForm = "phys",
- target = "self",
- power = 0,
- effect = {"buffAttack", "buffSpecAttack"},
- effectValue = 10,
- accuracy = 100,
- pp = 10
- },
- RazorLeafs = {
- name = "Razorleafs",
- type = "Grass",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 4,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- },
- LeafBlade = {
- name = "LeafBlade",
- type = "Grass",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 2,
- effect = {"crit"},
- effectValue = 10,
- accuracy = 100,
- pp = 10
- },
- MagicalLeafs = {
- name = "MagicalLeafs",
- type = "Grass",
- doesDamage = true,
- attackForm = "spec",
- target = "self",
- power = 3,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- },
- -- ############## Bug ###############
- HornCharge = {
- name = "HornCharge",
- type = "Bug",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 3,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- },
- BugBite = {
- name = "BugBite",
- type = "Bug",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 2,
- effect = {"debuffSpeed"},
- effectValue = 5,
- accuracy = 100,
- pp = 10
- },
- DefendOrder = {
- name = "DefendOrder",
- type = "Bug",
- doesDamage = false,
- attackForm = "phys",
- target = "self",
- power = 0,
- effect = {"buffDefense", "buffSpecDefense"},
- effectValue = 10,
- accuracy = 100,
- pp = 10
- },
- AttackOrder = {
- name = "AttackOrder",
- type = "Bug",
- doesDamage = false,
- attackForm = "phys",
- target = "self",
- power = 0,
- effect = {"buffAttack", "buffSpecAttack"},
- effectValue = 10,
- accuracy = 100,
- pp = 10
- },
- Net = {
- name = "Net",
- type = "Bug",
- doesDamage = false,
- attackForm = "phys",
- target = "opponent",
- power = 0,
- effect = {"debuffSpeed"},
- effectValue = 20,
- accuracy = 100,
- pp = 10
- },
- -- ############## Poison ###############
- Poison = {
- name = "Poison",
- type = "Poison",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 1,
- effect = {"poison"},
- effectValue = 100,
- accuracy = 100,
- pp = 10
- },
- SleepSpore = {
- name = "SleepSpore",
- type = "Poison",
- doesDamage = false,
- attackForm = "phys",
- target = "opponent",
- power = 0,
- effect = {"sleep"},
- effectValue = 0,
- accuracy = 85,
- pp = 10
- },
- PoisonJab = {
- name = "PoisonJab",
- type = "Poison",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 2,
- effect = {"poison"},
- effectValue = 0,
- accuracy = 65,
- pp = 10
- },
- -- ############## Rock ###############
- RockThrow = {
- name = "RockThrow",
- type = "Rock",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 2,
- effect = {"none"},
- effectValue = 0,
- accuracy = 95,
- pp = 10
- },
- StoneEdge = {
- name = "StoneEdge",
- type = "Rock",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 3,
- effect = {"crit"},
- effectValue = 10,
- accuracy = 95,
- pp = 10
- },
- Reinforce = {
- name = "Reinforce",
- type = "Rock",
- doesDamage = false,
- attackForm = "phys",
- target = "self",
- power = 0,
- effect = {"buffDefense", "buffSpecDefense"},
- effectValue = 10,
- accuracy = 100,
- pp = 10
- },
- RockPolish = {
- name = "RockPolish",
- type = "Rock",
- doesDamage = false,
- attackForm = "phys",
- target = "self",
- power = 0,
- effect = {"buffSpeed"},
- effectValue = 15,
- accuracy = 100,
- pp = 10
- },
- -- ############## Ground ###############
- DirtSpikes = {
- name = "DirtSpikes",
- type = "Ground",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 2,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- },
- Earthquake = {
- name = "Earthquake",
- type = "Ground",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 4,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 5
- },
- MudSquirt = {
- name = "MudSquirt",
- type = "Ground",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 1,
- effect = {"debuffAccuracy"},
- effectValue = 5,
- accuracy = 100,
- pp = 20
- },
- -- ############## Dark ###############
- Bite = {
- name = "Bite",
- type = "Dark",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 3,
- effect = {"flinch"},
- effectValue = 50,
- accuracy = 100,
- pp = 10
- },
- NightSlash = {
- name = "NightSlash",
- type = "Dark",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 2,
- effect = {"crit"},
- effectValue = 15,
- accuracy = 100,
- pp = 10
- },
- DarkPulse = {
- name = "DarkPulse",
- type = "Dark",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 2,
- effect = {"flinch"},
- effectValue = 40,
- accuracy = 100,
- pp = 10
- },
- NastyPlot = {
- name = "NastyPlot",
- type = "Dark",
- doesDamage = false,
- attackForm = "spec",
- target = "self",
- power = 0,
- effect = {"buffSpecAttack"},
- effectValue = 20,
- accuracy = 100,
- pp = 5
- },
- -- ############## Ghost ###############
- OminousWind = {
- name = "OminousWind",
- type = "Ghost",
- doesDamage = false,
- attackForm = "spec",
- target = "self",
- power = 0,
- effect = {"buffSpecAttack", "buffAttack", "buffDefense", "buffSpecDefense", "buffSpeed", "buffAccuracy"},
- effectValue = 5,
- accuracy = 100,
- pp = 5
- },
- ShadowClaw = {
- name = "ShadowClaw",
- type = "Ghost",
- doesDamage = true,
- attackForm = "spec",
- target = "self",
- power = 2,
- effect = {"crit"},
- effectValue = 5,
- accuracy = 100,
- pp = 10
- },
- Curse = {
- name = "Curse",
- type = "Ghost",
- doesDamage = true,
- attackForm = "spec",
- target = "self",
- power = 3,
- effect = {"curse"},
- effectValue = 5,
- accuracy = 100,
- pp = 5
- },
- -- ############## Psychic ###############
- Psybeam = {
- name = "Psybeam",
- type = "Psychic",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 2,
- effect = {"confusion"},
- effectValue = 60,
- accuracy = 100,
- pp = 10
- },
- Psychic = {
- name = "Psychic",
- type = "Psychic",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 4,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- },
- Confusion = {
- name = "Confusion",
- type = "Psychic",
- doesDamage = false,
- attackForm = "spec",
- target = "opponent",
- power = 0,
- effect = {"confusion"},
- effectValue = 100,
- accuracy = 85,
- pp = 10
- },
- Meditation = {
- name = "Meditation",
- type = "Psychic",
- doesDamage = false,
- attackForm = "spec",
- target = "self",
- power = 0,
- effect = {"heal", "buffAccuracy", "buffSpecAttack"},
- effectValue = 5,
- accuracy = 100,
- pp = 10
- },
- -- ############## Water ###############
- SquirtGun = {
- name = "SquirtGun",
- type = "Water",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 2,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 15
- },
- Surf = {
- name = "Surf",
- type = "Water",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 4,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- },
- AquaJet = {
- name = "AquaJet",
- type = "Water",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 3,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- },
- Raindance = {
- name = "Raindance",
- type = "Water",
- doesDamage = false,
- attackForm = "spec",
- target = "self",
- power = 0,
- effect = {"buffSpecAttack"},
- effectValue = 15,
- accuracy = 100,
- pp = 10
- },
- -- ############## Fire ###############
- Flamethrower = {
- name = "Flamethrower",
- type = "Fire",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 2,
- effect = {"burn"},
- effectValue = 60,
- accuracy = 90,
- pp = 10
- },
- FireRing = {
- name = "FireRing",
- type = "Fire",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 3,
- effect = {"burn"},
- effectValue = 60,
- accuracy = 95,
- pp = 10
- },
- FireStorm = {
- name = "FireStorm",
- type = "Fire",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 3,
- effect = {"burn"},
- effectValue = 50,
- accuracy = 95,
- pp = 10
- },
- Armageddon = {
- name = "Armageddon",
- type = "Fire",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 8,
- effect = {"none"},
- effectValue = 0,
- accuracy = 50,
- pp = 5
- },
- -- ############## Steel ###############
- Impenetrable = {
- name = "Impenetrable",
- type = "Steel",
- doesDamage = false,
- attackForm = "spec",
- target = "self",
- power = 0,
- effect = {"buffDefense"},
- effectValue = 25,
- accuracy = 100,
- pp = 5
- },
- FlashCannon = {
- name = "FlashCannon",
- type = "Steel",
- doesDamage = false,
- attackForm = "spec",
- target = "opponent",
- power = 0,
- effect = {"debuffSpecDefense"},
- effectValue = 15,
- accuracy = 100,
- pp = 10
- },
- SteelFist = {
- name = "SteelFist",
- type = "Steel",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 3,
- effect = {"none"},
- effectValue = 0,
- accuracy = 85,
- },
- GyroBall = {
- name = "GyroBall",
- type = "Steel",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 0, --(100 - player..playerTurn.speed) / 15,
- effect = {"none"},
- effectValue = 0,
- accuracy = 95,
- pp = 15
- },
- -- ############## Electric ###############
- Shock = {
- name = "Shock",
- type = "Electric",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 3,
- effect = {"paralyze"},
- effectValue = 60,
- accuracy = 100,
- pp = 15
- },
- ElectroShock = {
- name = "ElectroShock",
- type = "Electric",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 4,
- effect = {"paralyze"},
- effectValue = 50,
- accuracy = 100,
- pp = 5
- },
- ChargeBeam = {
- name = "ChargeBeam",
- type = "Electric",
- doesDamage = false,
- attackForm = "spec",
- target = "self",
- power = 0,
- effect = {"buffSpecAttack"},
- effectValue = 15,
- accuracy = 100,
- pp = 5
- },
- Discharge = {
- name = "Discharge",
- type = "Electric",
- doesDamage = false,
- attackForm = "spec",
- target = "opponent",
- power = 0,
- effect = {"paralyze"},
- effectValue = 100,
- accuracy = 100,
- pp = 5
- },
- -- ############## Ice ###############
- IceFang = {
- name = "IceFang",
- type = "Ice",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 3,
- effect = {"freeze"},
- effectValue = 50,
- accuracy = 95,
- pp = 5
- },
- Freeze = {
- name = "Freeze",
- type = "Ice",
- doesDamage = false,
- attackForm = "spec",
- target = "opponent",
- power = 0,
- effect = {"freeze"},
- effectValue = 100,
- accuracy = 95,
- pp = 10
- },
- Blizzard = {
- name = "Blizzard",
- type = "Ice",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 2,
- effect = {"freeze", "buffSpecAttack"},
- effectValue = 15,
- accuracy = 100,
- pp = 10
- },
- -- ############## Fighting ###############
- CosmicPunch = {
- name = "CosmicPunch",
- type = "Fighting",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 5,
- effect = {"none"},
- effectValue = 0,
- accuracy = 75,
- pp = 10
- },
- SuckerPunch = {
- name = "SuckerPunch",
- type = "Fighting",
- doesDamage = true,
- attackForm = "phys",
- target = "self",
- power = 2,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- },
- RoundhouseKick = {
- name = "RoundhouseKick",
- type = "Fighting",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 3,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- },
- Flex = {
- name = "Flex",
- type = "Fighting",
- doesDamage = false,
- attackForm = "phys",
- target = "self",
- power = 0,
- effect = {"buffAttack"},
- effectValue = 15,
- accuracy = 100,
- pp = 10
- },
- -- ############## Dragon ###############
- DracoMeteor = {
- name = "DracoMeteor",
- type = "Dragon",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 3,
- effect = {"debuffSpecDefense"},
- effectValue = 10,
- accuracy = 100,
- pp = 10
- },
- SpacialRend = {
- name = "SpacialRend",
- type = "Dragon",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 3,
- effect = {"crit"},
- effectValue = 10,
- accuracy = 100,
- pp = 10
- },
- DragonRage = {
- name = "DragonRage",
- type = "Dragon",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 4,
- effect = {"flinch"},
- effectValue = 40,
- accuracy = 100,
- pp = 10
- },
- -- ############## Flying ###############
- Fly = {
- name = "Fly",
- type = "Flying",
- doesDamage = true,
- attackForm = "spec",
- target = "opponent",
- power = 3,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- },
- AirSlash = {
- name = "AirSlash",
- type = "Flying",
- doesDamage = true,
- attackForm = "spec",
- target = "self",
- power = 3,
- effect = {"flinch"},
- effectValue = 40,
- accuracy = 100,
- pp = 10
- },
- Peck = {
- name = "Peck",
- type = "Flying",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 2,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- },
- WingAttack = {
- name = "WingAttack",
- type = "Flying",
- doesDamage = true,
- attackForm = "phys",
- target = "opponent",
- power = 3,
- effect = {"none"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- },
- Hawkeye = {
- name = "Hawkeye",
- type = "Flying",
- doesDamage = false,
- attackForm = "spec",
- target = "self",
- power = 0,
- effect = {"buffAccuracy"},
- effectValue = 20,
- accuracy = 100,
- pp = 10
- },
- Roost = {
- name = "Roost",
- type = "Flying",
- doesDamage = false,
- attackForm = "spec",
- target = "self",
- power = 0,
- effect = {"roost"},
- effectValue = 0,
- accuracy = 100,
- pp = 10
- }
- }
- local function writeFile()
- handle = fs.open("moves", "w")
- handle.write(textutils.serialize(moves))
- handle.close()
- end
- writeFile()
- selectedMove = "OminousWind"
- print(moves[selectedMove]["effect"])
- for k, moveEffect in ipairs(moves[selectedMove]["effect"]) do
- print("effect: "..moveEffect)
- end
- os.pullEvent("key")
- shell.run("clear")
- moves = 0
- loadMoves()
- table.insert(moves, loadedFile)
- for k, moveEffect in ipairs(moves[selectedMove]["effect"]) do
- print(moves[selectedMove]["effect"])
- print("effect: "..moveEffect)
- end
- os.pullEvent("key")
- shell.run("clear")
- loadMoves()
- moves = loadedFile
- for k, moveEffect in ipairs(moves[selectedMove]["effect"]) do
- print(moves[selectedMove]["effect"])
- print("effect: "..moveEffect)
- end
Advertisement
Add Comment
Please, Sign In to add comment