Advertisement
IHATEMICROWAVEOVEN

pmdiscord how-good-is-type index

Dec 1st, 2023 (edited)
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.09 KB | None | 0 0
  1. -- Type advatages (note these are offensive (e.g. fire is super on grass, grass is nvery on fire)
  2. --[[ The types go in this order dont change the order or it will screw up what beats what
  3. 0 = None (Only for Type2);
  4. 1 = Normal;
  5. 2 = Fire;
  6. 3 = Water;
  7. 4 = Electric;
  8. 5 = Grass;
  9. 6 = Ice;
  10. 7 = Fighting;
  11. 8 = Poison;
  12. 9 = Ground;
  13. 10 = Flying;
  14. 11 = Psychic;
  15. 12 = Bug;
  16. 13 = Rock;
  17. 14 = Ghost;
  18. 15 = Dragon;
  19. 16 = Dark;
  20. 17 = Steel;
  21. 18 = Fairy;
  22. --]]
  23. local nv = 0.5
  24. local sup = 4
  25. local imm = 0.1
  26.  
  27. local None = {
  28. 1, -- none
  29. 1, -- normal
  30. 1, -- fire
  31. 1, -- water
  32. 1, -- electric
  33. 1, -- grass
  34. 1, -- ice
  35. 1, -- fighting
  36. 1, -- poison
  37. 1, -- ground
  38. 1, -- flying
  39. 1, -- psychic
  40. 1, -- bug
  41. 1, -- rock
  42. 1, -- ghost
  43. 1, -- dragon
  44. 1, -- dark
  45. 1, -- steel
  46. 1 -- fairy
  47. }
  48. local Normal = {
  49. 1, -- none
  50. 1, -- normal
  51. 1, -- fire
  52. 1, -- water
  53. 1, -- electric
  54. 1, -- grass
  55. 1, -- ice
  56. 1, -- fighting
  57. 1, -- poison
  58. 1, -- ground
  59. 1, -- flying
  60. 1, -- psychic
  61. 1, -- bug
  62. nv, -- rock
  63. imm, -- ghost
  64. 1, -- dragon
  65. 1, -- dark
  66. nv, -- steel
  67. 1 -- fairy
  68. }
  69. local Fire = {
  70. 1, -- none
  71. 1, -- normal
  72. nv, -- fire
  73. nv, -- water
  74. 1, -- electric
  75. sup, -- grass
  76. sup, -- ice
  77. 1, -- fighting
  78. 1, -- poison
  79. 1, -- ground
  80. 1, -- flying
  81. 1, -- psychic
  82. sup, -- bug
  83. nv, -- rock
  84. 1, -- ghost
  85. nv, -- dragon
  86. 1, -- dark
  87. sup, -- steel
  88. 1 -- fairy
  89. }
  90. local Water = {
  91. 1, -- none
  92. 1, -- normal
  93. sup, -- fire
  94. nv, -- water
  95. 1, -- electric
  96. nv, -- grass
  97. 1, -- ice
  98. 1, -- fighting
  99. 1, -- poison
  100. sup, -- ground
  101. 1, -- flying
  102. 1, -- psychic
  103. 1, -- bug
  104. sup, -- rock
  105. 1, -- ghost
  106. nv, -- dragon
  107. 1, -- dark
  108. 1, -- steel
  109. 1 -- fairy
  110. }
  111. local Electric = {
  112. 1, -- none
  113. 1, -- normal
  114. 1, -- fire
  115. sup, -- water
  116. nv, -- electric
  117. nv, -- grass
  118. 1, -- ice
  119. 1, -- fighting
  120. 1, -- poison
  121. imm, -- ground
  122. sup, -- flying
  123. 1, -- psychic
  124. 1, -- bug
  125. 1, -- rock
  126. 1, -- ghost
  127. nv, -- dragon
  128. 1, -- dark
  129. 1, -- steel
  130. 1 -- fairy
  131. }
  132. local Grass = {
  133. 1, -- none
  134. 1, -- normal
  135. nv, -- fire
  136. sup, -- water
  137. 1, -- electric
  138. nv, -- grass
  139. 1, -- ice
  140. 1, -- fighting
  141. 1, -- poison
  142. sup, -- ground
  143. nv, -- flying
  144. 1, -- psychic
  145. nv, -- bug
  146. sup, -- rock
  147. 1, -- ghost
  148. nv, -- dragon
  149. 1, -- dark
  150. nv, -- steel
  151. 1 -- fairy
  152. }
  153. local Ice = {
  154. 1, -- none
  155. 1, -- normal
  156. nv, -- fire
  157. nv, -- water
  158. 1, -- electric
  159. sup, -- grass
  160. nv, -- ice
  161. 1, -- fighting
  162. 1, -- poison
  163. sup, -- ground
  164. sup, -- flying
  165. 1, -- psychic
  166. 1, -- bug
  167. 1, -- rock
  168. 1, -- ghost
  169. sup, -- dragon
  170. 1, -- dark
  171. nv, -- steel
  172. 1 -- fairy
  173. }
  174. local Fighting = {
  175. 1, -- none
  176. sup, -- normal
  177. 1, -- fire
  178. 1, -- water
  179. 1, -- electric
  180. 1, -- grass
  181. sup, -- ice
  182. 1, -- fighting
  183. nv, -- poison
  184. 1, -- ground
  185. nv, -- flying
  186. nv, -- psychic
  187. nv, -- bug
  188. sup, -- rock
  189. imm, -- ghost
  190. 1, -- dragon
  191. sup, -- dark
  192. sup, -- steel
  193. nv -- fairy
  194. }
  195. local Poison = {
  196. 1, -- none
  197. 1, -- normal
  198. 1, -- fire
  199. 1, -- water
  200. 1, -- electric
  201. sup, -- grass
  202. 1, -- ice
  203. 1, -- fighting
  204. nv, -- poison
  205. nv, -- ground
  206. 1, -- flying
  207. 1, -- psychic
  208. 1, -- bug
  209. nv, -- rock
  210. nv, -- ghost
  211. 1, -- dragon
  212. 1, -- dark
  213. imm, -- steel
  214. sup -- fairy
  215. }
  216. local Ground = {
  217. 1, -- none
  218. 1, -- normal
  219. sup, -- fire
  220. 1, -- water
  221. sup, -- electric
  222. nv, -- grass
  223. 1, -- ice
  224. 1, -- fighting
  225. sup, -- poison
  226. 1, -- ground
  227. imm, -- flying
  228. 1, -- psychic
  229. nv, -- bug
  230. sup, -- rock
  231. 1, -- ghost
  232. 1, -- dragon
  233. 1, -- dark
  234. sup, -- steel
  235. 1 -- fairy
  236. }
  237. local Flying = {
  238. 1, -- none
  239. 1, -- normal
  240. 1, -- fire
  241. 1, -- water
  242. nv, -- electric
  243. sup, -- grass
  244. 1, -- ice
  245. sup, -- fighting
  246. 1, -- poison
  247. 1, -- ground
  248. 1, -- flying
  249. 1, -- psychic
  250. sup, -- bug
  251. nv, -- rock
  252. 1, -- ghost
  253. 1, -- dragon
  254. 1, -- dark
  255. nv, -- steel
  256. 1 -- fairy
  257. }
  258. local Psychic = {
  259. 1, -- none
  260. 1, -- normal
  261. 1, -- fire
  262. 1, -- water
  263. 1, -- electric
  264. 1, -- grass
  265. 1, -- ice
  266. sup, -- fighting
  267. sup, -- poison
  268. 1, -- ground
  269. 1, -- flying
  270. nv, -- psychic
  271. 1, -- bug
  272. 1, -- rock
  273. 1, -- ghost
  274. 1, -- dragon
  275. imm, -- dark
  276. nv, -- steel
  277. 1 -- fairy
  278. }
  279. local Bug = {
  280. 1, -- none
  281. 1, -- normal
  282. nv, -- fire
  283. 1, -- water
  284. 1, -- electric
  285. sup, -- grass
  286. 1, -- ice
  287. nv, -- fighting
  288. nv, -- poison
  289. 1, -- ground
  290. nv, -- flying
  291. sup, -- psychic
  292. 1, -- bug
  293. nv, -- rock
  294. nv, -- ghost
  295. 1, -- dragon
  296. sup, -- dark
  297. nv, -- steel
  298. nv -- fairy
  299. }
  300. local Rock = {
  301. 1, -- none
  302. 1, -- normal
  303. sup, -- fire
  304. 1, -- water
  305. 1, -- electric
  306. nv, -- grass
  307. sup, -- ice
  308. nv, -- fighting
  309. 1, -- poison
  310. 1, -- ground
  311. sup, -- flying
  312. 1, -- psychic
  313. sup, -- bug
  314. nv, -- rock
  315. 1, -- ghost
  316. 1, -- dragon
  317. 1, -- dark
  318. nv, -- steel
  319. 1 -- fairy
  320. }
  321. local Ghost = {
  322. 1, -- none
  323. imm, -- normal
  324. 1, -- fire
  325. 1, -- water
  326. 1, -- electric
  327. 1, -- grass
  328. 1, -- ice
  329. 1, -- fighting
  330. 1, -- poison
  331. 1, -- ground
  332. 1, -- flying
  333. sup, -- psychic
  334. 1, -- bug
  335. 1, -- rock
  336. sup, -- ghost
  337. 1, -- dragon
  338. nv, -- dark
  339. 1, -- steel
  340. 1 -- fairy
  341. }
  342. local Dragon = {
  343. 1, -- none
  344. 1, -- normal
  345. 1, -- fire
  346. 1, -- water
  347. 1, -- electric
  348. 1, -- grass
  349. 1, -- ice
  350. 1, -- fighting
  351. 1, -- poison
  352. 1, -- ground
  353. 1, -- flying
  354. 1, -- psychic
  355. 1, -- bug
  356. 1, -- rock
  357. 1, -- ghost
  358. sup, -- dragon
  359. 1, -- dark
  360. nv, -- steel
  361. imm -- fairy
  362. }
  363. local Dark = {
  364. 1, -- none
  365. 1, -- normal
  366. 1, -- fire
  367. 1, -- water
  368. 1, -- electric
  369. 1, -- grass
  370. 1, -- ice
  371. nv, -- fighting
  372. 1, -- poison
  373. 1, -- ground
  374. 1, -- flying
  375. sup, -- psychic
  376. 1, -- bug
  377. 1, -- rock
  378. sup, -- ghost
  379. 1, -- dragon
  380. nv, -- dark
  381. 1, -- steel
  382. nv -- fairy
  383. }
  384. local Steel = {
  385. 1, -- none
  386. 1, -- normal
  387. nv, -- fire
  388. nv, -- water
  389. nv, -- electric
  390. 1, -- grass
  391. sup, -- ice
  392. 1, -- fighting
  393. 1, -- poison
  394. 1, -- ground
  395. 1, -- flying
  396. 1, -- psychic
  397. 1, -- bug
  398. sup, -- rock
  399. 1, -- ghost
  400. 1, -- dragon
  401. 1, -- dark
  402. nv, -- steel
  403. sup -- fairy
  404. }
  405. local Fairy = {
  406. 1, -- none
  407. 1, -- normal
  408. nv, -- fire
  409. 1, -- water
  410. 1, -- electric
  411. 1, -- grass
  412. 1, -- ice
  413. sup, -- fighting
  414. nv, -- poison
  415. 1, -- ground
  416. 1, -- flying
  417. 1, -- psychic
  418. 1, -- bug
  419. 1, -- rock
  420. 1, -- ghost
  421. sup, -- dragon
  422. sup, -- dark
  423. nv, -- steel
  424. 1 -- fairy
  425. }
  426.  
  427. local numToTypeName = {
  428. "None",
  429. "Normal",
  430. "Fire",
  431. "Water",
  432. "Electric",
  433. "Grass",
  434. "Ice",
  435. "Fighting",
  436. "Poison",
  437. "Ground",
  438. "Flying",
  439. "Psychic",
  440. "Bug",
  441. "Rock",
  442. "Ghost",
  443. "Dragon",
  444. "Dark",
  445. "Steel",
  446. "Fairy",
  447. }
  448.  
  449. local numToArray = {
  450. None,
  451. Normal,
  452. Fire,
  453. Water,
  454. Electric,
  455. Grass,
  456. Ice,
  457. Fighting,
  458. Poison,
  459. Ground,
  460. Flying,
  461. Psychic,
  462. Bug,
  463. Rock,
  464. Ghost,
  465. Dragon,
  466. Dark,
  467. Steel,
  468. Fairy,
  469. }
  470.  
  471.  
  472. local allScores = {}
  473.  
  474.  
  475. local function evaluateTypeCombo(index1, index2)
  476. local dict1 = numToArray[index1]
  477. local dict2 = numToArray[index2]
  478. local sum = 0
  479. for i = 1, 19 do
  480. sum = sum + 7*math.max(dict1[i]+dict2[i])
  481. local againstDict = numToArray[i]
  482. for j = i+1, 19 do
  483. local againstDict2 = numToArray[j]
  484. sum = sum - (math.max(againstDict[index1]*againstDict[index2], againstDict2[index1]*againstDict2[index2]) - 1)
  485. end
  486. end
  487. return sum
  488. end
  489.  
  490. local function evaluateType(index)
  491. local theArray = numToArray[index]
  492. local theName = numToTypeName[index]
  493. for i = index+1, 19 do
  494. table.insert(allScores, {theName.."/"..numToTypeName[i], evaluateTypeCombo(index, i)})
  495. end
  496. end
  497.  
  498. for i = 1, 19 do
  499. evaluateType(i)
  500. end
  501. table.sort(allScores, function (a, b) return a[2] > b[2] end)
  502. for i, thing in pairs(allScores) do
  503. print(thing[1]..": "..((-1/100)*(thing[2]-1000)))
  504. end
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513. --[[ prints this:
  514.  
  515. Steel/Fairy: 7.4055
  516. Flying/Steel: 7.5895
  517. None/Electric: 7.613
  518. Normal/Ghost: 7.638
  519. Ghost/Dark: 7.687
  520. Electric/Fairy: 7.698
  521. Electric/Flying: 7.698
  522. Water/Electric: 7.723
  523. Poison/Dark: 7.798
  524. Fighting/Steel: 7.8005
  525. Ghost/Fairy: 7.8035
  526. None/Fairy: 7.835
  527. None/Water: 7.835
  528. Water/Steel: 7.8625
  529. Water/Fairy: 7.865
  530. Fire/Water: 7.8775
  531. Electric/Fighting: 7.906
  532. None/Ground: 7.948
  533. Ground/Steel: 7.954
  534. Ground/Fairy: 7.964
  535. Fire/Fighting: 8.003
  536. None/Normal: 8.013
  537. None/Ghost: 8.034
  538. None/Fighting: 8.043
  539. Fire/Grass: 8.05
  540. Electric/Bug: 8.068
  541. Fire/Fairy: 8.0925
  542. None/Fire: 8.095
  543. None/Steel: 8.105
  544. Electric/Ground: 8.121
  545. Normal/Fairy: 8.124
  546. Bug/Rock: 8.135
  547. Dragon/Steel: 8.1405
  548. None/Poison: 8.143
  549. Ghost/Steel: 8.1655
  550. Water/Dragon: 8.1855
  551. Fighting/Psychic: 8.186
  552. Electric/Ghost: 8.187
  553. Poison/Fairy: 8.2205
  554. Water/Bug: 8.235
  555. Normal/Electric: 8.241
  556. Fighting/Ghost: 8.267
  557. Dark/Fairy: 8.281
  558. Water/Fighting: 8.298
  559. None/Flying: 8.315
  560. Water/Ghost: 8.329
  561. Psychic/Fairy: 8.3305
  562. Fighting/Fairy: 8.3455
  563. Fighting/Ground: 8.351
  564. Water/Ice: 8.36
  565. Normal/Psychic: 8.391
  566. Flying/Rock: 8.409
  567. Fire/Dragon: 8.4255
  568. Normal/Water: 8.428
  569. Ground/Ghost: 8.4315
  570. Water/Grass: 8.435
  571. Normal/Poison: 8.436
  572. Water/Poison: 8.438
  573. Fire/Dark: 8.47
  574. Fighting/Flying: 8.4805
  575. Electric/Ice: 8.493
  576. Poison/Flying: 8.4985
  577. None/Bug: 8.505
  578. Normal/Ground: 8.517
  579. Fire/Ghost: 8.529
  580. None/Dark: 8.54
  581. Dragon/Fairy: 8.543
  582. Poison/Ground: 8.5535
  583. Ground/Bug: 8.573
  584. Grass/Rock: 8.575
  585. None/Psychic: 8.578
  586. Psychic/Steel: 8.5855
  587. Normal/Flying: 8.594
  588. Flying/Fairy: 8.5985
  589. Normal/Fighting: 8.611
  590. None/Ice: 8.62
  591. Ice/Ground: 8.628
  592. Poison/Psychic: 8.641
  593. Normal/Fire: 8.648
  594. Ice/Ghost: 8.667
  595. Electric/Dark: 8.678
  596. Flying/Dark: 8.696
  597. Poison/Ghost: 8.7145
  598. Ice/Fighting: 8.723
  599. None/Dragon: 8.728
  600. Electric/Psychic: 8.731
  601. Fire/Psychic: 8.778
  602. Bug/Fairy: 8.7875
  603. Normal/Bug: 8.788
  604. Water/Dark: 8.795
  605. Flying/Ghost: 8.7985
  606. Poison/Bug: 8.843
  607. Ground/Dark: 8.844
  608. Water/Psychic: 8.853
  609. Electric/Grass: 8.868
  610. Electric/Dragon: 8.881
  611. Ground/Psychic: 8.896
  612. Water/Ground: 8.898
  613. Ice/Poison: 8.923
  614. None/Rock: 8.965
  615. Bug/Ghost: 8.989
  616. Rock/Ghost: 8.9925
  617. Grass/Poison: 8.998
  618. Fighting/Rock: 9.0105
  619. Flying/Psychic: 9.0255
  620. Poison/Dragon: 9.026
  621. Grass/Ghost: 9.139
  622. Bug/Dark: 9.155
  623. Ghost/Dragon: 9.162
  624. Ice/Dragon: 9.163
  625. Ice/Psychic: 9.258
  626. None/Grass: 9.27
  627. Normal/Dragon: 9.291
  628. Psychic/Rock: 9.298
  629. Bug/Dragon: 9.358
  630. Rock/Dragon: 9.443
  631. Psychic/Bug: 9.463
  632. Fire/Ground: 9.628
  633. Bug/Steel: 9.6375
  634. Psychic/Dragon: 9.656
  635. Ground/Flying: 9.687
  636. Water/Flying: 9.735
  637. Normal/Grass: 9.768
  638. Fire/Flying: 9.8455
  639. Fire/Steel: 9.8675
  640. Poison/Steel: 9.9205
  641. Fire/Electric: 9.938
  642. Electric/Steel: 9.9505
  643. Electric/Poison: 9.976
  644. Grass/Steel: 9.9905
  645. Fighting/Dark: 10.022
  646. Fighting/Poison: 10.101
  647. Fire/Bug: 10.195
  648. Dark/Steel: 10.236
  649. Ground/Dragon: 10.276
  650. Fire/Ice: 10.32
  651. Normal/Steel: 10.339
  652. Ice/Fairy: 10.365
  653. Psychic/Dark: 10.398
  654. Fighting/Bug: 10.408
  655. Rock/Fairy: 10.4175
  656. Water/Rock: 10.42
  657. Fire/Poison: 10.4205
  658. Ice/Flying: 10.51
  659. Grass/Ground: 10.518
  660. Electric/Rock: 10.563
  661. Normal/Dark: 10.829
  662. Fighting/Dragon: 10.871
  663. Grass/Flying: 10.8925
  664. Flying/Dragon: 10.9055
  665. Normal/Ice: 10.908
  666. Grass/Fairy: 10.945
  667. Flying/Bug: 10.9875
  668. Poison/Rock: 11.0055
  669. Grass/Fighting: 11.103
  670. Normal/Rock: 11.228
  671. Ice/Dark: 11.245
  672. Rock/Dark: 11.255
  673. Dragon/Dark: 11.368
  674. Grass/Ice: 11.37
  675. Grass/Dark: 11.775
  676. Grass/Dragon: 11.8205
  677. Grass/Psychic: 11.838
  678. Fire/Rock: 11.9825
  679. Ice/Steel: 11.9875
  680. Rock/Steel: 12.095
  681. Psychic/Ghost: 12.107
  682. Ice/Bug: 12.595
  683. Ground/Rock: 12.6055
  684. Ice/Rock: 12.74
  685. Grass/Bug: 13.2475
  686.  
  687. ]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement