Skip to content

Instantly share code, notes, and snippets.

@GalaxyCr8r
Last active May 9, 2022 14:05
Show Gist options
  • Save GalaxyCr8r/01a9f794ac3b3a99e4ea0f9ddb097f84 to your computer and use it in GitHub Desktop.
Save GalaxyCr8r/01a9f794ac3b3a99e4ea0f9ddb097f84 to your computer and use it in GitHub Desktop.
Alphastrike could further be simplified so that younger ages could play it. Removing to-hit rolls entirely by distilling the S/M/L ranges into only Short and Long, and using a d6 for each potential point of damage could help little kids engage with the game with less math required.
damageToDice = { # Only d6s
-1: "n/a",
0: "1d6, 6",
1: "1d6, 5+",
2: "1d6, 3+",
3: "2d6, 5+",
4: "2d6, 3+",
5: "3d6, 5+",
6: "3d6, 3+",
7: "4d6, 5+",
8: "4d6, 3+",
9: "5d6, 5+",
10: "5d6, 3+",
}
numToEvade = {
0: "n/a",
1: "6",
2: "5+",
3: "4+",
4: "3+",
5: "2+",
}
def convert(s,m,l,ov,armor,struct,mp,jc,pv):
ret = {}
short = int(s + (m/2.0) + (ov/3.0))
long = int(l + (m/2.0) + (ov/3.0))
if (s == 0):
short = short - 1
if (l == 0):
long = long - 1
if (short <= -1):
short = -1
if (long <= -1):
long = -1
ret['short'] = damageToDice[short]
ret['long'] = damageToDice[long]
hitpoints = int(((armor + (struct * 0.66))/2) + 0.5)
jumpCapable = 0
if (jc > 0):
jumpCapable = 1
ret['mv'] = "{}/{}j".format(mp/2,jc/2)
else:
ret['mv'] = "{}".format(mp/2)
evade = int((mp * 0.25) + jumpCapable) - 1
if (evade < 0):
evade = 0
if (evade > 5):
evade = 5
ret['evade'] = numToEvade[evade]
ret['hp'] = hitpoints
#ret['pv'] = int((pv) * 0.25)
ret['cpv'] = int((hitpoints + short + long + evade) * 0.75)
return ret
def testMechs():
print ("AGoAC Mechs:")
## SRM # gives +# Short
## LRM # gives +# Long
## AC # gives +# Medium
print ("Locust LCT-1V\t"," : \n", convert(1,1,0,0,2,2,16,0,18)) # 16"
print ("Locust LCT-1E\t"," : \n", convert(2,1,0,0,2,2,16,0,19)) # 16"
print ("Commando COM-2D\t"," : \n",convert(2+1,2,0,0,2,2,12,0,17)) # 12", SRM 1
print ("Commando COM-3A\t"," : \n",convert(2+1,2,0,0,2,2,12,0,17)) # 12", SRM 1
print (" ")
print ("Griffin GRF-1N\t"," : \n", convert(1,2,2,0,5,5,10,10,31)) # 10j"
print ("Griffin GRF-1S\t"," : \n", convert(2,2,0,1,5,5,10,10,31)) # 10j"
print ("Shadow Hawk SHD-2D"," : \n",convert(2,3,1,0,2,5,10,6,26)) # 10/6j"
print ("Shadow Hawk SHD-2H"," : \n",convert(2,2,1,0,5,5,10,6,30)) # 10/6j"
print ("Wolverine WVR-6M"," : \n", convert(2,2,0,1,6,5,10,10,32)) # 10j"
print ("Wolverine WVR-6R"," : \n", convert(2,2,1,0,5,5,10,10,30)) # 10j"
print (" ")
print ("Catapult CPLT-C1"," : \n", convert(2,3,2+1,1,5,5,8,8,32)) # 8"j, LRM 1
print ("Catapult CPLT-K2"," : \n", convert(3,3,2,0,6,5,8,0,32)) # 8"
print ("Thunderbolt TDR-5S"," : \n", convert(3,3,1,1,7,5,8,0,36)) # 8"
print ("Thunderbolt TDR-5SE"," : \n",convert(3,3,1,0,7,5,8,8,35)) # 8j"
print (" ")
print ("Awesome AWS-8Q\t"," : \n", convert(3,3,3,0,8,6,6,0,39)) # 6"
print ("Awesome AWS-8R\t"," : \n", convert(2,3,2+1,0,8,6,6,0,38)) # 6", LRM 1
print ("BattleMaster BLR-1G"," : \n",convert(3,3,1,1,8,7,8,0,40)) # 8"
print ("BattleMaster BLR-1S"," : \n",convert(3,4,1,0,8,7,8,0,42)) # 8"
print (" ")
print ("Extra Mechs:")
print (" ")
# print ("Locust LCT-1M\t"," : \n",convert(1,2,1,0,1,2)) # 16"
# print (" ")
# print ("Blackjack BJ-1\t"," : \n",convert(2,2,0,1,5,4)) # 8"j
# print ("Blackjack BJ-2\t"," : \n",convert(3,3,2,1,5,4)) # 8"j
print (" ")
print ("Atlas AS7-D\t"," : \n",convert(5,5+2,2+1,0,10,8,6,0,52)) # 6", LRM 1, AC2
# print ("Atlas AS7-K\t"," : \n",convert(3,3,3,2,10,4)) # 6"
print (" ")
print ("Mad Cat (Timber Wolf) Prime"," : \n",convert(5,5,4,1,8,4,10,0,0)) # 10"
testMechs()
@GalaxyCr8r
Copy link
Author

GalaxyCr8r commented May 8, 2022

Currently outputs:

AGoAC Mechs:
Locust LCT-1V	  : 
 {'short': '1d6, 5+', 'long': 'n/a', 'mv': '8.0', 'evade': '4+', 'hp': 2, 'cpv': 3}
Locust LCT-1E	  : 
 {'short': '1d6, 3+', 'long': 'n/a', 'mv': '8.0', 'evade': '4+', 'hp': 2, 'cpv': 4}
Commando COM-2D	  : 
 {'short': '2d6, 3+', 'long': '1d6, 6', 'mv': '6.0', 'evade': '5+', 'hp': 2, 'cpv': 6}
Commando COM-3A	  : 
 {'short': '2d6, 3+', 'long': '1d6, 6', 'mv': '6.0', 'evade': '5+', 'hp': 2, 'cpv': 6}
 
Griffin GRF-1N	  : 
 {'short': '1d6, 3+', 'long': '2d6, 5+', 'mv': '5.0/5.0j', 'evade': '5+', 'hp': 4, 'cpv': 8}
Griffin GRF-1S	  : 
 {'short': '2d6, 5+', 'long': '1d6, 6', 'mv': '5.0/5.0j', 'evade': '5+', 'hp': 4, 'cpv': 6}
Shadow Hawk SHD-2D  : 
 {'short': '2d6, 5+', 'long': '1d6, 3+', 'mv': '5.0/3.0j', 'evade': '5+', 'hp': 3, 'cpv': 7}
Shadow Hawk SHD-2H  : 
 {'short': '2d6, 5+', 'long': '1d6, 3+', 'mv': '5.0/3.0j', 'evade': '5+', 'hp': 4, 'cpv': 8}
Wolverine WVR-6M  : 
 {'short': '2d6, 5+', 'long': '1d6, 6', 'mv': '5.0/5.0j', 'evade': '5+', 'hp': 5, 'cpv': 7}
Wolverine WVR-6R  : 
 {'short': '2d6, 5+', 'long': '1d6, 3+', 'mv': '5.0/5.0j', 'evade': '5+', 'hp': 4, 'cpv': 8}
 
Catapult CPLT-C1  : 
 {'short': '2d6, 5+', 'long': '2d6, 3+', 'mv': '4.0/4.0j', 'evade': '5+', 'hp': 4, 'cpv': 9}
Catapult CPLT-K2  : 
 {'short': '2d6, 3+', 'long': '2d6, 5+', 'mv': '4.0', 'evade': '6', 'hp': 5, 'cpv': 9}
Thunderbolt TDR-5S  : 
 {'short': '2d6, 3+', 'long': '1d6, 3+', 'mv': '4.0', 'evade': '6', 'hp': 5, 'cpv': 9}
Thunderbolt TDR-5SE  : 
 {'short': '2d6, 3+', 'long': '1d6, 3+', 'mv': '4.0/4.0j', 'evade': '5+', 'hp': 5, 'cpv': 9}
 
Awesome AWS-8Q	  : 
 {'short': '2d6, 3+', 'long': '2d6, 3+', 'mv': '3.0', 'evade': 'n/a', 'hp': 6, 'cpv': 10}
Awesome AWS-8R	  : 
 {'short': '2d6, 5+', 'long': '2d6, 3+', 'mv': '3.0', 'evade': 'n/a', 'hp': 6, 'cpv': 9}
BattleMaster BLR-1G  : 
 {'short': '2d6, 3+', 'long': '1d6, 3+', 'mv': '4.0', 'evade': '6', 'hp': 6, 'cpv': 9}
BattleMaster BLR-1S  : 
 {'short': '3d6, 5+', 'long': '2d6, 5+', 'mv': '4.0', 'evade': '6', 'hp': 6, 'cpv': 11}
 
Extra Mechs:
 
 
Atlas AS7-D	  : 
 {'short': '4d6, 3+', 'long': '3d6, 3+', 'mv': '3.0', 'evade': 'n/a', 'hp': 8, 'cpv': 16}
 
Mad Cat (Timber Wolf) Prime  : 
 {'short': '4d6, 5+', 'long': '3d6, 3+', 'mv': '5.0', 'evade': '6', 'hp': 5, 'cpv': 14}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment