static public string SI_ProceduralDamage(object info) { Multitype <NetCard, NetSkill, NetBattlefield> data = info as Multitype <NetCard, NetSkill, NetBattlefield>; if (data != null) { return(GameplayUtils.GetDamageFor(data.t1, data.t0).ToString(false)); } Multitype <SkillInstance, Subskill, ClientEntityCharacter> dInfo = info as Multitype <SkillInstance, Subskill, ClientEntityCharacter>; SkillInstance si = dInfo.t0; Subskill ss = dInfo.t1; ClientEntityCharacter character = dInfo.t2; var skillAttributes = si.GetCurrentSkillAttributes()[ss]; int flags = skillAttributes.GetFInt("ProceduralFlags").ToInt(); string st = null; FInt dmgBase = GameplayUtils.GetDamageFor(si, ss, null); float addBase = (flags & (int)EActivatorBlocks.Additive) > 0 ? GameplayUtils.DamageNormalToAdditive(dmgBase) : 0f; var a = new FInt(addBase); if (ss.challengeTypes == null || character == null) { if (addBase > 0) { st = "x" + dmgBase.ToString(true) + " [+" + a.ToString(true) + "]"; } else { st = "x" + dmgBase.ToString(true); } } else { foreach (var v in ss.challengeTypes) { string color = ""; switch (v) { case EChallengeType.TypePhysical: color = "XML_COLOR-PHYSICAL"; break; case EChallengeType.TypeMental: color = "XML_COLOR-MENTAL"; break; case EChallengeType.TypeSpirit: color = "XML_COLOR-SPIRITUAL"; break; } if (st == null) { st = ""; } else { st += "|"; } if (addBase > 0) { st += "x" + dmgBase.ToString(true) + "[+" + a.ToString(true) + "]" + " ( " + ColorUtils.GetColorAsTextTag(color) + GameplayUtils.GetDamageFor(si, ss, character, v, true).ToString(false) + ColorUtils.GetColorAsTextTag("XML_COLOR-NORMAL_FONT") + " )"; } else { st += "x" + dmgBase.ToString(true) + " ( " + ColorUtils.GetColorAsTextTag(color) + GameplayUtils.GetDamageFor(si, ss, character, v).ToString(false) + ColorUtils.GetColorAsTextTag("XML_COLOR-NORMAL_FONT") + " )"; } } } return(st); }
static public string SI_ShieldUpImproved(object info) { Multitype <NetCard, NetSkill, NetBattlefield> data = info as Multitype <NetCard, NetSkill, NetBattlefield>; if (data != null) { var ns = data.t1; var bf = data.t2; FInt value = ns.GetFloatAttribute("TAG-CA_SHIELD"); if (value == FInt.ZERO) { if (bf.ChallengeType == EChallengeType.TypePhysical) { value = ns.GetFloatAttribute("TAG-SHIELDING_PHYSICAL"); } else if (bf.ChallengeType == EChallengeType.TypeMental) { value = ns.GetFloatAttribute("TAG-SHIELDING_MENTAL"); } else if (bf.ChallengeType == EChallengeType.TypeMental) { value = ns.GetFloatAttribute("TAG-SHIELDING_SPIRIT"); } } FInt f = GameplayUtils.GetDamageFor(data.t1, data.t0); return((value + f).ToInt().ToString()); } Multitype <SkillInstance, Subskill, ClientEntityCharacter> dInfo = info as Multitype <SkillInstance, Subskill, ClientEntityCharacter>; SkillInstance si = dInfo.t0; Subskill ss = dInfo.t1; ClientEntityCharacter character = dInfo.t2; var dataInWorld = si.GetCurrentSkillAttributes()[ss]; if (dataInWorld.attributes != null && dataInWorld.attributes.Count > 0) { FInt extra = FInt.ZERO; string st = null; foreach (var v in ss.challengeTypes) { if (character != null) { extra = GameplayUtils.GetDamageFor(si, ss, character, v); } FInt value = dataInWorld.GetFInt("TAG-CA_SHIELD"); string color = ""; switch (v) { case EChallengeType.TypePhysical: if (value == FInt.ZERO) { value = dataInWorld.GetFInt("TAG-SHIELDING_PHYSICAL"); } color = "XML_COLOR-PHYSICAL"; break; case EChallengeType.TypeMental: if (value == FInt.ZERO) { value = dataInWorld.GetFInt("TAG-SHIELDING_MENTAL"); } color = "XML_COLOR-MENTAL"; break; case EChallengeType.TypeSpirit: if (value == FInt.ZERO) { value = dataInWorld.GetFInt("TAG-SHIELDING_SPIRIT"); } color = "XML_COLOR-SPIRITUAL"; break; } if (st == null) { st = ""; } else { st += "|"; } if (extra != FInt.ZERO) { st += ColorUtils.GetColorAsTextTag(color) + extra + ColorUtils.GetColorAsTextTag("XML_COLOR-NORMAL_FONT") + " [+" + value + "]"; } else { st += " [+" + value + "]"; } } return(st != null ? st : ""); } return(""); }
static public string SI_ShieldUp(object info) { Multitype <NetCard, NetSkill, NetBattlefield> data = info as Multitype <NetCard, NetSkill, NetBattlefield>; if (data != null) { var ns = data.t1; var bf = data.t2; FInt value = ns.GetFloatAttribute("TAG-CA_SHIELD"); if (value == FInt.ZERO) { if (bf.ChallengeType == EChallengeType.TypePhysical) { value = ns.GetFloatAttribute("TAG-SHIELDING_PHYSICAL"); } else if (bf.ChallengeType == EChallengeType.TypeMental) { value = ns.GetFloatAttribute("TAG-SHIELDING_MENTAL"); } else if (bf.ChallengeType == EChallengeType.TypeMental) { value = ns.GetFloatAttribute("TAG-SHIELDING_SPIRIT"); } } return(value.ToInt().ToString()); } Multitype <SkillInstance, Subskill, ClientEntityCharacter> dInfo = info as Multitype <SkillInstance, Subskill, ClientEntityCharacter>; SkillInstance si = dInfo.t0; Subskill ss = dInfo.t1; ClientEntityCharacter character = dInfo.t2; var dataInWorld = si.GetCurrentSkillAttributes()[ss]; if (dataInWorld.attributes != null && dataInWorld.attributes.Count > 0) { string st = null; FInt value = dataInWorld.GetFInt("TAG-CA_SHIELD"); if (value == FInt.ZERO) { return(value.ToString()); } foreach (var v in ss.challengeTypes) { switch (v) { case EChallengeType.TypePhysical: value = dataInWorld.GetFInt("TAG-SHIELDING_PHYSICAL"); break; case EChallengeType.TypeMental: value = dataInWorld.GetFInt("TAG-SHIELDING_MENTAL"); break; case EChallengeType.TypeSpirit: value = dataInWorld.GetFInt("TAG-SHIELDING_SPIRIT"); break; } if (st == null) { st = ""; } else { st += "|"; } st += value; } return(st != null ? st : ""); } return(""); }