improvements
This commit is contained in:
@@ -0,0 +1,243 @@
|
||||
namespace Faraon.Core.AI;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Faraon.Core.Models;
|
||||
|
||||
public enum PlayerEmotion
|
||||
{
|
||||
Neutral = 0,
|
||||
Thinking = 1,
|
||||
Confident = 2,
|
||||
Shocked = 3,
|
||||
Freezing = 4,
|
||||
Angry = 5,
|
||||
Relieved = 6,
|
||||
Desperate = 7,
|
||||
Celebrating = 8
|
||||
}
|
||||
|
||||
public class AIPersonality
|
||||
{
|
||||
public string Id { get; init; } = "";
|
||||
public string Name { get; init; } = "";
|
||||
public string Title { get; init; } = "";
|
||||
public string BaseAvatar { get; init; } = "👤";
|
||||
public string Description { get; init; } = "";
|
||||
public AIDifficulty Difficulty { get; init; } = AIDifficulty.Medium;
|
||||
public string ColorTheme { get; init; } = "#f5b041";
|
||||
public Dictionary<PlayerEmotion, string> EmotionAvatars { get; init; } = new();
|
||||
|
||||
public string GetAvatarForEmotion(PlayerEmotion emotion)
|
||||
{
|
||||
if (EmotionAvatars.TryGetValue(emotion, out var av))
|
||||
{
|
||||
return av;
|
||||
}
|
||||
return BaseAvatar;
|
||||
}
|
||||
|
||||
public static readonly AIPersonality Fox = new()
|
||||
{
|
||||
Id = "fox",
|
||||
Name = "Fero 'Lišiak'",
|
||||
Title = "Prefíkaný blufér",
|
||||
BaseAvatar = "🦊",
|
||||
Description = "Rád vyčkáva a nečakane mení farbu na stole. Keď sa mu darí, uškŕňa sa.",
|
||||
Difficulty = AIDifficulty.Hard,
|
||||
ColorTheme = "#ea580c",
|
||||
EmotionAvatars = new()
|
||||
{
|
||||
[PlayerEmotion.Neutral] = "🦊",
|
||||
[PlayerEmotion.Thinking] = "🧐",
|
||||
[PlayerEmotion.Confident] = "😏",
|
||||
[PlayerEmotion.Shocked] = "🙀",
|
||||
[PlayerEmotion.Freezing] = "🥶",
|
||||
[PlayerEmotion.Angry] = "😾",
|
||||
[PlayerEmotion.Relieved] = "😸",
|
||||
[PlayerEmotion.Desperate] = "😿",
|
||||
[PlayerEmotion.Celebrating] = "🥳"
|
||||
}
|
||||
};
|
||||
|
||||
public static readonly AIPersonality Queen = new()
|
||||
{
|
||||
Id = "queen",
|
||||
Name = "Zuzka 'Kráľovná'",
|
||||
Title = "Chladnokrvná taktička",
|
||||
BaseAvatar = "👸",
|
||||
Description = "Vždy si stráži horníkov a premyslene kontroluje priebeh každej partie.",
|
||||
Difficulty = AIDifficulty.Hard,
|
||||
ColorTheme = "#ec4899",
|
||||
EmotionAvatars = new()
|
||||
{
|
||||
[PlayerEmotion.Neutral] = "👸",
|
||||
[PlayerEmotion.Thinking] = "🤔",
|
||||
[PlayerEmotion.Confident] = "💅",
|
||||
[PlayerEmotion.Shocked] = "😱",
|
||||
[PlayerEmotion.Freezing] = "🥶",
|
||||
[PlayerEmotion.Angry] = "😡",
|
||||
[PlayerEmotion.Relieved] = "😌",
|
||||
[PlayerEmotion.Desperate] = "😭",
|
||||
[PlayerEmotion.Celebrating] = "👑"
|
||||
}
|
||||
};
|
||||
|
||||
public static readonly AIPersonality Robot = new()
|
||||
{
|
||||
Id = "robot",
|
||||
Name = "Robo 'Algoritmus'",
|
||||
Title = "Kvantový analytik",
|
||||
BaseAvatar = "🤖",
|
||||
Description = "Počíta každú zahratú kartu. Neznáša chyby a emócie vyjadruje v bleskoch a iskričkách.",
|
||||
Difficulty = AIDifficulty.Hard,
|
||||
ColorTheme = "#06b6d4",
|
||||
EmotionAvatars = new()
|
||||
{
|
||||
[PlayerEmotion.Neutral] = "🤖",
|
||||
[PlayerEmotion.Thinking] = "🧠",
|
||||
[PlayerEmotion.Confident] = "⚡",
|
||||
[PlayerEmotion.Shocked] = "💥",
|
||||
[PlayerEmotion.Freezing] = "🧊",
|
||||
[PlayerEmotion.Angry] = "🛑",
|
||||
[PlayerEmotion.Relieved] = "🔋",
|
||||
[PlayerEmotion.Desperate] = "🫠",
|
||||
[PlayerEmotion.Celebrating] = "🚀"
|
||||
}
|
||||
};
|
||||
|
||||
public static readonly AIPersonality Grandpa = new()
|
||||
{
|
||||
Id = "grandpa",
|
||||
Name = "Dedo Jozef",
|
||||
Title = "Starý mariášnik",
|
||||
BaseAvatar = "👴",
|
||||
Description = "Hrá poctivú starú školu, žiadne zbytočné výmysly. Pri hre si rád dá virtuálne pivo.",
|
||||
Difficulty = AIDifficulty.Medium,
|
||||
ColorTheme = "#84cc16",
|
||||
EmotionAvatars = new()
|
||||
{
|
||||
[PlayerEmotion.Neutral] = "👴",
|
||||
[PlayerEmotion.Thinking] = "👓",
|
||||
[PlayerEmotion.Confident] = "🍻",
|
||||
[PlayerEmotion.Shocked] = "😵",
|
||||
[PlayerEmotion.Freezing] = "🧣",
|
||||
[PlayerEmotion.Angry] = "🤬",
|
||||
[PlayerEmotion.Relieved] = "👴",
|
||||
[PlayerEmotion.Desperate] = "🤦♂️",
|
||||
[PlayerEmotion.Celebrating] = "🏆"
|
||||
}
|
||||
};
|
||||
|
||||
public static readonly AIPersonality CyberKid = new()
|
||||
{
|
||||
Id = "cyberkid",
|
||||
Name = "CyberKid 'Gamer'",
|
||||
Title = "Turbo útočník",
|
||||
BaseAvatar = "👾",
|
||||
Description = "Rýchly a agresívny hráč. Hádže sedmy a esá bez váhania.",
|
||||
Difficulty = AIDifficulty.Medium,
|
||||
ColorTheme = "#a855f7",
|
||||
EmotionAvatars = new()
|
||||
{
|
||||
[PlayerEmotion.Neutral] = "👾",
|
||||
[PlayerEmotion.Thinking] = "📡",
|
||||
[PlayerEmotion.Confident] = "😎",
|
||||
[PlayerEmotion.Shocked] = "🤯",
|
||||
[PlayerEmotion.Freezing] = "❄️",
|
||||
[PlayerEmotion.Angry] = "👿",
|
||||
[PlayerEmotion.Relieved] = "🎮",
|
||||
[PlayerEmotion.Desperate] = "💀",
|
||||
[PlayerEmotion.Celebrating] = "🌟"
|
||||
}
|
||||
};
|
||||
|
||||
public static readonly AIPersonality Cat = new()
|
||||
{
|
||||
Id = "cat",
|
||||
Name = "Mačka Minda",
|
||||
Title = "Hravá šibalica",
|
||||
BaseAvatar = "🐱",
|
||||
Description = "Hravá a nevyspytateľná. Občas spôsobí chaos, ale teší sa z každej vyhratej rybičky.",
|
||||
Difficulty = AIDifficulty.Easy,
|
||||
ColorTheme = "#f59e0b",
|
||||
EmotionAvatars = new()
|
||||
{
|
||||
[PlayerEmotion.Neutral] = "🐱",
|
||||
[PlayerEmotion.Thinking] = "🐾",
|
||||
[PlayerEmotion.Confident] = "😸",
|
||||
[PlayerEmotion.Shocked] = "🙀",
|
||||
[PlayerEmotion.Freezing] = "😿",
|
||||
[PlayerEmotion.Angry] = "😾",
|
||||
[PlayerEmotion.Relieved] = "😻",
|
||||
[PlayerEmotion.Desperate] = "😿",
|
||||
[PlayerEmotion.Celebrating] = "🐟"
|
||||
}
|
||||
};
|
||||
|
||||
public static readonly AIPersonality Wizard = new()
|
||||
{
|
||||
Id = "wizard",
|
||||
Name = "Čarodej Baltazár",
|
||||
Title = "Tajomný iluzionista",
|
||||
BaseAvatar = "🧙",
|
||||
Description = "Verí v magické spálenie 4 kariet a zázračné obraty v poslednej chvíli.",
|
||||
Difficulty = AIDifficulty.Medium,
|
||||
ColorTheme = "#6366f1",
|
||||
EmotionAvatars = new()
|
||||
{
|
||||
[PlayerEmotion.Neutral] = "🧙",
|
||||
[PlayerEmotion.Thinking] = "🔮",
|
||||
[PlayerEmotion.Confident] = "✨",
|
||||
[PlayerEmotion.Shocked] = "👁️",
|
||||
[PlayerEmotion.Freezing] = "🧊",
|
||||
[PlayerEmotion.Angry] = "🌩️",
|
||||
[PlayerEmotion.Relieved] = "🧙♂️",
|
||||
[PlayerEmotion.Desperate] = "🥀",
|
||||
[PlayerEmotion.Celebrating] = "🪄"
|
||||
}
|
||||
};
|
||||
|
||||
public static readonly AIPersonality Bear = new()
|
||||
{
|
||||
Id = "bear",
|
||||
Name = "Medveď Mišo",
|
||||
Title = "Tatranský silák",
|
||||
BaseAvatar = "🐻",
|
||||
Description = "Keď dostane veľa sediem, hrozivo zúri. No keď vyloží eso, trasie sa celý stôl.",
|
||||
Difficulty = AIDifficulty.Easy,
|
||||
ColorTheme = "#b45309",
|
||||
EmotionAvatars = new()
|
||||
{
|
||||
[PlayerEmotion.Neutral] = "🐻",
|
||||
[PlayerEmotion.Thinking] = "🍯",
|
||||
[PlayerEmotion.Confident] = "😁",
|
||||
[PlayerEmotion.Shocked] = "😳",
|
||||
[PlayerEmotion.Freezing] = "🥶",
|
||||
[PlayerEmotion.Angry] = "🐻❄️",
|
||||
[PlayerEmotion.Relieved] = "🐻",
|
||||
[PlayerEmotion.Desperate] = "😭",
|
||||
[PlayerEmotion.Celebrating] = "🍖"
|
||||
}
|
||||
};
|
||||
|
||||
public static readonly AIPersonality[] All =
|
||||
[
|
||||
Fox,
|
||||
Queen,
|
||||
Robot,
|
||||
Grandpa,
|
||||
CyberKid,
|
||||
Cat,
|
||||
Wizard,
|
||||
Bear
|
||||
];
|
||||
|
||||
public static AIPersonality GetById(string id)
|
||||
{
|
||||
foreach (var p in All)
|
||||
{
|
||||
if (p.Id.Equals(id, System.StringComparison.OrdinalIgnoreCase)) return p;
|
||||
}
|
||||
return Fox;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user