----------------------------------------------------------------------------
--  File     : /units/UAB2306/UAB2306_unit.bp
--
--  Author(s): EbolaSoup, Resin Smoker, Optimus Prime, Vissroid 
--
--  Summary  : Aeon "Annihilator" Heavy Beam Turret Blueprint 
--
--  Copyright © 2011 4DC_V0.8  All rights reserved.
-----------------------------------------------------------------------------
UnitBlueprint {
    AI = {
        TargetBones = {
            'mid_joint',
        },
    },
    Audio = {
        ActiveLoop = Sound {
            Bank = 'URB',
            Cue = 'URB1201_Active',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        DeathExplosion = Sound {
            Bank = 'UALDestroy',
            Cue = 'UAB_Destroy_Lrg_PreDestroy',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        DoneBeingBuilt = Sound {
            Bank = 'UAB',
            Cue = 'UAB2301_Activate',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        UISelection = Sound {
            Bank = 'Interface',
            Cue = 'Aeon_Select_Gun',
            LodCutoff = 'UnitMove_LodCutoff',
        },
    },
    Buffs = {
        Regen = {
            Level1 = 1,
            Level2 = 2,
            Level3 = 3,
            Level4 = 4,
            Level5 = 5,
        },
    },
    BuildIconSortPriority = 110,
    Categories = {
        'MODCONTENT4D',      
        'AEON',
        'BUILTBYTIER3ENGINEER',
        'BUILTBYTIER3COMMANDER',
        'DEFENSE',        
        'DIRECTFIRE',
        'DRAGBUILD',
        'OVERLAYDIRECTFIRE',
        'RECLAIMABLE',        
        'SELECTABLE', 
        'SIZE12',       
        'SHOWATTACKRETICLE',
        'SORTDEFENSE',        
        'SORTSTRATEGIC',
        'STRATEGIC',
        'STRUCTURE', 
        'TECH3',               
        'VISIBLETORECON',
    },
    CollisionOffsetY = -0.25,
    Defense = {
        AirThreatLevel = 0,
        ArmorType = 'Structure',
        EconomyThreatLevel = 0,
        Health = 11500,
        MaxHealth = 11500,
        RegenRate = 1,
        SubThreatLevel = 0,
        SurfaceThreatLevel = 50,
        ThreatLevel = 50,          
    },
    Description = 'BFG',
    Display = {   
        Mesh = {
            IconFadeInZoom = 130,
            LODs = {
                {
                    AlbedoName = '/units/uab2303/uab2303_Albedo.dds',
                    NormalsName = '/units/uab2303/uab2303_normalsTS.dds',
                    SpecularName = '/units/uab2303/uab2303_SpecTeam.dds',
                    LODCutoff = 215,
                    Scrolling = false,                     
                    ShaderName = 'Aeon',
                },
            },
        },      
        Tarmacs = {
            {
                Albedo = 'Tarmacs/Tar8x_aeon_01_albedo',
                DeathLifetime = 300,
                FadeOut = 150,
                Length = 12.8,
                Normal = 'Tarmacs/Tar8x_aeon_01_normals',
                Orientations = {
                    0,
                    90,
                    180,
                    270,
                },
                RemoveWhenDead = false,
                Width = 12.8,
            },
        },                        
        PlaceholderMeshName = 'UXB0003',
        SpawnRandomRotation = true,
        UniformScale = 0.0025,
    },    
    Economy = {
        BuildCostEnergy = 22000,
        BuildCostMass = 3200,
        BuildTime = 2600,
        RebuildBonusIds = {
            'uab2306',
        },
    },
    Footprint = {
        SizeX = 3,
        SizeZ = 3,
    },    
    General = {
        Category = 'Defense',
        Classification = 'RULEUC_Weapon',
        CommandCaps = {
            RULEUCC_Attack = true,
            RULEUCC_CallTransport = false,
            RULEUCC_Capture = false,
            RULEUCC_Guard = false,
            RULEUCC_Move = false,
            RULEUCC_Nuke = false,
            RULEUCC_Patrol = false,
            RULEUCC_Reclaim = false,
            RULEUCC_Repair = false,
            RULEUCC_RetaliateToggle = true,
            RULEUCC_Stop = true,
            RULEUCC_Transport = false,
        },
        FactionName = 'Aeon',
        TechLevel = 'RULEUTL_Secret',
        UnitName = 'Annihilator',
        UnitWeight = 1,
        SelectionPriority = 5,
    },
    Intel = {
        VisionRadius = 28,
    },
    Interface = {
        HelpText = 'Annihilator',
    },
    LifeBarHeight = 0.1,
    LifeBarOffset = 1.35,
    LifeBarSize = 1.5,
    Physics = {
        BankingSlope = 0,
        BuildOnLayerCaps = {
            LAYER_Air = false,
            LAYER_Land = true,
            LAYER_Orbit = false,
            LAYER_Seabed = false,
            LAYER_Sub = false,
            LAYER_Water = false,
        },
        DragCoefficient = 0.2,
        FlattenSkirt = true,
        MaxSteerForce = 0,
        MeshExtentsX = 3,  
        MeshExtentsY = 3,  
        MeshExtentsZ = 3,  
        MinSpeedPercent = 0,
        MotionType = 'RULEUMT_None',
        SkirtOffsetX = -1.5,  
        SkirtOffsetZ = -1.5,  
        SkirtSizeX = 6,  
        SkirtSizeZ = 6,  
        TurnRate = 0,
    },  
    SelectionSizeX = 1.5,   
    SelectionCenterOffsetX = 0,
    SelectionSizeZ = 1.8, 
    SelectionCenterOffsetZ = -0.4,
    SelectionThickness = 0.25,
    SizeX = 0.75,
    SizeY = 1.75,
    SizeZ = 0.75,
    StrategicIconName = 'icon_structure3_directfire',
    ModIconName = '4dc',      
    StrategicIconSortPriority = 200,
    Veteran = {
        Level1 = 20,
        Level2 = 40,
        Level3 = 60,
        Level4 = 80,
        Level5 = 100,
    },
    Weapon = {
        {
            AboveWaterTargetsOnly = true,
            Audio = {
                BarrelLoop = Sound {
                    Bank = 'UAB',
                    Cue = 'UAB2302_Turret_Loop',
                    LodCutoff = 'WeaponBig_LodCutoff',
                },
                BarrelStart = Sound {
                    Bank = 'UAB',
                    Cue = 'UAB2302_Turret_Start',
                    LodCutoff = 'WeaponBig_LodCutoff',
                },
                Fire = Sound {
                    Bank = 'UALWeapon',
                    Cue = 'UAB2302_Artillery_Sonance',
                    LodCutoff = 'Weapon_LodCutoff',
                },
                MuzzleChargeStart = Sound {
                    Bank = 'UALWeapon',
                    Cue = 'UAB2302_Artillery_Son_Charge',
                    LodCutoff = 'Weapon_LodCutoff',
                },
            },
            BallisticArc = 'RULEUBA_LowArc',
            Buffs = {
                {
                    Add = {
                        OnImpact = true,
                    },
                    AppliedToTarget = true,
                    BuffType = 'STUN',
                    Duration = 2.0,
                    Radius = 3,
                    TargetAllow = 'ALLUNITS',
                    TargetDisallow = 'AIR, BENIGN, CIVILIAN, COMMAND, DRONE, EXPERIMENTAL, HOLOGRAM, HOLOGRAMGENERATOR, INSIGNIFICANTUNIT, MINE, NUKE, OPERATION, PHASING, POD, PROJECTILE, SATELLITE, SHIELD, SUBCOMMANDER, SUBMERSIBLE, UNSELECTABLE, UNTARGETABLE, WALL',                                  
                },
            },            
            CameraShakeDuration = 0.1,
            CameraShakeMax = 0.5,
            CameraShakeMin = 0.25,
            CameraShakeRadius = 3,
            CollideFriendly = false,
            Damage = 10000,
            DamageFriendly = false,
            DamageRadius = 3.0, -- Sets the BFG projectiles "Arc" beam range
            DamageType = 'Normal',
            DisplayName = 'Annihilator BFG',
            
    -- Added flags to support BulletMagnet's Ultimate OKC     
            
            dontOKCheck = true,  
            dontOKSum = true, 
            dontTerrainCheck = false, 
            dontCacheTargets	= true,
            
    -- End of OKC flags          
    
            EnergyDrainPerSecond = 625,
            EnergyRequired = 5000,           
            FireTargetLayerCapsTable = {
                Land = 'Land|Water',
            },
            FiringRandomness = 0.5,
            FiringTolerance = 2,
            Label = 'BFG',
            LeadTarget = false, 
            MaxRadius = 60,
            MinRadius = 6,
            MuzzleChargeDelay = 2.5,
            MuzzleSalvoDelay = 0,
            MuzzleSalvoSize = 1,
            MuzzleVelocity = 10, 
            NeedPrep = true,   -- Forces OnGotTarget to run for each new target
            ProjectileId = '/mods/4DC_V0.8/projectiles/BFG_Shell/BFG_Shell_proj.bp',                    
            ProjectileLifetime = 8,
            ProjectilesPerOnFire = 1,
            RackBones = {
                {
                    MuzzleBones = {
                        'Turret_Muzzle',
                    },
                    RackBone = 'Turret_Barrel',
                },
            },
            RangeCategory = 'UWRC_DirectFire',
            RackFireTogether = false,
            RackRecoilDistance = 0,
            RackReloadTimeout = 0,
            RackSalvoChargeTime = 0,
            RackSalvoFiresAfterCharge = false,  
            RackSalvoReloadTime = 0,
            RackSalvoSize = 1,
            RackSlavedToTurret = false,
            RateOfFire = 0.8,  -- R.O.F of 0.1 = 10 seconds, 0.5 = 5 seconds ect
                               -- Overall rate of fire is combination of (EnergyRequired / EnergyDrainPerSecond) + RateOfFire
                               -- In this case:  (5000 / 625) + (0.8 or 2 seconds) = 10 second firing cycle
            RenderFireClock = false,
            TargetCheckInterval = 1.0,
            TargetPriorities = {
                'EXPERIMENTAL',
                'TECH3 MOBILE INDIRECTFIRE',
                'TECH3 MOBILE DIRECTFIRE',
                'TECH2 STRUCTURE DEFENSE DIRECTFIRE',
                'TECH2 MOBILE',
                'ALLUNITS',
            },
            TrackingRadius = 1.25,
            TargetRestrictDisallow = 'UNTARGETABLE',
            TurretBoneMuzzle = 'Turret_Muzzle',
            TurretBonePitch = 'mid_joint',
            TurretBoneYaw = 'lower_joint',
            TurretDualManipulators = false,
            TurretPitch = 10,
            TurretPitchRange = 30,
            TurretPitchSpeed = 15,
            TurretYaw = 0,
            TurretYawRange = 180,
            TurretYawSpeed = 30,
            Turreted = true,
            WeaponCategory = 'Direct Fire',
            WeaponRepackTimeout = 0,
            WeaponUnpacks = false,            
        },
        {
    		Damage = 5000,
    		DamageFriendly = true,
    		DamageRadius = 4,
    		DamageType = 'Normal',
    		DummyWeapon = true,
    		Label = 'DeathWeapon',
    	}, 
    },
    Wreckage = {
        Blueprint = '/props/DefaultWreckage/DefaultWreckage_prop.bp',
        EnergyMult = 0,
        HealthMult = 0.9,
        MassMult = 0.9,
        ReclaimTimeMultiplier = 1,
        WreckageLayers = {
            Air = false,
            Land = true,
            Seabed = false,
            Sub = false,
            Water = false,
        },
    },
}