Neue Töne, Reiter mit Anleitung, Klingen geeicht, Sprung, Vorschaubilder aus 3D
Stand von main 262a2009. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
BIN
Assets/Audio/amb_crowd.mp3
Normal file
BIN
Assets/Audio/amb_crowd.mp3
Normal file
Binary file not shown.
BIN
Assets/Audio/sfx_drawer.mp3
Normal file
BIN
Assets/Audio/sfx_drawer.mp3
Normal file
Binary file not shown.
BIN
Assets/Audio/sfx_equip.mp3
Normal file
BIN
Assets/Audio/sfx_equip.mp3
Normal file
Binary file not shown.
BIN
Assets/Audio/sfx_fire.mp3
Normal file
BIN
Assets/Audio/sfx_fire.mp3
Normal file
Binary file not shown.
BIN
Assets/Audio/sfx_fury.mp3
Normal file
BIN
Assets/Audio/sfx_fury.mp3
Normal file
Binary file not shown.
BIN
Assets/Audio/sfx_guardbreak.mp3
Normal file
BIN
Assets/Audio/sfx_guardbreak.mp3
Normal file
Binary file not shown.
BIN
Assets/Audio/sfx_ko.mp3
Normal file
BIN
Assets/Audio/sfx_ko.mp3
Normal file
Binary file not shown.
BIN
Assets/Audio/sfx_land.mp3
Normal file
BIN
Assets/Audio/sfx_land.mp3
Normal file
Binary file not shown.
BIN
Assets/Audio/sfx_parry.mp3
Normal file
BIN
Assets/Audio/sfx_parry.mp3
Normal file
Binary file not shown.
BIN
Assets/Audio/sfx_step.mp3
Normal file
BIN
Assets/Audio/sfx_step.mp3
Normal file
Binary file not shown.
BIN
Assets/Audio/sfx_swing.mp3
Normal file
BIN
Assets/Audio/sfx_swing.mp3
Normal file
Binary file not shown.
BIN
Assets/Audio/sfx_swing_heavy.mp3
Normal file
BIN
Assets/Audio/sfx_swing_heavy.mp3
Normal file
Binary file not shown.
BIN
Assets/Audio/sfx_whoosh.mp3
Normal file
BIN
Assets/Audio/sfx_whoosh.mp3
Normal file
Binary file not shown.
@@ -71,6 +71,19 @@ namespace GladiatorIdle
|
||||
public static void PlayTip() => Play("sfx_tip", _wavGood, cooldownMs: 400);
|
||||
public static void PlayGoodEvent() => Play("sfx_good", _wavGood); // Probeton (Einstellungen)
|
||||
public static void PlayChapterSting() => Play("sting_chapter", _wavMilestone);
|
||||
// Duell und Oberfläche (nur mit Datei; fehlt sie, bleibt es still)
|
||||
public static void PlaySwing() => Play("sfx_swing", null, cooldownMs: 70, gain: 0.5f);
|
||||
public static void PlaySwingHeavy() => Play("sfx_swing_heavy", null, cooldownMs: 120, gain: 0.6f);
|
||||
public static void PlayWhoosh() => Play("sfx_whoosh", null, cooldownMs: 120, gain: 0.5f);
|
||||
public static void PlayLand() => Play("sfx_land", null, cooldownMs: 200, gain: 0.6f);
|
||||
public static void PlayParry() => Play("sfx_parry", null, cooldownMs: 100, gain: 0.6f);
|
||||
public static void PlayGuardBreak() => Play("sfx_guardbreak", null, cooldownMs: 150, gain: 0.6f);
|
||||
public static void PlayKo() => Play("sfx_ko", null, cooldownMs: 500, gain: 0.7f);
|
||||
public static void PlayFury() => Play("sfx_fury", null, cooldownMs: 500, gain: 0.7f);
|
||||
public static void PlayFire() => Play("sfx_fire", null, cooldownMs: 90, gain: 0.55f);
|
||||
public static void PlayStep() => Play("sfx_step", null, cooldownMs: 160, gain: 0.25f);
|
||||
public static void PlayDrawer() => Play("sfx_drawer", null, cooldownMs: 150, gain: 0.45f);
|
||||
public static void PlayEquip() => Play("sfx_equip", null, cooldownMs: 120, gain: 0.5f);
|
||||
|
||||
// ── Erzählstimme (Intro) ─────────────────────────────────────
|
||||
// Eigene Spur: immer nur ein Satz gleichzeitig, eigene Lautstärke (VoiceLevel).
|
||||
@@ -329,8 +342,9 @@ namespace GladiatorIdle
|
||||
}
|
||||
}
|
||||
|
||||
static void Play(string name, byte[] fallback, long cooldownMs = 0, float gain = 1f)
|
||||
static void Play(string name, byte[]? fallback, long cooldownMs = 0, float gain = 1f)
|
||||
{
|
||||
if (DevShot.SoundLog) DevShot.Log($"sound: want {name}" + (HasClip(name) || fallback != null ? "" : " (no file)")); // auch stumm prüfbar
|
||||
if (!_enabled || SfxLevel <= 0.001f) return;
|
||||
if (Environment.TickCount64 < Interlocked.Read(ref _quietUntil)) // Erzählstimme: Ruhe
|
||||
{
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
"forum.tab.gods": "Götter",
|
||||
"forum.xps": "Jetzt: {0} XP/s",
|
||||
"forum.recovery": "Erholung: {0}",
|
||||
"upgrade.trainer.desc": "Trainiert {0}, während du den Kämpfen zusiehst.",
|
||||
"upgrade.trainer.desc": "Trainiert {0} nach und nach – auch wenn du nicht spielst.",
|
||||
"upgrade.building.baths.desc": "Schnellere Erholung nach einer Niederlage (−12 % je Stufe).",
|
||||
"upgrade.building.kitchen.desc": "Besseres Essen: +15 % XP je Stufe.",
|
||||
"upgrade.building.medicus.desc": "Ein Heiler für den Ludus: +8 % Leben je Stufe.",
|
||||
@@ -540,5 +540,58 @@
|
||||
"lb.col.class": "Klasse",
|
||||
"lb.col.freedoms": "Freiheiten",
|
||||
"lb.you": "du",
|
||||
"lb.yourrank": "Dein Platz: {0} von {1}"
|
||||
"lb.yourrank": "Dein Platz: {0} von {1}",
|
||||
"btn.buy": "Kaufen · {0}",
|
||||
"btn.forge": "Verstärken · {0}",
|
||||
"guide.title": "So geht's",
|
||||
"guide.tip": "Tipp gerade",
|
||||
"guide.gladiator.what": "Dein Gladiator: Werte, Ausrüstung und Inventar.",
|
||||
"guide.gladiator.1": "Jede Stufe bringt einen Attributpunkt. Verteile ihn mit „+“.",
|
||||
"guide.gladiator.2": "Stärke = Schaden, Ausdauer = Leben, Geschick = kritische Treffer, Showtalent = mehr Ruhm und Stimmung.",
|
||||
"guide.gladiator.3": "Klicke einen Gegenstand im Inventar an: die Karte zeigt seine Werte und um wie viel du stärker wirst (grün).",
|
||||
"guide.gladiator.4": "„Bestes anlegen“ wählt die stärkste Ausrüstung. Den Rest verkaufst du für Denare.",
|
||||
"guide.ludus.what": "Deine Gladiatorenschule: Ausbilder und Gebäude wirken die ganze Zeit, auch wenn du nicht spielst.",
|
||||
"guide.ludus.1": "Ausbilder steigern einen Wert nach und nach, während die Zeit vergeht.",
|
||||
"guide.ludus.2": "Gebäude geben Dauerboni: schnellere Erholung, mehr Erfahrung, mehr Leben, Denare pro Sekunde.",
|
||||
"guide.ludus.3": "Jede Stufe kostet etwas mehr als die vorige.",
|
||||
"guide.ludus.4": "Gewinne Kämpfe für Denare und investiere früh hier: das zahlt sich mit der Zeit aus.",
|
||||
"guide.forum.what": "Der Markt: Der Händler verkauft Ausrüstung, der Schmied verstärkt deine Ausrüstungsplätze.",
|
||||
"guide.forum.1": "Die grüne Zahl zeigt, um wie viel dich ein Stück stärker machen würde.",
|
||||
"guide.forum.2": "Der Händler bringt regelmäßig neue Ware – die Zeit steht über der Liste.",
|
||||
"guide.forum.3": "Der Schmied verstärkt einen Platz, nicht ein Stück: jedes Teil, das du dort trägst, profitiert.",
|
||||
"guide.forum.4": "Gekaufte Stücke landen im Inventar – anlegen im Reiter Gladiator.",
|
||||
"guide.skills.what": "Dein Fähigkeitenbaum: drei Zweige mit Dauerboni und neuen Angriffen fürs Duell.",
|
||||
"guide.skills.1": "Alle zwei Stufen bekommst du einen Fähigkeitspunkt.",
|
||||
"guide.skills.2": "Klicke eine Fähigkeit an, um sie zu lernen. Untere Reihen öffnen sich mit genug Punkten im Zweig.",
|
||||
"guide.skills.3": "Fähigkeiten mit „Duell-Angriff“ legen neue Angriffe auf Q, W und E im Kampf.",
|
||||
"guide.skills.4": "Umentschieden? Setze den Baum für ein paar Denare zurück.",
|
||||
"guide.hall.what": "Deine Legenden und die Götter: Das bleibt, wenn ein Gladiator die Freiheit gewinnt.",
|
||||
"guide.hall.1": "Besiege den Champion der letzten Arena: Dein Gladiator wird frei und zieht als Legende in diese Halle.",
|
||||
"guide.hall.2": "Fordere Legenden zum Duell – der erste Sieg über jede bringt Gunst der Götter.",
|
||||
"guide.hall.3": "Opfere die Gunst den Göttern: Ihre Boni helfen jedem Gladiator nach dir.",
|
||||
"guide.hall.4": "Rote Stärke = stärker als du, grün = schlagbar.",
|
||||
"guide.expedition.what": "Schicke deinen Gladiator in die Provinzen – für Beute, Denare und Erfahrung.",
|
||||
"guide.expedition.1": "Wähle eine Region. Die Erfolgschance steigt mit deiner Kampfkraft; mit jeder Arena öffnen sich neue.",
|
||||
"guide.expedition.2": "Wähle die Dauer: längere Reisen bringen mehr Beute.",
|
||||
"guide.expedition.3": "Solange er unterwegs ist, kämpft er nicht in der Arena – sein Training läuft aber weiter.",
|
||||
"guide.expedition.4": "Eine misslungene Reise bringt halben Lohn, keine Beute und eine Ruhepause. Zurückrufen geht jederzeit (ohne Lohn).",
|
||||
"tip.gladiator.points": "Du hast {0} Attributpunkt(e) zu verteilen – drück „+“ neben einem Wert.",
|
||||
"tip.gladiator.better": "{0} im Inventar ist besser als deine Ausrüstung. Drück „Bestes anlegen“.",
|
||||
"tip.gladiator.full": "Dein Inventar ist fast voll. Verkaufe, was du nicht brauchst („Alle verkaufen“).",
|
||||
"tip.gladiator.none": "Alles bestens. Gewinne Kämpfe für Erfahrung und Beute.",
|
||||
"tip.ludus.afford": "Du kannst dir {0} leisten – die günstigste Verbesserung gerade.",
|
||||
"tip.ludus.save": "Die nächste Verbesserung ist {0}: Es fehlen noch {1} Denare.",
|
||||
"tip.forum.buy": "Lohnt sich: {0} macht dich {1} stärker.",
|
||||
"tip.forum.forge": "Beim Händler nichts Besseres – lass den Schmied deinen Platz {0} verstärken.",
|
||||
"tip.forum.wait": "Gerade lohnt sich nichts. Neue Ware in {0}.",
|
||||
"tip.skills.points": "Du hast {0} Fähigkeitspunkt(e) – klicke eine leuchtende Fähigkeit an.",
|
||||
"tip.skills.next": "Der nächste Fähigkeitspunkt kommt mit Stufe {0}.",
|
||||
"tip.hall.none": "Noch keine Legenden. Erringe die Freiheit gegen den Champion des Kaisers, um in die Halle einzuziehen.",
|
||||
"tip.hall.beatable": "{0} ist schlagbar – fordere die Legende heraus für +{1} Gunst der Götter.",
|
||||
"tip.hall.favor": "Du hast {0} Gunst der Götter. Opfere sie unten für dauerhafte Boni.",
|
||||
"tip.hall.later": "Die übrigen Legenden sind noch zu stark. Komm wieder, wenn du stärker bist.",
|
||||
"tip.hall.done": "Du hast jede Legende besiegt. Erringe erneut die Freiheit für eine neue.",
|
||||
"tip.exp.away": "Dein Gladiator ist unterwegs – zurück in {0}. Verbessere solange deinen Ludus.",
|
||||
"tip.exp.safe": "{0} ist für dich sicher (ab 75 %). Ein gutes Ziel.",
|
||||
"tip.exp.risky": "Jede offene Region ist noch riskant. Werde erst stärker oder wähle eine kurze Reise."
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
"forum.tab.gods": "Gods",
|
||||
"forum.xps": "Now: {0} XP/s",
|
||||
"forum.recovery": "Recovery: {0}",
|
||||
"upgrade.trainer.desc": "Trains {0} while you watch the fights.",
|
||||
"upgrade.trainer.desc": "Trains {0} bit by bit over time – even while you are away.",
|
||||
"upgrade.building.baths.desc": "Faster recovery after a defeat (−12% per level).",
|
||||
"upgrade.building.kitchen.desc": "Better food: +15% XP per level.",
|
||||
"upgrade.building.medicus.desc": "A healer for the ludus: +8% health per level.",
|
||||
@@ -540,5 +540,58 @@
|
||||
"lb.col.class": "Class",
|
||||
"lb.col.freedoms": "Freedoms",
|
||||
"lb.you": "you",
|
||||
"lb.yourrank": "Your rank: {0} of {1}"
|
||||
"lb.yourrank": "Your rank: {0} of {1}",
|
||||
"btn.buy": "Buy · {0}",
|
||||
"btn.forge": "Reinforce · {0}",
|
||||
"guide.title": "How it works",
|
||||
"guide.tip": "Tip right now",
|
||||
"guide.gladiator.what": "Your gladiator: values, equipment and inventory.",
|
||||
"guide.gladiator.1": "Every level gives an attribute point. Spend it with “+”.",
|
||||
"guide.gladiator.2": "Strength = damage, Endurance = health, Agility = critical hits, Showmanship = more fame and a livelier crowd.",
|
||||
"guide.gladiator.3": "Click an item in the inventory: the card shows its values and how much stronger you would get (green).",
|
||||
"guide.gladiator.4": "“Equip best” picks the strongest set. Sell the rest for denarii.",
|
||||
"guide.ludus.what": "Your gladiator school: trainers and buildings work all the time, even while you are away.",
|
||||
"guide.ludus.1": "Trainers raise one value step by step while the days go by.",
|
||||
"guide.ludus.2": "Buildings give lasting bonuses: faster recovery, more experience, more health, denarii every second.",
|
||||
"guide.ludus.3": "Each level costs a little more than the last one.",
|
||||
"guide.ludus.4": "Win fights for denarii and invest them here early: it pays off over time.",
|
||||
"guide.forum.what": "The market: the merchant sells equipment, the smith reinforces your equipment slots.",
|
||||
"guide.forum.1": "The green number shows how much stronger an item would make you.",
|
||||
"guide.forum.2": "The merchant brings new wares regularly – the time is shown above the list.",
|
||||
"guide.forum.3": "The smith reinforces a slot, not an item: every piece you wear there profits.",
|
||||
"guide.forum.4": "Bought items go into your inventory – equip them in the Gladiator tab.",
|
||||
"guide.skills.what": "Your skill tree: three branches with passive bonuses and new attacks for the duel.",
|
||||
"guide.skills.1": "You get a skill point every two levels.",
|
||||
"guide.skills.2": "Click a skill to learn it. Lower rows open after enough points in their branch.",
|
||||
"guide.skills.3": "“Duel attack” skills put new moves on Q, W and E in the fight.",
|
||||
"guide.skills.4": "Changed your mind? Reset the tree for some denarii.",
|
||||
"guide.hall.what": "Your legends and the gods: whatever stays when a gladiator wins his freedom.",
|
||||
"guide.hall.1": "Beat the champion of the last arena: your gladiator becomes free and enters this hall as a legend.",
|
||||
"guide.hall.2": "Challenge legends to a duel – the first win over each one gives favour of the gods.",
|
||||
"guide.hall.3": "Offer your favour to the gods: their bonuses help every gladiator after you.",
|
||||
"guide.hall.4": "Red strength = stronger than you, green = beatable.",
|
||||
"guide.expedition.what": "Send your gladiator to the provinces for loot, denarii and experience.",
|
||||
"guide.expedition.1": "Pick a region. The success chance grows with your strength; new regions open with each arena.",
|
||||
"guide.expedition.2": "Choose the duration: longer trips bring more loot.",
|
||||
"guide.expedition.3": "While he is away he cannot fight in the arena – but his training goes on.",
|
||||
"guide.expedition.4": "A failed trip brings half the reward, no loot and a rest. You can recall him any time (no reward).",
|
||||
"tip.gladiator.points": "You have {0} attribute point(s) to spend – press “+” next to a value.",
|
||||
"tip.gladiator.better": "{0} in your inventory is better than what you wear. Press “Equip best”.",
|
||||
"tip.gladiator.full": "Your inventory is almost full. Sell what you do not need (“Sell all”).",
|
||||
"tip.gladiator.none": "All set. Win fights for experience and loot.",
|
||||
"tip.ludus.afford": "You can afford {0} – the cheapest improvement right now.",
|
||||
"tip.ludus.save": "The next improvement is {0}: {1} denarii are still missing.",
|
||||
"tip.forum.buy": "Worth buying: {0} would make you {1} stronger.",
|
||||
"tip.forum.forge": "Nothing better at the merchant – let the smith reinforce your {0}.",
|
||||
"tip.forum.wait": "Nothing worth it right now. New wares in {0}.",
|
||||
"tip.skills.points": "You have {0} skill point(s) – click a glowing skill to learn it.",
|
||||
"tip.skills.next": "Your next skill point comes at level {0}.",
|
||||
"tip.hall.none": "No legends yet. Win your freedom against the emperor's champion to enter the hall.",
|
||||
"tip.hall.beatable": "{0} is beatable – challenge them for +{1} favour of the gods.",
|
||||
"tip.hall.favor": "You have {0} favour of the gods. Offer it below for lasting bonuses.",
|
||||
"tip.hall.later": "The remaining legends are still too strong. Come back when you are stronger.",
|
||||
"tip.hall.done": "You have beaten every legend. Win your freedom again to add a new one.",
|
||||
"tip.exp.away": "Your gladiator is travelling – back in {0}. Meanwhile improve your ludus.",
|
||||
"tip.exp.safe": "{0} is safe for you (75 % or more). A good destination.",
|
||||
"tip.exp.risky": "Every open region is still risky. Grow stronger first or take a short trip."
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
"forum.tab.gods": "Dioses",
|
||||
"forum.xps": "Ahora: {0} XP/s",
|
||||
"forum.recovery": "Recuperación: {0}",
|
||||
"upgrade.trainer.desc": "Entrena {0} mientras ves los combates.",
|
||||
"upgrade.trainer.desc": "Entrena {0} poco a poco con el tiempo, incluso cuando no juegas.",
|
||||
"upgrade.building.baths.desc": "Recuperación más rápida tras una derrota (−12 % por nivel).",
|
||||
"upgrade.building.kitchen.desc": "Mejor comida: +15 % de XP por nivel.",
|
||||
"upgrade.building.medicus.desc": "Un sanador para el ludus: +8 % de vida por nivel.",
|
||||
@@ -540,5 +540,58 @@
|
||||
"lb.col.class": "Clase",
|
||||
"lb.col.freedoms": "Libertades",
|
||||
"lb.you": "tú",
|
||||
"lb.yourrank": "Tu puesto: {0} de {1}"
|
||||
"lb.yourrank": "Tu puesto: {0} de {1}",
|
||||
"btn.buy": "Comprar · {0}",
|
||||
"btn.forge": "Reforzar · {0}",
|
||||
"guide.title": "Cómo funciona",
|
||||
"guide.tip": "Consejo ahora",
|
||||
"guide.gladiator.what": "Tu gladiador: atributos, equipo e inventario.",
|
||||
"guide.gladiator.1": "Cada nivel da un punto de atributo. Gástalo con «+».",
|
||||
"guide.gladiator.2": "Fuerza = daño, Resistencia = vida, Agilidad = críticos, Espectáculo = más fama y público.",
|
||||
"guide.gladiator.3": "Haz clic en un objeto del inventario: la tarjeta muestra sus valores y cuánto más fuerte serías (verde).",
|
||||
"guide.gladiator.4": "«Equipar lo mejor» elige el equipo más fuerte. Vende el resto por denarios.",
|
||||
"guide.ludus.what": "Tu escuela de gladiadores: entrenadores y edificios trabajan siempre, incluso cuando no juegas.",
|
||||
"guide.ludus.1": "Los entrenadores suben un atributo poco a poco con el paso del tiempo.",
|
||||
"guide.ludus.2": "Los edificios dan bonos permanentes: recuperación, experiencia, vida, denarios por segundo.",
|
||||
"guide.ludus.3": "Cada nivel cuesta algo más que el anterior.",
|
||||
"guide.ludus.4": "Gana combates por denarios e invierte pronto aquí: compensa con el tiempo.",
|
||||
"guide.forum.what": "El mercado: el mercader vende equipo, el herrero refuerza tus ranuras de equipo.",
|
||||
"guide.forum.1": "El número verde muestra cuánto más fuerte te haría un objeto.",
|
||||
"guide.forum.2": "El mercader trae género nuevo con regularidad: el tiempo aparece sobre la lista.",
|
||||
"guide.forum.3": "El herrero refuerza una ranura, no un objeto: cualquier pieza que lleves ahí se beneficia.",
|
||||
"guide.forum.4": "Lo comprado va al inventario: equípalo en la pestaña Gladiador.",
|
||||
"guide.skills.what": "Tu árbol de habilidades: tres ramas con bonos y nuevos ataques para el duelo.",
|
||||
"guide.skills.1": "Cada dos niveles recibes un punto de habilidad.",
|
||||
"guide.skills.2": "Haz clic en una habilidad para aprenderla. Las filas inferiores se abren con suficientes puntos en su rama.",
|
||||
"guide.skills.3": "Las habilidades de «ataque de duelo» añaden golpes nuevos en Q, W y E.",
|
||||
"guide.skills.4": "¿Cambiaste de idea? Reinicia el árbol por unos denarios.",
|
||||
"guide.hall.what": "Tus leyendas y los dioses: lo que queda cuando un gladiador gana su libertad.",
|
||||
"guide.hall.1": "Vence al campeón de la última arena: tu gladiador queda libre y entra en esta sala como leyenda.",
|
||||
"guide.hall.2": "Reta a las leyendas a un duelo: la primera victoria sobre cada una da favor de los dioses.",
|
||||
"guide.hall.3": "Ofrece tu favor a los dioses: sus bonos ayudan a cada gladiador posterior.",
|
||||
"guide.hall.4": "Fuerza roja = más fuerte que tú, verde = vencible.",
|
||||
"guide.expedition.what": "Envía a tu gladiador a las provincias a por botín, denarios y experiencia.",
|
||||
"guide.expedition.1": "Elige una región. La probabilidad sube con tu fuerza; con cada arena se abren nuevas.",
|
||||
"guide.expedition.2": "Elige la duración: los viajes largos traen más botín.",
|
||||
"guide.expedition.3": "Mientras está fuera no lucha en la arena, pero su entrenamiento sigue.",
|
||||
"guide.expedition.4": "Un viaje fallido da media recompensa, sin botín y un descanso. Puedes llamarlo cuando quieras (sin recompensa).",
|
||||
"tip.gladiator.points": "Tienes {0} punto(s) de atributo – pulsa «+» junto a un valor.",
|
||||
"tip.gladiator.better": "{0} del inventario es mejor que tu equipo. Pulsa «Equipar lo mejor».",
|
||||
"tip.gladiator.full": "Tu inventario está casi lleno. Vende lo que no necesites («Vender todo»).",
|
||||
"tip.gladiator.none": "Todo listo. Gana combates para experiencia y botín.",
|
||||
"tip.ludus.afford": "Puedes pagar {0}: la mejora más barata ahora.",
|
||||
"tip.ludus.save": "La siguiente mejora es {0}: faltan {1} denarios.",
|
||||
"tip.forum.buy": "Merece la pena: {0} te haría un {1} más fuerte.",
|
||||
"tip.forum.forge": "Nada mejor en el mercader: que el herrero refuerce tu {0}.",
|
||||
"tip.forum.wait": "Ahora no merece la pena nada. Género nuevo en {0}.",
|
||||
"tip.skills.points": "Tienes {0} punto(s) de habilidad: haz clic en una habilidad que brille.",
|
||||
"tip.skills.next": "Tu próximo punto de habilidad llega en el nivel {0}.",
|
||||
"tip.hall.none": "Aún no hay leyendas. Gana tu libertad contra el campeón del emperador para entrar en la sala.",
|
||||
"tip.hall.beatable": "{0} es vencible: reta a la leyenda por +{1} de favor de los dioses.",
|
||||
"tip.hall.favor": "Tienes {0} de favor de los dioses. Ofrécelo abajo para bonos permanentes.",
|
||||
"tip.hall.later": "Las leyendas restantes aún son demasiado fuertes. Vuelve cuando seas más fuerte.",
|
||||
"tip.hall.done": "Has vencido a todas las leyendas. Vuelve a ganar tu libertad para añadir otra.",
|
||||
"tip.exp.away": "Tu gladiador está de viaje: vuelve en {0}. Mientras, mejora tu ludus.",
|
||||
"tip.exp.safe": "{0} es segura para ti (75 % o más). Un buen destino.",
|
||||
"tip.exp.risky": "Todas las regiones abiertas son arriesgadas. Hazte más fuerte o elige un viaje corto."
|
||||
}
|
||||
|
||||
@@ -28,6 +28,13 @@ namespace GladiatorIdle.Arena
|
||||
readonly Particles _fx = new();
|
||||
readonly Texture2D? _backdrop = Assets.Sprite("arena_ludus", "jpg");
|
||||
FighterView _preview = null!;
|
||||
// Vorschaubilder der Vorlagen: aus den 3D-Figuren gerendert (je Klasse einmal geladen)
|
||||
const int THUMB_W = 296, THUMB_H = 340;
|
||||
readonly System.Collections.Generic.Dictionary<GladiatorClass, FighterView[]> _thumbFigs = new();
|
||||
readonly RenderTarget2D?[] _thumbs = new RenderTarget2D?[Appearance.PRESETS];
|
||||
bool _thumbsDirty = true;
|
||||
int _thumbTint = -1;
|
||||
GladiatorClass _thumbClass = (GladiatorClass)(-1);
|
||||
readonly DuelFighter _dummy = new() { IsPlayer = true, X = 0, Facing = 1, MaxHp = 1, Hp = 1 };
|
||||
double _t, _showAt = 2.5;
|
||||
int _show;
|
||||
@@ -97,6 +104,7 @@ namespace GladiatorIdle.Arena
|
||||
|
||||
public void Draw(GraphicsDevice gd, SpriteBatch sb, BasicEffect fx, float scale, Vector2 offset)
|
||||
{
|
||||
RenderThumbs(gd, fx);
|
||||
D.UiScale = scale;
|
||||
var ui = Matrix.CreateScale(scale) * Matrix.CreateTranslation(offset.X, offset.Y, 0);
|
||||
|
||||
@@ -136,6 +144,37 @@ namespace GladiatorIdle.Arena
|
||||
sb.End();
|
||||
}
|
||||
|
||||
/// Vorschaubilder neu rendern, wenn Klasse oder Farbe gewechselt hat (in eigene Bildflächen,
|
||||
/// danach zurück auf das bisherige Ziel; das wird dabei geleert, darum vor allem anderen).
|
||||
void RenderThumbs(GraphicsDevice gd, BasicEffect fx)
|
||||
{
|
||||
if (_thumbClass != Class || _thumbTint != Tint) _thumbsDirty = true;
|
||||
if (!_thumbsDirty) return;
|
||||
if (!_thumbFigs.TryGetValue(Class, out var figs))
|
||||
{
|
||||
figs = new FighterView[Appearance.PRESETS];
|
||||
for (int p = 1; p <= Appearance.PRESETS; p++) figs[p - 1] = new FighterView(Art.Hero(Class, p), 0, Tint);
|
||||
_thumbFigs[Class] = figs;
|
||||
}
|
||||
var idle = new DuelFighter { IsPlayer = true, Facing = 1, MaxHp = 1, Hp = 1 };
|
||||
var previous = gd.GetRenderTargets();
|
||||
for (int i = 0; i < figs.Length; i++)
|
||||
{
|
||||
if (!figs[i].Is3D) { _thumbs[i] = null; continue; }
|
||||
figs[i].SetModelColor(Tint);
|
||||
figs[i].Update(1 / 60f, 1 / 60f, idle, 0, true);
|
||||
_thumbs[i] ??= new RenderTarget2D(gd, THUMB_W, THUMB_H, false, SurfaceFormat.Color, DepthFormat.Depth24);
|
||||
gd.SetRenderTarget(_thumbs[i]);
|
||||
gd.Clear(Color.Transparent);
|
||||
fx.View = Matrix.CreateTranslation(0, -Stage.FloorY, 0) * Matrix.CreateScale(0.95f) * Matrix.CreateTranslation(THUMB_W / 2f, THUMB_H - 8, 0);
|
||||
fx.Projection = Matrix.CreateOrthographicOffCenter(0, THUMB_W, THUMB_H, 0, 0, 1);
|
||||
figs[i].DrawBody(gd, fx, idle, true);
|
||||
}
|
||||
gd.SetRenderTargets(previous);
|
||||
gd.Clear(Color.Black);
|
||||
_thumbClass = Class; _thumbTint = Tint; _thumbsDirty = false;
|
||||
}
|
||||
|
||||
void DrawNameField(SpriteBatch sb)
|
||||
{
|
||||
var r = new RectangleF(170, 968, 600, 68);
|
||||
@@ -172,7 +211,9 @@ namespace GladiatorIdle.Arena
|
||||
var r = new RectangleF(x0 + (p - 1) * 160, 214, 148, 170);
|
||||
bool sel = Preset == p, hover = _ui.Hover(r);
|
||||
D.Rect(sb, r, new Color(30, 22, 15) * 0.9f);
|
||||
if (Assets.Sprite(Art.Hero(Class, p)) is Texture2D t)
|
||||
if (_thumbs[p - 1] is RenderTarget2D th && !th.IsDisposed)
|
||||
sb.Draw(th, new Rectangle((int)r.X + 2, (int)r.Y + 2, (int)r.Width - 4, (int)r.Height - 4), Color.White);
|
||||
else if (Assets.Sprite(Art.Hero(Class, p)) is Texture2D t)
|
||||
{
|
||||
var painted = Assets.Paint(t, Tint);
|
||||
float k = r.Height * 1.02f / t.Height;
|
||||
|
||||
@@ -54,6 +54,8 @@ namespace GladiatorIdle.Arena
|
||||
public bool InIntro => _phase == Phase.Intro;
|
||||
float _phaseTime, _hitstop, _slowmo, _screenFlash;
|
||||
float _furyDark, _emberIn; // Raserei: Abdunkeln der Arena, Takt der Funken
|
||||
DuelState _pState, _eState; // für Töne beim Zustandswechsel
|
||||
bool _pLanded;
|
||||
Color _flashColor = Color.White;
|
||||
float _pLag = 1, _eLag = 1;
|
||||
double _time;
|
||||
@@ -97,6 +99,7 @@ namespace GladiatorIdle.Arena
|
||||
sl[1].Learned = Duel.Perks.HeavyStrike;
|
||||
sl[2].Learned = Duel.Perks.ShieldWall;
|
||||
SoundManager.StartAmbient(enemy.IsChampion ? "music_champion" : "music_arena");
|
||||
SoundManager.PlayAmbience("amb_crowd"); // Publikum im Hintergrund
|
||||
if (enemy.IsChampion && enemy.NameKey.StartsWith("champion.")) // Geschichte, kein Effekt: auch bei "Effekte reduzieren"
|
||||
{
|
||||
string clip = "champintro_" + enemy.NameKey["champion.".Length..];
|
||||
@@ -161,8 +164,9 @@ namespace GladiatorIdle.Arena
|
||||
// Anzeige: Abstand um ein Viertel gespreizt (die Figuren sind breiter als ihre Trefferzone)
|
||||
float mid = (float)(Duel.Player.X + Duel.Enemy.X) / 2;
|
||||
float Spread(double x) => mid + ((float)x - mid) * SPREAD;
|
||||
if (_pv.Update(dt, realDt, Duel.Player, Spread(Duel.Player.X), _calm)) _fx.Dust(new Vector2(_pv.X, Stage.FloorY), 2, 30, 30, 40);
|
||||
if (_ev.Update(dt, realDt, Duel.Enemy, Spread(Duel.Enemy.X), _calm)) _fx.Dust(new Vector2(_ev.X, Stage.FloorY), 2, 30, 30, 40);
|
||||
if (_pv.Update(dt, realDt, Duel.Player, Spread(Duel.Player.X), _calm)) { _fx.Dust(new Vector2(_pv.X, Stage.FloorY), 2, 30, 30, 40); SoundManager.PlayStep(); }
|
||||
if (_ev.Update(dt, realDt, Duel.Enemy, Spread(Duel.Enemy.X), _calm)) { _fx.Dust(new Vector2(_ev.X, Stage.FloorY), 2, 30, 30, 40); SoundManager.PlayStep(); }
|
||||
StateSounds();
|
||||
FuryUpdate(realDt);
|
||||
_cam.Update(realDt, _pv.X, _ev.X, _calm);
|
||||
_fx.Motes(_calm ? 0 : 60, Camera.W, Camera.H);
|
||||
@@ -221,6 +225,28 @@ namespace GladiatorIdle.Arena
|
||||
}
|
||||
}
|
||||
|
||||
/// Töne, die an einem Zustandswechsel hängen: Schwung beim Zuschlagen, Ausweichen, Absprung und
|
||||
/// Landung des Sprungangriffs.
|
||||
void StateSounds()
|
||||
{
|
||||
void For(DuelFighter f, ref DuelState last)
|
||||
{
|
||||
if (f.State == last) return;
|
||||
switch (f.State)
|
||||
{
|
||||
case DuelState.Strike: if (f.Heavy) SoundManager.PlaySwingHeavy(); else SoundManager.PlaySwing(); break;
|
||||
case DuelState.Dodge: SoundManager.PlayWhoosh(); break;
|
||||
case DuelState.Leap: SoundManager.PlayWhoosh(); break;
|
||||
}
|
||||
last = f.State;
|
||||
}
|
||||
For(Duel.Player, ref _pState);
|
||||
For(Duel.Enemy, ref _eState);
|
||||
var p = Duel.Player;
|
||||
if (p.State != DuelState.Leap) _pLanded = false;
|
||||
else if (!_pLanded && p.StateTime >= Duel.LEAP_HIT) { _pLanded = true; SoundManager.PlayLand(); _fx.Dust(new Vector2(_pv.X, Stage.FloorY), 10, 80, 40, 70); }
|
||||
}
|
||||
|
||||
static float Lag(float lag, float value, float dt) => lag <= value ? value : MathF.Max(value, lag - dt * 0.6f);
|
||||
|
||||
void Controls(Input i)
|
||||
@@ -258,6 +284,7 @@ namespace GladiatorIdle.Arena
|
||||
_fx.Sparks(at, last ? 110 : 55, new Color(255, 160, 50), target.Facing > 0 ? MathF.PI : 0, last ? MathF.PI : 1.4f, last ? 1700 : 1300);
|
||||
_fx.Dust(new Vector2(targetView.X, Stage.FloorY), last ? 26 : 12, 160, 120, 110);
|
||||
_crowd.Excite(last ? 1 : 0.5f);
|
||||
SoundManager.PlayFire();
|
||||
if (last) { _crowd.Wave(); SoundManager.PlayCheer(); }
|
||||
}
|
||||
bool heavy = e.ByPlayer && (Duel.Player.Heavy || Duel.Player.State is DuelState.Leap or DuelState.Super);
|
||||
@@ -295,7 +322,7 @@ namespace GladiatorIdle.Arena
|
||||
pv.Parried();
|
||||
_crowd.Excite(0.6f);
|
||||
Big(L.t("duel.parry"), new Color(220, 235, 255));
|
||||
SoundManager.PlayBlock(); SoundManager.PlayCheer();
|
||||
SoundManager.PlayParry(); SoundManager.PlayCheer();
|
||||
break;
|
||||
case DuelEventType.Dodged:
|
||||
Float(L.t("duel.dodged"), targetView.Chest - new Vector2(0, 180), D.Sand, 30);
|
||||
@@ -306,6 +333,7 @@ namespace GladiatorIdle.Arena
|
||||
_cam.Shake(0.45f);
|
||||
_fx.Chips(targetView.Front, 12, new Color(140, 110, 80), target.Facing);
|
||||
Big(L.t("duel.guardbreak"), D.Red);
|
||||
SoundManager.PlayGuardBreak();
|
||||
break;
|
||||
case DuelEventType.Special:
|
||||
_cam.Shake(0.3f); _crowd.Excite(0.35f);
|
||||
@@ -327,7 +355,7 @@ namespace GladiatorIdle.Arena
|
||||
_fx.Ring(new Vector2(_pv.X, Stage.FloorY), new Color(255, 120, 30), 1400, 0.8f); // Druckwelle am Boden
|
||||
_fx.Dust(new Vector2(_pv.X, Stage.FloorY), 40, 260, 70, 130);
|
||||
_crowd.Wave(petals: false);
|
||||
SoundManager.PlayLevelUp(); SoundManager.PlayCheer();
|
||||
SoundManager.PlayFury(); SoundManager.PlayCheer();
|
||||
break;
|
||||
case DuelEventType.SuperReady:
|
||||
Float(L.t("duel.super.ready"), _pv.Chest - new Vector2(0, 230), new Color(255, 170, 60), 34);
|
||||
@@ -347,6 +375,7 @@ namespace GladiatorIdle.Arena
|
||||
_fx.Dust(new Vector2(targetView.X, Stage.FloorY), 20, 120, 120, 110);
|
||||
_crowd.Excite(1f);
|
||||
if (e.ByPlayer) _crowd.Wave();
|
||||
SoundManager.PlayKo();
|
||||
if (e.ByPlayer) SoundManager.PlayCheer(); else SoundManager.PlayBoo();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -19,9 +19,13 @@ namespace GladiatorIdle.Arena
|
||||
string _mClip = "";
|
||||
float _mTime, _mBlend = 1;
|
||||
bool _mFree;
|
||||
float _lift; // Höhe über dem Boden (Sprungangriff)
|
||||
|
||||
public bool Is3D => _model != null;
|
||||
|
||||
/// Teamfarbe der 3D-Figur nachträglich ändern (Vorschaubilder der Erstellung).
|
||||
public void SetModelColor(int color) => _model?.SetColor(color);
|
||||
|
||||
void InitModel(int color)
|
||||
{
|
||||
_model = Model3D.Load(_art);
|
||||
@@ -30,6 +34,7 @@ namespace GladiatorIdle.Arena
|
||||
_model ??= Model3D.Load(DefaultModel);
|
||||
// Vorlage mit dunkler Haut, aber noch ohne eigenes Modell: Haut des Ersatzmodells abdunkeln
|
||||
if (!own && _model != null && DarkSkin.Contains(_art)) _model.SetSkin(1);
|
||||
else if (!own && _model != null && _art.StartsWith("hero_") && _art.EndsWith("_3")) _model.SetSkin(-1); // Vorlage 3: helle Haut
|
||||
if (_model == null || _model.Clips.Count == 0) { _model = null; return; }
|
||||
_model.Arm(_art);
|
||||
_model.SetColor(color);
|
||||
@@ -147,7 +152,11 @@ namespace GladiatorIdle.Arena
|
||||
if (name != _mClip) { m.BeginBlend(); _mBlend = 0; _mClip = name; }
|
||||
_mBlend = MathF.Min(1, _mBlend + realDt / 0.12f);
|
||||
_mTime = t;
|
||||
m.Pose(Clip3(name), t, loop, _mBlend, rootY: f.State == DuelState.Leap ? 0.5f : 1);
|
||||
m.Pose(Clip3(name), t, loop, _mBlend, rootY: f.State == DuelState.Leap ? 0.15f : 1);
|
||||
// Sprungangriff: eigene Flugkurve (der Clip springt kaum und passt nicht zur kurzen Sprungzeit)
|
||||
float air = (float)Duel.LEAP_HIT + 0.08f, leapT = (float)f.StateTime;
|
||||
float lift = f.State == DuelState.Leap && leapT < air ? MathF.Sin(MathF.PI * leapT / air) * 0.55f * Stage.FigH : 0;
|
||||
_lift += (lift - _lift) * MathF.Min(1, realDt * 30);
|
||||
}
|
||||
|
||||
Matrix ModelWorld(float grow)
|
||||
@@ -157,7 +166,7 @@ namespace GladiatorIdle.Arena
|
||||
return _fit * Matrix.CreateRotationY(yaw)
|
||||
* Matrix.CreateScale(s * (1 - _sq * 0.04f), -s * (1 + _sq * 0.06f), s) // y nach unten
|
||||
* Matrix.CreateRotationZ(_lean * Facing)
|
||||
* Matrix.CreateTranslation(X + _off * Facing * 0.35f * Stage.Scale, Stage.FloorY, 0);
|
||||
* Matrix.CreateTranslation(X + _off * Facing * 0.35f * Stage.Scale, Stage.FloorY - _lift, 0);
|
||||
}
|
||||
|
||||
void DrawModel(GraphicsDevice gd, BasicEffect scene, Color aura, float grow)
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace GladiatorIdle.Arena
|
||||
D.Text(sb, Assets.SansBold, 17, delta, new Vector2(card.Right - 16, y), dc, Align.Right);
|
||||
float by = card.Bottom - 54, bw = (card.Width - 44) / 2;
|
||||
if (_ui.Button(sb, new RectangleF(card.X + 16, by, bw, 42), L.t("char.equip"), size: 18, accent: D.Green))
|
||||
if (_game.Equip(sel.Id)) SoundManager.PlayBlock();
|
||||
if (_game.Equip(sel.Id)) SoundManager.PlayEquip();
|
||||
if (_ui.Button(sb, new RectangleF(card.X + 28 + bw, by, bw, 42), string.Format(L.t("char.sell"), NumberFormat.Format(Items.SellValue(sel))), size: 16))
|
||||
if (_game.Sell(sel.Id)) { SoundManager.PlayCoins(); _sel = null; }
|
||||
}
|
||||
@@ -142,7 +142,7 @@ namespace GladiatorIdle.Arena
|
||||
D.Text(sb, Assets.SansBold, 15, delta, new Vector2(row.Right - 200, row.Y + 22), dc, Align.Right);
|
||||
double price = Items.Value(it);
|
||||
long id = it.Id;
|
||||
if (_ui.Button(sb, new RectangleF(row.Right - 180, row.Y + 24, 166, 48), NumberFormat.Format(price),
|
||||
if (_ui.Button(sb, new RectangleF(row.Right - 180, row.Y + 24, 166, 48), string.Format(L.t("btn.buy"), NumberFormat.Format(price)),
|
||||
_game.Gold >= price && _game.Inventory.Count < Items.INVENTORY, size: 19))
|
||||
if (_game.BuyFromMerchant(id)) { SoundManager.PlayPurchase(); _sel = id; }
|
||||
ry += 104;
|
||||
@@ -161,7 +161,7 @@ namespace GladiatorIdle.Arena
|
||||
D.Text(sb, Assets.SansBold, 20, L.t("slot." + slot.ToString().ToLowerInvariant()), new Vector2(row.X + 100, row.Y + 30), Color.White);
|
||||
D.Text(sb, Assets.Sans, 16, string.Format(L.t("forge.level"), _game.SlotLevels[i]), new Vector2(row.X + 100, row.Y + 60), D.Sand);
|
||||
double cost = _game.UpgradeSlotCost(slot);
|
||||
if (_ui.Button(sb, new RectangleF(row.Right - 180, row.Y + 24, 166, 48), NumberFormat.Format(cost), _game.Gold >= cost, size: 19))
|
||||
if (_ui.Button(sb, new RectangleF(row.Right - 200, row.Y + 24, 186, 48), string.Format(L.t("btn.forge"), NumberFormat.Format(cost)), _game.Gold >= cost, size: 17))
|
||||
if (_game.UpgradeSlot(slot)) SoundManager.PlayLevelUp();
|
||||
}
|
||||
}
|
||||
|
||||
110
Mono/Arena/HubScene.Guide.cs
Normal file
110
Mono/Arena/HubScene.Guide.cs
Normal file
@@ -0,0 +1,110 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using GladiatorIdle.Gfx;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using D = GladiatorIdle.Gfx.Draw;
|
||||
|
||||
namespace GladiatorIdle.Arena
|
||||
{
|
||||
/// Anleitung rechts neben jeder Schublade: wofür der Reiter da ist, drei bis vier Schritte, und ein
|
||||
/// Tipp, der zum aktuellen Spielstand passt (was jetzt sinnvoll ist).
|
||||
internal sealed partial class HubScene
|
||||
{
|
||||
static string GuideId(Drawer d) => d switch
|
||||
{
|
||||
Drawer.Gladiator => "gladiator", Drawer.Ludus => "ludus", Drawer.Forum => "forum",
|
||||
Drawer.Skills => "skills", Drawer.Hall => "hall", _ => "expedition"
|
||||
};
|
||||
|
||||
void DrawGuide(SpriteBatch sb, RectangleF r)
|
||||
{
|
||||
string id = GuideId(_drawer);
|
||||
Ui.Panel(sb, r, D.Border, 0.94f);
|
||||
float x = r.X + 26, w = r.Width - 52, y = r.Y + 34;
|
||||
D.Text(sb, Assets.Serif, 28, L.t("guide.title"), new Vector2(x, y), D.Gold);
|
||||
D.TextWrap(sb, Assets.Serif, 19, L.t($"guide.{id}.what"), new RectangleF(x, y + 30, w, 90), D.Sand);
|
||||
y += 128;
|
||||
for (int i = 1; i <= 4; i++)
|
||||
{
|
||||
string key = $"guide.{id}.{i}";
|
||||
string text = L.t(key);
|
||||
if (text == key || text.Length == 0) break; // weniger als vier Schritte
|
||||
var c = new Vector2(x + 16, y + 12);
|
||||
D.Glow(sb, c, new Vector2(40), D.Gold * 0.25f);
|
||||
D.Text(sb, Assets.SansBold, 19, i.ToString(NumberFormat.Culture), c, D.Gold, Align.Center);
|
||||
D.TextWrap(sb, Assets.Sans, 17, text, new RectangleF(x + 44, y, w - 44, 90), Color.White);
|
||||
y += 96;
|
||||
}
|
||||
|
||||
// Tipp zum Spielstand
|
||||
var (tip, accent) = Tip();
|
||||
var tr = new RectangleF(r.X + 16, r.Bottom - 190, r.Width - 32, 172);
|
||||
D.Rect(sb, tr, new Color(46, 34, 18) * 0.95f);
|
||||
D.Frame(sb, tr, accent, 2);
|
||||
D.Text(sb, Assets.SansBold, 18, L.t("guide.tip"), new Vector2(tr.X + 18, tr.Y + 22), accent);
|
||||
D.TextWrap(sb, Assets.Sans, 18, tip, new RectangleF(tr.X + 18, tr.Y + 44, tr.Width - 36, 120), Color.White);
|
||||
}
|
||||
|
||||
/// Der wichtigste nächste Schritt in diesem Reiter.
|
||||
(string, Color) Tip()
|
||||
{
|
||||
var g = _game;
|
||||
switch (_drawer)
|
||||
{
|
||||
case Drawer.Gladiator:
|
||||
{
|
||||
if (g.AttrPoints > 0) return (string.Format(L.t("tip.gladiator.points"), g.AttrPoints), D.Gold);
|
||||
double now = g.Power();
|
||||
var better = g.Inventory.Where(it => g.PowerWith(it) > now * 1.005).OrderByDescending(g.PowerWith).FirstOrDefault();
|
||||
if (better != null) return (string.Format(L.t("tip.gladiator.better"), ItemName(better)), D.Green);
|
||||
if (g.Inventory.Count >= Items.INVENTORY - 4) return (L.t("tip.gladiator.full"), D.Red);
|
||||
return (L.t("tip.gladiator.none"), D.Sand);
|
||||
}
|
||||
case Drawer.Ludus:
|
||||
{
|
||||
var cheapest = UpgradeDef.All.OrderBy(u => g.UpgradeCost(u.Id)).First();
|
||||
double cost = g.UpgradeCost(cheapest.Id);
|
||||
return g.Gold >= cost
|
||||
? (string.Format(L.t("tip.ludus.afford"), L.t(cheapest.Key)), D.Green)
|
||||
: (string.Format(L.t("tip.ludus.save"), L.t(cheapest.Key), NumberFormat.Format(cost - g.Gold)), D.Sand);
|
||||
}
|
||||
case Drawer.Forum:
|
||||
{
|
||||
double now = g.Power();
|
||||
var buy = g.Merchant.Where(it => g.Gold >= Items.Value(it) && g.PowerWith(it) > now * 1.005)
|
||||
.OrderByDescending(g.PowerWith).FirstOrDefault();
|
||||
if (buy != null)
|
||||
return (string.Format(L.t("tip.forum.buy"), ItemName(buy), NumberFormat.Percent(g.PowerWith(buy) / now - 1)), D.Green);
|
||||
var slot = Enumerable.Range(0, 5).Select(i => (ItemSlot)i).Where(s => g.Equipped[(int)s] != null)
|
||||
.OrderBy(g.UpgradeSlotCost).FirstOrDefault();
|
||||
if (g.Equipped[(int)slot] != null && g.Gold >= g.UpgradeSlotCost(slot))
|
||||
return (string.Format(L.t("tip.forum.forge"), L.t("slot." + slot.ToString().ToLowerInvariant())), D.Green);
|
||||
return (string.Format(L.t("tip.forum.wait"), NumberFormat.Duration(g.MerchantRefreshIn)), D.Sand);
|
||||
}
|
||||
case Drawer.Skills:
|
||||
return g.LearnablePoints > 0
|
||||
? (string.Format(L.t("tip.skills.points"), g.LearnablePoints), D.Gold)
|
||||
: (string.Format(L.t("tip.skills.next"), g.CharLevel / 2 * 2 + 2), D.Sand);
|
||||
case Drawer.Hall:
|
||||
{
|
||||
if (g.Legends.Count == 0) return (L.t("tip.hall.none"), D.Sand);
|
||||
var target = g.Legends.Where(l => !g.LegendsBeaten.Contains(l.Number))
|
||||
.OrderByDescending(l => g.DuelRatio(GameState.LegendEnemy(l))).FirstOrDefault();
|
||||
if (target != null && g.DuelRatio(GameState.LegendEnemy(target)) >= 1)
|
||||
return (string.Format(L.t("tip.hall.beatable"), target.Name, GameState.LEGEND_FAVOR), D.Green);
|
||||
int cheapest = Enum.GetValues<God>().Min(god => Gods.Cost(g.GodLevel(god)));
|
||||
if (g.GodFavor >= cheapest) return (string.Format(L.t("tip.hall.favor"), g.GodFavor), D.Purple);
|
||||
return (L.t(target != null ? "tip.hall.later" : "tip.hall.done"), D.Sand);
|
||||
}
|
||||
default:
|
||||
{
|
||||
if (g.Away is { } a) return (string.Format(L.t("tip.exp.away"), NumberFormat.Duration(a.Left)), D.Gold);
|
||||
var safe = RegionDef.All.Where(g.RegionOpen).Where(r => g.ExpeditionChance(r) >= 0.75).LastOrDefault();
|
||||
if (safe != null) return (string.Format(L.t("tip.exp.safe"), L.t(safe.Key)), D.Green);
|
||||
return (L.t("tip.exp.risky"), D.Red);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,6 +64,9 @@ namespace GladiatorIdle.Arena
|
||||
if (_ui.Button(sb, new RectangleF(r.Center.X + 90, by, 70, 40), "›", _hallPage < pages - 1, size: 24)) _hallPage++; // i18n-ok
|
||||
}
|
||||
|
||||
if (_game.Away != null && list.Count > 0)
|
||||
D.Text(sb, Assets.Sans, 17, L.t("hall.away"), new Vector2(r.Center.X, y + 80 + HALL_ROWS * rowH + 20), D.Red, Align.Center);
|
||||
|
||||
// Götter: Gunst opfern (wirkt auf alle Gladiatoren)
|
||||
float gy = r.Bottom - 2 * 168 - 26 - 30;
|
||||
D.Text(sb, Assets.Serif, 26, L.t("freedom.gods"), new Vector2(x, gy - 26), D.Gold);
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace GladiatorIdle.Arena
|
||||
double _t;
|
||||
Drawer _drawer;
|
||||
float _drawerK; // 0 zu, 1 offen (gleitet)
|
||||
Drawer _drawerSound; // für den Ton beim Öffnen/Wechseln
|
||||
|
||||
// Meldung nach dem Kampf
|
||||
string[] _toast = Array.Empty<string>();
|
||||
@@ -46,6 +47,7 @@ namespace GladiatorIdle.Arena
|
||||
_hero.Preload();
|
||||
_fx.Calm = AppSettings.ReduceMotion;
|
||||
SoundManager.StartAmbient("music_ludus");
|
||||
SoundManager.PlayAmbience("amb_crowd");
|
||||
}
|
||||
|
||||
public void ShowResult(string[] lines, Color color)
|
||||
@@ -76,6 +78,7 @@ namespace GladiatorIdle.Arena
|
||||
_crowd.Update(dt);
|
||||
_fx.Motes(AppSettings.ReduceMotion ? 0 : 50, Camera.W, Camera.H);
|
||||
_fx.Update(dt);
|
||||
if (_drawer != _drawerSound) { _drawerSound = _drawer; SoundManager.PlayDrawer(); }
|
||||
float target = _drawer == Drawer.None ? 0 : 1;
|
||||
_drawerK += (target - _drawerK) * (1 - MathF.Exp(-dt * 14));
|
||||
if (input.Pressed(Microsoft.Xna.Framework.Input.Keys.Escape) && _drawer != Drawer.None) { _drawer = Drawer.None; input.PrevKeys = input.Keys; }
|
||||
@@ -313,9 +316,12 @@ namespace GladiatorIdle.Arena
|
||||
|
||||
void DrawDrawer(SpriteBatch sb)
|
||||
{
|
||||
float w = _drawer == Drawer.Ludus ? 820 : 1300, x = -w + (w + 40) * Ease(_drawerK);
|
||||
var r = new RectangleF(x, 140, w, Camera.H - 260);
|
||||
// alle Reiter gleich: Inhalt links (1300 breit), Anleitung rechts daneben, beides gleitet herein
|
||||
const float W = 1300, GUIDE = 500;
|
||||
float x = -(W + GUIDE + 20) + (W + GUIDE + 60) * Ease(_drawerK);
|
||||
var r = new RectangleF(x, 140, W, Camera.H - 260);
|
||||
Ui.Panel(sb, r, D.Gold, 0.94f);
|
||||
DrawGuide(sb, new RectangleF(r.Right + 20, r.Y, GUIDE, r.Height));
|
||||
if (_drawer == Drawer.Gladiator) DrawGladiator(sb, r);
|
||||
else if (_drawer == Drawer.Ludus) DrawLudus(sb, r);
|
||||
else if (_drawer == Drawer.Forum) DrawForum(sb, r);
|
||||
@@ -355,7 +361,7 @@ namespace GladiatorIdle.Arena
|
||||
y += 240;
|
||||
if (_ui.Button(sb, new RectangleF(x + 480, y - 22, 220, 44), L.t("char.equipbest"), size: 18))
|
||||
{
|
||||
if (_game.EquipBest() > 0) SoundManager.PlayPurchase();
|
||||
if (_game.EquipBest() > 0) SoundManager.PlayEquip();
|
||||
}
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
@@ -397,9 +403,9 @@ namespace GladiatorIdle.Arena
|
||||
D.Text(sb, Assets.SansBold, 21, L.t(u.Key), new Vector2(row.X + 86, row.Y + 24), Color.White);
|
||||
D.Text(sb, Assets.Sans, 17, string.Format(L.t("ludus.level"), level), new Vector2(row.X + 86, row.Y + 56), D.Sand);
|
||||
string desc = u.Stat is Stat s ? string.Format(L.t("upgrade.trainer.desc"), L.t(TextKeys.Of(s))) : L.t(u.Key + ".desc");
|
||||
D.Text(sb, Assets.Sans, 15, desc.Length > 52 ? desc[..50] + "…" : desc, new Vector2(row.X + 200, row.Y + 56), D.Dim); // i18n-ok
|
||||
D.TextWrap(sb, Assets.Sans, 17, desc, new RectangleF(row.X + 330, row.Y + 14, row.Width - 330 - 260, 64), D.Dim);
|
||||
double cost = _game.UpgradeCost(u.Id);
|
||||
if (_ui.Button(sb, new RectangleF(row.Right - 200, row.Y + 16, 184, 52), NumberFormat.Format(cost), _game.Gold >= cost, size: 20))
|
||||
if (_ui.Button(sb, new RectangleF(row.Right - 240, row.Y + 16, 224, 52), string.Format(L.t("btn.buy"), NumberFormat.Format(cost)), _game.Gold >= cost, size: 19))
|
||||
if (_game.Buy(u.Id)) SoundManager.PlayPurchase();
|
||||
y += 92;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace GladiatorIdle.Arena
|
||||
string name = Array.Find(Environment.GetCommandLineArgs(), x => x.StartsWith("--model="))?[8..] ?? "hero_murmillo_1";
|
||||
Model = Model3D.Load(gd, name);
|
||||
Model?.Arm(name);
|
||||
if (Model != null) DevShot.Log($"model3d {name}: {Model.BladeLog}");
|
||||
_backdrop = Assets.Sprite("arena_colosseum", "jpg");
|
||||
_fx = new BasicEffect(gd) { VertexColorEnabled = true, LightingEnabled = true, PreferPerPixelLighting = true };
|
||||
_fx.AmbientLightColor = new Vector3(0.42f, 0.38f, 0.36f);
|
||||
|
||||
@@ -131,6 +131,7 @@ namespace GladiatorIdle
|
||||
{
|
||||
_hub = null; _scene = null; _creator = null; _intro = null; _freedom = null; _board = null; _paused = false; _nextLife = false;
|
||||
_menu = new MenuScene(_game != null, _game?.Freedoms ?? 0);
|
||||
SoundManager.StopAmbience();
|
||||
}
|
||||
|
||||
protected override void OnExiting(object sender, ExitingEventArgs args)
|
||||
@@ -459,7 +460,11 @@ namespace GladiatorIdle
|
||||
if (_devTime > 4.2) Shot("h_forum");
|
||||
if (_devTime > 4.4 && !_shots.Contains("h_skills_open")) { _shots.Add("h_skills_open"); _hub!.DevOpen(4); }
|
||||
if (_devTime > 5.1) Shot("h_skills");
|
||||
if (_devTime > 5.5 && _capture == null) { _hub!.DevOpen(0); var offers = _game!.Offers(); _hub.Chosen = offers[Math.Min(1, offers.Count - 1)]; _devTime = 0; }
|
||||
if (_devTime > 5.3 && !_shots.Contains("h_hall_tab")) { _shots.Add("h_hall_tab"); _hub!.DevOpen(5); }
|
||||
if (_devTime > 6.0) Shot("h_hall2");
|
||||
if (_devTime > 6.2 && !_shots.Contains("h_exp_tab")) { _shots.Add("h_exp_tab"); _hub!.DevOpen(6); }
|
||||
if (_devTime > 6.9) Shot("h_exp");
|
||||
if (_devTime > 7.3 && _capture == null) { _hub!.DevOpen(0); var offers = _game!.Offers(); _hub.Chosen = offers[Math.Min(1, offers.Count - 1)]; _devTime = 0; }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -127,12 +127,13 @@ namespace GladiatorIdle.Gfx
|
||||
public Clip? Find(string name) => Clips.Find(c => c.Name == name);
|
||||
|
||||
/// Teamfarbe (Index in Appearance.Colors), -1 = Originalfarben.
|
||||
/// Hautton dunkler (0 = unverändert, 1 = dunkle Haut): für Aussehen-Vorlagen mit dunkler Haut, solange
|
||||
/// Hautton dunkler (0 = unverändert, 1 = dunkle Haut, −1 = helle, blasse Haut): für Aussehen-Vorlagen mit dunkler Haut, solange
|
||||
/// sie das Modell einer anderen Vorlage nutzen. Haut erkannt an Farbton (Orange/Rosa), mittlerer
|
||||
/// Sättigung und Helligkeit — Leder ist dunkler, Metall ungesättigt, Teamfarbe magenta.
|
||||
public void SetSkin(float dark)
|
||||
{
|
||||
if (_texture == null || dark <= 0) return;
|
||||
if (_texture == null || dark == 0) return;
|
||||
bool pale = dark < 0; dark = MathF.Abs(dark); // negativ: hellere, blassere Haut
|
||||
var data = new Color[_texture.Width * _texture.Height];
|
||||
_texture.GetData(data);
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
@@ -148,7 +149,8 @@ namespace GladiatorIdle.Gfx
|
||||
float w = wh * ws * wv * dark;
|
||||
if (w <= 0) continue;
|
||||
// dunkle, warme Haut: Helligkeit stark senken, Sättigung leicht anheben
|
||||
float nv = max * (1 - 0.58f * w), ns = MathF.Min(1, sat * (1 + 0.25f * w));
|
||||
float nv = pale ? MathF.Min(1, max * (1 + 0.16f * w)) : max * (1 - 0.58f * w);
|
||||
float ns = pale ? sat * (1 - 0.35f * w) : MathF.Min(1, sat * (1 + 0.25f * w));
|
||||
float k = nv / max;
|
||||
float nr = r * k, ng = g * k, nb = b * k;
|
||||
float gray = (nr + ng + nb) / 3, boost = ns / MathF.Max(sat, 1e-3f);
|
||||
@@ -390,8 +392,57 @@ namespace GladiatorIdle.Gfx
|
||||
{
|
||||
if (art.Contains("retiarius")) { AddTrident(); AddNet(); }
|
||||
else { AddSword(); AddShield(); }
|
||||
AimBlades();
|
||||
}
|
||||
|
||||
/// Klinge zum Gegner: im Treffermoment des Schlags soll die Waffe so zum Unterarm liegen wie bei den
|
||||
/// Figuren mit sauberem Skelett. Bei manchen Skeletten ist die Hand nach dem Übertragen der
|
||||
/// Bewegungen anders gedreht (Klinge nach hinten oder schräg) – dann wird die Waffe für diese Figur
|
||||
/// einmal so gedreht, dass sie dort liegt, und bleibt in dieser Lage fest an der Hand.
|
||||
void AimBlades()
|
||||
{
|
||||
var clip = Find("slash") ?? (Clips.Count > 0 ? Clips[0] : null);
|
||||
if (clip == null) return;
|
||||
float t = ImpactTime(clip);
|
||||
var keep = (float[])_pose.Clone(); bool posed = _posed;
|
||||
_posed = true;
|
||||
Pose(clip, t, false, 1, true, skin: false);
|
||||
foreach (var p in Props)
|
||||
{
|
||||
if (p.Shield || p.NoAvoid) continue;
|
||||
var m = p.Local * _global[p.Bone];
|
||||
var dir = Vector3.Normalize(new Vector3(m.M11, m.M12, m.M13));
|
||||
var (fa, fu, fs) = ArmFrame(p.Bone);
|
||||
BladeLog = $"blade z {dir.Z:0.00} arm {Vector3.Dot(dir, fa):0.000} up {Vector3.Dot(dir, fu):0.000} side {Vector3.Dot(dir, fs):0.000}"; // i18n-ok
|
||||
// Ziel: Lage wie bei den Figuren mit sauberem Skelett (gemessen an vier Figuren)
|
||||
var target = Vector3.Normalize(fa * 0.31f + fu * 0.36f + fs * 0.88f);
|
||||
float cos = MathHelper.Clamp(Vector3.Dot(dir, target), -1, 1);
|
||||
if (cos < 0.97f)
|
||||
{
|
||||
var axis = Vector3.Cross(dir, target);
|
||||
axis = axis.LengthSquared() > 1e-8f ? Vector3.Normalize(axis) : Vector3.Normalize(new Vector3(m.M21, m.M22, m.M23));
|
||||
var grip = m.Translation;
|
||||
var turn = Matrix.CreateTranslation(-grip) * Matrix.CreateFromAxisAngle(axis, MathF.Acos(cos)) * Matrix.CreateTranslation(grip);
|
||||
p.Local = p.Local * _global[p.Bone] * turn * Matrix.Invert(_global[p.Bone]); // fest zur Hand
|
||||
BladeLog += $" -> {MathHelper.ToDegrees(MathF.Acos(cos)):0} Grad gedreht"; // i18n-ok
|
||||
}
|
||||
}
|
||||
Array.Copy(keep, _pose, keep.Length); _posed = posed; Bones();
|
||||
}
|
||||
|
||||
/// Rahmen am Arm in der jetzigen Haltung: Unterarm-Richtung, oben (Körper), seitlich.
|
||||
(Vector3 A, Vector3 U, Vector3 S) ArmFrame(int hand)
|
||||
{
|
||||
int fore = _parent[hand], hips = Bone("Hips"), head = Bone("Head");
|
||||
var a = Vector3.Normalize(_global[hand].Translation - _global[fore].Translation);
|
||||
var up = _global[head].Translation - _global[hips].Translation;
|
||||
var u = Vector3.Normalize(up - a * Vector3.Dot(up, a));
|
||||
return (a, u, Vector3.Cross(a, u));
|
||||
}
|
||||
|
||||
/// Testläufe: wie die Klinge ausgerichtet wurde.
|
||||
public string BladeLog = "";
|
||||
|
||||
/// Griff in der Faust: x vom kleinen Finger zum Zeigefinger (Waffe), y zur Handfläche, Ursprung im Griff.
|
||||
Matrix Grip(string side)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user