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>
This commit is contained in:
Markus Armbruster 2015-02-15 08:58:20 +01:00
parent 76214dbfbd
commit 17abdbc5e0
5 changed files with 27 additions and 26 deletions

View file

@ -277,21 +277,21 @@
Play#1 output Play#1 1 dd destroyer (#5) ready to fire
Play#1 output Play#1 1 range is 1.00 (1.33)
Play#1 output Play#1 1 \007Kawhomp!!!
Play#1 output Play#1 1 Shells hit sub in -5,1 for 42 damage.
Play#1 output Play#1 1 Shells hit sub #50 in -5,1 for 42 damage.
Play#1 output Play#1 6 0 613
Play#1 input fire sh 5 51
Play#1 command fire
Play#1 output Play#1 1 dd destroyer (#5) ready to fire
Play#1 output Play#1 1 range is 1.00 (1.33)
Play#1 output Play#1 1 \007Kawhomp!!!
Play#1 output Play#1 1 Shells hit sub in -5,1 for 45 damage.
Play#1 output Play#1 1 Shells hit sub #51 in -5,1 for 45 damage.
Play#1 output Play#1 6 0 612
Play#1 input fire sh 5 52
Play#1 command fire
Play#1 output Play#1 1 dd destroyer (#5) ready to fire
Play#1 output Play#1 1 range is 2.00 (1.33)
Play#1 output Play#1 1 \007Kawhomp!!!
Play#1 output Play#1 1 Shells hit sub in -5,1 for 34 damage.
Play#1 output Play#1 1 Shells hit sub #52 in -5,1 for 34 damage.
Play#1 output Play#1 6 0 611
Play#1 input navi 5 gyuh
Play#1 command navigate
@ -303,7 +303,7 @@
Play#1 output Play#1 1 dd destroyer (#5) ready to fire
Play#1 output Play#1 1 range is 2.00 (1.33)
Play#1 output Play#1 1 \007Kawhomp!!!
Play#1 output Play#1 1 Shells hit sub in -4,-2 for 34 damage.
Play#1 output Play#1 1 Shells hit sub #53 in -4,-2 for 34 damage.
Play#1 output Play#1 1 \007
Play#1 output Play#1 1 Defenders fire back!
Play#1 output Play#1 1 Return fire hit dd destroyer (#5) in -5,-1 for 6 damage.