mirror of
https://github.com/BreizhHardware/Poulpes-de-l-Espace-La-derniere-ligne-de-Defense.git
synced 2026-03-18 21:30:36 +01:00
Balancing tower damage and enemy health
# To do: - Upgrade des tours - Dasagne - Easter egg - I'm a teapot
This commit is contained in:
@@ -65,13 +65,13 @@ Enemy::Enemy(Enemy::Type type, Map &gameMap, int id, Game &game)
|
||||
initializeEnemy(200, 50, 20, 0, 4, "../ressources/gladius.png", 0, 0, 20, 2, id);
|
||||
break;
|
||||
case(Zeus):
|
||||
initializeEnemy(300, 200, 30, 0, 2, "../ressources/zeus.png", 0, 0, 30, 5, id);
|
||||
initializeEnemy(500, 300, 30, 0, 2, "../ressources/zeus.png", 0, 0, 30, 5, id);
|
||||
break;
|
||||
case(Corsair):
|
||||
initializeEnemy(500, 500, 40, 0, 2, "../ressources/corsair.png", 0, 0, 40, 10, id);
|
||||
initializeEnemy(1000, 750, 40, 0, 2, "../ressources/corsair.png", 0, 0, 40, 10, id);
|
||||
break;
|
||||
case(Idris):
|
||||
initializeEnemy(1000, 1000, 50, 0, 1, "../ressources/idris.png", 0, 0, 50, 20, id);
|
||||
initializeEnemy(2000, 2000, 50, 0, 1, "../ressources/idris.png", 0, 0, 50, 20, id);
|
||||
break;
|
||||
default:
|
||||
initializeEnemy(100, 0, 10, 0, 5, "../ressources/p52.png", 0, 0, 10, 1, id);
|
||||
|
||||
@@ -130,6 +130,12 @@ void Game::spawnEnemies(int waveNumber) {
|
||||
if(waveNumber == 1) {
|
||||
targetWeight = 1;
|
||||
}
|
||||
if(waveNumber == 2) {
|
||||
targetWeight = 3;
|
||||
}
|
||||
if(waveNumber == 3) {
|
||||
targetWeight = 5;
|
||||
}
|
||||
int enemyId = 0;
|
||||
|
||||
// Get the start tile
|
||||
|
||||
@@ -54,7 +54,7 @@ void Tower::fire() {
|
||||
fireAtClosest(target);
|
||||
}
|
||||
|
||||
LaserTower::LaserTower(QPointF position, Game& game) : Tower(10, 1, 10, 1, 50, position,
|
||||
LaserTower::LaserTower(QPointF position, Game& game) : Tower(50, 1, 10, 1, 50, position,
|
||||
"../ressources/Laser_Tower.png", game) {
|
||||
QPixmap pixmap(QString::fromStdString(avatarPath));
|
||||
// Check if the pixmap is null
|
||||
@@ -81,7 +81,7 @@ void LaserTower::upgrade() {
|
||||
cost += 50;
|
||||
}
|
||||
|
||||
BalisticTower::BalisticTower(QPointF position, Game& game) : Tower(30, 2, 6, 1, 100, position,
|
||||
BalisticTower::BalisticTower(QPointF position, Game& game) : Tower(150, 2, 6, 1, 100, position,
|
||||
"../ressources/Balistic_Tower.png", game) {
|
||||
QPixmap pixmap(QString::fromStdString(avatarPath));
|
||||
// Check if the pixmap is null
|
||||
@@ -104,7 +104,7 @@ void BalisticTower::upgrade() {
|
||||
cost += 100;
|
||||
}
|
||||
|
||||
DistorionTower::DistorionTower(QPointF position, Game& game) : Tower(20, 1, 7, 1, 75, position,
|
||||
DistorionTower::DistorionTower(QPointF position, Game& game) : Tower(100, 1, 7, 1, 75, position,
|
||||
"../ressources/Distortion_Tower.png", game) {
|
||||
QPixmap pixmap(QString::fromStdString(avatarPath));
|
||||
// Check if the pixmap is null
|
||||
|
||||
Reference in New Issue
Block a user