Merge pull request #2855 from Mailaender/greenpeace

Don't burn down the forest in Allies04...
This commit is contained in:
Matthias Mailänder
2013-03-26 15:45:14 -07:00
2 changed files with 42 additions and 38 deletions

View File

@@ -62,7 +62,7 @@ namespace OpenRA.Mods.RA.Missions
Player allies1; Player allies1;
Player allies2; Player allies2;
Player soviets; Player soviets;
Player neutral; Player creeps;
World world; World world;
List<Patrol> patrols; List<Patrol> patrols;
@@ -152,7 +152,7 @@ namespace OpenRA.Mods.RA.Missions
{ {
foreach (var attacker in townAttackers.Where(u => u.IsIdle && !u.IsDead() && u.IsInWorld)) foreach (var attacker in townAttackers.Where(u => u.IsIdle && !u.IsDead() && u.IsInWorld))
{ {
var enemies = world.Actors.Where(u => u.Owner == neutral && u.HasTrait<ITargetable>() var enemies = world.Actors.Where(u => u.Owner == creeps && u.HasTrait<ITargetable>()
&& ((u.HasTrait<Building>() && !u.HasTrait<Wall>() && !u.HasTrait<Bridge>()) || u.HasTrait<Mobile>()) && !u.IsDead() && u.IsInWorld); && ((u.HasTrait<Building>() && !u.HasTrait<Wall>() && !u.HasTrait<Bridge>()) || u.HasTrait<Mobile>()) && !u.IsDead() && u.IsInWorld);
var enemy = enemies.OrderBy(u => (attacker.CenterLocation - u.CenterLocation).LengthSquared).FirstOrDefault(); var enemy = enemies.OrderBy(u => (attacker.CenterLocation - u.CenterLocation).LengthSquared).FirstOrDefault();
@@ -196,7 +196,7 @@ namespace OpenRA.Mods.RA.Missions
} }
if (world.FrameNumber == nextCivilianMove) if (world.FrameNumber == nextCivilianMove)
{ {
var civilians = world.Actors.Where(a => !a.IsDead() && a.IsInWorld && a.Owner == neutral && a.HasTrait<Mobile>()); var civilians = world.Actors.Where(a => !a.IsDead() && a.IsInWorld && a.Owner == creeps && a.HasTrait<Mobile>());
if (civilians.Any()) if (civilians.Any())
{ {
var civilian = civilians.Random(world.SharedRandom); var civilian = civilians.Random(world.SharedRandom);
@@ -361,7 +361,7 @@ namespace OpenRA.Mods.RA.Missions
allies2.PlayerActor.Trait<PlayerResources>().Cash = 0; allies2.PlayerActor.Trait<PlayerResources>().Cash = 0;
soviets = w.Players.Single(p => p.InternalName == "Soviets"); soviets = w.Players.Single(p => p.InternalName == "Soviets");
neutral = w.Players.Single(p => p.InternalName == "Neutral"); creeps = w.Players.Single(p => p.InternalName == "Creeps");
objectives[InfiltrateID].Text = Infiltrate.F(allies1 != allies2 ? "spies" : "spy"); objectives[InfiltrateID].Text = Infiltrate.F(allies1 != allies2 ? "spies" : "spy");
destroyBaseTicks = difficulty == "Hard" ? 1500 * 25 : difficulty == "Normal" ? 1500 * 28 : 1500 * 31; destroyBaseTicks = difficulty == "Hard" ? 1500 * 25 : difficulty == "Normal" ? 1500 * 28 : 1500 * 31;

View File

@@ -28,6 +28,10 @@ Players:
OwnsWorld: True OwnsWorld: True
NonCombatant: True NonCombatant: True
Race: allies Race: allies
PlayerReference@Creeps:
Name: Creeps
NonCombatant: True
Race: allies
Enemies: Soviets Enemies: Soviets
PlayerReference@Allies1: PlayerReference@Allies1:
Name: Allies1 Name: Allies1
@@ -63,21 +67,21 @@ Players:
Name: Soviets Name: Soviets
Race: soviet Race: soviet
ColorRamp: 3,255,127,28 ColorRamp: 3,255,127,28
Enemies: Allies1,Allies2,Allies,Neutral Enemies: Allies1,Allies2,Allies,Creeps
Actors: Actors:
Actor2: v07 Actor2: v07
Location: 58,83 Location: 58,83
Owner: Neutral Owner: Creeps
Actor1: v05 Actor1: v05
Location: 54,89 Location: 54,89
Owner: Neutral Owner: Creeps
Actor56: t01 Actor56: t01
Location: 68,97 Location: 68,97
Owner: Neutral Owner: Neutral
Actor5: v03 Actor5: v03
Location: 66,84 Location: 66,84
Owner: Neutral Owner: Creeps
Actor25: t16 Actor25: t16
Location: 69,64 Location: 69,64
Owner: Neutral Owner: Neutral
@@ -104,10 +108,10 @@ Actors:
Owner: Neutral Owner: Neutral
Actor8: v07 Actor8: v07
Location: 66,95 Location: 66,95
Owner: Neutral Owner: Creeps
Actor0: v04 Actor0: v04
Location: 58,90 Location: 58,90
Owner: Neutral Owner: Creeps
Actor41: t12 Actor41: t12
Location: 73,69 Location: 73,69
Owner: Neutral Owner: Neutral
@@ -116,10 +120,10 @@ Actors:
Owner: Neutral Owner: Neutral
Actor47: v01 Actor47: v01
Location: 70,84 Location: 70,84
Owner: Neutral Owner: Creeps
Actor10: v02 Actor10: v02
Location: 73,90 Location: 73,90
Owner: Neutral Owner: Creeps
Actor236: sbag Actor236: sbag
Location: 66,36 Location: 66,36
Owner: Soviets Owner: Soviets
@@ -170,7 +174,7 @@ Actors:
Owner: Neutral Owner: Neutral
Actor9: v01 Actor9: v01
Location: 64,94 Location: 64,94
Owner: Neutral Owner: Creeps
Actor53: powr Actor53: powr
Location: 86,65 Location: 86,65
Owner: Soviets Owner: Soviets
@@ -482,7 +486,7 @@ Actors:
Owner: Soviets Owner: Soviets
Actor297: v08 Actor297: v08
Location: 68,95 Location: 68,95
Owner: Neutral Owner: Creeps
Actor142: fenc Actor142: fenc
Location: 91,16 Location: 91,16
Owner: Soviets Owner: Soviets
@@ -986,13 +990,13 @@ Actors:
Owner: Soviets Owner: Soviets
Actor114: c1 Actor114: c1
Location: 69,84 Location: 69,84
Owner: Neutral Owner: Creeps
Actor217: c3 Actor217: c3
Location: 63,96 Location: 63,96
Owner: Neutral Owner: Creeps
Actor54: c1 Actor54: c1
Location: 67,99 Location: 67,99
Owner: Neutral Owner: Creeps
Actor302: tsla Actor302: tsla
Location: 103,34 Location: 103,34
Owner: Soviets Owner: Soviets
@@ -1061,19 +1065,19 @@ Actors:
Owner: Soviets Owner: Soviets
Actor340: v09 Actor340: v09
Location: 72,86 Location: 72,86
Owner: Neutral Owner: Creeps
Actor339: e1 Actor339: e1
Location: 21,35 Location: 21,35
Owner: Soviets Owner: Soviets
Actor342: v05 Actor342: v05
Location: 68,88 Location: 68,88
Owner: Neutral Owner: Creeps
Actor341: e1 Actor341: e1
Location: 24,27 Location: 24,27
Owner: Soviets Owner: Soviets
Actor344: v08 Actor344: v08
Location: 65,99 Location: 65,99
Owner: Neutral Owner: Creeps
Actor345: v16 Actor345: v16
Location: 59,97 Location: 59,97
Owner: Neutral Owner: Neutral
@@ -1085,7 +1089,7 @@ Actors:
Owner: Neutral Owner: Neutral
Actor348: v06 Actor348: v06
Location: 60,96 Location: 60,96
Owner: Neutral Owner: Creeps
Actor349: v14 Actor349: v14
Location: 66,83 Location: 66,83
Owner: Neutral Owner: Neutral
@@ -1133,7 +1137,7 @@ Actors:
Owner: Neutral Owner: Neutral
Actor273: v10 Actor273: v10
Location: 58,86 Location: 58,86
Owner: Neutral Owner: Creeps
Actor343: e1 Actor343: e1
Location: 28,49 Location: 28,49
Owner: Soviets Owner: Soviets
@@ -1486,7 +1490,7 @@ Actors:
Owner: Neutral Owner: Neutral
Actor115: c2 Actor115: c2
Location: 56,89 Location: 56,89
Owner: Neutral Owner: Creeps
Actor459: e1 Actor459: e1
Location: 79,102 Location: 79,102
Owner: Soviets Owner: Soviets
@@ -1574,28 +1578,28 @@ Actors:
Owner: Soviets Owner: Soviets
Actor313: c3 Actor313: c3
Location: 65,86 Location: 65,86
Owner: Neutral Owner: Creeps
Actor314: c4 Actor314: c4
Location: 72,91 Location: 72,91
Owner: Neutral Owner: Creeps
Actor315: c4 Actor315: c4
Location: 58,92 Location: 58,92
Owner: Neutral Owner: Creeps
Actor458: c8 Actor458: c8
Location: 68,94 Location: 68,94
Owner: Neutral Owner: Creeps
Actor476: c9 Actor476: c9
Location: 59,98 Location: 59,98
Owner: Neutral Owner: Creeps
Actor477: c10 Actor477: c10
Location: 57,82 Location: 57,82
Owner: Neutral Owner: Creeps
Actor478: c7 Actor478: c7
Location: 69,89 Location: 69,89
Owner: Neutral Owner: Creeps
Actor479: c6 Actor479: c6
Location: 73,89 Location: 73,89
Owner: Neutral Owner: Creeps
Actor150: silo Actor150: silo
Location: 109,31 Location: 109,31
Owner: Soviets Owner: Soviets
@@ -1715,7 +1719,7 @@ Actors:
Owner: Neutral Owner: Neutral
Actor143: v11 Actor143: v11
Location: 72,95 Location: 72,95
Owner: Neutral Owner: Creeps
Actor517: wood Actor517: wood
Location: 64,100 Location: 64,100
Owner: Neutral Owner: Neutral
@@ -1760,22 +1764,22 @@ Actors:
Owner: Soviets Owner: Soviets
Actor92: hosp Actor92: hosp
Location: 57,78 Location: 57,78
Owner: Neutral Owner: Creeps
Actor523: v02 Actor523: v02
Location: 56,87 Location: 56,87
Owner: Neutral Owner: Creeps
Actor524: v03 Actor524: v03
Location: 60,90 Location: 60,90
Owner: Neutral Owner: Creeps
Actor525: c1 Actor525: c1
Location: 55,90 Location: 55,90
Owner: Neutral Owner: Creeps
Actor526: c9 Actor526: c9
Location: 60,94 Location: 60,94
Owner: Neutral Owner: Creeps
Actor527: v11 Actor527: v11
Location: 59,94 Location: 59,94
Owner: Neutral Owner: Creeps
Actor528: brl3 Actor528: brl3
Location: 60,95 Location: 60,95
Owner: Neutral Owner: Neutral