Blazephlozard

some version of TCG TAS duel lua

Jul 12th, 2017
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.20 KB | None | 0 0
  1. local nome = {"Grass_Energy","Fire_Energy","Water_Energy",
  2. "Lightning_Energy","Fighting_Energy","Psychic_Energy","Double_Colorless_Energy",
  3. "Bulbasaur_LV13","Ivysaur_LV20","Venusaur_LV64(CP!_Promo)","Venusaur_LV67",
  4. "Caterpie_LV13","Metapod_LV21","Butterfree_LV28","Weedle_LV12","Kakuna_LV23",
  5. "Beedrill_LV32","Ekans_LV10","Arbok_LV27","Nidoran_Female_LV13","Nidorina_LV24",
  6. "Nidoqueen_LV43","Nidoran_Male_LV20","Nidorino_LV25","Nidoking_LV48","Zubat_LV10",
  7. "Golbat_LV29","Oddish_LV8","Gloom_LV22","Vileplume_LV35","Paras_LV8",
  8. "Parasect_LV28","Venonat_LV12","Venomoth_LV28","Bellsprout_LV11","Weepinbell_LV28",
  9. "Victreebell_LV42","Grimer_LV17","Muk_LV34","Exeggcute_LV14","Exeggutor_LV35",
  10. "Koffing_LV13","Weezing_LV27","Tangela_LV8_(GB)","Tangela_LV12","Scyther_LV25",
  11. "Pinsir_LV24","Charmander_LV10","CharmelEon_LV32","Charizard_LV76","Vulpix_LV11",
  12. "Ninetails_LV32","Ninetails_LV35_(GB)","Growlithe_LV18","Arcanine_LV34_(Promo)",
  13. "Arcanine_LV45","Ponyta_LV10","Rapidash_LV33","Magmar_LV24","Magmar_LV31_(Fossil)",
  14. "Flareon_LV22_(GB)","Flareon_LV28_(Jungle)","Moltres_LV35",
  15. "Legendary_Moltres_LV37","Squirtle_LV8","Wartortle_LV22","Blastoise_LV52",
  16. "Psyduck_LV15","Golduck_LV27","Poliwag_LV13","Poliwhirl_LV28","Poliwrath_LV48",
  17. "Tentacool_LV10","Tentacruel_LV21","Seel_LV12","Dewgong_LV42","Shellder_LV8",
  18. "Cloyster_LV25","Krabby_LV20","Kingler_LV27","Horsea_LV19","Seadra_LV23",
  19. "Goldeen_LV12","Seaking_LV28","Staryu_LV15","Starmie_LV28","Magikarp_LV8",
  20. "Gyarados_LV41","Lapras_LV31","Vaporeon_LV29_(GB)","Vaporeon_LV42_(Jungle)",
  21. "Omanyte_LV19","Omastar_LV32","Articuno_LV35","Legendary_Articuno_LV37",
  22. "Pikachu_LV12","Pikachu_LV14_(Jungle)","Pikachu_LV16_(promo)",
  23. "Pikachu_LV16_(promo2)","Flying_Pikachu_LV12","Surfing_Pikachu_LV13",
  24. "Surfing_Pikachu_LV13_(2)","Raichu_LV40","Raichu_LV45_(Fossil)","Magnemite_LV13",
  25. "Magnemite_LV15_(GB)","Magneton_LV28","Magneton_LV35_(Fossil)","Voltorb_LV10",
  26. "Electrode_LV35_(GB)","Electrode_LV42_(Jungle)","Electabuzz_LV20_(Promo)",
  27. "Electabuzz_LV35","Jolteon_LV24_(GB)","Jolteon_LV29","Zapdos_LV40",
  28. "Zapdos_LV64_(Fossil)","Legendary_Zapdos_LV68","Sandshrew_LV12","Sandslash_LV33",
  29. "Diglett_LV8","Dugtrio_LV36","Mankey_LV7","Primeape_LV35","Machop_LV20",
  30. "Machoke_LV40","Machamp_LV67","Geodude_LV16","Graveler_LV29","Golem_LV36",
  31. "Onix_LV12","Cubone_LV13","Marowak_LV26_(Jungle)","Marowak_LV32_(GB)",
  32. "Hitmonlee_LV30","Hitmonchan_LV33","Rhyhorn_LV18","Rhydon_LV48","Kabuto_LV9",
  33. "Kabutops_LV30","Aerodactlyl_LV28","Abra_LV10","Kadabra_LV38","Alakazam_LV42",
  34. "Slowpoke_LV9_(Promo)","Slowpoke_LV18_(Fossil)","Slowbro_LV26","Gastly_LV8",
  35. "Gastly_LV17_(Fossil)","Haunter_LV17_(Fossil)","Haunter_LV22","Gengar_LV38",
  36. "Drowzee_LV12","Hypno_LV36","Mr.Mime_LV28","Jynx_LV23","Mewtwo_LV53",
  37. "Mewtwo_LV60_(Promo)","Mewtwo_LV60_(Promo_2)","Mew_LV8_(Promo)",
  38. "Mew_LV15_(CP!_Promo)","Mew_LV23","Pidgey_LV8","Pidgeotto_LV36",
  39. "Pidgeot_LV38_(GB)","Pidgeot_LV40_(Jungle)","Rattata_LV9","Raticate_LV41",
  40. "Spearow_LV13","Fearow_LV27","Clefairy_LV14","Clefable_LV34",
  41. "Jigglypuff_LV12_(Promo)","Jigglypuff_LV13_(GB)","Jigglypuff_LV14_(Jungle)",
  42. "Wigglytuff_LV36","Meowth_LV14_(GB)","Meowth_LV15_(Jungle)","Persian_LV25",
  43. "Farfetch'd_LV20","Doduo_LV10","Dodrio_LV28","Lickitung_LV26","Chansey_LV55",
  44. "Kangaskhan_LV40","Tauros_LV32","Ditto_LV19","Eevee_LV12","Porygon_LV12",
  45. "Snorlax_LV20","Dratini_LV10","Dragonair_LV33","Legendary_Dragonite_LV41",
  46. "Dragonite_LV45","Professor_Oak","Imposter_Professor_Oak","Bill","Mr.Fuji",
  47. "Lass","Imakuni?","Pokemon_Trader","Pokemon_Breeder","Clefairy_Doll",
  48. "Mysterious_Fossil","Energy_Retrieval","Super_Energy_Retrieval","Energy_Search",
  49. "Energy_Removal","Super_Energy_Removal","Switch","Pokemon_Center","Pokeball",
  50. "Scoop_Up","Computer_Search","Pokedex","Pluspower","Defender","Item_Finder",
  51. "Gust_of_Wind","Devolution_Spray","Potion","Super_Potion","Full_Heal","Revive",
  52. "Maintenance","Pokemon_Flute","Gambler","Recycle","","","","","","","","","","",
  53. "","","","","","","","","","","","","","","","","","","","","","","","","","","",
  54. "","","","","","","","","","","","","","","","","","","","","","","","","","","",
  55. "","","","","","","","","","","","","","","","","","","","","","","","","","","",
  56. "","","","","","","","","","","","","","","","","","","","","","","","","","","",
  57. "","","","","","","","","","","","","","","","","","","","","","","","","","","",
  58. "","","","","","","","","","","","","","","","","","","","","","","","","","","",
  59. "","","","","","","","","","","","","","","","","","","","","","","","","","","",
  60. "","","","","","","","","","","","","","","","","","","","","","","","","","","",
  61. "","","","","","","","","","","","","","","","","","","","","","","","","","","",
  62. "","","","","","","","","","","","","","","","","","","","","","","","","","","",
  63. "","","","","","","","","","","","","","","","","","","","","","","","","","","",
  64. "","","","","","","","","","","","","","","","","","","","","","","","","","","",
  65. "","","","","","","","","","","","","","","","","","","","","","","","","","","",
  66. "","","","","","","","","","","","","","","","","","","","","","","","","","","",
  67. "","","","","","","","","","","","","","","","","","","","","","","","","","","",
  68. "","","","","","","","","","","","","","","","","",}
  69.  
  70. --Copied from Aroymart's code. Hope it's right.
  71. local isBasic = { false, false, false, false, false, false, false, true, false, false, false, true, false, false, true, false, false, true, false, true, false, false, true, false, false, true, false, true, false, false, true, false, true, false, true, false, false, true, false, true, false, true, false, true, true, true, true, true, false, false, true, false, false, true, false, false, true, false, true, true, false, false, true, true, true, false, false, true, false, true, false, false, true, false, true, false, true, false, true, false, true, false, true, false, true, false, true, false, true, false, false, false, false, true, true, true, true, true, true, true, true, true, false, false, true, true, false, false, true, false, false, true, true, false, false, true, true, true, true, false, true, false, true, false, true, false, false, true, false, false, true, true, false, false, true, true, true, false, false, false, false, true, false, false, true, true, false, true, true, false, false, false, true, false, true, true, true, true, true, true, true, true, true, false, false, false, true, false, true, false, true, false, true, true, true, false, true, true, false, true, true, false, true, true, true, true, true, true, true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false }
  72. --Same array, except basic Pokemon I really don't want to see (Lickitung, Mr. Mime, Lapras, etc.) are false. Weedle Nidoran F Paras Grimer KOffing Tangela Scyther Growlithe Flareon Moltres (I want to see the Legendary one) Tentacool Seel (eh) Lapras (ew) Articuno Pikachu Electabuzz Zapdos Diglett Machop (eh) Geodude Onix Hitmons Rhyhorn (eh) Abra Drowzee Mime Jynx Mewtwo (hoping for 2 Porygon on Rick this time. Mewtwo is no good) Spearow Jigglypuffs Meowths Lickitung, Chansey, Kangaskhan Porygon, Snorlax, Dratini
  73. local isGoodBasic = { false, false, false, false, false, false, false, true, false, false, false, true, false, false, true, false, false, true, false, false,false, false, true, false, false, true, false, true, false, false, true, false, true, false, true, false, false, false,false, true, false, false,false, true, true, false,true, true, false, false, true, false, false, true, false, false, true, false, true, true, false, false, false,true, true, false, false, true, false, true, false, false, true, false, false,false, true, false, true, false, true, false, true, false, true, false, true, false, false,false, false, false, false, false,true, true, true, true, true, true, true, true, false, false, true, true, false, false, true, false, false, false,false,false, false, false,false,true, true, false, true, false, true, false, false,false, false, true, false, false, false,true, false, false, false,false,false,false, false, false, false, true, false, false, true, true, false, true, true, false, false, false, true, false, false,false,false,false,false,true, true, true, true, false, false, false, true, false, true, false, true, false, true, true, true, false, true, true, false, true, true, false, false,false,false,true, true, true, true, false,true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false }
  74.  
  75.  
  76. --Run this before decks are shuffled, but after the screen with the opponent's name/deck name.
  77.  
  78.  
  79. memory.usememorydomain("System Bus")
  80.  
  81. local DeckLocBegin=0xC300
  82. local MyDeckLocBegin=0xC200
  83. local DeckIDBegin=0xC480
  84. local MyDeckIDBegin=0xC400
  85. local ShuffledDeckBegin=0xC37E
  86. local MyShuffledDeckBegin=0xC27E
  87.  
  88. local RNG1 = memory.readbyte(0xCACA)
  89. local RNG2 = memory.readbyte(0xCACB)
  90. local RNG3 = memory.readbyte(0xCACC)
  91.  
  92. local initRNG1 = RNG1
  93. local initRNG2 = RNG2
  94. local initRNG3 = RNG3
  95.  
  96. local myDeck = {}
  97. local oppDeck = {}
  98.  
  99. for i=0,59 do
  100. myDeck[i] = i
  101. oppDeck[i] = i
  102. end
  103.  
  104. function reset()
  105. --Go back to the start, but advance RNG once (simulate checking the next frame)
  106. RNG1 = initRNG1
  107. RNG2 = initRNG2
  108. RNG3 = initRNG3
  109. advanceRNG()
  110. initRNG1 = RNG1
  111. initRNG2 = RNG2
  112. initRNG3 = RNG3
  113.  
  114. for i=0,59 do
  115. myDeck[i] = i
  116. oppDeck[i] = i
  117. end
  118. end
  119.  
  120. function advanceRNG()
  121. --Recreation of the code that advances RNG
  122. local temp = RNG2
  123. temp = bit.rol(temp,2)
  124. if (bit.check(temp,8)) then temp = bit.set(temp,0) end
  125. temp = bit.clear(temp,8)
  126. if (bit.check(temp,9)) then temp = bit.set(temp,1) end
  127. temp = bit.clear(temp,9)
  128. temp = bit.bxor(temp,RNG1)
  129. local carry = bit.check(temp,0)
  130.  
  131. RNG2 = bit.bxor(RNG2,RNG1)
  132.  
  133. temp = RNG3
  134. temp = bit.bxor(temp,RNG1)
  135. RNG1 = temp
  136.  
  137. RNG1 = bit.rol(RNG1,1)
  138. if (carry) then RNG1 = bit.set(RNG1,0) end
  139. carry = bit.check(RNG1,8)
  140. RNG1 = bit.clear(RNG1,8)
  141.  
  142. RNG2 = bit.rol(RNG2,1)
  143. if (carry) then RNG2 = bit.set(RNG2,0) end
  144. RNG2 = bit.clear(RNG2,8)
  145.  
  146. RNG3 = RNG3 + 1
  147. if (RNG3 == 256) then RNG3 = 0 end
  148.  
  149. return (bit.bxor(RNG2,RNG1))
  150. end
  151.  
  152. function randomSlot()
  153. --Get a random deck slot 0-59
  154. --This is done by multiplying the RNG value by 60, and taking the left 8 bits
  155. local rng = advanceRNG()
  156. local temp = rng * 60
  157. for i=0,7 do
  158. if (bit.check(temp,i+8)) then temp = bit.set(temp,i) else temp = bit.clear(temp,i) end
  159. temp = bit.clear(temp,i+8)
  160. end
  161. return temp
  162. end
  163.  
  164. function shuffleDeck(deck)
  165. --Do 60 location swaps
  166. for curLoc=0,59 do
  167. local newLoc = randomSlot()
  168. local temp = deck[curLoc]
  169. deck[curLoc] = deck[newLoc]
  170. deck[newLoc] = temp
  171. end
  172. end
  173.  
  174. --This is a recursive function (when it finds no basics) that checks all possibilities of reshuffles for good frames
  175. --CRITERIA TO KEEP A HAND: 2 Basics and 2 Energy in the hand, 4 Basics and 4 Energy within the top 13 cards (skipping the prizes)
  176. function checkForBasics(frames, myReshuffles, theirReshuffles)
  177. --First, before we check for cheating, check if they need to reshuffle for having no basics.
  178. local num = 0
  179. for h=0,6 do
  180. local loc = memory.readbyte(DeckIDBegin+oppDeck[h])
  181. if (isBasic[loc]) then
  182. num = num + 1
  183. break
  184. end
  185. end
  186. --No basics found; time to check both splitting possibilities (one where I reshuffle as well; may as well be thorough!)
  187. if (num == 0) then
  188. local tempRNG1 = RNG1
  189. local tempRNG2 = RNG2
  190. local tempRNG3 = RNG3
  191. local tempMyDeck = {}
  192. local tempOppDeck = {}
  193. for i=0,59 do
  194. tempMyDeck[i] = myDeck[i]
  195. tempOppDeck[i] = oppDeck[i]
  196. end
  197. for i=0,59 do
  198. myDeck[i] = i
  199. oppDeck[i] = i
  200. end
  201. shuffleDeck(myDeck)
  202. shuffleDeck(myDeck)
  203. shuffleDeck(oppDeck)
  204. shuffleDeck(oppDeck)
  205. checkForBasics(frames, myReshuffles+1, theirReshuffles+1)
  206. RNG1 = tempRNG1
  207. RNG2 = tempRNG2
  208. RNG3 = tempRNG3
  209. for i=0,59 do
  210. myDeck[i] = tempMyDeck[i]
  211. oppDeck[i] = tempOppDeck[i]
  212. end
  213. for i=0,59 do
  214. oppDeck[i] = i
  215. end
  216. shuffleDeck(oppDeck)
  217. shuffleDeck(oppDeck)
  218. checkForBasics(frames, myReshuffles, theirReshuffles+1)
  219. else
  220. --Time to simulate cheating. Once it's been simulated, then we'll see if the frame is even any good.
  221. --We'll also want to do it all over except with having me reshuffle, just in case.
  222. --And have me reshuffle twice too. Why not. Leader frames can be hard to find!
  223. local tempRNG1 = RNG1
  224. local tempRNG2 = RNG2
  225. local tempRNG3 = RNG3
  226. local tempMyDeck = {}
  227. local tempOppDeck = {}
  228. for i=0,59 do
  229. tempMyDeck[i] = myDeck[i]
  230. tempOppDeck[i] = oppDeck[i]
  231. end
  232. for i=0,59 do
  233. myDeck[i] = i
  234. end
  235. shuffleDeck(myDeck)
  236. shuffleDeck(myDeck)
  237. cheat(frames, myReshuffles+1,theirReshuffles)
  238.  
  239. RNG1 = tempRNG1
  240. RNG2 = tempRNG2
  241. RNG3 = tempRNG3
  242. for i=0,59 do
  243. myDeck[i] = tempMyDeck[i]
  244. oppDeck[i] = tempOppDeck[i]
  245. end
  246. for i=0,59 do
  247. myDeck[i] = i
  248. end
  249. shuffleDeck(myDeck)
  250. shuffleDeck(myDeck)
  251. for i=0,59 do
  252. myDeck[i] = i
  253. end
  254. shuffleDeck(myDeck)
  255. shuffleDeck(myDeck)
  256. cheat(frames, myReshuffles+2,theirReshuffles)
  257.  
  258. RNG1 = tempRNG1
  259. RNG2 = tempRNG2
  260. RNG3 = tempRNG3
  261. for i=0,59 do
  262. myDeck[i] = tempMyDeck[i]
  263. oppDeck[i] = tempOppDeck[i]
  264. end
  265. cheat(frames, myReshuffles,theirReshuffles)
  266.  
  267. end
  268.  
  269. end
  270.  
  271. function cheat(frames, myReshuffles, theirReshuffles)
  272. local cheating = true
  273. local cheatReshuffles = 0
  274. --Something about "while cheating" makes me laugh
  275. while (cheating) do
  276. local handBasicCount = 0
  277. local handEnergyCount = 0
  278. local basicCount = 0
  279. local energyCount = 0
  280.  
  281. for h=0,6 do
  282. local loc = memory.readbyte(DeckIDBegin+oppDeck[h])
  283. if (isBasic[loc]) then
  284. basicCount = basicCount + 1
  285. handBasicCount = handBasicCount + 1
  286. end
  287. if (loc <= 7) then
  288. energyCount = energyCount + 1
  289. handEnergyCount = handEnergyCount + 1
  290. end
  291. end
  292. for h=13,18 do
  293. local loc = memory.readbyte(DeckIDBegin+oppDeck[h])
  294. if (isBasic[loc]) then
  295. basicCount = basicCount + 1
  296. end
  297. if (loc <= 7) then
  298. energyCount = energyCount + 1
  299. end
  300. end
  301. if (basicCount < 4 or energyCount < 4 or handBasicCount < 2 or handEnergyCount < 2) then
  302. cheatReshuffles = cheatReshuffles + 1
  303. --Do some weird hand reversal thing only before the first reshuffle. Don't ask me, but it's a thing.
  304. if (cheatReshuffles == 1) then
  305. local temp = oppDeck[0]
  306. oppDeck[0] = oppDeck[6]
  307. oppDeck[6] = temp
  308. temp = oppDeck[1]
  309. oppDeck[1] = oppDeck[5]
  310. oppDeck[5] = temp
  311. temp = oppDeck[2]
  312. oppDeck[2] = oppDeck[4]
  313. oppDeck[4] = temp
  314. end
  315. shuffleDeck(oppDeck)
  316.  
  317.  
  318.  
  319. else
  320. cheating = false
  321. --print("keeping " .. tostring(theirReshuffles) .. "with " .. basicCount .. energyCount)
  322. --for h=0,59 do
  323. --local loc = memory.readbyte(DeckIDBegin+oppDeck[h])
  324. --print(oppDeck[h] .. tostring(nome[loc]))
  325. --end
  326. end
  327. end
  328.  
  329. --check if it's good hand
  330. local num = 0
  331. local good = true
  332. for h=0,6 do
  333. local loc = memory.readbyte(DeckIDBegin+oppDeck[h])
  334. if (isBasic[loc]) then
  335. num = num + 1
  336. if (not isGoodBasic[loc] or num > 2) then
  337. good = false
  338. break
  339. end
  340. end
  341. end
  342. --Check top draw for being a basic
  343. local loc = memory.readbyte(DeckIDBegin+oppDeck[13])
  344. if (isBasic[loc]) then
  345. good = false
  346. end
  347.  
  348. if (good) then
  349. printFrame(frames,myReshuffles,theirReshuffles,cheatReshuffles)
  350. end
  351. end
  352.  
  353. function printFrame(frames,myReshuffles,theirReshuffles,cheatReshuffles)
  354. --When we've found a good frame, let's check the coin flip.
  355. --A "1" here should mean tails
  356.  
  357. --If the leader cheated their hand, I cannot possibly manipulate a tails to a heads
  358. local flipRNG = advanceRNG() % 2
  359. local coinFlip
  360. if (flipRNG == 1) then
  361. if (cheatReshuffles > 0) then return end
  362. coinFlip = "Tails"
  363. else coinFlip = "Heads" end
  364.  
  365. local flipRNG = advanceRNG() % 2
  366. local coinFlip2
  367. --If they reshuffled more times than you, you cannot manipulate the coinflip
  368. if (flipRNG == 1) then
  369. coinFlip2 = "Tails"
  370. else coinFlip2 = "Heads" end
  371.  
  372. print("Frame " .. tostring(frames) .. " found. Coin flip: " .. tostring(coinFlip))
  373.  
  374. file = io.open("frames.txt","a")
  375.  
  376. file:write("Frame " .. tostring(frames) .. ", " .. tostring(myReshuffles) .. " player reshuffles, " .. tostring(theirReshuffles) .. " opponent reshuffles, " .. tostring(cheatReshuffles) .. " cheat reshuffles\n")
  377. file:write("Coin flips: " .. tostring(coinFlip) .. ", " .. tostring(coinFlip2) .. "\n")
  378.  
  379. local handIDs = {}
  380. file:write("Your hand: ")
  381. for i=0,6 do
  382. local loc = memory.readbyte(MyDeckIDBegin+myDeck[i])
  383. handIDs[i] = myDeck[i]+1
  384. file:write(tostring(myDeck[i]+1) .. ": " .. nome[loc] .. ", ")
  385. end
  386. file:write("\nYour prizes: ")
  387. for i=7,12 do
  388. local loc = memory.readbyte(MyDeckIDBegin+myDeck[i])
  389. file:write(tostring(myDeck[i]+1) .. ": " .. nome[loc] .. ", ")
  390. end
  391. file:write("Draws: " .. tostring(myDeck[13]+1) .. ": " .. nome[memory.readbyte(MyDeckIDBegin+myDeck[13])] .. ", ")
  392. file:write(tostring(myDeck[14]+1) .. ": " .. nome[memory.readbyte(MyDeckIDBegin+myDeck[14])] .. "\n")
  393. handIDs[7] = myDeck[13]+1
  394. handIDs[8] = myDeck[14]+1
  395. for i=0,8 do
  396. file:write(tostring(handIDs[i]) .. " ")
  397. end
  398. file:write("\n")
  399.  
  400. file:write("Their hand: ")
  401. for i=0,6 do
  402. local loc = memory.readbyte(DeckIDBegin+oppDeck[i])
  403. file:write(nome[loc] .. ", ")
  404. end
  405. file:write("Turn 1 draw: " .. nome[memory.readbyte(DeckIDBegin+oppDeck[13])] .. "\n")
  406.  
  407. file:write("=====\n")
  408. file:flush()
  409. file:close()
  410. end
  411.  
  412. --delete contents of frames.txt
  413. file = io.open("frames.txt","w")
  414. file:close()
  415.  
  416. --Run the main program for 240 frames. I'm probably not going to wait 2 seconds for a frame, but eh
  417. for counter=0,239 do
  418. shuffleDeck(myDeck)
  419. shuffleDeck(myDeck)
  420. shuffleDeck(oppDeck)
  421. shuffleDeck(oppDeck)
  422.  
  423. --Check for Basic Pokemon on their side, do double reshuffle if they don't have any
  424. --Technically, if they have no Basics, we could influence RNG by reshuffling as well... So check that as well
  425. --If they have more than 1 Basic, or a "bad" Basic, the frame is skipped
  426.  
  427. checkForBasics(counter, 0, 0)
  428.  
  429. reset()
  430. end
  431.  
  432. print("Completed")
  433.  
  434. --shuffleDeck(myDeck)
  435. --shuffleDeck(myDeck)
  436. --shuffleDeck(oppDeck)
  437. --shuffleDeck(oppDeck)
  438. --for i=0,6 do
  439. --print(tostring(nome[memory.readbyte(MyDeckIDBegin+myDeck[i])]))
  440. --print(tostring(nome[memory.readbyte(DeckIDBegin+oppDeck[i])]))
  441. --end
Add Comment
Please, Sign In to add comment