ravneravn

temp

Nov 26th, 2013
57
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. local function loadMoves()
  3. handle = fs.open("moves", "r")
  4. loadedFile = textutils.unserialize(handle.readLine())
  5. handle.close()
  6. end
  7.  
  8. moves = {}
  9. moves = {
  10. -- ############## NORMAL ###############
  11. Tackle = {
  12. name = "Tackle",
  13. type = "Normal",
  14. doesDamage = true,
  15. attackForm = "phys",
  16. target = "opponent",
  17. power = 1,
  18. effect = {"none"},
  19. effectValue = 0,
  20. accuracy = 100,
  21. pp = 15
  22. },
  23.  
  24. Growl = {
  25. name = "Growl",
  26. type = "Normal",
  27. doesDamage = false,
  28. attackForm = "phys",
  29. target = "opponent",
  30. power = 0,
  31. effect = {"debuffDefense"},
  32. effectValue = 10,
  33. accuracy = 100,
  34. pp = 15
  35. },
  36.  
  37. Scratch = {
  38. name = "Scratch",
  39. type = "Normal",
  40. doesDamage = true,
  41. attackForm = "phys",
  42. target = "opponent",
  43. power = 1,
  44. effect = {"none"},
  45. effectValue = 0,
  46. accuracy = 100,
  47. pp = 15
  48. },
  49.  
  50.  
  51. Harden = {
  52. name = "Harden",
  53. type = "Normal",
  54. doesDamage = false,
  55. attackForm = "phys",
  56. target = "self",
  57. power = 0,
  58. effect = {"buffDefense"},
  59. effectValue = 10,
  60. accuracy = 100,
  61. pp = 15
  62. },
  63.  
  64.  
  65. Smoke = {
  66. name = "Smoke",
  67. type = "Normal",
  68. doesDamage = false,
  69. attackForm = "phys",
  70. target = "opponent",
  71. power = 0,
  72. effect = {"debuffAccuracy"},
  73. effectValue = 10,
  74. accuracy = 100,
  75. pp = 5
  76. },
  77.  
  78. BodySlam = {
  79. name = "Bodyslam",
  80. type = "Normal",
  81. doesDamage = true,
  82. attackForm = "phys",
  83. target = "opponent",
  84. power = 2,
  85. effect = {"none"},
  86. effectValue = 0,
  87. accuracy = 100,
  88. pp = 10
  89. },
  90.  
  91. Stomp = {
  92. name = "Stomp",
  93. type = "Normal",
  94. doesDamage = true,
  95. attackForm = "phys",
  96. target = "opponent",
  97. power = 3,
  98. effect = {"none"},
  99. effectValue = 0,
  100. accuracy = 100,
  101. pp = 10
  102. },
  103.  
  104. Screech = {
  105. name = "Screech",
  106. type = "Normal",
  107. doesDamage = false,
  108. attackForm = "phys",
  109. target = "opponent",
  110. power = 0,
  111. effect = {"debuffAttack"},
  112. effectValue = 10,
  113. accuracy = 100,
  114. pp = 10
  115. },
  116.  
  117. Heal = {
  118. name = "Heal",
  119. type = "Normal",
  120. doesDamage = false,
  121. attackForm = "phys",
  122. target = "self",
  123. power = 0,
  124. effect = {"heal"},
  125. effectValue = 5,
  126. accuracy = 100,
  127. pp = 10
  128. },
  129.  
  130. Restore = {
  131. name = "Restore",
  132. type = "Normal",
  133. doesDamage = false,
  134. attackForm = "phys",
  135. target = "self",
  136. power = 0,
  137. effect = {"heal"},
  138. effectValue = 10,
  139. accuracy = 100,
  140. pp = 5
  141. },
  142.  
  143. Selfdestruct = {
  144. name = "Selfdestruct",
  145. type = "Normal",
  146. doesDamage = true,
  147. attackForm = "spec",
  148. target = "opponent",
  149. power = 7,
  150. effect = {"selfdestruct"},
  151. effectValue = 0,
  152. accuracy = 100,
  153. pp = 5
  154. },
  155.  
  156. Snore = {
  157. name = "Snore",
  158. type = "Normal",
  159. doesDamage = false,
  160. attackForm = "phys",
  161. target = "self",
  162. power = 0,
  163. effect = {"heal", "sleepSelf"},
  164. effectValue = 1000,
  165. accuracy = 100,
  166. pp = 5
  167. },
  168.  
  169.  
  170.  
  171. -- ############## Grass ###############
  172. VineWhip = {
  173. name = "VineWhip",
  174. type = "Grass",
  175. doesDamage = true,
  176. attackForm = "phys",
  177. target = "opponent",
  178. power = 2,
  179. effect = {"none"},
  180. effectValue = 0,
  181. accuracy = 100,
  182. pp = 10
  183. },
  184.  
  185. Sundance = {
  186. name = "Sundance",
  187. type = "Grass",
  188. doesDamage = false,
  189. attackForm = "phys",
  190. target = "self",
  191. power = 0,
  192. effect = {"buffAttack", "buffSpecAttack"},
  193. effectValue = 10,
  194. accuracy = 100,
  195. pp = 10
  196. },
  197.  
  198. RazorLeafs = {
  199. name = "Razorleafs",
  200. type = "Grass",
  201. doesDamage = true,
  202. attackForm = "spec",
  203. target = "opponent",
  204. power = 4,
  205. effect = {"none"},
  206. effectValue = 0,
  207. accuracy = 100,
  208. pp = 10
  209. },
  210.  
  211. LeafBlade = {
  212. name = "LeafBlade",
  213. type = "Grass",
  214. doesDamage = true,
  215. attackForm = "phys",
  216. target = "opponent",
  217. power = 2,
  218. effect = {"crit"},
  219. effectValue = 10,
  220. accuracy = 100,
  221. pp = 10
  222. },
  223.  
  224. MagicalLeafs = {
  225. name = "MagicalLeafs",
  226. type = "Grass",
  227. doesDamage = true,
  228. attackForm = "spec",
  229. target = "self",
  230. power = 3,
  231. effect = {"none"},
  232. effectValue = 0,
  233. accuracy = 100,
  234. pp = 10
  235. },
  236.  
  237.  
  238. -- ############## Bug ###############
  239. HornCharge = {
  240. name = "HornCharge",
  241. type = "Bug",
  242. doesDamage = true,
  243. attackForm = "phys",
  244. target = "opponent",
  245. power = 3,
  246. effect = {"none"},
  247. effectValue = 0,
  248. accuracy = 100,
  249. pp = 10
  250. },
  251.  
  252. BugBite = {
  253. name = "BugBite",
  254. type = "Bug",
  255. doesDamage = true,
  256. attackForm = "phys",
  257. target = "opponent",
  258. power = 2,
  259. effect = {"debuffSpeed"},
  260. effectValue = 5,
  261. accuracy = 100,
  262. pp = 10
  263. },
  264.  
  265. DefendOrder = {
  266. name = "DefendOrder",
  267. type = "Bug",
  268. doesDamage = false,
  269. attackForm = "phys",
  270. target = "self",
  271. power = 0,
  272. effect = {"buffDefense", "buffSpecDefense"},
  273. effectValue = 10,
  274. accuracy = 100,
  275. pp = 10
  276. },
  277.  
  278. AttackOrder = {
  279. name = "AttackOrder",
  280. type = "Bug",
  281. doesDamage = false,
  282. attackForm = "phys",
  283. target = "self",
  284. power = 0,
  285. effect = {"buffAttack", "buffSpecAttack"},
  286. effectValue = 10,
  287. accuracy = 100,
  288. pp = 10
  289. },
  290.  
  291. Net = {
  292. name = "Net",
  293. type = "Bug",
  294. doesDamage = false,
  295. attackForm = "phys",
  296. target = "opponent",
  297. power = 0,
  298. effect = {"debuffSpeed"},
  299. effectValue = 20,
  300. accuracy = 100,
  301. pp = 10
  302. },
  303.  
  304.  
  305. -- ############## Poison ###############
  306. Poison = {
  307. name = "Poison",
  308. type = "Poison",
  309. doesDamage = true,
  310. attackForm = "phys",
  311. target = "opponent",
  312. power = 1,
  313. effect = {"poison"},
  314. effectValue = 100,
  315. accuracy = 100,
  316. pp = 10
  317. },
  318.  
  319. SleepSpore = {
  320. name = "SleepSpore",
  321. type = "Poison",
  322. doesDamage = false,
  323. attackForm = "phys",
  324. target = "opponent",
  325. power = 0,
  326. effect = {"sleep"},
  327. effectValue = 0,
  328. accuracy = 85,
  329. pp = 10
  330. },
  331.  
  332. PoisonJab = {
  333. name = "PoisonJab",
  334. type = "Poison",
  335. doesDamage = true,
  336. attackForm = "phys",
  337. target = "opponent",
  338. power = 2,
  339. effect = {"poison"},
  340. effectValue = 0,
  341. accuracy = 65,
  342. pp = 10
  343. },
  344.  
  345. -- ############## Rock ###############
  346. RockThrow = {
  347. name = "RockThrow",
  348. type = "Rock",
  349. doesDamage = true,
  350. attackForm = "phys",
  351. target = "opponent",
  352. power = 2,
  353. effect = {"none"},
  354. effectValue = 0,
  355. accuracy = 95,
  356. pp = 10
  357. },
  358.  
  359. StoneEdge = {
  360. name = "StoneEdge",
  361. type = "Rock",
  362. doesDamage = true,
  363. attackForm = "phys",
  364. target = "opponent",
  365. power = 3,
  366. effect = {"crit"},
  367. effectValue = 10,
  368. accuracy = 95,
  369. pp = 10
  370. },
  371.  
  372. Reinforce = {
  373. name = "Reinforce",
  374. type = "Rock",
  375. doesDamage = false,
  376. attackForm = "phys",
  377. target = "self",
  378. power = 0,
  379. effect = {"buffDefense", "buffSpecDefense"},
  380. effectValue = 10,
  381. accuracy = 100,
  382. pp = 10
  383. },
  384.  
  385. RockPolish = {
  386. name = "RockPolish",
  387. type = "Rock",
  388. doesDamage = false,
  389. attackForm = "phys",
  390. target = "self",
  391. power = 0,
  392. effect = {"buffSpeed"},
  393. effectValue = 15,
  394. accuracy = 100,
  395. pp = 10
  396. },
  397.  
  398. -- ############## Ground ###############
  399. DirtSpikes = {
  400. name = "DirtSpikes",
  401. type = "Ground",
  402. doesDamage = true,
  403. attackForm = "phys",
  404. target = "opponent",
  405. power = 2,
  406. effect = {"none"},
  407. effectValue = 0,
  408. accuracy = 100,
  409. pp = 10
  410. },
  411.  
  412. Earthquake = {
  413. name = "Earthquake",
  414. type = "Ground",
  415. doesDamage = true,
  416. attackForm = "spec",
  417. target = "opponent",
  418. power = 4,
  419. effect = {"none"},
  420. effectValue = 0,
  421. accuracy = 100,
  422. pp = 5
  423. },
  424.  
  425.  
  426. MudSquirt = {
  427. name = "MudSquirt",
  428. type = "Ground",
  429. doesDamage = true,
  430. attackForm = "spec",
  431. target = "opponent",
  432. power = 1,
  433. effect = {"debuffAccuracy"},
  434. effectValue = 5,
  435. accuracy = 100,
  436. pp = 20
  437. },
  438.  
  439.  
  440. -- ############## Dark ###############
  441. Bite = {
  442. name = "Bite",
  443. type = "Dark",
  444. doesDamage = true,
  445. attackForm = "phys",
  446. target = "opponent",
  447. power = 3,
  448. effect = {"flinch"},
  449. effectValue = 50,
  450. accuracy = 100,
  451. pp = 10
  452. },
  453.  
  454. NightSlash = {
  455. name = "NightSlash",
  456. type = "Dark",
  457. doesDamage = true,
  458. attackForm = "spec",
  459. target = "opponent",
  460. power = 2,
  461. effect = {"crit"},
  462. effectValue = 15,
  463. accuracy = 100,
  464. pp = 10
  465. },
  466.  
  467. DarkPulse = {
  468. name = "DarkPulse",
  469. type = "Dark",
  470. doesDamage = true,
  471. attackForm = "spec",
  472. target = "opponent",
  473. power = 2,
  474. effect = {"flinch"},
  475. effectValue = 40,
  476. accuracy = 100,
  477. pp = 10
  478. },
  479.  
  480. NastyPlot = {
  481. name = "NastyPlot",
  482. type = "Dark",
  483. doesDamage = false,
  484. attackForm = "spec",
  485. target = "self",
  486. power = 0,
  487. effect = {"buffSpecAttack"},
  488. effectValue = 20,
  489. accuracy = 100,
  490. pp = 5
  491. },
  492.  
  493. -- ############## Ghost ###############
  494. OminousWind = {
  495. name = "OminousWind",
  496. type = "Ghost",
  497. doesDamage = false,
  498. attackForm = "spec",
  499. target = "self",
  500. power = 0,
  501. effect = {"buffSpecAttack", "buffAttack", "buffDefense", "buffSpecDefense", "buffSpeed", "buffAccuracy"},
  502. effectValue = 5,
  503. accuracy = 100,
  504. pp = 5
  505. },
  506.  
  507. ShadowClaw = {
  508. name = "ShadowClaw",
  509. type = "Ghost",
  510. doesDamage = true,
  511. attackForm = "spec",
  512. target = "self",
  513. power = 2,
  514. effect = {"crit"},
  515. effectValue = 5,
  516. accuracy = 100,
  517. pp = 10
  518. },
  519.  
  520. Curse = {
  521. name = "Curse",
  522. type = "Ghost",
  523. doesDamage = true,
  524. attackForm = "spec",
  525. target = "self",
  526. power = 3,
  527. effect = {"curse"},
  528. effectValue = 5,
  529. accuracy = 100,
  530. pp = 5
  531. },
  532.  
  533. -- ############## Psychic ###############
  534. Psybeam = {
  535. name = "Psybeam",
  536. type = "Psychic",
  537. doesDamage = true,
  538. attackForm = "spec",
  539. target = "opponent",
  540. power = 2,
  541. effect = {"confusion"},
  542. effectValue = 60,
  543. accuracy = 100,
  544. pp = 10
  545. },
  546.  
  547. Psychic = {
  548. name = "Psychic",
  549. type = "Psychic",
  550. doesDamage = true,
  551. attackForm = "spec",
  552. target = "opponent",
  553. power = 4,
  554. effect = {"none"},
  555. effectValue = 0,
  556. accuracy = 100,
  557. pp = 10
  558. },
  559.  
  560. Confusion = {
  561. name = "Confusion",
  562. type = "Psychic",
  563. doesDamage = false,
  564. attackForm = "spec",
  565. target = "opponent",
  566. power = 0,
  567. effect = {"confusion"},
  568. effectValue = 100,
  569. accuracy = 85,
  570. pp = 10
  571. },
  572.  
  573. Meditation = {
  574. name = "Meditation",
  575. type = "Psychic",
  576. doesDamage = false,
  577. attackForm = "spec",
  578. target = "self",
  579. power = 0,
  580. effect = {"heal", "buffAccuracy", "buffSpecAttack"},
  581. effectValue = 5,
  582. accuracy = 100,
  583. pp = 10
  584. },
  585.  
  586. -- ############## Water ###############
  587. SquirtGun = {
  588. name = "SquirtGun",
  589. type = "Water",
  590. doesDamage = true,
  591. attackForm = "spec",
  592. target = "opponent",
  593. power = 2,
  594. effect = {"none"},
  595. effectValue = 0,
  596. accuracy = 100,
  597. pp = 15
  598. },
  599.  
  600. Surf = {
  601. name = "Surf",
  602. type = "Water",
  603. doesDamage = true,
  604. attackForm = "spec",
  605. target = "opponent",
  606. power = 4,
  607. effect = {"none"},
  608. effectValue = 0,
  609. accuracy = 100,
  610. pp = 10
  611. },
  612.  
  613. AquaJet = {
  614. name = "AquaJet",
  615. type = "Water",
  616. doesDamage = true,
  617. attackForm = "phys",
  618. target = "opponent",
  619. power = 3,
  620. effect = {"none"},
  621. effectValue = 0,
  622. accuracy = 100,
  623. pp = 10
  624. },
  625.  
  626. Raindance = {
  627. name = "Raindance",
  628. type = "Water",
  629. doesDamage = false,
  630. attackForm = "spec",
  631. target = "self",
  632. power = 0,
  633. effect = {"buffSpecAttack"},
  634. effectValue = 15,
  635. accuracy = 100,
  636. pp = 10
  637. },
  638.  
  639.  
  640. -- ############## Fire ###############
  641. Flamethrower = {
  642. name = "Flamethrower",
  643. type = "Fire",
  644. doesDamage = true,
  645. attackForm = "spec",
  646. target = "opponent",
  647. power = 2,
  648. effect = {"burn"},
  649. effectValue = 60,
  650. accuracy = 90,
  651. pp = 10
  652. },
  653.  
  654.  
  655. FireRing = {
  656. name = "FireRing",
  657. type = "Fire",
  658. doesDamage = true,
  659. attackForm = "spec",
  660. target = "opponent",
  661. power = 3,
  662. effect = {"burn"},
  663. effectValue = 60,
  664. accuracy = 95,
  665. pp = 10
  666. },
  667.  
  668.  
  669. FireStorm = {
  670. name = "FireStorm",
  671. type = "Fire",
  672. doesDamage = true,
  673. attackForm = "phys",
  674. target = "opponent",
  675. power = 3,
  676. effect = {"burn"},
  677. effectValue = 50,
  678. accuracy = 95,
  679. pp = 10
  680. },
  681.  
  682. Armageddon = {
  683. name = "Armageddon",
  684. type = "Fire",
  685. doesDamage = true,
  686. attackForm = "phys",
  687. target = "opponent",
  688. power = 8,
  689. effect = {"none"},
  690. effectValue = 0,
  691. accuracy = 50,
  692. pp = 5
  693. },
  694.  
  695. -- ############## Steel ###############
  696. Impenetrable = {
  697. name = "Impenetrable",
  698. type = "Steel",
  699. doesDamage = false,
  700. attackForm = "spec",
  701. target = "self",
  702. power = 0,
  703. effect = {"buffDefense"},
  704. effectValue = 25,
  705. accuracy = 100,
  706. pp = 5
  707. },
  708.  
  709. FlashCannon = {
  710. name = "FlashCannon",
  711. type = "Steel",
  712. doesDamage = false,
  713. attackForm = "spec",
  714. target = "opponent",
  715. power = 0,
  716. effect = {"debuffSpecDefense"},
  717. effectValue = 15,
  718. accuracy = 100,
  719. pp = 10
  720. },
  721.  
  722. SteelFist = {
  723. name = "SteelFist",
  724. type = "Steel",
  725. doesDamage = true,
  726. attackForm = "phys",
  727. target = "opponent",
  728. power = 3,
  729. effect = {"none"},
  730. effectValue = 0,
  731. accuracy = 85,
  732. },
  733.  
  734.  
  735. GyroBall = {
  736. name = "GyroBall",
  737. type = "Steel",
  738. doesDamage = true,
  739. attackForm = "spec",
  740. target = "opponent",
  741. power = 0, --(100 - player..playerTurn.speed) / 15,
  742. effect = {"none"},
  743. effectValue = 0,
  744. accuracy = 95,
  745. pp = 15
  746. },
  747.  
  748.  
  749.  
  750. -- ############## Electric ###############
  751. Shock = {
  752. name = "Shock",
  753. type = "Electric",
  754. doesDamage = true,
  755. attackForm = "spec",
  756. target = "opponent",
  757. power = 3,
  758. effect = {"paralyze"},
  759. effectValue = 60,
  760. accuracy = 100,
  761. pp = 15
  762. },
  763.  
  764. ElectroShock = {
  765. name = "ElectroShock",
  766. type = "Electric",
  767. doesDamage = true,
  768. attackForm = "spec",
  769. target = "opponent",
  770. power = 4,
  771. effect = {"paralyze"},
  772. effectValue = 50,
  773. accuracy = 100,
  774. pp = 5
  775. },
  776.  
  777. ChargeBeam = {
  778. name = "ChargeBeam",
  779. type = "Electric",
  780. doesDamage = false,
  781. attackForm = "spec",
  782. target = "self",
  783. power = 0,
  784. effect = {"buffSpecAttack"},
  785. effectValue = 15,
  786. accuracy = 100,
  787. pp = 5
  788. },
  789.  
  790. Discharge = {
  791. name = "Discharge",
  792. type = "Electric",
  793. doesDamage = false,
  794. attackForm = "spec",
  795. target = "opponent",
  796. power = 0,
  797. effect = {"paralyze"},
  798. effectValue = 100,
  799. accuracy = 100,
  800. pp = 5
  801. },
  802.  
  803. -- ############## Ice ###############
  804. IceFang = {
  805. name = "IceFang",
  806. type = "Ice",
  807. doesDamage = true,
  808. attackForm = "phys",
  809. target = "opponent",
  810. power = 3,
  811. effect = {"freeze"},
  812. effectValue = 50,
  813. accuracy = 95,
  814. pp = 5
  815. },
  816.  
  817. Freeze = {
  818. name = "Freeze",
  819. type = "Ice",
  820. doesDamage = false,
  821. attackForm = "spec",
  822. target = "opponent",
  823. power = 0,
  824. effect = {"freeze"},
  825. effectValue = 100,
  826. accuracy = 95,
  827. pp = 10
  828. },
  829.  
  830. Blizzard = {
  831. name = "Blizzard",
  832. type = "Ice",
  833. doesDamage = true,
  834. attackForm = "spec",
  835. target = "opponent",
  836. power = 2,
  837. effect = {"freeze", "buffSpecAttack"},
  838. effectValue = 15,
  839. accuracy = 100,
  840. pp = 10
  841. },
  842.  
  843. -- ############## Fighting ###############
  844. CosmicPunch = {
  845. name = "CosmicPunch",
  846. type = "Fighting",
  847. doesDamage = true,
  848. attackForm = "phys",
  849. target = "opponent",
  850. power = 5,
  851. effect = {"none"},
  852. effectValue = 0,
  853. accuracy = 75,
  854. pp = 10
  855. },
  856.  
  857. SuckerPunch = {
  858. name = "SuckerPunch",
  859. type = "Fighting",
  860. doesDamage = true,
  861. attackForm = "phys",
  862. target = "self",
  863. power = 2,
  864. effect = {"none"},
  865. effectValue = 0,
  866. accuracy = 100,
  867. pp = 10
  868. },
  869.  
  870. RoundhouseKick = {
  871. name = "RoundhouseKick",
  872. type = "Fighting",
  873. doesDamage = true,
  874. attackForm = "phys",
  875. target = "opponent",
  876. power = 3,
  877. effect = {"none"},
  878. effectValue = 0,
  879. accuracy = 100,
  880. pp = 10
  881. },
  882.  
  883. Flex = {
  884. name = "Flex",
  885. type = "Fighting",
  886. doesDamage = false,
  887. attackForm = "phys",
  888. target = "self",
  889. power = 0,
  890. effect = {"buffAttack"},
  891. effectValue = 15,
  892. accuracy = 100,
  893. pp = 10
  894. },
  895.  
  896. -- ############## Dragon ###############
  897. DracoMeteor = {
  898. name = "DracoMeteor",
  899. type = "Dragon",
  900. doesDamage = true,
  901. attackForm = "phys",
  902. target = "opponent",
  903. power = 3,
  904. effect = {"debuffSpecDefense"},
  905. effectValue = 10,
  906. accuracy = 100,
  907. pp = 10
  908. },
  909.  
  910. SpacialRend = {
  911. name = "SpacialRend",
  912. type = "Dragon",
  913. doesDamage = true,
  914. attackForm = "phys",
  915. target = "opponent",
  916. power = 3,
  917. effect = {"crit"},
  918. effectValue = 10,
  919. accuracy = 100,
  920. pp = 10
  921. },
  922.  
  923. DragonRage = {
  924. name = "DragonRage",
  925. type = "Dragon",
  926. doesDamage = true,
  927. attackForm = "spec",
  928. target = "opponent",
  929. power = 4,
  930. effect = {"flinch"},
  931. effectValue = 40,
  932. accuracy = 100,
  933. pp = 10
  934. },
  935.  
  936. -- ############## Flying ###############
  937. Fly = {
  938. name = "Fly",
  939. type = "Flying",
  940. doesDamage = true,
  941. attackForm = "spec",
  942. target = "opponent",
  943. power = 3,
  944. effect = {"none"},
  945. effectValue = 0,
  946. accuracy = 100,
  947. pp = 10
  948. },
  949.  
  950. AirSlash = {
  951. name = "AirSlash",
  952. type = "Flying",
  953. doesDamage = true,
  954. attackForm = "spec",
  955. target = "self",
  956. power = 3,
  957. effect = {"flinch"},
  958. effectValue = 40,
  959. accuracy = 100,
  960. pp = 10
  961. },
  962.  
  963. Peck = {
  964. name = "Peck",
  965. type = "Flying",
  966. doesDamage = true,
  967. attackForm = "phys",
  968. target = "opponent",
  969. power = 2,
  970. effect = {"none"},
  971. effectValue = 0,
  972. accuracy = 100,
  973. pp = 10
  974. },
  975.  
  976. WingAttack = {
  977. name = "WingAttack",
  978. type = "Flying",
  979. doesDamage = true,
  980. attackForm = "phys",
  981. target = "opponent",
  982. power = 3,
  983. effect = {"none"},
  984. effectValue = 0,
  985. accuracy = 100,
  986. pp = 10
  987. },
  988.  
  989. Hawkeye = {
  990. name = "Hawkeye",
  991. type = "Flying",
  992. doesDamage = false,
  993. attackForm = "spec",
  994. target = "self",
  995. power = 0,
  996. effect = {"buffAccuracy"},
  997. effectValue = 20,
  998. accuracy = 100,
  999. pp = 10
  1000. },
  1001.  
  1002. Roost = {
  1003. name = "Roost",
  1004. type = "Flying",
  1005. doesDamage = false,
  1006. attackForm = "spec",
  1007. target = "self",
  1008. power = 0,
  1009. effect = {"roost"},
  1010. effectValue = 0,
  1011. accuracy = 100,
  1012. pp = 10
  1013. }
  1014. }
  1015.  
  1016. local function writeFile()
  1017. handle = fs.open("moves", "w")
  1018. handle.write(textutils.serialize(moves))
  1019. handle.close()
  1020. end
  1021.  
  1022. writeFile()
  1023.  
  1024. selectedMove = "OminousWind"
  1025. print(moves[selectedMove]["effect"])
  1026. for k, moveEffect in ipairs(moves[selectedMove]["effect"]) do
  1027. print("effect: "..moveEffect)
  1028. end
  1029.  
  1030. os.pullEvent("key")
  1031. shell.run("clear")
  1032. moves = 0
  1033.  
  1034. loadMoves()
  1035. table.insert(moves, loadedFile)
  1036. for k, moveEffect in ipairs(moves[selectedMove]["effect"]) do
  1037. print(moves[selectedMove]["effect"])
  1038. print("effect: "..moveEffect)
  1039. end
  1040.  
  1041. os.pullEvent("key")
  1042. shell.run("clear")
  1043. loadMoves()
  1044. moves = loadedFile
  1045. for k, moveEffect in ipairs(moves[selectedMove]["effect"]) do
  1046. print(moves[selectedMove]["effect"])
  1047. print("effect: "..moveEffect)
  1048. end
RAW Paste Data