<html>
<head>
<meta name="generator" content="Windows Mail 17.5.9600.20605">
<style data-externalstyle="true"><!--
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}
p.MsoNormal, li.MsoNormal, div.MsoNormal {
margin:0in;
margin-bottom:.0001pt;
}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst, 
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle, 
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
--></style></head>
<body dir="ltr">
<div data-externalstyle="false" dir="ltr" style="font-family: 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif';font-size:12pt;"><div>Hello, I can not for the life of me figure out where I have gone wrong.  I wrote the following code as a simulation for the table top game x-wing.  It basically simulates dice rolls but the issue is the fact that every time I choose a number of dice to roll, they all hit.  None of them ever miss.  Thank You.</div><div><br></div><div>import random<br>print("X-wing dice simulator")<br>x = int(input("How many dice will the offensive player be rolling?\n"))<br>y = int(input("How many dice will the defensive player be rolling?\n"))<br>hits = 0<br>crits = 0<br>dodges = 0<br>offense = 0<br>defense = 0<br>while offense < x:<br>    odie = random.randint(1,8)<br>    if odie <= 4:<br>        hits = hits + 1<br>        offense = offense + 1<br>    if odie == 4:<br>        crits = crits + 1<br>        offense = offense + 1<br>    else:<br>        continue<br>while defense < y:<br>    ddie = random.randint(1,8)<br>    if ddie <= 3:<br>        dodges = dodges + 1<br>        defense = defense + 1<br>    else:<br>        continue<br>print("The offensive player lands", hits,"hits and", crits,"crits\n")<br>print("The defensive player dodges", dodges, "hits\n")<br>print("The offensive player deals", int((hits + crits) - dodges), "to the defensive player")</div><div><br></div><div><br></div><div data-signatureblock="true"><div><br></div><div>Sent from Windows Mail</div><div><br></div></div></div>
</body>
</html>