Refactored the bossfight_ui so it will work with any description of a boss fight.

This commit is contained in:
Zed A. Shaw 2025-03-02 12:36:08 -05:00
parent 43835da88f
commit a3f6ba3c03
12 changed files with 99 additions and 69 deletions

14
assets/bosses.json Normal file
View file

@ -0,0 +1,14 @@
{
"RAT_KING": {
"background": "boss_fight_background",
"weapon_sound": "Sword_Hit_2",
"components": [
{"_type": "Combat", "hp": 50, "max_hp": 50, "damage": 50, "dead": false},
{"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "EnemyConfig", "hearing_distance": 3},
{"_type": "Animation", "easing": 2, "ease_rate": 0.2, "scale": 0.2, "simple": false, "frames": 2, "speed": 0.02},
{"_type": "Sprite", "name": "rat_king_boss", "width": 720, "height": 720},
{"_type": "Sound", "attack": "Marmot_Scream_1", "death": "Creature_Death_1"}
]
}
}

View file

@ -48,11 +48,6 @@
"down_the_well": "assets/down_the_well.jpg",
"boss_fight_background": "assets/rat_king_boss_fight_background.jpg"
},
"enemy": {
"HEARING_DISTANCE": 5
},
"player": {
},
"worldgen": {
"enemy_probability": 80,
"empty_room_probability": 10,

View file

@ -14,7 +14,7 @@
{"_type": "Device",
"config": {"test": true},
"events": ["Events::GUI::STAIRS_DOWN"]},
{"_type": "Sprite", "name": "well_down"}
{"_type": "Sprite", "name": "well_down", "width": 256, "height": 256}
]
},
"STAIRS_UP": {
@ -31,7 +31,7 @@
{"_type": "Device",
"config": {"test": true},
"events": ["Events::GUI::STAIRS_UP"]},
{"_type": "Sprite", "name": "rope_vines_up"}
{"_type": "Sprite", "name": "rope_vines_up", "width": 256, "height": 256}
]
},
"TRIPWIRE_TRAP": {
@ -47,7 +47,7 @@
{"_type": "Device",
"config": {"test": true},
"events": ["Events::GUI::TRAP"]},
{"_type": "Sprite", "name": "tripwire_trap"}
{"_type": "Sprite", "name": "tripwire_trap", "width": 256, "height": 256}
]
}
}

View file

