Advertisement
shad0wshayd3_

Pokemon Just Basic v0.2 Beta 2

Jan 9th, 2014
1,208
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mainwin 45 25 : dim pokedexuser(718)
  2. dim pkmn(718,32), pokemonname$(718) : ascflag = 1
  3. dim userpkmn(6,35), userpokemonname$(6), tempuserpkmn(1,35), tempuserpokemonname$(1)
  4. dim cpupkmn(6,35), cpupokemonname$(6), tempcpupkmn(1,35), tempcpupokemonname$(1)
  5. dim moveid(616,5), movename$(616), tempmoveid(1,5), tempmovename$(1)
  6. dim box(800,35), tempbox(1,35), item(50,2), itemname$(50)
  7. dim pokedexmaster(718), pokedexmasterdata$(718,6)
  8. a = mkdir("Pokemon Saves") : b = mkdir("Pokemon Auto Saves")
  9. global bmenuchoice, bopchoice, pkmnopchoice$, runawayval, laststat, ascflag, stat, move, pid, uet, cet, asc
  10. call setup : call movesetup
  11. input pid : call userpokemon1in
  12. call pkmnivrand : call cpupokemon1in
  13. call setupdex
  14.  
  15. [main_menu]
  16. if ascflag = 1 then
  17.   asc = time$("ms")
  18.   ascflag = 0
  19. end if
  20. call timecheck
  21. cls : print "| Pokemon Just Basic v0.2 |"
  22. print "1) Random Battle"
  23. print "2) Trainer Battle"
  24. print "3) My Pokemon"
  25. print "4) Someone's PC"
  26. print "5) PokeShop"
  27. print "6) PokeDex"
  28. print "7) Save/Load"
  29. print "8) Quit"
  30. input "Do Which? ";answer
  31. select case answer
  32.   case 1 : goto [randombattle]
  33.   case 2 : goto [setupbattle]
  34.   case 3 : goto [mypokemon]
  35.   case 4 : goto [pc]
  36.   case 5 : goto [shop]
  37.   case 6 : goto [dex]
  38.   case 7 : goto [save]
  39.   case 8 : goto [quit]
  40.   case else : goto [main_menu]
  41. end select
  42.  
  43. [randombattle]
  44. pid = rnd(int(1)*718)+1
  45. cpupokemoncount = 1
  46. call cpupokemon1in
  47. goto [main]
  48.  
  49. [setupbattle]
  50. input "What is the id of the Pokemon you'd like to fight? ";pid
  51. cpupokemoncount = 1
  52. call cpupokemon1in
  53. input "Fight another? (y/n) ";ans$
  54. select case lower$(ans$)
  55.   case "y"
  56.     input "What is the id of the Pokemon you'd like to fight? ";pid
  57.     cpupokemoncount = 2
  58.     call cpupokemon2in
  59.   case "n"
  60.     goto [main]
  61.   case else
  62.   goto [setupbattle]
  63. end select
  64. input "Fight another? (y/n) ";ans$
  65. select case lower$(ans$)
  66.   case "y"
  67.     input "What is the id of the Pokemon you'd like to fight? ";pid
  68.     cpupokemoncount = 3
  69.     call cpupokemon3in
  70.   case "n"
  71.     goto [main]
  72.   case else
  73.   goto [setupbattle]
  74. end select
  75. input "Fight another? (y/n) ";ans$
  76. select case lower$(ans$)
  77.   case "y"
  78.     input "What is the id of the Pokemon you'd like to fight? ";pid
  79.     cpupokemoncount = 4
  80.     call cpupokemon4in
  81.   case "n"
  82.     goto [main]
  83.   case else
  84.   goto [setupbattle]
  85. end select
  86. input "Fight another? (y/n) ";ans$
  87. select case lower$(ans$)
  88.   case "y"
  89.     input "What is the id of the Pokemon you'd like to fight? ";pid
  90.     cpupokemoncount = 5
  91.     call cpupokemon5in
  92.   case "n"
  93.     goto [main]
  94.   case else
  95.   goto [setupbattle]
  96. end select
  97. input "Fight another? (y/n) ";ans$
  98. select case lower$(ans$)
  99.   case "y"
  100.     input "What is the id of the Pokemon you'd like to fight? ";pid
  101.     cpupokemoncount = 6
  102.     call cpupokemon6in
  103.   case "n"
  104.     goto [main]
  105.   case else
  106.   goto [setupbattle]
  107. end select
  108. goto [main]
  109.  
  110. [mypokemon]
  111. cls : call mainborder
  112. call pkmn1stat
  113. select case stat
  114.   case 1 : call pkmn1stat
  115.   case 2 : call pkmn2stat
  116.   case 3 : call pkmn3stat
  117.   case 4 : call pkmn4stat
  118.   case 5 : call pkmn5stat
  119.   case 6 : call pkmn6stat
  120.   case else : goto [main_menu]
  121. end select
  122. goto [mypokemon]
  123.  
  124. [pc]
  125. cls : print "|Box Menu|"
  126. print "1) Withdraw Pokemon"
  127. print "2) Deposit Pokemon"
  128. print "3) Move Pokemon"
  129. print "4) Go Back"
  130. input "Do Which? ";answer
  131. select case answer
  132.   case 1 : call withdraw
  133.   case 2 : call deposit
  134.   case 3 : call movepkmn
  135.   case 4 : goto [main_menu]
  136.   case else : goto [pc]
  137. end select
  138. goto [pc]
  139.  
  140. [shop]
  141. cls : print "|Shop Menu|"
  142. print "1) Buy"
  143. print "2) Sell"
  144. print "3) Back"
  145. input "Do Which? ";answer
  146. select case answer
  147.   case 1 : call buyitem
  148.   case 2 : call sellitem
  149.   case 3 : goto [main_menu]
  150.   case else : goto [shop]
  151. end select
  152. goto [shop]
  153.  
  154. [dex]
  155. print "Not yet implamented"
  156. input "[Press Enter]";dummy$
  157. goto [main_menu]
  158.  
  159. [save]
  160. print "Not yet implamented"
  161. input "[Press Enter]";dummy$
  162. goto [main_menu]
  163.  
  164. [quit]
  165. print "Press ALT-F4 to close the window."
  166. end
  167.  
  168. [main]
  169. cpufirst = 0 : userfirst = 0
  170. cls : call mainborder
  171. call boxtext
  172. call battlemenuoptions
  173. select case bmenuchoice
  174.   case 1 : goto [menu_battle]
  175.   case 2 : goto [menu_bag]
  176.   case 3 : goto [menu_pokemon]
  177.   case 4 : goto [menu_runaway]
  178.   case else : goto [main]
  179. end select
  180. goto [main]
  181.  
  182. [menu_battle]
  183. cls : call mainborder
  184. call boxtext
  185. call battleoptions
  186. select case bopchoice
  187.   case 1 : goto [move_1]
  188.   case 2 : goto [move_2]
  189.   case 3 : goto [move_3]
  190.   case 4 : goto [move_4]
  191.   case else : goto [main]
  192. end select
  193. goto [main]
  194.  
  195. [menu_bag]
  196. cls : call mainborder
  197. call baginterface
  198. goto [main]
  199.  
  200. [menu_pokemon]
  201. if stat = 7 then
  202.   stat = 1
  203.   select case laststat
  204.     case 2 : call twoforone
  205.     case 3 : call threeforone
  206.     case 4 : call fourforone
  207.     case 5 : call fiveforone
  208.     case 6 : call sixforone
  209.  end select
  210. end if
  211. cls : call mainborder
  212. call pkmnselect
  213. select case pkmnopchoice$
  214.   case "1" : goto [main]
  215.   case "2" : call twoforone
  216.   case "3" : call threeforone
  217.   case "4" : call fourforone
  218.   case "5" : call fiveforone
  219.   case "6" : call sixforone
  220.   case "s" : goto [stats]
  221.   case "S" : goto [stats]
  222.   case else : goto [main]
  223. end select
  224. goto [main]
  225.  
  226. [menu_runaway]
  227. cls : call mainborder
  228. call boxtext
  229. call runaway
  230. if runawayval = 1 then goto [main_menu]
  231. goto [main]
  232.  
  233. [stats]
  234. call pkmnstats
  235. select case stat
  236.   case 2 : call twoforone
  237.   case 3 : call threeforone
  238.   case 4 : call fourforone
  239.   case 5 : call fiveforone
  240.   case 6 : call sixforone
  241.   case 7 : goto [menu_pokemon]
  242.   case else
  243. end select
  244. goto [stats]
  245.  
  246. '------------------------------------------------------------------
  247. '------------------------ Battle Mechanics ------------------------
  248. '------------------------------------------------------------------
  249.  
  250.  
  251. [miss]
  252. cls : call mainborder
  253. call boxtext
  254. call screenupdate
  255. locate 4, 17 : print userpokemonname$(1);"'s attack missed!"
  256. locate 4, 18 : input "[Press Enter]";dummy$
  257. userfirst = 1
  258. turn = turn + 1
  259. goto [check]
  260.  
  261. [move_1]
  262. cls : call mainborder : move = 1
  263. select case moveid(userpkmn(1,16),3)
  264.   case 1 : call normaleffectiveuserattack
  265.   case 2 : call fightingeffectiveuserattack
  266.   case 3 : call flyingeffectiveuserattack
  267.   case 4 : call poisoneffectiveuserattack
  268.   case 5 : call groundeffectiveuserattack
  269.   case 6 : call rockeffectiveuserattack
  270.   case 7 : call bugeffectiveuserattack
  271.   case 8 : call ghosteffectiveuserattack
  272.   case 9 : call steeleffectiveuserattack
  273.   case 10 : call fireeffectiveuserattack
  274.   case 11 : call watereffectiveuserattack
  275.   case 12 : call grasseffectiveuserattack
  276.   case 13 : call electriceffectiveuserattack
  277.   case 14 : call psychiceffectiveuserattack
  278.   case 15 : call iceeffectiveuserattack
  279.   case 16 : call dragoneffectiveuserattack
  280.   case 17 : call darkeffectiveuserattack
  281.   case 18 : call fairyeffectiveuserattack
  282. end select
  283.  
  284. p = moveid(userpkmn(1,16),5) * (userpkmn(1,14)/userpkmn(1,15))
  285. if p >= 0.41 then goto [clause1]
  286. if p <= 0.4 then goto [miss]
  287.  
  288. [clause1]
  289. z = int(rnd(1)*255)+1
  290. if z < 217 then goto [clause1]
  291. if uet > 2 then y = 40
  292. if uet = 1 then y = 20
  293. if uet = 0 then y = 10
  294. if uet = -1 then y = 5
  295. if uet <= -2 then y = 2.5
  296. turn = turn + 1
  297. if turn > 2 then goto [main]
  298. c = moveid(userpkmn(1,16), 1)
  299. if moveid(userpkmn(1,16), 4) = 1 then
  300.   b = userpkmn(1,2) : d = cpupkmn(1,3)
  301. end if
  302. if moveid(userpkmn(1,16), 4) = 2 then
  303.   b = userpkmn(1,4) : d = cpupkmn(1,5)
  304. end if
  305. if moveid(userpkmn(1,16), 3) = userpkmn(1, 21) or moveid(userpkmn(1,16), 3) = userpkmn(1, 20) then
  306.   x = 1.5 : a = userpkmn(1,7)
  307. else
  308.   x = 1 : a = userpkmn(1,7)
  309. end if
  310. crit = int(rnd(1)*100)+1
  311. if crit = 1 then
  312.   crit = 1.5
  313. else
  314.   crit = 1
  315. end if
  316. hpdamage = int((((((((((2*a)/5+2)*b*c)/d)/50)+2)*x)*y/10)*z)/255)*crit
  317. goto [cpumovedecide]
  318.  
  319. [move_2]
  320. cls : call mainborder : move = 2
  321. select case moveid(userpkmn(1,17),3)
  322.   case 1 : call normaleffectiveuserattack
  323.   case 2 : call fightingeffectiveuserattack
  324.   case 3 : call flyingeffectiveuserattack
  325.   case 4 : call poisoneffectiveuserattack
  326.   case 5 : call groundeffectiveuserattack
  327.   case 6 : call rockeffectiveuserattack
  328.   case 7 : call bugeffectiveuserattack
  329.   case 8 : call ghosteffectiveuserattack
  330.   case 9 : call steeleffectiveuserattack
  331.   case 10 : call fireeffectiveuserattack
  332.   case 11 : call watereffectiveuserattack
  333.   case 12 : call grasseffectiveuserattack
  334.   case 13 : call electriceffectiveuserattack
  335.   case 14 : call psychiceffectiveuserattack
  336.   case 15 : call iceeffectiveuserattack
  337.   case 16 : call dragoneffectiveuserattack
  338.   case 17 : call darkeffectiveuserattack
  339.   case 18 : call fairyeffectiveuserattack
  340. end select
  341.  
  342. p = moveid(userpkmn(1,17),5) * (userpkmn(1,14)/userpkmn(1,15))
  343. if p >= 0.41 then goto [clause2]
  344. if p <= 0.4 then goto [miss]
  345.  
  346. [clause2]
  347. z = int(rnd(1)*255)+1
  348. if z < 217 then goto [clause2]
  349. if uet >= 2 then y = 40
  350. if uet = 1 then y = 20
  351. if uet = 0 then y = 10
  352. if uet = -1 then y = 5
  353. if uet <= -2 then y = 2.5
  354. turn = turn + 1
  355. if turn > 2 then goto [main]
  356. c = moveid(userpkmn(1,17), 1)
  357. if moveid(userpkmn(1,17), 4) = 1 then
  358.   b = userpkmn(1,2) : d = cpupkmn(1,3)
  359. end if
  360. if moveid(userpkmn(1,17), 4) = 2 then
  361.   b = userpkmn(1,4) : d = cpupkmn(1,5)
  362. end if
  363. if moveid(userpkmn(1,17), 3) = userpkmn(1, 21) or moveid(userpkmn(1,17), 3) = userpkmn(1, 20) then
  364.   x = 1.5 : a = userpkmn(1,7)
  365. else
  366.   x = 1 : a = userpkmn(1,7)
  367. end if
  368. crit = int(rnd(1)*100)+1
  369. if crit = 1 then
  370.   crit = 1.5
  371. else
  372.   crit = 1
  373. end if
  374. hpdamage = int((((((((((2*a)/5+2)*b*c)/d)/50)+2)*x)*y/10)*z)/255)*crit
  375. goto [cpumovedecide]
  376.  
  377. [move_3]
  378. cls : call mainborder : move = 3
  379. select case moveid(userpkmn(1,18),3)
  380.   case 1 : call normaleffectiveuserattack
  381.   case 2 : call fightingeffectiveuserattack
  382.   case 3 : call flyingeffectiveuserattack
  383.   case 4 : call poisoneffectiveuserattack
  384.   case 5 : call groundeffectiveuserattack
  385.   case 6 : call rockeffectiveuserattack
  386.   case 7 : call bugeffectiveuserattack
  387.   case 8 : call ghosteffectiveuserattack
  388.   case 9 : call steeleffectiveuserattack
  389.   case 10 : call fireeffectiveuserattack
  390.   case 11 : call watereffectiveuserattack
  391.   case 12 : call grasseffectiveuserattack
  392.   case 13 : call electriceffectiveuserattack
  393.   case 14 : call psychiceffectiveuserattack
  394.   case 15 : call iceeffectiveuserattack
  395.   case 16 : call dragoneffectiveuserattack
  396.   case 17 : call darkeffectiveuserattack
  397.   case 18 : call fairyeffectiveuserattack
  398. end select
  399.  
  400. p = moveid(userpkmn(1,18),5) * (userpkmn(1,14)/userpkmn(1,15))
  401. if p >= 0.41 then goto [clause3]
  402. if p <= 0.4 then goto [miss]
  403.  
  404. [clause3]
  405. z = int(rnd(1)*255)+1
  406. if z < 217 then goto [clause3]
  407. if uet > 2 then y = 40
  408. if uet = 1 then y = 20
  409. if uet = 0 then y = 10
  410. if uet = -1 then y = 5
  411. if uet <= -2 then y = 2.5
  412. turn = turn + 1
  413. if turn > 2 then goto [main]
  414. c = moveid(userpkmn(1,18), 1)
  415. if moveid(userpkmn(1,18), 4) = 1 then
  416.   b = userpkmn(1,2) : d = cpupkmn(1,3)
  417. end if
  418. if moveid(userpkmn(1,17), 4) = 2 then
  419.   b = userpkmn(1,4) : d = cpupkmn(1,5)
  420. end if
  421. if moveid(userpkmn(1,18), 3) = userpkmn(1, 21) or moveid(userpkmn(1,18), 3) = userpkmn(1, 20) then
  422.   x = 1.5 : a = userpkmn(1,7)
  423. else
  424.   x = 1 : a = userpkmn(1,7)
  425. end if
  426. crit = int(rnd(1)*100)+1
  427. if crit = 1 then
  428.   crit = 1.5
  429. else
  430.   crit = 1
  431. end if
  432. hpdamage = int((((((((((2*a)/5+2)*b*c)/d)/50)+2)*x)*y/10)*z)/255)*crit
  433. goto [cpumovedecide]
  434.  
  435. [move_4]
  436. cls : call mainborder : move = 4
  437. select case moveid(userpkmn(1,19),3)
  438.   case 1 : call normaleffectiveuserattack
  439.   case 2 : call fightingeffectiveuserattack
  440.   case 3 : call flyingeffectiveuserattack
  441.   case 4 : call poisoneffectiveuserattack
  442.   case 5 : call groundeffectiveuserattack
  443.   case 6 : call rockeffectiveuserattack
  444.   case 7 : call bugeffectiveuserattack
  445.   case 8 : call ghosteffectiveuserattack
  446.   case 9 : call steeleffectiveuserattack
  447.   case 10 : call fireeffectiveuserattack
  448.   case 11 : call watereffectiveuserattack
  449.   case 12 : call grasseffectiveuserattack
  450.   case 13 : call electriceffectiveuserattack
  451.   case 14 : call psychiceffectiveuserattack
  452.   case 15 : call iceeffectiveuserattack
  453.   case 16 : call dragoneffectiveuserattack
  454.   case 17 : call darkeffectiveuserattack
  455.   case 18 : call fairyeffectiveuserattack
  456. end select
  457.  
  458. p = moveid(userpkmn(1,19),5) * (userpkmn(1,14)/userpkmn(1,15))
  459. if p >= 0.41 then goto [clause4]
  460. if p <= 0.4 then goto [miss]
  461.  
  462. [clause4]
  463. z = int(rnd(1)*255)+1
  464. if z < 217 then goto [clause4]
  465. if uet > 2 then y = 40
  466. if uet = 1 then y = 20
  467. if uet = 0 then y = 10
  468. if uet = -1 then y = 5
  469. if uet <= -2 then y = 2.5
  470. turn = turn + 1
  471. if turn > 2 then goto [main]
  472. c = moveid(userpkmn(1,19), 1)
  473. if moveid(userpkmn(1,19), 4) = 1 then
  474.   b = userpkmn(1,2) : d = cpupkmn(1,3)
  475. end if
  476. if moveid(userpkmn(1,17), 4) = 2 then
  477.   b = userpkmn(1,4) : d = cpupkmn(1,5)
  478. end if
  479. if moveid(userpkmn(1,19), 3) = userpkmn(1, 21) or moveid(userpkmn(1,19), 3) = userpkmn(1, 20) then
  480.   x = 1.5 : a = userpkmn(1,7)
  481. else
  482.   x = 1 : a = userpkmn(1,7)
  483. end if
  484. crit = int(rnd(1)*100)+1
  485. if crit = 1 then
  486.   crit = 1.5
  487. else
  488.   crit = 1
  489. end if
  490. hpdamage = int((((((((((2*a)/5+2)*b*c)/d)/50)+2)*x)*y/10)*z)/255)*crit
  491. goto [cpumovedecide]
  492.  
  493. [cpu_miss]
  494. cls : call mainborder
  495. call boxtext
  496. call screenupdate
  497. locate 4, 17 : print cpupokemonname$(1);"'s attack missed!"
  498. locate 4, 18 : input "V";dummy$
  499. cpufirst = 1
  500. turn = turn + 1
  501. goto [check]
  502.  
  503. [cpumovedecide]
  504. turn = turn + 1
  505. if turn > 2 then goto [main]
  506. cpumove = int(rnd(1)*4)+1
  507. select case cpumove
  508.   case 1 : goto [cpu_move_1]
  509.   case 2 : goto [cpu_move_2]
  510.   case 3 : goto [cpu_move_3]
  511.   case 4 : goto [cpu_move_4]
  512. end select
  513.  
  514. [cpu_move_1]
  515. cls : call mainborder : cpmove = 1
  516. select case moveid(cpupkmn(1,16),3)
  517.   case 1 : call normaleffectivecpuattack
  518.   case 2 : call fightingeffectivecpuattack
  519.   case 3 : call flyingeffectivecpuattack
  520.   case 4 : call poisoneffectivecpuattack
  521.   case 5 : call groundeffectivecpuattack
  522.   case 6 : call rockeffectivecpuattack
  523.   case 7 : call bugeffectivecpuattack
  524.   case 8 : call ghosteffectivecpuattack
  525.   case 9 : call steeleffectivecpuattack
  526.   case 10 : call fireeffectivecpuattack
  527.   case 11 : call watereffectivecpuattack
  528.   case 12 : call grasseffectivecpuattack
  529.   case 13 : call electriceffectivecpuattack
  530.   case 14 : call psychiceffectivecpuattack
  531.   case 15 : call iceeffectivecpuattack
  532.   case 16 : call dragoneffectivecpuattack
  533.   case 17 : call darkeffectivecpuattack
  534.   case 18 : call fairyeffectivecpuattack
  535. end select
  536.  
  537. p = moveid(cpupkmn(1,16),5) * (cpupkmn(1,14)/cpupkmn(1,15))
  538. if p >= 0.41 then goto [cpu_clause1]
  539. if p <= 0.4 then goto [cpu_miss]
  540.  
  541. [cpu_clause1]
  542. z = int(rnd(1)*255)+1
  543. if z < 217 then goto [cpu_clause1]
  544. if cet >= 2 then y = 40
  545. if cet = 1 then y = 20
  546. if cet = 0 then y = 10
  547. if cet = -1 then y = 5
  548. if cet <= -2 then y = 2.5
  549. turn = turn + 1
  550. if turn > 2 then goto [main]
  551. c = moveid(cpupkmn(1,16), 1)
  552. if moveid(cpupkmn(1,16), 4) = 1 then
  553.   b = cpupkmn(1,2) : d = userpkmn(1,3)
  554. end if
  555. if moveid(cpupkmn(1,16), 4) = 2 then
  556.   b = cpupkmn(1,4) : d = userpkmn(1,5)
  557. end if
  558. if moveid(cpupkmn(1,16), 3) = cpupkmn(1, 21) or moveid(cpupkmn(1,16), 3) = cpupkmn(1, 20) then
  559.   x = 1.5 : a = cpupkmn(1,7)
  560. else
  561.   x = 1 : a = cpupkmn(1,7)
  562. end if
  563. crit = int(rnd(1)*100)+1
  564. if crit = 1 then
  565.   crit = 1.5
  566. else
  567.   crit = 1
  568. end if
  569. cphpdamage = int((((((((((2*a)/5+2)*b*c)/d)/50)+2)*x)*y/10)*z)/255)*crit
  570. goto [check]
  571.  
  572. [cpu_move_2]
  573. cls : call mainborder : cpmove = 2
  574. select case moveid(cpupkmn(1,17),3)
  575.   case 1 : call normaleffectivecpuattack
  576.   case 2 : call fightingeffectivecpuattack
  577.   case 3 : call flyingeffectivecpuattack
  578.   case 4 : call poisoneffectivecpuattack
  579.   case 5 : call groundeffectivecpuattack
  580.   case 6 : call rockeffectivecpuattack
  581.   case 7 : call bugeffectivecpuattack
  582.   case 8 : call ghosteffectivecpuattack
  583.   case 9 : call steeleffectivecpuattack
  584.   case 10 : call fireeffectivecpuattack
  585.   case 11 : call watereffectivecpuattack
  586.   case 12 : call grasseffectivecpuattack
  587.   case 13 : call electriceffectivecpuattack
  588.   case 14 : call psychiceffectivecpuattack
  589.   case 15 : call iceeffectivecpuattack
  590.   case 16 : call dragoneffectivecpuattack
  591.   case 17 : call darkeffectivecpuattack
  592.   case 18 : call fairyeffectivecpuattack
  593. end select
  594.  
  595. p = moveid(cpupkmn(1,17),5) * (cpupkmn(1,14)/cpupkmn(1,15))
  596. if p >= 0.41 then goto [cpu_clause2]
  597. if p <= 0.4 then goto [cpu_miss]
  598.  
  599. [cpu_clause2]
  600. z = int(rnd(1)*255)+1
  601. if z < 217 then goto [cpu_clause2]
  602. if cet >= 2 then y = 40
  603. if cet = 1 then y = 20
  604. if cet = 0 then y = 10
  605. if cet = -1 then y = 5
  606. if cet <= -2 then y = 2.5
  607. turn = turn + 1
  608. if turn > 2 then goto [main]
  609. c = moveid(cpupkmn(1,17), 1)
  610. if moveid(cpupkmn(1,17), 4) = 1 then
  611.   b = cpupkmn(1,2) : d = userpkmn(1,3)
  612. end if
  613. if moveid(cpupkmn(1,17), 4) = 2 then
  614.   b = cpupkmn(1,4) : d = userpkmn(1,5)
  615. end if
  616. if moveid(cpupkmn(1,17), 3) = cpupkmn(1, 21) or moveid(cpupkmn(1,17), 3) = cpupkmn(1, 20) then
  617.   x = 1.5 : a = cpupkmn(1,7)
  618. else
  619.   x = 1 : a = cpupkmn(1,7)
  620. end if
  621. crit = int(rnd(1)*100)+1
  622. if crit = 1 then
  623.   crit = 1.5
  624. else
  625.   crit = 1
  626. end if
  627. cphpdamage = int((((((((((2*a)/5+2)*b*c)/d)/50)+2)*x)*y/10)*z)/255)*crit
  628. goto [check]
  629.  
  630. [cpu_move_3]
  631. cls : call mainborder : cpmove = 3
  632. select case moveid(cpupkmn(1,18),3)
  633.   case 1 : call normaleffectivecpuattack
  634.   case 2 : call fightingeffectivecpuattack
  635.   case 3 : call flyingeffectivecpuattack
  636.   case 4 : call poisoneffectivecpuattack
  637.   case 5 : call groundeffectivecpuattack
  638.   case 6 : call rockeffectivecpuattack
  639.   case 7 : call bugeffectivecpuattack
  640.   case 8 : call ghosteffectivecpuattack
  641.   case 9 : call steeleffectivecpuattack
  642.   case 10 : call fireeffectivecpuattack
  643.   case 11 : call watereffectivecpuattack
  644.   case 12 : call grasseffectivecpuattack
  645.   case 13 : call electriceffectivecpuattack
  646.   case 14 : call psychiceffectivecpuattack
  647.   case 15 : call iceeffectivecpuattack
  648.   case 16 : call dragoneffectivecpuattack
  649.   case 17 : call darkeffectivecpuattack
  650.   case 18 : call fairyeffectivecpuattack
  651. end select
  652.  
  653. p = moveid(cpupkmn(1,18),5) * (cpupkmn(1,14)/cpupkmn(1,15))
  654. if p >= 0.41 then goto [cpu_clause3]
  655. if p <= 0.4 then goto [cpu_miss]
  656.  
  657. [cpu_clause3]
  658. z = int(rnd(1)*255)+1
  659. if z < 217 then goto [cpu_clause3]
  660. if cet > 2 then y = 40
  661. if cet = 1 then y = 20
  662. if cet = 0 then y = 10
  663. if cet = -1 then y = 5
  664. if cet <= -2 then y = 2.5
  665. turn = turn + 1
  666. if turn > 2 then goto [main]
  667. c = moveid(cpupkmn(1,18), 1)
  668. if moveid(cpupkmn(1,18), 4) = 1 then
  669.   b = cpupkmn(1,2) : d = userpkmn(1,3)
  670. end if
  671. if moveid(cpupkmn(1,18), 4) = 2 then
  672.   b = cpupkmn(1,4) : d = userpkmn(1,5)
  673. end if
  674. if moveid(cpupkmn(1,18), 3) = cpupkmn(1, 21) or moveid(cpupkmn(1,18), 3) = cpupkmn(1, 20) then
  675.   x = 1.5 : a = cpupkmn(1,7)
  676. else
  677.   x = 1 : a = cpupkmn(1,7)
  678. end if
  679. crit = int(rnd(1)*100)+1
  680. if crit = 1 then
  681.   crit = 1.5
  682. else
  683.   crit = 1
  684. end if
  685. cphpdamage = int((((((((((2*a)/5+2)*b*c)/d)/50)+2)*x)*y/10)*z)/255)*crit
  686. goto [check]
  687.  
  688. [cpu_move_4]
  689. cls : call mainborder : cpmove = 4
  690. select case moveid(cpupkmn(1,19),3)
  691.   case 1 : call normaleffectivecpuattack
  692.   case 2 : call fightingeffectivecpuattack
  693.   case 3 : call flyingeffectivecpuattack
  694.   case 4 : call poisoneffectivecpuattack
  695.   case 5 : call groundeffectivecpuattack
  696.   case 6 : call rockeffectivecpuattack
  697.   case 7 : call bugeffectivecpuattack
  698.   case 8 : call ghosteffectivecpuattack
  699.   case 9 : call steeleffectivecpuattack
  700.   case 10 : call fireeffectivecpuattack
  701.   case 11 : call watereffectivecpuattack
  702.   case 12 : call grasseffectivecpuattack
  703.   case 13 : call electriceffectivecpuattack
  704.   case 14 : call psychiceffectivecpuattack
  705.   case 15 : call iceeffectivecpuattack
  706.   case 16 : call dragoneffectivecpuattack
  707.   case 17 : call darkeffectivecpuattack
  708.   case 18 : call fairyeffectivecpuattack
  709. end select
  710.  
  711. p = moveid(cpupkmn(1,19),5) * (cpupkmn(1,14)/cpupkmn(1,15))
  712. if p >= 0.41 then goto [cpu_clause4]
  713. if p <= 0.4 then goto [cpu_miss]
  714.  
  715. [cpu_clause4]
  716. z = int(rnd(1)*255)+1
  717. if z < 217 then goto [cpu_clause4]
  718. if cet > 2 then y = 40
  719. if cet = 1 then y = 20
  720. if cet = 0 then y = 10
  721. if cet = -1 then y = 5
  722. if cet <= -2 then y = 2.5
  723. turn = turn + 1
  724. if turn > 2 then goto [main]
  725. c = moveid(cpupkmn(1,19), 1)
  726. if moveid(cpupkmn(1,19), 4) = 1 then
  727.   b = cpupkmn(1,2) : d = userpkmn(1,3)
  728. end if
  729. if moveid(cpupkmn(1,19), 4) = 2 then
  730.   b = cpupkmn(1,4) : d = userpkmn(1,5)
  731. end if
  732. if moveid(cpupkmn(1,19), 3) = cpupkmn(1, 21) or moveid(cpupkmn(1,19), 3) = cpupkmn(1, 20) then
  733.   x = 1.5 : a = cpupkmn(1,7)
  734. else
  735.   x = 1 : a = cpupkmn(1,7)
  736. end if
  737. crit = int(rnd(1)*100)+1
  738. if crit = 1 then
  739.   crit = 1.5
  740. else
  741.   crit = 1
  742. end if
  743. cphpdamage = int((((((((((2*a)/5+2)*b*c)/d)/50)+2)*x)*y/10)*z)/255)*crit
  744. goto [check]
  745.  
  746. '-----------------------------------------------------------------------------------
  747.  
  748. [check]
  749. if userfirst = 1 then goto [cpubattleprint]
  750. if cpufirst = 1 then goto [userbattleprint]
  751. if userpkmn(1,6) > cpupkmn(1,6) then
  752.   userfirst = 1
  753.   goto [userbattleprint]
  754. end if
  755. cpufirst = 1
  756. goto [cpubattleprint]
  757.  
  758. '-------------------------------------------------------------------------------
  759.  
  760. [cpubattleprint]
  761. userpkmn(1,1) = userpkmn(1,1)-cphpdamage
  762. call screenupdate
  763. locate 4, 17 : print cpupokemonname$(1);" used ";movename$(cpupkmn(1,16));"!"
  764. locate 4, 18 : input "[Press Enter]";dummy$
  765. cls:call mainborder:call boxtext:call screenupdate
  766. if crit <> 1 then
  767.   locate 4, 17 : print "Critital Hit!"
  768.   locate 4, 18 : input "[Press Enter]";dummy$
  769. end if
  770. cls:call mainborder:call boxtext:call screenupdate
  771. if cet >= 1 then
  772.   locate 4, 17 : print "It's super effective!"
  773.   locate 4, 18 : input "[Press Enter]";dummy$
  774. end if
  775. cls:call mainborder:call boxtext:call screenupdate
  776. if cet <= -1 then
  777.   locate 4, 17 : print "It's not very effective..."
  778.   locate 4, 18 : input "[Press Enter]";dummy$
  779. end if
  780. cls:call mainborder:call boxtext:call screenupdate
  781. if userfirst = 1 then goto [main]
  782. goto [check]
  783.  
  784. [userbattleprint]
  785. cpupkmn(1,1) = cpupkmn(1,1)-hpdamage
  786. call screenupdate
  787. locate 4, 17 : print userpokemonname$(1);" used ";movename$(userpkmn(1,19));"!"
  788. locate 4, 18 : input "[Press Enter]";dummy$
  789. cls:call mainborder:call boxtext:call screenupdate
  790. if crit <> 1 then
  791.   locate 4, 17 : print "Critital Hit!"
  792.   locate 4, 18 : input "[Press Enter]";dummy$
  793. end if
  794. cls:call mainborder:call boxtext:call screenupdate
  795. if uet >= 1 then
  796.   locate 4, 17 : print "It's super effective!"
  797.   locate 4, 18 : input "[Press Enter]";dummy$
  798. end if
  799. cls:call mainborder:call boxtext:call screenupdate
  800. if uet <= -1 then
  801.   locate 4, 17 : print "It's not very effective..."
  802.   locate 4, 18 : input "[Press Enter]";dummy$
  803. end if
  804. cls:call mainborder:call boxtext:call screenupdate
  805. if cpufirst = 1 then goto [main]
  806. goto [check]
  807.  
  808.  
  809.  
  810.  
  811.  
  812. '-------------------------------------------------------------------------------------------------------
  813.  
  814. end
  815.  
  816. '-------------------------------------------------------------------------------------------------------
  817.  
  818. function healthcalc(pid)
  819. healthcalc = int(((((pkmn(pid,14)+(2*pkmn(pid,1))+(pkmn(pid,23)/4)+100)*pkmn(pid,7))/100)+10)-0.5)
  820. end function
  821.  
  822. function attackcalc(pid)
  823. NAT = 1
  824. attackcalc = int((((((pkmn(pid,15)+(2*pkmn(pid,2))+(pkmn(pid,24)/4))*pkmn(pid,7))/100)+5)*NAT)-0.5)
  825. end function
  826.  
  827. function defensecalc(pid)
  828. NAT = 1
  829. defensecalc = int((((((pkmn(pid,16)+(2*pkmn(pid,3))+(pkmn(pid,25)/4))*pkmn(pid,7))/100)+5)*NAT)-0.5)
  830. end function
  831.  
  832. function specialattackcalc(pid)
  833. NAT = 1
  834. specialattackcalc = int((((((pkmn(pid,17)+(2*pkmn(pid,4))+(pkmn(pid,26)/4))*pkmn(pid,7))/100)+5)*NAT)-0.5)
  835. end function
  836.  
  837. function specialdefensecalc(pid)
  838. NAT = 1
  839. specialdefensecalc = int((((((pkmn(pid,18)+(2*pkmn(pid,5))+(pkmn(pid,27)/4))*pkmn(pid,7))/100)+5)*NAT)-0.5)
  840. end function
  841.  
  842. function speedcalc(pid)
  843. NAT = 1
  844. speedcalc = int((((((pkmn(pid,19)+(2*pkmn(pid,6))+(pkmn(pid,28)/4))*pkmn(pid,7))/100)+5)*NAT)-0.5)
  845. end function
  846.  
  847. function hpdam(a, b, c, d, x, y, z)
  848. hpdam = int((((((((((2*a)/5+2)*b*c)/d)/50)+2)*x)*y/10)*z)/255)
  849. end function
  850. '------------------------------------------------------------------------------------------------------
  851.  
  852. sub timecheck
  853.   tpt = time$("ms")
  854.   t = (tpt - asc)/1000
  855.   if t >= 600 then
  856.     print "Autosaving..."
  857.     ascflag = 1
  858.     call autosave
  859.   end if
  860. end sub
  861.  
  862. sub savegame
  863. print "Saving..."
  864. open "Pokemon Saves/pkmnsavgame.dat" for output as #1
  865. for i = 1 to 29028
  866.   if i < 211 then goto [pkmnsave]
  867.   if i < 28211 then goto [boxsave]
  868.   if i < 28311 then goto [itemsave]
  869.   goto [pokedexsave]
  870.  
  871. [pkmnsave]
  872.   if count = 35 then
  873.     count = 0
  874.     pid = pid + 1
  875.   end if
  876.   if i > 209 then
  877.     dum = 0
  878.   end if
  879.   count = count + 1
  880.   tval = userpkmn(pid, count)
  881.   print #1, tval
  882.   goto [endfor]
  883.  
  884. [boxsave]
  885.   if count = 35 then
  886.     count = 0
  887.     bid = bid + 1
  888.   end if
  889.   count = count + 1
  890.   tval = box(bid, count)
  891.   print #1, tval
  892.   goto [endfor]
  893.  
  894. [itemsave]
  895.   if count > 1 then
  896.     count = 0
  897.     iid = iid + 1
  898.   end if
  899.   count = count + 1
  900.   tval = item(iid, count)
  901.   print #1, tval
  902.   goto [endfor]
  903.  
  904. [pokedexsave]
  905.   did = did + 1
  906.   tval = pokedexuser(did)
  907.   print #1, tval
  908.  
  909. [endfor]
  910. next i
  911. print "Done"
  912. close #1
  913. end sub
  914.  
  915. sub loadgame
  916. print "Loading..."
  917. open "Pokemon Saves/pkmnsavegame.dat" for input as #1
  918. for i = 1 to 29028
  919.   if i < 211 then goto [pkmnsave]
  920.   if i < 28211 then goto [boxsave]
  921.   if i < 28311 then goto [itemsave]
  922.   goto [pokedexsave]
  923.  
  924. [pkmnsave]
  925.   if count = 35 then
  926.     count = 0
  927.     pid = pid + 1
  928.   end if
  929.   if i > 209 then
  930.     dum = 0
  931.   end if
  932.   count = count + 1
  933.   input #1, tval
  934.   userpkmn(pid, count) = tval
  935.   goto [endfor]
  936.  
  937. [boxsave]
  938.   if count = 35 then
  939.     count = 0
  940.     bid = bid + 1
  941.   end if
  942.   count = count + 1
  943.   print #1, tval
  944.   box(bid, count) = tval
  945.   goto [endfor]
  946.  
  947. [itemsave]
  948.   if count > 1 then
  949.     count = 0
  950.     iid = iid + 1
  951.   end if
  952.   count = count + 1
  953.   print #1, tval
  954.   item(iid, count) = tval
  955.   goto [endfor]
  956.  
  957. [pokedexsave]
  958.   did = did + 1
  959.   print #1, tval
  960.   pokedexuser(did) = tval
  961.  
  962. [endfor]
  963. next i
  964. print "Done"
  965. close #1
  966. end sub
  967.  
  968. sub autosave
  969. open "Pokemon Autosaves/pkmnasavgame.dat" for output as #1
  970. for i = 1 to 29028
  971.   if i < 211 then goto [pkmnsave]
  972.   if i < 28211 then goto [boxsave]
  973.   if i < 28311 then goto [itemsave]
  974.   goto [pokedexsave]
  975.  
  976. [pkmnsave]
  977.   if count = 35 then
  978.     count = 0
  979.     pid = pid + 1
  980.   end if
  981.   if i > 209 then
  982.     dum = 0
  983.   end if
  984.   count = count + 1
  985.   tval = userpkmn(pid, count)
  986.   print #1, tval
  987.   goto [endfor]
  988.  
  989. [boxsave]
  990.   if count = 35 then
  991.     count = 0
  992.     bid = bid + 1
  993.   end if
  994.   count = count + 1
  995.   tval = box(bid, count)
  996.   print #1, tval
  997.   goto [endfor]
  998.  
  999. [itemsave]
  1000.   if count > 1 then
  1001.     count = 0
  1002.     iid = iid + 1
  1003.   end if
  1004.   count = count + 1
  1005.   tval = item(iid, count)
  1006.   print #1, tval
  1007.   goto [endfor]
  1008.  
  1009. [pokedexsave]
  1010.   did = did + 1
  1011.   tval = pokedexuser(did)
  1012.   print #1, tval
  1013.  
  1014. [endfor]
  1015. next i
  1016. print "Done"
  1017. close #1
  1018. end sub
  1019.  
  1020. sub mainborder
  1021.   locate 1, 1 : print "****************************************"
  1022.   locate 1, 2 : print "*"
  1023.   locate 1, 3 : print "*"
  1024.   locate 1, 4 : print "*"
  1025.   locate 1, 5 : print "*"
  1026.   locate 1, 6 : print "*"
  1027.   locate 1, 7 : print "*"
  1028.   locate 1, 8 : print "*"
  1029.   locate 1, 9 : print "*"
  1030.   locate 1, 10 : print "*"
  1031.   locate 1, 11 : print "*"
  1032.   locate 1, 12 : print "*"
  1033.   locate 1, 13 : print "*"
  1034.   locate 1, 14 : print "*"
  1035.   locate 1, 15 : print "*"
  1036.   locate 1, 16 : print "*"
  1037.   locate 1, 17 : print "*"
  1038.   locate 1, 18 : print "*"
  1039.   locate 1, 19 : print "*"
  1040.   locate 40, 2 : print "*"
  1041.   locate 40, 3 : print "*"
  1042.   locate 40, 4 : print "*"
  1043.   locate 40, 5 : print "*"
  1044.   locate 40, 6 : print "*"
  1045.   locate 40, 7 : print "*"
  1046.   locate 40, 8 : print "*"
  1047.   locate 40, 9 : print "*"
  1048.   locate 40, 10 : print "*"
  1049.   locate 40, 11 : print "*"
  1050.   locate 40, 12 : print "*"
  1051.   locate 40, 13 : print "*"
  1052.   locate 40, 14 : print "*"
  1053.   locate 40, 15 : print "*"
  1054.   locate 40, 16 : print "*"
  1055.   locate 40, 17 : print "*"
  1056.   locate 40, 18 : print "*"
  1057.   locate 40, 19 : print "*"
  1058.   locate 1, 20 : print "****************************************"
  1059. end sub
  1060.  
  1061. sub boxtext
  1062.   locate 2, 16 : print "######################################"
  1063.   locate 2, 19 : print "######################################"
  1064.   locate 2, 17 : print "#"
  1065.   locate 2, 18 : print "#"
  1066.   locate 39, 17 : print "#"
  1067.   locate 39, 18 : print "#"
  1068. end sub
  1069.  
  1070. sub battlemenuoptions
  1071.   locate 4, 17 : print "1) Battle"
  1072.   locate 4, 18 : print "3) Pokemon"
  1073.   locate 19, 17 : print "2) Bag"
  1074.   locate 19, 18 : print "4) Run"
  1075.   locate 3, 11 : print "---------------------"
  1076.   locate 3, 12 : print " ";userpokemonname$(1);" | HP: ";using("###", userpkmn(1,1))
  1077.   locate 3, 13 : print "---------------------"
  1078.   locate 17, 4 : print "---------------------"
  1079.   locate 17, 5 : print " ";cpupokemonname$(1);" | HP: ";using("###", cpupkmn(1,1))
  1080.   locate 17, 6 : print "---------------------"
  1081.   locate 36, 17 : input "V";bmenuchoice
  1082. end sub
  1083.  
  1084. sub battleoptions
  1085.   locate 3, 17 : print "1) ";movename$(userpkmn(1,16))
  1086.   locate 3, 18 : print "3) ";movename$(userpkmn(1,18))
  1087.   locate 20, 17 : print "2) ";movename$(userpkmn(1,17))
  1088.   locate 20, 18 : print "4) ";movename$(userpkmn(1,19))
  1089.   locate 3, 11 : print "---------------------"
  1090.   locate 3, 12 : print " ";userpokemonname$(1);" | HP: ";using("###", userpkmn(1,1))
  1091.   locate 3, 13 : print "---------------------"
  1092.   locate 17, 4 : print "---------------------"
  1093.   locate 17, 5 : print " ";cpupokemonname$(1);" | HP: ";using("###", cpupkmn(1,1))
  1094.   locate 17, 6 : print "---------------------"
  1095.   locate 36, 17 : input "V";bopchoice
  1096. end sub
  1097.  
  1098. sub screenupdate
  1099.   locate 3, 11 : print "---------------------"
  1100.   locate 3, 12 : print " ";userpokemonname$(1);" | HP: ";using("###", userpkmn(1,1))
  1101.   locate 3, 13 : print "---------------------"
  1102.   locate 17, 4 : print "---------------------"
  1103.   locate 17, 5 : print " ";cpupokemonname$(1);" | HP: ";using("###", cpupkmn(1,1))
  1104.   locate 17, 6 : print "---------------------"
  1105. end sub
  1106.  
  1107. sub baginterface
  1108.   locate 20, 2 : print "*"
  1109.   locate 20, 3 : print "*"
  1110.   locate 20, 4 : print "*"
  1111.   locate 20, 5 : print "*"
  1112.   locate 20, 6 : print "*"
  1113.   locate 20, 7 : print "*"
  1114.   locate 20, 8 : print "*"
  1115.   locate 20, 9 : print "*"
  1116.   locate 20, 10 : print "*"
  1117.   locate 20, 11 : print "*"
  1118.   locate 20, 12 : print "*"
  1119.   locate 20, 13 : print "*"
  1120.   locate 20, 14 : print "*"
  1121.   locate 20, 15 : print "*"
  1122.   locate 20, 16 : print "*"
  1123.   locate 20, 17 : print "*"
  1124.   locate 20, 18 : print "*"
  1125.   locate 20, 19 : print "*"
  1126.   locate 2, 11 : print "******************"
  1127.   locate 36, 7 : input "";bagchoice
  1128. end sub
  1129.  
  1130. sub pkmnselect
  1131.   locate 2, 4 : print "####################"
  1132.   locate 2, 5 : print "# ";userpokemonname$(1);" lv. ";userpkmn(1,7)
  1133.   locate 2, 6 : print "# HP: ";userpkmn(1,1);"/";userpkmn(1,29)
  1134.   locate 2, 7 : print "####################"
  1135.   locate 21, 2 : print "###################"
  1136.   locate 21, 3 : print "# ";userpokemonname$(2);" lv. ";userpkmn(2,7)
  1137.   locate 21, 4 : print "# HP: ";userpkmn(2,1);"/";userpkmn(2,29)
  1138.   locate 21, 5 : print "###################"
  1139.   locate 21, 6 : print "# ";userpokemonname$(3);" lv. ";userpkmn(3,7)
  1140.   locate 21, 7 : print "# HP: ";userpkmn(3,1);"/";userpkmn(3,29)
  1141.   locate 21, 8 : print "###################"
  1142.   locate 21, 9 : print "# ";userpokemonname$(4);" lv. ";userpkmn(4,7)
  1143.   locate 21, 10 : print "# HP: ";userpkmn(4,1);"/";userpkmn(4,29)
  1144.   locate 21, 11 : print "###################"
  1145.   locate 21, 12 : print "# ";userpokemonname$(5);" lv. ";userpkmn(5,7)
  1146.   locate 21, 13 : print "# HP: ";userpkmn(5,1);"/";userpkmn(5,29)
  1147.   locate 21, 14 : print "###################"
  1148.   locate 21, 15 : print "# ";userpokemonname$(6);" lv. ";userpkmn(6,7)
  1149.   locate 21, 16 : print "# HP: ";userpkmn(6,1);"/";userpkmn(6,29)
  1150.   locate 21, 17 : print "###################"
  1151.   locate 33, 18 : print "#"
  1152.   locate 8, 18 : print "#"
  1153.   locate 8, 19 : print "##########################"
  1154.   locate 8, 17 : print "###############"
  1155.   locate 2, 8 : print "# Attack: ";userpkmn(1,2)
  1156.   locate 2, 9 : print "#"
  1157.   locate 2, 10 : print "# Defense: ";userpkmn(1,3)
  1158.   locate 2, 11 : print "#"
  1159.   locate 2, 12 : print "# SpAttack: ";userpkmn(1,4)
  1160.   locate 2, 13 : print "#"
  1161.   locate 2, 14 : print "# SpDefense: ";userpkmn(1,5)
  1162.   locate 2, 15 : print "#"
  1163.   locate 2, 16 : print "# Speed: ";userpkmn(1,6)
  1164.   locate 2, 17 : print "######"
  1165.   locate 9, 18 : input "Pokemon to Switch For: ";pkmnopchoice$
  1166. end sub
  1167.  
  1168. sub pkmnstats
  1169.   cls : call mainborder
  1170.   laststat = stat
  1171.   locate 2, 4 : print "####################"
  1172.   locate 2, 5 : print "# ";userpokemonname$(1);" lv. ";userpkmn(1,7)
  1173.   locate 2, 6 : print "# HP: ";userpkmn(1,1);"/";userpkmn(1,29)
  1174.   locate 2, 7 : print "####################"
  1175.   locate 21, 2 : print "###################"
  1176.   locate 21, 3 : print "# ";userpokemonname$(2);" lv. ";userpkmn(2,7)
  1177.   locate 21, 4 : print "# HP: ";userpkmn(2,1);"/";userpkmn(2,29)
  1178.   locate 21, 5 : print "###################"
  1179.   locate 21, 6 : print "# ";userpokemonname$(3);" lv. ";userpkmn(3,7)
  1180.   locate 21, 7 : print "# HP: ";userpkmn(3,1);"/";userpkmn(3,29)
  1181.   locate 21, 8 : print "###################"
  1182.   locate 21, 9 : print "# ";userpokemonname$(4);" lv. ";userpkmn(4,7)
  1183.   locate 21, 10 : print "# HP: ";userpkmn(4,1);"/";userpkmn(4,29)
  1184.   locate 21, 11 : print "###################"
  1185.   locate 21, 12 : print "# ";userpokemonname$(5);" lv. ";userpkmn(5,7)
  1186.   locate 21, 13 : print "# HP: ";userpkmn(5,1);"/";userpkmn(5,29)
  1187.   locate 21, 14 : print "###################"
  1188.   locate 21, 15 : print "# ";userpokemonname$(6);" lv. ";userpkmn(6,7)
  1189.   locate 21, 16 : print "# HP: ";userpkmn(6,1);"/";userpkmn(6,29)
  1190.   locate 21, 17 : print "###################"
  1191.   locate 33, 18 : print "#"
  1192.   locate 8, 18 : print "#"
  1193.   locate 8, 19 : print "##########################"
  1194.   locate 8, 17 : print "###############"
  1195.   locate 2, 8 : print "# Attack: ";userpkmn(1,2)
  1196.   locate 2, 9 : print "#"
  1197.   locate 2, 10 : print "# Defense: ";userpkmn(1,3)
  1198.   locate 2, 11 : print "#"
  1199.   locate 2, 12 : print "# SpAttack: ";userpkmn(1,4)
  1200.   locate 2, 13 : print "#"
  1201.   locate 2, 14 : print "# SpDefense: ";userpkmn(1,5)
  1202.   locate 2, 15 : print "#"
  1203.   locate 2, 16 : print "# Speed: ";userpkmn(1,6)
  1204.   locate 2, 17 : print "######"
  1205.   locate 9, 18 : input "Pokemon to View Stats: ";pkmnstatchoice$
  1206.   select case pkmnstatchoice$
  1207.   case "1" : goto [main]
  1208.   case "2" : stat = 2
  1209.   case "3" : stat = 3
  1210.   case "4" : stat = 3
  1211.   case "5" : stat = 5
  1212.   case "6" : stat = 6
  1213.   case else : stat = 7
  1214. end select
  1215.  
  1216. end sub
  1217.  
  1218. sub runaway
  1219.   chance = int(rnd(1)*200)+1 : runawayval = 1
  1220.   if chance = 42 then runawayval = 0
  1221.   if runawayval = 1 then
  1222.     locate 4, 17 : print "You got away safely!"
  1223.     locate 4, 18 : input "[Press Enter]";dummy$
  1224.   else
  1225.     locate 4, 17 : print "Can't Escape!"
  1226.     locate 4, 18 : input "[Press Enter]";dummy$
  1227.   end if
  1228. end sub
  1229.  
  1230. sub pkmn1stat
  1231.   cls : call mainborder
  1232.   locate 2, 4 : print "####################"
  1233.   locate 2, 5 : print "# ";userpokemonname$(1);" lv. ";userpkmn(1,7)
  1234.   locate 2, 6 : print "# HP: ";userpkmn(1,1);"/";userpkmn(1,29)
  1235.   locate 2, 7 : print "####################"
  1236.   locate 21, 2 : print "###################"
  1237.   locate 21, 3 : print "# ";userpokemonname$(2);" lv. ";userpkmn(2,7)
  1238.   locate 21, 4 : print "# HP: ";userpkmn(2,1);"/";userpkmn(2,29)
  1239.   locate 21, 5 : print "###################"
  1240.   locate 21, 6 : print "# ";userpokemonname$(3);" lv. ";userpkmn(3,7)
  1241.   locate 21, 7 : print "# HP: ";userpkmn(3,1);"/";userpkmn(3,29)
  1242.   locate 21, 8 : print "###################"
  1243.   locate 21, 9 : print "# ";userpokemonname$(4);" lv. ";userpkmn(4,7)
  1244.   locate 21, 10 : print "# HP: ";userpkmn(4,1);"/";userpkmn(4,29)
  1245.   locate 21, 11 : print "###################"
  1246.   locate 21, 12 : print "# ";userpokemonname$(5);" lv. ";userpkmn(5,7)
  1247.   locate 21, 13 : print "# HP: ";userpkmn(5,1);"/";userpkmn(5,29)
  1248.   locate 21, 14 : print "###################"
  1249.   locate 21, 15 : print "# ";userpokemonname$(6);" lv. ";userpkmn(6,7)
  1250.   locate 21, 16 : print "# HP: ";userpkmn(6,1);"/";userpkmn(6,29)
  1251.   locate 21, 17 : print "###################"
  1252.   locate 33, 18 : print "#"
  1253.   locate 8, 18 : print "#"
  1254.   locate 8, 19 : print "##########################"
  1255.   locate 8, 17 : print "###############"
  1256.   locate 2, 8 : print "# Attack: ";userpkmn(1,2)
  1257.   locate 2, 9 : print "#"
  1258.   locate 2, 10 : print "# Defense: ";userpkmn(1,3)
  1259.   locate 2, 11 : print "#"
  1260.   locate 2, 12 : print "# SpAttack: ";userpkmn(1,4)
  1261.   locate 2, 13 : print "#"
  1262.   locate 2, 14 : print "# SpDefense: ";userpkmn(1,5)
  1263.   locate 2, 15 : print "#"
  1264.   locate 2, 16 : print "# Speed: ";userpkmn(1,6)
  1265.   locate 2, 17 : print "######"
  1266.   locate 9, 18 : input "Pokemon to View Stats: ";stat
  1267. end sub
  1268.  
  1269. sub pkmn2stat
  1270.   cls : call mainborder
  1271.   locate 2, 4 : print "####################"
  1272.   locate 2, 5 : print "# ";userpokemonname$(2);" lv. ";userpkmn(2,7)
  1273.   locate 2, 6 : print "# HP: ";userpkmn(2,1);"/";userpkmn(2,29)
  1274.   locate 2, 7 : print "####################"
  1275.   locate 21, 2 : print "###################"
  1276.   locate 21, 3 : print "# ";userpokemonname$(1);" lv. ";userpkmn(1,7)
  1277.   locate 21, 4 : print "# HP: ";userpkmn(1,1);"/";userpkmn(1,29)
  1278.   locate 21, 5 : print "###################"
  1279.   locate 21, 6 : print "# ";userpokemonname$(3);" lv. ";userpkmn(3,7)
  1280.   locate 21, 7 : print "# HP: ";userpkmn(3,1);"/";userpkmn(3,29)
  1281.   locate 21, 8 : print "###################"
  1282.   locate 21, 9 : print "# ";userpokemonname$(4);" lv. ";userpkmn(4,7)
  1283.   locate 21, 10 : print "# HP: ";userpkmn(4,1);"/";userpkmn(4,29)
  1284.   locate 21, 11 : print "###################"
  1285.   locate 21, 12 : print "# ";userpokemonname$(5);" lv. ";userpkmn(5,7)
  1286.   locate 21, 13 : print "# HP: ";userpkmn(5,1);"/";userpkmn(5,29)
  1287.   locate 21, 14 : print "###################"
  1288.   locate 21, 15 : print "# ";userpokemonname$(6);" lv. ";userpkmn(6,7)
  1289.   locate 21, 16 : print "# HP: ";userpkmn(6,1);"/";userpkmn(6,29)
  1290.   locate 21, 17 : print "###################"
  1291.   locate 33, 18 : print "#"
  1292.   locate 8, 18 : print "#"
  1293.   locate 8, 19 : print "##########################"
  1294.   locate 8, 17 : print "###############"
  1295.   locate 2, 8 : print "# Attack: ";userpkmn(2,2)
  1296.   locate 2, 9 : print "#"
  1297.   locate 2, 10 : print "# Defense: ";userpkmn(2,3)
  1298.   locate 2, 11 : print "#"
  1299.   locate 2, 12 : print "# SpAttack: ";userpkmn(2,4)
  1300.   locate 2, 13 : print "#"
  1301.   locate 2, 14 : print "# SpDefense: ";userpkmn(2,5)
  1302.   locate 2, 15 : print "#"
  1303.   locate 2, 16 : print "# Speed: ";userpkmn(2,6)
  1304.   locate 2, 17 : print "######"
  1305.   locate 9, 18 : input "Pokemon to View Stats: ";stat
  1306. end sub
  1307.  
  1308. sub pkmn3stat
  1309.   cls : call mainborder
  1310.   locate 2, 4 : print "####################"
  1311.   locate 2, 5 : print "# ";userpokemonname$(3);" lv. ";userpkmn(3,7)
  1312.   locate 2, 6 : print "# HP: ";userpkmn(3,1);"/";userpkmn(3,29)
  1313.   locate 2, 7 : print "####################"
  1314.   locate 21, 2 : print "###################"
  1315.   locate 21, 3 : print "# ";userpokemonname$(2);" lv. ";userpkmn(2,7)
  1316.   locate 21, 4 : print "# HP: ";userpkmn(2,1);"/";userpkmn(2,29)
  1317.   locate 21, 5 : print "###################"
  1318.   locate 21, 6 : print "# ";userpokemonname$(1);" lv. ";userpkmn(1,7)
  1319.   locate 21, 7 : print "# HP: ";userpkmn(1,1);"/";userpkmn(1,29)
  1320.   locate 21, 8 : print "###################"
  1321.   locate 21, 9 : print "# ";userpokemonname$(4);" lv. ";userpkmn(4,7)
  1322.   locate 21, 10 : print "# HP: ";userpkmn(4,1);"/";userpkmn(4,29)
  1323.   locate 21, 11 : print "###################"
  1324.   locate 21, 12 : print "# ";userpokemonname$(5);" lv. ";userpkmn(5,7)
  1325.   locate 21, 13 : print "# HP: ";userpkmn(5,1);"/";userpkmn(5,29)
  1326.   locate 21, 14 : print "###################"
  1327.   locate 21, 15 : print "# ";userpokemonname$(6);" lv. ";userpkmn(6,7)
  1328.   locate 21, 16 : print "# HP: ";userpkmn(6,1);"/";userpkmn(6,29)
  1329.   locate 21, 17 : print "###################"
  1330.   locate 33, 18 : print "#"
  1331.   locate 8, 18 : print "#"
  1332.   locate 8, 19 : print "##########################"
  1333.   locate 8, 17 : print "###############"
  1334.   locate 2, 8 : print "# Attack: ";userpkmn(3,2)
  1335.   locate 2, 9 : print "#"
  1336.   locate 2, 10 : print "# Defense: ";userpkmn(3,3)
  1337.   locate 2, 11 : print "#"
  1338.   locate 2, 12 : print "# SpAttack: ";userpkmn(3,4)
  1339.   locate 2, 13 : print "#"
  1340.   locate 2, 14 : print "# SpDefense: ";userpkmn(3,5)
  1341.   locate 2, 15 : print "#"
  1342.   locate 2, 16 : print "# Speed: ";userpkmn(3,6)
  1343.   locate 2, 17 : print "######"
  1344.   locate 9, 18 : input "Pokemon to View Stats: ";stat
  1345. end sub
  1346.  
  1347. sub pkmn4stat
  1348.   cls : call mainborder
  1349.   locate 2, 4 : print "####################"
  1350.   locate 2, 5 : print "# ";userpokemonname$(4);" lv. ";userpkmn(4,7)
  1351.   locate 2, 6 : print "# HP: ";userpkmn(4,1);"/";userpkmn(4,29)
  1352.   locate 2, 7 : print "####################"
  1353.   locate 21, 2 : print "###################"
  1354.   locate 21, 3 : print "# ";userpokemonname$(2);" lv. ";userpkmn(2,7)
  1355.   locate 21, 4 : print "# HP: ";userpkmn(2,1);"/";userpkmn(2,29)
  1356.   locate 21, 5 : print "###################"
  1357.   locate 21, 6 : print "# ";userpokemonname$(3);" lv. ";userpkmn(3,7)
  1358.   locate 21, 7 : print "# HP: ";userpkmn(3,1);"/";userpkmn(3,29)
  1359.   locate 21, 8 : print "###################"
  1360.   locate 21, 9 : print "# ";userpokemonname$(1);" lv. ";userpkmn(1,7)
  1361.   locate 21, 10 : print "# HP: ";userpkmn(1,1);"/";userpkmn(1,29)
  1362.   locate 21, 11 : print "###################"
  1363.   locate 21, 12 : print "# ";userpokemonname$(5);" lv. ";userpkmn(5,7)
  1364.   locate 21, 13 : print "# HP: ";userpkmn(5,1);"/";userpkmn(5,29)
  1365.   locate 21, 14 : print "###################"
  1366.   locate 21, 15 : print "# ";userpokemonname$(6);" lv. ";userpkmn(6,7)
  1367.   locate 21, 16 : print "# HP: ";userpkmn(6,1);"/";userpkmn(6,29)
  1368.   locate 21, 17 : print "###################"
  1369.   locate 33, 18 : print "#"
  1370.   locate 8, 18 : print "#"
  1371.   locate 8, 19 : print "##########################"
  1372.   locate 8, 17 : print "###############"
  1373.   locate 2, 8 : print "# Attack: ";userpkmn(4,2)
  1374.   locate 2, 9 : print "#"
  1375.   locate 2, 10 : print "# Defense: ";userpkmn(4,3)
  1376.   locate 2, 11 : print "#"
  1377.   locate 2, 12 : print "# SpAttack: ";userpkmn(4,4)
  1378.   locate 2, 13 : print "#"
  1379.   locate 2, 14 : print "# SpDefense: ";userpkmn(4,5)
  1380.   locate 2, 15 : print "#"
  1381.   locate 2, 16 : print "# Speed: ";userpkmn(4,6)
  1382.   locate 2, 17 : print "######"
  1383.   locate 9, 18 : input "Pokemon to View Stats: ";stat
  1384. end sub
  1385.  
  1386. sub pkmn5stat
  1387.   cls : call mainborder
  1388.   locate 2, 4 : print "####################"
  1389.   locate 2, 5 : print "# ";userpokemonname$(5);" lv. ";userpkmn(5,7)
  1390.   locate 2, 6 : print "# HP: ";userpkmn(5,1);"/";userpkmn(5,29)
  1391.   locate 2, 7 : print "####################"
  1392.   locate 21, 2 : print "###################"
  1393.   locate 21, 3 : print "# ";userpokemonname$(2);" lv. ";userpkmn(2,7)
  1394.   locate 21, 4 : print "# HP: ";userpkmn(2,1);"/";userpkmn(2,29)
  1395.   locate 21, 5 : print "###################"
  1396.   locate 21, 6 : print "# ";userpokemonname$(3);" lv. ";userpkmn(3,7)
  1397.   locate 21, 7 : print "# HP: ";userpkmn(3,1);"/";userpkmn(3,29)
  1398.   locate 21, 8 : print "###################"
  1399.   locate 21, 9 : print "# ";userpokemonname$(4);" lv. ";userpkmn(4,7)
  1400.   locate 21, 10 : print "# HP: ";userpkmn(4,1);"/";userpkmn(4,29)
  1401.   locate 21, 11 : print "###################"
  1402.   locate 21, 12 : print "# ";userpokemonname$(1);" lv. ";userpkmn(1,7)
  1403.   locate 21, 13 : print "# HP: ";userpkmn(1,1);"/";userpkmn(1,29)
  1404.   locate 21, 14 : print "###################"
  1405.   locate 21, 15 : print "# ";userpokemonname$(6);" lv. ";userpkmn(6,7)
  1406.   locate 21, 16 : print "# HP: ";userpkmn(6,1);"/";userpkmn(6,29)
  1407.   locate 21, 17 : print "###################"
  1408.   locate 33, 18 : print "#"
  1409.   locate 8, 18 : print "#"
  1410.   locate 8, 19 : print "##########################"
  1411.   locate 8, 17 : print "###############"
  1412.   locate 2, 8 : print "# Attack: ";userpkmn(5,2)
  1413.   locate 2, 9 : print "#"
  1414.   locate 2, 10 : print "# Defense: ";userpkmn(5,3)
  1415.   locate 2, 11 : print "#"
  1416.   locate 2, 12 : print "# SpAttack: ";userpkmn(5,4)
  1417.   locate 2, 13 : print "#"
  1418.   locate 2, 14 : print "# SpDefense: ";userpkmn(5,5)
  1419.   locate 2, 15 : print "#"
  1420.   locate 2, 16 : print "# Speed: ";userpkmn(5,6)
  1421.   locate 2, 17 : print "######"
  1422.   locate 9, 18 : input "Pokemon to View Stats: ";stat
  1423. end sub
  1424.  
  1425. sub pkmn6stat
  1426.   cls : call mainborder
  1427.   locate 2, 4 : print "####################"
  1428.   locate 2, 5 : print "# ";userpokemonname$(6);" lv. ";userpkmn(6,7)
  1429.   locate 2, 6 : print "# HP: ";userpkmn(6,1);"/";userpkmn(6,29)
  1430.   locate 2, 7 : print "####################"
  1431.   locate 21, 2 : print "###################"
  1432.   locate 21, 3 : print "# ";userpokemonname$(2);" lv. ";userpkmn(2,7)
  1433.   locate 21, 4 : print "# HP: ";userpkmn(2,1);"/";userpkmn(2,29)
  1434.   locate 21, 5 : print "###################"
  1435.   locate 21, 6 : print "# ";userpokemonname$(3);" lv. ";userpkmn(3,7)
  1436.   locate 21, 7 : print "# HP: ";userpkmn(3,1);"/";userpkmn(3,29)
  1437.   locate 21, 8 : print "###################"
  1438.   locate 21, 9 : print "# ";userpokemonname$(4);" lv. ";userpkmn(4,7)
  1439.   locate 21, 10 : print "# HP: ";userpkmn(4,1);"/";userpkmn(4,29)
  1440.   locate 21, 11 : print "###################"
  1441.   locate 21, 12 : print "# ";userpokemonname$(5);" lv. ";userpkmn1(5,7)
  1442.   locate 21, 13 : print "# HP: ";userpkmn(5,1);"/";userpkmn(5,29)
  1443.   locate 21, 14 : print "###################"
  1444.   locate 21, 15 : print "# ";userpokemonname$(1);" lv. ";userpkmn(1,7)
  1445.   locate 21, 16 : print "# HP: ";userpkmn(1,1);"/";userpkmn(1,29)
  1446.   locate 21, 17 : print "###################"
  1447.   locate 33, 18 : print "#"
  1448.   locate 8, 18 : print "#"
  1449.   locate 8, 19 : print "##########################"
  1450.   locate 8, 17 : print "###############"
  1451.   locate 2, 8 : print "# Attack: ";userpkmn(6,2)
  1452.   locate 2, 9 : print "#"
  1453.   locate 2, 10 : print "# Defense: ";userpkmn(6,3)
  1454.   locate 2, 11 : print "#"
  1455.   locate 2, 12 : print "# SpAttack: ";userpkmn(6,4)
  1456.   locate 2, 13 : print "#"
  1457.   locate 2, 14 : print "# SpDefense: ";userpkmn(6,5)
  1458.   locate 2, 15 : print "#"
  1459.   locate 2, 16 : print "# Speed: ";userpkmn(6,6)
  1460.   locate 2, 17 : print "######"
  1461.   locate 9, 18 : input "Pokemon to View Stats: ";stat
  1462. end sub
  1463.  
  1464. sub twoforone
  1465. for i = 1 to 30
  1466.   tempuserpkmn(1, i) = userpkmn(1, i)
  1467. next i
  1468. tempuserpokemonname$(1) = userpokemonname$(1)
  1469. for j = 1 to 30
  1470.   userpkmn(1, j) = userpkmn(2, j)
  1471. next j
  1472. userpokemonname$(1) = userpokemonname$(2)
  1473. for k = 1 to 30
  1474.   userpkmn(2, k) = tempuserpkmn(1, k)
  1475. next k
  1476. userpokemonname$(2) = tempuserpokemonname$(1)
  1477. end sub
  1478.  
  1479. sub threeforone
  1480. for i = 1 to 30
  1481.   tempuserpkmn(1, i) = userpkmn(1, i)
  1482. next i
  1483. tempuserpokemonname$(1) = userpokemonname$(1)
  1484. for j = 1 to 30
  1485.   userpkmn(1, j) = userpkmn(3, j)
  1486. next j
  1487. userpokemonname$(1) = userpokemonname$(3)
  1488. for k = 1 to 30
  1489.   userpkmn(3, k) = tempuserpkmn(1, k)
  1490. next k
  1491. userpokemonname$(3) = tempuserpokemonname$(1)
  1492. end sub
  1493.  
  1494. sub fourforone
  1495. for i = 1 to 30
  1496.   tempuserpkmn(1, i) = userpkmn(1, i)
  1497. next i
  1498. tempuserpokemonname$(1) = userpokemonname$(1)
  1499. for j = 1 to 30
  1500.   userpkmn(1, j) = userpkmn(4, j)
  1501. next j
  1502. userpokemonname$(1) = userpokemonname$(4)
  1503. for k = 1 to 30
  1504.   userpkmn(4, k) = tempuserpkmn(1, k)
  1505. next k
  1506. userpokemonname$(4) = tempuserpokemonname$(1)
  1507. end sub
  1508.  
  1509. sub fiveforone
  1510. for i = 1 to 30
  1511.   tempuserpkmn(1, i) = userpkmn(1, i)
  1512. next i
  1513. tempuserpokemonname$(1) = userpokemonname$(1)
  1514. for j = 1 to 30
  1515.   userpkmn(1, j) = userpkmn(5, j)
  1516. next j
  1517. userpokemonname$(1) = userpokemonname$(5)
  1518. for k = 1 to 30
  1519.   userpkmn(5, k) = tempuserpkmn(1, k)
  1520. next k
  1521. userpokemonname$(5) = tempuserpokemonname$(1)
  1522. end sub
  1523.  
  1524. sub sixforone
  1525. for i = 1 to 30
  1526.   tempuserpkmn(1, i) = userpkmn(1, i)
  1527. next i
  1528. tempuserpokemonname$(1) = userpokemonname$(1)
  1529. for j = 1 to 30
  1530.   userpkmn(1, j) = userpkmn(6, j)
  1531. next j
  1532. userpokemonname$(1) = userpokemonname$(6)
  1533. for k = 1 to 30
  1534.   userpkmn(6, k) = tempuserpkmn(1, k)
  1535. next k
  1536. userpokemonname$(6) = tempuserpokemonname$(1)
  1537. end sub
  1538.  
  1539. sub pkmnivrand
  1540. for z = 1 to 718
  1541. pkmn(z,14) = int(rnd(1)*31)+1  'random hp iv
  1542. pkmn(z,15) = int(rnd(1)*31)+1  'random attack iv
  1543. pkmn(z,16) = int(rnd(1)*31)+1  'random defense iv
  1544. pkmn(z,17) = int(rnd(1)*31)+1  'random special attack iv
  1545. pkmn(z,18) = int(rnd(1)*31)+1  'random special defense iv
  1546. pkmn(z,19) = int(rnd(1)*31)+1  'random speed iv
  1547. next z
  1548. end sub
  1549.  
  1550. sub setup
  1551. pokemonname$(1) = "Bulbasaur" 'name
  1552. pkmn(1,1) = 45          'base hp
  1553. pkmn(1,2) = 49          'base attack
  1554. pkmn(1,3) = 49          'base defense
  1555. pkmn(1,4) = 65          'base special attack
  1556. pkmn(1,5) = 65          'base special defense
  1557. pkmn(1,6) = 45          'base speed
  1558. pkmn(1,7) = 5           'level
  1559. pkmn(1,8) = 0           'health ev gain
  1560. pkmn(1,9) = 0           'attack ev gain
  1561. pkmn(1,10) = 0          'defense ev gain
  1562. pkmn(1,11) = 1          'special attack ev gain
  1563. pkmn(1,12) = 0          'special defense ev gain
  1564. pkmn(1,13) = 0          'speed ev gain
  1565. pkmn(1,14) = int(rnd(1)*31)+1  'random hp iv
  1566. pkmn(1,15) = int(rnd(1)*31)+1  'random attack iv
  1567. pkmn(1,16) = int(rnd(1)*31)+1  'random defense iv
  1568. pkmn(1,17) = int(rnd(1)*31)+1  'random special attack iv
  1569. pkmn(1,18) = int(rnd(1)*31)+1  'random special defense iv
  1570. pkmn(1,19) = int(rnd(1)*31)+1  'random speed iv
  1571. pkmn(1,20) = 12         'first type
  1572. pkmn(1,21) = 4          'second type
  1573. pkmn(1,22) = 1          'nature
  1574. pkmn(1,23) = 4          'health ev
  1575. pkmn(1,24) = 4          'attack ev
  1576. pkmn(1,25) = 4          'defense ev
  1577. pkmn(1,26) = 4          'special attack ev
  1578. pkmn(1,27) = 4          'special defense ev
  1579. pkmn(1,28) = 4          'speed ev
  1580. pkmn(1,29) = 33         'move 1
  1581. pkmn(1,30) = 45         'move 2
  1582. pkmn(1,31) = 0          'move 3
  1583. pkmn(1,32) = 0          'move 4
  1584. end sub
  1585.  
  1586. sub movesetup
  1587.   movename$(0) = "--------"
  1588.   moveid(0,1) = 0
  1589.   moveid(0,2) = 0
  1590.   moveid(0,3) = 0
  1591.   moveid(0,4) = 0
  1592.   moveid(0,5) = 5
  1593.  
  1594.   movename$(33) = "Tackle"
  1595.   moveid(33,1) = 50      'move power
  1596.   moveid(33,2) = 35      'power points
  1597.   moveid(33,3) = 15       'move type 1
  1598.   moveid(33,4) = 1       'move type 2
  1599.   moveid(33,5) = 100     'move accuracy
  1600.  
  1601.   movename$(45) = "Growl"
  1602.   moveid(45,1) = 0
  1603.   moveid(45,2) = 40
  1604.   moveid(45,3) = 1
  1605.   moveid(45,4) = 4
  1606.   moveid(45,5) = 100
  1607. end sub
  1608.  
  1609. sub setupdex
  1610.   for i = 1 to 718
  1611.     pokedexuser(i) = 0
  1612.     pokedexmaster(i) = i
  1613.   next i
  1614.   pokedexmasterdata$(1,1) = "Bulbasaur"                         'name
  1615.   pokedexmasterdata$(1,2) = "Grass"                             'type 1
  1616.   pokedexmasterdata$(1,3) = "Poison"                            'type 2 (if no type 2 write null)
  1617.   pokedexmasterdata$(1,4) = "2ft 4in"                           'height
  1618.   pokedexmasterdata$(1,5) = "15.2 lbs"                          'weight
  1619.   pokedexmasterdata$(1,6) = "For some time after its birth, "   'dex entry line 1 (no more than 32 charecters)
  1620.   pokedexmasterdata$(1,7) = "it grows by gaining nourishment"   'dex entry line 2
  1621.   pokedexmasterdata$(1,8) = "from the seed on its back."        'dex entry line 3
  1622.   pokedexmasterdata$(1,9) = ""                                  'dex entry line 4
  1623.   pokedexmasterdata$(1,10) = ""                                 'dex entry line 5
  1624. end sub
  1625.  
  1626. sub userpokemon1in
  1627.   userpokemonname$(1) = pokemonname$(pid)  'name
  1628.   userpkmn(1,1) = healthcalc(pid)          'hp
  1629.   userpkmn(1,2) = attackcalc(pid)          'atk
  1630.   userpkmn(1,3) = defensecalc(pid)         'def
  1631.   userpkmn(1,4) = specialattackcalc(pid)   'spatk
  1632.   userpkmn(1,5) = specialdefensecalc(pid)  'spdef
  1633.   userpkmn(1,6) = speedcalc(pid)           'speed
  1634.   userpkmn(1,7) = pkmn(pid,7)              'level
  1635.   userpkmn(1,8) = pkmn(pid,8)              'hpevgain
  1636.   userpkmn(1,9) = pkmn(pid,9)              'atkevgain
  1637.   userpkmn(1,10) = pkmn(pid,10)            'defevgain
  1638.   userpkmn(1,11) = pkmn(pid,11)            'spatkevgain
  1639.   userpkmn(1,12) = pkmn(pid,12)            'spdefevgain
  1640.   userpkmn(1,13) = pkmn(pid,13)            'speedevgain
  1641.   userpkmn(1,14) = 100                     'accuravy
  1642.   userpkmn(1,15) = 100                     'evasion
  1643.   userpkmn(1,16) = pkmn(pid,29)            'move1
  1644.   userpkmn(1,17) = pkmn(pid,30)            'move2
  1645.   userpkmn(1,18) = pkmn(pid,31)            'move3
  1646.   userpkmn(1,19) = pkmn(pid,32)            'move4
  1647.   userpkmn(1,20) = pkmn(pid,20)            'type1
  1648.   userpkmn(1,21) = pkmn(pid,21)            'type2
  1649.   userpkmn(1,22) = pkmn(pid,22)            'nature
  1650.   userpkmn(1,23) = pkmn(pid,23)            'hpev
  1651.   userpkmn(1,24) = pkmn(pid,24)            'atkev
  1652.   userpkmn(1,25) = pkmn(pid,25)            'defev
  1653.   userpkmn(1,26) = pkmn(pid,26)            'spatkev
  1654.   userpkmn(1,27) = pkmn(pid,27)            'spdefev
  1655.   userpkmn(1,28) = pkmn(pid,28)            'speedev
  1656.   userpkmn(1,29) = healthcalc(pid)         'maxhp
  1657.   userpkmn(1,30) = 0                       'exp
  1658. end sub
  1659. sub userpokemon2in
  1660.   userpokemonname$(2) = pokemonname$(pid)
  1661.   userpkmn(2,1) = healthcalc(pid)
  1662.   userpkmn(2,2) = attackcalc(pid)
  1663.   userpkmn(2,3) = defensecalc(pid)
  1664.   userpkmn(2,4) = specialattackcalc(pid)
  1665.   userpkmn(2,5) = specialdefensecalc(pid)
  1666.   userpkmn(2,6) = speedcalc(pid)
  1667.   userpkmn(2,7) = pkmn(pid,7)
  1668.   userpkmn(2,8) = pkmn(pid,8)
  1669.   userpkmn(2,9) = pkmn(pid,9)
  1670.   userpkmn(2,10) = pkmn(pid,10)
  1671.   userpkmn(2,11) = pkmn(pid,11)
  1672.   userpkmn(2,12) = pkmn(pid,12)
  1673.   userpkmn(2,13) = pkmn(pid,13)
  1674.   userpkmn(2,14) = 100
  1675.   userpkmn(2,15) = 100
  1676.   userpkmn(2,16) = pkmn(pid,29)
  1677.   userpkmn(2,17) = pkmn(pid,30)
  1678.   userpkmn(2,18) = pkmn(pid,31)
  1679.   userpkmn(2,19) = pkmn(pid,32)
  1680.   userpkmn(2,20) = pkmn(pid,20)
  1681.   userpkmn(2,21) = pkmn(pid,21)
  1682.   userpkmn(2,22) = pkmn(pid,22)
  1683.   userpkmn(2,23) = pkmn(pid,23)
  1684.   userpkmn(2,24) = pkmn(pid,24)
  1685.   userpkmn(2,25) = pkmn(pid,25)
  1686.   userpkmn(2,26) = pkmn(pid,26)
  1687.   userpkmn(2,27) = pkmn(pid,27)
  1688.   userpkmn(2,28) = pkmn(pid,28)
  1689.   userpkmn(2,29) = healthcalc(pid)
  1690.   userpkmn(2,30) = 0
  1691. end sub
  1692. sub userpokemon3in
  1693.   userpokemonname$(3) = pokemonname$(pid)
  1694.   userpkmn(3,1) = healthcalc(pid)
  1695.   userpkmn(3,2) = attackcalc(pid)
  1696.   userpkmn(3,3) = defensecalc(pid)
  1697.   userpkmn(3,4) = specialattackcalc(pid)
  1698.   userpkmn(3,5) = specialdefensecalc(pid)
  1699.   userpkmn(3,6) = speedcalc(pid)
  1700.   userpkmn(3,7) = pkmn(pid,7)
  1701.   userpkmn(3,8) = pkmn(pid,8)
  1702.   userpkmn(3,9) = pkmn(pid,9)
  1703.   userpkmn(3,10) = pkmn(pid,10)
  1704.   userpkmn(3,11) = pkmn(pid,11)
  1705.   userpkmn(3,12) = pkmn(pid,12)
  1706.   userpkmn(3,13) = pkmn(pid,13)
  1707.   userpkmn(3,14) = 100
  1708.   userpkmn(3,15) = 100
  1709.   userpkmn(3,16) = pkmn(pid,29)
  1710.   userpkmn(3,17) = pkmn(pid,30)
  1711.   userpkmn(3,18) = pkmn(pid,31)
  1712.   userpkmn(3,19) = pkmn(pid,32)
  1713.   userpkmn(3,20) = pkmn(pid,20)
  1714.   userpkmn(3,21) = pkmn(pid,21)
  1715.   userpkmn(3,22) = pkmn(pid,22)
  1716.   userpkmn(3,23) = pkmn(pid,23)
  1717.   userpkmn(3,24) = pkmn(pid,24)
  1718.   userpkmn(3,25) = pkmn(pid,25)
  1719.   userpkmn(3,26) = pkmn(pid,26)
  1720.   userpkmn(3,27) = pkmn(pid,27)
  1721.   userpkmn(3,28) = pkmn(pid,28)
  1722.   userpkmn(3,29) = healthcalc(pid)
  1723.   userpkmn(3,30) = 0
  1724. end sub
  1725. sub userpokemon4in
  1726.   userpokemonname$(4) = pokemonname$(pid)
  1727.   userpkmn(4,1) = healthcalc(pid)
  1728.   userpkmn(4,2) = attackcalc(pid)
  1729.   userpkmn(4,3) = defensecalc(pid)
  1730.   userpkmn(4,4) = specialattackcalc(pid)
  1731.   userpkmn(4,5) = specialdefensecalc(pid)
  1732.   userpkmn(4,6) = speedcalc(pid)
  1733.   userpkmn(4,7) = pkmn(pid,7)
  1734.   userpkmn(4,8) = pkmn(pid,8)
  1735.   userpkmn(4,9) = pkmn(pid,9)
  1736.   userpkmn(4,10) = pkmn(pid,10)
  1737.   userpkmn(4,11) = pkmn(pid,11)
  1738.   userpkmn(4,12) = pkmn(pid,12)
  1739.   userpkmn(4,13) = pkmn(pid,13)
  1740.   userpkmn(4,14) = 100
  1741.   userpkmn(4,15) = 100
  1742.   userpkmn(4,16) = pkmn(pid,29)
  1743.   userpkmn(4,17) = pkmn(pid,30)
  1744.   userpkmn(4,18) = pkmn(pid,31)
  1745.   userpkmn(4,19) = pkmn(pid,32)
  1746.   userpkmn(4,20) = pkmn(pid,20)
  1747.   userpkmn(4,21) = pkmn(pid,21)
  1748.   userpkmn(4,22) = pkmn(pid,22)
  1749.   userpkmn(4,23) = pkmn(pid,23)
  1750.   userpkmn(4,24) = pkmn(pid,24)
  1751.   userpkmn(4,25) = pkmn(pid,25)
  1752.   userpkmn(4,26) = pkmn(pid,26)
  1753.   userpkmn(4,27) = pkmn(pid,27)
  1754.   userpkmn(4,28) = pkmn(pid,28)
  1755.   userpkmn(4,29) = healthcalc(pid)
  1756.   userpkmn(4,30) = 0
  1757. end sub
  1758. sub userpokemon5in
  1759.   userpokemonname$(5) = pokemonname$(pid)
  1760.   userpkmn(5,1) = healthcalc(pid)
  1761.   userpkmn(5,2) = attackcalc(pid)
  1762.   userpkmn(5,3) = defensecalc(pid)
  1763.   userpkmn(5,4) = specialattackcalc(pid)
  1764.   userpkmn(5,5) = specialdefensecalc(pid)
  1765.   userpkmn(5,6) = speedcalc(pid)
  1766.   userpkmn(5,7) = pkmn(pid,7)
  1767.   userpkmn(5,8) = pkmn(pid,8)
  1768.   userpkmn(5,9) = pkmn(pid,9)
  1769.   userpkmn(5,10) = pkmn(pid,10)
  1770.   userpkmn(5,11) = pkmn(pid,11)
  1771.   userpkmn(5,12) = pkmn(pid,12)
  1772.   userpkmn(5,13) = pkmn(pid,13)
  1773.   userpkmn(5,14) = 100
  1774.   userpkmn(5,15) = 100
  1775.   userpkmn(5,16) = pkmn(pid,29)
  1776.   userpkmn(5,17) = pkmn(pid,30)
  1777.   userpkmn(5,18) = pkmn(pid,31)
  1778.   userpkmn(5,19) = pkmn(pid,32)
  1779.   userpkmn(5,20) = pkmn(pid,20)
  1780.   userpkmn(5,21) = pkmn(pid,21)
  1781.   userpkmn(5,22) = pkmn(pid,22)
  1782.   userpkmn(5,23) = pkmn(pid,23)
  1783.   userpkmn(5,24) = pkmn(pid,24)
  1784.   userpkmn(5,25) = pkmn(pid,25)
  1785.   userpkmn(5,26) = pkmn(pid,26)
  1786.   userpkmn(5,27) = pkmn(pid,27)
  1787.   userpkmn(5,28) = pkmn(pid,28)
  1788.   userpkmn(5,29) = healthcalc(pid)
  1789.   userpkmn(5,30) = 0
  1790. end sub
  1791. sub userpokemon6in
  1792.   userpokemonname$(6) = pokemonname$(pid)
  1793.   userpkmn(6,1) = healthcalc(pid)
  1794.   userpkmn(6,2) = attackcalc(pid)
  1795.   userpkmn(6,3) = defensecalc(pid)
  1796.   userpkmn(6,4) = specialattackcalc(pid)
  1797.   userpkmn(6,5) = specialdefensecalc(pid)
  1798.   userpkmn(6,6) = speedcalc(pid)
  1799.   userpkmn(6,7) = pkmn(pid,7)
  1800.   userpkmn(6,8) = pkmn(pid,8)
  1801.   userpkmn(6,9) = pkmn(pid,9)
  1802.   userpkmn(6,10) = pkmn(pid,10)
  1803.   userpkmn(6,11) = pkmn(pid,11)
  1804.   userpkmn(6,12) = pkmn(pid,12)
  1805.   userpkmn(6,13) = pkmn(pid,13)
  1806.   userpkmn(6,14) = 100
  1807.   userpkmn(6,15) = 100
  1808.   userpkmn(6,16) = pkmn(pid,29)
  1809.   userpkmn(6,17) = pkmn(pid,30)
  1810.   userpkmn(6,18) = pkmn(pid,31)
  1811.   userpkmn(6,19) = pkmn(pid,32)
  1812.   userpkmn(6,20) = pkmn(pid,20)
  1813.   userpkmn(6,21) = pkmn(pid,21)
  1814.   userpkmn(6,22) = pkmn(pid,22)
  1815.   userpkmn(6,23) = pkmn(pid,23)
  1816.   userpkmn(6,24) = pkmn(pid,24)
  1817.   userpkmn(6,25) = pkmn(pid,25)
  1818.   userpkmn(6,26) = pkmn(pid,26)
  1819.   userpkmn(6,27) = pkmn(pid,27)
  1820.   userpkmn(6,28) = pkmn(pid,28)
  1821.   userpkmn(6,29) = healthcalc(pid)
  1822.   userpkmn(6,30) = 0
  1823. end sub
  1824. sub cpupokemon1in
  1825.   cpupokemonname$(1) = pokemonname$(pid)  'name
  1826.   cpupkmn(1,1) = healthcalc(pid)          'hp
  1827.   cpupkmn(1,2) = attackcalc(pid)          'atk
  1828.   cpupkmn(1,3) = defensecalc(pid)         'def
  1829.   cpupkmn(1,4) = specialattackcalc(pid)   'spatk
  1830.   cpupkmn(1,5) = specialdefensecalc(pid)  'spdef
  1831.   cpupkmn(1,6) = speedcalc(pid)           'speed
  1832.   cpupkmn(1,7) = pkmn(pid,7)              'level
  1833.   cpupkmn(1,8) = pkmn(pid,8)              'hpevgain
  1834.   cpupkmn(1,9) = pkmn(pid,9)              'atkevgain
  1835.   cpupkmn(1,10) = pkmn(pid,10)            'defevgain
  1836.   cpupkmn(1,11) = pkmn(pid,11)            'spatkevgain
  1837.   cpupkmn(1,12) = pkmn(pid,12)            'spdefevgain
  1838.   cpupkmn(1,13) = pkmn(pid,13)            'speedevgain
  1839.   cpupkmn(1,14) = 100                     'accuravy
  1840.   cpupkmn(1,15) = 100                     'evasion
  1841.   cpupkmn(1,16) = pkmn(pid,29)            'move1
  1842.   cpupkmn(1,17) = pkmn(pid,30)            'move2
  1843.   cpupkmn(1,18) = pkmn(pid,31)            'move3
  1844.   cpupkmn(1,19) = pkmn(pid,32)            'move4
  1845.   cpupkmn(1,20) = pkmn(pid,20)            'type1
  1846.   cpupkmn(1,21) = pkmn(pid,21)            'type2
  1847.   cpupkmn(1,22) = pkmn(pid,22)            'nature
  1848.   cpupkmn(1,23) = pkmn(pid,23)            'hpev
  1849.   cpupkmn(1,24) = pkmn(pid,24)            'atkev
  1850.   cpupkmn(1,25) = pkmn(pid,25)            'defev
  1851.   cpupkmn(1,26) = pkmn(pid,26)            'spatkev
  1852.   cpupkmn(1,27) = pkmn(pid,27)            'spdefev
  1853.   cpupkmn(1,28) = pkmn(pid,28)            'speedev
  1854.   cpupkmn(1,29) = healthcalc(pid)         'maxhp
  1855.   cpupkmn(1,30) = 0                       'exp
  1856. end sub
  1857. sub cpupokemon2in
  1858.   cpupokemonname$(2) = pokemonname$(pid)
  1859.   cpupkmn(2,1) = healthcalc(pid)
  1860.   cpupkmn(2,2) = attackcalc(pid)
  1861.   cpupkmn(2,3) = defensecalc(pid)
  1862.   cpupkmn(2,4) = specialattackcalc(pid)
  1863.   cpupkmn(2,5) = specialdefensecalc(pid)
  1864.   cpupkmn(2,6) = speedcalc(pid)
  1865.   cpupkmn(2,7) = pkmn(pid,7)
  1866.   cpupkmn(2,8) = pkmn(pid,8)
  1867.   cpupkmn(2,9) = pkmn(pid,9)
  1868.   cpupkmn(2,10) = pkmn(pid,10)
  1869.   cpupkmn(2,11) = pkmn(pid,11)
  1870.   cpupkmn(2,12) = pkmn(pid,12)
  1871.   cpupkmn(2,13) = pkmn(pid,13)
  1872.   cpupkmn(2,14) = 100
  1873.   cpupkmn(2,15) = 100
  1874.   cpupkmn(2,16) = pkmn(pid,29)
  1875.   cpupkmn(2,17) = pkmn(pid,30)
  1876.   cpupkmn(2,18) = pkmn(pid,31)
  1877.   cpupkmn(2,19) = pkmn(pid,32)
  1878.   cpupkmn(2,20) = pkmn(pid,20)
  1879.   cpupkmn(2,21) = pkmn(pid,21)
  1880.   cpupkmn(2,22) = pkmn(pid,22)
  1881.   cpupkmn(2,23) = pkmn(pid,23)
  1882.   cpupkmn(2,24) = pkmn(pid,24)
  1883.   cpupkmn(2,25) = pkmn(pid,25)
  1884.   cpupkmn(2,26) = pkmn(pid,26)
  1885.   cpupkmn(2,27) = pkmn(pid,27)
  1886.   cpupkmn(2,28) = pkmn(pid,28)
  1887.   cpupkmn(2,29) = healthcalc(pid)
  1888.   cpupkmn(2,30) = 0
  1889. end sub
  1890. sub cpupokemon3in
  1891.   cpupokemonname$(3) = pokemonname$(pid)
  1892.   cpupkmn(3,1) = healthcalc(pid)
  1893.   cpupkmn(3,2) = attackcalc(pid)
  1894.   cpupkmn(3,3) = defensecalc(pid)
  1895.   cpupkmn(3,4) = specialattackcalc(pid)
  1896.   cpupkmn(3,5) = specialdefensecalc(pid)
  1897.   cpupkmn(3,6) = speedcalc(pid)
  1898.   cpupkmn(3,7) = pkmn(pid,7)
  1899.   cpupkmn(3,8) = pkmn(pid,8)
  1900.   cpupkmn(3,9) = pkmn(pid,9)
  1901.   cpupkmn(3,10) = pkmn(pid,10)
  1902.   cpupkmn(3,11) = pkmn(pid,11)
  1903.   cpupkmn(3,12) = pkmn(pid,12)
  1904.   cpupkmn(3,13) = pkmn(pid,13)
  1905.   cpupkmn(3,14) = 100
  1906.   cpupkmn(3,15) = 100
  1907.   cpupkmn(3,16) = pkmn(pid,29)
  1908.   cpupkmn(3,17) = pkmn(pid,30)
  1909.   cpupkmn(3,18) = pkmn(pid,31)
  1910.   cpupkmn(3,19) = pkmn(pid,32)
  1911.   cpupkmn(3,20) = pkmn(pid,20)
  1912.   cpupkmn(3,21) = pkmn(pid,21)
  1913.   cpupkmn(3,22) = pkmn(pid,22)
  1914.   cpupkmn(3,23) = pkmn(pid,23)
  1915.   cpupkmn(3,24) = pkmn(pid,24)
  1916.   cpupkmn(3,25) = pkmn(pid,25)
  1917.   cpupkmn(3,26) = pkmn(pid,26)
  1918.   cpupkmn(3,27) = pkmn(pid,27)
  1919.   cpupkmn(3,28) = pkmn(pid,28)
  1920.   cpupkmn(3,29) = healthcalc(pid)
  1921.   cpupkmn(3,30) = 0
  1922. end sub
  1923. sub cpupokemon4in
  1924.   cpupokemonname$(4) = pokemonname$(pid)
  1925.   cpupkmn(4,1) = healthcalc(pid)
  1926.   cpupkmn(4,2) = attackcalc(pid)
  1927.   cpupkmn(4,3) = defensecalc(pid)
  1928.   cpupkmn(4,4) = specialattackcalc(pid)
  1929.   cpupkmn(4,5) = specialdefensecalc(pid)
  1930.   cpupkmn(4,6) = speedcalc(pid)
  1931.   cpupkmn(4,7) = pkmn(pid,7)
  1932.   cpupkmn(4,8) = pkmn(pid,8)
  1933.   cpupkmn(4,9) = pkmn(pid,9)
  1934.   cpupkmn(4,10) = pkmn(pid,10)
  1935.   cpupkmn(4,11) = pkmn(pid,11)
  1936.   cpupkmn(4,12) = pkmn(pid,12)
  1937.   cpupkmn(4,13) = pkmn(pid,13)
  1938.   cpupkmn(4,14) = 100
  1939.   cpupkmn(4,15) = 100
  1940.   cpupkmn(4,16) = pkmn(pid,29)
  1941.   cpupkmn(4,17) = pkmn(pid,30)
  1942.   cpupkmn(4,18) = pkmn(pid,31)
  1943.   cpupkmn(4,19) = pkmn(pid,32)
  1944.   cpupkmn(4,20) = pkmn(pid,20)
  1945.   cpupkmn(4,21) = pkmn(pid,21)
  1946.   cpupkmn(4,22) = pkmn(pid,22)
  1947.   cpupkmn(4,23) = pkmn(pid,23)
  1948.   cpupkmn(4,24) = pkmn(pid,24)
  1949.   cpupkmn(4,25) = pkmn(pid,25)
  1950.   cpupkmn(4,26) = pkmn(pid,26)
  1951.   cpupkmn(4,27) = pkmn(pid,27)
  1952.   cpupkmn(4,28) = pkmn(pid,28)
  1953.   cpupkmn(4,29) = healthcalc(pid)
  1954.   cpupkmn(4,30) = 0
  1955. end sub
  1956. sub cpupokemon5in
  1957.   cpupokemonname$(5) = pokemonname$(pid)
  1958.   cpupkmn(5,1) = healthcalc(pid)
  1959.   cpupkmn(5,2) = attackcalc(pid)
  1960.   cpupkmn(5,3) = defensecalc(pid)
  1961.   cpupkmn(5,4) = specialattackcalc(pid)
  1962.   cpupkmn(5,5) = specialdefensecalc(pid)
  1963.   cpupkmn(5,6) = speedcalc(pid)
  1964.   cpupkmn(5,7) = pkmn(pid,7)
  1965.   cpupkmn(5,8) = pkmn(pid,8)
  1966.   cpupkmn(5,9) = pkmn(pid,9)
  1967.   cpupkmn(5,10) = pkmn(pid,10)
  1968.   cpupkmn(5,11) = pkmn(pid,11)
  1969.   cpupkmn(5,12) = pkmn(pid,12)
  1970.   cpupkmn(5,13) = pkmn(pid,13)
  1971.   cpupkmn(5,14) = 100
  1972.   cpupkmn(5,15) = 100
  1973.   cpupkmn(5,16) = pkmn(pid,29)
  1974.   cpupkmn(5,17) = pkmn(pid,30)
  1975.   cpupkmn(5,18) = pkmn(pid,31)
  1976.   cpupkmn(5,19) = pkmn(pid,32)
  1977.   cpupkmn(5,20) = pkmn(pid,20)
  1978.   cpupkmn(5,21) = pkmn(pid,21)
  1979.   cpupkmn(5,22) = pkmn(pid,22)
  1980.   cpupkmn(5,23) = pkmn(pid,23)
  1981.   cpupkmn(5,24) = pkmn(pid,24)
  1982.   cpupkmn(5,25) = pkmn(pid,25)
  1983.   cpupkmn(5,26) = pkmn(pid,26)
  1984.   cpupkmn(5,27) = pkmn(pid,27)
  1985.   cpupkmn(5,28) = pkmn(pid,28)
  1986.   cpupkmn(5,29) = healthcalc(pid)
  1987.   cpupkmn(5,30) = 0
  1988. end sub
  1989. sub cpupokemon6in
  1990.   cpupokemonname$(6) = pokemonname$(pid)
  1991.   cpupkmn(6,1) = healthcalc(pid)
  1992.   cpupkmn(6,2) = attackcalc(pid)
  1993.   cpupkmn(6,3) = defensecalc(pid)
  1994.   cpupkmn(6,4) = specialattackcalc(pid)
  1995.   cpupkmn(6,5) = specialdefensecalc(pid)
  1996.   cpupkmn(6,6) = speedcalc(pid)
  1997.   cpupkmn(6,7) = pkmn(pid,7)
  1998.   cpupkmn(6,8) = pkmn(pid,8)
  1999.   cpupkmn(6,9) = pkmn(pid,9)
  2000.   cpupkmn(6,10) = pkmn(pid,10)
  2001.   cpupkmn(6,11) = pkmn(pid,11)
  2002.   cpupkmn(6,12) = pkmn(pid,12)
  2003.   cpupkmn(6,13) = pkmn(pid,13)
  2004.   cpupkmn(6,14) = 100
  2005.   cpupkmn(6,15) = 100
  2006.   cpupkmn(6,16) = pkmn(pid,29)
  2007.   cpupkmn(6,17) = pkmn(pid,30)
  2008.   cpupkmn(6,18) = pkmn(pid,31)
  2009.   cpupkmn(6,19) = pkmn(pid,32)
  2010.   cpupkmn(6,20) = pkmn(pid,20)
  2011.   cpupkmn(6,21) = pkmn(pid,21)
  2012.   cpupkmn(6,22) = pkmn(pid,22)
  2013.   cpupkmn(6,23) = pkmn(pid,23)
  2014.   cpupkmn(6,24) = pkmn(pid,24)
  2015.   cpupkmn(6,25) = pkmn(pid,25)
  2016.   cpupkmn(6,26) = pkmn(pid,26)
  2017.   cpupkmn(6,27) = pkmn(pid,27)
  2018.   cpupkmn(6,28) = pkmn(pid,28)
  2019.   cpupkmn(6,29) = healthcalc(pid)
  2020.   cpupkmn(6,30) = 0
  2021. end sub
  2022.  
  2023. sub normaleffectivecpuattack
  2024.   if userpkmn(1, 20) = 6 then cet = cet - 1
  2025.   if userpkmn(1, 20) = 9 then cet = cet - 1
  2026.   if userpkmn(1, 20) = 8 then cet = cet * 0
  2027.   if userpkmn(1, 21) = 6 then cet = cet - 1
  2028.   if userpkmn(1, 21) = 9 then cet = cet - 1
  2029.   if userpkmn(1, 21) = 8 then cet = cet * 0
  2030. end sub
  2031.  
  2032. sub fightingeffectivecpuattack
  2033.   if userpkmn(1, 20) = 1 then cet = cet + 1
  2034.   if userpkmn(1, 20) = 6 then cet = cet + 1
  2035.   if userpkmn(1, 20) = 9 then cet = cet + 1
  2036.   if userpkmn(1, 20) = 15 then cet = cet + 1
  2037.   if userpkmn(1, 20) = 17 then cet = cet + 1
  2038.   if userpkmn(1, 20) = 3 then cet = cet - 1
  2039.   if userpkmn(1, 20) = 4 then cet = cet - 1
  2040.   if userpkmn(1, 20) = 7 then cet = cet - 1
  2041.   if userpkmn(1, 20) = 14 then cet = cet - 1
  2042.   if userpkmn(1, 20) = 18 then cet = cet - 1
  2043.   if userpkmn(1, 20) = 8 then cet = cet * 0
  2044.   if userpkmn(1, 21) = 1 then cet = cet + 1
  2045.   if userpkmn(1, 21) = 6 then cet = cet + 1
  2046.   if userpkmn(1, 21) = 9 then cet = cet + 1
  2047.   if userpkmn(1, 21) = 15 then cet = cet + 1
  2048.   if userpkmn(1, 21) = 17 then cet = cet + 1
  2049.   if userpkmn(1, 21) = 3 then cet = cet - 1
  2050.   if userpkmn(1, 21) = 4 then cet = cet - 1
  2051.   if userpkmn(1, 21) = 7 then cet = cet - 1
  2052.   if userpkmn(1, 21) = 14 then cet = cet - 1
  2053.   if userpkmn(1, 21) = 18 then cet = cet - 1
  2054.   if userpkmn(1, 21) = 8 then cet = cet * 0
  2055. end sub
  2056.  
  2057. sub flyingeffectivecpuattack
  2058.   if userpkmn(1, 20) = 2 then cet = cet + 1
  2059.   if userpkmn(1, 20) = 7 then cet = cet + 1
  2060.   if userpkmn(1, 20) = 12 then cet = cet + 1
  2061.   if userpkmn(1, 20) = 6 then cet = cet - 1
  2062.   if userpkmn(1, 20) = 9 then cet = cet - 1
  2063.   if userpkmn(1, 20) = 10 then cet = cet - 1
  2064.   if userpkmn(1, 21) = 2 then cet = cet + 1
  2065.   if userpkmn(1, 21) = 7 then cet = cet + 1
  2066.   if userpkmn(1, 21) = 12 then cet = cet + 1
  2067.   if userpkmn(1, 21) = 6 then cet = cet - 1
  2068.   if userpkmn(1, 21) = 9 then cet = cet - 1
  2069.   if userpkmn(1, 21) = 10 then cet = cet - 1
  2070. end sub
  2071.  
  2072. sub poisoneffectivecpuattack
  2073.   if userpkmn(1, 20) = 12 then cet = cet + 1
  2074.   if userpkmn(1, 20) = 18 then cet = cet + 1
  2075.   if userpkmn(1, 20) = 4 then cet = cet - 1
  2076.   if userpkmn(1, 20) = 5 then cet = cet - 1
  2077.   if userpkmn(1, 20) = 6 then cet = cet - 1
  2078.   if userpkmn(1, 20) = 8 then cet = cet - 1
  2079.   if userpkmn(1, 20) = 9 then cet = cet * 0
  2080.   if userpkmn(1, 21) = 12 then cet = cet + 1
  2081.   if userpkmn(1, 21) = 18 then cet = cet + 1
  2082.   if userpkmn(1, 21) = 4 then cet = cet - 1
  2083.   if userpkmn(1, 21) = 5 then cet = cet - 1
  2084.   if userpkmn(1, 21) = 6 then cet = cet - 1
  2085.   if userpkmn(1, 21) = 8 then cet = cet - 1
  2086.   if userpkmn(1, 21) = 9 then cet = cet * 0
  2087. end sub
  2088.  
  2089. sub groundeffectivecpuattack
  2090.   if userpkmn(1, 20) = 4 then cet = cet + 1
  2091.   if userpkmn(1, 20) = 6 then cet = cet + 1
  2092.   if userpkmn(1, 20) = 9 then cet = cet + 1
  2093.   if userpkmn(1, 20) = 10 then cet = cet + 1
  2094.   if userpkmn(1, 20) = 13 then cet = cet + 1
  2095.   if userpkmn(1, 20) = 7 then cet = cet - 1
  2096.   if userpkmn(1, 20) = 11 then cet = cet - 1
  2097.   if userpkmn(1, 20) = 3 then cet = cet * 0
  2098.   if userpkmn(1, 21) = 4 then cet = cet + 1
  2099.   if userpkmn(1, 21) = 6 then cet = cet + 1
  2100.   if userpkmn(1, 21) = 9 then cet = cet + 1
  2101.   if userpkmn(1, 21) = 10 then cet = cet + 1
  2102.   if userpkmn(1, 21) = 13 then cet = cet + 1
  2103.   if userpkmn(1, 21) = 7 then cet = cet - 1
  2104.   if userpkmn(1, 21) = 11 then cet = cet - 1
  2105.   if userpkmn(1, 21) = 3 then cet = cet * 0
  2106. end sub
  2107.  
  2108. sub rockeffectivecpuattack
  2109.   if userpkmn(1, 20) = 3 then cet = cet + 1
  2110.   if userpkmn(1, 20) = 7 then cet = cet + 1
  2111.   if userpkmn(1, 20) = 10 then cet = cet + 1
  2112.   if userpkmn(1, 20) = 15 then cet = cet + 1
  2113.   if userpkmn(1, 20) = 2 then cet = cet - 1
  2114.   if userpkmn(1, 20) = 5 then cet = cet - 1
  2115.   if userpkmn(1, 20) = 9 then cet = cet - 1
  2116.   if userpkmn(1, 21) = 3 then cet = cet + 1
  2117.   if userpkmn(1, 21) = 7 then cet = cet + 1
  2118.   if userpkmn(1, 21) = 10 then cet = cet + 1
  2119.   if userpkmn(1, 21) = 15 then cet = cet + 1
  2120.   if userpkmn(1, 21) = 2 then cet = cet - 1
  2121.   if userpkmn(1, 21) = 5 then cet = cet - 1
  2122.   if userpkmn(1, 21) = 9 then cet = cet - 1
  2123. end sub
  2124.  
  2125. sub bugeffectivecpuattack
  2126.   if userpkmn(1, 20) = 12 then cet = cet + 1
  2127.   if userpkmn(1, 20) = 14 then cet = cet + 1
  2128.   if userpkmn(1, 20) = 17 then cet = cet + 1
  2129.   if userpkmn(1, 20) = 2 then cet = cet - 1
  2130.   if userpkmn(1, 20) = 3 then cet = cet - 1
  2131.   if userpkmn(1, 20) = 4 then cet = cet - 1
  2132.   if userpkmn(1, 20) = 8 then cet = cet - 1
  2133.   if userpkmn(1, 20) = 9 then cet = cet - 1
  2134.   if userpkmn(1, 20) = 10 then cet = cet - 1
  2135.   if userpkmn(1, 20) = 18 then cet = cet - 1
  2136.   if userpkmn(1, 21) = 12 then cet = cet + 1
  2137.   if userpkmn(1, 21) = 14 then cet = cet + 1
  2138.   if userpkmn(1, 21) = 17 then cet = cet + 1
  2139.   if userpkmn(1, 21) = 2 then cet = cet - 1
  2140.   if userpkmn(1, 21) = 3 then cet = cet - 1
  2141.   if userpkmn(1, 21) = 4 then cet = cet - 1
  2142.   if userpkmn(1, 21) = 8 then cet = cet - 1
  2143.   if userpkmn(1, 21) = 9 then cet = cet - 1
  2144.   if userpkmn(1, 21) = 10 then cet = cet - 1
  2145.   if userpkmn(1, 21) = 18 then cet = cet - 1
  2146. end sub
  2147.  
  2148. sub ghosteffectivecpuattack
  2149.   if userpkmn(1, 20) = 8 then cet = cet + 1
  2150.   if userpkmn(1, 20) = 14 then cet = cet + 1
  2151.   if userpkmn(1, 20) = 17 then cet = cet - 1
  2152.   if userpkmn(1, 20) = 1 then cet = cet * 0
  2153.   if userpkmn(1, 21) = 8 then cet = cet + 1
  2154.   if userpkmn(1, 21) = 14 then cet = cet + 1
  2155.   if userpkmn(1, 21) = 17 then cet = cet - 1
  2156.   if userpkmn(1, 21) = 1 then cet = cet * 0
  2157. end sub
  2158.  
  2159. sub steeleffectivecpuattack
  2160.   if userpkmn(1, 20) = 6 then cet = cet + 1
  2161.   if userpkmn(1, 20) = 15 then cet = cet + 1
  2162.   if userpkmn(1, 20) = 18 then cet = cet + 1
  2163.   if userpkmn(1, 20) = 9 then cet = cet - 1
  2164.   if userpkmn(1, 20) = 10 then cet = cet - 1
  2165.   if userpkmn(1, 20) = 11 then cet = cet - 1
  2166.   if userpkmn(1, 20) = 13 then cet = cet - 1
  2167.   if userpkmn(1, 21) = 6 then cet = cet + 1
  2168.   if userpkmn(1, 21) = 15 then cet = cet + 1
  2169.   if userpkmn(1, 21) = 18 then cet = cet + 1
  2170.   if userpkmn(1, 21) = 9 then cet = cet - 1
  2171.   if userpkmn(1, 21) = 10 then cet = cet - 1
  2172.   if userpkmn(1, 21) = 11 then cet = cet - 1
  2173.   if userpkmn(1, 21) = 13 then cet = cet - 1
  2174. end sub
  2175.  
  2176. sub fireeffectivecpuattack
  2177.   if userpkmn(1, 20) = 7 then cet = cet + 1
  2178.   if userpkmn(1, 20) = 9 then cet = cet + 1
  2179.   if userpkmn(1, 20) = 12 then cet = cet + 1
  2180.   if userpkmn(1, 20) = 15 then cet = cet + 1
  2181.   if userpkmn(1, 20) = 6 then cet = cet - 1
  2182.   if userpkmn(1, 20) = 10 then cet = cet - 1
  2183.   if userpkmn(1, 20) = 11 then cet = cet - 1
  2184.   if userpkmn(1, 20) = 16 then cet = cet - 1
  2185.   if userpkmn(1, 21) = 7 then cet = cet + 1
  2186.   if userpkmn(1, 21) = 9 then cet = cet + 1
  2187.   if userpkmn(1, 21) = 12 then cet = cet + 1
  2188.   if userpkmn(1, 21) = 15 then cet = cet + 1
  2189.   if userpkmn(1, 21) = 6 then cet = cet - 1
  2190.   if userpkmn(1, 21) = 10 then cet = cet - 1
  2191.   if userpkmn(1, 21) = 11 then cet = cet - 1
  2192.   if userpkmn(1, 21) = 16 then cet = cet - 1
  2193. end sub
  2194.  
  2195. sub watereffectivecpuattack
  2196.   if userpkmn(1, 20) = 5 then cet = cet + 1
  2197.   if userpkmn(1, 20) = 6 then cet = cet + 1
  2198.   if userpkmn(1, 20) = 10 then cet = cet + 1
  2199.   if userpkmn(1, 20) = 11 then cet = cet - 1
  2200.   if userpkmn(1, 20) = 12 then cet = cet - 1
  2201.   if userpkmn(1, 20) = 16 then cet = cet - 1
  2202.   if userpkmn(1, 21) = 5 then cet = cet + 1
  2203.   if userpkmn(1, 21) = 6 then cet = cet + 1
  2204.   if userpkmn(1, 21) = 10 then cet = cet + 1
  2205.   if userpkmn(1, 21) = 11 then cet = cet - 1
  2206.   if userpkmn(1, 21) = 12 then cet = cet - 1
  2207.   if userpkmn(1, 21) = 16 then cet = cet - 1
  2208. end sub
  2209.  
  2210. sub grasseffectivecpuattack
  2211.   if userpkmn(1, 20) = 5 then cet = cet + 1
  2212.   if userpkmn(1, 20) = 6 then cet = cet + 1
  2213.   if userpkmn(1, 20) = 11 then cet = cet + 1
  2214.   if userpkmn(1, 20) = 3 then cet = cet - 1
  2215.   if userpkmn(1, 20) = 4 then cet = cet - 1
  2216.   if userpkmn(1, 20) = 7 then cet = cet - 1
  2217.   if userpkmn(1, 20) = 9 then cet = cet - 1
  2218.   if userpkmn(1, 20) = 10 then cet = cet - 1
  2219.   if userpkmn(1, 20) = 12 then cet = cet - 1
  2220.   if userpkmn(1, 20) = 16 then cet = cet - 1
  2221.   if userpkmn(1, 21) = 5 then cet = cet + 1
  2222.   if userpkmn(1, 21) = 6 then cet = cet + 1
  2223.   if userpkmn(1, 21) = 11 then cet = cet + 1
  2224.   if userpkmn(1, 21) = 3 then cet = cet - 1
  2225.   if userpkmn(1, 21) = 4 then cet = cet - 1
  2226.   if userpkmn(1, 21) = 7 then cet = cet - 1
  2227.   if userpkmn(1, 21) = 9 then cet = cet - 1
  2228.   if userpkmn(1, 21) = 10 then cet = cet - 1
  2229.   if userpkmn(1, 21) = 12 then cet = cet - 1
  2230.   if userpkmn(1, 21) = 16 then cet = cet - 1
  2231. end sub
  2232.  
  2233. sub electriceffectivecpuattack
  2234.   if userpkmn(1, 20) = 3 then cet = cet + 1
  2235.   if userpkmn(1, 20) = 12 then cet = cet + 1
  2236.   if userpkmn(1, 20) = 13 then cet = cet - 1
  2237.   if userpkmn(1, 20) = 14 then cet = cet - 1
  2238.   if userpkmn(1, 20) = 16 then cet = cet - 1
  2239.   if userpkmn(1, 20) = 5 then cet = cet * 0
  2240.   if userpkmn(1, 21) = 3 then cet = cet + 1
  2241.   if userpkmn(1, 21) = 12 then cet = cet + 1
  2242.   if userpkmn(1, 21) = 13 then cet = cet - 1
  2243.   if userpkmn(1, 21) = 14 then cet = cet - 1
  2244.   if userpkmn(1, 21) = 16 then cet = cet - 1
  2245.   if userpkmn(1, 21) = 5 then cet = cet * 0
  2246. end sub
  2247.  
  2248. sub psychiceffectivecpuattack
  2249.   if userpkmn(1, 20) = 2  then cet = cet + 1
  2250.   if userpkmn(1, 20) = 4 then cet = cet + 1
  2251.   if userpkmn(1, 20) = 9 then cet = cet - 1
  2252.   if userpkmn(1, 20) = 14 then cet = cet - 1
  2253.   if userpkmn(1, 20) = 17 then cet = cet * 0
  2254.   if userpkmn(1, 21) = 2  then cet = cet + 1
  2255.   if userpkmn(1, 21) = 4 then cet = cet + 1
  2256.   if userpkmn(1, 21) = 9 then cet = cet - 1
  2257.   if userpkmn(1, 21) = 14 then cet = cet - 1
  2258.   if userpkmn(1, 21) = 17 then cet = cet * 0
  2259. end sub
  2260.  
  2261. sub iceeffectivecpuattack
  2262.   if userpkmn(1, 20) = 3 then cet = cet + 1
  2263.   if userpkmn(1, 20) = 5 then cet = cet + 1
  2264.   if userpkmn(1, 20) = 12 then cet = cet + 1
  2265.   if userpkmn(1, 20) = 16 then cet = cet + 1
  2266.   if userpkmn(1, 20) = 9 then cet = cet - 1
  2267.   if userpkmn(1, 20) = 10 then cet = cet - 1
  2268.   if userpkmn(1, 20) = 11 then cet = cet - 1
  2269.   if userpkmn(1, 20) = 15 then cet = cet - 1
  2270.   if userpkmn(1, 21) = 3 then cet = cet + 1
  2271.   if userpkmn(1, 21) = 5 then cet = cet + 1
  2272.   if userpkmn(1, 21) = 12 then cet = cet + 1
  2273.   if userpkmn(1, 21) = 16 then cet = cet + 1
  2274.   if userpkmn(1, 21) = 9 then cet = cet - 1
  2275.   if userpkmn(1, 21) = 10 then cet = cet - 1
  2276.   if userpkmn(1, 21) = 11 then cet = cet - 1
  2277.   if userpkmn(1, 21) = 15 then cet = cet - 1
  2278. end sub
  2279.  
  2280. sub dragoneffectivecpuattack
  2281.   if userpkmn(1, 20) = 16 then cet = cet + 1
  2282.   if userpkmn(1, 20) = 9 then cet = cet - 1
  2283.   if userpkmn(1, 20) = 18 then cet = cet * 0
  2284.   if userpkmn(1, 21) = 16 then cet = cet + 1
  2285.   if userpkmn(1, 21) = 9 then cet = cet - 1
  2286.   if userpkmn(1, 21) = 18 then cet = cet * 0
  2287. end sub
  2288.  
  2289. sub darkeffectivecpuattack
  2290.   if userpkmn(1, 20) = 8 then cet = cet + 1
  2291.   if userpkmn(1, 20) = 13 then cet = cet + 1
  2292.   if userpkmn(1, 20) = 2 then cet = cet - 1
  2293.   if userpkmn(1, 20) = 17 then cet = cet - 1
  2294.   if userpkmn(1, 20) = 18 then cet = cet - 1
  2295.   if userpkmn(1, 21) = 8 then cet = cet + 1
  2296.   if userpkmn(1, 21) = 13 then cet = cet + 1
  2297.   if userpkmn(1, 21) = 2 then cet = cet - 1
  2298.   if userpkmn(1, 21) = 17 then cet = cet - 1
  2299.   if userpkmn(1, 21) = 18 then cet = cet - 1
  2300. end sub
  2301.  
  2302. sub fairyeffectivecpuattack
  2303.   if userpkmn(1, 20) = 2 then cet = cet + 1
  2304.   if userpkmn(1, 20) = 16 then cet = cet + 1
  2305.   if userpkmn(1, 20) = 17 then cet = cet + 1
  2306.   if userpkmn(1, 20) = 4 then cet = cet - 1
  2307.   if userpkmn(1, 20) = 9 then cet = cet - 1
  2308.   if userpkmn(1, 20) = 10 then cet = cet - 1
  2309.   if userpkmn(1, 21) = 2 then cet = cet + 1
  2310.   if userpkmn(1, 21) = 16 then cet = cet + 1
  2311.   if userpkmn(1, 21) = 17 then cet = cet + 1
  2312.   if userpkmn(1, 21) = 4 then cet = cet - 1
  2313.   if userpkmn(1, 21) = 9 then cet = cet - 1
  2314.   if userpkmn(1, 21) = 10 then cet = cet - 1
  2315. end sub
  2316.  
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322. sub normaleffectiveuserattack
  2323.   if cpupkmn(1, 20) = 6 then uet = uet - 1
  2324.   if cpupkmn(1, 20) = 9 then uet = uet - 1
  2325.   if cpupkmn(1, 20) = 8 then uet = uet * 0
  2326.   if cpupkmn(1, 21) = 6 then uet = uet - 1
  2327.   if cpupkmn(1, 21) = 9 then uet = uet - 1
  2328.   if cpupkmn(1, 21) = 8 then uet = uet * 0
  2329. end sub
  2330.  
  2331. sub fightingeffectiveuserattack
  2332.   if cpupkmn(1, 20) = 1 then uet = uet + 1
  2333.   if cpupkmn(1, 20) = 6 then uet = uet + 1
  2334.   if cpupkmn(1, 20) = 9 then uet = uet + 1
  2335.   if cpupkmn(1, 20) = 15 then uet = uet + 1
  2336.   if cpupkmn(1, 20) = 17 then uet = uet + 1
  2337.   if cpupkmn(1, 20) = 3 then uet = uet - 1
  2338.   if cpupkmn(1, 20) = 4 then uet = uet - 1
  2339.   if cpupkmn(1, 20) = 7 then uet = uet - 1
  2340.   if cpupkmn(1, 20) = 14 then uet = uet - 1
  2341.   if cpupkmn(1, 20) = 18 then uet = uet - 1
  2342.   if cpupkmn(1, 20) = 8 then uet = uet * 0
  2343.   if cpupkmn(1, 21) = 1 then uet = uet + 1
  2344.   if cpupkmn(1, 21) = 6 then uet = uet + 1
  2345.   if cpupkmn(1, 21) = 9 then uet = uet + 1
  2346.   if cpupkmn(1, 21) = 15 then uet = uet + 1
  2347.   if cpupkmn(1, 21) = 17 then uet = uet + 1
  2348.   if cpupkmn(1, 21) = 3 then uet = uet - 1
  2349.   if cpupkmn(1, 21) = 4 then uet = uet - 1
  2350.   if cpupkmn(1, 21) = 7 then uet = uet - 1
  2351.   if cpupkmn(1, 21) = 14 then uet = uet - 1
  2352.   if cpupkmn(1, 21) = 18 then uet = uet - 1
  2353.   if cpupkmn(1, 21) = 8 then uet = uet * 0
  2354. end sub
  2355.  
  2356. sub flyingeffectiveuserattack
  2357.   if cpupkmn(1, 20) = 2 then uet = uet + 1
  2358.   if cpupkmn(1, 20) = 7 then uet = uet + 1
  2359.   if cpupkmn(1, 20) = 12 then uet = uet + 1
  2360.   if cpupkmn(1, 20) = 6 then uet = uet - 1
  2361.   if cpupkmn(1, 20) = 9 then uet = uet - 1
  2362.   if cpupkmn(1, 20) = 10 then uet = uet - 1
  2363.   if cpupkmn(1, 21) = 2 then uet = uet + 1
  2364.   if cpupkmn(1, 21) = 7 then uet = uet + 1
  2365.   if cpupkmn(1, 21) = 12 then uet = uet + 1
  2366.   if cpupkmn(1, 21) = 6 then uet = uet - 1
  2367.   if cpupkmn(1, 21) = 9 then uet = uet - 1
  2368.   if cpupkmn(1, 21) = 10 then uet = uet - 1
  2369. end sub
  2370.  
  2371. sub poisoneffectiveuserattack
  2372.   if cpupkmn(1, 20) = 12 then uet = uet + 1
  2373.   if cpupkmn(1, 20) = 18 then uet = uet + 1
  2374.   if cpupkmn(1, 20) = 4 then uet = uet - 1
  2375.   if cpupkmn(1, 20) = 5 then uet = uet - 1
  2376.   if cpupkmn(1, 20) = 6 then uet = uet - 1
  2377.   if cpupkmn(1, 20) = 8 then uet = uet - 1
  2378.   if cpupkmn(1, 20) = 9 then uet = uet * 0
  2379.   if cpupkmn(1, 21) = 12 then uet = uet + 1
  2380.   if cpupkmn(1, 21) = 18 then uet = uet + 1
  2381.   if cpupkmn(1, 21) = 4 then uet = uet - 1
  2382.   if cpupkmn(1, 21) = 5 then uet = uet - 1
  2383.   if cpupkmn(1, 21) = 6 then uet = uet - 1
  2384.   if cpupkmn(1, 21) = 8 then uet = uet - 1
  2385.   if cpupkmn(1, 21) = 9 then uet = uet * 0
  2386. end sub
  2387.  
  2388. sub groundeffectiveuserattack
  2389.   if cpupkmn(1, 20) = 4 then uet = uet + 1
  2390.   if cpupkmn(1, 20) = 6 then uet = uet + 1
  2391.   if cpupkmn(1, 20) = 9 then uet = uet + 1
  2392.   if cpupkmn(1, 20) = 10 then uet = uet + 1
  2393.   if cpupkmn(1, 20) = 13 then uet = uet + 1
  2394.   if cpupkmn(1, 20) = 7 then uet = uet - 1
  2395.   if cpupkmn(1, 20) = 11 then uet = uet - 1
  2396.   if cpupkmn(1, 20) = 3 then uet = uet * 0
  2397.   if cpupkmn(1, 21) = 4 then uet = uet + 1
  2398.   if cpupkmn(1, 21) = 6 then uet = uet + 1
  2399.   if cpupkmn(1, 21) = 9 then uet = uet + 1
  2400.   if cpupkmn(1, 21) = 10 then uet = uet + 1
  2401.   if cpupkmn(1, 21) = 13 then uet = uet + 1
  2402.   if cpupkmn(1, 21) = 7 then uet = uet - 1
  2403.   if cpupkmn(1, 21) = 11 then uet = uet - 1
  2404.   if cpupkmn(1, 21) = 3 then uet = uet * 0
  2405. end sub
  2406.  
  2407. sub rockeffectiveuserattack
  2408.   if cpupkmn(1, 20) = 3 then uet = uet + 1
  2409.   if cpupkmn(1, 20) = 7 then uet = uet + 1
  2410.   if cpupkmn(1, 20) = 10 then uet = uet + 1
  2411.   if cpupkmn(1, 20) = 15 then uet = uet + 1
  2412.   if cpupkmn(1, 20) = 2 then uet = uet - 1
  2413.   if cpupkmn(1, 20) = 5 then uet = uet - 1
  2414.   if cpupkmn(1, 20) = 9 then uet = uet - 1
  2415.   if cpupkmn(1, 21) = 3 then uet = uet + 1
  2416.   if cpupkmn(1, 21) = 7 then uet = uet + 1
  2417.   if cpupkmn(1, 21) = 10 then uet = uet + 1
  2418.   if cpupkmn(1, 21) = 15 then uet = uet + 1
  2419.   if cpupkmn(1, 21) = 2 then uet = uet - 1
  2420.   if cpupkmn(1, 21) = 5 then uet = uet - 1
  2421.   if cpupkmn(1, 21) = 9 then uet = uet - 1
  2422. end sub
  2423.  
  2424. sub bugeffectiveuserattack
  2425.   if cpupkmn(1, 20) = 12 then uet = uet + 1
  2426.   if cpupkmn(1, 20) = 14 then uet = uet + 1
  2427.   if cpupkmn(1, 20) = 17 then uet = uet + 1
  2428.   if cpupkmn(1, 20) = 2 then uet = uet - 1
  2429.   if cpupkmn(1, 20) = 3 then uet = uet - 1
  2430.   if cpupkmn(1, 20) = 4 then uet = uet - 1
  2431.   if cpupkmn(1, 20) = 8 then uet = uet - 1
  2432.   if cpupkmn(1, 20) = 9 then uet = uet - 1
  2433.   if cpupkmn(1, 20) = 10 then uet = uet - 1
  2434.   if cpupkmn(1, 20) = 18 then uet = uet - 1
  2435.   if cpupkmn(1, 21) = 12 then uet = uet + 1
  2436.   if cpupkmn(1, 21) = 14 then uet = uet + 1
  2437.   if cpupkmn(1, 21) = 17 then uet = uet + 1
  2438.   if cpupkmn(1, 21) = 2 then uet = uet - 1
  2439.   if cpupkmn(1, 21) = 3 then uet = uet - 1
  2440.   if cpupkmn(1, 21) = 4 then uet = uet - 1
  2441.   if cpupkmn(1, 21) = 8 then uet = uet - 1
  2442.   if cpupkmn(1, 21) = 9 then uet = uet - 1
  2443.   if cpupkmn(1, 21) = 10 then uet = uet - 1
  2444.   if cpupkmn(1, 21) = 18 then uet = uet - 1
  2445. end sub
  2446.  
  2447. sub ghosteffectiveuserattack
  2448.   if cpupkmn(1, 20) = 8 then uet = uet + 1
  2449.   if cpupkmn(1, 20) = 14 then uet = uet + 1
  2450.   if cpupkmn(1, 20) = 17 then uet = uet - 1
  2451.   if cpupkmn(1, 20) = 1 then uet = uet * 0
  2452.   if cpupkmn(1, 21) = 8 then uet = uet + 1
  2453.   if cpupkmn(1, 21) = 14 then uet = uet + 1
  2454.   if cpupkmn(1, 21) = 17 then uet = uet - 1
  2455.   if cpupkmn(1, 21) = 1 then uet = uet * 0
  2456. end sub
  2457.  
  2458. sub steeleffectiveuserattack
  2459.   if cpupkmn(1, 20) = 6 then uet = uet + 1
  2460.   if cpupkmn(1, 20) = 15 then uet = uet + 1
  2461.   if cpupkmn(1, 20) = 18 then uet = uet + 1
  2462.   if cpupkmn(1, 20) = 9 then uet = uet - 1
  2463.   if cpupkmn(1, 20) = 10 then uet = uet - 1
  2464.   if cpupkmn(1, 20) = 11 then uet = uet - 1
  2465.   if cpupkmn(1, 20) = 13 then uet = uet - 1
  2466.   if cpupkmn(1, 21) = 6 then uet = uet + 1
  2467.   if cpupkmn(1, 21) = 15 then uet = uet + 1
  2468.   if cpupkmn(1, 21) = 18 then uet = uet + 1
  2469.   if cpupkmn(1, 21) = 9 then uet = uet - 1
  2470.   if cpupkmn(1, 21) = 10 then uet = uet - 1
  2471.   if cpupkmn(1, 21) = 11 then uet = uet - 1
  2472.   if cpupkmn(1, 21) = 13 then uet = uet - 1
  2473. end sub
  2474.  
  2475. sub fireeffectiveuserattack
  2476.   if cpupkmn(1, 20) = 7 then uet = uet + 1
  2477.   if cpupkmn(1, 20) = 9 then uet = uet + 1
  2478.   if cpupkmn(1, 20) = 12 then uet = uet + 1
  2479.   if cpupkmn(1, 20) = 15 then uet = uet + 1
  2480.   if cpupkmn(1, 20) = 6 then uet = uet - 1
  2481.   if cpupkmn(1, 20) = 10 then uet = uet - 1
  2482.   if cpupkmn(1, 20) = 11 then uet = uet - 1
  2483.   if cpupkmn(1, 20) = 16 then uet = uet - 1
  2484.   if cpupkmn(1, 21) = 7 then uet = uet + 1
  2485.   if cpupkmn(1, 21) = 9 then uet = uet + 1
  2486.   if cpupkmn(1, 21) = 12 then uet = uet + 1
  2487.   if cpupkmn(1, 21) = 15 then uet = uet + 1
  2488.   if cpupkmn(1, 21) = 6 then uet = uet - 1
  2489.   if cpupkmn(1, 21) = 10 then uet = uet - 1
  2490.   if cpupkmn(1, 21) = 11 then uet = uet - 1
  2491.   if cpupkmn(1, 21) = 16 then uet = uet - 1
  2492. end sub
  2493.  
  2494. sub watereffectiveuserattack
  2495.   if cpupkmn(1, 20) = 5 then uet = uet + 1
  2496.   if cpupkmn(1, 20) = 6 then uet = uet + 1
  2497.   if cpupkmn(1, 20) = 10 then uet = uet + 1
  2498.   if cpupkmn(1, 20) = 11 then uet = uet - 1
  2499.   if cpupkmn(1, 20) = 12 then uet = uet - 1
  2500.   if cpupkmn(1, 20) = 16 then uet = uet - 1
  2501.   if cpupkmn(1, 21) = 5 then uet = uet + 1
  2502.   if cpupkmn(1, 21) = 6 then uet = uet + 1
  2503.   if cpupkmn(1, 21) = 10 then uet = uet + 1
  2504.   if cpupkmn(1, 21) = 11 then uet = uet - 1
  2505.   if cpupkmn(1, 21) = 12 then uet = uet - 1
  2506.   if cpupkmn(1, 21) = 16 then uet = uet - 1
  2507. end sub
  2508.  
  2509. sub grasseffectiveuserattack
  2510.   if cpupkmn(1, 20) = 5 then uet = uet + 1
  2511.   if cpupkmn(1, 20) = 6 then uet = uet + 1
  2512.   if cpupkmn(1, 20) = 11 then uet = uet + 1
  2513.   if cpupkmn(1, 20) = 3 then uet = uet - 1
  2514.   if cpupkmn(1, 20) = 4 then uet = uet - 1
  2515.   if cpupkmn(1, 20) = 7 then uet = uet - 1
  2516.   if cpupkmn(1, 20) = 9 then uet = uet - 1
  2517.   if cpupkmn(1, 20) = 10 then uet = uet - 1
  2518.   if cpupkmn(1, 20) = 12 then uet = uet - 1
  2519.   if cpupkmn(1, 20) = 16 then uet = uet - 1
  2520.   if cpupkmn(1, 21) = 5 then uet = uet + 1
  2521.   if cpupkmn(1, 21) = 6 then uet = uet + 1
  2522.   if cpupkmn(1, 21) = 11 then uet = uet + 1
  2523.   if cpupkmn(1, 21) = 3 then uet = uet - 1
  2524.   if cpupkmn(1, 21) = 4 then uet = uet - 1
  2525.   if cpupkmn(1, 21) = 7 then uet = uet - 1
  2526.   if cpupkmn(1, 21) = 9 then uet = uet - 1
  2527.   if cpupkmn(1, 21) = 10 then uet = uet - 1
  2528.   if cpupkmn(1, 21) = 12 then uet = uet - 1
  2529.   if cpupkmn(1, 21) = 16 then uet = uet - 1
  2530. end sub
  2531.  
  2532. sub electriceffectiveuserattack
  2533.   if cpupkmn(1, 20) = 3 then uet = uet + 1
  2534.   if cpupkmn(1, 20) = 12 then uet = uet + 1
  2535.   if cpupkmn(1, 20) = 13 then uet = uet - 1
  2536.   if cpupkmn(1, 20) = 14 then uet = uet - 1
  2537.   if cpupkmn(1, 20) = 16 then uet = uet - 1
  2538.   if cpupkmn(1, 20) = 5 then uet = uet * 0
  2539.   if cpupkmn(1, 21) = 3 then uet = uet + 1
  2540.   if cpupkmn(1, 21) = 12 then uet = uet + 1
  2541.   if cpupkmn(1, 21) = 13 then uet = uet - 1
  2542.   if cpupkmn(1, 21) = 14 then uet = uet - 1
  2543.   if cpupkmn(1, 21) = 16 then uet = uet - 1
  2544.   if cpupkmn(1, 21) = 5 then uet = uet * 0
  2545. end sub
  2546.  
  2547. sub psychiceffectiveuserattack
  2548.   if cpupkmn(1, 20) = 2  then uet = uet + 1
  2549.   if cpupkmn(1, 20) = 4 then uet = uet + 1
  2550.   if cpupkmn(1, 20) = 9 then uet = uet - 1
  2551.   if cpupkmn(1, 20) = 14 then uet = uet - 1
  2552.   if cpupkmn(1, 20) = 17 then uet = uet * 0
  2553.   if cpupkmn(1, 21) = 2  then uet = uet + 1
  2554.   if cpupkmn(1, 21) = 4 then uet = uet + 1
  2555.   if cpupkmn(1, 21) = 9 then uet = uet - 1
  2556.   if cpupkmn(1, 21) = 14 then uet = uet - 1
  2557.   if cpupkmn(1, 21) = 17 then uet = uet * 0
  2558. end sub
  2559.  
  2560. sub iceeffectiveuserattack
  2561.   if cpupkmn(1, 20) = 3 then uet = uet + 1
  2562.   if cpupkmn(1, 20) = 5 then uet = uet + 1
  2563.   if cpupkmn(1, 20) = 12 then uet = uet + 1
  2564.   if cpupkmn(1, 20) = 16 then uet = uet + 1
  2565.   if cpupkmn(1, 20) = 9 then uet = uet - 1
  2566.   if cpupkmn(1, 20) = 10 then uet = uet - 1
  2567.   if cpupkmn(1, 20) = 11 then uet = uet - 1
  2568.   if cpupkmn(1, 20) = 15 then uet = uet - 1
  2569.   if cpupkmn(1, 21) = 3 then uet = uet + 1
  2570.   if cpupkmn(1, 21) = 5 then uet = uet + 1
  2571.   if cpupkmn(1, 21) = 12 then uet = uet + 1
  2572.   if cpupkmn(1, 21) = 16 then uet = uet + 1
  2573.   if cpupkmn(1, 21) = 9 then uet = uet - 1
  2574.   if cpupkmn(1, 21) = 10 then uet = uet - 1
  2575.   if cpupkmn(1, 21) = 11 then uet = uet - 1
  2576.   if cpupkmn(1, 21) = 15 then uet = uet - 1
  2577. end sub
  2578.  
  2579. sub dragoneffectiveuserattack
  2580.   if cpupkmn(1, 20) = 16 then uet = uet + 1
  2581.   if cpupkmn(1, 20) = 9 then uet = uet - 1
  2582.   if cpupkmn(1, 20) = 18 then uet = uet * 0
  2583.   if cpupkmn(1, 21) = 16 then uet = uet + 1
  2584.   if cpupkmn(1, 21) = 9 then uet = uet - 1
  2585.   if cpupkmn(1, 21) = 18 then uet = uet * 0
  2586. end sub
  2587.  
  2588. sub darkeffectiveuserattack
  2589.   if cpupkmn(1, 20) = 8 then uet = uet + 1
  2590.   if cpupkmn(1, 20) = 13 then uet = uet + 1
  2591.   if cpupkmn(1, 20) = 2 then uet = uet - 1
  2592.   if cpupkmn(1, 20) = 17 then uet = uet - 1
  2593.   if cpupkmn(1, 20) = 18 then uet = uet - 1
  2594.   if cpupkmn(1, 21) = 8 then uet = uet + 1
  2595.   if cpupkmn(1, 21) = 13 then uet = uet + 1
  2596.   if cpupkmn(1, 21) = 2 then uet = uet - 1
  2597.   if cpupkmn(1, 21) = 17 then uet = uet - 1
  2598.   if cpupkmn(1, 21) = 18 then uet = uet - 1
  2599. end sub
  2600.  
  2601. sub fairyeffectiveuserattack
  2602.   if cpupkmn(1, 20) = 2 then uet = uet + 1
  2603.   if cpupkmn(1, 20) = 16 then uet = uet + 1
  2604.   if cpupkmn(1, 20) = 17 then uet = uet + 1
  2605.   if cpupkmn(1, 20) = 4 then uet = uet - 1
  2606.   if cpupkmn(1, 20) = 9 then uet = uet - 1
  2607.   if cpupkmn(1, 20) = 10 then uet = uet - 1
  2608.   if cpupkmn(1, 21) = 2 then uet = uet + 1
  2609.   if cpupkmn(1, 21) = 16 then uet = uet + 1
  2610.   if cpupkmn(1, 21) = 17 then uet = uet + 1
  2611.   if cpupkmn(1, 21) = 4 then uet = uet - 1
  2612.   if cpupkmn(1, 21) = 9 then uet = uet - 1
  2613.   if cpupkmn(1, 21) = 10 then uet = uet - 1
  2614. end sub
Advertisement
RAW Paste Data Copied
Advertisement