Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Pokemon: Nature, 32 hp, jir: 252 attack 4 spec def 0 hp###
- jirHead=(8.3+9.6)/2#damage due to iron head
- oppMove=(49.5+58.9)/2#damage due to opponents attack
- oppAcc=1#chance of the opponents move landing
- critON=1#you can turn off the possibility of crits
- secondary=0.1#the chance that the opponents secondary effect triggers (burn para ect)
- leftON=0#you can give the opponent leftovers
- for i in range(1,10000):
- jirHP=100
- oppHP=100
- jirIsPara=0
- jirIsBurnt=0
- turn=0
- while jirHP>0 and oppHP>0:
- #turn+=1 #if you want magnezone to use t wave first turn, turn this on and other code marked *****
- turnSkip=0
- if (jirIsPara!=1 or rd.random()>1/3):
- oppHP-=jirHead+jirHead*(rd.random()<=1/16)*critON
- if oppHP<=0: break
- oppHP+=1/16*100*leftON
- if rd.random()<jirflch:
- oppHP-=jirHead+jirHead*(rd.random()<=1/16)*critON
- if oppHP<=0: break
- oppHP+=1/16*100*leftON
- jirHP+=1/16*100
- jirHP-=jirIsBurnt*1/8*100
- if jirHP<=0: break
- turnSkip=1
- if rd.random()<para and turnSkip!=1:
- oppHP-=jirHead+jirHead*(rd.random()<=1/16)*critON
- if oppHP<=0: break
- oppHP+=1/16*100*leftON
- jirHP+=1/16*100
- jirHP-=jirIsBurnt*1/8*100
- if jirHP<=0: break
- turnSkip=1
- if turnSkip!=1: #and turn!=1: *****
- jirHP-=oppMove*(rd.random()<=oppAcc)+oppMove*(rd.random()<=1/16)*critON
- if jirHP<=0: break
- jirHP+=1/16*100
- jirHP-=jirIsBurnt*1/8*100
- if jirHP<=0: break
- if rd.random()<=secondary:
- jirIsPara=1#required to match the stutus conditon of the opponents attack
- jirIsBurnt=0
- #if turn==1: *****
- # jirIsPara=1 *****
- if jirHP>100:
- jirHP=100
- if oppHP>100:
- oppHP=100
- if jirHP>0:
- winJir+=1
- if oppHP>0:
- winOpp+=1
- print('If opponent is paralyzed, then...')
- print('jir wins', winJir, 'times, and opponent wins', winOpp, 'times.')
- print('win rate is', winJir/(winJir+winOpp)*100,'percent')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement