X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=src%2Fai.c;h=e0bfb08ad50cfce872446ef883a982a1faa579e1;hb=933f68f408ae6ff5c04f55d41d43655d6f4fcdb6;hp=7f0112d5f957912ad9820a1bdb1e71d2a2838d1a;hpb=321425c10831f63599c41c31e9d42bc4ec8001d0;p=super-star-trek.git diff --git a/src/ai.c b/src/ai.c index 7f0112d..e0bfb08 100644 --- a/src/ai.c +++ b/src/ai.c @@ -360,7 +360,7 @@ static bool movescom(coord iq, bool avoid) if (same(game.state.planets[i].w, game.state.kscmdr) && game.state.planets[i].crystals == present) { /* destroy the planet */ - DESTROY(&game.state.planets[i]); + game.state.planets[i].pclass = destroyed; game.state.galaxy[game.state.kscmdr.x][game.state.kscmdr.y].planet = NOPLANET; if (!damaged(DRADIO) || game.condition == docked) { pause_game(true); @@ -389,7 +389,7 @@ void supercommander(void) prout("== SUPERCOMMANDER"); /* Decide on being active or passive */ - avoid = ((NKILLC+NKILLK)/(game.state.date+0.01-game.indate) < 0.1*game.skill*(game.skill+1.0) || + avoid = ((game.incom - game.state.remcom + game.inkling - game.state.remkl)/(game.state.date+0.01-game.indate) < 0.1*game.skill*(game.skill+1.0) || (game.state.date-game.indate) < 3.0); if (!game.iscate && avoid) { /* compute move away from Enterprise */