]> git.pond.sub.org Git - empserver/commit
torpedo fire: Reveal sub hit by return fire or depth charge
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 15 Feb 2015 07:58:20 +0000 (08:58 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 2 Mar 2015 07:20:52 +0000 (08:20 +0100)
commit17abdbc5e0d89706f62bb3d91ba0636b6a980df9
tree58002ab6a3559cba710f54dde6c44276d802e748
parent76214dbfbdfb4730954049caabfda56e35c867de
torpedo fire: Reveal sub hit by return fire or depth charge

This partly reverts a change made in Empire 2.3 to tell a submarine's
opponent only that he's dealing with a "sub" instead of the
submarine's UID and type.  Hiding submarines is done by prsub().
Uses:

* Command torpedo: defender depth charges or torpedoes an attacking
  submarine

  If you can attack a submarine reactively, you should be able to
  attack it actively, too.  But that requires its UID.  Reveal it
  again, but keep the type hidden.

* Command fire: defender fires back at a submarine using its deck gun

  Submarines need to surface to fire deck guns, so they shouldn't be
  treated any different than surface ships.  Revert Empire 2.3's
  change entirely there, i.e. defender learns type as well as UID.

* Command torpedo: attacking submarine hits its target

  Keep the submarine hidden.

* Commands torpedo and fire: attacking ship hits a submarine

  The attacker passed the UID as command argument, so it doesn't
  matter whether we print it or not.  Printing it is simpler to code,
  so do that.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/mfir.c
src/lib/commands/torp.c
tests/fire/journal.log
tests/retreat/journal.log
tests/torpedo/journal.log