assault: Handle the "only spies" special case earlier
Since the previous commit, sneak_ashore() doesn't depend on a previous get_oland() anymore, so the att_get_offense() is unnecessarily. Move it across att_get_offense() next to the other special case "assault own sector". Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
9f851c9f03
commit
9b97d68bb3
1 changed files with 6 additions and 12 deletions
|
@ -119,6 +119,12 @@ assa(void)
|
|||
return RET_OK;
|
||||
}
|
||||
|
||||
/* If only spies assault, try to sneak them ashore */
|
||||
if (only_spies(off, &olist)) {
|
||||
sneak_ashore(off, &olist, def);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
ototal = att_get_offense(A_ASSAULT, off, &olist, def);
|
||||
if (att_abort(A_ASSAULT, off, def)) {
|
||||
pr("Assault aborted\n");
|
||||
|
@ -132,18 +138,6 @@ assa(void)
|
|||
* happening in the game.
|
||||
*/
|
||||
|
||||
/* First, we check to see if the only thing we have are spies
|
||||
* assaulting. If so, we try to sneak them on land. If they
|
||||
* make it, the defenders don't see a thing. If they fail, well,
|
||||
* the spies die, and the defenders see them. */
|
||||
|
||||
/* If no attacking forces (i.e. we got here with only spies)
|
||||
* then try to sneak on-land. */
|
||||
if (only_spies(off, &olist)) {
|
||||
sneak_ashore(off, &olist, def);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
/* Get the real defense */
|
||||
|
||||
att_get_defense(&olist, def, &dlist, a_spy, ototal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue