예제 #1
0
 // Token: 0x06000097 RID: 151 RVA: 0x00005A01 File Offset: 0x00003C01
 public override void DoHWEffect(Pawn pawn)
 {
     if (HaywireUtility.Rnd100() < 50)
     {
         HaywireEffect.DoHWBreakDown(pawn);
     }
 }
예제 #2
0
 // Token: 0x0600009C RID: 156 RVA: 0x00005A41 File Offset: 0x00003C41
 public virtual void DoHWEffect(Pawn pawn)
 {
     if (HaywireUtility.Rnd100() < 40)
     {
         HaywireEffect.DoHWExplosion(pawn);
     }
 }
예제 #3
0
        // Token: 0x0600003A RID: 58 RVA: 0x000034E0 File Offset: 0x000016E0
        public static void GGRepulse(Pawn p, ThingWithComps a, float e)
        {
            if (!(e > 0f))
            {
                return;
            }

            (a as GhostGearApparel)?.Break();
            for (var i = 0; i < 3; i++)
            {
                var       postTD    = ThingDefOf.Gas_Smoke;
                var       radius    = 1.9f;
                DamageDef dmdef     = null;
                var       dmg       = RepulseDmg(50, a, e);
                var       repulsing = false;
                switch (i)
                {
                case 0:
                    dmdef  = DamageDefOf.EMP;
                    radius = 2.9f;
                    break;

                case 1:
                    dmdef     = DamageDefOf.Stun;
                    repulsing = true;
                    break;

                case 2:
                    dmdef  = DamageDefOf.Smoke;
                    radius = 2.9f;
                    dmg    = -1;
                    break;
                }

                if (!repulsing)
                {
                    GenExplosion.DoExplosion(p.Position, p.Map, radius, dmdef, p, dmg, -1f, null, null, null, null,
                                             postTD, 1f, 1, false, null, 0f, 0, 0f, true);
                }
                else
                {
                    RepulseEffect(p, dmdef, dmg);
                }
            }

            HaywireEffect.DoHWMiniEffect(p);
        }
예제 #4
0
        // Token: 0x06000064 RID: 100 RVA: 0x0000465C File Offset: 0x0000285C
        public override void CompTick()
        {
            if (!IsHaywired(pawn))
            {
                return;
            }

            HaywireTicks--;
            if ((HaywireTicks + pawn.thingIDNumber) % 120 != 0)
            {
                return;
            }

            var pawn1 = pawn;

            if (pawn1?.Map == null)
            {
                return;
            }

            HaywireEffect.MakeHaywireOverlay(pawn);
            HaywireUtility.TryStartHaywireJob(pawn, 120);
        }