Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- l2 = [11]
- l3 = [12,21]
- l4 = [13, 22, 31]
- l5 = [14, 23, 32, 41]
- l6 = [15, 24, 33, 42, 51]
- l7 = [16, 25, 34, 43, 52, 61]
- l8 = [17, 26, 35, 44, 53, 62, 71]
- l9 = [18, 27, 36, 45, 54, 63, 72, 81]
- l10 = [19, 28, 37, 46, 55, 64, 73, 82, 91]
- l11 = [1, 10, 29, 38, 47, 56, 65, 74, 83, 92]
- l12 = [2, 20, 39, 48, 57, 66, 75, 84, 93]
- l13 = [3, 30, 49, 58, 67, 76, 85, 94]
- l14 = [4, 40, 59, 68, 77, 86, 95]
- l15 = [5, 50, 69, 78, 87, 96]
- l16 = [6, 60, 79, 88, 97]
- l17 = [7, 70, 89, 98]
- l18 = [8, 80, 99]
- l19 = [9, 90]
- l20 = [100]
- listy = [l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20]
- lethal = []
- for i in range(19):
- new = [i+2,listy[i]]
- lethal.append(new)
- def inp():
- while True:
- n = input()
- if n.isdigit():
- return int(n)
- else:
- print("integers only, dummy")
- def lethalizer():
- go = True
- while go:
- print("HP?")
- hp = inp()
- half = 0
- if hp%2 == 1:
- half = hp/2
- else:
- half = hp/2-1
- print("Armor?")
- a = inp()
- print("Lethality rating?")
- lethality = inp()
- if lethality > 99:
- lethality = 99
- print("Armor Piercing?")
- ap = inp()
- na = a - ap
- if na < 0:
- na = 0
- dChance = 0
- sChance = 0
- uChance = 0
- one = hp - 1
- two = hp - 2
- thingy = [0,0]
- for d in lethal:
- if ((d[0] - na) > half) & ((d[0] - na) < int(two)): #will the damage stun you?
- count = 0
- for i in d[1]:
- if i > lethality:
- count = count + 1
- sChance = sChance + count
- if d[0] - na == one: #complicated stuff, but for incapactitation
- count = 0
- for i in d[1]:
- if i > lethality:
- count = count + 1
- thingy[0] = count
- if d[0] -na == two:
- count = 0
- for i in d[1]:
- if i > lethality:
- count = count + 1
- thingy[1] = count
- if d[0] == na:
- for i in d[1]:
- if i > lethality:
- uChance = uChance + 1
- if d[0] -na > (hp - 1): #d for damage (does it kill you?)
- for r in d[1]: #r for the Lethality roll (what lethality roll are we looking at?)
- if r > lethality: #we don't want to doublecount any lethality ratings
- dChance = dChance + 1
- dChance = dChance + lethality
- iChance = (thingy[0] + thingy [1])
- nChance = 100 - dChance - iChance - sChance
- print("You have a")
- print(str(dChance)+"% chance to instantly die,")
- print(str(sChance)+"% chance to be stunned,")
- print(str(iChance)+"% chance to be incapacitated,")
- print(str(nChance)+"% chance to live to fight another round, and a")
- print(str(uChance)+"% chance to survive completely unharmed...somehow")
- print("press 'q' to quit, press any other key to continue")
- q = input()
- if q == "q":
- go = False
- lethalizer()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement