Skip to content

Commit

Permalink
Merge remote-tracking branch 'darkademic/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Inq8 committed Feb 10, 2024
2 parents 30af1b0 + e3011df commit 5ec9708
Show file tree
Hide file tree
Showing 21 changed files with 73 additions and 44 deletions.
2 changes: 1 addition & 1 deletion OpenRA.Mods.CA/Activities/BallisticMissileFly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public override bool Tick(Actor self)
var move = sbm.FlyStep(sbm.Facing);

// Destruct so that Explodes will be called
if (d.HorizontalLengthSquared < move.HorizontalLengthSquared)
if (d.HorizontalLengthSquared < move.HorizontalLengthSquared || self.CenterPosition.Z <= 0)
{
Queue(new CallFunc(() => self.Kill(self)));
return true;
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.CA/Activities/CruiseMissileFly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public override bool Tick(Actor self)
var move = cm.FlyStep(cm.Facing);

// Destruct so that Explodes will be called
if (d.HorizontalLengthSquared < move.HorizontalLengthSquared)
if (d.HorizontalLengthSquared < move.HorizontalLengthSquared || currentPos.Z <= 0)
{
Queue(new CallFunc(() => self.Kill(self)));
return true;
Expand Down
7 changes: 6 additions & 1 deletion OpenRA.Mods.CA/Projectiles/RailgunCA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#endregion

using System.Collections.Generic;
using System.Linq;
using OpenRA.GameRules;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Graphics;
Expand Down Expand Up @@ -117,6 +118,7 @@ public class RailgunCA : IProjectile, ISync
readonly Animation hitanim;
public readonly Color BeamColor;
public readonly Color HelixColor;
readonly IEnumerable<int> rangeModifiers;

int ticks;
bool animationComplete;
Expand All @@ -142,6 +144,8 @@ public RailgunCA(ProjectileArgs args, RailgunCAInfo info, Color beamColor, Color
BeamColor = beamColor;
HelixColor = helixColor;

rangeModifiers = args.SourceActor.TraitsImplementing<IRangeModifier>().ToArray().Select(m => m.GetRangeModifier());

if (info.Inaccuracy.Length > 0)
{
var maxInaccuracyOffset = Util.GetProjectileInaccuracy(info.Inaccuracy.Length, info.InaccuracyType, args);
Expand All @@ -158,7 +162,8 @@ void CalculateVectors()
{
if (info.PassthroughToMaxRange && (info.PassthroughMinDistance.Length == 0 || (target - args.Source).Length >= info.PassthroughMinDistance.Length))
{
var speed = new WVec(0, -args.Weapon.Range.Length, 0);
var weaponRange = new WDist(Util.ApplyPercentageModifiers(args.Weapon.Range.Length, rangeModifiers));
var speed = new WVec(0, -weaponRange.Length, 0);

if (info.PassthroughParallelToMuzzleOffset)
{
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.CA/Traits/ChronoshiftableCA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class ChronoshiftableCAInfo : ConditionalTraitInfo
public readonly PlayerRelationship ReturnToAvoidDeathRelationships = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy;

[Desc("If ReturnToAvoidDeath is true the amount of HP restored on return.")]
public readonly int ReturnToAvoidDeathHealthPercent = 20;
public readonly int ReturnToAvoidDeathHealthPercent = 10;

[Desc("If ReturnToAvoidDeath is true, the actor to replace the normal husk with.")]
public readonly string ReturnToAvoidDeathHuskActor = "camera.dummy";
Expand Down
9 changes: 4 additions & 5 deletions OpenRA.Mods.CA/Traits/Render/LeavesTrailsCA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,10 @@ void ITick.Tick(Actor self)
{
var spawnCell = Info.SpawnAtLastPosition ? self.World.Map.CellContaining(cachedPosition) : self.World.Map.CellContaining(self.CenterPosition);

/* ---- removed for CA version for V3/ICBM
if (!self.World.Map.Contains(spawnCell))
return;
*/
var type = self.World.Map.GetTerrainInfo(spawnCell).Type;
// For CA shootable missiles, allow for cells not contained by map
var type = "Invalid";
if (self.World.Map.Contains(spawnCell))
type = self.World.Map.GetTerrainInfo(spawnCell).Type;

if (++offset >= Info.Offsets.Length)
offset = 0;
Expand Down
1 change: 1 addition & 0 deletions mods/ca/audio/notifications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ Speech:
AtomicBombReady: atmbombrdy1
AtomicShellsReady: atmshelrdy1
CarpetBombReady: carpetrdy1
ChaosBombsReady: chaosbombsrdy1
GeneticMutationBombReady: gmutrdy1

DropPodsAvailable: dpodrdy1
Expand Down
Binary file added mods/ca/bits/audio/r2_chaosbombsrdy1.aud
Binary file not shown.
Binary file added mods/ca/bits/audio/r_chaosbombsrdy1.aud
Binary file not shown.
6 changes: 6 additions & 0 deletions mods/ca/rules/ai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2401,6 +2401,8 @@ Player:
cv: 4
jjet: 8
bjet: 8
v3rl: 3
thwk: 3
kiro: 3
disc: 3
deva: 3
Expand Down Expand Up @@ -2642,6 +2644,8 @@ Player:
cv: 4
jjet: 8
bjet: 8
v3rl: 2
thwk: 2
kiro: 2
disc: 2
deva: 2
Expand Down Expand Up @@ -2883,6 +2887,8 @@ Player:
cv: 4
jjet: 8
bjet: 8
v3rl: 1
thwk: 1
kiro: 1
disc: 1
deva: 1
Expand Down
3 changes: 3 additions & 0 deletions mods/ca/rules/aircraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ P51:
TRAN:
Inherits: ^Helicopter
Inherits@TRANSPORT: ^Transport
Inherits@SELECTION: ^SelectableSupportUnit
RenderSprites:
Image: tran3
Buildable:
Expand Down Expand Up @@ -841,6 +842,7 @@ NHAW:
Inherits: ^Helicopter
Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
Inherits@TRANSPORT: ^Transport
Inherits@SELECTION: ^SelectableSupportUnit
RenderSprites:
Image: nhaw
Buildable:
Expand Down Expand Up @@ -2621,6 +2623,7 @@ KIRO:

OCAR:
Inherits: ^HelicopterTD
Inherits@SELECTION: ^SelectableSupportUnit
RenderSprites:
Image: orcaca
Valued:
Expand Down
16 changes: 16 additions & 0 deletions mods/ca/rules/custom/two-tone-nod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,19 @@ TRAN:
SCRN:
RenderSprites:
PlayerPalette: playertd

BEAG:
RenderSprites:
PlayerPalette: player-twotonenod

KAMV:
RenderSprites:
PlayerPalette: player-twotonenod

RECK:
RenderSprites:
PlayerPalette: player-twotonenod

3TNK.RHINO:
RenderSprites:
PlayerPalette: player-twotonenod
6 changes: 3 additions & 3 deletions mods/ca/rules/powers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@
Description: \nCalls in a Badger bomber which drops parachuted\n chaos bombs on your target.
SelectTargetSpeechNotification: SelectTarget
SelectTargetTextNotification: Select target.
EndChargeSpeechNotification: ParabombsReady
EndChargeSpeechNotification: ChaosBombsReady
EndChargeTextNotification: Chaos bombs ready.
CameraActor: camera.paradrop
CameraRemoveDelay: 150
Expand Down Expand Up @@ -1722,9 +1722,9 @@
Icon: fleetrecall
IconPalette: chromes
ChargeInterval: 5250
Name: Recall
Name: Fleet Recall
KeepFormation: true
Description: ok
Description: \nRecalls all selected Scrin fleet vessels back\n to the Signal Transmitter.\n\nApplies to: Mothership, Planetary Assault Carrier, Devastator
SelectTargetSpeechNotification: SelectTarget
SelectTargetTextNotification: Select target.
InsufficientPowerSpeechNotification: InsufficientPower
Expand Down
4 changes: 1 addition & 3 deletions mods/ca/rules/scrin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2156,7 +2156,6 @@ STMR:
Inherits@HULLREGEN: ^HullRegen
Inherits@SHIELDS: ^ScrinShields
Inherits@SCRINVEHICLEVOICE: ^ScrinVehicleVoice
Inherits@FleetRecallable: ^FleetRecallable
Buildable:
Queue: AircraftSQ, AircraftMQ
BuildPaletteOrder: 90
Expand Down Expand Up @@ -2286,7 +2285,6 @@ ENRV:
Inherits@HULLREGEN: ^HullRegen
Inherits@SHIELDS: ^ScrinShields
Inherits@SCRINVEHICLEVOICE: ^ScrinVehicleVoice
Inherits@FleetRecallable: ^FleetRecallable
Buildable:
Queue: AircraftSQ, AircraftMQ
BuildPaletteOrder: 170
Expand Down Expand Up @@ -2563,7 +2561,7 @@ PAC:
Voiced:
VoiceSet: PlanetaryAssaultCarrierVoice
Valued:
Cost: 3000
Cost: 2800
Tooltip:
Name: Planetary Assault Carrier
GenericName: Aircraft
Expand Down
2 changes: 1 addition & 1 deletion mods/ca/rules/structures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5536,7 +5536,7 @@ TMPP:
NoCashAudio: InsufficientFunds
BlockedAudio: OnHold
CostDifferenceRequired: true
BuildDurationModifier: 35
BuildDurationModifier: 45
OverrideUnitBuildDurationModifier: true
EjectOnDeploy: true
ConvertingCondition: converting
Expand Down
2 changes: 1 addition & 1 deletion mods/ca/rules/upgrades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ optics.upgrade:
Name: Research: Advanced Optics
Buildable:
BuildPaletteOrder: 20
Prerequisites: ~player.allies, atek, ~techlevel.high
Prerequisites: ~player.allies, anyradar, ~techlevel.medium
Description: Equips rangers with advanced optics which temporarily extends their vision.\n\nUpgrades: Ranger
TooltipExtras:
Strengths: + Rangers can temporarily increase their vision range
Expand Down
18 changes: 16 additions & 2 deletions mods/ca/rules/vehicles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5327,6 +5327,12 @@ IFV:
GrantConditionOnAttackCA:
Condition: attacking
RevokeDelay: 3
ChronoshiftableCA:
RequiresCondition: !ivanturr && !being-warped
ChronoshiftableCA@Ivan:
Image: chrono
ExplodeInstead: true
RequiresCondition: ivanturr && !being-warped

IFV.AI:
Inherits: ^Tank
Expand Down Expand Up @@ -5696,7 +5702,7 @@ JUGG:
Bounds: 1280, 1706
DecorationBounds: 1280, 1706, 0, -100
Valued:
Cost: 1500
Cost: 2000
QuantizeFacingsFromSequence:
Sequence: stand
WithFacingSpriteBody:
Expand Down Expand Up @@ -5746,7 +5752,7 @@ JUGG:
Offset: -20,0,20
TurnSpeed: 12
Health:
HP: 50000
HP: 62000
Armor:
Type: Heavy
Passenger:
Expand All @@ -5770,6 +5776,10 @@ JUGG:
GrantConditionOnMovement@MOVING:
ValidMovementTypes: Horizontal, Vertical, Turn
Condition: moving
RangeMultiplier@GYRO:
Modifier: 150
ReloadDelayMultiplier@GYRO:
Modifier: 150
Carryable:
LocalOffset: 0,0,700
-Crushable:
Expand Down Expand Up @@ -6694,7 +6704,11 @@ BATF:
yuri: loaded-cmdo
acol: loaded
tplr: loaded
cscr: loaded
mort.cryo: loaded
mort.sonic: loaded
mort.chem: loaded
cmsr: loaded
spy: loaded-spy
snip: loaded
shok: loaded
Expand Down
12 changes: 7 additions & 5 deletions mods/ca/weapons/ballistics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -551,21 +551,23 @@ TitanGun:

JuggernautGun:
Inherits: ^Artillery
MinRange: 2c0
ReloadDelay: 120
Range: 10c0
MinRange: 3c0
ReloadDelay: 110
Range: 13c0
Burst: 3
StartBurstReport: jugger1.aud
TargetActorCenter: true
Projectile: Bullet
Inaccuracy: 1c138
Warhead@1Dam: SpreadDamage
Spread: 348
Damage: 1300
Damage: 1125
Falloff: 800, 368, 135, 50, 18, 7, 0
Versus:
None: 90
None: 100
Wood: 75
Heavy: 35
Light: 65
Concrete: 45
Warhead@4EffWater: CreateEffect
Explosions: large_splash
Expand Down
19 changes: 2 additions & 17 deletions mods/ca/weapons/explosions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ V2Explode:
V3ExplodeAirborne:
Inherits: ^Explosion
Warhead@1Dam: SpreadDamage
Range: 0, 2c0, 3c0
Range: 0, 1c768, 2c768
Falloff: 100, 100, 0
Damage: 5000
Versus:
Expand All @@ -243,22 +243,7 @@ V3ExplodeAirborne:
ImpactSounds: kaboom15.aud

THExplodeAirborne:
Inherits: ^Explosion
Warhead@1Dam: SpreadDamage
Range: 0, 4c0, 5c0
Falloff: 100, 100, 0
Damage: 6750
ValidTargets: Ground, Water, Trees
Versus:
None: 10
Wood: 55
Light: 30
Heavy: 20
Concrete: 100
DamageTypes: Prone50Percent, TriggerProne, SmallExplosionDeath
Warhead@2Eff: CreateEffect
Explosions: artillery_explosion
ImpactSounds: kaboom15.aud
Inherits: V3ExplodeAirborne

BuildingExplode:
Warhead@2Eff: CreateEffect
Expand Down
2 changes: 1 addition & 1 deletion mods/ca/weapons/missiles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2143,4 +2143,4 @@ RocketShells:
Gravity: 0
CruiseAltitude: 2c0
Inaccuracy: 128
AllowSnapping: true
AllowSnapping: true
2 changes: 1 addition & 1 deletion mods/ca/weapons/other.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1975,7 +1975,7 @@ MicrowaveZap:
ValidTargets: Ground, Water
InvalidTargets: Air
TargetActorCenter: true
ReloadDelay: 180
ReloadDelay: 170
Range: 7c0
Report: corefir1.aud
Projectile: Railgun
Expand Down
2 changes: 1 addition & 1 deletion mods/ca/weapons/smallcaliber.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ M60mgMD:
ReloadDelay: 40

M60mgMD.Attached:
Range: 4c768
Range: 5c256
Inherits: M60mgMD

MGattG:
Expand Down

0 comments on commit 5ec9708

Please sign in to comment.