diff --git a/include/game/Towers.h b/include/game/Towers.h index a1623d1..c4a2b77 100644 --- a/include/game/Towers.h +++ b/include/game/Towers.h @@ -163,6 +163,8 @@ class ArcherTower : public LittleTower { public: ArcherTower(TowerID id, std::uint16_t x, std::uint16_t y, PlayerID builder) : LittleTower(id, getType(), x, y, builder) {} + constexpr static float ExplosionRadius = 1.5f; + virtual TowerType getType() const { return TowerType::Archer; } virtual void tick(std::uint64_t delta, World* world); }; diff --git a/src/game/World.cpp b/src/game/World.cpp index 6880b29..8038465 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -402,7 +402,7 @@ void World::OnArcherTowerShot(MobPtr target, ArcherTower* shooter) { bool explosiveArrows = shooter->getLevel().getPath() == TowerPath::Bottom; notifyListeners(&WorldListener::OnArrowShot, target, shooter); if (explosiveArrows) { - notifyListeners(&WorldListener::OnExplosion, utils::shape::Circle{ target->getCenterX(), target->getCenterY(), 1.0f }, 10.0f, shooter); + notifyListeners(&WorldListener::OnExplosion, utils::shape::Circle{ target->getCenterX(), target->getCenterY(), ArcherTower::ExplosionRadius }, shooter->getStats()->getDamage(), shooter); } }