Code: Select all
MAGUN:
Inherits: ^Vehicle
Inherits@selection: ^SelectableSupportUnit
Buildable:
Queue: Vehicle
BuildPaletteOrder: 210
Prerequisites: dome, ~techlevel.medium
BuildDurationModifier: 50
Description: Deploys into an AA gun.
Valued:
Cost: 1350
Tooltip:
Name: Mobile AA Gun
Selectable:
DecorationBounds: 42,42
SelectionDecorations:
Health:
HP: 11000
Armor:
Type: Light
Mobile:
Speed: 128
RevealsShroud:
Range: 4c0
Transforms:
IntoActor: magun.deployed
Offset: 0,0
SpawnActorOnDeath:
Actor: magun.deployed
MAGUN.Deployed:
Inherits: ^Defense
Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
Inherits@AUTOTARGET: ^AutoTargetAir
Buildable:
Queue: Defense
BuildPaletteOrder: 90
Prerequisites: ~disabled
Description: Anti-Air base defense.\nRequires power to operate.\n Strong vs Aircraft\n Weak vs Ground units
Valued:
Cost: 800
Tooltip:
Name: AA Gun
Selectable:
Bounds: 24,24
DecorationBounds: 24,32,0,-4
SelectionDecorations:
Health:
HP: 40000
Armor:
Type: Heavy
RevealsShroud:
MinRange: 5c0
Range: 6c0
RevealGeneratedShroud: False
RevealsShroud@GAPGEN:
Range: 5c0
WithBuildingBib:
HasMinibib: true
Turreted:
TurnSpeed: 60
InitialFacing: 832
RealignDelay: -1
RequiresCondition: !build-incomplete
WithSpriteTurret:
RequiresCondition: !build-incomplete
Recoils: false
Armament:
Weapon: ZSU-23
LocalOffset: 520,100,450, 520,-150,450
MuzzleSequence: muzzle
AttackTurreted:
RequiresCondition: !build-incomplete
PauseOnCondition: disabled
WithMuzzleOverlay:
RenderRangeCircle:
RangeCircleType: aa
Power:
Amount: -50
ClassicFacingBodyOrientation:
Transforms:
IntoActor: magun
Offset: 0,0
Sequences:
magun.deployed:
idle: gunmake # Empty first frame (agunmake has no empty frames). We need WithSpriteBody for the make anim, and WSB needs at least a placeholder default sequence to work
make: agunmake
Length: *
Offset: 0,-13
turret:
Facings: 32
UseClassicFacings: True
Offset: 0,-13
recoil:
Start: 32
Facings: 32
UseClassicFacings: True
Offset: 0,-13
damaged-turret:
Start: 64
Facings: 32
UseClassicFacings: True
Offset: 0,-13
damaged-recoil:
Start: 96
Facings: 32
UseClassicFacings: True
Offset: 0,-13
muzzle: gunfire2
Start: 1
Length: 4
bib: mbAGUN
Length: *
UseTilesetExtension: true
icon: agunicon
magun:
idle: truk
Facings: 32
UseClassicFacings: True
icon: agunicon