Exemplo n.º 1
0
        protected override void Impact(Thing hitThing)
        {
            Map map = Map;
            BattleLogEntry_RangedImpact battleLogEntry_RangedImpact = new BattleLogEntry_RangedImpact(this.launcher, hitThing, this.intendedTarget.Thing, this.equipmentDef, this.def, this.targetCoverDef);

            Find.BattleLog.Add(battleLogEntry_RangedImpact);
            if (hitThing != null)
            {
                DamageDef  damageDef        = def.projectile.damageDef;
                float      amount           = DamageAmount;
                float      armorPenetration = ArmorPenetration;
                float      y            = ExactRotation.eulerAngles.y;
                Thing      launcher     = this.launcher;
                ThingDef   equipmentDef = this.equipmentDef;
                DamageInfo dinfo        = new DamageInfo(damageDef, amount, armorPenetration, y, launcher, null, equipmentDef, DamageInfo.SourceCategory.ThingOrUnknown, this.intendedTarget.Thing);
                hitThing.TakeDamage(dinfo).AssociateWithLog(battleLogEntry_RangedImpact);
                Pawn pawn = hitThing as Pawn;
                if (pawn != null && pawn.stances != null && pawn.BodySize <= def.projectile.StoppingPower + 0.001f)
                {
                    pawn.stances.StaggerFor(95);
                }
                RKSoundDefOf.Ballista_Impact.PlayOneShot(new TargetInfo(hitThing.Position, map, false));
                FilthMaker.TryMakeFilth(Position, map, ThingDefOf.Filth_Blood, 4);
            }
            else
            {
                MoteMaker.MakeStaticMote(this.ExactPosition, map, ThingDefOf.Mote_Bombardment, 1f);
                if (Position.GetTerrain(map).takeSplashes)
                {
                    MoteMaker.MakeBombardmentMote(this.DestinationCell, map, 4f);
                }
            }
            Explode();
        }
Exemplo n.º 2
0
 public void DrawTargeterBeam(IntVec3 position)
 {
     if (!position.IsValid || !position.InBounds(this.map))
     {
         position = PickNewSpotToBomb();
     }
     MoteMaker.MakeBombardmentMote(position, this.map);
 }
Exemplo n.º 3
0
 // Token: 0x06000007 RID: 7 RVA: 0x000021B8 File Offset: 0x000003B8
 public override void SpawnSetup(Map map, bool respawningAfterLoad)
 {
     base.SpawnSetup(map, respawningAfterLoad);
     this.Angle     = AngleRange.RandomInRange;
     this.StartTick = Find.TickManager.TicksGame;
     base.GetComp <CompAffectsSky>().StartFadeInHoldFadeOut(30, this.Duration - 30 - 15, 15, 1f);
     base.GetComp <CompOrbitalBeam>().StartAnimation(this.Duration, 10, this.Angle);
     MoteMaker.MakeBombardmentMote(base.Position, base.Map);
     MoteMaker.MakePowerBeamMote(base.Position, base.Map);
 }
Exemplo n.º 4
0
        private void CreateBigExplosion()
        {
            MoteMaker.MakeBombardmentMote(base.Position, base.Map);
            float     num        = (float)Rand.Range(40, 55);
            IntVec3   center     = base.Position;
            Map       map        = base.Map;
            float     radius     = num;
            DamageDef manabomb   = DamageDefOf.PLAHFManaBomb;
            Thing     instigator = this.instigator;
            ThingDef  def        = this.def;
            ThingDef  weaponDef  = this.weaponDef;

            GenExplosion.DoExplosion(center, map, radius, manabomb, instigator, -1, -1f, null, weaponDef, def, null, null, 0f, 1, false, null, 0f, 1, 0.1f, false);
        }