Exemple #1
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);
        }
        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);
        }