From 817e6f1ec16fdb37e648a128bc93ff65f62f948b Mon Sep 17 00:00:00 2001 From: Scott_NZ Date: Wed, 27 Feb 2013 17:57:53 +1300 Subject: [PATCH] Have Tanya not shoot her pistols at buildings, and have her shoot pistols at barrels instead of using C4 on them --- OpenRA.Mods.RA/C4Demolition.cs | 9 ++++++--- mods/cnc/rules/defaults.yaml | 2 ++ mods/d2k/rules/defaults.yaml | 3 ++- mods/ra/maps/allies-01/map.yaml | 2 +- mods/ra/maps/allies-02/map.yaml | 2 +- mods/ra/rules/civilian.yaml | 6 ++++++ mods/ra/rules/defaults.yaml | 2 ++ mods/ra/weapons.yaml | 4 ++-- 8 files changed, 22 insertions(+), 8 deletions(-) diff --git a/OpenRA.Mods.RA/C4Demolition.cs b/OpenRA.Mods.RA/C4Demolition.cs index 74a444a465..24c2e29483 100644 --- a/OpenRA.Mods.RA/C4Demolition.cs +++ b/OpenRA.Mods.RA/C4Demolition.cs @@ -10,8 +10,8 @@ using System.Collections.Generic; using System.Drawing; +using OpenRA.Effects; using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Move; using OpenRA.Mods.RA.Orders; using OpenRA.Traits; @@ -35,12 +35,12 @@ namespace OpenRA.Mods.RA public IEnumerable Orders { - get { yield return new UnitTraitOrderTargeter( "C4", 6, "c4", true, false ); } + get { yield return new UnitTraitOrderTargeter("C4", 6, "c4", true, false); } } public Order IssueOrder( Actor self, IOrderTargeter order, Target target, bool queued ) { - if( order.OrderID == "C4" ) + if (order.OrderID == "C4") return new Order("C4", self, queued) { TargetActor = target.Actor }; return null; @@ -65,4 +65,7 @@ namespace OpenRA.Mods.RA return (order.OrderString == "C4") ? "Attack" : null; } } + + class C4DemolishableInfo : TraitInfo { } + class C4Demolishable { } } diff --git a/mods/cnc/rules/defaults.yaml b/mods/cnc/rules/defaults.yaml index d92fb812af..45425a7fad 100644 --- a/mods/cnc/rules/defaults.yaml +++ b/mods/cnc/rules/defaults.yaml @@ -249,6 +249,7 @@ Sellable: Capturable: CapturableBar: + C4Demolishable: ^CivBuilding: Inherits: ^Building @@ -336,6 +337,7 @@ RelativeToTopLeft: yes AutoTargetIgnore: Sellable: + C4Demolishable: ^Tree: Tooltip: diff --git a/mods/d2k/rules/defaults.yaml b/mods/d2k/rules/defaults.yaml index 59861909bb..17715b1708 100644 --- a/mods/d2k/rules/defaults.yaml +++ b/mods/d2k/rules/defaults.yaml @@ -256,4 +256,5 @@ ProximityCaptor: Types:Building Sellable: - GivesBounty: \ No newline at end of file + GivesBounty: + C4Demolishable: \ No newline at end of file diff --git a/mods/ra/maps/allies-01/map.yaml b/mods/ra/maps/allies-01/map.yaml index d30a9406bf..3c66ce8b5c 100644 --- a/mods/ra/maps/allies-01/map.yaml +++ b/mods/ra/maps/allies-01/map.yaml @@ -359,7 +359,7 @@ Rules: Range: 0 E7: AutoTarget: - InitialStance: ReturnFire + InitialStance: Defend Passenger: Weight: 0 EINSTEIN: diff --git a/mods/ra/maps/allies-02/map.yaml b/mods/ra/maps/allies-02/map.yaml index efa6b44634..8099ac25f9 100644 --- a/mods/ra/maps/allies-02/map.yaml +++ b/mods/ra/maps/allies-02/map.yaml @@ -2875,7 +2875,7 @@ Rules: Damage: 0 E7: AutoTarget: - InitialStance: ReturnFire + InitialStance: Defend Passenger: Weight: 0 Buildable: diff --git a/mods/ra/rules/civilian.yaml b/mods/ra/rules/civilian.yaml index 6ce0cc9698..3afe7f176c 100644 --- a/mods/ra/rules/civilian.yaml +++ b/mods/ra/rules/civilian.yaml @@ -241,6 +241,9 @@ BARL: Tooltip: Name: Explosive Barrel AutoTargetIgnore: + Armor: + Type: Light + -C4Demolishable: BRL3: Inherits: ^TechBuilding @@ -253,6 +256,9 @@ BRL3: Tooltip: Name: Explosive Barrel AutoTargetIgnore: + Armor: + Type: Light + -C4Demolishable: MISS: Inherits: ^TechBuilding diff --git a/mods/ra/rules/defaults.yaml b/mods/ra/rules/defaults.yaml index 390cdd7ed2..1ace9e750c 100644 --- a/mods/ra/rules/defaults.yaml +++ b/mods/ra/rules/defaults.yaml @@ -217,6 +217,7 @@ AcceptsSupplies: GivesBounty: UpdatesPlayerStatistics: + C4Demolishable: ^Wall: AppearsOnRadar: @@ -250,6 +251,7 @@ Types:Wall Sellable: UpdatesPlayerStatistics: + C4Demolishable: ^TechBuilding: Inherits: ^Building diff --git a/mods/ra/weapons.yaml b/mods/ra/weapons.yaml index b67eec369e..d015aefda3 100644 --- a/mods/ra/weapons.yaml +++ b/mods/ra/weapons.yaml @@ -7,11 +7,11 @@ Colt45: Warhead: Spread: 1 Versus: - Wood: 5% + Wood: 0% Light: 5% Heavy: 5% Cybernetic: 5% - Concrete: 5% + Concrete: 0% Explosion: piff InfDeath: 2 Damage: 50