Thinker19930602
Ideas Guy (a.k.a.Thinker)
- Joined
- Aug 2, 2007
- Messages
- 216
How about ways to capture enemy starbases? UU's? UB's? New units like gunships, frigates, Multipurpose ships...
lol haven't we all?...except for the newEarth faction.No Alien Civs. Instead, Why not add colonies that have rebeled from the PDE?
#MOD BEGIN
#Original Code
# Loop through all teams to see if anyone can see this plot
#for iTeamLoop in range(gc.getMAX_TEAMS()):
# if (gc.getTeam(iTeamLoop).isAlive()):
# if (pPlot.isVisible(iTeamLoop, false)):
# bPlotValid = false
# break
iNoBarbRange = 5
def clipToMap(x, y):
w = CyMap().getWidth()
h = CyMap().getHeight()
if x < 0:
x += w
if x >= w:
x -= w
if y < 0:
y += h
if y >= h:
y -= h
return CyMap().plot(x, y)
def isValidPlot(x, y):
for team in range(gc.getMAX_TEAMS()):
if (gc.getTeam(team).isAlive()):
center_x = pPlot.getX()
center_y = pPlot.getY()
for x in range(center_x-iNoBarbRange, center_x+iNoBarbRange):
for y in range(center_y-iNoBarbRange, center_y+iNoBarbRange):
if (clipToMap(x, y).isVisible(team, false)):
return false
return true
if not isValidPlot(pPlot.getX(), pPlot.getY()):
continue
#MOD END