fire: Print "Kaboom" even when the target is out of range
To make shell use more obvious. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
2f24a01c65
commit
ac15e5b961
2 changed files with 34 additions and 11 deletions
|
@ -338,17 +338,6 @@ multifire(void)
|
||||||
pr("range is %d.00 (%.2f)\n", range2, range);
|
pr("range is %d.00 (%.2f)\n", range2, range);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* If the player fires guns at a submarine, take care not to
|
|
||||||
* disclose it's a submarine: pretend the target is out of range.
|
|
||||||
*/
|
|
||||||
if (target == targ_ship && (mchr[vship.shp_type].m_flags & M_SUB))
|
|
||||||
range2 = -1;
|
|
||||||
if (trange > range2) {
|
|
||||||
pr("Target out of range.\n");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
nfiring++;
|
nfiring++;
|
||||||
switch (target) {
|
switch (target) {
|
||||||
case targ_sub:
|
case targ_sub:
|
||||||
|
@ -361,6 +350,17 @@ multifire(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If the player fires guns at a submarine, take care not to
|
||||||
|
* disclose it's a submarine: pretend the target is out of range.
|
||||||
|
*/
|
||||||
|
if (target == targ_ship && (mchr[vship.shp_type].m_flags & M_SUB))
|
||||||
|
range2 = -1;
|
||||||
|
if (trange > range2) {
|
||||||
|
pr("Target out of range.\n");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
switch (target) {
|
switch (target) {
|
||||||
case targ_bogus:
|
case targ_bogus:
|
||||||
case targ_land:
|
case targ_land:
|
||||||
|
|
|
@ -115,36 +115,42 @@
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
||||||
Play#1 output Play#1 1 range is 5.00 (4.50)
|
Play#1 output Play#1 1 range is 5.00 (4.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 624
|
Play#1 output Play#1 6 0 624
|
||||||
Play#1 input fire se 4,0 0
|
Play#1 input fire se 4,0 0
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
||||||
Play#1 output Play#1 1 range is 5.00 (4.50)
|
Play#1 output Play#1 1 range is 5.00 (4.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 623
|
Play#1 output Play#1 6 0 623
|
||||||
Play#1 input fire se 4,0 13
|
Play#1 input fire se 4,0 13
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
||||||
Play#1 output Play#1 1 range is 4.00 (4.50)
|
Play#1 output Play#1 1 range is 4.00 (4.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 622
|
Play#1 output Play#1 6 0 622
|
||||||
Play#1 input fire se 4,0 12
|
Play#1 input fire se 4,0 12
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
||||||
Play#1 output Play#1 1 range is 4.00 (4.50)
|
Play#1 output Play#1 1 range is 4.00 (4.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 621
|
Play#1 output Play#1 6 0 621
|
||||||
Play#1 input fire se 4,0 14,0
|
Play#1 input fire se 4,0 14,0
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
||||||
Play#1 output Play#1 1 range is 4.00 (4.50)
|
Play#1 output Play#1 1 range is 4.00 (4.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 620
|
Play#1 output Play#1 6 0 620
|
||||||
Play#1 input fire se 4,0 14,0
|
Play#1 input fire se 4,0 14,0
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
||||||
Play#1 output Play#1 1 range is 4.00 (4.50)
|
Play#1 output Play#1 1 range is 4.00 (4.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 619
|
Play#1 output Play#1 6 0 619
|
||||||
Play#1 input fire se 4,0 14,0
|
Play#1 input fire se 4,0 14,0
|
||||||
|
@ -158,12 +164,14 @@
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
||||||
Play#1 output Play#1 1 range is 4.00 (4.50)
|
Play#1 output Play#1 1 range is 4.00 (4.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 617
|
Play#1 output Play#1 6 0 617
|
||||||
Play#1 input fire se 4,0 14,0
|
Play#1 input fire se 4,0 14,0
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
Play#1 output Play#1 1 Sector 4,0 ready to fire
|
||||||
Play#1 output Play#1 1 range is 4.00 (4.50)
|
Play#1 output Play#1 1 range is 4.00 (4.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 616
|
Play#1 output Play#1 6 0 616
|
||||||
Play#1 input fire se 4,0 14,0
|
Play#1 input fire se 4,0 14,0
|
||||||
|
@ -566,24 +574,28 @@
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 bb battleship (#3) ready to fire
|
Play#1 output Play#1 1 bb battleship (#3) ready to fire
|
||||||
Play#1 output Play#1 1 range is 4.00 (3.71)
|
Play#1 output Play#1 1 range is 4.00 (3.71)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 579
|
Play#1 output Play#1 6 0 579
|
||||||
Play#1 input fire sh 3 0
|
Play#1 input fire sh 3 0
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 bb battleship (#3) ready to fire
|
Play#1 output Play#1 1 bb battleship (#3) ready to fire
|
||||||
Play#1 output Play#1 1 range is 4.00 (3.71)
|
Play#1 output Play#1 1 range is 4.00 (3.71)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 578
|
Play#1 output Play#1 6 0 578
|
||||||
Play#1 input fire sh 3 13
|
Play#1 input fire sh 3 13
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 bb battleship (#3) ready to fire
|
Play#1 output Play#1 1 bb battleship (#3) ready to fire
|
||||||
Play#1 output Play#1 1 range is 4.00 (3.71)
|
Play#1 output Play#1 1 range is 4.00 (3.71)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 577
|
Play#1 output Play#1 6 0 577
|
||||||
Play#1 input fire sh 3 12
|
Play#1 input fire sh 3 12
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 bb battleship (#3) ready to fire
|
Play#1 output Play#1 1 bb battleship (#3) ready to fire
|
||||||
Play#1 output Play#1 1 range is 4.00 (3.71)
|
Play#1 output Play#1 1 range is 4.00 (3.71)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 576
|
Play#1 output Play#1 6 0 576
|
||||||
Play#1 input fire sh 3 6,0
|
Play#1 input fire sh 3 6,0
|
||||||
|
@ -773,6 +785,7 @@
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 dd destroyer (#5) ready to fire
|
Play#1 output Play#1 1 dd destroyer (#5) ready to fire
|
||||||
Play#1 output Play#1 1 range is 1.00 (1.50)
|
Play#1 output Play#1 1 range is 1.00 (1.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 543
|
Play#1 output Play#1 6 0 543
|
||||||
Play#1 input fire sh 5 24
|
Play#1 input fire sh 5 24
|
||||||
|
@ -786,6 +799,7 @@
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 dd destroyer (#5) ready to fire
|
Play#1 output Play#1 1 dd destroyer (#5) ready to fire
|
||||||
Play#1 output Play#1 1 range is 1.00 (1.50)
|
Play#1 output Play#1 1 range is 1.00 (1.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 541
|
Play#1 output Play#1 6 0 541
|
||||||
Play#1 input fire sh 5 24
|
Play#1 input fire sh 5 24
|
||||||
|
@ -799,6 +813,7 @@
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 dd destroyer (#5) ready to fire
|
Play#1 output Play#1 1 dd destroyer (#5) ready to fire
|
||||||
Play#1 output Play#1 1 range is 1.00 (1.50)
|
Play#1 output Play#1 1 range is 1.00 (1.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 539
|
Play#1 output Play#1 6 0 539
|
||||||
Play#1 input fire sh 5 24
|
Play#1 input fire sh 5 24
|
||||||
|
@ -1095,24 +1110,28 @@
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 hat hvy artillery #3 ready to fire
|
Play#1 output Play#1 1 hat hvy artillery #3 ready to fire
|
||||||
Play#1 output Play#1 1 range is 4.00 (3.50)
|
Play#1 output Play#1 1 range is 4.00 (3.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 516
|
Play#1 output Play#1 6 0 516
|
||||||
Play#1 input fire la 3 0
|
Play#1 input fire la 3 0
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 hat hvy artillery #3 ready to fire
|
Play#1 output Play#1 1 hat hvy artillery #3 ready to fire
|
||||||
Play#1 output Play#1 1 range is 4.00 (3.50)
|
Play#1 output Play#1 1 range is 4.00 (3.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 515
|
Play#1 output Play#1 6 0 515
|
||||||
Play#1 input fire la 3 13
|
Play#1 input fire la 3 13
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 hat hvy artillery #3 ready to fire
|
Play#1 output Play#1 1 hat hvy artillery #3 ready to fire
|
||||||
Play#1 output Play#1 1 range is 3.00 (3.50)
|
Play#1 output Play#1 1 range is 3.00 (3.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 514
|
Play#1 output Play#1 6 0 514
|
||||||
Play#1 input fire la 3 12
|
Play#1 input fire la 3 12
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 hat hvy artillery #3 ready to fire
|
Play#1 output Play#1 1 hat hvy artillery #3 ready to fire
|
||||||
Play#1 output Play#1 1 range is 3.00 (3.50)
|
Play#1 output Play#1 1 range is 3.00 (3.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 513
|
Play#1 output Play#1 6 0 513
|
||||||
Play#1 input fire la 3 6,0
|
Play#1 input fire la 3 6,0
|
||||||
|
@ -1194,6 +1213,7 @@
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 hat hvy artillery #5 ready to fire
|
Play#1 output Play#1 1 hat hvy artillery #5 ready to fire
|
||||||
Play#1 output Play#1 1 range is 3.00 (3.50)
|
Play#1 output Play#1 1 range is 3.00 (3.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 499
|
Play#1 output Play#1 6 0 499
|
||||||
Play#1 input fire la 5 0,2
|
Play#1 input fire la 5 0,2
|
||||||
|
@ -1207,6 +1227,7 @@
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 hat hvy artillery #5 ready to fire
|
Play#1 output Play#1 1 hat hvy artillery #5 ready to fire
|
||||||
Play#1 output Play#1 1 range is 3.00 (3.50)
|
Play#1 output Play#1 1 range is 3.00 (3.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 497
|
Play#1 output Play#1 6 0 497
|
||||||
Play#1 input fire la 5 0,2
|
Play#1 input fire la 5 0,2
|
||||||
|
@ -1220,12 +1241,14 @@
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 hat hvy artillery #5 ready to fire
|
Play#1 output Play#1 1 hat hvy artillery #5 ready to fire
|
||||||
Play#1 output Play#1 1 range is 3.00 (3.50)
|
Play#1 output Play#1 1 range is 3.00 (3.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 495
|
Play#1 output Play#1 6 0 495
|
||||||
Play#1 input fire la 5 0,2
|
Play#1 input fire la 5 0,2
|
||||||
Play#1 command fire
|
Play#1 command fire
|
||||||
Play#1 output Play#1 1 hat hvy artillery #5 ready to fire
|
Play#1 output Play#1 1 hat hvy artillery #5 ready to fire
|
||||||
Play#1 output Play#1 1 range is 3.00 (3.50)
|
Play#1 output Play#1 1 range is 3.00 (3.50)
|
||||||
|
Play#1 output Play#1 1 \007Kaboom!!!
|
||||||
Play#1 output Play#1 1 Target out of range.
|
Play#1 output Play#1 1 Target out of range.
|
||||||
Play#1 output Play#1 6 0 494
|
Play#1 output Play#1 6 0 494
|
||||||
Play#1 input lcarg * ?shell>0
|
Play#1 input lcarg * ?shell>0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue