From da72eafb0c4bb2bb3e012ab8bef4dbaa4fd9a74e Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 27 Feb 2017 12:50:29 -0500 Subject: [PATCH 1/1] Assign some probability to claaking device getting damaged. --- sst.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sst.py b/sst.py index 82843ef..599ebc9 100755 --- a/sst.py +++ b/sst.py @@ -709,7 +709,7 @@ def moveklings(): return tacmoves def movescom(iq, avoid): - "Commander movement helper." + "Supercommander movement helper." # Avoid quadrants with bases if we want to avoid Enterprise if not welcoming(iq) or (avoid and iq in game.state.baseq): return False @@ -1114,23 +1114,23 @@ def doshield(shraise): def randdevice(): "Choose a device to damage, at random." weights = ( - 105, # DSRSENS: short range scanners 10.5% - 105, # DLRSENS: long range scanners 10.5% - 120, # DPHASER: phasers 12.0% - 120, # DPHOTON: photon torpedoes 12.0% - 25, # DLIFSUP: life support 2.5% - 65, # DWARPEN: warp drive 6.5% - 70, # DIMPULS: impulse engines 6.5% - 145, # DSHIELD: deflector shields 14.5% - 30, # DRADIO: subspace radio 3.0% - 45, # DSHUTTL: shuttle 4.5% - 15, # DCOMPTR: computer 1.5% - 20, # NAVCOMP: navigation system 2.0% - 75, # DTRANSP: transporter 7.5% + 105, # DSRSENS: short range scanners 10.5% + 105, # DLRSENS: long range scanners 10.5% + 120, # DPHASER: phasers 12.0% + 120, # DPHOTON: photon torpedoes 12.0% + 25, # DLIFSUP: life support 2.5% + 65, # DWARPEN: warp drive 6.5% + 70, # DIMPULS: impulse engines 6.5% + 135, # DSHIELD: deflector shields 13.5% + 30, # DRADIO: subspace radio 3.0% + 45, # DSHUTTL: shuttle 4.5% + 15, # DCOMPTR: computer 1.5% + 20, # NAVCOMP: navigation system 2.0% + 75, # DTRANSP: transporter 7.5% 20, # DSHCTRL: high-speed shield controller 2.0% - 10, # DDRAY: death ray 1.0% - 30, # DDSP: deep-space probes 3.0% - 0, # DCLOAK: the cloaking device 0.0 + 10, # DDRAY: death ray 1.0% + 30, # DDSP: deep-space probes 3.0% + 10, # DCLOAK: the cloaking device 1.0 ) assert(sum(weights) == 1000) idx = randrange(1000) -- 2.31.1