Applying a multiplier to a random-resulted number
<p>newbie here.</p>

<p>OK so long story short, I've made a var that will output a random number between 70 and 155:</p>

<pre><code>T_dmg = random.randrange(70,155)
</code></pre>

<p>And this is my "multiplier":</p>

<pre><code>def crit(cr):
    return cr * 2
</code></pre>

<p>Crit stands for critical but I am not sure how to use the "return" statement. So I added this function to the line before the number gets added up:</p>

<pre><code>if Toni &gt; 0:
        crit(T_dmg)
        Xoni = Xoni - T_dmg
</code></pre>

<p>Problem is the output is never multiplied because somehow, the "crit" function doesn't seem to apply to it.
Xoni is a var that has a value of 7000. If this doesn't make sense, I'm using HP from game concepts. I hope any of you can shed some light.</p>

<p>Thanks!</p>

<p>Edit: Chance code:</p>

<pre><code>def critchance():
    random.randrange(1,10)
    if critchance() == "3"
    crit()
</code></pre>
