Advertisement
villers

Untitled

Mar 6th, 2015
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     ratioType = [
  2.       [0.5,2,0.5,1,1,0.5,2,0.5,0.5,0.5,0.5,0,0.5,0.5,2,1,1,0.5  ],
  3.       [1,1,1,1,1,2,1,1,0.5,1,1,1,2,0.5,1,1,0.5,2  ],
  4.       [1,1,2,0.5,0.5,2,0.5,2,1,1,0.5,1,1,1,1,1,1,1  ],
  5.       [0.5,1,1,0.5,2,1,0.5,0.5,1,1,2,1,1,1,1,1,1,1  ],
  6.       [0.5,1,1,1,0.5,1,1,1,1,1,1,1,1,1,2,1,1,0.5  ],
  7.       [2,0.5,0,1,1,1,1,1,0.5,1,1,2,1,1,1,1,0.5,1  ],
  8.       [0.5,1,1,2,1,0.5,0.5,0.5,0.5,1,0.5,1,1,2,2,1,1,1  ],
  9.       [2,2,1,1,1,1,2,0.5,1,1,1,1,1,2,1,1,1,1  ],
  10.       [1,0.5,1,1,1,1,2,1,1,1,0.5,1,1,2,0.5,1,1,2  ],
  11.       [1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1  ],
  12.       [1,1,1,0.5,0.5,1,2,2,2,1,0.5,2,1,1,0.5,1,1,2  ],
  13.       [1,0.5,1,1,1,0.5,1,1,0.5,1,0.5,0.5,2,1,2,1,1,1  ],
  14.       [1,0.5,1,1,1,1,1,1,2,1,1,1,0.5,1,1,2,2,1  ],
  15.       [2,2,1,2,1,1,0.5,1,1,0.5,2,0.5,1,1,2,1,1,0.5  ],
  16.       [1,1,1,2,0,1,1,2,1,1,2,0.5,1,0.5,1,1,1,1  ],
  17.       [1,0,1,1,1,1,1,1,0.5,0,1,0.5,1,1,1,2,2,1  ],
  18.       [1,2,1,1,1,2,1,1,2,1,1,1,0,1,1,0.5,0.5,1  ],
  19.       [1,0.5,1,1,2,1,1,2,0.5,1,0.5,1,1,2,0,1,1,1  ]
  20.     ]
  21.     typeIndex = [
  22.       "steel"
  23.       "fighting"
  24.       "dragon"
  25.       "water"
  26.       "electric"
  27.       "fairy"
  28.       "fire"
  29.       "ice"
  30.       "bug"
  31.       "normal"
  32.       "grass"
  33.       "poison"
  34.       "psychic"
  35.       "rock"
  36.       "ground"
  37.       "ghost"
  38.       "dark"
  39.       "flying"
  40.     ]
  41.  
  42.     getRatio : (type1, type2) ->
  43.         indexType1 = typeIndex.indexOf(type1)
  44.         indexType2 = typeIndex.indexOf(type2)
  45.         ratioType[indexType1][indexType2]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement