Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hp_damage_from_radiation_per_second = 0.00001
- hp = 1.0 #full hp
- rad = 1.0 #fully-irradiated
- global_degradation = 1.2
- belt = []
- COND = 0
- CUR_DERAD = 1
- BASE_DERAD = 2
- SPEC_DEGR = 3
- def add_to_belt (belt, derad, specific_degradation):
- belt.append ([1.0, derad, derad, specific_degradation])
- #1 upgraded freon cooler
- #add_to_belt (belt, 0.000033, 1.0)
- #2 upgraded freon coolers
- #add_to_belt (belt, 0.000033, 1.0)
- #add_to_belt (belt, 0.000033, 1.0)
- #1 upgraded freon cooler, with less degradation
- #add_to_belt (belt, 0.000033, 0.5)
- #3 upgraded freon coolers
- #add_to_belt (belt, 0.000033, 1.0)
- #add_to_belt (belt, 0.000033, 1.0)
- #add_to_belt (belt, 0.000033, 1.0)
- #3 upgraded freon coolers that degrade quicker
- #add_to_belt (belt, 0.000033, 1.3)
- #add_to_belt (belt, 0.000033, 1.3)
- #add_to_belt (belt, 0.000033, 1.3)
- #1 grapes from AR
- #add_to_belt (belt, 0.00022, 1.0)
- #2 grapes from AR
- #add_to_belt (belt, 0.00022, 1.0)
- #add_to_belt (belt, 0.00022, 1.0)
- #1 elektron from AR
- #add_to_belt (belt, 0.00007, 1.0)
- #5 very weak elektrons
- #add_to_belt (belt, 0.00007/60, 1.0)
- #add_to_belt (belt, 0.00007/60, 1.0)
- #add_to_belt (belt, 0.00007/60, 1.0)
- #add_to_belt (belt, 0.00007/60, 1.0)
- #add_to_belt (belt, 0.00007/60, 1.0)
- #11 very weak thistles
- #add_to_belt (belt, 0.00003/60, 1.0)
- #add_to_belt (belt, 0.00003/60, 1.0)
- #add_to_belt (belt, 0.00003/60, 1.0)
- #add_to_belt (belt, 0.00003/60, 1.0)
- #add_to_belt (belt, 0.00003/60, 1.0)
- #add_to_belt (belt, 0.00003/60, 1.0)
- #add_to_belt (belt, 0.00003/60, 1.0)
- #add_to_belt (belt, 0.00003/60, 1.0)
- #add_to_belt (belt, 0.00003/60, 1.0)
- #add_to_belt (belt, 0.00003/60, 1.0)
- #add_to_belt (belt, 0.00003/60, 1.0)
- #3 very weak grapes
- #add_to_belt (belt, 0.00022/60, 1.0)
- #add_to_belt (belt, 0.00022/60, 1.0)
- #add_to_belt (belt, 0.00022/60, 1.0)
- #1 very weak phantom star
- #add_to_belt (belt, 0.00013/60, 1.0)
- #3 very weak phantom stars
- #add_to_belt (belt, 0.00013/60, 1.0)
- #add_to_belt (belt, 0.00013/60, 1.0)
- #add_to_belt (belt, 0.00013/60, 1.0)
- #4 very weak beacons
- #add_to_belt (belt, 0.00009/60, 1.0)
- #add_to_belt (belt, 0.00009/60, 1.0)
- #add_to_belt (belt, 0.00009/60, 1.0)
- #add_to_belt (belt, 0.00009/60, 1.0)
- #7 very weak chains
- add_to_belt (belt, 0.00005/60, 1.0)
- add_to_belt (belt, 0.00005/60, 1.0)
- add_to_belt (belt, 0.00005/60, 1.0)
- add_to_belt (belt, 0.00005/60, 1.0)
- add_to_belt (belt, 0.00005/60, 1.0)
- add_to_belt (belt, 0.00005/60, 1.0)
- add_to_belt (belt, 0.00005/60, 1.0)
- t = 0
- while True:
- all_cond = 0
- hp -= rad * hp_damage_from_radiation_per_second
- if hp < 0:
- hp = 0
- for b in belt:
- rad -= b[CUR_DERAD]
- b[CUR_DERAD] = b[BASE_DERAD] * b[COND]
- if b[CUR_DERAD] < 0:
- b[CUR_DERAD] = 0
- b[COND] -= b[BASE_DERAD] * global_degradation * b[SPEC_DEGR]
- if b[COND] < 0:
- b[COND] = 0
- all_cond += b[COND]
- if rad < 0:
- rad = 0
- if rad == 0 or all_cond == 0 or hp == 0:
- break
- t += 1
- conds = ", ".join ([f"{b[COND]:.10f}" for b in belt])
- print (f"end at t={t} seconds ({t/60} min, {t/60/60} hours): hp={hp:.10f}, rad={rad:.10f}, belt item conditions={conds}")
Advertisement
Add Comment
Please, Sign In to add comment