private string DeadText(BattlerSerializable battler) { var color = GuiDictionary.GetBattlerNameColor(battler.battlerType); StringBuilder sb = new StringBuilder(); sb.Append($"<color={color}>{battler.name}</color>は死亡した"); return(sb.ToString()); }
public void WakeUpText(BattlerSerializable battler) { StringBuilder sb = new StringBuilder(); var nameColor = GuiDictionary.GetBattlerNameColor(battler.battlerType); var texts = new List <string>(); sb.Append($"<color={nameColor}>{battler.name}</color>は目を覚ました"); texts.Add(sb.ToString()); AddText(texts); }
public void TurnStartText(int uniqId) { StringBuilder sb = new StringBuilder(); BattlerSerializable battler = BattlerDictionary.GetBattlerByUniqId(uniqId); var nameColor = GuiDictionary.GetBattlerNameColor(battler.battlerType); sb.Append($"<color={nameColor}>{battler.name}</color>のターン"); var texts = new List <string>(); texts.Add(sb.ToString()); AddText(texts); }
public void PoisonText(BattlerSerializable battler, int value, bool isDead) { StringBuilder sb = new StringBuilder(); var nameColor = GuiDictionary.GetBattlerNameColor(battler.battlerType); var skillColor = SkillsDicionary.SkillColor(SkillValueTarget.TARGET_POISON); var texts = new List <string>(); sb.Append($"<color={nameColor}>{battler.name}は</color><color={skillColor}>{value}</color>の毒ダメージを受けた"); texts.Add(sb.ToString()); if (isDead) { texts.Add(DeadText(battler)); } AddText(texts); }
public void AddDamageText(BattlerSerializable fromBattler, string skillName, List <SkillDamages> damageses) { List <string> texts = new List <string>(); StringBuilder sb = new StringBuilder(); var fromColor = GuiDictionary.GetBattlerNameColor(fromBattler.battlerType); sb.Append($"<color={fromColor}>").Append(fromBattler.name).Append("</color>の").Append(skillName) .Append("!"); texts.Add(sb.ToString()); List <BattlerSerializable> deadBattlers = new List <BattlerSerializable>(); damageses.ForEach(x => { sb.Clear(); var toBattler = BattlerDictionary.GetBattlerByUniqId(x.targetUniqId); var toColor = GuiDictionary.GetBattlerNameColor(toBattler.battlerType); if (x.isHit) { x.SkillDamage.ForEach(damage => { var targetText = SkillsDicionary.SkillAnnounceValueTargetText(damage.valueTarget); if (SkillsDicionary.IsDamageSkill(damage.valueTarget)) { sb.Clear(); var damageColor = SkillsDicionary.SkillColor(damage.valueTarget); sb.Append($"<color={toColor}>").Append(toBattler.name).Append("</color>に") .Append($"<color={damageColor}>").Append(damage.damage) .Append($"</color>の{targetText}"); texts.Add(sb.ToString()); } else { sb.Clear(); if (damage.damage != 0) { sb.Append($"<color={toColor}>").Append(toBattler.name).Append("</color>は") .Append($"{targetText}"); texts.Add(sb.ToString()); } else { var missText = SkillsDicionary.SkillAnnounceStateMissText(damage.valueTarget); sb.Append($"<color={toColor}>").Append(toBattler.name).Append("</color>は") .Append($"{missText}"); texts.Add(sb.ToString()); } } }); } else { sb.Append($"<color={toColor}>").Append(toBattler.name).Append("</color>は回避した!"); texts.Add(sb.ToString()); } if (x.isDead && deadBattlers.Find(battler => battler == toBattler) == null) { deadBattlers.Add(toBattler); } }); deadBattlers.ForEach(battler => { texts.Add(DeadText(battler)); }); AddText(texts); }