3D-Arena (Duell, Hub, Freiheit, Erstellung, Bestenliste), Retiarius beidhändig, Waffen je Klasse, Einführung, Willkommen, weniger Reiter, Wirtschaft ohne Taberna, Kantenglättung, Leuchten, weiche Schatten, Gamepad, Absturz-Protokoll
Stand von main 20cd8ba2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ using D = GladiatorIdle.Gfx.Draw;
|
||||
|
||||
namespace GladiatorIdle.Arena
|
||||
{
|
||||
/// Ausrüstung: Inventar mit Detailkarte (anlegen, verkaufen), Händler und Schmied.
|
||||
/// Ausrüstung: Inventar mit Detailkarte (anlegen, verkaufen).
|
||||
internal sealed partial class HubScene
|
||||
{
|
||||
long? _sel; // gewähltes Stück (Inventar oder angelegt)
|
||||
@@ -117,53 +117,5 @@ namespace GladiatorIdle.Arena
|
||||
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; }
|
||||
}
|
||||
|
||||
// ── Forum: Händler (links) und Schmied (rechts) ─────────────
|
||||
|
||||
void DrawForum(SpriteBatch sb, RectangleF r)
|
||||
{
|
||||
float x = r.X + 30, y = r.Y + 40, w = 700;
|
||||
D.Text(sb, Assets.Serif, 30, L.t("forum.tab.merchant"), new Vector2(x, y), D.Gold);
|
||||
D.Text(sb, Assets.Sans, 16, string.Format(L.t("merchant.refresh"), NumberFormat.Duration(_game.MerchantRefreshIn)),
|
||||
new Vector2(x + w, y), D.Dim, Align.Right);
|
||||
D.Text(sb, Assets.Sans, 16, string.Format(L.t("merchant.bag"), _game.Inventory.Count, Items.INVENTORY), new Vector2(x + w, y + 24), D.Dim, Align.Right);
|
||||
float ry = y + 50;
|
||||
foreach (var it in _game.Merchant.ToList())
|
||||
{
|
||||
var row = new RectangleF(x, ry, w, 96);
|
||||
D.Rect(sb, row, new Color(30, 22, 15) * 0.9f);
|
||||
D.Frame(sb, row, RarityColor(it.Rarity), 2);
|
||||
ItemTile(sb, new RectangleF(row.X + 10, row.Y + 10, 76, 76), it, false);
|
||||
D.Text(sb, Assets.SansBold, 20, ItemName(it), new Vector2(row.X + 100, row.Y + 22), RarityColor(it.Rarity));
|
||||
D.Text(sb, Assets.Sans, 15, ItemMain(it), new Vector2(row.X + 100, row.Y + 48), D.Sand);
|
||||
string aff = string.Join(" · ", ItemAffixes(it)); // i18n-ok
|
||||
if (aff.Length > 0) D.Text(sb, Assets.Sans, 14, aff, new Vector2(row.X + 100, row.Y + 72), D.Blue);
|
||||
var (delta, dc) = PowerDelta(it);
|
||||
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), 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;
|
||||
}
|
||||
|
||||
// Schmied: Ausrüstungsplätze verstärken (wirkt auf jedes Stück im Platz)
|
||||
float fx = x + w + 50, fw = r.Right - 30 - fx;
|
||||
D.Text(sb, Assets.Serif, 30, L.t("forum.tab.forge"), new Vector2(fx, y), D.Gold);
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
var slot = (ItemSlot)i;
|
||||
var row = new RectangleF(fx, y + 50 + i * 104, fw, 96);
|
||||
D.Rect(sb, row, new Color(30, 22, 15) * 0.9f);
|
||||
D.Frame(sb, row, D.Border, 2);
|
||||
ItemTile(sb, new RectangleF(row.X + 10, row.Y + 10, 76, 76), _game.Equipped[i], false);
|
||||
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 - 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user