-----------------------------------------------------------------------------
--  File     : /units/UEL0303/UEL0303_unit.bp
--
--  Author(s): EbolaSoup, Resin Smoker, Optimus Prime, Vissroid 
--
--  Special Thanks to : Exavier_Macbeth & Mithy
--
--  Summary  : UEF Siege Assault Bot Script (With Napalm Launcher Enhancement)
--
--  Copyright © 2011 4DC_V0.8  All rights reserved.
-----------------------------------------------------------------------------
UnitBlueprint {
    AI = {
        InitialAutoMode = true,
    },
    Audio = {
        AmbientMove = Sound {
            Bank = 'UEL',
            Cue = 'UEL0303_Move_Loop',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        EnhanceEnd = Sound {
            Bank = 'UnitsGlobal',
            Cue = 'GLB_Enhance_Stop',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        EnhanceFail = Sound {
            Bank = 'UnitsGlobal',
            Cue = 'GLB_Enhance_Fail',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        EnhanceLoop = Sound {
            Bank = 'UnitsGlobal',
            Cue = 'GLB_Enhance_Loop',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        EnhanceStart = Sound {
            Bank = 'UnitsGlobal',
            Cue = 'GLB_Enhance_Start',
            LodCutoff = 'UnitMove_LodCutoff',
        },       
        Killed = Sound {
            Bank = 'UELDestroy',
            Cue = 'UEL_Destroy_Huge',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        ShieldOff = Sound {
            Bank = 'UEL',
            Cue = 'UEL0303_Shield_Activate',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        ShieldOn = Sound {
            Bank = 'UEL',
            Cue = 'UEL0303_Shield_Activate',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        StartMove = Sound {
            Bank = 'UEL',
            Cue = 'UEL0303_Move_Start',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        StopMove = Sound {
            Bank = 'UEL',
            Cue = 'UEL0303_Move_Stop',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        UISelection = Sound {
            Bank = 'Interface',
            Cue = 'UEF_Select_Bot',
            LodCutoff = 'UnitMove_LodCutoff',
        },
    },
    Buffs = {
        Regen = {
            Level1 = 3,
            Level2 = 6,
            Level3 = 9,
            Level4 = 12,
            Level5 = 15,
        },
    },
    BuildIconSortPriority = 20,
    Categories = {
        'BOT',
        'BUILTBYTIER3FACTORY',
        'DIRECTFIRE',
        'LAND',
        'MOBILE',
        'OVERLAYDIRECTFIRE',
        'OVERLAYINDIRECTFIRE',        
        'RECLAIMABLE',
        'SELECTABLE',
        'SHIELD',             
        'TECH3',
        'UEF',
        'VISIBLETORECON',
    },
    Defense = {
        AirThreatLevel = 0,
        ArmorType = 'Normal',
        EconomyThreatLevel = 0,
        Health = 1200,
        MaxHealth = 1200,
        RegenRate = 0,
        Shield = {
            ImpactEffects = 'UEFShieldHit01',
            OwnerShieldMesh = '/mods/4DC_V0.8/hook/units/UEL0303/UEL0303_PersonalShield_mesh',
            PersonalShield = true,
            RegenAssistMult = 60,
            ShieldEnergyDrainRechargeTime = 5,
            ShieldMaxHealth = 2200,
            ShieldRechargeTime = 60,
            ShieldRegenRate = 9,
            ShieldRegenStartTime = 3,
            ShieldSize = 2.5,
            ShieldVerticalOffset = 0,
            StartsOff = true,
        }, 
        SubThreatLevel = 0,
        SurfaceThreatLevel = 15,              
    },      
    Description = 'Heavy Assault Bot',      
    Display = {
        Abilities = {
            '<LOC ability_personalshield>Personal Shield',
            '<LOC ability_customizable>Customizable',
        },
        AnimationDeath = {
            {
                Animation = '/mods/4DC_V0.8/hook/units/UEL0303/UEL0303_adeath01.sca',
                AnimationRateMax = 1.25,
                AnimationRateMin = 0.75,
                Weight = 33
            },
            {
                Animation = '/mods/4DC_V0.8/hook/units/UEL0303/UEL0303_adeath02.sca',
                AnimationRateMax = 1.25,
                AnimationRateMin = 0.75,
                Weight = 33,
            },
            {           
                Animation = '/mods/4DC_V0.8/hook/units/UEL0303/UEL0303_Adeath03.sca',
                AnimationRateMax = 1.25,
                AnimationRateMin = 0.75,
                Weight = 33
            },           
        },
        AnimationWalk = '/mods/4DC_V0.8/hook/units/UEL0303/UEL0303_awalk.sca',
        AnimationWalkRate = 5,        
        Mesh = {
            IconFadeInZoom = 130,
            LODs = {
                {                   
                    MeshName = '/mods/4DC_V0.8/hook/units/UEL0303/UEL0303_lod0.scm',
                    AlbedoName = '/mods/4DC_V0.8/hook/units/UEL0303/UEL0303_Albedo.dds',
                    NormalsName = '/mods/4DC_V0.8/hook/units/UEL0303/UEL0303_normalsTS.dds',
                    SpecularName = '/mods/4DC_V0.8/hook/units/UEL0303/UEL0303_SpecTeam.dds',
                    LODCutoff = 100,
                    ShaderName = 'Unit',                    
                },
                {
                    MeshName = '/mods/4DC_V0.8/hook/units/UEL0303/UEL0303_lod0.scm',                
                    AlbedoName = '/mods/4DC_V0.8/hook/units/UEL0303/UEL0303_lod1_albedo.dds',
                    NormalsName = '/mods/4DC_V0.8/hook/units/UEL0303/UEL0303_lod1_normalsTS.dds', 
                    SpecularName = '/mods/4DC_V0.8/hook/units/uel0303/UEL0303_lod1_specteam.dds',                                      
                    LODCutoff = 215,
                    ShaderName = 'Unit',
                },
            },
        },
        MovementEffects = {
            Land = {
                Effects = {
                    {
                        Bones = {
                            'LegL_B04',
                            'LegR_B04',
                        },
                        Type = 'GroundKickup01',
                    },
                },
            },
        },
        PlaceholderMeshName = 'UXL0001',
        SpawnRandomRotation = false,
        TransportAnimation = {
            {
                Animation = '/mods/4DC_V0.8/hook/units/UEL0303/UEL0303_afold.sca',
                Weight = 100,
            },
        },        
        UniformScale = 0.77,
    },
    Economy = {
        BuildCostEnergy = 5400,
        BuildCostMass = 480,
        BuildRate = 15, -- T3 engineer BuildRate        
        BuildTime = 2400,
        MaintenanceConsumptionPerSecondEnergy = 25,        
        TeleportEnergyMod = 0.15,
        TeleportMassMod = 1,
        TeleportTimeMod = 0.01,
    },   
    Enhancements = {
        Slots = {
            Back = {
                name = '<LOC _Back>',
                x = 38,
                y = -10,
            },
        },
        NapalmMissile = {
            BuildCostEnergy = 1800,
            BuildCostMass = 160,
            BuildTime = 800, 
            Icon = 'nap',  
            Name = 'Naplam Missile Launcher',        
            NewHealth = 600,
            NewRegenRate = 1,            
            ShowBones = {
                'Missile_Launcher',
            },
            Slot = 'Back',               
            UpgradeEffectBones = {
                'Back_Upgrade_B01',
            },
            UpgradeUnitAmbientBones = {
                'UEL0303',
            },
        },
        NapalmMissileRemove = {
            BuildCostEnergy = 1,
            BuildCostMass = 1,
            BuildTime = 0.1,
            HideBones = {
                'Missile_Launcher',
            },            
            Icon = 'nap',
            Name = 'Remove Naplam Missile Launcher',
            Prerequisite = 'NapalmMissile',
            RemoveEnhancements = {
                'NapalmMissile',
                'NapalmMissileRemove',
            },
            Slot = 'Back',
        },          
    },                
    General = {
        Category = 'Direct Fire',
        Classification = 'RULEUC_MilitaryVehicle',
        CommandCaps = {
            RULEUCC_Attack = true,
            RULEUCC_CallTransport = true,
            RULEUCC_Capture = false,
            RULEUCC_Guard = true,
            RULEUCC_Move = true,
            RULEUCC_Nuke = false,
            RULEUCC_Patrol = true,
            RULEUCC_Pause = false,
            RULEUCC_Reclaim = false,
            RULEUCC_Repair = false,
            RULEUCC_RetaliateToggle = true,
            RULEUCC_Stop = true,
            RULEUCC_Transport = false,
        },
        FactionName = 'UEF',
        Icon = 'land',
        OrderOverrides = {
            RULEUTC_ShieldToggle = {
                bitmapId = 'shield-personal',
                helpText = 'toggle_shield_personal',
            },
        },        
        TechLevel = 'RULEUTL_Secret',
        ToggleCaps = {
            RULEUTC_ShieldToggle = true,
        },        
        UnitName = 'Titan',
        UnitWeight = 1,
    },
    Intel = {
        VisionRadius = 22,
    },
    Interface = {
        HelpText = '<LOC uel0303_help>Heavy Assault Bot',
    },
    LifeBarHeight = 0.075,
    LifeBarOffset = 0.45,
    LifeBarSize = 1,
    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,
        MaxAcceleration = 4,
        MaxBrake = 4,
        MaxSpeed = 4,
        MaxSpeedReverse = 0,
        MaxSteerForce = 10,
        MeshExtentsX = 1.1,
        MeshExtentsY = 1.5,
        MeshExtentsZ = 2.4,
        MinSpeedPercent = 0,
        MotionType = 'RULEUMT_Land',
        StandUpright = true,
        TurnRadius = 5,
        TurnRate = 120,
    },
    SelectionCenterOffsetX = 0,
    SelectionCenterOffsetZ = -0.25,
    SelectionSizeX = 0.55,
    SelectionSizeZ = 0.5,
    SelectionThickness = 0.7,
    SizeX = 0.7,
    SizeY = 1.2,
    SizeZ = 0.7,
    StrategicIconName = 'icon_bot3_directfire',
    ModIconName = '4dc',    
    StrategicIconSortPriority = 115,
    Transport = {
        CanFireFromTransport = false,
        TransportClass = 3,
    },    
    Veteran = {
        Level1 = 9,
        Level2 = 18,
        Level3 = 27,
        Level4 = 36,
        Level5 = 45,
    },
    Weapon = { 
        {
            AboveWaterFireOnly = true,
            AboveWaterTargetsOnly = true,
            Audio = {
                Fire = Sound {
                    Bank = 'UELWeapon',
                    Cue = 'UEL0303_Plasma_Cannon',
                    LodCutoff = 'Weapon_LodCutoff',
                },
            },
            AutoInitiateAttackCommand = 'true', 
            BallisticArc = 'RULEUBA_LowArc',
            CollideFriendly = false,
            Damage = 50,   
            DamageRadius = 0,
            DamageType = 'Normal',
            DisplayName = 'Heavy Plasma Cannon',
            FireTargetLayerCapsTable = {
                Land = 'Land|Water|Seabed',
            },
            FiringTolerance = 2,
            Label = 'HeavyTwinPlasma',
            LeadTarget = true,
            MaxRadius = 20,         
            MuzzleSalvoDelay = 0,
            MuzzleSalvoSize = 1,
            MuzzleVelocity = 30,
            NoPause = true,
            NotExclusive = true,
            ProjectileId = '/projectiles/TDFPlasmaHeavy04/TDFPlasmaHeavy04_proj.bp',
            ProjectileLifetimeUsesMultiplier = 1.15,
            ProjectilesPerOnFire = 1,
            RackBones = {
                {
                    MuzzleBones = {
                        'Muzzle_R',
                    },
                    RackBone = 'Barrel_R',
                },
                {
                    MuzzleBones = {
                        'Muzzle_L',
                    },
                    RackBone = 'Barrel_L',
                },
            },
            RackFireTogether = false,
            RackRecoilDistance = -0.2,
            RackReloadTimeout = 0,
            RackSalvoChargeTime = 0,
            RackSalvoReloadTime = 0,
            RackSalvoSize = 1,
            RackSlavedToTurret = false,
            RangeCategory = 'UWRC_DirectFire',
            RateOfFire = 3, 
            TargetCheckInterval = 0.25,
            TargetPriorities = {
                'SPECIALHIGHPRI',
                'TECH3 MOBILE',
                'STRUCTURE DEFENSE DIRECTFIRE',
                'TECH2 MOBILE',
                'ALLUNITS',
            },
            TargetRestrictDisallow = 'UNTARGETABLE',
            TrackingRadius = 1.15,
            TurretBoneDualMuzzle = 'Muzzle_L',
            TurretBoneDualPitch = 'ArmL_B04',
            TurretBoneMuzzle = 'Muzzle_R',
            TurretBonePitch = 'ArmR_B04',
            TurretBoneYaw = 'Torso',
            TurretDualManipulators = true,
            TurretPitch = 10,
            TurretPitchRange = 90,
            TurretPitchSpeed = 30,
            TurretYaw = 0,
            TurretYawRange = 180,
            TurretYawSpeed = 150,  
            Turreted = true,
            WeaponCategory = 'Direct Fire',
            WeaponRepackTimeout = 0,
            WeaponUnpacks = false,
        },         
        {
            Audio = {
                Fire = Sound {
                    Bank = 'UELWeapon',
                    Cue = 'UEB2304_Missile_Flayer',
                    LodCutoff = 'Weapon_LodCutoff',
                },
            },
            AutoInitiateAttackCommand = 'true', 
            BallisticArc = 'RULEUBA_None',
            CollideFriendly = false,
            Damage = 20,
            DamageFriendly = false,
            DamageRadius = 3, -- Value being used for missile spread script
            DoTPulses = 5, 
            DoTTime = 4, 
            DamageType = 'fire',
            DisplayName = 'Napalm Spread Launcher',
            
    -- Added flags to support BulletMagnet's Ultimate OKC   
            
            dontOKCheck = true,  
            dontOKSum = true, 
            dontTerrainCheck = false, 
            dontCacheTargets = true,
            
    -- End of OKC flags 
                
            FireTargetLayerCapsTable = {
                Land = 'Land|Water|Seabed',
            },
            EnabledByEnhancement = 'NapalmMissile',            
            FiringTolerance = 0,
            FiringRandomness = 0,   
            HeadingArcCenter = 0,
            HeadingArcRange = 45,                            
            Label = 'Missile_Pod',        
            MaxRadius = 40,
            MinRadius = 10,
            MuzzleChargeDelay = 0,
            MuzzleSalvoDelay = 0, 
            MuzzleSalvoSize = 20,
            MuzzleVelocity = 5,
            NotExclusive = true,
            PrefersPrimaryWeaponTarget = true,   
            ProjectileId = '/mods/4DC_V0.8/projectiles/napalm_missile/napalm_missile_proj.bp',
            ProjectileLifetime = 10,
            ProjectilesPerOnFire = 10, -- Decremented value being used for missile spread script, value must reflect the true number of missiles being fired
            RackBones = {
                {
                    HideMuzzle = true,
                    MuzzleBones = {
                        'missile_01',
                        -- 'missile_02',
                        'missile_03',
                        -- 'missile_04',
                        'missile_05',
                        -- 'missile_06',
                        'missile_07',
                        -- 'missile_08',
                        'missile_09',
                        -- 'missile_10',
                        'missile_11',
                        -- 'missile_12',
                        'missile_13',
                        -- 'missile_14',
                        'missile_15',
                        -- 'missile_16',
                        'missile_17',
                        -- 'missile_18',
                        'missile_19',
                        -- 'missile_20',
                    },
                    RackBone = 'missile_01',
                },                                                                                                                                          
            },
            RackFireTogether = false,
            RackRecoilDistance = 0,
            RackReloadTimeout = 0,
            RackSalvoChargeTime = 0,
            RackSalvoReloadTime = 0,
            RackSalvoSize = 1,
            RackSlavedToTurret = false,
            RangeCategory = 'UWRC_IndirectFire',
            RateOfFire = 0.2,  
            RenderFireClock = false,
            SlavedToBody = true,
            SlavedToBodyArcRange = 5,           
            TargetCheckInterval = 1,
            TargetPriorities = {
                'SPECIALHIGHPRI',
                'TECH3 MOBILE',
                'STRUCTURE DEFENSE DIRECTFIRE',
                'TECH2 MOBILE',
                'ALLUNITS',
            },
            TargetRestrictDisallow = 'UNTARGETABLE',
            TrackingRadius = 1.15,
            Turreted = false,                       
            WeaponCategory = 'Missile',
            WeaponRepackTimeout = 0,
            WeaponUnpacks = false,
        },                   
        {
            Damage = 250,
            DamageFriendly = true,
            DamageRadius = 2,
            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,
        },
    },
}