From 215cfb1d8827ff66fc5c34c63245a3c505db6155 Mon Sep 17 00:00:00 2001 From: evanbowman Date: Sun, 30 Oct 2022 20:09:03 -0400 Subject: [PATCH] bugfixes --- source/engine.cpp | 14 ++++++++++++++ source/objects/enemies/heavy/chainsnake.hpp | 2 ++ source/objects/enemies/heavy/soldier.hpp | 1 + source/objects/hero.cpp | 1 + source/scenes.cpp | 11 +++++++++++ 5 files changed, 29 insertions(+) diff --git a/source/engine.cpp b/source/engine.cpp index 0138d05..3502211 100644 --- a/source/engine.cpp +++ b/source/engine.cpp @@ -176,8 +176,17 @@ void Engine::begin_game(Difficulty d, bool loadsave) if (loadsave) { loadgame(); + } else { hero_->set_flip(false, false); + + // BUGFIX: FIXME! Elite boss unreachable otherwise... + p_->tile_modifications_.push_back({3, 19, 3, 13, 25}); + p_->tile_modifications_.push_back({3, 0, 3, 14, 25}); + p_->tile_modifications_.push_back({12, 0, 3, 14, 0}); + p_->tile_modifications_.push_back({12, 1, 3, 14, 0}); + p_->tile_modifications_.push_back({12, 19, 3, 13, 0}); + p_->tile_modifications_.push_back({12, 18, 3, 13, 0}); } g_.hp_ = 10 + p_->level_; @@ -630,6 +639,11 @@ void Engine::load(int chunk_x, int chunk_y, bool restore) // NOTE: when adding, uncomment corresponding hint in scenes.cpp unlock_doors(); } + + if (chunk_x == 1 and chunk_y == 7) { + // FIXME: mother enemy missing + unlock_doors(); + } } diff --git a/source/objects/enemies/heavy/chainsnake.hpp b/source/objects/enemies/heavy/chainsnake.hpp index 7cf2bdc..0798724 100644 --- a/source/objects/enemies/heavy/chainsnake.hpp +++ b/source/objects/enemies/heavy/chainsnake.hpp @@ -87,6 +87,8 @@ class Chainsnake : public Enemy { if (health_ == 0) { kill(); + platform().speaker().play_sound("snd_explo2", 6); + engine().g_.screenshake_ = 2; for (auto& e : engine().enemies_) { if (auto eg = dynamic_cast(e.get())) { if (eg->owner() == this) { diff --git a/source/objects/enemies/heavy/soldier.hpp b/source/objects/enemies/heavy/soldier.hpp index b81c187..1775be4 100644 --- a/source/objects/enemies/heavy/soldier.hpp +++ b/source/objects/enemies/heavy/soldier.hpp @@ -45,6 +45,7 @@ class Soldier : public Enemy if (health_ == 0) { kill(); platform().speaker().play_sound("snd_explo2", 6); + engine().g_.screenshake_ = 2; engine().add_object(Vec2{position_.x + 3, position_.y + 4}); return; } diff --git a/source/objects/hero.cpp b/source/objects/hero.cpp index e9bd25a..e099523 100644 --- a/source/objects/hero.cpp +++ b/source/objects/hero.cpp @@ -41,6 +41,7 @@ class Blade : public Object if (engine().p_->blade_ > 2) { sprite_index_ = 195; hitbox_.dimension_.size_ = {10, 16}; + hitbox_.dimension_.origin_ = {8, 8}; } } diff --git a/source/scenes.cpp b/source/scenes.cpp index 86b039f..9261d59 100644 --- a/source/scenes.cpp +++ b/source/scenes.cpp @@ -128,6 +128,17 @@ void MapScene::show_worldmap() bool left = false; bool right = false; + if (x == 3 and y == 13) { + // BUGFIX for elite boss... FIXME by implementing the item that + // reveals all warp points. + down = true; + } + if (x == 3 and y == 14) { + // BUGFIX for elite boss... FIXME by implementing the item that + // reveals all warp points. + up = true; + } + if (y > 0 and data) { auto above = loadrm(x, y - 1); if (above) {