public string ConvertSummary() { StringBuilder sb = new StringBuilder(); string mobStr = null; if (MobName != null) { mobStr = MobName; } else if (Mobs.Count > 0) { mobStr = Mobs[0].ToString(); } foreach (var kv in this.Props) { if (kv.Key == GearPropType.damR) { sb.AppendFormat("+{0}% damage", kv.Value); sb.AppendFormat(" when attacking {0}.", mobStr); } else { sb.Append(ItemStringHelper.GetGearPropString(kv.Key, kv.Value)); sb.AppendFormat(" when attacking {0}.", mobStr); } } return(sb.ToString(0, sb.Length)); }
public string GetPropString() { StringBuilder sb; switch (this.Type) { case AdditionType.boss: sb = new StringBuilder(); sb.Append("攻击BOSS时,"); { string v1; if (this.Props.TryGetValue("prob", out v1)) { sb.Append("有" + v1 + "的几率"); } sb.Append("造成" + Props["damage"] + "%的额外伤害"); } return(sb.ToString()); case AdditionType.critical: sb = new StringBuilder(); { string val; if (this.Props.TryGetValue("prob", out val)) { sb.AppendFormat("爆击率{0}%\r\n", val); } if (this.Props.TryGetValue("damage", out val)) { sb.AppendFormat("爆击伤害增加{0}%\r\n", val); } if (sb.Length > 2) { sb.Remove(sb.Length - 2, 2); } } return(sb.ToString()); case AdditionType.elemboost: { string v1, elem; if (this.Props.TryGetValue("elemVol", out v1)) { switch (v1[0]) { case 'I': elem = "冰"; break; case 'F': elem = "火"; break; case 'L': elem = "雷"; break; default: elem = v1[0].ToString(); break; } return(elem + "属性效果强化" + v1.Substring(1) + "%"); } } break; case AdditionType.hpmpchange: sb = new StringBuilder(); sb.Append("每10秒恢复"); { string v1; if (this.Props.TryGetValue("hpChangePerTime", out v1)) { sb.Append("HP " + v1); } } return(sb.ToString()); case AdditionType.mobcategory: return("攻击" + ItemStringHelper.GetMobCategoryName(Convert.ToInt32(this.Props["category"])) + "怪物时,造成" + this.Props["damage"] + "%额外伤害"); case AdditionType.mobdie: sb = new StringBuilder(); { string v1; if (this.Props.TryGetValue("hpIncOnMobDie", out v1)) { sb.AppendLine("怪物死亡时 HP恢复" + v1); } if (this.Props.TryGetValue("hpIncRatioOnMobDie", out v1)) { sb.AppendLine("怪物死亡时 有" + Props["hpRatioProp"] + "%的几率 伤害的" + v1 + "%转换为HP (但不超过最大HP的10%。)"); } if (this.Props.TryGetValue("mpIncOnMobDie", out v1)) { sb.AppendLine("怪物死亡时 HP恢复" + v1); } if (this.Props.TryGetValue("mpIncRatioOnMobDie", out v1)) { sb.AppendLine("怪物死亡时 有" + Props["mpRatioProp"] + "%的几率 伤害的" + v1 + "%转换为MP (但不超过最大MP的10%。)"); } } if (sb.Length > 0) { sb.Append("在部分地区功能可能会受到限制。"); return(sb.ToString()); } break; case AdditionType.skill: switch (Convert.ToInt32(this.Props["id"])) { case 90000000: return("有一定几率增加必杀效果"); case 90001001: return("有一定几率增加眩晕效果"); case 90001002: return("有一定几率增加缓速术效果"); case 90001003: return("有一定几率增加毒效果"); case 90001004: return("有一定几率增加暗黑效果"); case 90001005: return("有一定几率增加封印效果"); case 90001006: return("有一定几率增加结冰效果"); } break; case AdditionType.statinc: sb = new StringBuilder(); { foreach (var kv in Props) { try { GearPropType propType = (GearPropType)Enum.Parse(typeof(GearPropType), kv.Key); sb.AppendLine(ItemStringHelper.GetGearPropString(propType, Convert.ToInt32(kv.Value))); } catch { } } } if (sb.Length > 0) { return(sb.ToString()); } break; default: return(null); } return(null); }
public string GetPropString() { StringBuilder sb; switch (this.Type) { case AdditionType.boss: sb = new StringBuilder(); sb.Append("Boss Damage Increased by, "); { string v1; if (this.Props.TryGetValue("prob", out v1)) { sb.Append(v1 + "%"); } sb.Append(Props["damage"] + "%"); } return(sb.ToString()); case AdditionType.critical: sb = new StringBuilder(); { string val; if (this.Props.TryGetValue("prob", out val)) { sb.AppendFormat("Critical Chance increased by {0}%\r\n", val); } if (this.Props.TryGetValue("damage", out val)) { sb.AppendFormat("Minimum Critical Damage increased by {0}%\r\n", val); } if (sb.Length > 2) { sb.Remove(sb.Length - 2, 2); } } return(sb.ToString()); case AdditionType.elemboost: { string v1, elem; if (this.Props.TryGetValue("elemVol", out v1)) { switch (v1[0]) { case 'I': elem = "冰"; break; case 'F': elem = "불"; break; case 'L': elem = "雷"; break; default: elem = v1[0].ToString(); break; } return(elem + "속성 효과 " + v1.Substring(1) + "% 강화"); } } break; case AdditionType.hpmpchange: sb = new StringBuilder(); sb.Append("Every 10 seconds regain "); { string v1; if (this.Props.TryGetValue("hpChangePerTime", out v1)) { sb.Append("HP " + v1); } } return(sb.ToString()); case AdditionType.mobcategory: return(ItemStringHelper.GetMobCategoryName(Convert.ToInt32(this.Props["category"])) + " receive " + this.Props["damage"] + "% additional damage"); case AdditionType.mobdie: sb = new StringBuilder(); { string v1; if (this.Props.TryGetValue("hpIncOnMobDie", out v1)) { sb.AppendLine("HP restored on monster death: " + v1 + " 회복"); } if (this.Props.TryGetValue("hpIncRatioOnMobDie", out v1)) { sb.AppendLine("怪物死亡时 有" + Props["hpRatioProp"] + "%的几率 伤害的" + v1 + "%转换为HP (但不超过最大HP的10%。)"); } if (this.Props.TryGetValue("mpIncOnMobDie", out v1)) { sb.AppendLine("MP restored on monster death: " + v1); } if (this.Props.TryGetValue("mpIncRatioOnMobDie", out v1)) { sb.AppendLine("怪物死亡时 有" + Props["mpRatioProp"] + "%的几率 伤害的" + v1 + "%转换为MP (但不超过最大MP的10%。)"); } } if (sb.Length > 0) { sb.Append("일부 지역에서는 기능이 제한될 수 있다."); return(sb.ToString()); } break; case AdditionType.skill: switch (Convert.ToInt32(this.Props["id"])) { case 90000000: return("有一定几率增加必杀效果"); case 90001001: return("확률적으로 기절 효과 추가"); case 90001002: return("확률적으로 슬로우 효과 추가"); case 90001003: return("확률적으로 독 효과 추가"); case 90001004: return("확률적으로 암흑 효과 추가"); case 90001005: return("확률적으로 봉인 효과 추가"); case 90001006: return("확률적으로 결빙 효과 추가"); } break; case AdditionType.statinc: sb = new StringBuilder(); { foreach (var kv in Props) { try { GearPropType propType = (GearPropType)Enum.Parse(typeof(GearPropType), kv.Key); sb.AppendLine(ItemStringHelper.GetGearPropString(propType, Convert.ToInt32(kv.Value))); } catch { } } } if (sb.Length > 0) { return(sb.ToString()); } break; default: return(null); } return(null); }
public string GetPropString() { StringBuilder sb; switch (this.Type) { case AdditionType.boss: sb = new StringBuilder(); sb.Append("보스 공격 시, "); { string v1; if (this.Props.TryGetValue("prob", out v1)) { sb.Append(v1 + "%의 확률로 "); } sb.Append(Props["damage"] + "%의 데미지 추가"); } return(sb.ToString()); case AdditionType.critical: sb = new StringBuilder(); { string val; if (this.Props.TryGetValue("prob", out val)) { sb.AppendFormat("크리티컬 확률 {0}%\r\n", val); } if (this.Props.TryGetValue("damage", out val)) { sb.AppendFormat("크리티컬 데미지 {0}%증가\r\n", val); } if (sb.Length > 2) { sb.Remove(sb.Length - 2, 2); } } return(sb.ToString()); case AdditionType.elemboost: { string v1, elem; if (this.Props.TryGetValue("elemVol", out v1)) { switch (v1[0]) { case 'I': elem = "얼음"; break; case 'F': elem = "불"; break; case 'L': elem = "전기"; break; default: elem = v1[0].ToString(); break; } return(elem + "속성 효과 " + v1.Substring(1) + "% 강화"); } } break; case AdditionType.hpmpchange: sb = new StringBuilder(); sb.Append("每10秒恢复"); { string v1; if (this.Props.TryGetValue("hpChangePerTime", out v1)) { sb.Append("HP " + v1); } } return(sb.ToString()); case AdditionType.mobcategory: return(ItemStringHelper.GetMobCategoryName(Convert.ToInt32(this.Props["category"])) + " 몬스터 공격 시, " + this.Props["damage"] + "% 추가 데미지"); case AdditionType.mobdie: sb = new StringBuilder(); { string v1; if (this.Props.TryGetValue("hpIncOnMobDie", out v1)) { sb.AppendLine("몬스터 사망 시 HP " + v1 + " 회복"); } if (this.Props.TryGetValue("hpIncRatioOnMobDie", out v1)) { sb.AppendLine("몬스터 사망 시 " + Props["hpRatioProp"] + "%의 확률로 데미지의 " + v1 + "%의 HP 회복 ( 단 최대 HP의 10%를 넘을 수 없다. )"); } if (this.Props.TryGetValue("mpIncOnMobDie", out v1)) { sb.AppendLine("몬스터 사망 시 MP " + v1 + " 회복"); } if (this.Props.TryGetValue("mpIncRatioOnMobDie", out v1)) { sb.AppendLine("몬스터 사망 시 " + Props["hpRatioProp"] + "%의 확률로 데미지의 " + v1 + "%의 MP 회복 ( 단 최대 MP의 10%를 넘을 수 없다. )"); } } if (sb.Length > 0) { sb.Append("일부 지역에서는 기능이 제한될 수 있다."); return(sb.ToString()); } break; case AdditionType.skill: switch (Convert.ToInt32(this.Props["id"])) { //case 90000000: return "확률적으로 즉사 효과 추가"; case 90001001: return("확률적으로 기절 효과 추가"); case 90001002: return("확률적으로 슬로우 효과 추가"); case 90001003: return("확률적으로 독 효과 추가"); case 90001004: return("확률적으로 암흑 효과 추가"); case 90001005: return("확률적으로 봉인 효과 추가"); case 90001006: return("확률적으로 결빙 효과 추가"); } break; case AdditionType.statinc: sb = new StringBuilder(); { foreach (var kv in Props) { try { GearPropType propType = (GearPropType)Enum.Parse(typeof(GearPropType), kv.Key); sb.AppendLine(ItemStringHelper.GetGearPropString(propType, Convert.ToInt32(kv.Value))); } catch { } } } if (sb.Length > 0) { return(sb.ToString()); } break; default: return(null); } return(null); }
public string GetPropString() { StringBuilder sb; switch (this.Type) { case AdditionType.boss: sb = new StringBuilder(); sb.Append("Has a "); { string v1; if (this.Props.TryGetValue("prob", out v1)) { sb.Append(v1 + "% chance to deal "); } sb.Append(Props["damage"] + "% extra damage on boss monsters."); } return(sb.ToString()); case AdditionType.critical: sb = new StringBuilder(); { string val; if (this.Props.TryGetValue("prob", out val)) { sb.AppendFormat("Critical Rate: +{0}%\r\n", val); } if (this.Props.TryGetValue("damage", out val)) { sb.AppendFormat("Critical Damage: +{0}%\r\n", val); } if (sb.Length > 2) { sb.Remove(sb.Length - 2, 2); } } return(sb.ToString()); case AdditionType.elemboost: { string v1, elem; if (this.Props.TryGetValue("elemVol", out v1)) { switch (v1[0]) { case 'I': elem = "Ice"; break; case 'F': elem = "Fire"; break; case 'L': elem = "Lightning"; break; default: elem = v1[0].ToString(); break; } return(elem + "-Type Attack Damage: +" + v1.Substring(1) + "%"); } } break; case AdditionType.hpmpchange: sb = new StringBuilder(); sb.Append("Every 10 seconds, recover "); { string v1; if (this.Props.TryGetValue("hpChangePerTime", out v1)) { sb.Append(v1 + " HP"); } } return(sb.ToString()); case AdditionType.mobcategory: return("When attacking " + ItemStringHelper.GetMobCategoryName(Convert.ToInt32(this.Props["category"])) + "type enemies, deals " + this.Props["damage"] + "% extra damage."); case AdditionType.mobdie: sb = new StringBuilder(); { string v1; if (this.Props.TryGetValue("hpIncOnMobDie", out v1)) { sb.AppendLine("When you kill a monster, recover " + v1 + " HP"); } if (this.Props.TryGetValue("hpIncRatioOnMobDie", out v1)) { sb.AppendLine("When you kill a monster, you have " + Props["hpRatioProp"] + "% chance to recover HP equal to " + v1 + "% of the damage taken (cannot exceed 10% of Max HP.)"); } if (this.Props.TryGetValue("mpIncOnMobDie", out v1)) { sb.AppendLine("When you kill a monster, recover " + v1 + " MP"); } if (this.Props.TryGetValue("mpIncRatioOnMobDie", out v1)) { sb.AppendLine("When you kill a monster, you have " + Props["mpRatioProp"] + "% chance to recover MP equal to " + v1 + "% of the damage taken (cannot exceed 10% of Max MP.)"); } } if (sb.Length > 0) { sb.Append("Function may be limited in some locations."); return(sb.ToString()); } break; case AdditionType.skill: switch (Convert.ToInt32(this.Props["id"])) { case 90000000: return("Has a chance to add: Instant Death effect"); case 90001001: return("Has a chance to add: Knock Down effect"); case 90001002: return("Has a chance to add: Slow effect"); case 90001003: return("Has a chance to add: Poison effect"); case 90001004: return("Has a chance to add: Darkness effect"); case 90001005: return("Has a chance to add: Seal effect"); case 90001006: return("Has a chance to add: Freeze effect"); } break; case AdditionType.statinc: sb = new StringBuilder(); { foreach (var kv in Props) { try { GearPropType propType = (GearPropType)Enum.Parse(typeof(GearPropType), kv.Key); sb.AppendLine(ItemStringHelper.GetGearPropString(propType, Convert.ToInt32(kv.Value))); } catch { } } } if (sb.Length > 0) { return(sb.ToString()); } break; default: return(null); } return(null); }