projects
/
super-star-trek.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Another rollup patch.
[super-star-trek.git]
/
src
/
ai.c
diff --git
a/src/ai.c
b/src/ai.c
index b4b35b9ed93f8be79999b3d72b0d786d7232972b..9d9da5db244a60cd4038cf2256c04fb791df2e41 100644
(file)
--- a/
src/ai.c
+++ b/
src/ai.c
@@
-231,7
+231,7
@@
static void movebaddy(coord com, int loccom, feature ienm)
}
if (idebug)
}
if (idebug)
-
prout(""
);
+
skip(1
);
/* Put commander in place within same quadrant */
game.quad[com.x][com.y] = IHDOT;
game.quad[next.x][next.y] = ienm;
/* Put commander in place within same quadrant */
game.quad[com.x][com.y] = IHDOT;
game.quad[next.x][next.y] = ienm;
@@
-301,7
+301,8
@@
static bool movescom(coord iq, bool flag, bool *ipage)
if (flag) {
/* Avoid quadrants with bases if we want to avoid Enterprise */
for_starbases(i)
if (flag) {
/* Avoid quadrants with bases if we want to avoid Enterprise */
for_starbases(i)
- if (game.state.baseq[i].x==iq.x && game.state.baseq[i].y==iq.y) return 1;
+ if (same(game.state.baseq[i], iq))
+ return true;
}
if (game.justin && !game.iscate) return true;
/* do the move */
}
if (game.justin && !game.iscate) return true;
/* do the move */
@@
-329,8
+330,8
@@
static bool movescom(coord iq, bool flag, bool *ipage)
}
/* check for a helpful planet */
for (i = 0; i < game.inplan; i++) {
}
/* check for a helpful planet */
for (i = 0; i < game.inplan; i++) {
- if (
game.state.plnets[i].w.x==game.state.kscmdr.x && game.state.plnets[i].w.y==game.state.kscmdr.y
&&
- game.state.plnets[i].crystals ==
1
) {
+ if (
same(game.state.plnets[i].w, game.state.kscmdr)
&&
+ game.state.plnets[i].crystals ==
present
) {
/* destroy the planet */
DESTROY(&game.state.plnets[i]);
game.state.galaxy[game.state.kscmdr.x][game.state.kscmdr.y].planet = NOPLANET;
/* destroy the planet */
DESTROY(&game.state.plnets[i]);
game.state.galaxy[game.state.kscmdr.x][game.state.kscmdr.y].planet = NOPLANET;