public void SunfireDamage(IntVec3 c) { List <Thing> tList = c.GetThingList(this.Map); float baseDamage = 4f * lightPotency * this.arcaneDmg; for (int i = 0; i < tList.Count; i++) { if (tList[i] is Pawn) { Pawn p = tList[i] as Pawn; BodyPartRecord bpr = p.health.hediffSet.GetRandomNotMissingPart(TMDamageDefOf.DamageDefOf.TM_BurningLight, BodyPartHeight.Undefined, BodyPartDepth.Outside); if (bpr != null) { TM_Action.DamageEntities(tList[i], bpr, baseDamage + pwrVal, .1f * pwrVal, TMDamageDefOf.DamageDefOf.TM_BurningLight, caster); } } if (tList[i] is Building) { TM_Action.DamageEntities(tList[i], null, 4 * (baseDamage + pwrVal), TMDamageDefOf.DamageDefOf.TM_BurningLight, caster); } if (Rand.Chance(.02f)) { if (FireUtility.CanEverAttachFire(tList[i])) { FireUtility.TryAttachFire(tList[i], .2f); } else { FireUtility.TryStartFireIn(c, this.Map, .2f); } } } }