aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Stewart2018-08-08 20:41:19 -0400
committerFilippos Karapetis2019-05-28 08:08:52 +0300
commitc9918c30644c58fc135951a013a387eeca7fd4de (patch)
tree930c0c329a2c8518b135fa0f6122d206512a975e /engines
parent702aa6f6cbdf9b775ed97d999f11ef3928729479 (diff)
downloadscummvm-rg350-c9918c30644c58fc135951a013a387eeca7fd4de.tar.gz
scummvm-rg350-c9918c30644c58fc135951a013a387eeca7fd4de.tar.bz2
scummvm-rg350-c9918c30644c58fc135951a013a387eeca7fd4de.zip
STARTREK: Common code for VENG mission
Diffstat (limited to 'engines')
-rw-r--r--engines/startrek/awaymission.h24
-rw-r--r--engines/startrek/room.h15
-rw-r--r--engines/startrek/rooms/veng0.cpp9
-rw-r--r--engines/startrek/rooms/veng1.cpp5
-rw-r--r--engines/startrek/rooms/veng2.cpp18
-rw-r--r--engines/startrek/rooms/veng3.cpp5
-rw-r--r--engines/startrek/rooms/veng4.cpp13
-rw-r--r--engines/startrek/rooms/veng5.cpp5
-rw-r--r--engines/startrek/rooms/veng6.cpp5
-rw-r--r--engines/startrek/rooms/veng7.cpp5
-rw-r--r--engines/startrek/rooms/veng8.cpp7
-rw-r--r--engines/startrek/rooms/venga.cpp78
12 files changed, 165 insertions, 24 deletions
diff --git a/engines/startrek/awaymission.h b/engines/startrek/awaymission.h
index 1b3df61540..03758279ad 100644
--- a/engines/startrek/awaymission.h
+++ b/engines/startrek/awaymission.h
@@ -636,7 +636,7 @@ struct AwayMission {
// 2: beam taken
byte beamState; // 0x35
- bool field36; // 0x36
+ bool enterpriseLeftForDistressCall; // 0x36
bool openedPanel; // 0x37
bool clearedPanelDebris; // 0x38
bool removedPanelDebris; // 0x39
@@ -665,10 +665,24 @@ struct AwayMission {
bool scannedMainComputer; // 0x46
bool elasiHailedRepublic; // 0x47
bool tookRecordDeckFromAuxilaryControl; // 0x48
- int16 field49; // 0x49
- int16 field4b; // 0x4b
- int16 field4d; // 0x4d
- int16 field51; // 0x51
+
+ // Counter used when shields are down and Elasi are present
+ int16 counterUntilElasiBoardWithShieldsDown; // 0x49
+
+ // Counter used after talking with Elasi and they give you time to recover the
+ // data
+ int16 counterUntilElasiAttack; // 0x4b
+
+ // Counter used after telling Elasi you'll turn off shields (initial warning)
+ int16 counterUntilElasiNagToDisableShields; // 0x4d
+
+ // Counter used after telling Elasi you'll turn off shields (they destroy the
+ // ship this time)
+ int16 counterUntilElasiDestroyShip; // 0x4f
+
+ // Counter used after telling Elasi to beam over
+ int16 counterUntilElasiBoardWithInvitation; // 0x51
+
bool putSupportBeamInSickbayHallway; // 0x53
bool clearedDebris; // 0x54
bool lookedAtTurbolift2Door; // 0x55
diff --git a/engines/startrek/room.h b/engines/startrek/room.h
index c5d85a55f0..33ce30bc27 100644
--- a/engines/startrek/room.h
+++ b/engines/startrek/room.h
@@ -2484,7 +2484,6 @@ public:
void veng0UseMccoyOnLivingCrewman();
void veng0MccoyReachedCrewman();
void veng0MccoyScannedCrewman();
- // TODO: common code
// VENG1
void veng1Tick1();
@@ -2531,7 +2530,6 @@ public:
void veng1GetDebris();
void veng1ReachedDebrisToGet();
void veng1TriedToGetDebris();
- // TODO: common code
// VENG2
void veng2Tick1();
@@ -2598,7 +2596,6 @@ public:
void veng2GetMTricorder();
void veng2ReachedMTricorderToGet();
void veng2PickedUpMTricorder();
- // TODO: common code
// VENG3
void veng3Tick1();
@@ -2644,7 +2641,6 @@ public:
void veng3GetCable();
void veng3ReachedCable();
void veng3PickedUpCable();
- // TODO: Common code
// VENG4
void veng4Tick1();
@@ -2672,7 +2668,7 @@ public:
void veng4LookAtLeftBedReadings();
void veng4LookAtBrittany();
void veng4LookAtDrill();
- void veng4LookAtHypo();
+ void veng4LookAtHypoOnTable();
void veng4LookAtDoorObject();
void veng4LookAnywhere();
void veng4GetHypo();
@@ -2683,7 +2679,6 @@ public:
void veng4PickedUpDrill();
void veng4TouchedHotspot0();
void veng4WalkToDoor();
- // TODO: common code
// VENG5
void veng5Tick1();
@@ -2720,7 +2715,6 @@ public:
void veng5GetPowerPack();
void veng5ReachedPowerPack();
void veng5PickedUpPowerPack();
- // TODO: common code
// VENG6
void veng6Tick1();
@@ -2776,7 +2770,6 @@ public:
void veng6GetEngineeringJournal();
void veng6ReachedEngineeringJournal();
void veng6TookEngineeringJournal();
- // TODO: common code
// VENG7
void veng7Tick1();
@@ -2802,7 +2795,6 @@ public:
void veng7GetCable();
void veng7ReachedCable();
void veng7PickedUpCable();
- // TODO: common code
// VENG8
void veng8Tick1();
@@ -2848,6 +2840,11 @@ public:
void veng8UseSTricorderOnConsole();
// VENGA (common code)
+ void vengaTick();
+ void vengaElasiBeamOver();
+ void vengaUsePhaserAnywhere();
+ void vengaLookAtHypo();
+ void vengaUseCommunicator();
void vengaUseMccoyOnDeadGuy();
public:
diff --git a/engines/startrek/rooms/veng0.cpp b/engines/startrek/rooms/veng0.cpp
index 0e7b544cc8..fe5ae7f631 100644
--- a/engines/startrek/rooms/veng0.cpp
+++ b/engines/startrek/rooms/veng0.cpp
@@ -97,6 +97,13 @@ extern const RoomAction veng0ActionList[] = {
{ {ACTION_USE, OBJECT_MCCOY, HOTSPOT_CREWMAN_1, 0}, &Room::veng0UseMccoyOnLivingCrewman },
{ {ACTION_DONE_WALK, 3, 0, 0}, &Room::veng0MccoyReachedCrewman },
{ {ACTION_DONE_ANIM, 1, 0, 0}, &Room::veng0MccoyScannedCrewman },
+
+ // Common code
+ { {ACTION_TICK, 0xff, 0xff, 0xff}, &Room::vengaTick },
+ { {ACTION_USE, OBJECT_IPHASERS, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_USE, OBJECT_IPHASERK, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_LOOK, OBJECT_IHYPO, 0, 0}, &Room::vengaLookAtHypo },
+ { {ACTION_USE, OBJECT_ICOMM, OBJECT_KIRK, 0}, &Room::vengaUseCommunicator },
};
extern const int veng0NumActions = ARRAYSIZE(veng0ActionList);
@@ -138,7 +145,7 @@ void Room::veng0Tick50() {
showText(TX_SPEAKER_KIRK, TX_VEN0_011);
showText(TX_SPEAKER_KIRK, TX_VEN0_010);
showText(TX_SPEAKER_MCCOY, TX_VEN0_017);
- _awayMission->veng.field36 = true;
+ _awayMission->veng.enterpriseLeftForDistressCall = true;
}
}
diff --git a/engines/startrek/rooms/veng1.cpp b/engines/startrek/rooms/veng1.cpp
index e6834580de..a90a396ea6 100644
--- a/engines/startrek/rooms/veng1.cpp
+++ b/engines/startrek/rooms/veng1.cpp
@@ -117,6 +117,11 @@ extern const RoomAction veng1ActionList[] = {
{ {ACTION_DONE_ANIM, 12, 0, 0}, &Room::veng1TriedToGetDebris },
// Common code
+ { {ACTION_TICK, 0xff, 0xff, 0xff}, &Room::vengaTick },
+ { {ACTION_USE, OBJECT_IPHASERS, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_USE, OBJECT_IPHASERK, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_LOOK, OBJECT_IHYPO, 0, 0}, &Room::vengaLookAtHypo },
+ { {ACTION_USE, OBJECT_ICOMM, OBJECT_KIRK, 0}, &Room::vengaUseCommunicator },
{ {ACTION_USE, OBJECT_IMEDKIT, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
{ {ACTION_USE, OBJECT_IMTRICOR, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
{ {ACTION_USE, OBJECT_MCCOY, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
diff --git a/engines/startrek/rooms/veng2.cpp b/engines/startrek/rooms/veng2.cpp
index c00c346543..139142dd57 100644
--- a/engines/startrek/rooms/veng2.cpp
+++ b/engines/startrek/rooms/veng2.cpp
@@ -169,6 +169,12 @@ extern const RoomAction veng2ActionList[] = {
{ {ACTION_DONE_WALK, 16, 0, 0}, &Room::veng2ReachedMTricorderToGet },
{ {ACTION_DONE_ANIM, 17, 0, 0}, &Room::veng2PickedUpMTricorder },
+ // Common code
+ { {ACTION_TICK, 0xff, 0xff, 0xff}, &Room::vengaTick },
+ { {ACTION_USE, OBJECT_IPHASERS, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_USE, OBJECT_IPHASERK, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_LOOK, OBJECT_IHYPO, 0, 0}, &Room::vengaLookAtHypo },
+
// ENHANCEMENTs
{ {ACTION_USE, OBJECT_KIRK, HOTSPOT_TORPEDO_CONTROL, 0}, &Room::veng2UseKirkOnTorpedoButton },
// TODO: uncomment
@@ -256,7 +262,7 @@ void Room::veng2ElasiShipDecloaked() {
showText(TX_SPEAKER_MCCOY, TX_VEN2_042);
if (_awayMission->veng.poweredSystem != 2) {
showText(TX_SPEAKER_SPOCK, TX_VEN2_032);
- _awayMission->veng.field49 = 1800;
+ _awayMission->veng.counterUntilElasiBoardWithShieldsDown = 1800;
} else
veng2Timer2Expired();
}
@@ -300,7 +306,7 @@ void Room::veng2Timer2Expired() { // Elasi hail the Enterprise if they haven't a
showText(TX_SPEAKER_KIRK, TX_VEN2_022);
loadActorAnim2(OBJECT_VIEWSCREEN, "s7r2u2", VIEWSCREEN_X, VIEWSCREEN_Y);
- _awayMission->veng.field4b = 27000;
+ _awayMission->veng.counterUntilElasiAttack = 27000;
_awayMission->veng.countdownStarted = true;
}
@@ -531,7 +537,7 @@ void Room::veng2UseCommunicator() {
showText(TX_SPEAKER_ELASI_CAPTAIN, TX_VEN2_114);
showText(TX_SPEAKER_KIRK, TX_VEN2_025);
loadActorAnim2(OBJECT_VIEWSCREEN, "s7r2u2", VIEWSCREEN_X, VIEWSCREEN_Y);
- _awayMission->veng.field4d = 1800;
+ _awayMission->veng.counterUntilElasiNagToDisableShields = 1800;
_awayMission->veng.toldElasiToBeamOver = true;
}
}
@@ -689,11 +695,11 @@ powerWeapons:
if (_awayMission->veng.toldElasiToBeamOver) {
showText(TX_SPEAKER_SPOCK, TX_VEN2_052);
_awayMission->veng.elasiShieldsDown = true;
- _awayMission->veng.field51 = 900;
+ _awayMission->veng.counterUntilElasiBoardWithInvitation = 900;
}
if (_awayMission->veng.elasiShipDecloaked && !_awayMission->veng.elasiHailedRepublic) {
showText(TX_SPEAKER_SPOCK, TX_VEN2_033);
- _awayMission->veng.field49 = 1800;
+ _awayMission->veng.counterUntilElasiBoardWithShieldsDown = 1800;
}
} else if (_awayMission->veng.countdownStarted)
showText(TX_SPEAKER_SPOCK, TX_VEN2_035);
@@ -731,7 +737,7 @@ powerWeapons:
showText(TX_SPEAKER_KIJE, TX_VEN2_087);
if (_awayMission->veng.elasiShipDecloaked && !_awayMission->veng.elasiHailedRepublic) {
showText(TX_SPEAKER_SPOCK, TX_VEN2_071);
- _awayMission->veng.field49 = 1800;
+ _awayMission->veng.counterUntilElasiBoardWithShieldsDown = 1800;
}
}
}
diff --git a/engines/startrek/rooms/veng3.cpp b/engines/startrek/rooms/veng3.cpp
index 969a8a1037..8c71086e24 100644
--- a/engines/startrek/rooms/veng3.cpp
+++ b/engines/startrek/rooms/veng3.cpp
@@ -92,6 +92,11 @@ extern const RoomAction veng3ActionList[] = {
{ {ACTION_DONE_ANIM, 12, 0, 0}, &Room::veng3PickedUpCable },
// Common code
+ { {ACTION_TICK, 0xff, 0xff, 0xff}, &Room::vengaTick },
+ { {ACTION_USE, OBJECT_IPHASERS, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_USE, OBJECT_IPHASERK, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_LOOK, OBJECT_IHYPO, 0, 0}, &Room::vengaLookAtHypo },
+ { {ACTION_USE, OBJECT_ICOMM, OBJECT_KIRK, 0}, &Room::vengaUseCommunicator },
{ {ACTION_USE, OBJECT_IMEDKIT, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
{ {ACTION_USE, OBJECT_IMTRICOR, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
{ {ACTION_USE, OBJECT_MCCOY, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
diff --git a/engines/startrek/rooms/veng4.cpp b/engines/startrek/rooms/veng4.cpp
index 2c3f8f2319..b98ffcb3aa 100644
--- a/engines/startrek/rooms/veng4.cpp
+++ b/engines/startrek/rooms/veng4.cpp
@@ -70,8 +70,8 @@ extern const RoomAction veng4ActionList[] = {
{ {ACTION_USE, OBJECT_ISTRICOR, OBJECT_DRILL, 0}, &Room::veng4LookAtDrill },
{ {ACTION_LOOK, OBJECT_DRILL, 0, 0}, &Room::veng4LookAtDrill },
- { {ACTION_USE, OBJECT_ISTRICOR, OBJECT_HYPO, 0}, &Room::veng4LookAtHypo },
- { {ACTION_LOOK, OBJECT_HYPO, 0, 0}, &Room::veng4LookAtHypo },
+ { {ACTION_USE, OBJECT_ISTRICOR, OBJECT_HYPO, 0}, &Room::veng4LookAtHypoOnTable },
+ { {ACTION_LOOK, OBJECT_HYPO, 0, 0}, &Room::veng4LookAtHypoOnTable },
{ {ACTION_LOOK, OBJECT_DOOR, 0, 0}, &Room::veng4LookAtDoorObject },
{ {ACTION_LOOK, 0xff, 0, 0}, &Room::veng4LookAnywhere },
@@ -87,6 +87,13 @@ extern const RoomAction veng4ActionList[] = {
{ {ACTION_WALK, OBJECT_DOOR, 0, 0}, &Room::veng4WalkToDoor },
{ {ACTION_WALK, HOTSPOT_DOOR, 0, 0}, &Room::veng4WalkToDoor },
+ // Common code
+ { {ACTION_TICK, 0xff, 0xff, 0xff}, &Room::vengaTick },
+ { {ACTION_USE, OBJECT_IPHASERS, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_USE, OBJECT_IPHASERK, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_LOOK, OBJECT_IHYPO, 0, 0}, &Room::vengaLookAtHypo },
+ { {ACTION_USE, OBJECT_ICOMM, OBJECT_KIRK, 0}, &Room::vengaUseCommunicator },
+
// ENHANCEMENT (let object count for the "look" action, not just the hotspot)
{ {ACTION_LOOK, OBJECT_LEFT_READINGS, 0, 0}, &Room::veng4LookAtLeftBedReadings },
};
@@ -288,7 +295,7 @@ void Room::veng4LookAtDrill() {
showText(TX_VEN4N012);
}
-void Room::veng4LookAtHypo() {
+void Room::veng4LookAtHypoOnTable() {
showText(TX_VEN4N010);
}
diff --git a/engines/startrek/rooms/veng5.cpp b/engines/startrek/rooms/veng5.cpp
index 52bf7ea940..23a7cd2f56 100644
--- a/engines/startrek/rooms/veng5.cpp
+++ b/engines/startrek/rooms/veng5.cpp
@@ -78,6 +78,11 @@ extern const RoomAction veng5ActionList[] = {
{ {ACTION_DONE_ANIM, 7, 0, 0}, &Room::veng5PickedUpPowerPack },
// Common code
+ { {ACTION_TICK, 0xff, 0xff, 0xff}, &Room::vengaTick },
+ { {ACTION_USE, OBJECT_IPHASERS, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_USE, OBJECT_IPHASERK, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_LOOK, OBJECT_IHYPO, 0, 0}, &Room::vengaLookAtHypo },
+ { {ACTION_USE, OBJECT_ICOMM, OBJECT_KIRK, 0}, &Room::vengaUseCommunicator },
{ {ACTION_USE, OBJECT_IMEDKIT, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
{ {ACTION_USE, OBJECT_IMTRICOR, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
{ {ACTION_USE, OBJECT_MCCOY, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
diff --git a/engines/startrek/rooms/veng6.cpp b/engines/startrek/rooms/veng6.cpp
index e822742d06..b7bb549077 100644
--- a/engines/startrek/rooms/veng6.cpp
+++ b/engines/startrek/rooms/veng6.cpp
@@ -118,6 +118,11 @@ extern const RoomAction veng6ActionList[] = {
{ {ACTION_DONE_ANIM, 12, 0, 0}, &Room::veng6TookEngineeringJournal },
// Common code
+ { {ACTION_TICK, 0xff, 0xff, 0xff}, &Room::vengaTick },
+ { {ACTION_USE, OBJECT_IPHASERS, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_USE, OBJECT_IPHASERK, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_LOOK, OBJECT_IHYPO, 0, 0}, &Room::vengaLookAtHypo },
+ { {ACTION_USE, OBJECT_ICOMM, OBJECT_KIRK, 0}, &Room::vengaUseCommunicator },
{ {ACTION_USE, OBJECT_IMEDKIT, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
{ {ACTION_USE, OBJECT_IMTRICOR, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
{ {ACTION_USE, OBJECT_MCCOY, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
diff --git a/engines/startrek/rooms/veng7.cpp b/engines/startrek/rooms/veng7.cpp
index 3ba673e52f..3dafb0841e 100644
--- a/engines/startrek/rooms/veng7.cpp
+++ b/engines/startrek/rooms/veng7.cpp
@@ -63,6 +63,11 @@ extern const RoomAction veng7ActionList[] = {
{ {ACTION_DONE_ANIM, 4, 0, 0}, &Room::veng7PickedUpCable },
// Common code
+ { {ACTION_TICK, 0xff, 0xff, 0xff}, &Room::vengaTick },
+ { {ACTION_USE, OBJECT_IPHASERS, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_USE, OBJECT_IPHASERK, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_LOOK, OBJECT_IHYPO, 0, 0}, &Room::vengaLookAtHypo },
+ { {ACTION_USE, OBJECT_ICOMM, OBJECT_KIRK, 0}, &Room::vengaUseCommunicator },
{ {ACTION_USE, OBJECT_IMEDKIT, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
{ {ACTION_USE, OBJECT_IMTRICOR, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
{ {ACTION_USE, OBJECT_MCCOY, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
diff --git a/engines/startrek/rooms/veng8.cpp b/engines/startrek/rooms/veng8.cpp
index ac002c0718..0712bdf441 100644
--- a/engines/startrek/rooms/veng8.cpp
+++ b/engines/startrek/rooms/veng8.cpp
@@ -100,6 +100,13 @@ extern const RoomAction veng8ActionList[] = {
{ {ACTION_USE, OBJECT_ISTRICOR, OBJECT_SLIDER, 0}, &Room::veng8UseSTricorderOnConsole },
{ {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_CONTROLS, 0}, &Room::veng8UseSTricorderOnConsole },
{ {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_SLIDER, 0}, &Room::veng8UseSTricorderOnConsole },
+
+ // Common code
+ { {ACTION_TICK, 0xff, 0xff, 0xff}, &Room::vengaTick },
+ { {ACTION_USE, OBJECT_IPHASERS, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_USE, OBJECT_IPHASERK, 0xff, 0}, &Room::vengaUsePhaserAnywhere },
+ { {ACTION_LOOK, OBJECT_IHYPO, 0, 0}, &Room::vengaLookAtHypo },
+ { {ACTION_USE, OBJECT_ICOMM, OBJECT_KIRK, 0}, &Room::vengaUseCommunicator },
};
extern const int veng8NumActions = ARRAYSIZE(veng8ActionList);
diff --git a/engines/startrek/rooms/venga.cpp b/engines/startrek/rooms/venga.cpp
index 0110331796..5922d52b26 100644
--- a/engines/startrek/rooms/venga.cpp
+++ b/engines/startrek/rooms/venga.cpp
@@ -24,6 +24,84 @@
namespace StarTrek {
+void Room::vengaTick() {
+ if (_awayMission->veng.counterUntilElasiBoardWithShieldsDown != 0) {
+ _awayMission->veng.counterUntilElasiBoardWithShieldsDown--;
+ if (_awayMission->veng.counterUntilElasiBoardWithShieldsDown == 0 && _awayMission->veng.poweredSystem != 2) {
+ vengaElasiBeamOver();
+ return;
+ }
+ }
+
+ if (_awayMission->veng.counterUntilElasiAttack != 0) {
+ _awayMission->veng.counterUntilElasiAttack--;
+ if (_awayMission->veng.counterUntilElasiAttack == 0 && !_awayMission->veng.toldElasiToBeamOver) {
+ // BUG: Message should say that they destroyed the ship, since shields are
+ // probably up right now...
+ vengaElasiBeamOver();
+ return;
+ }
+ }
+
+ if (_awayMission->veng.counterUntilElasiNagToDisableShields != 0) {
+ _awayMission->veng.counterUntilElasiNagToDisableShields--;
+ if (_awayMission->veng.counterUntilElasiNagToDisableShields == 0 && !_awayMission->veng.firedTorpedo) {
+ // Elasi tells you to lower your shields already.
+ // BUG: Should add a check to above condition that shields aren't down
+ // already?
+ showText(TX_SPEAKER_ELASI_CAPTAIN, TX_VEN2_098);
+ _awayMission->veng.counterUntilElasiDestroyShip = 2700;
+ }
+ }
+
+ if (_awayMission->veng.counterUntilElasiDestroyShip != 0) {
+ _awayMission->veng.counterUntilElasiDestroyShip--;
+ if (_awayMission->veng.counterUntilElasiDestroyShip == 0 && !_awayMission->veng.firedTorpedo) {
+ // Elasi fire torpedoes at you since you wouldn't lower your shields.
+ showText(TX_VENA_F40);
+ showGameOverMenu();
+ return;
+ }
+ }
+
+ if (_awayMission->veng.counterUntilElasiBoardWithInvitation != 0) {
+ _awayMission->veng.counterUntilElasiBoardWithInvitation--;
+ if (_awayMission->veng.counterUntilElasiBoardWithInvitation == 0 && !_awayMission->veng.firedTorpedo) {
+ vengaElasiBeamOver();
+ return;
+ }
+ }
+}
+
+void Room::vengaElasiBeamOver() {
+ showText(TX_VENA_F32);
+ showGameOverMenu();
+}
+
+void Room::vengaUsePhaserAnywhere() {
+ showText(TX_SPEAKER_SPOCK, TX_VENA_F34);
+}
+
+void Room::vengaLookAtHypo() {
+ if (_awayMission->veng.oilInHypo)
+ showText(TX_VEN4N007);
+ else
+ showText(TX_VEN4N010);
+}
+
+void Room::vengaUseCommunicator() {
+ // Use communicator in any room except VENG2
+ if (!_awayMission->veng.enterpriseLeftForDistressCall) {
+ showText(TX_SPEAKER_KIRK, TX_MUD4_018);
+ showText(TX_SPEAKER_UHURA, TX_BRIDU146);
+ } else if (!_awayMission->veng.elasiShipDecloaked) {
+ showText(TX_SPEAKER_KIRK, TX_MUD4_018);
+ showText(TX_SPEAKER_UHURA, TX_VEN2U093);
+ showText(TX_SPEAKER_KIRK, TX_VEN2_028);
+ } else
+ showText(TX_SPEAKER_SPOCK, TX_VEN2_066);
+}
+
void Room::vengaUseMccoyOnDeadGuy() {
int val = getRandomWordInRange(0, 5);