Пример #1
0
        protected override bool TryCastShot()
        {
            if (currentTarget.HasThing && currentTarget.Thing.Map != caster.Map)
            {
                return(false);
            }
            Bombardment obj = (Bombardment)GenSpawn.Spawn(ThingDefOf.Bombardment, currentTarget.Cell, caster.Map);

            obj.duration   = 540;
            obj.instigator = caster;
            obj.weaponDef  = ((base.EquipmentSource != null) ? base.EquipmentSource.def : null);
            base.ReloadableCompSource?.UsedOnce();
            return(true);
        }
Пример #2
0
        protected override bool TryCastShot()
        {
            if (this.currentTarget.HasThing && this.currentTarget.Thing.Map != this.caster.Map)
            {
                return(false);
            }
            Bombardment bombardment = (Bombardment)GenSpawn.Spawn(ThingDefOf.Bombardment, this.currentTarget.Cell, this.caster.Map);

            bombardment.duration   = 450;
            bombardment.instigator = this.caster;
            bombardment.weaponDef  = ((this.ownerEquipment == null) ? null : this.ownerEquipment.def);
            bombardment.StartStrike();
            if (this.ownerEquipment != null && !this.ownerEquipment.Destroyed)
            {
                this.ownerEquipment.Destroy(DestroyMode.Vanish);
            }
            return(true);
        }
Пример #3
0
        protected override bool TryCastShot()
        {
            if (currentTarget.HasThing && currentTarget.Thing.Map != caster.Map)
            {
                return(false);
            }
            Bombardment bombardment = (Bombardment)GenSpawn.Spawn(ThingDefOf.Bombardment, currentTarget.Cell, caster.Map);

            bombardment.duration   = 540;
            bombardment.instigator = caster;
            bombardment.weaponDef  = ((base.EquipmentSource == null) ? null : base.EquipmentSource.def);
            bombardment.StartStrike();
            if (base.EquipmentSource != null && !base.EquipmentSource.Destroyed)
            {
                base.EquipmentSource.Destroy();
            }
            return(true);
        }
Пример #4
0
        private void CallBombardment(IntVec3 targetCell)
        {
            Bombardment obj = (Bombardment)GenSpawn.Spawn(ThingDefOf.Bombardment, targetCell, map);

            obj.impactAreaRadius     = def.royalAid.radius;
            obj.explosionRadiusRange = def.royalAid.explosionRadiusRange;
            obj.bombIntervalTicks    = def.royalAid.intervalTicks;
            obj.randomFireRadius     = 1;
            obj.explosionCount       = def.royalAid.explosionCount;
            obj.warmupTicks          = def.royalAid.warmupTicks;
            obj.instigator           = caller;
            SoundDefOf.OrbitalStrike_Ordered.PlayOneShotOnCamera();
            caller.royalty.GetPermit(def, faction).Notify_Used();
            if (!free)
            {
                caller.royalty.TryRemoveFavor(faction, def.royalAid.favorCost);
            }
        }