public override void UpdateValuesUI(bool first = false, Transform[][] lines = null) { if (first) { BodyPart bp = ((this as SC_OffensiveMove)?.effect.bodyPartDamage ?? (this as SC_Submission).effect.bodyPartDamage).bodyPart; foreach (Transform[] t in lines) { for (int i = 0; i < t.Length; i++) { foreach (Transform bg in t[i]) { if (i == t.Length - 1 && GetCost.bodyPartDamage.bodyPart == BodyPart.None && bp == BodyPart.None) { bg.gameObject.SetActive(false); UICard.HideBodyPartsTexts(); } else { bg.GetComponent <Image> ().color = (i % 2 != (t.Length % 2)) == (GetCost.bodyPartDamage.bodyPart != BodyPart.None || bp != BodyPart.None) ? UI.darkGrey : UI.lightGrey; } } } } } UICard.SetAttackValue("staminaCost", GetCost.stamina, false); UICard.SetAttackValue("bodyPartsCost", GetCost.bodyPartDamage.bodyPart == BodyPart.None ? "0" : GetCost.bodyPartDamage.bodyPart + " - " + GetCost.bodyPartDamage.damage, true); OffensiveBodyPartDamage b = (this as SC_OffensiveMove)?.GetEffect.bodyPartDamage ?? (this as SC_Submission).GetEffect.bodyPartDamage; string s = ""; if (b.bodyPart != BodyPart.None) { s += b.bodyPart; if (b.otherBodyPart != BodyPart.None) { s += " " + (b.both ? "&" : "or") + " " + b.otherBodyPart; } s += " - " + b.damage; } UICard.SetAttackValue("bodyPartsDamage", s == "" ? "0" : s, true); }