proutn(_(" rammed by "))
else:
proutn(_(" rams "))
- crmena(False, ienm, sector, w)
+ crmena(False, ienm, "sector", w)
if ibumpd:
proutn(_(" (original position)"))
skip(1)
shoved = True
elif iquad in (IHC, IHS): # Hit a commander
if withprob(0.05):
- crmena(True, iquad, sector, w)
+ crmena(True, iquad, "sector", w)
prout(_(" uses anti-photon device;"))
prout(_(" torpedo neutralized."))
return None
newcnd()
return None
elif iquad == IHP: # Hit a planet
- crmena(True, iquad, sector, w)
+ crmena(True, iquad, "sector", w)
prout(_(" destroyed."))
game.state.nplankl += 1
game.state.galaxy[game.quadrant.x][game.quadrant.y].planet = None
finish(FDPLANET)
return None
elif iquad == IHW: # Hit an inhabited world -- very bad!
- crmena(True, iquad, sector, w)
+ crmena(True, iquad, "sector", w)
prout(_(" destroyed."))
game.state.nworldkl += 1
game.state.galaxy[game.quadrant.x][game.quadrant.y].planet = None
if withprob(0.9):
nova(w)
else:
- crmena(True, IHSTAR, sector, w)
+ crmena(True, IHSTAR, "sector", w)
prout(_(" unaffected by photon blast."))
return None
elif iquad == IHQUEST: # Hit a thingy
return None
elif iquad == IHBLANK: # Black hole
skip(1)
- crmena(True, IHBLANK, sector, w)
+ crmena(True, IHBLANK, "sector", w)
prout(_(" swallows torpedo."))
return None
elif iquad == IHWEB: # hit the web
deadkl(w, iquad, w)
return None
skip(1)
- crmena(True, IHT, sector, w)
+ crmena(True, IHT, "sector", w)
if withprob(0.05):
prout(_(" survives photon blast."))
return None
else: # Problem!
skip(1)
proutn("Don't know how to handle torpedo collision with ")
- crmena(True, iquad, sector, w)
+ crmena(True, iquad, "sector", w)
skip(1)
return None
break
def deadkl(w, type, mv):
# kill a Klingon, Tholian, Romulan, or Thingy
# Added mv to allow enemy to "move" before dying
- crmena(True, type, sector, mv)
+ crmena(True, type, "sector", mv)
# Decide what kind of enemy it is and update appropriately
if type == IHR:
# chalk up a Romulan
proutn("??")
proutn(") ")
proutn(_("units to fire at "))
- crmena(False, ienm, sector, aim)
+ crmena(False, ienm, "sector", aim)
proutn("- ")
key = scan()
if key == IHALPHA and isit("no"):
return
# handle initial nova
game.quad[nov.x][nov.y] = IHDOT
- crmena(False, IHSTAR, sector, nov)
+ crmena(False, IHSTAR, "sector", nov)
prout(_(" novas."))
game.state.galaxy[game.quadrant.x][game.quadrant.y].stars -= 1
game.state.starkl += 1
hits[top2][2]=scratch.y
game.state.galaxy[game.quadrant.x][game.quadrant.y].stars -= 1
game.state.starkl += 1
- crmena(True, IHSTAR, sector, scratch)
+ crmena(True, IHSTAR, "sector", scratch)
prout(_(" novas."))
game.quad[scratch.x][scratch.y] = IHDOT
elif iquad == IHP: # Destroy planet
game.state.galaxy[game.quadrant.x][game.quadrant.y].planet = None
game.state.nplankl += 1
- crmena(True, IHP, sector, scratch)
+ crmena(True, IHP, "sector", scratch)
prout(_(" destroyed."))
game.iplnet.pclass = "destroyed"
game.iplnet = None
invalidate(game.base)
game.state.basekl += 1
newcnd()
- crmena(True, IHB, sector, scratch)
+ crmena(True, IHB, "sector", scratch)
prout(_(" destroyed."))
game.quad[scratch.x][scratch.y] = IHDOT
elif iquad in (IHE, IHF): # Buffet ship
break
newc.x = scratch.x + scratch.x - hits[mm][1]
newc.y = scratch.y + scratch.y - hits[mm][2]
- crmena(True, iquad, sector, scratch)
+ crmena(True, iquad, "sector", scratch)
proutn(_(" damaged"))
if not VALID_SECTOR(newc.x, newc.y):
# can't leave quadrant
iquad1 = game.quad[newc.x][newc.y]
if iquad1 == IHBLANK:
proutn(_(", blasted into "))
- crmena(False, IHBLANK, sector, newc)
+ crmena(False, IHBLANK, "sector", newc)
skip(1)
deadkl(scratch, iquad, newc)
break
elif line[0] != "#":
break
else:
- line = raw_input("COMMAND> ")
+ line = raw_input()
if logfp:
logfp.write(line + "\n")
return line
chew()
setwnd(prompt_window)
clrscr()
+ proutn("COMMAND> ")
if scan() == IHEOL:
if game.options & OPTION_CURSES:
makechart()