@ -21,7 +21,7 @@
{"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "EnemyConfig", "hearing_distance": 5},
{"_type": "Animation", "easing": 1, "ease_rate": 0.2, "scale": 0.1, "simple": true, "frames": 10, "speed": 0.3},
{"_type": "Sprite", "name": "armored_knight"},
{"_type": "Sprite", "name": "armored_knight", "width": 256, "height": 256, "width": 256, "height": 256},
{"_type": "Sound", "attack": "Sword_Hit_2", "death": "Humanoid_Death_1"}
]
},
@ -34,7 +34,7 @@
{"_type": "Combat", "hp": 40, "max_hp": 40, "damage": 10, "dead": false},
{"_type": "Motion", "dx": 0, "dy": 0, "random": true},
{"_type": "EnemyConfig", "hearing_distance": 5},
{"_type": "Sprite", "name": "axe_ranger"},
{"_type": "Sprite", "name": "axe_ranger", "width": 256, "height": 256},
{"_type": "Animation", "easing": 3, "ease_rate": 0.5, "scale": 0.1, "simple": false, "frames": 2, "speed": 0.6},
{"_type": "Sound", "attack": "Sword_Hit_2", "death": "Ranger_1"}
]
@ -48,8 +48,8 @@
{"_type": "Combat", "hp": 50, "max_hp": 50, "damage": 50, "dead": false},
{"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "EnemyConfig", "hearing_distance": 5},
{"_type": "Sprite", "name": "evil_eye"},
{"_type": "Animation", "easing": 3, "ease_rate": 0.1, "scale": 0.1, "simple": false, "frames": 2, "speed": 0.3},
{"_type": "Sprite", "name": "evil_eye", "width": 256, "height": 256},
{"_type": "Animation", "easing": 3, "ease_rate": 0.1, "scale": 0.1, "simple": false, "frames": 2, "speed": 0.1},
{"_type": "Sound", "attack": "Evil_Eye_Sound_2", "death": "Evil_Eye_Sound_1"}
]
},
@ -63,25 +63,10 @@
{"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "EnemyConfig", "hearing_distance": 10},
{"_type": "Animation", "easing": 3, "ease_rate": 0.5, "scale": 0.1, "simple": true, "frames": 10, "speed": 1.0},
{"_type": "Sprite", "name": "rat_with_sword"},
{"_type": "Sprite", "name": "rat_with_sword", "width": 256, "height": 256},
{"_type": "Sound", "attack": "Small_Rat", "death": "Creature_Death_1"}
]
},
"RAT_KING": {
"placement": "fixed",
"components": [
{"_type": "Tile", "display": "\u08ac",
"foreground": [205, 164, 100],
"background": [30, 20, 75]
},
{"_type": "Combat", "hp": 50, "max_hp": 50, "damage": 50, "dead": false},
{"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "EnemyConfig", "hearing_distance": 3},
{"_type": "Animation", "easing": 2, "ease_rate": 0.2, "scale": 0.2, "simple": false, "frames": 2, "speed": 0.02},
{"_type": "Sprite", "name": "rat_king_boss"},
{"_type": "Sound", "attack": "Marmot_Scream_1", "death": "Creature_Death_1"}
]
},
"SPIDER_GIANT_HAIRY": {
"components": [
{"_type": "Tile", "display": "\u08ea",
@ -92,7 +77,7 @@
{"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "EnemyConfig", "hearing_distance": 10},
{"_type": "Animation", "easing": 2, "ease_rate": 0.5, "scale": 0.1, "simple": true, "frames": 10, "speed": 1.0},
{"_type": "Sprite", "name": "hairy_spider"},
{"_type": "Sprite", "name": "hairy_spider", "width": 256, "height": 256},
{"_type": "Sound", "attack": "Spider_1", "death": "Spider_2"}
]
}

View file

@ -10,7 +10,7 @@
"foreground": [24, 120, 189],
"background": [230,120, 120]
},
{"_type": "Sprite", "name": "torch_horizontal_floor"},
{"_type": "Sprite", "name": "torch_horizontal_floor", "width": 256, "height": 256},
{"_type": "Sound", "attack": "pickup", "death": "blank"}
]
},
@ -25,7 +25,7 @@
"foreground": [24, 120, 189],
"background": [24, 120, 189]
},
{"_type": "Sprite", "name": "cinqueda"},
{"_type": "Sprite", "name": "cinqueda", "width": 256, "height": 256},
{"_type": "Sound", "attack": "pickup", "death": "blank"}
]
},
@ -39,7 +39,7 @@
"background": [150, 100, 189]
},
{"_type": "Loot", "amount": 10},
{"_type": "Sprite", "name": "barrel_small"},
{"_type": "Sprite", "name": "barrel_small", "width": 256, "height": 256},
{"_type": "Sound", "attack": "pickup", "death": "blank"}
],
"inventory_count": 1
@ -55,7 +55,7 @@
"background": [24, 205, 210]
},
{"_type": "LightSource", "strength": 50, "radius": 2.8},
{"_type": "Sprite", "name": "torch_pillar"},
{"_type": "Sprite", "name": "torch_pillar", "width": 256, "height": 256},
{"_type": "Sound", "attack": "pickup", "death": "blank"}
]
},
@ -70,7 +70,7 @@
"background": [255, 205, 189]
},
{"_type": "Curative", "hp": 20},
{"_type": "Sprite", "name": "healing_potion_small"},
{"_type": "Sprite", "name": "healing_potion_small", "width": 256, "height": 256},
{"_type": "Sound", "attack": "pickup", "death": "blank"}
]
},
@ -85,7 +85,7 @@
"background": [24, 205, 189]
},
{"_type": "Loot", "amount": 10},
{"_type": "Sprite", "name": "grave_stone"},
{"_type": "Sprite", "name": "grave_stone", "width": 256, "height": 256},
{"_type": "Sound", "attack": "pickup", "death": "blank"}
]
}