// Returns combat log color private Brush GetCombatLogColor(CombatLogTypes combatLogType) { switch (combatLogType) { case CombatLogTypes.BasicDamage: return(Brushes.Red); case CombatLogTypes.SpellUsage: return(Brushes.Blue); case CombatLogTypes.StatChange: return(Brushes.Orange); default: return(Brushes.Black); } }
// Write info about damage into combat log chat tab public void LogDamage(CombatLogTypes combatLogType, PlayableCard attacker, PlayableCard victim, byte damage, bool alive) { var message = alive ? $"{attacker.Name} dealt {damage} damage to {victim.Name}" : $"{attacker.Name} killed {victim.Name} with {damage}"; WriteLog(message, combatLogType); }
// Writes message into combat log public void WriteLog(string message, CombatLogTypes combatLogType) { InvokeToChat(message, clientGame.MainWindow.CombatLogChatTab, GetCombatLogColor(combatLogType)); }