Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ratioType = [
- [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 ],
- [1,1,1,1,1,2,1,1,0.5,1,1,1,2,0.5,1,1,0.5,2 ],
- [1,1,2,0.5,0.5,2,0.5,2,1,1,0.5,1,1,1,1,1,1,1 ],
- [0.5,1,1,0.5,2,1,0.5,0.5,1,1,2,1,1,1,1,1,1,1 ],
- [0.5,1,1,1,0.5,1,1,1,1,1,1,1,1,1,2,1,1,0.5 ],
- [2,0.5,0,1,1,1,1,1,0.5,1,1,2,1,1,1,1,0.5,1 ],
- [0.5,1,1,2,1,0.5,0.5,0.5,0.5,1,0.5,1,1,2,2,1,1,1 ],
- [2,2,1,1,1,1,2,0.5,1,1,1,1,1,2,1,1,1,1 ],
- [1,0.5,1,1,1,1,2,1,1,1,0.5,1,1,2,0.5,1,1,2 ],
- [1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1 ],
- [1,1,1,0.5,0.5,1,2,2,2,1,0.5,2,1,1,0.5,1,1,2 ],
- [1,0.5,1,1,1,0.5,1,1,0.5,1,0.5,0.5,2,1,2,1,1,1 ],
- [1,0.5,1,1,1,1,1,1,2,1,1,1,0.5,1,1,2,2,1 ],
- [2,2,1,2,1,1,0.5,1,1,0.5,2,0.5,1,1,2,1,1,0.5 ],
- [1,1,1,2,0,1,1,2,1,1,2,0.5,1,0.5,1,1,1,1 ],
- [1,0,1,1,1,1,1,1,0.5,0,1,0.5,1,1,1,2,2,1 ],
- [1,2,1,1,1,2,1,1,2,1,1,1,0,1,1,0.5,0.5,1 ],
- [1,0.5,1,1,2,1,1,2,0.5,1,0.5,1,1,2,0,1,1,1 ]
- ]
- typeIndex = [
- "steel"
- "fighting"
- "dragon"
- "water"
- "electric"
- "fairy"
- "fire"
- "ice"
- "bug"
- "normal"
- "grass"
- "poison"
- "psychic"
- "rock"
- "ground"
- "ghost"
- "dark"
- "flying"
- ]
- getRatio : (type1, type2) ->
- indexType1 = typeIndex.indexOf(type1)
- indexType2 = typeIndex.indexOf(type2)
- ratioType[indexType1][indexType2]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement