diff --git a/assets/animation.json b/assets/animation.json index 713ced3..46631a0 100644 --- a/assets/animation.json +++ b/assets/animation.json @@ -32,6 +32,39 @@ "close": [] } }, + "beak_thing": { + "sheet": { + "frames": 1, + "frame_width": 256, + "frame_height": 256 + }, + "sequences": { + "idle": {"frames": [0], "durations": [25] } + }, + "transforms": { + "basic": { + "min_x": 0.9, + "min_y": 0.9, + "max_x": 1.1, + "max_y": 1.1, + "flipped": false, + "scaled": true, + "toggled": false, + "looped": false, + "relative": false, + "easing": "in_out_back", + "motion": "scale_both" + } + }, + "forms": { + "idle": ["idle", "basic"] + }, + "sounds": { + "idle": [[0, "punch_cartoony"]], + "open": [], + "close": [] + } + }, "ag_bot": { "sheet": { "frames": 1, diff --git a/assets/config.json b/assets/config.json index e0ba13b..5f215ef 100644 --- a/assets/config.json +++ b/assets/config.json @@ -8,6 +8,7 @@ "test_story": "assets/sounds/test_story.ogg", "sword_hit_1": "assets/sounds/sword_hit_1.ogg", "sword_hit_2": "assets/sounds/sword_hit_2.ogg", + "punch_cartoony": "assets/sounds/punch_cartoony.ogg", "ambient_1": "assets/sounds/ambient_1.ogg" }, "sprites": { @@ -16,6 +17,11 @@ "frame_width": 256, "frame_height": 256 }, + "beak_thing": + {"path": "assets/sprites/beak_thing.png", + "frame_width": 256, + "frame_height": 256 + }, "ag_bot": {"path": "assets/sprites/ag_bot.png", "frame_width": 846, diff --git a/assets/enemies.json b/assets/enemies.json index 0c0a731..f92259f 100644 --- a/assets/enemies.json +++ b/assets/enemies.json @@ -50,5 +50,30 @@ {"_type": "Personality", "hearing_distance": 5, "tough": false}, {"_type": "Sprite", "name": "spider_bot", "scale": 1.0} ] + }, + "BEAK_THING": { + "components": [ + {"_type": "Tile", "display": 2221, + "foreground": "enemies/fg:rat_giant", + "background": "color:transparent" + }, + {"_type": "Combat", "max_hp": 100, "max_ap": 12, + "ap_delta": 6,"damage": 50, "attack_rating": 0.8, "toughness_rating": 0.2, + "body_parts": { + "head": 100, + "chest": 100, + "stomach": 100, + "right_arm": 100, + "left_arm": 100, + "right_leg": 100, + "left_leg": 100 + } + }, + {"_type": "Collision", "has": true}, + {"_type": "Motion", "dx": 0, "dy": 0, "random": false}, + {"_type": "EnemyConfig", "ai_script": "Enemy::actions", "ai_start_name": "Enemy::initial_state", "ai_goal_name": "Enemy::final_state"}, + {"_type": "Personality", "hearing_distance": 10, "tough": true}, + {"_type": "Sprite", "name": "beak_thing", "scale": 1.0} + ] } } diff --git a/assets/icons/repair_kit.png b/assets/icons/repair_kit.png index 634e48b..6989484 100644 Binary files a/assets/icons/repair_kit.png and b/assets/icons/repair_kit.png differ diff --git a/assets/items/repair_kit.png b/assets/items/repair_kit.png index a540c09..c53c77d 100644 Binary files a/assets/items/repair_kit.png and b/assets/items/repair_kit.png differ diff --git a/assets/scenes/death_scene.png b/assets/scenes/death_scene.png index 5654129..c725277 100644 Binary files a/assets/scenes/death_scene.png and b/assets/scenes/death_scene.png differ diff --git a/assets/sounds/punch_cartoony.ogg b/assets/sounds/punch_cartoony.ogg new file mode 100644 index 0000000..1a812cc Binary files /dev/null and b/assets/sounds/punch_cartoony.ogg differ diff --git a/assets/sprites/beak_thing.png b/assets/sprites/beak_thing.png new file mode 100644 index 0000000..ae2f2b5 Binary files /dev/null and b/assets/sprites/beak_thing.png differ diff --git a/src/game/worldbuilder.cpp b/src/game/worldbuilder.cpp index 59adfd3..4841c5c 100644 --- a/src/game/worldbuilder.cpp +++ b/src/game/worldbuilder.cpp @@ -117,6 +117,10 @@ DinkyECS::Entity WorldBuilder::configure_entity_in_room(DinkyECS::World &world, Point pos_out; bool placed = $map.place_entity(in_room, pos_out); dbc::check(placed, "failed to randomly place item in room"); + + // don't place anything inside a door + if($map.$doors.contains(pos_out)) return DinkyECS::NONE; + auto entity = configure_entity_in_map(world, entity_data, pos_out); return entity; } @@ -233,6 +237,7 @@ void WorldBuilder::place_entities(DinkyECS::World &world) { } else { auto player_data = config.enemies["PLAYER_TILE"]; auto player_ent = configure_entity_in_room(world, player_data, 0); + dbc::check(player_ent != DinkyECS::NONE, "placed the player in a door!"); player_pos = world.get(player_ent);