Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Type advatages (note these are offensive (e.g. fire is super on grass, grass is nvery on fire)
- --[[ The types go in this order dont change the order or it will screw up what beats what
- 0 = None (Only for Type2);
- 1 = Normal;
- 2 = Fire;
- 3 = Water;
- 4 = Electric;
- 5 = Grass;
- 6 = Ice;
- 7 = Fighting;
- 8 = Poison;
- 9 = Ground;
- 10 = Flying;
- 11 = Psychic;
- 12 = Bug;
- 13 = Rock;
- 14 = Ghost;
- 15 = Dragon;
- 16 = Dark;
- 17 = Steel;
- 18 = Fairy;
- --]]
- local nv = 0.5
- local sup = 4
- local imm = 0.1
- local None = {
- 1, -- none
- 1, -- normal
- 1, -- fire
- 1, -- water
- 1, -- electric
- 1, -- grass
- 1, -- ice
- 1, -- fighting
- 1, -- poison
- 1, -- ground
- 1, -- flying
- 1, -- psychic
- 1, -- bug
- 1, -- rock
- 1, -- ghost
- 1, -- dragon
- 1, -- dark
- 1, -- steel
- 1 -- fairy
- }
- local Normal = {
- 1, -- none
- 1, -- normal
- 1, -- fire
- 1, -- water
- 1, -- electric
- 1, -- grass
- 1, -- ice
- 1, -- fighting
- 1, -- poison
- 1, -- ground
- 1, -- flying
- 1, -- psychic
- 1, -- bug
- nv, -- rock
- imm, -- ghost
- 1, -- dragon
- 1, -- dark
- nv, -- steel
- 1 -- fairy
- }
- local Fire = {
- 1, -- none
- 1, -- normal
- nv, -- fire
- nv, -- water
- 1, -- electric
- sup, -- grass
- sup, -- ice
- 1, -- fighting
- 1, -- poison
- 1, -- ground
- 1, -- flying
- 1, -- psychic
- sup, -- bug
- nv, -- rock
- 1, -- ghost
- nv, -- dragon
- 1, -- dark
- sup, -- steel
- 1 -- fairy
- }
- local Water = {
- 1, -- none
- 1, -- normal
- sup, -- fire
- nv, -- water
- 1, -- electric
- nv, -- grass
- 1, -- ice
- 1, -- fighting
- 1, -- poison
- sup, -- ground
- 1, -- flying
- 1, -- psychic
- 1, -- bug
- sup, -- rock
- 1, -- ghost
- nv, -- dragon
- 1, -- dark
- 1, -- steel
- 1 -- fairy
- }
- local Electric = {
- 1, -- none
- 1, -- normal
- 1, -- fire
- sup, -- water
- nv, -- electric
- nv, -- grass
- 1, -- ice
- 1, -- fighting
- 1, -- poison
- imm, -- ground
- sup, -- flying
- 1, -- psychic
- 1, -- bug
- 1, -- rock
- 1, -- ghost
- nv, -- dragon
- 1, -- dark
- 1, -- steel
- 1 -- fairy
- }
- local Grass = {
- 1, -- none
- 1, -- normal
- nv, -- fire
- sup, -- water
- 1, -- electric
- nv, -- grass
- 1, -- ice
- 1, -- fighting
- 1, -- poison
- sup, -- ground
- nv, -- flying
- 1, -- psychic
- nv, -- bug
- sup, -- rock
- 1, -- ghost
- nv, -- dragon
- 1, -- dark
- nv, -- steel
- 1 -- fairy
- }
- local Ice = {
- 1, -- none
- 1, -- normal
- nv, -- fire
- nv, -- water
- 1, -- electric
- sup, -- grass
- nv, -- ice
- 1, -- fighting
- 1, -- poison
- sup, -- ground
- sup, -- flying
- 1, -- psychic
- 1, -- bug
- 1, -- rock
- 1, -- ghost
- sup, -- dragon
- 1, -- dark
- nv, -- steel
- 1 -- fairy
- }
- local Fighting = {
- 1, -- none
- sup, -- normal
- 1, -- fire
- 1, -- water
- 1, -- electric
- 1, -- grass
- sup, -- ice
- 1, -- fighting
- nv, -- poison
- 1, -- ground
- nv, -- flying
- nv, -- psychic
- nv, -- bug
- sup, -- rock
- imm, -- ghost
- 1, -- dragon
- sup, -- dark
- sup, -- steel
- nv -- fairy
- }
- local Poison = {
- 1, -- none
- 1, -- normal
- 1, -- fire
- 1, -- water
- 1, -- electric
- sup, -- grass
- 1, -- ice
- 1, -- fighting
- nv, -- poison
- nv, -- ground
- 1, -- flying
- 1, -- psychic
- 1, -- bug
- nv, -- rock
- nv, -- ghost
- 1, -- dragon
- 1, -- dark
- imm, -- steel
- sup -- fairy
- }
- local Ground = {
- 1, -- none
- 1, -- normal
- sup, -- fire
- 1, -- water
- sup, -- electric
- nv, -- grass
- 1, -- ice
- 1, -- fighting
- sup, -- poison
- 1, -- ground
- imm, -- flying
- 1, -- psychic
- nv, -- bug
- sup, -- rock
- 1, -- ghost
- 1, -- dragon
- 1, -- dark
- sup, -- steel
- 1 -- fairy
- }
- local Flying = {
- 1, -- none
- 1, -- normal
- 1, -- fire
- 1, -- water
- nv, -- electric
- sup, -- grass
- 1, -- ice
- sup, -- fighting
- 1, -- poison
- 1, -- ground
- 1, -- flying
- 1, -- psychic
- sup, -- bug
- nv, -- rock
- 1, -- ghost
- 1, -- dragon
- 1, -- dark
- nv, -- steel
- 1 -- fairy
- }
- local Psychic = {
- 1, -- none
- 1, -- normal
- 1, -- fire
- 1, -- water
- 1, -- electric
- 1, -- grass
- 1, -- ice
- sup, -- fighting
- sup, -- poison
- 1, -- ground
- 1, -- flying
- nv, -- psychic
- 1, -- bug
- 1, -- rock
- 1, -- ghost
- 1, -- dragon
- imm, -- dark
- nv, -- steel
- 1 -- fairy
- }
- local Bug = {
- 1, -- none
- 1, -- normal
- nv, -- fire
- 1, -- water
- 1, -- electric
- sup, -- grass
- 1, -- ice
- nv, -- fighting
- nv, -- poison
- 1, -- ground
- nv, -- flying
- sup, -- psychic
- 1, -- bug
- nv, -- rock
- nv, -- ghost
- 1, -- dragon
- sup, -- dark
- nv, -- steel
- nv -- fairy
- }
- local Rock = {
- 1, -- none
- 1, -- normal
- sup, -- fire
- 1, -- water
- 1, -- electric
- nv, -- grass
- sup, -- ice
- nv, -- fighting
- 1, -- poison
- 1, -- ground
- sup, -- flying
- 1, -- psychic
- sup, -- bug
- nv, -- rock
- 1, -- ghost
- 1, -- dragon
- 1, -- dark
- nv, -- steel
- 1 -- fairy
- }
- local Ghost = {
- 1, -- none
- imm, -- normal
- 1, -- fire
- 1, -- water
- 1, -- electric
- 1, -- grass
- 1, -- ice
- 1, -- fighting
- 1, -- poison
- 1, -- ground
- 1, -- flying
- sup, -- psychic
- 1, -- bug
- 1, -- rock
- sup, -- ghost
- 1, -- dragon
- nv, -- dark
- 1, -- steel
- 1 -- fairy
- }
- local Dragon = {
- 1, -- none
- 1, -- normal
- 1, -- fire
- 1, -- water
- 1, -- electric
- 1, -- grass
- 1, -- ice
- 1, -- fighting
- 1, -- poison
- 1, -- ground
- 1, -- flying
- 1, -- psychic
- 1, -- bug
- 1, -- rock
- 1, -- ghost
- sup, -- dragon
- 1, -- dark
- nv, -- steel
- imm -- fairy
- }
- local Dark = {
- 1, -- none
- 1, -- normal
- 1, -- fire
- 1, -- water
- 1, -- electric
- 1, -- grass
- 1, -- ice
- nv, -- fighting
- 1, -- poison
- 1, -- ground
- 1, -- flying
- sup, -- psychic
- 1, -- bug
- 1, -- rock
- sup, -- ghost
- 1, -- dragon
- nv, -- dark
- 1, -- steel
- nv -- fairy
- }
- local Steel = {
- 1, -- none
- 1, -- normal
- nv, -- fire
- nv, -- water
- nv, -- electric
- 1, -- grass
- sup, -- ice
- 1, -- fighting
- 1, -- poison
- 1, -- ground
- 1, -- flying
- 1, -- psychic
- 1, -- bug
- sup, -- rock
- 1, -- ghost
- 1, -- dragon
- 1, -- dark
- nv, -- steel
- sup -- fairy
- }
- local Fairy = {
- 1, -- none
- 1, -- normal
- nv, -- fire
- 1, -- water
- 1, -- electric
- 1, -- grass
- 1, -- ice
- sup, -- fighting
- nv, -- poison
- 1, -- ground
- 1, -- flying
- 1, -- psychic
- 1, -- bug
- 1, -- rock
- 1, -- ghost
- sup, -- dragon
- sup, -- dark
- nv, -- steel
- 1 -- fairy
- }
- local numToTypeName = {
- "None",
- "Normal",
- "Fire",
- "Water",
- "Electric",
- "Grass",
- "Ice",
- "Fighting",
- "Poison",
- "Ground",
- "Flying",
- "Psychic",
- "Bug",
- "Rock",
- "Ghost",
- "Dragon",
- "Dark",
- "Steel",
- "Fairy",
- }
- local numToArray = {
- None,
- Normal,
- Fire,
- Water,
- Electric,
- Grass,
- Ice,
- Fighting,
- Poison,
- Ground,
- Flying,
- Psychic,
- Bug,
- Rock,
- Ghost,
- Dragon,
- Dark,
- Steel,
- Fairy,
- }
- local allScores = {}
- local function evaluateTypeCombo(index1, index2)
- local dict1 = numToArray[index1]
- local dict2 = numToArray[index2]
- local sum = 0
- for i = 1, 19 do
- sum = sum + 7*math.max(dict1[i]+dict2[i])
- local againstDict = numToArray[i]
- for j = i+1, 19 do
- local againstDict2 = numToArray[j]
- sum = sum - (math.max(againstDict[index1]*againstDict[index2], againstDict2[index1]*againstDict2[index2]) - 1)
- end
- end
- return sum
- end
- local function evaluateType(index)
- local theArray = numToArray[index]
- local theName = numToTypeName[index]
- for i = index+1, 19 do
- table.insert(allScores, {theName.."/"..numToTypeName[i], evaluateTypeCombo(index, i)})
- end
- end
- for i = 1, 19 do
- evaluateType(i)
- end
- table.sort(allScores, function (a, b) return a[2] > b[2] end)
- for i, thing in pairs(allScores) do
- print(thing[1]..": "..((-1/100)*(thing[2]-1000)))
- end
- --[[ prints this:
- Steel/Fairy: 7.4055
- Flying/Steel: 7.5895
- None/Electric: 7.613
- Normal/Ghost: 7.638
- Ghost/Dark: 7.687
- Electric/Fairy: 7.698
- Electric/Flying: 7.698
- Water/Electric: 7.723
- Poison/Dark: 7.798
- Fighting/Steel: 7.8005
- Ghost/Fairy: 7.8035
- None/Fairy: 7.835
- None/Water: 7.835
- Water/Steel: 7.8625
- Water/Fairy: 7.865
- Fire/Water: 7.8775
- Electric/Fighting: 7.906
- None/Ground: 7.948
- Ground/Steel: 7.954
- Ground/Fairy: 7.964
- Fire/Fighting: 8.003
- None/Normal: 8.013
- None/Ghost: 8.034
- None/Fighting: 8.043
- Fire/Grass: 8.05
- Electric/Bug: 8.068
- Fire/Fairy: 8.0925
- None/Fire: 8.095
- None/Steel: 8.105
- Electric/Ground: 8.121
- Normal/Fairy: 8.124
- Bug/Rock: 8.135
- Dragon/Steel: 8.1405
- None/Poison: 8.143
- Ghost/Steel: 8.1655
- Water/Dragon: 8.1855
- Fighting/Psychic: 8.186
- Electric/Ghost: 8.187
- Poison/Fairy: 8.2205
- Water/Bug: 8.235
- Normal/Electric: 8.241
- Fighting/Ghost: 8.267
- Dark/Fairy: 8.281
- Water/Fighting: 8.298
- None/Flying: 8.315
- Water/Ghost: 8.329
- Psychic/Fairy: 8.3305
- Fighting/Fairy: 8.3455
- Fighting/Ground: 8.351
- Water/Ice: 8.36
- Normal/Psychic: 8.391
- Flying/Rock: 8.409
- Fire/Dragon: 8.4255
- Normal/Water: 8.428
- Ground/Ghost: 8.4315
- Water/Grass: 8.435
- Normal/Poison: 8.436
- Water/Poison: 8.438
- Fire/Dark: 8.47
- Fighting/Flying: 8.4805
- Electric/Ice: 8.493
- Poison/Flying: 8.4985
- None/Bug: 8.505
- Normal/Ground: 8.517
- Fire/Ghost: 8.529
- None/Dark: 8.54
- Dragon/Fairy: 8.543
- Poison/Ground: 8.5535
- Ground/Bug: 8.573
- Grass/Rock: 8.575
- None/Psychic: 8.578
- Psychic/Steel: 8.5855
- Normal/Flying: 8.594
- Flying/Fairy: 8.5985
- Normal/Fighting: 8.611
- None/Ice: 8.62
- Ice/Ground: 8.628
- Poison/Psychic: 8.641
- Normal/Fire: 8.648
- Ice/Ghost: 8.667
- Electric/Dark: 8.678
- Flying/Dark: 8.696
- Poison/Ghost: 8.7145
- Ice/Fighting: 8.723
- None/Dragon: 8.728
- Electric/Psychic: 8.731
- Fire/Psychic: 8.778
- Bug/Fairy: 8.7875
- Normal/Bug: 8.788
- Water/Dark: 8.795
- Flying/Ghost: 8.7985
- Poison/Bug: 8.843
- Ground/Dark: 8.844
- Water/Psychic: 8.853
- Electric/Grass: 8.868
- Electric/Dragon: 8.881
- Ground/Psychic: 8.896
- Water/Ground: 8.898
- Ice/Poison: 8.923
- None/Rock: 8.965
- Bug/Ghost: 8.989
- Rock/Ghost: 8.9925
- Grass/Poison: 8.998
- Fighting/Rock: 9.0105
- Flying/Psychic: 9.0255
- Poison/Dragon: 9.026
- Grass/Ghost: 9.139
- Bug/Dark: 9.155
- Ghost/Dragon: 9.162
- Ice/Dragon: 9.163
- Ice/Psychic: 9.258
- None/Grass: 9.27
- Normal/Dragon: 9.291
- Psychic/Rock: 9.298
- Bug/Dragon: 9.358
- Rock/Dragon: 9.443
- Psychic/Bug: 9.463
- Fire/Ground: 9.628
- Bug/Steel: 9.6375
- Psychic/Dragon: 9.656
- Ground/Flying: 9.687
- Water/Flying: 9.735
- Normal/Grass: 9.768
- Fire/Flying: 9.8455
- Fire/Steel: 9.8675
- Poison/Steel: 9.9205
- Fire/Electric: 9.938
- Electric/Steel: 9.9505
- Electric/Poison: 9.976
- Grass/Steel: 9.9905
- Fighting/Dark: 10.022
- Fighting/Poison: 10.101
- Fire/Bug: 10.195
- Dark/Steel: 10.236
- Ground/Dragon: 10.276
- Fire/Ice: 10.32
- Normal/Steel: 10.339
- Ice/Fairy: 10.365
- Psychic/Dark: 10.398
- Fighting/Bug: 10.408
- Rock/Fairy: 10.4175
- Water/Rock: 10.42
- Fire/Poison: 10.4205
- Ice/Flying: 10.51
- Grass/Ground: 10.518
- Electric/Rock: 10.563
- Normal/Dark: 10.829
- Fighting/Dragon: 10.871
- Grass/Flying: 10.8925
- Flying/Dragon: 10.9055
- Normal/Ice: 10.908
- Grass/Fairy: 10.945
- Flying/Bug: 10.9875
- Poison/Rock: 11.0055
- Grass/Fighting: 11.103
- Normal/Rock: 11.228
- Ice/Dark: 11.245
- Rock/Dark: 11.255
- Dragon/Dark: 11.368
- Grass/Ice: 11.37
- Grass/Dark: 11.775
- Grass/Dragon: 11.8205
- Grass/Psychic: 11.838
- Fire/Rock: 11.9825
- Ice/Steel: 11.9875
- Rock/Steel: 12.095
- Psychic/Ghost: 12.107
- Ice/Bug: 12.595
- Ground/Rock: 12.6055
- Ice/Rock: 12.74
- Grass/Bug: 13.2475
- ]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement