My code is now working but only if I input 1 value but if I input 2 values, it won't work. Example (I will input monolithic_suppressor;owc_skeleton_stock) the compiler wont read it. I want to input multiple attachments that add or subtract the following attributes on the man o war stats.
damage = 49
fire_rate = 50
accuracy = 69
mobility = 59
shooting_range = 56
controls = 53
attachments = "monolithic_suppressor;owc_skeleton_stock;owc_laser_tactical;operator_foregrip".split(";")
attachment = str(input("What attachment would you like to add? ")).lower()
while True:
if attachment not in attachments:
break
elif attachment == attachments[0]:
damage += 5
mobility -= 5
elif attachment == attachments[1]:
mobility += 5
accuracy -= 8
elif attachment == attachments[2]:
accuracy += 5
controls += 5
elif attachment == attachments[3]:
controls += 10
mobility += 2
print(f"""\n Man O War Updated Stats!\n Damage: {damage}\n Fire Rate: {fire_rate}\n Accuracy: {accuracy} \n Mobility: {mobility}\n Range: {shooting_range} \n Control: {controls}
""")
break