@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/avl/index.cjs
CHANGED
|
@@ -10739,8 +10739,8 @@ var init_TraitFrame = __esm({
|
|
|
10739
10739
|
}
|
|
10740
10740
|
});
|
|
10741
10741
|
function HealthBar({
|
|
10742
|
-
current,
|
|
10743
|
-
max,
|
|
10742
|
+
current = 3,
|
|
10743
|
+
max = 5,
|
|
10744
10744
|
format = "hearts",
|
|
10745
10745
|
size = "md",
|
|
10746
10746
|
className,
|
|
@@ -10989,11 +10989,11 @@ var init_ControlButton = __esm({
|
|
|
10989
10989
|
});
|
|
10990
10990
|
function Sprite({
|
|
10991
10991
|
spritesheet = "https://almadar-kflow-assets.web.app/shared/isometric-blocks/Spritesheet/allTiles_sheet.png",
|
|
10992
|
-
frameWidth,
|
|
10993
|
-
frameHeight,
|
|
10994
|
-
frame,
|
|
10995
|
-
x,
|
|
10996
|
-
y,
|
|
10992
|
+
frameWidth = 64,
|
|
10993
|
+
frameHeight = 64,
|
|
10994
|
+
frame = 0,
|
|
10995
|
+
x = 0,
|
|
10996
|
+
y = 0,
|
|
10997
10997
|
scale = 1,
|
|
10998
10998
|
flipX = false,
|
|
10999
10999
|
flipY = false,
|
|
@@ -11063,7 +11063,7 @@ var init_Sprite = __esm({
|
|
|
11063
11063
|
}
|
|
11064
11064
|
});
|
|
11065
11065
|
function StateIndicator({
|
|
11066
|
-
state,
|
|
11066
|
+
state = "idle",
|
|
11067
11067
|
label,
|
|
11068
11068
|
size = "md",
|
|
11069
11069
|
animated = true,
|
|
@@ -11134,8 +11134,8 @@ function formatTime(seconds, format) {
|
|
|
11134
11134
|
return `${mins.toString().padStart(2, "0")}:${padded}`;
|
|
11135
11135
|
}
|
|
11136
11136
|
function TimerDisplay({
|
|
11137
|
-
seconds,
|
|
11138
|
-
running,
|
|
11137
|
+
seconds = 90,
|
|
11138
|
+
running = true,
|
|
11139
11139
|
format = "mm:ss",
|
|
11140
11140
|
size = "md",
|
|
11141
11141
|
className,
|
|
@@ -11172,8 +11172,8 @@ var init_TimerDisplay = __esm({
|
|
|
11172
11172
|
});
|
|
11173
11173
|
function ResourceCounter({
|
|
11174
11174
|
icon,
|
|
11175
|
-
label,
|
|
11176
|
-
value,
|
|
11175
|
+
label = "Gold",
|
|
11176
|
+
value = 250,
|
|
11177
11177
|
max,
|
|
11178
11178
|
color,
|
|
11179
11179
|
size = "md",
|
|
@@ -11225,10 +11225,10 @@ var init_ResourceCounter = __esm({
|
|
|
11225
11225
|
}
|
|
11226
11226
|
});
|
|
11227
11227
|
function ItemSlot({
|
|
11228
|
-
icon,
|
|
11229
|
-
label,
|
|
11228
|
+
icon = "sword",
|
|
11229
|
+
label = "Iron Sword",
|
|
11230
11230
|
quantity,
|
|
11231
|
-
rarity = "
|
|
11231
|
+
rarity = "uncommon",
|
|
11232
11232
|
empty,
|
|
11233
11233
|
size = "md",
|
|
11234
11234
|
selected,
|
|
@@ -11301,7 +11301,7 @@ var init_ItemSlot = __esm({
|
|
|
11301
11301
|
}
|
|
11302
11302
|
});
|
|
11303
11303
|
function TurnIndicator({
|
|
11304
|
-
currentTurn,
|
|
11304
|
+
currentTurn = 1,
|
|
11305
11305
|
maxTurns,
|
|
11306
11306
|
activeTeam,
|
|
11307
11307
|
phase,
|
|
@@ -11364,7 +11364,7 @@ function getComboScale(combo) {
|
|
|
11364
11364
|
return "";
|
|
11365
11365
|
}
|
|
11366
11366
|
function ComboCounter({
|
|
11367
|
-
combo,
|
|
11367
|
+
combo = 5,
|
|
11368
11368
|
multiplier,
|
|
11369
11369
|
streak,
|
|
11370
11370
|
size = "md",
|
|
@@ -11410,10 +11410,10 @@ var init_ComboCounter = __esm({
|
|
|
11410
11410
|
}
|
|
11411
11411
|
});
|
|
11412
11412
|
function XPBar({
|
|
11413
|
-
current,
|
|
11414
|
-
max,
|
|
11415
|
-
level,
|
|
11416
|
-
showLabel =
|
|
11413
|
+
current = 350,
|
|
11414
|
+
max = 1e3,
|
|
11415
|
+
level = 5,
|
|
11416
|
+
showLabel = true,
|
|
11417
11417
|
size = "md",
|
|
11418
11418
|
animated = true,
|
|
11419
11419
|
className
|
|
@@ -11496,7 +11496,7 @@ var init_XPBar = __esm({
|
|
|
11496
11496
|
function WaypointMarker({
|
|
11497
11497
|
label,
|
|
11498
11498
|
icon,
|
|
11499
|
-
active =
|
|
11499
|
+
active = true,
|
|
11500
11500
|
completed = false,
|
|
11501
11501
|
size = "md",
|
|
11502
11502
|
className
|
|
@@ -11570,11 +11570,11 @@ function formatDuration(seconds) {
|
|
|
11570
11570
|
return `${Math.round(seconds)}s`;
|
|
11571
11571
|
}
|
|
11572
11572
|
function StatusEffect({
|
|
11573
|
-
icon,
|
|
11574
|
-
label,
|
|
11575
|
-
duration,
|
|
11573
|
+
icon = "shield",
|
|
11574
|
+
label = "Shield",
|
|
11575
|
+
duration = 30,
|
|
11576
11576
|
stacks,
|
|
11577
|
-
variant = "
|
|
11577
|
+
variant = "buff",
|
|
11578
11578
|
size = "md",
|
|
11579
11579
|
className
|
|
11580
11580
|
}) {
|
|
@@ -11636,7 +11636,7 @@ var init_StatusEffect = __esm({
|
|
|
11636
11636
|
}
|
|
11637
11637
|
});
|
|
11638
11638
|
function DamageNumber({
|
|
11639
|
-
value,
|
|
11639
|
+
value = 42,
|
|
11640
11640
|
type = "damage",
|
|
11641
11641
|
size = "md",
|
|
11642
11642
|
className
|
|
@@ -11685,8 +11685,8 @@ var init_DamageNumber = __esm({
|
|
|
11685
11685
|
}
|
|
11686
11686
|
});
|
|
11687
11687
|
function DialogueBubble({
|
|
11688
|
-
speaker,
|
|
11689
|
-
text,
|
|
11688
|
+
speaker = "Hero",
|
|
11689
|
+
text = "The dungeon awaits. Choose your path wisely.",
|
|
11690
11690
|
portrait = "https://almadar-kflow-assets.web.app/shared/characters/archetypes/04_hero.png",
|
|
11691
11691
|
position = "bottom",
|
|
11692
11692
|
className
|
|
@@ -11723,7 +11723,7 @@ var init_DialogueBubble = __esm({
|
|
|
11723
11723
|
}
|
|
11724
11724
|
});
|
|
11725
11725
|
function ChoiceButton({
|
|
11726
|
-
text,
|
|
11726
|
+
text = "Charge forward into the fray",
|
|
11727
11727
|
index,
|
|
11728
11728
|
disabled = false,
|
|
11729
11729
|
selected = false,
|
|
@@ -11769,7 +11769,7 @@ var init_ChoiceButton = __esm({
|
|
|
11769
11769
|
}
|
|
11770
11770
|
});
|
|
11771
11771
|
function ActionButton({
|
|
11772
|
-
label,
|
|
11772
|
+
label = "Attack",
|
|
11773
11773
|
icon,
|
|
11774
11774
|
cooldown = 0,
|
|
11775
11775
|
disabled = false,
|
|
@@ -11849,13 +11849,13 @@ var init_ActionButton = __esm({
|
|
|
11849
11849
|
}
|
|
11850
11850
|
});
|
|
11851
11851
|
function MiniMap({
|
|
11852
|
-
tiles =
|
|
11853
|
-
units =
|
|
11852
|
+
tiles = DEFAULT_TILES,
|
|
11853
|
+
units = DEFAULT_UNITS,
|
|
11854
11854
|
width = 150,
|
|
11855
11855
|
height = 150,
|
|
11856
11856
|
mapWidth = 100,
|
|
11857
11857
|
mapHeight = 100,
|
|
11858
|
-
viewportRect,
|
|
11858
|
+
viewportRect = DEFAULT_VIEWPORT,
|
|
11859
11859
|
className
|
|
11860
11860
|
}) {
|
|
11861
11861
|
const canvasRef = React91__namespace.useRef(null);
|
|
@@ -11934,10 +11934,25 @@ function MiniMap({
|
|
|
11934
11934
|
}
|
|
11935
11935
|
);
|
|
11936
11936
|
}
|
|
11937
|
+
var DEFAULT_TILES, DEFAULT_UNITS, DEFAULT_VIEWPORT;
|
|
11937
11938
|
var init_MiniMap = __esm({
|
|
11938
11939
|
"components/game/atoms/MiniMap.tsx"() {
|
|
11939
11940
|
"use client";
|
|
11940
11941
|
init_cn();
|
|
11942
|
+
DEFAULT_TILES = [
|
|
11943
|
+
{ x: 10, y: 10, color: "#4ade80" },
|
|
11944
|
+
{ x: 20, y: 15, color: "#4ade80" },
|
|
11945
|
+
{ x: 30, y: 25, color: "#22c55e" },
|
|
11946
|
+
{ x: 50, y: 40, color: "#4ade80" },
|
|
11947
|
+
{ x: 60, y: 55, color: "#16a34a" },
|
|
11948
|
+
{ x: 40, y: 60, color: "#4ade80" },
|
|
11949
|
+
{ x: 70, y: 30, color: "#22c55e" },
|
|
11950
|
+
{ x: 80, y: 70, color: "#4ade80" }
|
|
11951
|
+
];
|
|
11952
|
+
DEFAULT_UNITS = [
|
|
11953
|
+
{ x: 30, y: 30, color: "#60a5fa", isPlayer: true }
|
|
11954
|
+
];
|
|
11955
|
+
DEFAULT_VIEWPORT = { x: 20, y: 20, w: 40, h: 40 };
|
|
11941
11956
|
MiniMap.displayName = "MiniMap";
|
|
11942
11957
|
}
|
|
11943
11958
|
});
|
|
@@ -13060,7 +13075,7 @@ var init_Accordion = __esm({
|
|
|
13060
13075
|
}
|
|
13061
13076
|
});
|
|
13062
13077
|
function ActionButtons({
|
|
13063
|
-
buttons,
|
|
13078
|
+
buttons = DEFAULT_BUTTONS,
|
|
13064
13079
|
onAction,
|
|
13065
13080
|
actionEvent,
|
|
13066
13081
|
layout = "horizontal",
|
|
@@ -13167,7 +13182,7 @@ function ActionButtons({
|
|
|
13167
13182
|
button.id
|
|
13168
13183
|
)) });
|
|
13169
13184
|
}
|
|
13170
|
-
var sizeMap14, layoutMap;
|
|
13185
|
+
var sizeMap14, layoutMap, DEFAULT_BUTTONS;
|
|
13171
13186
|
var init_ActionButtons = __esm({
|
|
13172
13187
|
"components/game/molecules/ActionButtons.tsx"() {
|
|
13173
13188
|
"use client";
|
|
@@ -13184,6 +13199,11 @@ var init_ActionButtons = __esm({
|
|
|
13184
13199
|
vertical: "flex flex-col gap-2",
|
|
13185
13200
|
diamond: "grid grid-cols-3 gap-1"
|
|
13186
13201
|
};
|
|
13202
|
+
DEFAULT_BUTTONS = [
|
|
13203
|
+
{ id: "jump", label: "Jump", icon: "chevron-up", variant: "primary" },
|
|
13204
|
+
{ id: "attack", label: "Attack", icon: "sword", variant: "secondary" },
|
|
13205
|
+
{ id: "dodge", label: "Dodge", icon: "wind", variant: "ghost" }
|
|
13206
|
+
];
|
|
13187
13207
|
ActionButtons.displayName = "ActionButtons";
|
|
13188
13208
|
}
|
|
13189
13209
|
});
|
|
@@ -14376,7 +14396,7 @@ function IsometricCanvas({
|
|
|
14376
14396
|
// Rendering options
|
|
14377
14397
|
scale = 0.4,
|
|
14378
14398
|
debug: debug2 = false,
|
|
14379
|
-
backgroundImage = "
|
|
14399
|
+
backgroundImage = "",
|
|
14380
14400
|
showMinimap = true,
|
|
14381
14401
|
enableCamera = true,
|
|
14382
14402
|
unitScale = 1,
|
|
@@ -15514,10 +15534,10 @@ function BattleTemplate({
|
|
|
15514
15534
|
entity,
|
|
15515
15535
|
scale = 0.45,
|
|
15516
15536
|
unitScale = 1,
|
|
15517
|
-
tiles,
|
|
15518
|
-
units,
|
|
15519
|
-
features,
|
|
15520
|
-
assetManifest,
|
|
15537
|
+
tiles = DEFAULT_BATTLE_TILES,
|
|
15538
|
+
units = DEFAULT_BATTLE_UNITS,
|
|
15539
|
+
features = DEFAULT_BATTLE_FEATURES,
|
|
15540
|
+
assetManifest = DEFAULT_BATTLE_MANIFEST,
|
|
15521
15541
|
className
|
|
15522
15542
|
}) {
|
|
15523
15543
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
@@ -15543,9 +15563,62 @@ function BattleTemplate({
|
|
|
15543
15563
|
}
|
|
15544
15564
|
);
|
|
15545
15565
|
}
|
|
15566
|
+
var CDN, DEFAULT_BATTLE_TILES, DEFAULT_BATTLE_UNITS, DEFAULT_BATTLE_FEATURES, DEFAULT_BATTLE_MANIFEST;
|
|
15546
15567
|
var init_BattleTemplate = __esm({
|
|
15547
15568
|
"components/game/templates/BattleTemplate.tsx"() {
|
|
15548
15569
|
init_BattleBoard();
|
|
15570
|
+
CDN = "https://almadar-kflow-assets.web.app/shared";
|
|
15571
|
+
DEFAULT_BATTLE_TILES = [
|
|
15572
|
+
{ x: 0, y: 0, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
15573
|
+
{ x: 1, y: 0, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
15574
|
+
{ x: 2, y: 0, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
15575
|
+
{ x: 3, y: 0, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
15576
|
+
{ x: 4, y: 0, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
15577
|
+
{ x: 0, y: 1, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
15578
|
+
{ x: 1, y: 1, terrain: "dirt", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_01.png` },
|
|
15579
|
+
{ x: 2, y: 1, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
15580
|
+
{ x: 3, y: 1, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
15581
|
+
{ x: 4, y: 1, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
15582
|
+
{ x: 0, y: 2, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
15583
|
+
{ x: 1, y: 2, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
15584
|
+
{ x: 2, y: 2, terrain: "dirt", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_01.png` },
|
|
15585
|
+
{ x: 3, y: 2, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
15586
|
+
{ x: 4, y: 2, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
15587
|
+
{ x: 0, y: 3, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
15588
|
+
{ x: 1, y: 3, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
15589
|
+
{ x: 2, y: 3, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
15590
|
+
{ x: 3, y: 3, terrain: "dirt", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_01.png` },
|
|
15591
|
+
{ x: 4, y: 3, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
15592
|
+
{ x: 0, y: 4, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
15593
|
+
{ x: 1, y: 4, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
15594
|
+
{ x: 2, y: 4, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
15595
|
+
{ x: 3, y: 4, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
15596
|
+
{ x: 4, y: 4, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` }
|
|
15597
|
+
];
|
|
15598
|
+
DEFAULT_BATTLE_UNITS = [
|
|
15599
|
+
{ 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` },
|
|
15600
|
+
{ 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` }
|
|
15601
|
+
];
|
|
15602
|
+
DEFAULT_BATTLE_FEATURES = [
|
|
15603
|
+
{ id: "f1", x: 2, y: 2, type: "gold_mine", sprite: `${CDN}/world-map/gold_mine.png` },
|
|
15604
|
+
{ id: "f2", x: 3, y: 1, type: "portal", sprite: `${CDN}/world-map/portal_open.png` }
|
|
15605
|
+
];
|
|
15606
|
+
DEFAULT_BATTLE_MANIFEST = {
|
|
15607
|
+
baseUrl: CDN,
|
|
15608
|
+
terrains: {
|
|
15609
|
+
stone: "/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png",
|
|
15610
|
+
dirt: "/isometric-blocks/PNG/Abstract tiles/abstractTile_01.png",
|
|
15611
|
+
grass: "/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png"
|
|
15612
|
+
},
|
|
15613
|
+
units: {
|
|
15614
|
+
worker: "/sprite-sheets/amir-sprite-sheet-se.png",
|
|
15615
|
+
guardian: "/sprite-sheets/destroyer-sprite-sheet-sw.png"
|
|
15616
|
+
},
|
|
15617
|
+
features: {
|
|
15618
|
+
gold_mine: "/world-map/gold_mine.png",
|
|
15619
|
+
portal: "/world-map/portal_open.png"
|
|
15620
|
+
}
|
|
15621
|
+
};
|
|
15549
15622
|
BattleTemplate.displayName = "BattleTemplate";
|
|
15550
15623
|
}
|
|
15551
15624
|
});
|
|
@@ -22716,10 +22789,10 @@ var init_CastleBoard = __esm({
|
|
|
22716
22789
|
function CastleTemplate({
|
|
22717
22790
|
entity,
|
|
22718
22791
|
scale = 0.45,
|
|
22719
|
-
tiles,
|
|
22720
|
-
units,
|
|
22721
|
-
features,
|
|
22722
|
-
assetManifest,
|
|
22792
|
+
tiles = DEFAULT_CASTLE_TILES,
|
|
22793
|
+
units = DEFAULT_CASTLE_UNITS,
|
|
22794
|
+
features = DEFAULT_CASTLE_FEATURES,
|
|
22795
|
+
assetManifest = DEFAULT_CASTLE_MANIFEST,
|
|
22723
22796
|
className
|
|
22724
22797
|
}) {
|
|
22725
22798
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
@@ -22740,9 +22813,61 @@ function CastleTemplate({
|
|
|
22740
22813
|
}
|
|
22741
22814
|
);
|
|
22742
22815
|
}
|
|
22816
|
+
var CDN2, DEFAULT_CASTLE_TILES, DEFAULT_CASTLE_UNITS, DEFAULT_CASTLE_FEATURES, DEFAULT_CASTLE_MANIFEST;
|
|
22743
22817
|
var init_CastleTemplate = __esm({
|
|
22744
22818
|
"components/game/templates/CastleTemplate.tsx"() {
|
|
22745
22819
|
init_CastleBoard();
|
|
22820
|
+
CDN2 = "https://almadar-kflow-assets.web.app/shared";
|
|
22821
|
+
DEFAULT_CASTLE_TILES = [
|
|
22822
|
+
{ x: 0, y: 0, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
22823
|
+
{ x: 1, y: 0, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
22824
|
+
{ x: 2, y: 0, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
22825
|
+
{ x: 3, y: 0, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
22826
|
+
{ x: 4, y: 0, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
22827
|
+
{ x: 0, y: 1, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
22828
|
+
{ x: 1, y: 1, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
22829
|
+
{ x: 2, y: 1, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
22830
|
+
{ x: 3, y: 1, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
22831
|
+
{ x: 4, y: 1, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
22832
|
+
{ x: 0, y: 2, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
22833
|
+
{ x: 1, y: 2, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
22834
|
+
{ x: 2, y: 2, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_09.png` },
|
|
22835
|
+
{ x: 3, y: 2, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
22836
|
+
{ x: 4, y: 2, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
22837
|
+
{ x: 0, y: 3, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
22838
|
+
{ x: 1, y: 3, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
22839
|
+
{ x: 2, y: 3, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
22840
|
+
{ x: 3, y: 3, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
22841
|
+
{ x: 4, y: 3, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
22842
|
+
{ x: 0, y: 4, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
22843
|
+
{ x: 1, y: 4, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
22844
|
+
{ x: 2, y: 4, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
22845
|
+
{ x: 3, y: 4, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
22846
|
+
{ x: 4, y: 4, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` }
|
|
22847
|
+
];
|
|
22848
|
+
DEFAULT_CASTLE_UNITS = [
|
|
22849
|
+
{ 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` },
|
|
22850
|
+
{ 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` }
|
|
22851
|
+
];
|
|
22852
|
+
DEFAULT_CASTLE_FEATURES = [
|
|
22853
|
+
{ id: "f1", x: 2, y: 2, type: "chest", sprite: `${CDN2}/world-map/treasure_chest_closed.png` },
|
|
22854
|
+
{ id: "f2", x: 3, y: 1, type: "crystal", sprite: `${CDN2}/world-map/resonance_crystal.png` }
|
|
22855
|
+
];
|
|
22856
|
+
DEFAULT_CASTLE_MANIFEST = {
|
|
22857
|
+
baseUrl: CDN2,
|
|
22858
|
+
terrains: {
|
|
22859
|
+
wall: "/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png",
|
|
22860
|
+
floor: "/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png"
|
|
22861
|
+
},
|
|
22862
|
+
units: {
|
|
22863
|
+
worker: "/sprite-sheets/coordinator-sprite-sheet-se.png",
|
|
22864
|
+
guardian: "/sprite-sheets/forger-sprite-sheet-se.png"
|
|
22865
|
+
},
|
|
22866
|
+
features: {
|
|
22867
|
+
chest: "/world-map/treasure_chest_closed.png",
|
|
22868
|
+
crystal: "/world-map/resonance_crystal.png"
|
|
22869
|
+
}
|
|
22870
|
+
};
|
|
22746
22871
|
CastleTemplate.displayName = "CastleTemplate";
|
|
22747
22872
|
}
|
|
22748
22873
|
});
|
|
@@ -23864,7 +23989,7 @@ var init_CodeRunnerPanel = __esm({
|
|
|
23864
23989
|
}
|
|
23865
23990
|
});
|
|
23866
23991
|
function CombatLog({
|
|
23867
|
-
events: events2,
|
|
23992
|
+
events: events2 = DEFAULT_COMBAT_EVENTS,
|
|
23868
23993
|
maxVisible = 50,
|
|
23869
23994
|
autoScroll = true,
|
|
23870
23995
|
showTimestamps = false,
|
|
@@ -23915,7 +24040,7 @@ function CombatLog({
|
|
|
23915
24040
|
}) }) })
|
|
23916
24041
|
] });
|
|
23917
24042
|
}
|
|
23918
|
-
var eventIcons, eventColors, eventBadgeVariants;
|
|
24043
|
+
var eventIcons, eventColors, eventBadgeVariants, DEFAULT_COMBAT_EVENTS;
|
|
23919
24044
|
var init_CombatLog = __esm({
|
|
23920
24045
|
"components/game/molecules/CombatLog.tsx"() {
|
|
23921
24046
|
init_atoms2();
|
|
@@ -23947,6 +24072,13 @@ var init_CombatLog = __esm({
|
|
|
23947
24072
|
death: "secondary",
|
|
23948
24073
|
spawn: "secondary"
|
|
23949
24074
|
};
|
|
24075
|
+
DEFAULT_COMBAT_EVENTS = [
|
|
24076
|
+
{ id: "e1", type: "spawn", message: "Shadow Guard entered the field.", timestamp: 0, turn: 1 },
|
|
24077
|
+
{ id: "e2", type: "move", message: "Hero moved to (3, 4).", timestamp: 1, actorName: "Hero", turn: 1 },
|
|
24078
|
+
{ id: "e3", type: "attack", message: "Hero attacked Shadow Guard.", timestamp: 2, actorName: "Hero", targetName: "Shadow Guard", value: 18, turn: 2 },
|
|
24079
|
+
{ id: "e4", type: "defend", message: "Shadow Guard blocked 5 damage.", timestamp: 3, actorName: "Shadow Guard", value: 5, turn: 2 },
|
|
24080
|
+
{ id: "e5", type: "heal", message: "Hero used Health Potion.", timestamp: 4, actorName: "Hero", value: 25, turn: 3 }
|
|
24081
|
+
];
|
|
23950
24082
|
CombatLog.displayName = "CombatLog";
|
|
23951
24083
|
}
|
|
23952
24084
|
});
|
|
@@ -24354,9 +24486,9 @@ function isValidRarity(value) {
|
|
|
24354
24486
|
return rarityValues.includes(value);
|
|
24355
24487
|
}
|
|
24356
24488
|
function CraftingRecipe({
|
|
24357
|
-
inputs,
|
|
24358
|
-
output,
|
|
24359
|
-
canCraft =
|
|
24489
|
+
inputs = DEFAULT_INPUTS,
|
|
24490
|
+
output = DEFAULT_OUTPUT,
|
|
24491
|
+
canCraft = true,
|
|
24360
24492
|
onCraft,
|
|
24361
24493
|
craftEvent,
|
|
24362
24494
|
className
|
|
@@ -24417,7 +24549,7 @@ function CraftingRecipe({
|
|
|
24417
24549
|
}
|
|
24418
24550
|
);
|
|
24419
24551
|
}
|
|
24420
|
-
var rarityValues;
|
|
24552
|
+
var rarityValues, DEFAULT_INPUTS, DEFAULT_OUTPUT;
|
|
24421
24553
|
var init_CraftingRecipe = __esm({
|
|
24422
24554
|
"components/game/molecules/CraftingRecipe.tsx"() {
|
|
24423
24555
|
"use client";
|
|
@@ -24429,6 +24561,15 @@ var init_CraftingRecipe = __esm({
|
|
|
24429
24561
|
init_Stack();
|
|
24430
24562
|
init_Icon();
|
|
24431
24563
|
rarityValues = ["common", "uncommon", "rare", "epic", "legendary"];
|
|
24564
|
+
DEFAULT_INPUTS = [
|
|
24565
|
+
{ icon: "gem", label: "Iron Ore", required: 2, available: 3 },
|
|
24566
|
+
{ icon: "flame", label: "Coal", required: 1, available: 1 }
|
|
24567
|
+
];
|
|
24568
|
+
DEFAULT_OUTPUT = {
|
|
24569
|
+
icon: "sword",
|
|
24570
|
+
label: "Iron Sword",
|
|
24571
|
+
rarity: "uncommon"
|
|
24572
|
+
};
|
|
24432
24573
|
CraftingRecipe.displayName = "CraftingRecipe";
|
|
24433
24574
|
}
|
|
24434
24575
|
});
|
|
@@ -29425,10 +29566,10 @@ var init_StatBadge = __esm({
|
|
|
29425
29566
|
}
|
|
29426
29567
|
});
|
|
29427
29568
|
function InventoryGrid({
|
|
29428
|
-
items,
|
|
29569
|
+
items = DEFAULT_GRID_ITEMS,
|
|
29429
29570
|
columns = 4,
|
|
29430
|
-
totalSlots,
|
|
29431
|
-
selectedId,
|
|
29571
|
+
totalSlots = 12,
|
|
29572
|
+
selectedId = "",
|
|
29432
29573
|
onSelect,
|
|
29433
29574
|
selectEvent,
|
|
29434
29575
|
size = "md",
|
|
@@ -29477,7 +29618,7 @@ function InventoryGrid({
|
|
|
29477
29618
|
}
|
|
29478
29619
|
);
|
|
29479
29620
|
}
|
|
29480
|
-
var columnMap;
|
|
29621
|
+
var columnMap, DEFAULT_GRID_ITEMS;
|
|
29481
29622
|
var init_InventoryGrid = __esm({
|
|
29482
29623
|
"components/game/molecules/InventoryGrid.tsx"() {
|
|
29483
29624
|
"use client";
|
|
@@ -29494,12 +29635,18 @@ var init_InventoryGrid = __esm({
|
|
|
29494
29635
|
7: "grid-cols-7",
|
|
29495
29636
|
8: "grid-cols-8"
|
|
29496
29637
|
};
|
|
29638
|
+
DEFAULT_GRID_ITEMS = [
|
|
29639
|
+
{ id: "grid-1", icon: "sword", label: "Iron Sword", quantity: 1, rarity: "common" },
|
|
29640
|
+
{ id: "grid-2", icon: "flask-conical", label: "Health Potion", quantity: 3, rarity: "uncommon" },
|
|
29641
|
+
{ id: "grid-3", icon: "shield", label: "Wooden Shield", quantity: 1, rarity: "common" },
|
|
29642
|
+
{ id: "grid-4", icon: "gem", label: "Ruby Gem", quantity: 2, rarity: "rare" }
|
|
29643
|
+
];
|
|
29497
29644
|
InventoryGrid.displayName = "InventoryGrid";
|
|
29498
29645
|
}
|
|
29499
29646
|
});
|
|
29500
29647
|
function QuestTracker({
|
|
29501
|
-
quests,
|
|
29502
|
-
activeQuestId,
|
|
29648
|
+
quests = DEFAULT_QUESTS,
|
|
29649
|
+
activeQuestId = "q2",
|
|
29503
29650
|
className
|
|
29504
29651
|
}) {
|
|
29505
29652
|
return /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "sm", className, children: quests.map((quest) => {
|
|
@@ -29565,6 +29712,7 @@ function QuestTracker({
|
|
|
29565
29712
|
);
|
|
29566
29713
|
}) });
|
|
29567
29714
|
}
|
|
29715
|
+
var DEFAULT_QUESTS;
|
|
29568
29716
|
var init_QuestTracker = __esm({
|
|
29569
29717
|
"components/game/molecules/QuestTracker.tsx"() {
|
|
29570
29718
|
"use client";
|
|
@@ -29574,6 +29722,11 @@ var init_QuestTracker = __esm({
|
|
|
29574
29722
|
init_Typography();
|
|
29575
29723
|
init_Box();
|
|
29576
29724
|
init_Stack();
|
|
29725
|
+
DEFAULT_QUESTS = [
|
|
29726
|
+
{ id: "q1", title: "Reach the Ancient Ruins", progress: 1, maxProgress: 1, completed: true },
|
|
29727
|
+
{ id: "q2", title: "Defeat the Shadow Guard", progress: 2, maxProgress: 5, active: true },
|
|
29728
|
+
{ id: "q3", title: "Collect 3 Crystal Shards", progress: 0, maxProgress: 3, active: false }
|
|
29729
|
+
];
|
|
29577
29730
|
QuestTracker.displayName = "QuestTracker";
|
|
29578
29731
|
}
|
|
29579
29732
|
});
|
|
@@ -29586,7 +29739,7 @@ function formatTime2(seconds) {
|
|
|
29586
29739
|
return `${seconds}s`;
|
|
29587
29740
|
}
|
|
29588
29741
|
function PowerupSlots({
|
|
29589
|
-
active,
|
|
29742
|
+
active = DEFAULT_ACTIVE_POWERUPS,
|
|
29590
29743
|
maxSlots = 4,
|
|
29591
29744
|
className
|
|
29592
29745
|
}) {
|
|
@@ -29631,6 +29784,7 @@ function PowerupSlots({
|
|
|
29631
29784
|
))
|
|
29632
29785
|
] });
|
|
29633
29786
|
}
|
|
29787
|
+
var DEFAULT_ACTIVE_POWERUPS;
|
|
29634
29788
|
var init_PowerupSlots = __esm({
|
|
29635
29789
|
"components/game/molecules/PowerupSlots.tsx"() {
|
|
29636
29790
|
"use client";
|
|
@@ -29639,6 +29793,10 @@ var init_PowerupSlots = __esm({
|
|
|
29639
29793
|
init_Box();
|
|
29640
29794
|
init_Stack();
|
|
29641
29795
|
init_Typography();
|
|
29796
|
+
DEFAULT_ACTIVE_POWERUPS = [
|
|
29797
|
+
{ id: "pw1", icon: "zap", label: "Speed Boost", remainingTime: 12 },
|
|
29798
|
+
{ id: "pw2", icon: "shield", label: "Iron Shield", remainingTime: 30 }
|
|
29799
|
+
];
|
|
29642
29800
|
PowerupSlots.displayName = "PowerupSlots";
|
|
29643
29801
|
}
|
|
29644
29802
|
});
|
|
@@ -29650,7 +29808,7 @@ function GameCanvas2D({
|
|
|
29650
29808
|
tickEvent,
|
|
29651
29809
|
drawEvent,
|
|
29652
29810
|
fps = 60,
|
|
29653
|
-
backgroundImage = "
|
|
29811
|
+
backgroundImage = "",
|
|
29654
29812
|
assetBaseUrl = "https://almadar-kflow-assets.web.app/shared/",
|
|
29655
29813
|
className
|
|
29656
29814
|
}) {
|
|
@@ -29754,10 +29912,10 @@ var init_GameCanvas2D = __esm({
|
|
|
29754
29912
|
}
|
|
29755
29913
|
});
|
|
29756
29914
|
function HealthPanel({
|
|
29757
|
-
current,
|
|
29758
|
-
max,
|
|
29759
|
-
shield,
|
|
29760
|
-
label,
|
|
29915
|
+
current = 75,
|
|
29916
|
+
max = 100,
|
|
29917
|
+
shield = 20,
|
|
29918
|
+
label = "Player HP",
|
|
29761
29919
|
effects,
|
|
29762
29920
|
showNumbers = true,
|
|
29763
29921
|
size = "md",
|
|
@@ -29875,11 +30033,11 @@ var init_HealthPanel = __esm({
|
|
|
29875
30033
|
}
|
|
29876
30034
|
});
|
|
29877
30035
|
function ScoreBoard({
|
|
29878
|
-
score: rawScore,
|
|
29879
|
-
highScore: rawHighScore,
|
|
29880
|
-
combo: rawCombo,
|
|
29881
|
-
multiplier: rawMultiplier,
|
|
29882
|
-
level: rawLevel,
|
|
30036
|
+
score: rawScore = 4200,
|
|
30037
|
+
highScore: rawHighScore = 8750,
|
|
30038
|
+
combo: rawCombo = 3,
|
|
30039
|
+
multiplier: rawMultiplier = 2,
|
|
30040
|
+
level: rawLevel = 4,
|
|
29883
30041
|
className
|
|
29884
30042
|
}) {
|
|
29885
30043
|
const score = rawScore ?? 0;
|
|
@@ -29952,7 +30110,7 @@ var init_ScoreBoard = __esm({
|
|
|
29952
30110
|
}
|
|
29953
30111
|
});
|
|
29954
30112
|
function ResourceBar({
|
|
29955
|
-
resources,
|
|
30113
|
+
resources = DEFAULT_RESOURCES,
|
|
29956
30114
|
size = "md",
|
|
29957
30115
|
className
|
|
29958
30116
|
}) {
|
|
@@ -29978,21 +30136,27 @@ function ResourceBar({
|
|
|
29978
30136
|
}
|
|
29979
30137
|
);
|
|
29980
30138
|
}
|
|
30139
|
+
var DEFAULT_RESOURCES;
|
|
29981
30140
|
var init_ResourceBar = __esm({
|
|
29982
30141
|
"components/game/molecules/ResourceBar.tsx"() {
|
|
29983
30142
|
"use client";
|
|
29984
30143
|
init_cn();
|
|
29985
30144
|
init_StatBadge();
|
|
29986
30145
|
init_Box();
|
|
30146
|
+
DEFAULT_RESOURCES = [
|
|
30147
|
+
{ icon: "coins", label: "Gold", value: 320 },
|
|
30148
|
+
{ icon: "zap", label: "Energy", value: 7, max: 10 },
|
|
30149
|
+
{ icon: "gem", label: "Crystals", value: 15 }
|
|
30150
|
+
];
|
|
29987
30151
|
ResourceBar.displayName = "ResourceBar";
|
|
29988
30152
|
}
|
|
29989
30153
|
});
|
|
29990
30154
|
function TurnPanel({
|
|
29991
|
-
currentTurn,
|
|
29992
|
-
maxTurns,
|
|
29993
|
-
phase,
|
|
29994
|
-
activeTeam,
|
|
29995
|
-
actions,
|
|
30155
|
+
currentTurn = 3,
|
|
30156
|
+
maxTurns = 10,
|
|
30157
|
+
phase = "Attack",
|
|
30158
|
+
activeTeam = "Heroes",
|
|
30159
|
+
actions = DEFAULT_TURN_ACTIONS,
|
|
29996
30160
|
className
|
|
29997
30161
|
}) {
|
|
29998
30162
|
const eventBus = useEventBus();
|
|
@@ -30037,6 +30201,7 @@ function TurnPanel({
|
|
|
30037
30201
|
}
|
|
30038
30202
|
);
|
|
30039
30203
|
}
|
|
30204
|
+
var DEFAULT_TURN_ACTIONS;
|
|
30040
30205
|
var init_TurnPanel = __esm({
|
|
30041
30206
|
"components/game/molecules/TurnPanel.tsx"() {
|
|
30042
30207
|
"use client";
|
|
@@ -30045,15 +30210,19 @@ var init_TurnPanel = __esm({
|
|
|
30045
30210
|
init_Button();
|
|
30046
30211
|
init_Box();
|
|
30047
30212
|
init_useEventBus();
|
|
30213
|
+
DEFAULT_TURN_ACTIONS = [
|
|
30214
|
+
{ label: "End Turn", icon: "skip-forward", event: "END_TURN" },
|
|
30215
|
+
{ label: "Forfeit", icon: "flag", event: "FORFEIT", disabled: false }
|
|
30216
|
+
];
|
|
30048
30217
|
TurnPanel.displayName = "TurnPanel";
|
|
30049
30218
|
}
|
|
30050
30219
|
});
|
|
30051
30220
|
function EnemyPlate({
|
|
30052
|
-
name,
|
|
30053
|
-
health,
|
|
30054
|
-
maxHealth,
|
|
30055
|
-
level,
|
|
30056
|
-
effects,
|
|
30221
|
+
name = "Shadow Guard",
|
|
30222
|
+
health = 80,
|
|
30223
|
+
maxHealth = 100,
|
|
30224
|
+
level = 5,
|
|
30225
|
+
effects = DEFAULT_ENEMY_EFFECTS,
|
|
30057
30226
|
className
|
|
30058
30227
|
}) {
|
|
30059
30228
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -30119,7 +30288,7 @@ function EnemyPlate({
|
|
|
30119
30288
|
}
|
|
30120
30289
|
);
|
|
30121
30290
|
}
|
|
30122
|
-
var effectVariantMap2;
|
|
30291
|
+
var effectVariantMap2, DEFAULT_ENEMY_EFFECTS;
|
|
30123
30292
|
var init_EnemyPlate = __esm({
|
|
30124
30293
|
"components/game/molecules/EnemyPlate.tsx"() {
|
|
30125
30294
|
"use client";
|
|
@@ -30133,12 +30302,15 @@ var init_EnemyPlate = __esm({
|
|
|
30133
30302
|
debuff: "danger",
|
|
30134
30303
|
neutral: "neutral"
|
|
30135
30304
|
};
|
|
30305
|
+
DEFAULT_ENEMY_EFFECTS = [
|
|
30306
|
+
{ icon: "flame", label: "Burn", variant: "debuff" }
|
|
30307
|
+
];
|
|
30136
30308
|
EnemyPlate.displayName = "EnemyPlate";
|
|
30137
30309
|
}
|
|
30138
30310
|
});
|
|
30139
30311
|
function UnitCommandBar({
|
|
30140
|
-
commands,
|
|
30141
|
-
selectedUnitId,
|
|
30312
|
+
commands = DEFAULT_COMMANDS,
|
|
30313
|
+
selectedUnitId = "unit-1",
|
|
30142
30314
|
className
|
|
30143
30315
|
}) {
|
|
30144
30316
|
const eventBus = useEventBus();
|
|
@@ -30181,6 +30353,7 @@ function UnitCommandBar({
|
|
|
30181
30353
|
}
|
|
30182
30354
|
);
|
|
30183
30355
|
}
|
|
30356
|
+
var DEFAULT_COMMANDS;
|
|
30184
30357
|
var init_UnitCommandBar = __esm({
|
|
30185
30358
|
"components/game/molecules/UnitCommandBar.tsx"() {
|
|
30186
30359
|
"use client";
|
|
@@ -30189,6 +30362,12 @@ var init_UnitCommandBar = __esm({
|
|
|
30189
30362
|
init_Box();
|
|
30190
30363
|
init_Typography();
|
|
30191
30364
|
init_useEventBus();
|
|
30365
|
+
DEFAULT_COMMANDS = [
|
|
30366
|
+
{ label: "Move", icon: "move", event: "MOVE", hotkey: "M" },
|
|
30367
|
+
{ label: "Attack", icon: "sword", event: "ATTACK", hotkey: "A" },
|
|
30368
|
+
{ label: "Defend", icon: "shield", event: "DEFEND", hotkey: "D" },
|
|
30369
|
+
{ label: "Wait", icon: "clock", event: "WAIT", hotkey: "W" }
|
|
30370
|
+
];
|
|
30192
30371
|
UnitCommandBar.displayName = "UnitCommandBar";
|
|
30193
30372
|
}
|
|
30194
30373
|
});
|
|
@@ -30222,7 +30401,7 @@ function GameHud({
|
|
|
30222
30401
|
className,
|
|
30223
30402
|
transparent = true
|
|
30224
30403
|
}) {
|
|
30225
|
-
const rawStats = propStats ?? items ?? (elements && Array.isArray(elements) ? convertElementsToStats(elements) :
|
|
30404
|
+
const rawStats = propStats ?? items ?? (elements && Array.isArray(elements) ? convertElementsToStats(elements) : DEFAULT_HUD_STATS);
|
|
30226
30405
|
const stats = Array.isArray(rawStats) ? rawStats : [];
|
|
30227
30406
|
const position = propPosition ?? "corners";
|
|
30228
30407
|
if (position === "corners") {
|
|
@@ -30247,7 +30426,7 @@ function GameHud({
|
|
|
30247
30426
|
}
|
|
30248
30427
|
);
|
|
30249
30428
|
}
|
|
30250
|
-
var positionMap;
|
|
30429
|
+
var positionMap, DEFAULT_HUD_STATS;
|
|
30251
30430
|
var init_GameHud = __esm({
|
|
30252
30431
|
"components/game/molecules/GameHud.tsx"() {
|
|
30253
30432
|
init_cn();
|
|
@@ -30257,11 +30436,17 @@ var init_GameHud = __esm({
|
|
|
30257
30436
|
bottom: "bottom-0 left-0 right-0 flex justify-between items-end p-4",
|
|
30258
30437
|
corners: "inset-0 pointer-events-none"
|
|
30259
30438
|
};
|
|
30439
|
+
DEFAULT_HUD_STATS = [
|
|
30440
|
+
{ label: "HP", value: 75, max: 100, format: "bar", variant: "danger" },
|
|
30441
|
+
{ label: "MP", value: 40, max: 60, format: "bar", variant: "primary" },
|
|
30442
|
+
{ label: "Score", value: 4200, format: "number", variant: "warning" },
|
|
30443
|
+
{ label: "Level", value: 4, format: "number", variant: "default" }
|
|
30444
|
+
];
|
|
30260
30445
|
GameHud.displayName = "GameHud";
|
|
30261
30446
|
}
|
|
30262
30447
|
});
|
|
30263
30448
|
function DialogueBox({
|
|
30264
|
-
dialogue,
|
|
30449
|
+
dialogue = DEFAULT_DIALOGUE,
|
|
30265
30450
|
typewriterSpeed = 30,
|
|
30266
30451
|
position = "bottom",
|
|
30267
30452
|
onComplete,
|
|
@@ -30444,17 +30629,27 @@ function DialogueBox({
|
|
|
30444
30629
|
}
|
|
30445
30630
|
);
|
|
30446
30631
|
}
|
|
30632
|
+
var DEFAULT_DIALOGUE;
|
|
30447
30633
|
var init_DialogueBox = __esm({
|
|
30448
30634
|
"components/game/molecules/DialogueBox.tsx"() {
|
|
30449
30635
|
"use client";
|
|
30450
30636
|
init_cn();
|
|
30451
30637
|
init_useEventBus();
|
|
30638
|
+
DEFAULT_DIALOGUE = {
|
|
30639
|
+
speaker: "Village Elder",
|
|
30640
|
+
text: "The ancient ruins hold great power \u2014 and great danger. Choose your path wisely, traveler.",
|
|
30641
|
+
choices: [
|
|
30642
|
+
{ text: "I am ready. Lead the way.", action: "ACCEPT_QUEST" },
|
|
30643
|
+
{ text: "Tell me more about the ruins.", action: "ASK_LORE" },
|
|
30644
|
+
{ text: "Perhaps another time.", action: "DECLINE" }
|
|
30645
|
+
]
|
|
30646
|
+
};
|
|
30452
30647
|
}
|
|
30453
30648
|
});
|
|
30454
30649
|
function InventoryPanel({
|
|
30455
|
-
items,
|
|
30456
|
-
slots,
|
|
30457
|
-
columns,
|
|
30650
|
+
items = DEFAULT_INVENTORY_ITEMS,
|
|
30651
|
+
slots = 12,
|
|
30652
|
+
columns = 4,
|
|
30458
30653
|
selectedSlot,
|
|
30459
30654
|
onSelectSlot,
|
|
30460
30655
|
onUseItem,
|
|
@@ -30602,25 +30797,31 @@ function InventoryPanel({
|
|
|
30602
30797
|
)
|
|
30603
30798
|
] });
|
|
30604
30799
|
}
|
|
30800
|
+
var DEFAULT_INVENTORY_ITEMS;
|
|
30605
30801
|
var init_InventoryPanel = __esm({
|
|
30606
30802
|
"components/game/molecules/InventoryPanel.tsx"() {
|
|
30607
30803
|
"use client";
|
|
30608
30804
|
init_cn();
|
|
30609
30805
|
init_useEventBus();
|
|
30806
|
+
DEFAULT_INVENTORY_ITEMS = [
|
|
30807
|
+
{ id: "item-1", type: "weapon", name: "Iron Sword", quantity: 1, description: "A sturdy iron blade." },
|
|
30808
|
+
{ id: "item-2", type: "potion", name: "Health Potion", quantity: 3, description: "Restores 50 HP." },
|
|
30809
|
+
{ id: "item-3", type: "armor", name: "Leather Helm", quantity: 1, description: "Light head protection." }
|
|
30810
|
+
];
|
|
30610
30811
|
}
|
|
30611
30812
|
});
|
|
30612
30813
|
function GameMenu({
|
|
30613
|
-
title,
|
|
30814
|
+
title = "Epic Quest",
|
|
30614
30815
|
subtitle,
|
|
30615
30816
|
options,
|
|
30616
30817
|
menuItems,
|
|
30617
30818
|
onSelect,
|
|
30618
30819
|
eventBus: eventBusProp,
|
|
30619
30820
|
background,
|
|
30620
|
-
logo,
|
|
30821
|
+
logo = "",
|
|
30621
30822
|
className
|
|
30622
30823
|
}) {
|
|
30623
|
-
const resolvedOptions = options ?? menuItems ??
|
|
30824
|
+
const resolvedOptions = options ?? menuItems ?? DEFAULT_MENU_OPTIONS;
|
|
30624
30825
|
let eventBusFromHook = null;
|
|
30625
30826
|
try {
|
|
30626
30827
|
eventBusFromHook = useEventBus();
|
|
@@ -30701,7 +30902,7 @@ function GameMenu({
|
|
|
30701
30902
|
}
|
|
30702
30903
|
);
|
|
30703
30904
|
}
|
|
30704
|
-
var variantMap3;
|
|
30905
|
+
var variantMap3, DEFAULT_MENU_OPTIONS;
|
|
30705
30906
|
var init_GameMenu = __esm({
|
|
30706
30907
|
"components/game/molecules/GameMenu.tsx"() {
|
|
30707
30908
|
"use client";
|
|
@@ -30712,6 +30913,11 @@ var init_GameMenu = __esm({
|
|
|
30712
30913
|
secondary: "bg-[var(--color-surface,#374151)] hover:bg-muted text-[var(--color-foreground)] border-muted",
|
|
30713
30914
|
ghost: "bg-transparent hover:bg-foreground/10 text-[var(--color-foreground)] border-foreground/20"
|
|
30714
30915
|
};
|
|
30916
|
+
DEFAULT_MENU_OPTIONS = [
|
|
30917
|
+
{ label: "New Game", event: "NEW_GAME", variant: "primary" },
|
|
30918
|
+
{ label: "Continue", event: "CONTINUE", variant: "secondary" },
|
|
30919
|
+
{ label: "Settings", event: "SETTINGS", variant: "ghost" }
|
|
30920
|
+
];
|
|
30715
30921
|
GameMenu.displayName = "GameMenu";
|
|
30716
30922
|
}
|
|
30717
30923
|
});
|
|
@@ -30722,19 +30928,19 @@ function formatTime3(ms) {
|
|
|
30722
30928
|
return `${minutes}:${remainingSeconds.toString().padStart(2, "0")}`;
|
|
30723
30929
|
}
|
|
30724
30930
|
function GameOverScreen({
|
|
30725
|
-
title,
|
|
30931
|
+
title = "Game Over",
|
|
30726
30932
|
message,
|
|
30727
|
-
stats =
|
|
30933
|
+
stats = DEFAULT_GAME_OVER_STATS,
|
|
30728
30934
|
actions,
|
|
30729
30935
|
menuItems,
|
|
30730
30936
|
onAction,
|
|
30731
30937
|
eventBus: eventBusProp,
|
|
30732
|
-
variant = "
|
|
30733
|
-
highScore,
|
|
30734
|
-
currentScore,
|
|
30938
|
+
variant = "defeat",
|
|
30939
|
+
highScore = 2e3,
|
|
30940
|
+
currentScore = 1240,
|
|
30735
30941
|
className
|
|
30736
30942
|
}) {
|
|
30737
|
-
const resolvedActions = actions ?? menuItems ??
|
|
30943
|
+
const resolvedActions = actions ?? menuItems ?? DEFAULT_GAME_OVER_ACTIONS;
|
|
30738
30944
|
let eventBusFromHook = null;
|
|
30739
30945
|
try {
|
|
30740
30946
|
eventBusFromHook = useEventBus();
|
|
@@ -30821,7 +31027,7 @@ function GameOverScreen({
|
|
|
30821
31027
|
}
|
|
30822
31028
|
);
|
|
30823
31029
|
}
|
|
30824
|
-
var variantColors, buttonVariants;
|
|
31030
|
+
var variantColors, buttonVariants, DEFAULT_GAME_OVER_ACTIONS, DEFAULT_GAME_OVER_STATS;
|
|
30825
31031
|
var init_GameOverScreen = __esm({
|
|
30826
31032
|
"components/game/molecules/GameOverScreen.tsx"() {
|
|
30827
31033
|
"use client";
|
|
@@ -30850,21 +31056,35 @@ var init_GameOverScreen = __esm({
|
|
|
30850
31056
|
secondary: "bg-[var(--color-surface,#374151)] hover:bg-muted text-[var(--color-foreground)] border-muted",
|
|
30851
31057
|
ghost: "bg-transparent hover:bg-foreground/10 text-[var(--color-foreground)] border-foreground/20"
|
|
30852
31058
|
};
|
|
31059
|
+
DEFAULT_GAME_OVER_ACTIONS = [
|
|
31060
|
+
{ label: "Play Again", event: "RESTART", variant: "primary" },
|
|
31061
|
+
{ label: "Main Menu", event: "MAIN_MENU", variant: "secondary" }
|
|
31062
|
+
];
|
|
31063
|
+
DEFAULT_GAME_OVER_STATS = [
|
|
31064
|
+
{ label: "Score", value: 1240 },
|
|
31065
|
+
{ label: "Enemies Defeated", value: 8 },
|
|
31066
|
+
{ label: "Time", value: 93e3, format: "time" }
|
|
31067
|
+
];
|
|
30853
31068
|
GameOverScreen.displayName = "GameOverScreen";
|
|
30854
31069
|
}
|
|
30855
31070
|
});
|
|
30856
31071
|
function PlatformerCanvas({
|
|
30857
31072
|
player,
|
|
30858
|
-
platforms = [
|
|
31073
|
+
platforms = [
|
|
31074
|
+
{ x: 0, y: 368, width: 800, height: 32, type: "ground" },
|
|
31075
|
+
{ x: 150, y: 280, width: 160, height: 16, type: "platform" },
|
|
31076
|
+
{ x: 420, y: 220, width: 160, height: 16, type: "platform" },
|
|
31077
|
+
{ x: 620, y: 300, width: 140, height: 16, type: "platform" }
|
|
31078
|
+
],
|
|
30859
31079
|
worldWidth = 800,
|
|
30860
31080
|
worldHeight = 400,
|
|
30861
31081
|
canvasWidth = 800,
|
|
30862
31082
|
canvasHeight = 400,
|
|
30863
31083
|
followCamera = true,
|
|
30864
|
-
bgColor,
|
|
31084
|
+
bgColor = "#5c94fc",
|
|
30865
31085
|
playerSprite = "https://almadar-kflow-assets.web.app/shared/platformer/characters/platformChar_idle.png",
|
|
30866
31086
|
tileSprites,
|
|
30867
|
-
backgroundImage = "
|
|
31087
|
+
backgroundImage = "",
|
|
30868
31088
|
assetBaseUrl = "https://almadar-kflow-assets.web.app/shared/platformer/",
|
|
30869
31089
|
leftEvent = "MOVE_LEFT",
|
|
30870
31090
|
rightEvent = "MOVE_RIGHT",
|
|
@@ -30912,10 +31132,10 @@ function PlatformerCanvas({
|
|
|
30912
31132
|
};
|
|
30913
31133
|
}, []);
|
|
30914
31134
|
const resolvedPlayer = player ?? {
|
|
30915
|
-
x:
|
|
30916
|
-
y:
|
|
30917
|
-
width:
|
|
30918
|
-
height:
|
|
31135
|
+
x: 80,
|
|
31136
|
+
y: 336,
|
|
31137
|
+
width: 32,
|
|
31138
|
+
height: 48,
|
|
30919
31139
|
facingRight: true
|
|
30920
31140
|
};
|
|
30921
31141
|
const handleKeyDown = React91.useCallback((e) => {
|
|
@@ -49204,12 +49424,12 @@ function WorldMapTemplate({
|
|
|
49204
49424
|
entity,
|
|
49205
49425
|
scale = 0.4,
|
|
49206
49426
|
unitScale = 2.5,
|
|
49207
|
-
diamondTopY,
|
|
49427
|
+
diamondTopY = 374,
|
|
49208
49428
|
allowMoveAllHeroes = false,
|
|
49209
|
-
tiles,
|
|
49210
|
-
units,
|
|
49211
|
-
features,
|
|
49212
|
-
assetManifest,
|
|
49429
|
+
tiles = DEFAULT_WORLDMAP_TILES,
|
|
49430
|
+
units = DEFAULT_WORLDMAP_UNITS,
|
|
49431
|
+
features = DEFAULT_WORLDMAP_FEATURES,
|
|
49432
|
+
assetManifest = DEFAULT_WORLDMAP_MANIFEST,
|
|
49213
49433
|
className
|
|
49214
49434
|
}) {
|
|
49215
49435
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -49232,9 +49452,63 @@ function WorldMapTemplate({
|
|
|
49232
49452
|
}
|
|
49233
49453
|
);
|
|
49234
49454
|
}
|
|
49455
|
+
var CDN3, DEFAULT_WORLDMAP_TILES, DEFAULT_WORLDMAP_UNITS, DEFAULT_WORLDMAP_FEATURES, DEFAULT_WORLDMAP_MANIFEST;
|
|
49235
49456
|
var init_WorldMapTemplate = __esm({
|
|
49236
49457
|
"components/game/templates/WorldMapTemplate.tsx"() {
|
|
49237
49458
|
init_WorldMapBoard();
|
|
49459
|
+
CDN3 = "https://almadar-kflow-assets.web.app/shared";
|
|
49460
|
+
DEFAULT_WORLDMAP_TILES = [
|
|
49461
|
+
{ x: 0, y: 0, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
49462
|
+
{ x: 1, y: 0, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
49463
|
+
{ x: 2, y: 0, terrain: "water", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_11.png` },
|
|
49464
|
+
{ x: 3, y: 0, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
49465
|
+
{ x: 4, y: 0, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
49466
|
+
{ x: 0, y: 1, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
49467
|
+
{ x: 1, y: 1, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
49468
|
+
{ x: 2, y: 1, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
49469
|
+
{ x: 3, y: 1, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
49470
|
+
{ x: 4, y: 1, terrain: "water", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_11.png` },
|
|
49471
|
+
{ x: 0, y: 2, terrain: "water", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_11.png` },
|
|
49472
|
+
{ x: 1, y: 2, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
49473
|
+
{ x: 2, y: 2, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_03.png` },
|
|
49474
|
+
{ x: 3, y: 2, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
49475
|
+
{ x: 4, y: 2, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
49476
|
+
{ x: 0, y: 3, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
49477
|
+
{ x: 1, y: 3, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
49478
|
+
{ x: 2, y: 3, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
49479
|
+
{ x: 3, y: 3, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_03.png` },
|
|
49480
|
+
{ x: 4, y: 3, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
49481
|
+
{ x: 0, y: 4, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
49482
|
+
{ x: 1, y: 4, terrain: "water", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_11.png` },
|
|
49483
|
+
{ x: 2, y: 4, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
49484
|
+
{ x: 3, y: 4, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
49485
|
+
{ x: 4, y: 4, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` }
|
|
49486
|
+
];
|
|
49487
|
+
DEFAULT_WORLDMAP_UNITS = [
|
|
49488
|
+
{ 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` },
|
|
49489
|
+
{ 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` }
|
|
49490
|
+
];
|
|
49491
|
+
DEFAULT_WORLDMAP_FEATURES = [
|
|
49492
|
+
{ id: "f1", x: 2, y: 2, type: "capital", sprite: `${CDN3}/scenes/world/capital.png` },
|
|
49493
|
+
{ id: "f2", x: 4, y: 2, type: "power_node", sprite: `${CDN3}/world-map/power_node.png` }
|
|
49494
|
+
];
|
|
49495
|
+
DEFAULT_WORLDMAP_MANIFEST = {
|
|
49496
|
+
baseUrl: CDN3,
|
|
49497
|
+
terrains: {
|
|
49498
|
+
grass: "/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png",
|
|
49499
|
+
water: "/isometric-blocks/PNG/Platformer tiles/platformerTile_11.png",
|
|
49500
|
+
mountain: "/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png",
|
|
49501
|
+
road: "/isometric-blocks/PNG/Platformer tiles/platformerTile_03.png"
|
|
49502
|
+
},
|
|
49503
|
+
units: {
|
|
49504
|
+
hero: "/sprite-sheets/amir-sprite-sheet-se.png",
|
|
49505
|
+
scout: "/sprite-sheets/archivist-sprite-sheet-se.png"
|
|
49506
|
+
},
|
|
49507
|
+
features: {
|
|
49508
|
+
capital: "/scenes/world/capital.png",
|
|
49509
|
+
power_node: "/world-map/power_node.png"
|
|
49510
|
+
}
|
|
49511
|
+
};
|
|
49238
49512
|
WorldMapTemplate.displayName = "WorldMapTemplate";
|
|
49239
49513
|
}
|
|
49240
49514
|
});
|