-
Notifications
You must be signed in to change notification settings - Fork 12
/
DXRMissionsM02.uc
336 lines (290 loc) · 18.1 KB
/
DXRMissionsM02.uc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
class DXRMissionsM02 extends DXRMissions;
function int InitGoals(int mission, string map)
{
local int goal, loc, loc2, shanty_start, jock_sewer, generator_sewer, generator_alley;
switch(map) {
case "02_NYC_BATTERYPARK":
goal = AddGoal("02_NYC_BATTERYPARK", "Ambrosia", NORMAL_GOAL, 'BarrelAmbrosia0', PHYS_Falling);
AddGoalActor(goal, 1, 'SkillAwardTrigger0', PHYS_None);
AddGoalActor(goal, 2, 'GoalCompleteTrigger0', PHYS_None);
AddGoalActor(goal, 3, 'FlagTrigger1', PHYS_None); //Sets AmbrosiaTagged
AddGoalActor(goal, 4, 'DataLinkTrigger1', PHYS_None);
AddGoalLocation("02_NYC_BATTERYPARK", "Dock", START_LOCATION | VANILLA_START, vect(-619.571289, -3679.116455, 255.099762), rot(0, 29856, 0));
shanty_start = AddGoalLocation("02_NYC_BATTERYPARK", "Shanty Town", NORMAL_GOAL | START_LOCATION, vect(-2970,1840,348), rot(0, 0, 0));
loc = AddGoalLocation("02_NYC_BATTERYPARK", "Ambrosia Vanilla", NORMAL_GOAL | VANILLA_GOAL | START_LOCATION, vect(507.282898, -1066.344604, -403.132751), rot(0, 16536, 0));
AddActorLocation(loc, PLAYER_LOCATION, vect(81.434570, -1123.060547, -384.397644), rot(0, 8000, 0));
AddGoalLocation("02_NYC_BATTERYPARK", "In the command room", NORMAL_GOAL, vect(650.060547, -989.234863, -160.095200), rot(0, 0, 0));
AddGoalLocation("02_NYC_BATTERYPARK", "Behind the cargo", NORMAL_GOAL, vect(58.725319, -446.887207, -405.899323), rot(0, 0, 0));
AddGoalLocation("02_NYC_BATTERYPARK", "By the desk", NORMAL_GOAL, vect(-615.152161, -665.281738, -397.581146), rot(0, 0, 0));
AddGoalLocation("02_NYC_BATTERYPARK", "Walkway by the water", NORMAL_GOAL, vect(-420.000000, -2222.000000, -400), rot(0, 0, 0));
loc = AddGoalLocation("02_NYC_BATTERYPARK", "Subway stairs", NORMAL_GOAL, vect(-5106.205078, 1813.453003, -82.239639), rot(0, 0, 0));
AddMutualExclusion(loc, shanty_start);// don't put ambrosia in the subway if you start right there in the shanty town, too easy
loc = AddGoalLocation("02_NYC_BATTERYPARK", "Subway", NORMAL_GOAL, vect(-4727.703613, 3116.336670, -321.900604), rot(0, 0, 0));
AddMutualExclusion(loc, shanty_start);// don't put ambrosia in the subway if you start right there in the shanty town, too easy
if (dxr.flags.settings.starting_map > 20)
{
skip_rando_start = True;
}
return 21;
case "02_NYC_WAREHOUSE":
// NORMAL_GOAL is Jock, GOAL_TYPE1 is the generator, GOAL_TYPE2 is the computers
AddGoal("02_NYC_WAREHOUSE", "Jock", NORMAL_GOAL, 'BlackHelicopter1', PHYS_None);
AddGoalLocation("02_NYC_WAREHOUSE", "Vanilla Jock", NORMAL_GOAL | VANILLA_GOAL, vect(-222.402451,-294.757233,1132.798828), rot(0,-24128,0));
AddGoalLocation("02_NYC_WAREHOUSE", "Holy Smokes", NORMAL_GOAL, vect(-566.249695, 305.599731, 1207.798462), rot(0, -32800, 0));
AddGoalLocation("02_NYC_WAREHOUSE", "Back Door", NORMAL_GOAL, vect(1656.467041, -1658.624268, 357.798462), rot(0, -32800, 0));
AddGoalLocation("02_NYC_WAREHOUSE", "Dumpster", NORMAL_GOAL, vect(1665.240112, 91.544250, 126.798462), rot(0, 0, 0));
jock_sewer = AddGoalLocation("02_NYC_WAREHOUSE", "Sewer", NORMAL_GOAL, vect(-1508.833008, 360, -216.201538), rot(0, 16400, 0));
goal = AddGoal("02_NYC_WAREHOUSE", "Generator", GOAL_TYPE1, 'BreakableWall2', PHYS_MovingBrush);
AddGoalActor(goal, 1, 'CrateExplosiveSmall0', PHYS_None);
AddGoalActor(goal, 2, 'CrateExplosiveSmall6', PHYS_None);
AddGoalActor(goal, 3, 'AmbientSoundTriggered0', PHYS_None);
AddGoalActor(goal, 4, 'AmbientSoundTriggered1', PHYS_None);
AddGoalLocation("02_NYC_WAREHOUSE", "Warehouse", GOAL_TYPE1 | VANILLA_GOAL, vect(575,-608,122), rot(32768, -16384, 0));
generator_alley = AddGoalLocation("02_NYC_WAREHOUSE", "Alley", GOAL_TYPE1, vect(-550, 1700, 110), rot(0,32768,-16384));
AddMutualExclusion(generator_alley, jock_sewer);// too easy
AddGoalLocation("02_NYC_WAREHOUSE", "Apartment", GOAL_TYPE1, vect(460,1130,1000), rot(0,32768,-16384));
AddGoalLocation("02_NYC_WAREHOUSE", "Basement", GOAL_TYPE1, vect(300,-480,-125), rot(0,-16384,-16384));
generator_sewer = AddGoalLocation("02_NYC_WAREHOUSE", "Sewer", GOAL_TYPE1, vect(-1695,784,-210), rot(32768,-32768,0));
AddMutualExclusion(generator_sewer, jock_sewer);// can't put Jock and the generator both in the sewers
//This location works now (with the rework), but we can wait on enabling it until we feel like we want to ruin runs
//AddGoalLocation("02_NYC_WAREHOUSE", "3rd Floor", GOAL_TYPE1, vect(1340, -700, 575), rot(32768, 0, 32768)); //Near the ramp
//AddGoalLocation("02_NYC_WAREHOUSE", "4th Floor", GOAL_TYPE1, vect(390,-660,832), rot(32768,0,0)); //Among the boxes
AddMutualExclusion(generator_sewer, jock_sewer);// can't put Jock and the generator both in the sewers
AddGoal("02_NYC_WAREHOUSE", "Generator Computer", GOAL_TYPE2, 'ComputerPersonal5', PHYS_Falling);
AddGoal("02_NYC_WAREHOUSE", "Email Computer", GOAL_TYPE2, 'ComputerPersonal0', PHYS_Falling);
AddGoalLocation("02_NYC_WAREHOUSE", "Warehouse Computer Room", GOAL_TYPE2 | VANILLA_GOAL, vect(1277.341797, -864.810913, 311.500397), rot(0, 16712, 0));
AddGoalLocation("02_NYC_WAREHOUSE", "Basement", GOAL_TYPE2 | VANILLA_GOAL, vect(1002.848999, -897.071167, -136.499573), rot(0, -17064, 0));
AddGoalLocation("02_NYC_WAREHOUSE", "Break room", GOAL_TYPE2, vect(1484.731934, -917.463257, 73.499916), rot(0,-16384,0));
AddGoalLocation("02_NYC_WAREHOUSE", "Apartment", GOAL_TYPE2, vect(-239.501144, 1441.699951, 1151.502930), rot(0,0,0));
AddGoalLocation("02_NYC_WAREHOUSE", "Holy Smokes", GOAL_TYPE2, vect(-846.480957, 919.700012, 1475.486938), rot(0,32768,0));
return 22;
}
return mission+1000;
}
function int InitGoalsRev(int mission, string map)
{
local int goal, loc, loc2, vents_start, jock_sewer, generator_sewer, generator_alley;;
switch(map) {
case "02_NYC_BATTERYPARK":
goal = AddGoal("02_NYC_BATTERYPARK", "Ambrosia", NORMAL_GOAL, 'BarrelAmbrosia0', PHYS_Falling);
AddGoalActor(goal, 1, 'SkillAwardTrigger0', PHYS_None);
AddGoalActor(goal, 2, 'GoalCompleteTrigger0', PHYS_None);
AddGoalActor(goal, 3, 'FlagTrigger1', PHYS_None); //Sets AmbrosiaTagged
AddGoalActor(goal, 4, 'DataLinkTrigger15', PHYS_None);
AddGoalLocation("02_NYC_BATTERYPARK", "Dock", START_LOCATION | VANILLA_START, vect(-619.571289, -3679.116455, 255.099762), rot(0, 29856, 0));
vents_start = AddGoalLocation("02_NYC_BATTERYPARK", "Ventilation system", NORMAL_GOAL | START_LOCATION, vect(-4310.507813, 2237.952637, 189.843536), rot(0, 0, 0));
loc = AddGoalLocation("02_NYC_BATTERYPARK", "Ambrosia Vanilla", NORMAL_GOAL | VANILLA_GOAL | START_LOCATION, vect(507.282898, -1066.344604, -403.132751), rot(0, 16536, 0));
AddActorLocation(loc, PLAYER_LOCATION, vect(81.434570, -1123.060547, -384.397644), rot(0, 8000, 0));
AddGoalLocation("02_NYC_BATTERYPARK", "In the command room", NORMAL_GOAL, vect(650.060547, -989.234863, -160.095200), rot(0, 0, 0));
AddGoalLocation("02_NYC_BATTERYPARK", "Behind the cargo", NORMAL_GOAL, vect(185,-30,-405), rot(0, 32768, 0));
AddGoalLocation("02_NYC_BATTERYPARK", "By the desk", NORMAL_GOAL, vect(-615.152161, -665.281738, -397.581146), rot(0, 0, 0));
AddGoalLocation("02_NYC_BATTERYPARK", "Walkway by the water", NORMAL_GOAL, vect(-420.000000, -2222.000000, -400), rot(0, 0, 0));
loc = AddGoalLocation("02_NYC_BATTERYPARK", "Subway stairs", NORMAL_GOAL, vect(-5106.205078, 1813.453003, -82.239639), rot(0, 0, 0));
AddMutualExclusion(loc, vents_start);// don't put ambrosia in the subway if you start right there in the vents, too easy
loc = AddGoalLocation("02_NYC_BATTERYPARK", "Subway", NORMAL_GOAL, vect(-4727.703613, 3116.336670, -321.900604), rot(0, 0, 0));
AddMutualExclusion(loc, vents_start);// don't put ambrosia in the subway if you start right there in the vents, too easy
if (dxr.flags.settings.starting_map > 20)
{
skip_rando_start = True;
}
return 21;
case "02_NYC_WAREHOUSE":
// NORMAL_GOAL is Jock, GOAL_TYPE1 is the generator, GOAL_TYPE2 is the computers
AddGoal("02_NYC_WAREHOUSE", "Jock", NORMAL_GOAL, 'JockHelicopter0', PHYS_None);
AddGoalLocation("02_NYC_WAREHOUSE", "Vanilla Jock", NORMAL_GOAL | VANILLA_GOAL, vect(-222.402451,-294.757233,1132.798828), rot(0,-24128,0));
AddGoalLocation("02_NYC_WAREHOUSE", "Holy Smokes", NORMAL_GOAL, vect(-566.249695, 305.599731, 1207.798462), rot(0, -32800, 0));
AddGoalLocation("02_NYC_WAREHOUSE", "Back Door", NORMAL_GOAL, vect(1656.467041, -1658.624268, 357.798462), rot(0, -32800, 0));
AddGoalLocation("02_NYC_WAREHOUSE", "Dumpster", NORMAL_GOAL, vect(1665.240112, 91.544250, 126.798462), rot(0, 0, 0));
jock_sewer = AddGoalLocation("02_NYC_WAREHOUSE", "Sewer", NORMAL_GOAL, vect(-1508.833008, 360, -216.201538), rot(0, 16400, 0));
goal = AddGoal("02_NYC_WAREHOUSE", "Generator", GOAL_TYPE1, 'BreakableWall2', PHYS_MovingBrush);
AddGoalActor(goal, 1, 'CrateExplosiveSmall0', PHYS_None);
AddGoalActor(goal, 2, 'CrateExplosiveSmall6', PHYS_None);
AddGoalLocation("02_NYC_WAREHOUSE", "Warehouse", GOAL_TYPE1 | VANILLA_GOAL, vect(448,-560,224), rot(32768, -16384, 0));
generator_alley = AddGoalLocation("02_NYC_WAREHOUSE", "Alley", GOAL_TYPE1, vect(-544,1664,16), rot(0,32768,-16384));
AddMutualExclusion(generator_alley, jock_sewer);// too easy
AddGoalLocation("02_NYC_WAREHOUSE", "Apartment", GOAL_TYPE1, vect(304,1184,880), rot(0,32768,-16384));
AddGoalLocation("02_NYC_WAREHOUSE", "Basement", GOAL_TYPE1, vect(414.272583,-519.35,-272), rot(0,-16384,-16384));
generator_sewer = AddGoalLocation("02_NYC_WAREHOUSE", "Sewer", GOAL_TYPE1, vect(-1712,912,-112), rot(32768,-32768,0));
AddMutualExclusion(generator_sewer, jock_sewer);// can't put Jock and the generator both in the sewers
// pawns run into these and break them
//AddGoalLocation("02_NYC_WAREHOUSE", "3rd Floor", GOAL_TYPE1, vect(1360.000000, -512.000000, 528.000000), rot(32768, -16384, 0));
//AddGoalLocation("02_NYC_WAREHOUSE", "3rd Floor Corner", GOAL_TYPE1, vect(1600, -1136.000000, 540), rot(32768, 16384, 0));
AddGoal("02_NYC_WAREHOUSE", "Generator Computer", GOAL_TYPE2, 'ComputerPersonal5', PHYS_Falling);
AddGoal("02_NYC_WAREHOUSE", "Email Computer", GOAL_TYPE2, 'ComputerPersonal0', PHYS_Falling);
AddGoalLocation("02_NYC_WAREHOUSE", "Warehouse Computer Room", GOAL_TYPE2 | VANILLA_GOAL, vect(1277.341797, -864.810913, 311.500397), rot(0, 16712, 0));
AddGoalLocation("02_NYC_WAREHOUSE", "Basement", GOAL_TYPE2 | VANILLA_GOAL, vect(1002.848999, -897.071167, -136.499573), rot(0, -17064, 0));
AddGoalLocation("02_NYC_WAREHOUSE", "Break room", GOAL_TYPE2, vect(1484.731934, -917.463257, 73.499916), rot(0,-16384,0));
AddGoalLocation("02_NYC_WAREHOUSE", "Apartment", GOAL_TYPE2, vect(-239.501144, 1441.699951, 1151.502930), rot(0,0,0));
AddGoalLocation("02_NYC_WAREHOUSE", "Holy Smokes", GOAL_TYPE2, vect(-846.480957, 919.700012, 1475.486938), rot(0,32768,0));
return 22;
}
return mission+1000;
}
function ReplaceBatteryParkSubwayTNT()
{
local CrateExplosiveSmall tnt;
local #var(prefix)Barrel1 barrel;
local class<#var(prefix)Barrel1> barrelclass;
local bool destroyTNT;
local int choice;
#ifdef injections
barrelclass = class'Barrel1';
#else
barrelclass = class'DXRBarrel1';
#endif
//The front crates have their tag set to ExplosiveCrate.
//Since we're changing their types, they should all be set off
choice = rng(8);
foreach AllActors(class'CrateExplosiveSmall',tnt){
destroyTNT = True;
barrel = None;
switch(choice){
case 0:
case 1:
//Keep TNT crate - 300 explosion damage
destroyTNT=False;
tnt.bIsSecretGoal=True;
tnt.Tag='ExplosiveCrate';
break;
case 2:
//Explosive barrel - 400 explosion damage
barrel = Spawn(barrelclass,,,tnt.Location);
barrel.SkinColor=SC_Explosive;
break;
case 3:
//Flammable Solid barrel - 200 explosion damage
barrel = Spawn(barrelclass,,,tnt.Location);
barrel.SkinColor=SC_FlammableSolid;
break;
case 4:
case 5:
//Poison Barrel
barrel = Spawn(barrelclass,,,tnt.Location);
barrel.SkinColor=SC_Poison;
break;
case 6:
case 7:
//Biohazard Barrel
barrel = Spawn(barrelclass,,,tnt.Location);
barrel.SkinColor=SC_Biohazard;
break;
}
if (barrel!=None){
barrel.bIsSecretGoal=True;
barrel.BeginPlay();
barrel.Tag='ExplosiveCrate';
}
if(destroyTNT){
tnt.destroy();
}
}
}
function PreFirstEntryMapFixes()
{
local #var(prefix)AnnaNavarre anna;
local #var(prefix)InterpolateTrigger it;
local #var(DeusExPrefix)Mover dxm;
local bool RevisionMaps;
RevisionMaps = class'DXRMapVariants'.static.IsRevisionMaps(player());
if( dxr.localURL == "02_NYC_BATTERYPARK" ) {
foreach AllActors(class'#var(prefix)AnnaNavarre', anna) {
anna.SetOrders('Standing');
anna.SetLocation( vectm(1082.845703, 1807.538818, 335.101776) );
anna.SetRotation( rotm(0, -16608, 0, 16384) );
anna.HomeLoc = anna.Location;
anna.HomeRot = vector(anna.Rotation);
}
ReplaceBatteryParkSubwayTNT();
}
if (RevisionMaps && dxr.localURL=="02_NYC_WAREHOUSE"){
foreach AllActors(class'#var(prefix)InterpolateTrigger',it,'FlyInTrigger'){
it.Destroy();
}
}
if(dxr.localURL=="02_NYC_WAREHOUSE") {
ConsoleCommand("set #var(prefix)AmbientSoundTriggered bstatic false");// HACK? maybe better than creating a new subclass for DynamicSoundTriggered and then doing replacements
if (!RevisionMaps){
foreach AllActors(class'#var(DeusExPrefix)Mover',dxm,'Generator'){
dxm.SetCollision(false,false,false);
RemoveMoverPrePivot(dxm);
dxm.PrePivot=vect(-80,0,-50); //This is intentionally not a vectm
dxm.BasePos=dxm.BasePos+dxm.PrePivot;
dxm.SetLocation(dxm.BasePos);
dxm.SetCollision(true,true,true);
}
}
}
}
function AnyEntry()
{
Super.AnyEntry();
switch(dxr.localURL) {
case "02_NYC_BATTERYPARK":
UpdateGoalWithRandoInfo('FindAmbrosia', "The Ambrosia could be anywhere in Battery Park.");
break;
case "02_NYC_STREET":
UpdateGoalWithRandoInfo('DestroyGenerator', "The generator could be anywhere in the warehouse district. It looks like a large yellow cylinder.");
break;
}
}
function AfterMoveGoalToLocation(Goal g, GoalLocation Loc)
{
local Actor a;
local #var(DeusExPrefix)Mover m;
local #var(prefix)ComputerPersonal cp;
local DXRPasswords passwords;
local int i,rad,height;
local bool RevisionMaps;
RevisionMaps = class'DXRMapVariants'.static.IsRevisionMaps(player());
if (g.name=="Generator"){
if (!RevisionMaps){
if (Loc.Name=="Warehouse" || Loc.Name=="Sewer" || Loc.Name=="3rd Floor" || Loc.Name=="4th Floor"){ //These ones lie horizontal
rad=175;
height=100;
} else { //The rest stand upright
rad=120;
height=131;
}
class'DXRHoverHint'.static.Create(self, "NSF Generator", g.actors[0].a.Location, rad, height, g.actors[0].a);
a = Spawn(class'DynamicBlockMonsters',,, g.actors[0].a.Location);
a.SetBase(g.actors[0].a);
a.SetCollisionSize(rad, height);
} else {
class'DXRHoverHint'.static.Create(self, "NSF Generator", g.actors[0].a.Location, 175, 140, g.actors[0].a);
}
for(i=0; i<ArrayCount(g.actors); i++) {
if( AmbientSoundTriggered(g.actors[i].a) != None) {
AmbientSoundTriggered(g.actors[i].a).SoundRadius = 1600;
}
}
}
if(g.name == "Generator" && Loc.name != "Warehouse") {
a = AddBox(class'#var(prefix)CrateUnbreakableLarge', vectm(505.710449, -605, 162.091278), rotm(16384,0,0, GetRotationOffset(class'#var(prefix)CrateUnbreakableLarge')));
a.SetCollisionSize(a.CollisionRadius * 4, a.CollisionHeight * 4);
a.bMovable = false;
a.DrawScale = 4;
class'DXRHoverHint'.static.Create(self, "This is not the generator", a.Location, a.CollisionRadius+5, a.CollisionHeight+5);
a = AddBox(class'#var(prefix)CrateUnbreakableLarge', vectm(677.174988, -809.484558, 114.097824), rotm(0,0,0, GetRotationOffset(class'#var(prefix)CrateUnbreakableLarge')));
a.SetCollisionSize(a.CollisionRadius * 2, a.CollisionHeight * 2);
a.bMovable = false;
a.DrawScale = 2;
foreach AllActors(class'#var(DeusExPrefix)Mover', m, 'Debris') {
m.Tag = '';
m.Event = '';
}
passwords = DXRPasswords(dxr.FindModule(class'DXRPasswords'));
if(passwords != None && Loc.name != "UC") {
passwords.ReplacePassword("defend the generator in the Warehouse,", "defend the generator in the "$Loc.name$",");
}
}
else if(g.name == "Generator Computer" && Loc.name != "Warehouse Computer Room") {
passwords = DXRPasswords(dxr.FindModule(class'DXRPasswords'));
if(passwords != None && Loc.name != "UC") {
passwords.ReplacePassword("generator's computer in the Warehouse Computer Room.", "generator's computer in the "$Loc.name$".");
}
}
else if(dxr.localURL=="02_NYC_WAREHOUSE" && g.name=="Email Computer") {
cp = #var(prefix)ComputerPersonal(g.actors[0].a);
cp.TextPackage = "#var(package)";
}
}