Advertisement
Guest User

Untitled

a guest
Jun 15th, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 66.44 KB | None | 0 0
  1. #!/usr/bin/python
  2. print 'Content-Type: text/html\n\n'
  3.  
  4. import cgi, cgitb, random
  5. cgitb.enable()
  6.  
  7. moves = open('pokemonmovelist.csv', 'r')
  8. pokemon = open('pokemonstuff.csv','r')
  9.  
  10. movething=moves.read()
  11. pokemonthing=pokemon.read()
  12.  
  13. moveList = movething.replace('\n', ' ').replace(',',' ').split()
  14. pokemonList =pokemonthing.replace('\n', ' ').replace(',',' ').split()
  15.  
  16. form=cgi.FieldStorage()
  17.  
  18. def typea(x):
  19. pokemonindex=''
  20. listindex=0
  21. primarytype=''
  22. pokemonindex+= str(x)
  23. if pokemonindex in pokemonList:
  24. listindex+=int(pokemonList.index(pokemonindex))
  25. primarytype+=pokemonList[((listindex)+11)]
  26. return primarytype
  27.  
  28.  
  29. def typeb(x):
  30. pokemonindex2=''
  31. listindex2=0
  32. secondarytype=''
  33. pokemonindex2+= str(x)
  34. if pokemonindex2 in pokemonList:
  35. listindex2+=int(pokemonList.index(pokemonindex2))
  36. secondarytype+=pokemonList[((listindex2)+12)]
  37. return secondarytype
  38.  
  39.  
  40. def checkmovetype(x):
  41. moveindex=''
  42. movenumber=0
  43. moveposition=0
  44. moveindex+= str(x)
  45. if moveindex in moveList:
  46. movenumber+=(moveList.index(moveindex))
  47. moveposition+=(int(movenumber+1))
  48. return moveList[moveposition]
  49.  
  50.  
  51.  
  52. def modifier():
  53. stagecalc1=0
  54. stagecalc2=0
  55. base=0
  56. if form['stage1'].value == -6:
  57. stagecalc1+=.25
  58. if form['stage1'].value == -5:
  59. stagecalc1+=.2857
  60. if form['stage1'].value == -4:
  61. stagecalc1+=.3333
  62. if form['stage1'].value == -3:
  63. stagecalc1+=.4
  64. if form['stage1'].value == -2:
  65. stagecalc1+=.5
  66. if form['stage1'].value == -1:
  67. stagecalc1+=.6667
  68. if form['stage1'].value == 0:
  69. stagecalc1+=1
  70. if form['stage1'].value == 1:
  71. stagecalc1+=1.5
  72. if form['stage1'].value == 2:
  73. stagecalc1+=2
  74. if form['stage1'].value == 3:
  75. stagecalc1+=2.5
  76. if form['stage1'].value == 4:
  77. stagecalc1+=3
  78. if form['stage1'].value == 5:
  79. stagecalc1+=3.5
  80. if form['stage1'].value == 6:
  81. stagecalc1+=4
  82. return stagecalc1
  83. if form['stage2'].value == 6:
  84. stagecalc2+=.25
  85. if form['stage2'].value == 5:
  86. stagecalc2+=.2857
  87. if form['stage2'].value == 4:
  88. stagecalc2+=.3333
  89. if form['stage2'].value == 3:
  90. stagecalc2+=.4
  91. if form['stage2'].value == 2:
  92. stagecalc2+=.5
  93. if form['stage2'].value == 1:
  94. stagecalc2+=.6667
  95. if form['stage2'].value == 0:
  96. stagecalc2+=1
  97. if form['stage2'].value == -1:
  98. stagecalc2+=1.5
  99. if form['stage2'].value == -2:
  100. stagecalc2+=2
  101. if form['stage2'].value == -3:
  102. stagecalc2+=2.5
  103. if form['stage2'].value == -4:
  104. stagecalc2+=3
  105. if form['stage2'].value == -5:
  106. stagecalc2+=3.5
  107. if form['stage2'].value == -6:
  108. stagecalc2+=4
  109. return stagecalc2
  110. base +=((int(stagecalc1)) * (int(stagecalc2)))
  111. return base
  112.  
  113.  
  114. def getdamage():
  115. damage=0
  116. level=0
  117. attack=0
  118. defense=0
  119. y=''
  120. basedamage=0
  121. basedamageindex=0
  122. t=''
  123. if 'atk' in form and 'def' in form and 'move' in form and 'stage1' in form and 'stage2' in form and 'level1' in form and 'level2' in form and 'pokemon1' in form and 'pokemon2' in form:
  124. level+=int(form['level1'].value)
  125. attack+=int(form['atk'].value)
  126. defense+=int(form['def'].value)
  127. y+=(form['pokemon2'].value)
  128. t+= (form['move'].value)
  129. if t in moveList:
  130. basedamageindex += ((int((moveList.index(t)))) +3)
  131. basedamage+=(int(moveList[basedamageindex]))
  132. if basedamage > 0:
  133. damage+= (((2 * (level) + 10)/250)*((attack)/(defense))*((basedamage)+2))
  134. if checkmovetype(t) =='Normal' and typea(y) == 'Normal' and typeb(y) == 'N/A':
  135. damage*=1
  136. if checkmovetype(t) =='Normal' and typea(y) == 'Fire' and typeb(y) == 'N/A':
  137. damage*=1
  138. if checkmovetype(t) =='Normal' and typea(y) == 'Water' and typeb(y) == 'N/A':
  139. damage*=1
  140. if checkmovetype(t) =='Normal' and typea(y) == 'Electric' and typeb(y) == 'N/A':
  141. damage*=1
  142. if checkmovetype(t) =='Normal' and typea(y) == 'Grass' and typeb(y) == 'N/A':
  143. damage*=1
  144. if checkmovetype(t) =='Normal' and typea(y) == 'Ice' and typeb(y) == 'N/A':
  145. damage*=1
  146. if checkmovetype(t) =='Normal' and typea(y) == 'Fighting' and typeb(y) == 'N/A':
  147. damage*=1
  148. if checkmovetype(t) =='Normal' and typea(y) == 'Poison' and typeb(y) == 'N/A':
  149. damage*=1
  150. if checkmovetype(t) =='Normal' and typea(y) == 'Ground' and typeb(y) == 'N/A':
  151. damage*=1
  152. if checkmovetype(t) =='Normal' and typea(y) == 'Flying' and typeb(y) == 'N/A':
  153. damage*=1
  154. if checkmovetype(t) =='Normal' and typea(y) == 'Psychic' and typeb(y) == 'N/A':
  155. damage*=1
  156. if checkmovetype(t) =='Normal' and typea(y) == 'Bug' and typeb(y) == 'N/A':
  157. damage*=1
  158. if checkmovetype(t) =='Normal' and typea(y) == 'Rock' and typeb(y) == 'N/A':
  159. damage*=0.5
  160. if checkmovetype(t) =='Normal' and typea(y) == 'Ghost' and typeb(y) == 'N/A':
  161. damage*=0
  162. if checkmovetype(t) =='Normal' and typea(y) == 'Dragon' and typeb(y) == 'N/A':
  163. damage*=1
  164. if checkmovetype(t) =='Fire' and typea(y) == 'Normal' and typeb(y) == 'N/A':
  165. damage*=1
  166. if checkmovetype(t) =='Fire' and typea(y) == 'Fire' and typeb(y) == 'N/A':
  167. damage*=1
  168. if checkmovetype(t) =='Fire' and typea(y) == 'Water' and typeb(y) == 'N/A':
  169. damage*=0.5
  170. if checkmovetype(t) =='Fire' and typea(y) == 'Electric' and typeb(y) == 'N/A':
  171. damage*=1
  172. if checkmovetype(t) =='Fire' and typea(y) == 'Grass' and typeb(y) == 'N/A':
  173. damage*=2
  174. if checkmovetype(t) =='Fire' and typea(y) == 'Ice' and typeb(y) == 'N/A':
  175. damage*=2
  176. if checkmovetype(t) =='Fire' and typea(y) == 'Fighting' and typeb(y) == 'N/A':
  177. damage*=1
  178. if checkmovetype(t) =='Fire' and typea(y) == 'Poison' and typeb(y) == 'N/A':
  179. damage*=1
  180. if checkmovetype(t) =='Fire' and typea(y) == 'Ground' and typeb(y) == 'N/A':
  181. damage*=1
  182. if checkmovetype(t) =='Fire' and typea(y) == 'Flying' and typeb(y) == 'N/A':
  183. damage*=1
  184. if checkmovetype(t) =='Fire' and typea(y) == 'Psychic' and typeb(y) == 'N/A':
  185. damage*=1
  186. if checkmovetype(t) =='Fire' and typea(y) == 'Bug' and typeb(y) == 'N/A':
  187. damage*=2
  188. if checkmovetype(t) =='Fire' and typea(y) == 'Rock' and typeb(y) == 'N/A':
  189. damage*=0.5
  190. if checkmovetype(t) =='Fire' and typea(y) == 'Ghost' and typeb(y) == 'N/A':
  191. damage*=1
  192. if checkmovetype(t) =='Fire' and typea(y) == 'Dragon' and typeb(y) == 'N/A':
  193. damage*=0.5
  194. if checkmovetype(t) =='Water' and typea(y) == 'Normal' and typeb(y) == 'N/A':
  195. damage*=1
  196. if checkmovetype(t) =='Water' and typea(y) == 'Fire' and typeb(y) == 'N/A':
  197. damage*=2
  198. if checkmovetype(t) =='Water' and typea(y) == 'Water' and typeb(y) == 'N/A':
  199. damage*=0.5
  200. if checkmovetype(t) =='Water' and typea(y) == 'Electric' and typeb(y) == 'N/A':
  201. damage*=1
  202. if checkmovetype(t) =='Water' and typea(y) == 'Grass' and typeb(y) == 'N/A':
  203. damage*=0.5
  204. if checkmovetype(t) =='Water' and typea(y) == 'Ice' and typeb(y) == 'N/A':
  205. damage*=1
  206. if checkmovetype(t) =='Water' and typea(y) == 'Fighting' and typeb(y) == 'N/A':
  207. damage*=1
  208. if checkmovetype(t) =='Water' and typea(y) == 'Poison' and typeb(y) == 'N/A':
  209. damage*=1
  210. if checkmovetype(t) =='Water' and typea(y) == 'Ground' and typeb(y) == 'N/A':
  211. damage*=2
  212. if checkmovetype(t) =='Water' and typea(y) == 'Flying' and typeb(y) == 'N/A':
  213. damage*=1
  214. if checkmovetype(t) =='Water' and typea(y) == 'Psychic' and typeb(y) == 'N/A':
  215. damage*=1
  216. if checkmovetype(t) =='Water' and typea(y) == 'Bug' and typeb(y) == 'N/A':
  217. damage*=1
  218. if checkmovetype(t) =='Water' and typea(y) == 'Rock' and typeb(y) == 'N/A':
  219. damage*=2
  220. if checkmovetype(t) =='Water' and typea(y) == 'Ghost' and typeb(y) == 'N/A':
  221. damage*=1
  222. if checkmovetype(t) =='Water' and typea(y) == 'Dragon' and typeb(y) == 'N/A':
  223. damage*=0.5
  224. if checkmovetype(t) =='Grass' and typea(y) == 'Normal' and typeb(y) == 'N/A':
  225. damage*=1
  226. if checkmovetype(t) =='Grass' and typea(y) == 'Fire' and typeb(y) == 'N/A':
  227. damage*=0.5
  228. if checkmovetype(t) =='Grass' and typea(y) == 'Water' and typeb(y) == 'N/A':
  229. damage*=2
  230. if checkmovetype(t) =='Grass' and typea(y) == 'Electric' and typeb(y) == 'N/A':
  231. damage*=1
  232. if checkmovetype(t) =='Grass' and typea(y) == 'Grass' and typeb(y) == 'N/A':
  233. damage*=0.5
  234. if checkmovetype(t) =='Grass' and typea(y) == 'Ice' and typeb(y) == 'N/A':
  235. damage*=1
  236. if checkmovetype(t) =='Grass' and typea(y) == 'Fighting' and typeb(y) == 'N/A':
  237. damage*=1
  238. if checkmovetype(t) =='Grass' and typea(y) == 'Poison' and typeb(y) == 'N/A':
  239. damage*=0.5
  240. if checkmovetype(t) =='Grass' and typea(y) == 'Ground' and typeb(y) == 'N/A':
  241. damage*=2
  242. if checkmovetype(t) =='Grass' and typea(y) == 'Flying' and typeb(y) == 'N/A':
  243. damage*=0.5
  244. if checkmovetype(t) =='Grass' and typea(y) == 'Psychic' and typeb(y) == 'N/A':
  245. damage*=1
  246. if checkmovetype(t) =='Grass' and typea(y) == 'Bug' and typeb(y) == 'N/A':
  247. damage*=0.5
  248. if checkmovetype(t) =='Grass' and typea(y) == 'Rock' and typeb(y) == 'N/A':
  249. damage*=2
  250. if checkmovetype(t) =='Grass' and typea(y) == 'Ghost' and typeb(y) == 'N/A':
  251. damage*=1
  252. if checkmovetype(t) =='Grass' and typea(y) == 'Dragon' and typeb(y) == 'N/A':
  253. damage*=0.5
  254. if checkmovetype(t) =='Ice' and typea(y) == 'Normal' and typeb(y) == 'N/A':
  255. damage*=1
  256. if checkmovetype(t) =='Ice' and typea(y) == 'Fire' and typeb(y) == 'N/A':
  257. damage*=1
  258. if checkmovetype(t) =='Ice' and typea(y) == 'Water' and typeb(y) == 'N/A':
  259. damage*=0.5
  260. if checkmovetype(t) =='Ice' and typea(y) == 'Electric' and typeb(y) == 'N/A':
  261. damage*=1
  262. if checkmovetype(t) =='Ice' and typea(y) == 'Grass' and typeb(y) == 'N/A':
  263. damage*=2
  264. if checkmovetype(t) =='Ice' and typea(y) == 'Ice' and typeb(y) == 'N/A':
  265. damage*=0.5
  266. if checkmovetype(t) =='Ice' and typea(y) == 'Fighting' and typeb(y) == 'N/A':
  267. damage*=1
  268. if checkmovetype(t) =='Ice' and typea(y) == 'Poison' and typeb(y) == 'N/A':
  269. damage*=1
  270. if checkmovetype(t) =='Ice' and typea(y) == 'Ground' and typeb(y) == 'N/A':
  271. damage*=2
  272. if checkmovetype(t) =='Ice' and typea(y) == 'Flying' and typeb(y) == 'N/A':
  273. damage*=2
  274. if checkmovetype(t) =='Ice' and typea(y) == 'Psychic' and typeb(y) == 'N/A':
  275. damage*=1
  276. if checkmovetype(t) =='Ice' and typea(y) == 'Bug' and typeb(y) == 'N/A':
  277. damage*=1
  278. if checkmovetype(t) =='Ice' and typea(y) == 'Rock' and typeb(y) == 'N/A':
  279. damage*=1
  280. if checkmovetype(t) =='Ice' and typea(y) == 'Ghost' and typeb(y) == 'N/A':
  281. damage*=1
  282. if checkmovetype(t) =='Ice' and typea(y) == 'Dragon' and typeb(y) == 'N/A':
  283. damage*=2
  284. if checkmovetype(t) =='Fighting' and typea(y) == 'Normal' and typeb(y) == 'N/A':
  285. damage*=2
  286. if checkmovetype(t) =='Fighting' and typea(y) == 'Fire' and typeb(y) == 'N/A':
  287. damage*=1
  288. if checkmovetype(t) =='Fighting' and typea(y) == 'Water' and typeb(y) == 'N/A':
  289. damage*=1
  290. if checkmovetype(t) =='Fighting' and typea(y) == 'Electric' and typeb(y) == 'N/A':
  291. damage*=1
  292. if checkmovetype(t) =='Fighting' and typea(y) == 'Grass' and typeb(y) == 'N/A':
  293. damage*=1
  294. if checkmovetype(t) =='Fighting' and typea(y) == 'Ice' and typeb(y) == 'N/A':
  295. damage*=2
  296. if checkmovetype(t) =='Fighting' and typea(y) == 'Fighting' and typeb(y) == 'N/A':
  297. damage*=1
  298. if checkmovetype(t) =='Fighting' and typea(y) == 'Poison' and typeb(y) == 'N/A':
  299. damage*=0.5
  300. if checkmovetype(t) =='Fighting' and typea(y) == 'Ground' and typeb(y) == 'N/A':
  301. damage*=1
  302. if checkmovetype(t) =='Fighting' and typea(y) == 'Flying' and typeb(y) == 'N/A':
  303. damage*=0.5
  304. if checkmovetype(t) =='Fighting' and typea(y) == 'Psychic' and typeb(y) == 'N/A':
  305. damage*=0.5
  306. if checkmovetype(t) =='Fighting' and typea(y) == 'Bug' and typeb(y) == 'N/A':
  307. damage*=0.5
  308. if checkmovetype(t) =='Fighting' and typea(y) == 'Rock' and typeb(y) == 'N/A':
  309. damage*=2
  310. if checkmovetype(t) =='Fighting' and typea(y) == 'Ghost' and typeb(y) == 'N/A':
  311. damage*=0
  312. if checkmovetype(t) =='Fighting' and typea(y) == 'Dragon' and typeb(y) == 'N/A':
  313. damage*=1
  314. if checkmovetype(t) =='Poison' and typea(y) == 'Normal' and typeb(y) == 'N/A':
  315. damage*=2
  316. if checkmovetype(t) =='Poison' and typea(y) == 'Fire' and typeb(y) == 'N/A':
  317. damage*=1
  318. if checkmovetype(t) =='Poison' and typea(y) == 'Water' and typeb(y) == 'N/A':
  319. damage*=1
  320. if checkmovetype(t) =='Poison' and typea(y) == 'Electric' and typeb(y) == 'N/A':
  321. damage*=1
  322. if checkmovetype(t) =='Poison' and typea(y) == 'Grass' and typeb(y) == 'N/A':
  323. damage*=2
  324. if checkmovetype(t) =='Poison' and typea(y) == 'Ice' and typeb(y) == 'N/A':
  325. damage*=1
  326. if checkmovetype(t) =='Poison' and typea(y) == 'Fighting' and typeb(y) == 'N/A':
  327. damage*=1
  328. if checkmovetype(t) =='Poison' and typea(y) == 'Poison' and typeb(y) == 'N/A':
  329. damage*=0.5
  330. if checkmovetype(t) =='Poison' and typea(y) == 'Ground' and typeb(y) == 'N/A':
  331. damage*=0.5
  332. if checkmovetype(t) =='Poison' and typea(y) == 'Flying' and typeb(y) == 'N/A':
  333. damage*=1
  334. if checkmovetype(t) =='Poison' and typea(y) == 'Psychic' and typeb(y) == 'N/A':
  335. damage*=1
  336. if checkmovetype(t) =='Poison' and typea(y) == 'Bug' and typeb(y) == 'N/A':
  337. damage*=1
  338. if checkmovetype(t) =='Poison' and typea(y) == 'Rock' and typeb(y) == 'N/A':
  339. damage*=1
  340. if checkmovetype(t) =='Poison' and typea(y) == 'Ghost' and typeb(y) == 'N/A':
  341. damage*=1
  342. if checkmovetype(t) =='Poison' and typea(y) == 'Dragon' and typeb(y) == 'N/A':
  343. damage*=1
  344. if checkmovetype(t) =='Ground' and typea(y) == 'Normal' and typeb(y) == 'N/A':
  345. damage*=1
  346. if checkmovetype(t) =='Ground' and typea(y) == 'Fire' and typeb(y) == 'N/A':
  347. damage*=2
  348. if checkmovetype(t) =='Ground' and typea(y) == 'Water' and typeb(y) == 'N/A':
  349. damage*=1
  350. if checkmovetype(t) =='Ground' and typea(y) == 'Electric' and typeb(y) == 'N/A':
  351. damage*=2
  352. if checkmovetype(t) =='Ground' and typea(y) == 'Grass' and typeb(y) == 'N/A':
  353. damage*=0.5
  354. if checkmovetype(t) =='Ground' and typea(y) == 'Ice' and typeb(y) == 'N/A':
  355. damage*=1
  356. if checkmovetype(t) =='Ground' and typea(y) == 'Fighting' and typeb(y) == 'N/A':
  357. damage*=1
  358. if checkmovetype(t) =='Ground' and typea(y) == 'Poison' and typeb(y) == 'N/A':
  359. damage*=2
  360. if checkmovetype(t) =='Ground' and typea(y) == 'Ground' and typeb(y) == 'N/A':
  361. damage*=1
  362. if checkmovetype(t) =='Ground' and typea(y) == 'Flying' and typeb(y) == 'N/A':
  363. damage*=0
  364. if checkmovetype(t) =='Ground' and typea(y) == 'Psychic' and typeb(y) == 'N/A':
  365. damage*=1
  366. if checkmovetype(t) =='Ground' and typea(y) == 'Bug' and typeb(y) == 'N/A':
  367. damage*=0.5
  368. if checkmovetype(t) =='Ground' and typea(y) == 'Rock' and typeb(y) == 'N/A':
  369. damage*=2
  370. if checkmovetype(t) =='Ground' and typea(y) == 'Ghost' and typeb(y) == 'N/A':
  371. damage*=1
  372. if checkmovetype(t) =='Ground' and typea(y) == 'Dragon' and typeb(y) == 'N/A':
  373. damage*=1
  374. if checkmovetype(t) =='Flying' and typea(y) == 'Normal' and typeb(y) == 'N/A':
  375. damage*=1
  376. if checkmovetype(t) =='Flying' and typea(y) == 'Fire' and typeb(y) == 'N/A':
  377. damage*=1
  378. if checkmovetype(t) =='Flying' and typea(y) == 'Water' and typeb(y) == 'N/A':
  379. damage*=1
  380. if checkmovetype(t) =='Flying' and typea(y) == 'Electric' and typeb(y) == 'N/A':
  381. damage*=0.5
  382. if checkmovetype(t) =='Flying' and typea(y) == 'Grass' and typeb(y) == 'N/A':
  383. damage*=2
  384. if checkmovetype(t) =='Flying' and typea(y) == 'Ice' and typeb(y) == 'N/A':
  385. damage*=1
  386. if checkmovetype(t) =='Flying' and typea(y) == 'Fighting' and typeb(y) == 'N/A':
  387. damage*=2
  388. if checkmovetype(t) =='Flying' and typea(y) == 'Poison' and typeb(y) == 'N/A':
  389. damage*=1
  390. if checkmovetype(t) =='Flying' and typea(y) == 'Ground' and typeb(y) == 'N/A':
  391. damage*=1
  392. if checkmovetype(t) =='Flying' and typea(y) == 'Flying' and typeb(y) == 'N/A':
  393. damage*=1
  394. if checkmovetype(t) =='Flying' and typea(y) == 'Psychic' and typeb(y) == 'N/A':
  395. damage*=1
  396. if checkmovetype(t) =='Flying' and typea(y) == 'Bug' and typeb(y) == 'N/A':
  397. damage*=2
  398. if checkmovetype(t) =='Flying' and typea(y) == 'Rock' and typeb(y) == 'N/A':
  399. damage*=0.5
  400. if checkmovetype(t) =='Flying' and typea(y) == 'Ghost' and typeb(y) == 'N/A':
  401. damage*=1
  402. if checkmovetype(t) =='Flying' and typea(y) == 'Dragon' and typeb(y) == 'N/A':
  403. damage*=1
  404. if checkmovetype(t) =='Psychic' and typea(y) == 'Normal' and typeb(y) == 'N/A':
  405. damage*=1
  406. if checkmovetype(t) =='Psychic' and typea(y) == 'Fire' and typeb(y) == 'N/A':
  407. damage*=1
  408. if checkmovetype(t) =='Psychic' and typea(y) == 'Water' and typeb(y) == 'N/A':
  409. damage*=1
  410. if checkmovetype(t) =='Psychic' and typea(y) == 'Electric' and typeb(y) == 'N/A':
  411. damage*=1
  412. if checkmovetype(t) =='Psychic' and typea(y) == 'Grass' and typeb(y) == 'N/A':
  413. damage*=1
  414. if checkmovetype(t) =='Psychic' and typea(y) == 'Ice' and typeb(y) == 'N/A':
  415. damage*=1
  416. if checkmovetype(t) =='Psychic' and typea(y) == 'Fighting' and typeb(y) == 'N/A':
  417. damage*=2
  418. if checkmovetype(t) =='Psychic' and typea(y) == 'Poison' and typeb(y) == 'N/A':
  419. damage*=2
  420. if checkmovetype(t) =='Psychic' and typea(y) == 'Ground' and typeb(y) == 'N/A':
  421. damage*=1
  422. if checkmovetype(t) =='Psychic' and typea(y) == 'Flying' and typeb(y) == 'N/A':
  423. damage*=1
  424. if checkmovetype(t) =='Psychic' and typea(y) == 'Psychic' and typeb(y) == 'N/A':
  425. damage*=0.5
  426. if checkmovetype(t) =='Psychic' and typea(y) == 'Bug' and typeb(y) == 'N/A':
  427. damage*=1
  428. if checkmovetype(t) =='Psychic' and typea(y) == 'Rock' and typeb(y) == 'N/A':
  429. damage*=1
  430. if checkmovetype(t) =='Psychic' and typea(y) == 'Ghost' and typeb(y) == 'N/A':
  431. damage*=1
  432. if checkmovetype(t) =='Psychic' and typea(y) == 'Dragon' and typeb(y) == 'N/A':
  433. damage*=1
  434. if checkmovetype(t) =='Bug' and typea(y) == 'Normal' and typeb(y) == 'N/A':
  435. damage*=1
  436. if checkmovetype(t) =='Bug' and typea(y) == 'Fire' and typeb(y) == 'N/A':
  437. damage*=1
  438. if checkmovetype(t) =='Bug' and typea(y) == 'Water' and typeb(y) == 'N/A':
  439. damage*=1
  440. if checkmovetype(t) =='Bug' and typea(y) == 'Electric' and typeb(y) == 'N/A':
  441. damage*=1
  442. if checkmovetype(t) =='Bug' and typea(y) == 'Grass' and typeb(y) == 'N/A':
  443. damage*=1
  444. if checkmovetype(t) =='Bug' and typea(y) == 'Ice' and typeb(y) == 'N/A':
  445. damage*=1
  446. if checkmovetype(t) =='Bug' and typea(y) == 'Fighting' and typeb(y) == 'N/A':
  447. damage*=2
  448. if checkmovetype(t) =='Bug' and typea(y) == 'Poison' and typeb(y) == 'N/A':
  449. damage*=2
  450. if checkmovetype(t) =='Bug' and typea(y) == 'Ground' and typeb(y) == 'N/A':
  451. damage*=1
  452. if checkmovetype(t) =='Bug' and typea(y) == 'Flying' and typeb(y) == 'N/A':
  453. damage*=1
  454. if checkmovetype(t) =='Bug' and typea(y) == 'Psychic' and typeb(y) == 'N/A':
  455. damage*=0.5
  456. if checkmovetype(t) =='Bug' and typea(y) == 'Bug' and typeb(y) == 'N/A':
  457. damage*=1
  458. if checkmovetype(t) =='Bug' and typea(y) == 'Rock' and typeb(y) == 'N/A':
  459. damage*=1
  460. if checkmovetype(t) =='Bug' and typea(y) == 'Ghost' and typeb(y) == 'N/A':
  461. damage*=1
  462. if checkmovetype(t) =='Bug' and typea(y) == 'Dragon' and typeb(y) == 'N/A':
  463. damage*=1
  464. if checkmovetype(t) =='Rock' and typea(y) == 'Normal' and typeb(y) == 'N/A':
  465. damage*=1
  466. if checkmovetype(t) =='Rock' and typea(y) == 'Fire' and typeb(y) == 'N/A':
  467. damage*=2
  468. if checkmovetype(t) =='Rock' and typea(y) == 'Water' and typeb(y) == 'N/A':
  469. damage*=1
  470. if checkmovetype(t) =='Rock' and typea(y) == 'Electric' and typeb(y) == 'N/A':
  471. damage*=1
  472. if checkmovetype(t) =='Rock' and typea(y) == 'Grass' and typeb(y) == 'N/A':
  473. damage*=1
  474. if checkmovetype(t) =='Rock' and typea(y) == 'Ice' and typeb(y) == 'N/A':
  475. damage*=2
  476. if checkmovetype(t) =='Rock' and typea(y) == 'Fighting' and typeb(y) == 'N/A':
  477. damage*=0.5
  478. if checkmovetype(t) =='Rock' and typea(y) == 'Poison' and typeb(y) == 'N/A':
  479. damage*=1
  480. if checkmovetype(t) =='Rock' and typea(y) == 'Ground' and typeb(y) == 'N/A':
  481. damage*=0.5
  482. if checkmovetype(t) =='Rock' and typea(y) == 'Flying' and typeb(y) == 'N/A':
  483. damage*=2
  484. if checkmovetype(t) =='Rock' and typea(y) == 'Psychic' and typeb(y) == 'N/A':
  485. damage*=1
  486. if checkmovetype(t) =='Rock' and typea(y) == 'Bug' and typeb(y) == 'N/A':
  487. damage*=2
  488. if checkmovetype(t) =='Rock' and typea(y) == 'Rock' and typeb(y) == 'N/A':
  489. damage*=1
  490. if checkmovetype(t) =='Rock' and typea(y) == 'Ghost' and typeb(y) == 'N/A':
  491. damage*=1
  492. if checkmovetype(t) =='Rock' and typea(y) == 'Dragon' and typeb(y) == 'N/A':
  493. damage*=1
  494. if checkmovetype(t) =='Ghost' and typea(y) == 'Normal' and typeb(y) == 'N/A':
  495. damage*=0
  496. if checkmovetype(t) =='Ghost' and typea(y) == 'Fire' and typeb(y) == 'N/A':
  497. damage*=1
  498. if checkmovetype(t) =='Ghost' and typea(y) == 'Water' and typeb(y) == 'N/A':
  499. damage*=1
  500. if checkmovetype(t) =='Ghost' and typea(y) == 'Electric' and typeb(y) == 'N/A':
  501. damage*=1
  502. if checkmovetype(t) =='Ghost' and typea(y) == 'Grass' and typeb(y) == 'N/A':
  503. damage*=1
  504. if checkmovetype(t) =='Ghost' and typea(y) == 'Ice' and typeb(y) == 'N/A':
  505. damage*=1
  506. if checkmovetype(t) =='Ghost' and typea(y) == 'Fighting' and typeb(y) == 'N/A':
  507. damage*=1
  508. if checkmovetype(t) =='Ghost' and typea(y) == 'Poison' and typeb(y) == 'N/A':
  509. damage*=1
  510. if checkmovetype(t) =='Ghost' and typea(y) == 'Ground' and typeb(y) == 'N/A':
  511. damage*=1
  512. if checkmovetype(t) =='Ghost' and typea(y) == 'Flying' and typeb(y) == 'N/A':
  513. damage*=1
  514. if checkmovetype(t) =='Ghost' and typea(y) == 'Psychic' and typeb(y) == 'N/A':
  515. damage*=0
  516. if checkmovetype(t) =='Ghost' and typea(y) == 'Bug' and typeb(y) == 'N/A':
  517. damage*=1
  518. if checkmovetype(t) =='Ghost' and typea(y) == 'Rock' and typeb(y) == 'N/A':
  519. damage*=1
  520. if checkmovetype(t) =='Ghost' and typea(y) == 'Ghost' and typeb(y) == 'N/A':
  521. damage*=2
  522. if checkmovetype(t) =='Ghost' and typea(y) == 'Dragon' and typeb(y) == 'N/A':
  523. damage*=1
  524. if checkmovetype(t) =='Dragon' and typea(y) == 'Normal' and typeb(y) == 'N/A':
  525. damage*=1
  526. if checkmovetype(t) =='Dragon' and typea(y) == 'Fire' and typeb(y) == 'N/A':
  527. damage*=1
  528. if checkmovetype(t) =='Dragon' and typea(y) == 'Water' and typeb(y) == 'N/A':
  529. damage*=1
  530. if checkmovetype(t) =='Dragon' and typea(y) == 'Electric' and typeb(y) == 'N/A':
  531. damage*=1
  532. if checkmovetype(t) =='Dragon' and typea(y) == 'Grass' and typeb(y) == 'N/A':
  533. damage*=1
  534. if checkmovetype(t) =='Dragon' and typea(y) == 'Ice' and typeb(y) == 'N/A':
  535. damage*=1
  536. if checkmovetype(t) =='Dragon' and typea(y) == 'Fighting' and typeb(y) == 'N/A':
  537. damage*=1
  538. if checkmovetype(t) =='Dragon' and typea(y) == 'Poison' and typeb(y) == 'N/A':
  539. damage*=1
  540. if checkmovetype(t) =='Dragon' and typea(y) == 'Ground' and typeb(y) == 'N/A':
  541. damage*=1
  542. if checkmovetype(t) =='Dragon' and typea(y) == 'Flying' and typeb(y) == 'N/A':
  543. damage*=1
  544. if checkmovetype(t) =='Dragon' and typea(y) == 'Psychic' and typeb(y) == 'N/A':
  545. damage*=1
  546. if checkmovetype(t) =='Dragon' and typea(y) == 'Bug' and typeb(y) == 'N/A':
  547. damage*=1
  548. if checkmovetype(t) =='Dragon' and typea(y) == 'Rock' and typeb(y) == 'N/A':
  549. damage*=1
  550. if checkmovetype(t) =='Dragon' and typea(y) == 'Ghost' and typeb(y) == 'N/A':
  551. damage*=1
  552. if checkmovetype(t) =='Dragon' and typea(y) == 'Dragon' and typeb(y) == 'N/A':
  553. damage*=2
  554. if checkmovetype(t) == 'Normal' and typea(y) == 'Grass' and\
  555. typeb(y) == 'Poison':
  556. damage *= 1
  557. if checkmovetype(t) == 'Fighting' and typea(y) == 'Grass' and\
  558. typeb(y) == 'Poison':
  559. damage *=0.5
  560. if checkmovetype(t) == 'Flying' and typea(y) == 'Grass' and\
  561. typeb(y) == 'Poison':
  562. damage *=2
  563. if checkmovetype(t) == 'Poison' and typea(y) == 'Grass' and\
  564. typeb(y) == 'Poison':
  565. damage *=1
  566. if checkmovetype(t) == 'Ground' and typea(y) == 'Grass' and\
  567. typeb(y) == 'Poison':
  568. damage *=1
  569. if checkmovetype(t) == 'Rock' and typea(y) == 'Grass' and\
  570. typeb(y) == 'Poison':
  571. damage *=1
  572. if checkmovetype(t) == 'Bug' and typea(y) == 'Grass' and\
  573. typeb(y) == 'Poison':
  574. damage *=1
  575. if checkmovetype(t) == 'Ghost' and typea(y) == 'Grass' and\
  576. typeb(y) == 'Poison':
  577. damage *=1
  578. if checkmovetype(t) == 'Fire' and typea(y) == 'Grass' and\
  579. typeb(y) == 'Poison':
  580. damage *=2
  581. if checkmovetype(t) == 'Water' and typea(y) == 'Grass' and\
  582. typeb(y) == 'Poison':
  583. damage *=0.5
  584. if checkmovetype(t) == 'Grass' and typea(y) == 'Grass' and\
  585. typeb(y) == 'Poison':
  586. damage *=0.25
  587. if checkmovetype(t) == 'Electric' and typea(y) == 'Grass' and\
  588. typeb(y) == 'Poison':
  589. damage *=0.5
  590. if checkmovetype(t) == 'Psychic' and typea(y) == 'Grass' and\
  591. typeb(y) == 'Poison':
  592. damage *=2
  593. if checkmovetype(t) == 'Ice' and typea(y) == 'Grass' and\
  594. typeb(y) == 'Poison':
  595. damage *=2
  596. if checkmovetype(t) == 'Dragon' and typea(y) == 'Grass' and\
  597. typeb(y) == 'Poison':
  598. damage *=1
  599. if checkmovetype(t) == 'Normal' and typea(y) == 'Fire' and\
  600. typeb(y) =='Flying':
  601. damage*=1
  602. if checkmovetype(t) == 'Fighting' and typea(y) == 'Fire' and\
  603. typeb(y) =='Flying':
  604. damage*=0.5
  605. if checkmovetype(t) == 'Flying' and typea(y) == 'Fire' and\
  606. typeb(y) =='Flying':
  607. damage*=1
  608. if checkmovetype(t) == 'Poison' and typea(y) == 'Fire' and\
  609. typeb(y) =='Flying':
  610. damage*=1
  611. if checkmovetype(t) == 'Ground' and typea(y) == 'Fire' and\
  612. typeb(y) =='Flying':
  613. damage*=0
  614. if checkmovetype(t) == 'Rock' and typea(y) == 'Fire' and\
  615. typeb(y) =='Flying':
  616. damage*=4
  617. if checkmovetype(t) == 'Ghost' and typea(y) == 'Fire' and\
  618. typeb(y) =='Flying':
  619. damage*=1
  620. if checkmovetype(t) == 'Fire' and typea(y) == 'Fire' and\
  621. typeb(y) =='Flying':
  622. damage*=0.5
  623. if checkmovetype(t) == 'Water' and typea(y) == 'Fire' and\
  624. typeb(y) =='Flying':
  625. damage*=2
  626. if checkmovetype(t) == 'Grass' and typea(y) == 'Fire' and\
  627. typeb(y) =='Flying':
  628. damage*=0.25
  629. if checkmovetype(t) == 'Electric' and typea(y) == 'Fire' and\
  630. typeb(y) =='Flying':
  631. damage*=2
  632. if checkmovetype(t) == 'Psychic' and typea(y) == 'Fire' and\
  633. typeb(y) =='Flying':
  634. damage*=1
  635. if checkmovetype(t) == 'Ice' and typea(y) == 'Fire' and\
  636. typeb(y) =='Flying':
  637. damage*=1
  638. if checkmovetype(t) == 'Dragon' and typea(y) == 'Fire' and\
  639. typeb(y) =='Flying':
  640. damage*=1
  641. if checkmovetype(t) == 'Normal' and typea(y) == 'Bug' and\
  642. typeb(y) =='Flying':
  643. damage*=1
  644. if checkmovetype(t) == 'Fighting' and typea(y) == 'Bug' and\
  645. typeb(y) =='Flying':
  646. damage*=0.25
  647. if checkmovetype(t) == 'Flying' and typea(y) == 'Bug' and\
  648. typeb(y) =='Flying':
  649. damage*=2
  650. if checkmovetype(t) == 'Poison' and typea(y) == 'Bug' and\
  651. typeb(y) =='Flying':
  652. damage*=1
  653. if checkmovetype(t) == 'Ground' and typea(y) == 'Bug' and\
  654. typeb(y) =='Flying':
  655. damage*=0
  656. if checkmovetype(t) == 'Rock' and typea(y) == 'Bug' and\
  657. typeb(y) =='Flying':
  658. damage*=4
  659. if checkmovetype(t) == 'Ghost' and typea(y) == 'Bug' and\
  660. typeb(y) =='Flying':
  661. damage*=1
  662. if checkmovetype(t) == 'Fire' and typea(y) == 'Bug' and\
  663. typeb(y) =='Flying':
  664. damage*=2
  665. if checkmovetype(t) == 'Water' and typea(y) == 'Bug' and\
  666. typeb(y) =='Flying':
  667. damage*=1
  668. if checkmovetype(t) == 'Grass' and typea(y) == 'Bug' and\
  669. typeb(y) =='Flying':
  670. damage*=0.25
  671. if checkmovetype(t) == 'Electric' and typea(y) == 'Bug' and\
  672. typeb(y) =='Flying':
  673. damage*=2
  674. if checkmovetype(t) == 'Psychic' and typea(y) == 'Bug' and\
  675. typeb(y) =='Flying':
  676. damage*=1
  677. if checkmovetype(t) == 'Ice' and typea(y) == 'Bug' and\
  678. typeb(y) =='Flying':
  679. damage*=2
  680. if checkmovetype(t) == 'Dragon' and typea(y) == 'Bug' and\
  681. typeb(y) =='Flying':
  682. damage*=1
  683. if checkmovetype(t) == 'Normal' and typea(y) == 'Bug' and\
  684. typeb(y) == 'Poison':
  685. damage*=1
  686. if checkmovetype(t) == 'Fighting' and typea(y) == 'Bug' and\
  687. typeb(y) == 'Poison':
  688. damage*=0.25
  689. if checkmovetype(t) == 'Flying' and typea(y) == 'Bug' and\
  690. typeb(y) == 'Poison':
  691. damage*=2
  692. if checkmovetype(t) == 'Poison' and typea(y) == 'Bug' and\
  693. typeb(y) == 'Poison':
  694. damage*=0.5
  695. if checkmovetype(t) == 'Ground' and typea(y) == 'Bug' and\
  696. typeb(y) == 'Poison':
  697. damage*=1
  698. if checkmovetype(t) == 'Rock' and typea(y) == 'Bug' and\
  699. typeb(y) == 'Poison':
  700. damage*=2
  701. if checkmovetype(t) == 'Ghost' and typea(y) == 'Bug' and\
  702. typeb(y) == 'Poison':
  703. damage*=1
  704. if checkmovetype(t) == 'Fire' and typea(y) == 'Bug' and\
  705. typeb(y) == 'Poison':
  706. damage*=0.2
  707. if checkmovetype(t) == 'Water' and typea(y) == 'Bug' and\
  708. typeb(y) == 'Poison':
  709. damage*=1
  710. if checkmovetype(t) == 'Grass' and typea(y) == 'Bug' and\
  711. typeb(y) == 'Poison':
  712. damage*=0.25
  713. if checkmovetype(t) == 'Electric' and typea(y) == 'Bug' and\
  714. typeb(y) == 'Poison':
  715. damage*=1
  716. if checkmovetype(t) == 'Psychic' and typea(y) == 'Bug' and\
  717. typeb(y) == 'Poison':
  718. damage*=2
  719. if checkmovetype(t) == 'Ice' and typea(y) == 'Bug' and\
  720. typeb(y) == 'Poison':
  721. damage*=1
  722. if checkmovetype(t) == 'Dragon' and typea(y) == 'Bug' and\
  723. typeb(y) == 'Poison':
  724. damage*=1
  725. if checkmovetype(t) == 'Normal' and typea(y) == 'Normal' and\
  726. typeb(y) =='Flying':
  727. damage*=1
  728. if checkmovetype(t) == 'Fighting' and typea(y) == 'Normal' and\
  729. typeb(y) =='Flying':
  730. damage*=1
  731. if checkmovetype(t) == 'Flying' and typea(y) == 'Normal' and\
  732. typeb(y) =='Flying':
  733. damage*=1
  734. if checkmovetype(t) == 'Poison' and typea(y) == 'Normal' and\
  735. typeb(y) =='Flying':
  736. damage*=1
  737. if checkmovetype(t) == 'Ground' and typea(y) == 'Normal' and\
  738. typeb(y) =='Flying':
  739. damage*=0
  740. if checkmovetype(t) == 'Rock' and typea(y) == 'Normal' and\
  741. typeb(y) =='Flying':
  742. damage*=2
  743. if checkmovetype(t) == 'Ghost' and typea(y) == 'Normal' and\
  744. typeb(y) =='Flying':
  745. damage*=0
  746. if checkmovetype(t) == 'Fire' and typea(y) == 'Normal' and\
  747. typeb(y) =='Flying':
  748. damage*=1
  749. if checkmovetype(t) == 'Water' and typea(y) == 'Normal' and\
  750. typeb(y) =='Flying':
  751. damage*=1
  752. if checkmovetype(t) == 'Grass' and typea(y) == 'Normal' and\
  753. typeb(y) =='Flying':
  754. damage*=0.5
  755. if checkmovetype(t) == 'Electric' and typea(y) == 'Normal' and\
  756. typeb(y) =='Flying':
  757. damage*=2
  758. if checkmovetype(t) == 'Psychic' and typea(y) == 'Normal' and\
  759. typeb(y) =='Flying':
  760. damage*=1
  761. if checkmovetype(t) == 'Ice' and typea(y) == 'Normal' and\
  762. typeb(y) =='Flying':
  763. damage*=2
  764. if checkmovetype(t) == 'Dragon' and typea(y) == 'Normal' and\
  765. typeb(y) =='Flying':
  766. damage*=1
  767. if checkmovetype(t) == 'Normal' and typea(y) == 'Poison' and\
  768. typeb(y) == 'Ground':
  769. damage*=1
  770. if checkmovetype(t) == 'Fighting' and typea(y) == 'Poison' and\
  771. typeb(y) == 'Ground':
  772. damage*=0.5
  773. if checkmovetype(t) == 'Flying' and typea(y) == 'Poison' and\
  774. typeb(y) == 'Ground':
  775. damage*=1
  776. if checkmovetype(t) == 'Poison' and typea(y) == 'Poison' and\
  777. typeb(y) == 'Ground':
  778. damage*=0.5
  779. if checkmovetype(t) == 'Ground' and typea(y) == 'Poison' and\
  780. typeb(y) == 'Ground':
  781. damage*=2
  782. if checkmovetype(t) == 'Rock' and typea(y) == 'Poison' and\
  783. typeb(y) == 'Ground':
  784. damage*=0.5
  785. if checkmovetype(t) == 'Ghost' and typea(y) == 'Poison' and\
  786. typeb(y) == 'Ground':
  787. damage*=1
  788. if checkmovetype(t) == 'Fire' and typea(y) == 'Poison' and\
  789. typeb(y) == 'Ground':
  790. damage*=1
  791. if checkmovetype(t) == 'Water' and typea(y) == 'Poison' and\
  792. typeb(y) == 'Ground':
  793. damage*=2
  794. if checkmovetype(t) == 'Grass' and typea(y) == 'Poison' and\
  795. typeb(y) == 'Ground':
  796. damage*=1
  797. if checkmovetype(t) == 'Electric' and typea(y) == 'Poison' and\
  798. typeb(y) == 'Ground':
  799. damage*=0
  800. if checkmovetype(t) == 'Psychic' and typea(y) == 'Poison' and\
  801. typeb(y) == 'Ground':
  802. damage*=2
  803. if checkmovetype(t) == 'Ice' and typea(y) == 'Poison' and\
  804. typeb(y) == 'Ground':
  805. damage*=2
  806. if checkmovetype(t) == 'Dragon' and typea(y) == 'Poison' and\
  807. typeb(y) == 'Ground':
  808. damage*=1
  809. if checkmovetype(t) == 'Normal' and typea(y) == 'Poison' and\
  810. typeb(y) == 'Flying':
  811. damage*=1
  812. if checkmovetype(t) == 'Fighting' and typea(y) == 'Poison' and\
  813. typeb(y) == 'Flying':
  814. damage*=0.25
  815. if checkmovetype(t) == 'Flying' and typea(y) == 'Poison' and\
  816. typeb(y) == 'Flying':
  817. damage*=1
  818. if checkmovetype(t) == 'Poison' and typea(y) == 'Poison' and\
  819. typeb(y) == 'Flying':
  820. damage*=0.5
  821. if checkmovetype(t) == 'Ground' and typea(y) == 'Poison' and\
  822. typeb(y) == 'Flying':
  823. damage*=0
  824. if checkmovetype(t) == 'Rock' and typea(y) == 'Poison' and\
  825. typeb(y) == 'Flying':
  826. damage*=2
  827. if checkmovetype(t) == 'Ghost' and typea(y) == 'Poison' and\
  828. typeb(y) == 'Flying':
  829. damage*=1
  830. if checkmovetype(t) == 'Fire' and typea(y) == 'Poison' and\
  831. typeb(y) == 'Flying':
  832. damage*=1
  833. if checkmovetype(t) == 'Water' and typea(y) == 'Poison' and\
  834. typeb(y) == 'Flying':
  835. damage*=1
  836. if checkmovetype(t) == 'Grass' and typea(y) == 'Poison' and\
  837. typeb(y) == 'Flying':
  838. damage*=0.25
  839. if checkmovetype(t) == 'Electric' and typea(y) == 'Poison' and\
  840. typeb(y) == 'Flying':
  841. damage*=2
  842. if checkmovetype(t) == 'Psychic' and typea(y) == 'Poison' and\
  843. typeb(y) == 'Flying':
  844. damage*=2
  845. if checkmovetype(t) == 'Ice' and typea(y) == 'Poison' and\
  846. typeb(y) == 'Flying':
  847. damage*=2
  848. if checkmovetype(t) == 'Dragon' and typea(y) == 'Poison' and\
  849. typeb(y) == 'Flying':
  850. damage*=1
  851. if checkmovetype(t) == 'Normal' and typea(y) == 'Bug' and\
  852. typeb(y) == 'Grass':
  853. damage*=1
  854. if checkmovetype(t) == 'Fighting' and typea(y) == 'Bug' and\
  855. typeb(y) == 'Grass':
  856. damage*=0.5
  857. if checkmovetype(t) == 'Flying' and typea(y) == 'Bug' and\
  858. typeb(y) == 'Grass':
  859. damage*=4
  860. if checkmovetype(t) == 'Poison' and typea(y) == 'Bug' and\
  861. typeb(y) == 'Grass':
  862. damage*=2
  863. if checkmovetype(t) == 'Ground' and typea(y) == 'Bug' and\
  864. typeb(y) == 'Grass':
  865. damage*=0.25
  866. if checkmovetype(t) == 'Rock' and typea(y) == 'Bug' and\
  867. typeb(y) == 'Grass':
  868. damage*=2
  869. if checkmovetype(t) == 'Ghost' and typea(y) == 'Bug' and\
  870. typeb(y) == 'Grass':
  871. damage*=1
  872. if checkmovetype(t) == 'Fire' and typea(y) == 'Bug' and\
  873. typeb(y) == 'Grass':
  874. damage*=4
  875. if checkmovetype(t) == 'Water' and typea(y) == 'Bug' and\
  876. typeb(y) == 'Grass':
  877. damage*=0.5
  878. if checkmovetype(t) == 'Grass' and typea(y) == 'Bug' and\
  879. typeb(y) == 'Grass':
  880. damage*=0.25
  881. if checkmovetype(t) == 'Electric' and typea(y) == 'Bug' and\
  882. typeb(y) == 'Grass':
  883. damage*=0.5
  884. if checkmovetype(t) == 'Psychic' and typea(y) == 'Bug' and\
  885. typeb(y) == 'Grass':
  886. damage*=1
  887. if checkmovetype(t) == 'Ice' and typea(y) == 'Bug' and\
  888. typeb(y) == 'Grass':
  889. damage*=2
  890. if checkmovetype(t) == 'Dragon' and typea(y) == 'Bug' and\
  891. typeb(y) == 'Grass':
  892. damage*=1
  893. if checkmovetype(t) == 'Normal' and typea(y) == 'Bug' and\
  894. typeb(y) == 'Poison':
  895. damage*=1
  896. if checkmovetype(t) == 'Fighting' and typea(y) == 'Bug' and\
  897. typeb(y) == 'Poison':
  898. damage*=0.25
  899. if checkmovetype(t) == 'Flying' and typea(y) == 'Bug' and\
  900. typeb(y) == 'Poison':
  901. damage*=2
  902. if checkmovetype(t) == 'Poison' and typea(y) == 'Bug' and\
  903. typeb(y) == 'Poison':
  904. damage*=0.5
  905. if checkmovetype(t) == 'Ground' and typea(y) == 'Bug' and\
  906. typeb(y) == 'Poison':
  907. damage*=1
  908. if checkmovetype(t) == 'Rock' and typea(y) == 'Bug' and\
  909. typeb(y) == 'Poison':
  910. damage*=2
  911. if checkmovetype(t) == 'Ghost' and typea(y) == 'Bug' and\
  912. typeb(y) == 'Poison':
  913. damage*=1
  914. if checkmovetype(t) == 'Fire' and typea(y) == 'Bug' and\
  915. typeb(y) == 'Poison':
  916. damage*=2
  917. if checkmovetype(t) == 'Water' and typea(y) == 'Bug' and\
  918. typeb(y) == 'Poison':
  919. damage*=1
  920. if checkmovetype(t) == 'Grass' and typea(y) == 'Bug' and\
  921. typeb(y) == 'Poison':
  922. damage*=0.25
  923. if checkmovetype(t) == 'Electric' and typea(y) == 'Bug' and\
  924. typeb(y) == 'Poison':
  925. damage*=1
  926. if checkmovetype(t) == 'Psychic' and typea(y) == 'Bug' and\
  927. typeb(y) == 'Poison':
  928. damage*=2
  929. if checkmovetype(t) == 'Ice' and typea(y) == 'Bug' and\
  930. typeb(y) == 'Poison':
  931. damage*=1
  932. if checkmovetype(t) == 'Dragon' and typea(y) == 'Bug' and\
  933. typeb(y) == 'Poison':
  934. damage*=1
  935. if checkmovetype(t) == 'Normal' and typea(y) == 'Water' and\
  936. typeb(y) == 'Fighting':
  937. damage*=1
  938. if checkmovetype(t) == 'Fighting' and typea(y) == 'Water' and\
  939. typeb(y) == 'Fighting':
  940. damage*=1
  941. if checkmovetype(t) == 'Flying' and typea(y) == 'Water' and\
  942. typeb(y) == 'Fighting':
  943. damage*=2
  944. if checkmovetype(t) == 'Poison' and typea(y) == 'Water' and\
  945. typeb(y) == 'Fighting':
  946. damage*=1
  947. if checkmovetype(t) == 'Ground' and typea(y) == 'Water' and\
  948. typeb(y) == 'Fighting':
  949. damage*=1
  950. if checkmovetype(t) == 'Rock' and typea(y) == 'Water' and\
  951. typeb(y) == 'Fighting':
  952. damage*=0.5
  953. if checkmovetype(t) == 'Ghost' and typea(y) == 'Water' and\
  954. typeb(y) == 'Fighting':
  955. damage*=1
  956. if checkmovetype(t) == 'Fire' and typea(y) == 'Water' and\
  957. typeb(y) == 'Fighting':
  958. damage*=0.5
  959. if checkmovetype(t) == 'Water' and typea(y) == 'Water' and\
  960. typeb(y) == 'Fighting':
  961. damage*=0.5
  962. if checkmovetype(t) == 'Grass' and typea(y) == 'Water' and\
  963. typeb(y) == 'Fighting':
  964. damage*=2
  965. if checkmovetype(t) == 'Electric' and typea(y) == 'Water' and\
  966. typeb(y) == 'Fighting':
  967. damage*=2
  968. if checkmovetype(t) == 'Psychic' and typea(y) == 'Water' and\
  969. typeb(y) == 'Fighting':
  970. damage*=2
  971. if checkmovetype(t) == 'Ice' and typea(y) == 'Water' and\
  972. typeb(y) == 'Fighting':
  973. damage*=0.5
  974. if checkmovetype(t) == 'Dragon' and typea(y) == 'Water' and\
  975. typeb(y) == 'Fighting':
  976. damage*=1
  977. if checkmovetype(t) == 'Normal' and typea(y) == 'Water' and\
  978. typeb(y) == 'Poison':
  979. damage*=1
  980. if checkmovetype(t) == 'Fighting' and typea(y) == 'Water' and\
  981. typeb(y) == 'Poison':
  982. damage*=0.5
  983. if checkmovetype(t) == 'Flying' and typea(y) == 'Water' and\
  984. typeb(y) == 'Poison':
  985. damage*=1
  986. if checkmovetype(t) == 'Poison' and typea(y) == 'Water' and\
  987. typeb(y) == 'Poison':
  988. damage*=0.5
  989. if checkmovetype(t) == 'Ground' and typea(y) == 'Water' and\
  990. typeb(y) == 'Poison':
  991. damage*=2
  992. if checkmovetype(t) == 'Rock' and typea(y) == 'Water' and\
  993. typeb(y) == 'Poison':
  994. damage*=1
  995. if checkmovetype(t) == 'Ghost' and typea(y) == 'Water' and\
  996. typeb(y) == 'Poison':
  997. damage*=1
  998. if checkmovetype(t) == 'Fire' and typea(y) == 'Water' and\
  999. typeb(y) == 'Poison':
  1000. damage*=0.5
  1001. if checkmovetype(t) == 'Water' and typea(y) == 'Water' and\
  1002. typeb(y) == 'Poison':
  1003. damage*=0.5
  1004. if checkmovetype(t) == 'Grass' and typea(y) == 'Water' and\
  1005. typeb(y) == 'Poison':
  1006. damage*=1
  1007. if checkmovetype(t) == 'Electric' and typea(y) == 'Water' and\
  1008. typeb(y) == 'Poison':
  1009. damage*=2
  1010. if checkmovetype(t) == 'Psychic' and typea(y) == 'Water' and\
  1011. typeb(y) == 'Poison':
  1012. damage*=2
  1013. if checkmovetype(t) == 'Ice' and typea(y) == 'Water' and\
  1014. typeb(y) == 'Poison':
  1015. damage*=0.5
  1016. if checkmovetype(t) == 'Dragon' and typea(y) == 'Water' and\
  1017. typeb(y) == 'Poison':
  1018. damage*=1
  1019. if checkmovetype(t) == 'Normal' and typea(y) == 'Rock' and\
  1020. typeb(y) == 'Ground':
  1021. damage*=0.5
  1022. if checkmovetype(t) == 'Fighting' and typea(y) == 'Rock' and\
  1023. typeb(y) == 'Ground':
  1024. damage*=2
  1025. if checkmovetype(t) == 'Flying' and typea(y) == 'Rock' and\
  1026. typeb(y) == 'Ground':
  1027. damage*=0.5
  1028. if checkmovetype(t) == 'Poison' and typea(y) == 'Rock' and\
  1029. typeb(y) == 'Ground':
  1030. damage*=0.25
  1031. if checkmovetype(t) == 'Ground' and typea(y) == 'Rock' and\
  1032. typeb(y) == 'Ground':
  1033. damage*=2
  1034. if checkmovetype(t) == 'Rock' and typea(y) == 'Rock' and\
  1035. typeb(y) == 'Ground':
  1036. damage*=0.5
  1037. if checkmovetype(t) == 'Ghost' and typea(y) == 'Rock' and\
  1038. typeb(y) == 'Ground':
  1039. damage*=1
  1040. if checkmovetype(t) == 'Fire' and typea(y) == 'Rock' and\
  1041. typeb(y) == 'Ground':
  1042. damage*=0.5
  1043. if checkmovetype(t) == 'Water' and typea(y) == 'Rock' and\
  1044. typeb(y) == 'Ground':
  1045. damage*=4
  1046. if checkmovetype(t) == 'Grass' and typea(y) == 'Rock' and\
  1047. typeb(y) == 'Ground':
  1048. damage*=4
  1049. if checkmovetype(t) == 'Electric' and typea(y) == 'Rock' and\
  1050. typeb(y) == 'Ground':
  1051. damage*=0
  1052. if checkmovetype(t) == 'Psychic' and typea(y) == 'Rock' and\
  1053. typeb(y) == 'Ground':
  1054. damage*=1
  1055. if checkmovetype(t) == 'Ice' and typea(y) == 'Rock' and\
  1056. typeb(y) == 'Ground':
  1057. damage*=2
  1058. if checkmovetype(t) == 'Dragon' and typea(y) == 'Rock' and\
  1059. typeb(y) == 'Ground':
  1060. damage*=1
  1061. if checkmovetype(t) == 'Normal' and typea(y) == 'Water' and\
  1062. typeb(y) == 'Psychic':
  1063. damage*=1
  1064. if checkmovetype(t) == 'Fighting' and typea(y) == 'Water' and\
  1065. typeb(y) == 'Psychic':
  1066. damage*=0.5
  1067. if checkmovetype(t) == 'Flying' and typea(y) == 'Water' and\
  1068. typeb(y) == 'Psychic':
  1069. damage*=1
  1070. if checkmovetype(t) == 'Poison' and typea(y) == 'Water' and\
  1071. typeb(y) == 'Psychic':
  1072. damage*=1
  1073. if checkmovetype(t) == 'Ground' and typea(y) == 'Water' and\
  1074. typeb(y) == 'Psychic':
  1075. damage*=1
  1076. if checkmovetype(t) == 'Rock' and typea(y) == 'Water' and\
  1077. typeb(y) == 'Psychic':
  1078. damage*=1
  1079. if checkmovetype(t) == 'Ghost' and typea(y) == 'Water' and\
  1080. typeb(y) == 'Psychic':
  1081. damage*=0
  1082. if checkmovetype(t) == 'Fire' and typea(y) == 'Water' and\
  1083. typeb(y) == 'Psychic':
  1084. damage*=0.5
  1085. if checkmovetype(t) == 'Water' and typea(y) == 'Water' and\
  1086. typeb(y) == 'Psychic':
  1087. damage*=0.5
  1088. if checkmovetype(t) == 'Grass' and typea(y) == 'Water' and\
  1089. typeb(y) == 'Psychic':
  1090. damage*=2
  1091. if checkmovetype(t) == 'Electric' and typea(y) == 'Water' and\
  1092. typeb(y) == 'Psychic':
  1093. damage*=2
  1094. if checkmovetype(t) == 'Psychic' and typea(y) == 'Water' and\
  1095. typeb(y) == 'Psychic':
  1096. damage*=0.5
  1097. if checkmovetype(t) == 'Ice' and typea(y) == 'Water' and\
  1098. typeb(y) == 'Psychic':
  1099. damage*=0.5
  1100. if checkmovetype(t) == 'Dragon' and typea(y) == 'Water' and\
  1101. typeb(y) == 'Psychic':
  1102. damage*=1
  1103. if checkmovetype(t) == 'Normal' and typea(y) == 'Water' and\
  1104. typeb(y) == 'Ice':
  1105. damage*=1
  1106. if checkmovetype(t) == 'Fighting' and typea(y) == 'Water' and\
  1107. typeb(y) == 'Ice':
  1108. damage*=2
  1109. if checkmovetype(t) == 'Flying' and typea(y) == 'Water' and\
  1110. typeb(y) == 'Ice':
  1111. damage*=1
  1112. if checkmovetype(t) == 'Poison' and typea(y) == 'Water' and\
  1113. typeb(y) == 'Ice':
  1114. damage*=1
  1115. if checkmovetype(t) == 'Ground' and typea(y) == 'Water' and\
  1116. typeb(y) == 'Ice':
  1117. damage*=1
  1118. if checkmovetype(t) == 'Rock' and typea(y) == 'Water' and\
  1119. typeb(y) == 'Ice':
  1120. damage*=2
  1121. if checkmovetype(t) == 'Ghost' and typea(y) == 'Water' and\
  1122. typeb(y) == 'Ice':
  1123. damage*=1
  1124. if checkmovetype(t) == 'Fire' and typea(y) == 'Water' and\
  1125. typeb(y) == 'Ice':
  1126. damage*=0.5
  1127. if checkmovetype(t) == 'Water' and typea(y) == 'Water' and\
  1128. typeb(y) == 'Ice':
  1129. damage*=0.5
  1130. if checkmovetype(t) == 'Grass' and typea(y) == 'Water' and\
  1131. typeb(y) == 'Ice':
  1132. damage*=2
  1133. if checkmovetype(t) == 'Electric' and typea(y) == 'Water' and\
  1134. typeb(y) == 'Ice':
  1135. damage*=2
  1136. if checkmovetype(t) == 'Psychic' and typea(y) == 'Water' and\
  1137. typeb(y) == 'Ice':
  1138. damage*=1
  1139. if checkmovetype(t) == 'Ice' and typea(y) == 'Water' and\
  1140. typeb(y) == 'Ice':
  1141. damage*=0.25
  1142. if checkmovetype(t) == 'Dragon' and typea(y) == 'Water' and\
  1143. typeb(y) == 'Ice':
  1144. damage*=1
  1145. if checkmovetype(t) == 'Normal' and typea(y) == 'Ghost' and\
  1146. typeb(y) == 'Poison':
  1147. damage*=0
  1148. if checkmovetype(t) == 'Fighting' and typea(y) == 'Ghost' and\
  1149. typeb(y) == 'Poison':
  1150. damage*=0
  1151. if checkmovetype(t) == 'Flying' and typea(y) == 'Ghost' and\
  1152. typeb(y) == 'Poison':
  1153. damage*=1
  1154. if checkmovetype(t) == 'Poison' and typea(y) == 'Ghost' and\
  1155. typeb(y) == 'Poison':
  1156. damage*=0.25
  1157. if checkmovetype(t) == 'Ground' and typea(y) == 'Ghost' and\
  1158. typeb(y) == 'Poison':
  1159. damage*=2
  1160. if checkmovetype(t) == 'Rock' and typea(y) == 'Ghost' and\
  1161. typeb(y) == 'Poison':
  1162. damage*=1
  1163. if checkmovetype(t) == 'Ghost' and typea(y) == 'Ghost' and\
  1164. typeb(y) == 'Poison':
  1165. damage*=2
  1166. if checkmovetype(t) == 'Fire' and typea(y) == 'Ghost' and\
  1167. typeb(y) == 'Poison':
  1168. damage*=1
  1169. if checkmovetype(t) == 'Water' and typea(y) == 'Ghost' and\
  1170. typeb(y) == 'Poison':
  1171. damage*=1
  1172. if checkmovetype(t) == 'Grass' and typea(y) == 'Ghost' and\
  1173. typeb(y) == 'Poison':
  1174. damage*=0.5
  1175. if checkmovetype(t) == 'Electric' and typea(y) == 'Ghost' and\
  1176. typeb(y) == 'Poison':
  1177. damage*=1
  1178. if checkmovetype(t) == 'Psychic' and typea(y) == 'Ghost' and\
  1179. typeb(y) == 'Poison':
  1180. damage*=2
  1181. if checkmovetype(t) == 'Ice' and typea(y) == 'Ghost' and\
  1182. typeb(y) == 'Poison':
  1183. damage*=1
  1184. if checkmovetype(t) == 'Dragon' and typea(y) == 'Ghost' and\
  1185. typeb(y) == 'Poison':
  1186. damage*=1
  1187. if checkmovetype(t) == 'Normal' and typea(y) == 'Grass' and\
  1188. typeb(y) == 'Psychic':
  1189. damage*=1
  1190. if checkmovetype(t) == 'Fighting' and typea(y) == 'Grass' and\
  1191. typeb(y) == 'Psychic':
  1192. damage*=0.5
  1193. if checkmovetype(t) == 'Flying' and typea(y) == 'Grass' and\
  1194. typeb(y) == 'Psychic':
  1195. damage*=2
  1196. if checkmovetype(t) == 'Poison' and typea(y) == 'Grass' and\
  1197. typeb(y) == 'Psychic':
  1198. damage*=2
  1199. if checkmovetype(t) == 'Ground' and typea(y) == 'Grass' and\
  1200. typeb(y) == 'Psychic':
  1201. damage*=0.5
  1202. if checkmovetype(t) == 'Rock' and typea(y) == 'Grass' and\
  1203. typeb(y) == 'Psychic':
  1204. damage*=1
  1205. if checkmovetype(t) == 'Ghost' and typea(y) == 'Grass' and\
  1206. typeb(y) == 'Psychic':
  1207. damage*=0
  1208. if checkmovetype(t) == 'Fire' and typea(y) == 'Grass' and\
  1209. typeb(y) == 'Psychic':
  1210. damage*=2
  1211. if checkmovetype(t) == 'Water' and typea(y) == 'Grass' and\
  1212. typeb(y) == 'Psychic':
  1213. damage*=0.5
  1214. if checkmovetype(t) == 'Grass' and typea(y) == 'Grass' and\
  1215. typeb(y) == 'Psychic':
  1216. damage*=0.5
  1217. if checkmovetype(t) == 'Electric' and typea(y) == 'Grass' and\
  1218. typeb(y) == 'Psychic':
  1219. damage*=0.5
  1220. if checkmovetype(t) == 'Psychic' and typea(y) == 'Grass' and\
  1221. typeb(y) == 'Psychic':
  1222. damage*=0.5
  1223. if checkmovetype(t) == 'Ice' and typea(y) == 'Grass' and\
  1224. typeb(y) == 'Psychic':
  1225. damage*=2
  1226. if checkmovetype(t) == 'Dragon' and typea(y) == 'Grass' and\
  1227. typeb(y) == 'Psychic':
  1228. damage*=1
  1229. if checkmovetype(t) == 'Normal' and typea(y) == 'Ice' and\
  1230. typeb(y) == 'Psychic':
  1231. damage*=1
  1232. if checkmovetype(t) == 'Fighting' and typea(y) == 'Ice' and\
  1233. typeb(y) == 'Psychic':
  1234. damage*=0.5
  1235. if checkmovetype(t) == 'Flying' and typea(y) == 'Ice' and\
  1236. typeb(y) == 'Psychic':
  1237. damage*=1
  1238. if checkmovetype(t) == 'Poison' and typea(y) == 'Ice' and\
  1239. typeb(y) == 'Psychic':
  1240. damage*=1
  1241. if checkmovetype(t) == 'Ground' and typea(y) == 'Ice' and\
  1242. typeb(y) == 'Psychic':
  1243. damage*=1
  1244. if checkmovetype(t) == 'Rock' and typea(y) == 'Ice' and\
  1245. typeb(y) == 'Psychic':
  1246. damage*=2
  1247. if checkmovetype(t) == 'Ghost' and typea(y) == 'Ice' and\
  1248. typeb(y) == 'Psychic':
  1249. damage*=0
  1250. if checkmovetype(t) == 'Fire' and typea(y) == 'Ice' and\
  1251. typeb(y) == 'Psychic':
  1252. damage*=2
  1253. if checkmovetype(t) == 'Water' and typea(y) == 'Ice' and\
  1254. typeb(y) == 'Psychic':
  1255. damage*=1
  1256. if checkmovetype(t) == 'Grass' and typea(y) == 'Ice' and\
  1257. typeb(y) == 'Psychic':
  1258. damage*=1
  1259. if checkmovetype(t) == 'Electric' and typea(y) == 'Ice' and\
  1260. typeb(y) == 'Psychic':
  1261. damage*=1
  1262. if checkmovetype(t) == 'Psychic' and typea(y) == 'Ice' and\
  1263. typeb(y) == 'Psychic':
  1264. damage*=0.5
  1265. if checkmovetype(t) == 'Ice' and typea(y) == 'Ice' and\
  1266. typeb(y) == 'Psychic':
  1267. damage*=0.5
  1268. if checkmovetype(t) == 'Dragon' and typea(y) == 'Ice' and\
  1269. typeb(y) == 'Psychic':
  1270. damage*=1
  1271. if checkmovetype(t) == 'Normal' and typea(y) == 'Water' and\
  1272. typeb(y) == 'Flying':
  1273. damage*=1
  1274. if checkmovetype(t) == 'Fighting' and typea(y) == 'Water' and\
  1275. typeb(y) == 'Flying':
  1276. damage*=0.5
  1277. if checkmovetype(t) == 'Flying' and typea(y) == 'Water' and\
  1278. typeb(y) == 'Flying':
  1279. damage*=1
  1280. if checkmovetype(t) == 'Poison' and typea(y) == 'Water' and\
  1281. typeb(y) == 'Flying':
  1282. damage*=1
  1283. if checkmovetype(t) == 'Ground' and typea(y) == 'Water' and\
  1284. typeb(y) == 'Flying':
  1285. damage*=0
  1286. if checkmovetype(t) == 'Rock' and typea(y) == 'Water' and\
  1287. typeb(y) == 'Flying':
  1288. damage*=2
  1289. if checkmovetype(t) == 'Ghost' and typea(y) == 'Water' and\
  1290. typeb(y) == 'Flying':
  1291. damage*=1
  1292. if checkmovetype(t) == 'Fire' and typea(y) == 'Water' and\
  1293. typeb(y) == 'Flying':
  1294. damage*=0.5
  1295. if checkmovetype(t) == 'Water' and typea(y) == 'Water' and\
  1296. typeb(y) == 'Flying':
  1297. damage*=0.5
  1298. if checkmovetype(t) == 'Grass' and typea(y) == 'Water' and\
  1299. typeb(y) == 'Flying':
  1300. damage*=1
  1301. if checkmovetype(t) == 'Electric' and typea(y) == 'Water' and\
  1302. typeb(y) == 'Flying':
  1303. damage*=4
  1304. if checkmovetype(t) == 'Psychic' and typea(y) == 'Water' and\
  1305. typeb(y) == 'Flying':
  1306. damage*=1
  1307. if checkmovetype(t) == 'Ice' and typea(y) == 'Water' and\
  1308. typeb(y) == 'Flying':
  1309. damage*=1
  1310. if checkmovetype(t) == 'Dragon' and typea(y) == 'Water' and\
  1311. typeb(y) == 'Flying':
  1312. damage*=1
  1313. if checkmovetype(t) == 'Normal' and typea(y) == 'Rock' and\
  1314. typeb(y) == 'Water':
  1315. damage*=0.5
  1316. if checkmovetype(t) == 'Fighting' and typea(y) == 'Rock' and\
  1317. typeb(y) == 'Water':
  1318. damage*=2
  1319. if checkmovetype(t) == 'Flying' and typea(y) == 'Rock' and\
  1320. typeb(y) == 'Water':
  1321. damage*=0.5
  1322. if checkmovetype(t) == 'Poison' and typea(y) == 'Rock' and\
  1323. typeb(y) == 'Water':
  1324. damage*=1
  1325. if checkmovetype(t) == 'Ground' and typea(y) == 'Rock' and\
  1326. typeb(y) == 'Water':
  1327. damage*=2
  1328. if checkmovetype(t) == 'Rock' and typea(y) == 'Rock' and\
  1329. typeb(y) == 'Water':
  1330. damage*=1
  1331. if checkmovetype(t) == 'Ghost' and typea(y) == 'Rock' and\
  1332. typeb(y) == 'Water':
  1333. damage*=1
  1334. if checkmovetype(t) == 'Fire' and typea(y) == 'Rock' and\
  1335. typeb(y) == 'Water':
  1336. damage*=0.25
  1337. if checkmovetype(t) == 'Water' and typea(y) == 'Rock' and\
  1338. typeb(y) == 'Water':
  1339. damage*=1
  1340. if checkmovetype(t) == 'Grass' and typea(y) == 'Rock' and\
  1341. typeb(y) == 'Water':
  1342. damage*=4
  1343. if checkmovetype(t) == 'Electric' and typea(y) == 'Rock' and\
  1344. typeb(y) == 'Water':
  1345. damage*=2
  1346. if checkmovetype(t) == 'Psychic' and typea(y) == 'Rock' and\
  1347. typeb(y) == 'Water':
  1348. damage*=1
  1349. if checkmovetype(t) == 'Ice' and typea(y) == 'Rock' and\
  1350. typeb(y) == 'Water':
  1351. damage*=0.5
  1352. if checkmovetype(t) == 'Dragon' and typea(y) == 'Rock' and\
  1353. typeb(y) == 'Water':
  1354. damage*=1
  1355. if checkmovetype(t) == 'Normal' and typea(y) == 'Rock' and\
  1356. typeb(y) == 'Flying':
  1357. damage*=0.5
  1358. if checkmovetype(t) == 'Fighting' and typea(y) == 'Rock' and\
  1359. typeb(y) == 'Flying':
  1360. damage*=1
  1361. if checkmovetype(t) == 'Flying' and typea(y) == 'Rock' and\
  1362. typeb(y) == 'Flying':
  1363. damage*=0.5
  1364. if checkmovetype(t) == 'Poison' and typea(y) == 'Rock' and\
  1365. typeb(y) == 'Flying':
  1366. damage*=1
  1367. if checkmovetype(t) == 'Ground' and typea(y) == 'Rock' and\
  1368. typeb(y) == 'Flying':
  1369. damage*=0
  1370. if checkmovetype(t) == 'Rock' and typea(y) == 'Rock' and\
  1371. typeb(y) == 'Flying':
  1372. damage*=2
  1373. if checkmovetype(t) == 'Ghost' and typea(y) == 'Rock' and\
  1374. typeb(y) == 'Flying':
  1375. damage*=1
  1376. if checkmovetype(t) == 'Fire' and typea(y) == 'Rock' and\
  1377. typeb(y) == 'Flying':
  1378. damage*=0.5
  1379. if checkmovetype(t) == 'Water' and typea(y) == 'Rock' and\
  1380. typeb(y) == 'Flying':
  1381. damage*=2
  1382. if checkmovetype(t) == 'Grass' and typea(y) == 'Rock' and\
  1383. typeb(y) == 'Flying':
  1384. damage*=1
  1385. if checkmovetype(t) == 'Electric' and typea(y) == 'Rock' and\
  1386. typeb(y) == 'Flying':
  1387. damage*=2
  1388. if checkmovetype(t) == 'Psychic' and typea(y) == 'Rock' and\
  1389. typeb(y) == 'Flying':
  1390. damage*=1
  1391. if checkmovetype(t) == 'Ice' and typea(y) == 'Rock' and\
  1392. typeb(y) == 'Flying':
  1393. damage*=2
  1394. if checkmovetype(t) == 'Dragon' and typea(y) == 'Rock' and\
  1395. typeb(y) == 'Flying':
  1396. damage*=1
  1397. if checkmovetype(t) == 'Normal' and typea(y) == 'Ice' and\
  1398. typeb(y) == 'Flying':
  1399. damage*=1
  1400. if checkmovetype(t) == 'Fighting' and typea(y) == 'Ice' and\
  1401. typeb(y) == 'Flying':
  1402. damage*=1
  1403. if checkmovetype(t) == 'Flying' and typea(y) == 'Ice' and\
  1404. typeb(y) == 'Flying':
  1405. damage*=1
  1406. if checkmovetype(t) == 'Poison' and typea(y) == 'Ice' and\
  1407. typeb(y) == 'Flying':
  1408. damage*=1
  1409. if checkmovetype(t) == 'Ground' and typea(y) == 'Ice' and\
  1410. typeb(y) == 'Flying':
  1411. damage*=0
  1412. if checkmovetype(t) == 'Rock' and typea(y) == 'Ice' and\
  1413. typeb(y) == 'Flying':
  1414. damage*=4
  1415. if checkmovetype(t) == 'Ghost' and typea(y) == 'Ice' and\
  1416. typeb(y) == 'Flying':
  1417. damage*=1
  1418. if checkmovetype(t) == 'Fire' and typea(y) == 'Ice' and\
  1419. typeb(y) == 'Flying':
  1420. damage*=1
  1421. if checkmovetype(t) == 'Water' and typea(y) == 'Ice' and\
  1422. typeb(y) == 'Flying':
  1423. damage*=1
  1424. if checkmovetype(t) == 'Grass' and typea(y) == 'Ice' and\
  1425. typeb(y) == 'Flying':
  1426. damage*=0.5
  1427. if checkmovetype(t) == 'Electric' and typea(y) == 'Ice' and\
  1428. typeb(y) == 'Flying':
  1429. damage*=2
  1430. if checkmovetype(t) == 'Psychic' and typea(y) == 'Ice' and\
  1431. typeb(y) == 'Flying':
  1432. damage*=1
  1433. if checkmovetype(t) == 'Ice' and typea(y) == 'Ice' and\
  1434. typeb(y) == 'Flying':
  1435. damage*=1
  1436. if checkmovetype(t) == 'Dragon' and typea(y) == 'Ice' and\
  1437. typeb(y) == 'Flying':
  1438. damage*=1
  1439. if checkmovetype(t) == 'Normal' and typea(y) == 'Electric' and\
  1440. typeb(y) == 'Flying':
  1441. damage*=1
  1442. if checkmovetype(t) == 'Fighting' and typea(y) == 'Electric' and\
  1443. typeb(y) == 'Flying':
  1444. damage*=0.5
  1445. if checkmovetype(t) == 'Flying' and typea(y) == 'Electric' and\
  1446. typeb(y) == 'Flying':
  1447. damage*=0.5
  1448. if checkmovetype(t) == 'Poison' and typea(y) == 'Electric' and\
  1449. typeb(y) == 'Flying':
  1450. damage*=1
  1451. if checkmovetype(t) == 'Ground' and typea(y) == 'Electric' and\
  1452. typeb(y) == 'Flying':
  1453. damage*=0
  1454. if checkmovetype(t) == 'Rock' and typea(y) == 'Electric' and\
  1455. typeb(y) == 'Flying':
  1456. damage*=2
  1457. if checkmovetype(t) == 'Ghost' and typea(y) == 'Electric' and\
  1458. typeb(y) == 'Flying':
  1459. damage*=1
  1460. if checkmovetype(t) == 'Fire' and typea(y) == 'Electric' and\
  1461. typeb(y) == 'Flying':
  1462. damage*=1
  1463. if checkmovetype(t) == 'Water' and typea(y) == 'Electric' and\
  1464. typeb(y) == 'Flying':
  1465. damage*=1
  1466. if checkmovetype(t) == 'Grass' and typea(y) == 'Electric' and\
  1467. typeb(y) == 'Flying':
  1468. damage*=0.5
  1469. if checkmovetype(t) == 'Electric' and typea(y) == 'Electric' and\
  1470. typeb(y) == 'Flying':
  1471. damage*=1
  1472. if checkmovetype(t) == 'Psychic' and typea(y) == 'Electric' and\
  1473. typeb(y) == 'Flying':
  1474. damage*=1
  1475. if checkmovetype(t) == 'Ice' and typea(y) == 'Electric' and\
  1476. typeb(y) == 'Flying':
  1477. damage*=2
  1478. if checkmovetype(t) == 'Dragon' and typea(y) == 'Electric' and\
  1479. typeb(y) == 'Flying':
  1480. damage*=1
  1481. if checkmovetype(t) == 'Normal' and typea(y) == 'Dragon' and\
  1482. typeb(y) == 'Flying':
  1483. damage*=1
  1484. if checkmovetype(t) == 'Fighting' and typea(y) == 'Dragon' and\
  1485. typeb(y) == 'Flying':
  1486. damage*=0.5
  1487. if checkmovetype(t) == 'Flying' and typea(y) == 'Dragon' and\
  1488. typeb(y) == 'Flying':
  1489. damage*=1
  1490. if checkmovetype(t) == 'Poison' and typea(y) == 'Dragon' and\
  1491. typeb(y) == 'Flying':
  1492. damage*=1
  1493. if checkmovetype(t) == 'Ground' and typea(y) == 'Dragon' and\
  1494. typeb(y) == 'Flying':
  1495. damage*=0
  1496. if checkmovetype(t) == 'Rock' and typea(y) == 'Dragon' and\
  1497. typeb(y) == 'Flying':
  1498. damage*=2
  1499. if checkmovetype(t) == 'Ghost' and typea(y) == 'Dragon' and\
  1500. typeb(y) == 'Flying':
  1501. damage*=1
  1502. if checkmovetype(t) == 'Fire' and typea(y) == 'Dragon' and\
  1503. typeb(y) == 'Flying':
  1504. damage*=0.5
  1505. if checkmovetype(t) == 'Water' and typea(y) == 'Dragon' and\
  1506. typeb(y) == 'Flying':
  1507. damage*=0.5
  1508. if checkmovetype(t) == 'Grass' and typea(y) == 'Dragon' and\
  1509. typeb(y) == 'Flying':
  1510. damage*=0.5
  1511. if checkmovetype(t) == 'Electric' and typea(y) == 'Dragon' and\
  1512. typeb(y) == 'Flying':
  1513. damage*=1
  1514. if checkmovetype(t) == 'Psychic' and typea(y) == 'Dragon' and\
  1515. typeb(y) == 'Flying':
  1516. damage*=1
  1517. if checkmovetype(t) == 'Ice' and typea(y) == 'Dragon' and\
  1518. typeb(y) == 'Flying':
  1519. damage*=4
  1520. if checkmovetype(t) == 'Dragon' and typea(y) == 'Dragon' and\
  1521. typeb(y) == 'Flying':
  1522. damage*=2
  1523. return damage
  1524.  
  1525.  
  1526. print '''<html><body>The damage output should be about ~'''
  1527. print getdamage()
  1528. print '''</body></html>'''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement