@almadar/ui 5.38.0 → 5.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +385 -111
- package/dist/avl/index.js +385 -111
- package/dist/components/game/molecules/DialogueBox.d.ts +0 -21
- package/dist/components/game/molecules/InventoryPanel.d.ts +0 -16
- package/dist/components/index.cjs +385 -111
- package/dist/components/index.js +385 -111
- package/dist/providers/index.cjs +385 -111
- package/dist/providers/index.js +385 -111
- package/dist/runtime/index.cjs +385 -111
- package/dist/runtime/index.js +385 -111
- package/package.json +1 -1
package/dist/runtime/index.cjs
CHANGED
|
@@ -7000,8 +7000,8 @@ var init_TraitFrame = __esm({
|
|
|
7000
7000
|
}
|
|
7001
7001
|
});
|
|
7002
7002
|
function HealthBar({
|
|
7003
|
-
current,
|
|
7004
|
-
max,
|
|
7003
|
+
current = 3,
|
|
7004
|
+
max = 5,
|
|
7005
7005
|
format = "hearts",
|
|
7006
7006
|
size = "md",
|
|
7007
7007
|
className,
|
|
@@ -7250,11 +7250,11 @@ var init_ControlButton = __esm({
|
|
|
7250
7250
|
});
|
|
7251
7251
|
function Sprite({
|
|
7252
7252
|
spritesheet = "https://almadar-kflow-assets.web.app/shared/isometric-blocks/Spritesheet/allTiles_sheet.png",
|
|
7253
|
-
frameWidth,
|
|
7254
|
-
frameHeight,
|
|
7255
|
-
frame,
|
|
7256
|
-
x,
|
|
7257
|
-
y,
|
|
7253
|
+
frameWidth = 64,
|
|
7254
|
+
frameHeight = 64,
|
|
7255
|
+
frame = 0,
|
|
7256
|
+
x = 0,
|
|
7257
|
+
y = 0,
|
|
7258
7258
|
scale = 1,
|
|
7259
7259
|
flipX = false,
|
|
7260
7260
|
flipY = false,
|
|
@@ -7324,7 +7324,7 @@ var init_Sprite = __esm({
|
|
|
7324
7324
|
}
|
|
7325
7325
|
});
|
|
7326
7326
|
function StateIndicator({
|
|
7327
|
-
state,
|
|
7327
|
+
state = "idle",
|
|
7328
7328
|
label,
|
|
7329
7329
|
size = "md",
|
|
7330
7330
|
animated = true,
|
|
@@ -7395,8 +7395,8 @@ function formatTime(seconds, format) {
|
|
|
7395
7395
|
return `${mins.toString().padStart(2, "0")}:${padded}`;
|
|
7396
7396
|
}
|
|
7397
7397
|
function TimerDisplay({
|
|
7398
|
-
seconds,
|
|
7399
|
-
running,
|
|
7398
|
+
seconds = 90,
|
|
7399
|
+
running = true,
|
|
7400
7400
|
format = "mm:ss",
|
|
7401
7401
|
size = "md",
|
|
7402
7402
|
className,
|
|
@@ -7433,8 +7433,8 @@ var init_TimerDisplay = __esm({
|
|
|
7433
7433
|
});
|
|
7434
7434
|
function ResourceCounter({
|
|
7435
7435
|
icon,
|
|
7436
|
-
label,
|
|
7437
|
-
value,
|
|
7436
|
+
label = "Gold",
|
|
7437
|
+
value = 250,
|
|
7438
7438
|
max,
|
|
7439
7439
|
color,
|
|
7440
7440
|
size = "md",
|
|
@@ -7486,10 +7486,10 @@ var init_ResourceCounter = __esm({
|
|
|
7486
7486
|
}
|
|
7487
7487
|
});
|
|
7488
7488
|
function ItemSlot({
|
|
7489
|
-
icon,
|
|
7490
|
-
label,
|
|
7489
|
+
icon = "sword",
|
|
7490
|
+
label = "Iron Sword",
|
|
7491
7491
|
quantity,
|
|
7492
|
-
rarity = "
|
|
7492
|
+
rarity = "uncommon",
|
|
7493
7493
|
empty,
|
|
7494
7494
|
size = "md",
|
|
7495
7495
|
selected,
|
|
@@ -7562,7 +7562,7 @@ var init_ItemSlot = __esm({
|
|
|
7562
7562
|
}
|
|
7563
7563
|
});
|
|
7564
7564
|
function TurnIndicator({
|
|
7565
|
-
currentTurn,
|
|
7565
|
+
currentTurn = 1,
|
|
7566
7566
|
maxTurns,
|
|
7567
7567
|
activeTeam,
|
|
7568
7568
|
phase,
|
|
@@ -7625,7 +7625,7 @@ function getComboScale(combo) {
|
|
|
7625
7625
|
return "";
|
|
7626
7626
|
}
|
|
7627
7627
|
function ComboCounter({
|
|
7628
|
-
combo,
|
|
7628
|
+
combo = 5,
|
|
7629
7629
|
multiplier,
|
|
7630
7630
|
streak,
|
|
7631
7631
|
size = "md",
|
|
@@ -7671,10 +7671,10 @@ var init_ComboCounter = __esm({
|
|
|
7671
7671
|
}
|
|
7672
7672
|
});
|
|
7673
7673
|
function XPBar({
|
|
7674
|
-
current,
|
|
7675
|
-
max,
|
|
7676
|
-
level,
|
|
7677
|
-
showLabel =
|
|
7674
|
+
current = 350,
|
|
7675
|
+
max = 1e3,
|
|
7676
|
+
level = 5,
|
|
7677
|
+
showLabel = true,
|
|
7678
7678
|
size = "md",
|
|
7679
7679
|
animated = true,
|
|
7680
7680
|
className
|
|
@@ -7757,7 +7757,7 @@ var init_XPBar = __esm({
|
|
|
7757
7757
|
function WaypointMarker({
|
|
7758
7758
|
label,
|
|
7759
7759
|
icon,
|
|
7760
|
-
active =
|
|
7760
|
+
active = true,
|
|
7761
7761
|
completed = false,
|
|
7762
7762
|
size = "md",
|
|
7763
7763
|
className
|
|
@@ -7831,11 +7831,11 @@ function formatDuration(seconds) {
|
|
|
7831
7831
|
return `${Math.round(seconds)}s`;
|
|
7832
7832
|
}
|
|
7833
7833
|
function StatusEffect({
|
|
7834
|
-
icon,
|
|
7835
|
-
label,
|
|
7836
|
-
duration,
|
|
7834
|
+
icon = "shield",
|
|
7835
|
+
label = "Shield",
|
|
7836
|
+
duration = 30,
|
|
7837
7837
|
stacks,
|
|
7838
|
-
variant = "
|
|
7838
|
+
variant = "buff",
|
|
7839
7839
|
size = "md",
|
|
7840
7840
|
className
|
|
7841
7841
|
}) {
|
|
@@ -7897,7 +7897,7 @@ var init_StatusEffect = __esm({
|
|
|
7897
7897
|
}
|
|
7898
7898
|
});
|
|
7899
7899
|
function DamageNumber({
|
|
7900
|
-
value,
|
|
7900
|
+
value = 42,
|
|
7901
7901
|
type = "damage",
|
|
7902
7902
|
size = "md",
|
|
7903
7903
|
className
|
|
@@ -7946,8 +7946,8 @@ var init_DamageNumber = __esm({
|
|
|
7946
7946
|
}
|
|
7947
7947
|
});
|
|
7948
7948
|
function DialogueBubble({
|
|
7949
|
-
speaker,
|
|
7950
|
-
text,
|
|
7949
|
+
speaker = "Hero",
|
|
7950
|
+
text = "The dungeon awaits. Choose your path wisely.",
|
|
7951
7951
|
portrait = "https://almadar-kflow-assets.web.app/shared/characters/archetypes/04_hero.png",
|
|
7952
7952
|
position = "bottom",
|
|
7953
7953
|
className
|
|
@@ -7984,7 +7984,7 @@ var init_DialogueBubble = __esm({
|
|
|
7984
7984
|
}
|
|
7985
7985
|
});
|
|
7986
7986
|
function ChoiceButton({
|
|
7987
|
-
text,
|
|
7987
|
+
text = "Charge forward into the fray",
|
|
7988
7988
|
index,
|
|
7989
7989
|
disabled = false,
|
|
7990
7990
|
selected = false,
|
|
@@ -8030,7 +8030,7 @@ var init_ChoiceButton = __esm({
|
|
|
8030
8030
|
}
|
|
8031
8031
|
});
|
|
8032
8032
|
function ActionButton({
|
|
8033
|
-
label,
|
|
8033
|
+
label = "Attack",
|
|
8034
8034
|
icon,
|
|
8035
8035
|
cooldown = 0,
|
|
8036
8036
|
disabled = false,
|
|
@@ -8110,13 +8110,13 @@ var init_ActionButton = __esm({
|
|
|
8110
8110
|
}
|
|
8111
8111
|
});
|
|
8112
8112
|
function MiniMap({
|
|
8113
|
-
tiles =
|
|
8114
|
-
units =
|
|
8113
|
+
tiles = DEFAULT_TILES,
|
|
8114
|
+
units = DEFAULT_UNITS,
|
|
8115
8115
|
width = 150,
|
|
8116
8116
|
height = 150,
|
|
8117
8117
|
mapWidth = 100,
|
|
8118
8118
|
mapHeight = 100,
|
|
8119
|
-
viewportRect,
|
|
8119
|
+
viewportRect = DEFAULT_VIEWPORT,
|
|
8120
8120
|
className
|
|
8121
8121
|
}) {
|
|
8122
8122
|
const canvasRef = React82__namespace.useRef(null);
|
|
@@ -8195,10 +8195,25 @@ function MiniMap({
|
|
|
8195
8195
|
}
|
|
8196
8196
|
);
|
|
8197
8197
|
}
|
|
8198
|
+
var DEFAULT_TILES, DEFAULT_UNITS, DEFAULT_VIEWPORT;
|
|
8198
8199
|
var init_MiniMap = __esm({
|
|
8199
8200
|
"components/game/atoms/MiniMap.tsx"() {
|
|
8200
8201
|
"use client";
|
|
8201
8202
|
init_cn();
|
|
8203
|
+
DEFAULT_TILES = [
|
|
8204
|
+
{ x: 10, y: 10, color: "#4ade80" },
|
|
8205
|
+
{ x: 20, y: 15, color: "#4ade80" },
|
|
8206
|
+
{ x: 30, y: 25, color: "#22c55e" },
|
|
8207
|
+
{ x: 50, y: 40, color: "#4ade80" },
|
|
8208
|
+
{ x: 60, y: 55, color: "#16a34a" },
|
|
8209
|
+
{ x: 40, y: 60, color: "#4ade80" },
|
|
8210
|
+
{ x: 70, y: 30, color: "#22c55e" },
|
|
8211
|
+
{ x: 80, y: 70, color: "#4ade80" }
|
|
8212
|
+
];
|
|
8213
|
+
DEFAULT_UNITS = [
|
|
8214
|
+
{ x: 30, y: 30, color: "#60a5fa", isPlayer: true }
|
|
8215
|
+
];
|
|
8216
|
+
DEFAULT_VIEWPORT = { x: 20, y: 20, w: 40, h: 40 };
|
|
8202
8217
|
MiniMap.displayName = "MiniMap";
|
|
8203
8218
|
}
|
|
8204
8219
|
});
|
|
@@ -9321,7 +9336,7 @@ var init_Accordion = __esm({
|
|
|
9321
9336
|
}
|
|
9322
9337
|
});
|
|
9323
9338
|
function ActionButtons({
|
|
9324
|
-
buttons,
|
|
9339
|
+
buttons = DEFAULT_BUTTONS,
|
|
9325
9340
|
onAction,
|
|
9326
9341
|
actionEvent,
|
|
9327
9342
|
layout = "horizontal",
|
|
@@ -9428,7 +9443,7 @@ function ActionButtons({
|
|
|
9428
9443
|
button.id
|
|
9429
9444
|
)) });
|
|
9430
9445
|
}
|
|
9431
|
-
var sizeMap14, layoutMap;
|
|
9446
|
+
var sizeMap14, layoutMap, DEFAULT_BUTTONS;
|
|
9432
9447
|
var init_ActionButtons = __esm({
|
|
9433
9448
|
"components/game/molecules/ActionButtons.tsx"() {
|
|
9434
9449
|
"use client";
|
|
@@ -9445,6 +9460,11 @@ var init_ActionButtons = __esm({
|
|
|
9445
9460
|
vertical: "flex flex-col gap-2",
|
|
9446
9461
|
diamond: "grid grid-cols-3 gap-1"
|
|
9447
9462
|
};
|
|
9463
|
+
DEFAULT_BUTTONS = [
|
|
9464
|
+
{ id: "jump", label: "Jump", icon: "chevron-up", variant: "primary" },
|
|
9465
|
+
{ id: "attack", label: "Attack", icon: "sword", variant: "secondary" },
|
|
9466
|
+
{ id: "dodge", label: "Dodge", icon: "wind", variant: "ghost" }
|
|
9467
|
+
];
|
|
9448
9468
|
ActionButtons.displayName = "ActionButtons";
|
|
9449
9469
|
}
|
|
9450
9470
|
});
|
|
@@ -10637,7 +10657,7 @@ function IsometricCanvas({
|
|
|
10637
10657
|
// Rendering options
|
|
10638
10658
|
scale = 0.4,
|
|
10639
10659
|
debug: debug2 = false,
|
|
10640
|
-
backgroundImage = "
|
|
10660
|
+
backgroundImage = "",
|
|
10641
10661
|
showMinimap = true,
|
|
10642
10662
|
enableCamera = true,
|
|
10643
10663
|
unitScale = 1,
|
|
@@ -11775,10 +11795,10 @@ function BattleTemplate({
|
|
|
11775
11795
|
entity,
|
|
11776
11796
|
scale = 0.45,
|
|
11777
11797
|
unitScale = 1,
|
|
11778
|
-
tiles,
|
|
11779
|
-
units,
|
|
11780
|
-
features,
|
|
11781
|
-
assetManifest,
|
|
11798
|
+
tiles = DEFAULT_BATTLE_TILES,
|
|
11799
|
+
units = DEFAULT_BATTLE_UNITS,
|
|
11800
|
+
features = DEFAULT_BATTLE_FEATURES,
|
|
11801
|
+
assetManifest = DEFAULT_BATTLE_MANIFEST,
|
|
11782
11802
|
className
|
|
11783
11803
|
}) {
|
|
11784
11804
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
@@ -11804,9 +11824,62 @@ function BattleTemplate({
|
|
|
11804
11824
|
}
|
|
11805
11825
|
);
|
|
11806
11826
|
}
|
|
11827
|
+
var CDN, DEFAULT_BATTLE_TILES, DEFAULT_BATTLE_UNITS, DEFAULT_BATTLE_FEATURES, DEFAULT_BATTLE_MANIFEST;
|
|
11807
11828
|
var init_BattleTemplate = __esm({
|
|
11808
11829
|
"components/game/templates/BattleTemplate.tsx"() {
|
|
11809
11830
|
init_BattleBoard();
|
|
11831
|
+
CDN = "https://almadar-kflow-assets.web.app/shared";
|
|
11832
|
+
DEFAULT_BATTLE_TILES = [
|
|
11833
|
+
{ x: 0, y: 0, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
11834
|
+
{ x: 1, y: 0, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
11835
|
+
{ x: 2, y: 0, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
11836
|
+
{ x: 3, y: 0, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
11837
|
+
{ x: 4, y: 0, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
11838
|
+
{ x: 0, y: 1, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
11839
|
+
{ x: 1, y: 1, terrain: "dirt", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_01.png` },
|
|
11840
|
+
{ x: 2, y: 1, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
11841
|
+
{ x: 3, y: 1, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
11842
|
+
{ x: 4, y: 1, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
11843
|
+
{ x: 0, y: 2, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
11844
|
+
{ x: 1, y: 2, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
11845
|
+
{ x: 2, y: 2, terrain: "dirt", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_01.png` },
|
|
11846
|
+
{ x: 3, y: 2, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
11847
|
+
{ x: 4, y: 2, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
11848
|
+
{ x: 0, y: 3, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
11849
|
+
{ x: 1, y: 3, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
11850
|
+
{ x: 2, y: 3, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
11851
|
+
{ x: 3, y: 3, terrain: "dirt", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_01.png` },
|
|
11852
|
+
{ x: 4, y: 3, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
11853
|
+
{ x: 0, y: 4, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
11854
|
+
{ x: 1, y: 4, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
11855
|
+
{ x: 2, y: 4, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
11856
|
+
{ x: 3, y: 4, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
11857
|
+
{ x: 4, y: 4, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` }
|
|
11858
|
+
];
|
|
11859
|
+
DEFAULT_BATTLE_UNITS = [
|
|
11860
|
+
{ id: "u1", position: { x: 1, y: 1 }, unitType: "worker", name: "Worker", team: "player", health: 10, maxHealth: 10, sprite: `${CDN}/sprite-sheets/amir-sprite-sheet-se.png` },
|
|
11861
|
+
{ id: "u2", position: { x: 3, y: 3 }, unitType: "guardian", name: "Guardian", team: "enemy", health: 8, maxHealth: 10, sprite: `${CDN}/sprite-sheets/destroyer-sprite-sheet-sw.png` }
|
|
11862
|
+
];
|
|
11863
|
+
DEFAULT_BATTLE_FEATURES = [
|
|
11864
|
+
{ id: "f1", x: 2, y: 2, type: "gold_mine", sprite: `${CDN}/world-map/gold_mine.png` },
|
|
11865
|
+
{ id: "f2", x: 3, y: 1, type: "portal", sprite: `${CDN}/world-map/portal_open.png` }
|
|
11866
|
+
];
|
|
11867
|
+
DEFAULT_BATTLE_MANIFEST = {
|
|
11868
|
+
baseUrl: CDN,
|
|
11869
|
+
terrains: {
|
|
11870
|
+
stone: "/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png",
|
|
11871
|
+
dirt: "/isometric-blocks/PNG/Abstract tiles/abstractTile_01.png",
|
|
11872
|
+
grass: "/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png"
|
|
11873
|
+
},
|
|
11874
|
+
units: {
|
|
11875
|
+
worker: "/sprite-sheets/amir-sprite-sheet-se.png",
|
|
11876
|
+
guardian: "/sprite-sheets/destroyer-sprite-sheet-sw.png"
|
|
11877
|
+
},
|
|
11878
|
+
features: {
|
|
11879
|
+
gold_mine: "/world-map/gold_mine.png",
|
|
11880
|
+
portal: "/world-map/portal_open.png"
|
|
11881
|
+
}
|
|
11882
|
+
};
|
|
11810
11883
|
BattleTemplate.displayName = "BattleTemplate";
|
|
11811
11884
|
}
|
|
11812
11885
|
});
|
|
@@ -19806,10 +19879,10 @@ var init_CastleBoard = __esm({
|
|
|
19806
19879
|
function CastleTemplate({
|
|
19807
19880
|
entity,
|
|
19808
19881
|
scale = 0.45,
|
|
19809
|
-
tiles,
|
|
19810
|
-
units,
|
|
19811
|
-
features,
|
|
19812
|
-
assetManifest,
|
|
19882
|
+
tiles = DEFAULT_CASTLE_TILES,
|
|
19883
|
+
units = DEFAULT_CASTLE_UNITS,
|
|
19884
|
+
features = DEFAULT_CASTLE_FEATURES,
|
|
19885
|
+
assetManifest = DEFAULT_CASTLE_MANIFEST,
|
|
19813
19886
|
className
|
|
19814
19887
|
}) {
|
|
19815
19888
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
@@ -19830,9 +19903,61 @@ function CastleTemplate({
|
|
|
19830
19903
|
}
|
|
19831
19904
|
);
|
|
19832
19905
|
}
|
|
19906
|
+
var CDN2, DEFAULT_CASTLE_TILES, DEFAULT_CASTLE_UNITS, DEFAULT_CASTLE_FEATURES, DEFAULT_CASTLE_MANIFEST;
|
|
19833
19907
|
var init_CastleTemplate = __esm({
|
|
19834
19908
|
"components/game/templates/CastleTemplate.tsx"() {
|
|
19835
19909
|
init_CastleBoard();
|
|
19910
|
+
CDN2 = "https://almadar-kflow-assets.web.app/shared";
|
|
19911
|
+
DEFAULT_CASTLE_TILES = [
|
|
19912
|
+
{ x: 0, y: 0, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
19913
|
+
{ x: 1, y: 0, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
19914
|
+
{ x: 2, y: 0, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
19915
|
+
{ x: 3, y: 0, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
19916
|
+
{ x: 4, y: 0, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
19917
|
+
{ x: 0, y: 1, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
19918
|
+
{ x: 1, y: 1, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
19919
|
+
{ x: 2, y: 1, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
19920
|
+
{ x: 3, y: 1, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
19921
|
+
{ x: 4, y: 1, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
19922
|
+
{ x: 0, y: 2, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
19923
|
+
{ x: 1, y: 2, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
19924
|
+
{ x: 2, y: 2, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_09.png` },
|
|
19925
|
+
{ x: 3, y: 2, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
19926
|
+
{ x: 4, y: 2, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
19927
|
+
{ x: 0, y: 3, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
19928
|
+
{ x: 1, y: 3, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
19929
|
+
{ x: 2, y: 3, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
19930
|
+
{ x: 3, y: 3, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
19931
|
+
{ x: 4, y: 3, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
19932
|
+
{ x: 0, y: 4, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
19933
|
+
{ x: 1, y: 4, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
19934
|
+
{ x: 2, y: 4, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
19935
|
+
{ x: 3, y: 4, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
19936
|
+
{ x: 4, y: 4, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` }
|
|
19937
|
+
];
|
|
19938
|
+
DEFAULT_CASTLE_UNITS = [
|
|
19939
|
+
{ id: "u1", position: { x: 1, y: 1 }, unitType: "worker", name: "Worker", team: "player", health: 10, maxHealth: 10, sprite: `${CDN2}/sprite-sheets/coordinator-sprite-sheet-se.png` },
|
|
19940
|
+
{ id: "u2", position: { x: 3, y: 3 }, unitType: "guardian", name: "Guardian", team: "player", health: 10, maxHealth: 10, sprite: `${CDN2}/sprite-sheets/forger-sprite-sheet-se.png` }
|
|
19941
|
+
];
|
|
19942
|
+
DEFAULT_CASTLE_FEATURES = [
|
|
19943
|
+
{ id: "f1", x: 2, y: 2, type: "chest", sprite: `${CDN2}/world-map/treasure_chest_closed.png` },
|
|
19944
|
+
{ id: "f2", x: 3, y: 1, type: "crystal", sprite: `${CDN2}/world-map/resonance_crystal.png` }
|
|
19945
|
+
];
|
|
19946
|
+
DEFAULT_CASTLE_MANIFEST = {
|
|
19947
|
+
baseUrl: CDN2,
|
|
19948
|
+
terrains: {
|
|
19949
|
+
wall: "/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png",
|
|
19950
|
+
floor: "/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png"
|
|
19951
|
+
},
|
|
19952
|
+
units: {
|
|
19953
|
+
worker: "/sprite-sheets/coordinator-sprite-sheet-se.png",
|
|
19954
|
+
guardian: "/sprite-sheets/forger-sprite-sheet-se.png"
|
|
19955
|
+
},
|
|
19956
|
+
features: {
|
|
19957
|
+
chest: "/world-map/treasure_chest_closed.png",
|
|
19958
|
+
crystal: "/world-map/resonance_crystal.png"
|
|
19959
|
+
}
|
|
19960
|
+
};
|
|
19836
19961
|
CastleTemplate.displayName = "CastleTemplate";
|
|
19837
19962
|
}
|
|
19838
19963
|
});
|
|
@@ -20954,7 +21079,7 @@ var init_CodeRunnerPanel = __esm({
|
|
|
20954
21079
|
}
|
|
20955
21080
|
});
|
|
20956
21081
|
function CombatLog({
|
|
20957
|
-
events: events2,
|
|
21082
|
+
events: events2 = DEFAULT_COMBAT_EVENTS,
|
|
20958
21083
|
maxVisible = 50,
|
|
20959
21084
|
autoScroll = true,
|
|
20960
21085
|
showTimestamps = false,
|
|
@@ -21005,7 +21130,7 @@ function CombatLog({
|
|
|
21005
21130
|
}) }) })
|
|
21006
21131
|
] });
|
|
21007
21132
|
}
|
|
21008
|
-
var eventIcons, eventColors, eventBadgeVariants;
|
|
21133
|
+
var eventIcons, eventColors, eventBadgeVariants, DEFAULT_COMBAT_EVENTS;
|
|
21009
21134
|
var init_CombatLog = __esm({
|
|
21010
21135
|
"components/game/molecules/CombatLog.tsx"() {
|
|
21011
21136
|
init_atoms2();
|
|
@@ -21037,6 +21162,13 @@ var init_CombatLog = __esm({
|
|
|
21037
21162
|
death: "secondary",
|
|
21038
21163
|
spawn: "secondary"
|
|
21039
21164
|
};
|
|
21165
|
+
DEFAULT_COMBAT_EVENTS = [
|
|
21166
|
+
{ id: "e1", type: "spawn", message: "Shadow Guard entered the field.", timestamp: 0, turn: 1 },
|
|
21167
|
+
{ id: "e2", type: "move", message: "Hero moved to (3, 4).", timestamp: 1, actorName: "Hero", turn: 1 },
|
|
21168
|
+
{ id: "e3", type: "attack", message: "Hero attacked Shadow Guard.", timestamp: 2, actorName: "Hero", targetName: "Shadow Guard", value: 18, turn: 2 },
|
|
21169
|
+
{ id: "e4", type: "defend", message: "Shadow Guard blocked 5 damage.", timestamp: 3, actorName: "Shadow Guard", value: 5, turn: 2 },
|
|
21170
|
+
{ id: "e5", type: "heal", message: "Hero used Health Potion.", timestamp: 4, actorName: "Hero", value: 25, turn: 3 }
|
|
21171
|
+
];
|
|
21040
21172
|
CombatLog.displayName = "CombatLog";
|
|
21041
21173
|
}
|
|
21042
21174
|
});
|
|
@@ -21444,9 +21576,9 @@ function isValidRarity(value) {
|
|
|
21444
21576
|
return rarityValues.includes(value);
|
|
21445
21577
|
}
|
|
21446
21578
|
function CraftingRecipe({
|
|
21447
|
-
inputs,
|
|
21448
|
-
output,
|
|
21449
|
-
canCraft =
|
|
21579
|
+
inputs = DEFAULT_INPUTS,
|
|
21580
|
+
output = DEFAULT_OUTPUT,
|
|
21581
|
+
canCraft = true,
|
|
21450
21582
|
onCraft,
|
|
21451
21583
|
craftEvent,
|
|
21452
21584
|
className
|
|
@@ -21507,7 +21639,7 @@ function CraftingRecipe({
|
|
|
21507
21639
|
}
|
|
21508
21640
|
);
|
|
21509
21641
|
}
|
|
21510
|
-
var rarityValues;
|
|
21642
|
+
var rarityValues, DEFAULT_INPUTS, DEFAULT_OUTPUT;
|
|
21511
21643
|
var init_CraftingRecipe = __esm({
|
|
21512
21644
|
"components/game/molecules/CraftingRecipe.tsx"() {
|
|
21513
21645
|
"use client";
|
|
@@ -21519,6 +21651,15 @@ var init_CraftingRecipe = __esm({
|
|
|
21519
21651
|
init_Stack();
|
|
21520
21652
|
init_Icon();
|
|
21521
21653
|
rarityValues = ["common", "uncommon", "rare", "epic", "legendary"];
|
|
21654
|
+
DEFAULT_INPUTS = [
|
|
21655
|
+
{ icon: "gem", label: "Iron Ore", required: 2, available: 3 },
|
|
21656
|
+
{ icon: "flame", label: "Coal", required: 1, available: 1 }
|
|
21657
|
+
];
|
|
21658
|
+
DEFAULT_OUTPUT = {
|
|
21659
|
+
icon: "sword",
|
|
21660
|
+
label: "Iron Sword",
|
|
21661
|
+
rarity: "uncommon"
|
|
21662
|
+
};
|
|
21522
21663
|
CraftingRecipe.displayName = "CraftingRecipe";
|
|
21523
21664
|
}
|
|
21524
21665
|
});
|
|
@@ -26515,10 +26656,10 @@ var init_StatBadge = __esm({
|
|
|
26515
26656
|
}
|
|
26516
26657
|
});
|
|
26517
26658
|
function InventoryGrid({
|
|
26518
|
-
items,
|
|
26659
|
+
items = DEFAULT_GRID_ITEMS,
|
|
26519
26660
|
columns = 4,
|
|
26520
|
-
totalSlots,
|
|
26521
|
-
selectedId,
|
|
26661
|
+
totalSlots = 12,
|
|
26662
|
+
selectedId = "",
|
|
26522
26663
|
onSelect,
|
|
26523
26664
|
selectEvent,
|
|
26524
26665
|
size = "md",
|
|
@@ -26567,7 +26708,7 @@ function InventoryGrid({
|
|
|
26567
26708
|
}
|
|
26568
26709
|
);
|
|
26569
26710
|
}
|
|
26570
|
-
var columnMap;
|
|
26711
|
+
var columnMap, DEFAULT_GRID_ITEMS;
|
|
26571
26712
|
var init_InventoryGrid = __esm({
|
|
26572
26713
|
"components/game/molecules/InventoryGrid.tsx"() {
|
|
26573
26714
|
"use client";
|
|
@@ -26584,12 +26725,18 @@ var init_InventoryGrid = __esm({
|
|
|
26584
26725
|
7: "grid-cols-7",
|
|
26585
26726
|
8: "grid-cols-8"
|
|
26586
26727
|
};
|
|
26728
|
+
DEFAULT_GRID_ITEMS = [
|
|
26729
|
+
{ id: "grid-1", icon: "sword", label: "Iron Sword", quantity: 1, rarity: "common" },
|
|
26730
|
+
{ id: "grid-2", icon: "flask-conical", label: "Health Potion", quantity: 3, rarity: "uncommon" },
|
|
26731
|
+
{ id: "grid-3", icon: "shield", label: "Wooden Shield", quantity: 1, rarity: "common" },
|
|
26732
|
+
{ id: "grid-4", icon: "gem", label: "Ruby Gem", quantity: 2, rarity: "rare" }
|
|
26733
|
+
];
|
|
26587
26734
|
InventoryGrid.displayName = "InventoryGrid";
|
|
26588
26735
|
}
|
|
26589
26736
|
});
|
|
26590
26737
|
function QuestTracker({
|
|
26591
|
-
quests,
|
|
26592
|
-
activeQuestId,
|
|
26738
|
+
quests = DEFAULT_QUESTS,
|
|
26739
|
+
activeQuestId = "q2",
|
|
26593
26740
|
className
|
|
26594
26741
|
}) {
|
|
26595
26742
|
return /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "sm", className, children: quests.map((quest) => {
|
|
@@ -26655,6 +26802,7 @@ function QuestTracker({
|
|
|
26655
26802
|
);
|
|
26656
26803
|
}) });
|
|
26657
26804
|
}
|
|
26805
|
+
var DEFAULT_QUESTS;
|
|
26658
26806
|
var init_QuestTracker = __esm({
|
|
26659
26807
|
"components/game/molecules/QuestTracker.tsx"() {
|
|
26660
26808
|
"use client";
|
|
@@ -26664,6 +26812,11 @@ var init_QuestTracker = __esm({
|
|
|
26664
26812
|
init_Typography();
|
|
26665
26813
|
init_Box();
|
|
26666
26814
|
init_Stack();
|
|
26815
|
+
DEFAULT_QUESTS = [
|
|
26816
|
+
{ id: "q1", title: "Reach the Ancient Ruins", progress: 1, maxProgress: 1, completed: true },
|
|
26817
|
+
{ id: "q2", title: "Defeat the Shadow Guard", progress: 2, maxProgress: 5, active: true },
|
|
26818
|
+
{ id: "q3", title: "Collect 3 Crystal Shards", progress: 0, maxProgress: 3, active: false }
|
|
26819
|
+
];
|
|
26667
26820
|
QuestTracker.displayName = "QuestTracker";
|
|
26668
26821
|
}
|
|
26669
26822
|
});
|
|
@@ -26676,7 +26829,7 @@ function formatTime2(seconds) {
|
|
|
26676
26829
|
return `${seconds}s`;
|
|
26677
26830
|
}
|
|
26678
26831
|
function PowerupSlots({
|
|
26679
|
-
active,
|
|
26832
|
+
active = DEFAULT_ACTIVE_POWERUPS,
|
|
26680
26833
|
maxSlots = 4,
|
|
26681
26834
|
className
|
|
26682
26835
|
}) {
|
|
@@ -26721,6 +26874,7 @@ function PowerupSlots({
|
|
|
26721
26874
|
))
|
|
26722
26875
|
] });
|
|
26723
26876
|
}
|
|
26877
|
+
var DEFAULT_ACTIVE_POWERUPS;
|
|
26724
26878
|
var init_PowerupSlots = __esm({
|
|
26725
26879
|
"components/game/molecules/PowerupSlots.tsx"() {
|
|
26726
26880
|
"use client";
|
|
@@ -26729,6 +26883,10 @@ var init_PowerupSlots = __esm({
|
|
|
26729
26883
|
init_Box();
|
|
26730
26884
|
init_Stack();
|
|
26731
26885
|
init_Typography();
|
|
26886
|
+
DEFAULT_ACTIVE_POWERUPS = [
|
|
26887
|
+
{ id: "pw1", icon: "zap", label: "Speed Boost", remainingTime: 12 },
|
|
26888
|
+
{ id: "pw2", icon: "shield", label: "Iron Shield", remainingTime: 30 }
|
|
26889
|
+
];
|
|
26732
26890
|
PowerupSlots.displayName = "PowerupSlots";
|
|
26733
26891
|
}
|
|
26734
26892
|
});
|
|
@@ -26740,7 +26898,7 @@ function GameCanvas2D({
|
|
|
26740
26898
|
tickEvent,
|
|
26741
26899
|
drawEvent,
|
|
26742
26900
|
fps = 60,
|
|
26743
|
-
backgroundImage = "
|
|
26901
|
+
backgroundImage = "",
|
|
26744
26902
|
assetBaseUrl = "https://almadar-kflow-assets.web.app/shared/",
|
|
26745
26903
|
className
|
|
26746
26904
|
}) {
|
|
@@ -26844,10 +27002,10 @@ var init_GameCanvas2D = __esm({
|
|
|
26844
27002
|
}
|
|
26845
27003
|
});
|
|
26846
27004
|
function HealthPanel({
|
|
26847
|
-
current,
|
|
26848
|
-
max,
|
|
26849
|
-
shield,
|
|
26850
|
-
label,
|
|
27005
|
+
current = 75,
|
|
27006
|
+
max = 100,
|
|
27007
|
+
shield = 20,
|
|
27008
|
+
label = "Player HP",
|
|
26851
27009
|
effects,
|
|
26852
27010
|
showNumbers = true,
|
|
26853
27011
|
size = "md",
|
|
@@ -26965,11 +27123,11 @@ var init_HealthPanel = __esm({
|
|
|
26965
27123
|
}
|
|
26966
27124
|
});
|
|
26967
27125
|
function ScoreBoard({
|
|
26968
|
-
score: rawScore,
|
|
26969
|
-
highScore: rawHighScore,
|
|
26970
|
-
combo: rawCombo,
|
|
26971
|
-
multiplier: rawMultiplier,
|
|
26972
|
-
level: rawLevel,
|
|
27126
|
+
score: rawScore = 4200,
|
|
27127
|
+
highScore: rawHighScore = 8750,
|
|
27128
|
+
combo: rawCombo = 3,
|
|
27129
|
+
multiplier: rawMultiplier = 2,
|
|
27130
|
+
level: rawLevel = 4,
|
|
26973
27131
|
className
|
|
26974
27132
|
}) {
|
|
26975
27133
|
const score = rawScore ?? 0;
|
|
@@ -27042,7 +27200,7 @@ var init_ScoreBoard = __esm({
|
|
|
27042
27200
|
}
|
|
27043
27201
|
});
|
|
27044
27202
|
function ResourceBar({
|
|
27045
|
-
resources,
|
|
27203
|
+
resources = DEFAULT_RESOURCES,
|
|
27046
27204
|
size = "md",
|
|
27047
27205
|
className
|
|
27048
27206
|
}) {
|
|
@@ -27068,21 +27226,27 @@ function ResourceBar({
|
|
|
27068
27226
|
}
|
|
27069
27227
|
);
|
|
27070
27228
|
}
|
|
27229
|
+
var DEFAULT_RESOURCES;
|
|
27071
27230
|
var init_ResourceBar = __esm({
|
|
27072
27231
|
"components/game/molecules/ResourceBar.tsx"() {
|
|
27073
27232
|
"use client";
|
|
27074
27233
|
init_cn();
|
|
27075
27234
|
init_StatBadge();
|
|
27076
27235
|
init_Box();
|
|
27236
|
+
DEFAULT_RESOURCES = [
|
|
27237
|
+
{ icon: "coins", label: "Gold", value: 320 },
|
|
27238
|
+
{ icon: "zap", label: "Energy", value: 7, max: 10 },
|
|
27239
|
+
{ icon: "gem", label: "Crystals", value: 15 }
|
|
27240
|
+
];
|
|
27077
27241
|
ResourceBar.displayName = "ResourceBar";
|
|
27078
27242
|
}
|
|
27079
27243
|
});
|
|
27080
27244
|
function TurnPanel({
|
|
27081
|
-
currentTurn,
|
|
27082
|
-
maxTurns,
|
|
27083
|
-
phase,
|
|
27084
|
-
activeTeam,
|
|
27085
|
-
actions,
|
|
27245
|
+
currentTurn = 3,
|
|
27246
|
+
maxTurns = 10,
|
|
27247
|
+
phase = "Attack",
|
|
27248
|
+
activeTeam = "Heroes",
|
|
27249
|
+
actions = DEFAULT_TURN_ACTIONS,
|
|
27086
27250
|
className
|
|
27087
27251
|
}) {
|
|
27088
27252
|
const eventBus = useEventBus();
|
|
@@ -27127,6 +27291,7 @@ function TurnPanel({
|
|
|
27127
27291
|
}
|
|
27128
27292
|
);
|
|
27129
27293
|
}
|
|
27294
|
+
var DEFAULT_TURN_ACTIONS;
|
|
27130
27295
|
var init_TurnPanel = __esm({
|
|
27131
27296
|
"components/game/molecules/TurnPanel.tsx"() {
|
|
27132
27297
|
"use client";
|
|
@@ -27135,15 +27300,19 @@ var init_TurnPanel = __esm({
|
|
|
27135
27300
|
init_Button();
|
|
27136
27301
|
init_Box();
|
|
27137
27302
|
init_useEventBus();
|
|
27303
|
+
DEFAULT_TURN_ACTIONS = [
|
|
27304
|
+
{ label: "End Turn", icon: "skip-forward", event: "END_TURN" },
|
|
27305
|
+
{ label: "Forfeit", icon: "flag", event: "FORFEIT", disabled: false }
|
|
27306
|
+
];
|
|
27138
27307
|
TurnPanel.displayName = "TurnPanel";
|
|
27139
27308
|
}
|
|
27140
27309
|
});
|
|
27141
27310
|
function EnemyPlate({
|
|
27142
|
-
name,
|
|
27143
|
-
health,
|
|
27144
|
-
maxHealth,
|
|
27145
|
-
level,
|
|
27146
|
-
effects,
|
|
27311
|
+
name = "Shadow Guard",
|
|
27312
|
+
health = 80,
|
|
27313
|
+
maxHealth = 100,
|
|
27314
|
+
level = 5,
|
|
27315
|
+
effects = DEFAULT_ENEMY_EFFECTS,
|
|
27147
27316
|
className
|
|
27148
27317
|
}) {
|
|
27149
27318
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -27209,7 +27378,7 @@ function EnemyPlate({
|
|
|
27209
27378
|
}
|
|
27210
27379
|
);
|
|
27211
27380
|
}
|
|
27212
|
-
var effectVariantMap2;
|
|
27381
|
+
var effectVariantMap2, DEFAULT_ENEMY_EFFECTS;
|
|
27213
27382
|
var init_EnemyPlate = __esm({
|
|
27214
27383
|
"components/game/molecules/EnemyPlate.tsx"() {
|
|
27215
27384
|
"use client";
|
|
@@ -27223,12 +27392,15 @@ var init_EnemyPlate = __esm({
|
|
|
27223
27392
|
debuff: "danger",
|
|
27224
27393
|
neutral: "neutral"
|
|
27225
27394
|
};
|
|
27395
|
+
DEFAULT_ENEMY_EFFECTS = [
|
|
27396
|
+
{ icon: "flame", label: "Burn", variant: "debuff" }
|
|
27397
|
+
];
|
|
27226
27398
|
EnemyPlate.displayName = "EnemyPlate";
|
|
27227
27399
|
}
|
|
27228
27400
|
});
|
|
27229
27401
|
function UnitCommandBar({
|
|
27230
|
-
commands,
|
|
27231
|
-
selectedUnitId,
|
|
27402
|
+
commands = DEFAULT_COMMANDS,
|
|
27403
|
+
selectedUnitId = "unit-1",
|
|
27232
27404
|
className
|
|
27233
27405
|
}) {
|
|
27234
27406
|
const eventBus = useEventBus();
|
|
@@ -27271,6 +27443,7 @@ function UnitCommandBar({
|
|
|
27271
27443
|
}
|
|
27272
27444
|
);
|
|
27273
27445
|
}
|
|
27446
|
+
var DEFAULT_COMMANDS;
|
|
27274
27447
|
var init_UnitCommandBar = __esm({
|
|
27275
27448
|
"components/game/molecules/UnitCommandBar.tsx"() {
|
|
27276
27449
|
"use client";
|
|
@@ -27279,6 +27452,12 @@ var init_UnitCommandBar = __esm({
|
|
|
27279
27452
|
init_Box();
|
|
27280
27453
|
init_Typography();
|
|
27281
27454
|
init_useEventBus();
|
|
27455
|
+
DEFAULT_COMMANDS = [
|
|
27456
|
+
{ label: "Move", icon: "move", event: "MOVE", hotkey: "M" },
|
|
27457
|
+
{ label: "Attack", icon: "sword", event: "ATTACK", hotkey: "A" },
|
|
27458
|
+
{ label: "Defend", icon: "shield", event: "DEFEND", hotkey: "D" },
|
|
27459
|
+
{ label: "Wait", icon: "clock", event: "WAIT", hotkey: "W" }
|
|
27460
|
+
];
|
|
27282
27461
|
UnitCommandBar.displayName = "UnitCommandBar";
|
|
27283
27462
|
}
|
|
27284
27463
|
});
|
|
@@ -27312,7 +27491,7 @@ function GameHud({
|
|
|
27312
27491
|
className,
|
|
27313
27492
|
transparent = true
|
|
27314
27493
|
}) {
|
|
27315
|
-
const rawStats = propStats ?? items ?? (elements && Array.isArray(elements) ? convertElementsToStats(elements) :
|
|
27494
|
+
const rawStats = propStats ?? items ?? (elements && Array.isArray(elements) ? convertElementsToStats(elements) : DEFAULT_HUD_STATS);
|
|
27316
27495
|
const stats = Array.isArray(rawStats) ? rawStats : [];
|
|
27317
27496
|
const position = propPosition ?? "corners";
|
|
27318
27497
|
if (position === "corners") {
|
|
@@ -27337,7 +27516,7 @@ function GameHud({
|
|
|
27337
27516
|
}
|
|
27338
27517
|
);
|
|
27339
27518
|
}
|
|
27340
|
-
var positionMap;
|
|
27519
|
+
var positionMap, DEFAULT_HUD_STATS;
|
|
27341
27520
|
var init_GameHud = __esm({
|
|
27342
27521
|
"components/game/molecules/GameHud.tsx"() {
|
|
27343
27522
|
init_cn();
|
|
@@ -27347,11 +27526,17 @@ var init_GameHud = __esm({
|
|
|
27347
27526
|
bottom: "bottom-0 left-0 right-0 flex justify-between items-end p-4",
|
|
27348
27527
|
corners: "inset-0 pointer-events-none"
|
|
27349
27528
|
};
|
|
27529
|
+
DEFAULT_HUD_STATS = [
|
|
27530
|
+
{ label: "HP", value: 75, max: 100, format: "bar", variant: "danger" },
|
|
27531
|
+
{ label: "MP", value: 40, max: 60, format: "bar", variant: "primary" },
|
|
27532
|
+
{ label: "Score", value: 4200, format: "number", variant: "warning" },
|
|
27533
|
+
{ label: "Level", value: 4, format: "number", variant: "default" }
|
|
27534
|
+
];
|
|
27350
27535
|
GameHud.displayName = "GameHud";
|
|
27351
27536
|
}
|
|
27352
27537
|
});
|
|
27353
27538
|
function DialogueBox({
|
|
27354
|
-
dialogue,
|
|
27539
|
+
dialogue = DEFAULT_DIALOGUE,
|
|
27355
27540
|
typewriterSpeed = 30,
|
|
27356
27541
|
position = "bottom",
|
|
27357
27542
|
onComplete,
|
|
@@ -27534,17 +27719,27 @@ function DialogueBox({
|
|
|
27534
27719
|
}
|
|
27535
27720
|
);
|
|
27536
27721
|
}
|
|
27722
|
+
var DEFAULT_DIALOGUE;
|
|
27537
27723
|
var init_DialogueBox = __esm({
|
|
27538
27724
|
"components/game/molecules/DialogueBox.tsx"() {
|
|
27539
27725
|
"use client";
|
|
27540
27726
|
init_cn();
|
|
27541
27727
|
init_useEventBus();
|
|
27728
|
+
DEFAULT_DIALOGUE = {
|
|
27729
|
+
speaker: "Village Elder",
|
|
27730
|
+
text: "The ancient ruins hold great power \u2014 and great danger. Choose your path wisely, traveler.",
|
|
27731
|
+
choices: [
|
|
27732
|
+
{ text: "I am ready. Lead the way.", action: "ACCEPT_QUEST" },
|
|
27733
|
+
{ text: "Tell me more about the ruins.", action: "ASK_LORE" },
|
|
27734
|
+
{ text: "Perhaps another time.", action: "DECLINE" }
|
|
27735
|
+
]
|
|
27736
|
+
};
|
|
27542
27737
|
}
|
|
27543
27738
|
});
|
|
27544
27739
|
function InventoryPanel({
|
|
27545
|
-
items,
|
|
27546
|
-
slots,
|
|
27547
|
-
columns,
|
|
27740
|
+
items = DEFAULT_INVENTORY_ITEMS,
|
|
27741
|
+
slots = 12,
|
|
27742
|
+
columns = 4,
|
|
27548
27743
|
selectedSlot,
|
|
27549
27744
|
onSelectSlot,
|
|
27550
27745
|
onUseItem,
|
|
@@ -27692,25 +27887,31 @@ function InventoryPanel({
|
|
|
27692
27887
|
)
|
|
27693
27888
|
] });
|
|
27694
27889
|
}
|
|
27890
|
+
var DEFAULT_INVENTORY_ITEMS;
|
|
27695
27891
|
var init_InventoryPanel = __esm({
|
|
27696
27892
|
"components/game/molecules/InventoryPanel.tsx"() {
|
|
27697
27893
|
"use client";
|
|
27698
27894
|
init_cn();
|
|
27699
27895
|
init_useEventBus();
|
|
27896
|
+
DEFAULT_INVENTORY_ITEMS = [
|
|
27897
|
+
{ id: "item-1", type: "weapon", name: "Iron Sword", quantity: 1, description: "A sturdy iron blade." },
|
|
27898
|
+
{ id: "item-2", type: "potion", name: "Health Potion", quantity: 3, description: "Restores 50 HP." },
|
|
27899
|
+
{ id: "item-3", type: "armor", name: "Leather Helm", quantity: 1, description: "Light head protection." }
|
|
27900
|
+
];
|
|
27700
27901
|
}
|
|
27701
27902
|
});
|
|
27702
27903
|
function GameMenu({
|
|
27703
|
-
title,
|
|
27904
|
+
title = "Epic Quest",
|
|
27704
27905
|
subtitle,
|
|
27705
27906
|
options,
|
|
27706
27907
|
menuItems,
|
|
27707
27908
|
onSelect,
|
|
27708
27909
|
eventBus: eventBusProp,
|
|
27709
27910
|
background,
|
|
27710
|
-
logo,
|
|
27911
|
+
logo = "",
|
|
27711
27912
|
className
|
|
27712
27913
|
}) {
|
|
27713
|
-
const resolvedOptions = options ?? menuItems ??
|
|
27914
|
+
const resolvedOptions = options ?? menuItems ?? DEFAULT_MENU_OPTIONS;
|
|
27714
27915
|
let eventBusFromHook = null;
|
|
27715
27916
|
try {
|
|
27716
27917
|
eventBusFromHook = useEventBus();
|
|
@@ -27791,7 +27992,7 @@ function GameMenu({
|
|
|
27791
27992
|
}
|
|
27792
27993
|
);
|
|
27793
27994
|
}
|
|
27794
|
-
var variantMap3;
|
|
27995
|
+
var variantMap3, DEFAULT_MENU_OPTIONS;
|
|
27795
27996
|
var init_GameMenu = __esm({
|
|
27796
27997
|
"components/game/molecules/GameMenu.tsx"() {
|
|
27797
27998
|
"use client";
|
|
@@ -27802,6 +28003,11 @@ var init_GameMenu = __esm({
|
|
|
27802
28003
|
secondary: "bg-[var(--color-surface,#374151)] hover:bg-muted text-[var(--color-foreground)] border-muted",
|
|
27803
28004
|
ghost: "bg-transparent hover:bg-foreground/10 text-[var(--color-foreground)] border-foreground/20"
|
|
27804
28005
|
};
|
|
28006
|
+
DEFAULT_MENU_OPTIONS = [
|
|
28007
|
+
{ label: "New Game", event: "NEW_GAME", variant: "primary" },
|
|
28008
|
+
{ label: "Continue", event: "CONTINUE", variant: "secondary" },
|
|
28009
|
+
{ label: "Settings", event: "SETTINGS", variant: "ghost" }
|
|
28010
|
+
];
|
|
27805
28011
|
GameMenu.displayName = "GameMenu";
|
|
27806
28012
|
}
|
|
27807
28013
|
});
|
|
@@ -27812,19 +28018,19 @@ function formatTime3(ms) {
|
|
|
27812
28018
|
return `${minutes}:${remainingSeconds.toString().padStart(2, "0")}`;
|
|
27813
28019
|
}
|
|
27814
28020
|
function GameOverScreen({
|
|
27815
|
-
title,
|
|
28021
|
+
title = "Game Over",
|
|
27816
28022
|
message,
|
|
27817
|
-
stats =
|
|
28023
|
+
stats = DEFAULT_GAME_OVER_STATS,
|
|
27818
28024
|
actions,
|
|
27819
28025
|
menuItems,
|
|
27820
28026
|
onAction,
|
|
27821
28027
|
eventBus: eventBusProp,
|
|
27822
|
-
variant = "
|
|
27823
|
-
highScore,
|
|
27824
|
-
currentScore,
|
|
28028
|
+
variant = "defeat",
|
|
28029
|
+
highScore = 2e3,
|
|
28030
|
+
currentScore = 1240,
|
|
27825
28031
|
className
|
|
27826
28032
|
}) {
|
|
27827
|
-
const resolvedActions = actions ?? menuItems ??
|
|
28033
|
+
const resolvedActions = actions ?? menuItems ?? DEFAULT_GAME_OVER_ACTIONS;
|
|
27828
28034
|
let eventBusFromHook = null;
|
|
27829
28035
|
try {
|
|
27830
28036
|
eventBusFromHook = useEventBus();
|
|
@@ -27911,7 +28117,7 @@ function GameOverScreen({
|
|
|
27911
28117
|
}
|
|
27912
28118
|
);
|
|
27913
28119
|
}
|
|
27914
|
-
var variantColors, buttonVariants;
|
|
28120
|
+
var variantColors, buttonVariants, DEFAULT_GAME_OVER_ACTIONS, DEFAULT_GAME_OVER_STATS;
|
|
27915
28121
|
var init_GameOverScreen = __esm({
|
|
27916
28122
|
"components/game/molecules/GameOverScreen.tsx"() {
|
|
27917
28123
|
"use client";
|
|
@@ -27940,21 +28146,35 @@ var init_GameOverScreen = __esm({
|
|
|
27940
28146
|
secondary: "bg-[var(--color-surface,#374151)] hover:bg-muted text-[var(--color-foreground)] border-muted",
|
|
27941
28147
|
ghost: "bg-transparent hover:bg-foreground/10 text-[var(--color-foreground)] border-foreground/20"
|
|
27942
28148
|
};
|
|
28149
|
+
DEFAULT_GAME_OVER_ACTIONS = [
|
|
28150
|
+
{ label: "Play Again", event: "RESTART", variant: "primary" },
|
|
28151
|
+
{ label: "Main Menu", event: "MAIN_MENU", variant: "secondary" }
|
|
28152
|
+
];
|
|
28153
|
+
DEFAULT_GAME_OVER_STATS = [
|
|
28154
|
+
{ label: "Score", value: 1240 },
|
|
28155
|
+
{ label: "Enemies Defeated", value: 8 },
|
|
28156
|
+
{ label: "Time", value: 93e3, format: "time" }
|
|
28157
|
+
];
|
|
27943
28158
|
GameOverScreen.displayName = "GameOverScreen";
|
|
27944
28159
|
}
|
|
27945
28160
|
});
|
|
27946
28161
|
function PlatformerCanvas({
|
|
27947
28162
|
player,
|
|
27948
|
-
platforms = [
|
|
28163
|
+
platforms = [
|
|
28164
|
+
{ x: 0, y: 368, width: 800, height: 32, type: "ground" },
|
|
28165
|
+
{ x: 150, y: 280, width: 160, height: 16, type: "platform" },
|
|
28166
|
+
{ x: 420, y: 220, width: 160, height: 16, type: "platform" },
|
|
28167
|
+
{ x: 620, y: 300, width: 140, height: 16, type: "platform" }
|
|
28168
|
+
],
|
|
27949
28169
|
worldWidth = 800,
|
|
27950
28170
|
worldHeight = 400,
|
|
27951
28171
|
canvasWidth = 800,
|
|
27952
28172
|
canvasHeight = 400,
|
|
27953
28173
|
followCamera = true,
|
|
27954
|
-
bgColor,
|
|
28174
|
+
bgColor = "#5c94fc",
|
|
27955
28175
|
playerSprite = "https://almadar-kflow-assets.web.app/shared/platformer/characters/platformChar_idle.png",
|
|
27956
28176
|
tileSprites,
|
|
27957
|
-
backgroundImage = "
|
|
28177
|
+
backgroundImage = "",
|
|
27958
28178
|
assetBaseUrl = "https://almadar-kflow-assets.web.app/shared/platformer/",
|
|
27959
28179
|
leftEvent = "MOVE_LEFT",
|
|
27960
28180
|
rightEvent = "MOVE_RIGHT",
|
|
@@ -28002,10 +28222,10 @@ function PlatformerCanvas({
|
|
|
28002
28222
|
};
|
|
28003
28223
|
}, []);
|
|
28004
28224
|
const resolvedPlayer = player ?? {
|
|
28005
|
-
x:
|
|
28006
|
-
y:
|
|
28007
|
-
width:
|
|
28008
|
-
height:
|
|
28225
|
+
x: 80,
|
|
28226
|
+
y: 336,
|
|
28227
|
+
width: 32,
|
|
28228
|
+
height: 48,
|
|
28009
28229
|
facingRight: true
|
|
28010
28230
|
};
|
|
28011
28231
|
const handleKeyDown = React82.useCallback((e) => {
|
|
@@ -46703,12 +46923,12 @@ function WorldMapTemplate({
|
|
|
46703
46923
|
entity,
|
|
46704
46924
|
scale = 0.4,
|
|
46705
46925
|
unitScale = 2.5,
|
|
46706
|
-
diamondTopY,
|
|
46926
|
+
diamondTopY = 374,
|
|
46707
46927
|
allowMoveAllHeroes = false,
|
|
46708
|
-
tiles,
|
|
46709
|
-
units,
|
|
46710
|
-
features,
|
|
46711
|
-
assetManifest,
|
|
46928
|
+
tiles = DEFAULT_WORLDMAP_TILES,
|
|
46929
|
+
units = DEFAULT_WORLDMAP_UNITS,
|
|
46930
|
+
features = DEFAULT_WORLDMAP_FEATURES,
|
|
46931
|
+
assetManifest = DEFAULT_WORLDMAP_MANIFEST,
|
|
46712
46932
|
className
|
|
46713
46933
|
}) {
|
|
46714
46934
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -46731,9 +46951,63 @@ function WorldMapTemplate({
|
|
|
46731
46951
|
}
|
|
46732
46952
|
);
|
|
46733
46953
|
}
|
|
46954
|
+
var CDN3, DEFAULT_WORLDMAP_TILES, DEFAULT_WORLDMAP_UNITS, DEFAULT_WORLDMAP_FEATURES, DEFAULT_WORLDMAP_MANIFEST;
|
|
46734
46955
|
var init_WorldMapTemplate = __esm({
|
|
46735
46956
|
"components/game/templates/WorldMapTemplate.tsx"() {
|
|
46736
46957
|
init_WorldMapBoard();
|
|
46958
|
+
CDN3 = "https://almadar-kflow-assets.web.app/shared";
|
|
46959
|
+
DEFAULT_WORLDMAP_TILES = [
|
|
46960
|
+
{ x: 0, y: 0, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
46961
|
+
{ x: 1, y: 0, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
46962
|
+
{ x: 2, y: 0, terrain: "water", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_11.png` },
|
|
46963
|
+
{ x: 3, y: 0, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
46964
|
+
{ x: 4, y: 0, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
46965
|
+
{ x: 0, y: 1, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
46966
|
+
{ x: 1, y: 1, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
46967
|
+
{ x: 2, y: 1, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
46968
|
+
{ x: 3, y: 1, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
46969
|
+
{ x: 4, y: 1, terrain: "water", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_11.png` },
|
|
46970
|
+
{ x: 0, y: 2, terrain: "water", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_11.png` },
|
|
46971
|
+
{ x: 1, y: 2, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
46972
|
+
{ x: 2, y: 2, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_03.png` },
|
|
46973
|
+
{ x: 3, y: 2, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
46974
|
+
{ x: 4, y: 2, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
46975
|
+
{ x: 0, y: 3, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
46976
|
+
{ x: 1, y: 3, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
46977
|
+
{ x: 2, y: 3, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
46978
|
+
{ x: 3, y: 3, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_03.png` },
|
|
46979
|
+
{ x: 4, y: 3, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
46980
|
+
{ x: 0, y: 4, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
46981
|
+
{ x: 1, y: 4, terrain: "water", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_11.png` },
|
|
46982
|
+
{ x: 2, y: 4, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
46983
|
+
{ x: 3, y: 4, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
46984
|
+
{ x: 4, y: 4, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` }
|
|
46985
|
+
];
|
|
46986
|
+
DEFAULT_WORLDMAP_UNITS = [
|
|
46987
|
+
{ id: "h1", position: { x: 1, y: 1 }, unitType: "hero", name: "Amir", team: "player", health: 10, maxHealth: 10, sprite: `${CDN3}/sprite-sheets/amir-sprite-sheet-se.png` },
|
|
46988
|
+
{ id: "h2", position: { x: 3, y: 3 }, unitType: "scout", name: "Archivist", team: "player", health: 10, maxHealth: 10, sprite: `${CDN3}/sprite-sheets/archivist-sprite-sheet-se.png` }
|
|
46989
|
+
];
|
|
46990
|
+
DEFAULT_WORLDMAP_FEATURES = [
|
|
46991
|
+
{ id: "f1", x: 2, y: 2, type: "capital", sprite: `${CDN3}/scenes/world/capital.png` },
|
|
46992
|
+
{ id: "f2", x: 4, y: 2, type: "power_node", sprite: `${CDN3}/world-map/power_node.png` }
|
|
46993
|
+
];
|
|
46994
|
+
DEFAULT_WORLDMAP_MANIFEST = {
|
|
46995
|
+
baseUrl: CDN3,
|
|
46996
|
+
terrains: {
|
|
46997
|
+
grass: "/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png",
|
|
46998
|
+
water: "/isometric-blocks/PNG/Platformer tiles/platformerTile_11.png",
|
|
46999
|
+
mountain: "/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png",
|
|
47000
|
+
road: "/isometric-blocks/PNG/Platformer tiles/platformerTile_03.png"
|
|
47001
|
+
},
|
|
47002
|
+
units: {
|
|
47003
|
+
hero: "/sprite-sheets/amir-sprite-sheet-se.png",
|
|
47004
|
+
scout: "/sprite-sheets/archivist-sprite-sheet-se.png"
|
|
47005
|
+
},
|
|
47006
|
+
features: {
|
|
47007
|
+
capital: "/scenes/world/capital.png",
|
|
47008
|
+
power_node: "/world-map/power_node.png"
|
|
47009
|
+
}
|
|
47010
|
+
};
|
|
46737
47011
|
WorldMapTemplate.displayName = "WorldMapTemplate";
|
|
46738
47012
|
}
|
|
46739
47013
|
});
|