From 2e3a8acf301cb1091c67d683c1c654504f563683 Mon Sep 17 00:00:00 2001 From: gregchan550 Date: Fri, 22 Sep 2023 12:54:35 +1000 Subject: [PATCH] adding buffed box boy for testing --- .../src/main/com/csse3200/game/areas/ForestGameArea.java | 6 ++++++ .../csse3200/game/components/player/PlayerActions.java | 9 +++++++++ .../csse3200/game/entities/factories/MobBossFactory.java | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java index 90d8d3500..3ac86eb30 100644 --- a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java +++ b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java @@ -229,10 +229,16 @@ public void create() { // Load game assets loadAssets(); logger.info("Lol"); + logger.info("Lol"); + logger.info("Lol"); displayUI(); logger.info("Lol"); + logger.info("Lol"); + logger.info("Lol"); spawnTerrain(); logger.info("Lol"); + logger.info("Lol"); + logger.info("Lol"); // Set up infrastructure for end game tracking player = spawnPlayer(); diff --git a/source/core/src/main/com/csse3200/game/components/player/PlayerActions.java b/source/core/src/main/com/csse3200/game/components/player/PlayerActions.java index dd56f5c7a..aa080b285 100644 --- a/source/core/src/main/com/csse3200/game/components/player/PlayerActions.java +++ b/source/core/src/main/com/csse3200/game/components/player/PlayerActions.java @@ -4,6 +4,10 @@ import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.physics.box2d.Body; import com.csse3200.game.components.Component; +import com.csse3200.game.components.ProjectileEffects; +import com.csse3200.game.entities.Entity; +import com.csse3200.game.entities.factories.ProjectileFactory; +import com.csse3200.game.physics.PhysicsLayer; import com.csse3200.game.physics.components.PhysicsComponent; import com.csse3200.game.services.ServiceLocator; @@ -67,5 +71,10 @@ void stopWalking() { void attack() { Sound attackSound = ServiceLocator.getResourceService().getAsset("sounds/Impact4.ogg", Sound.class); attackSound.play(); + Entity projectile = ProjectileFactory.createEffectProjectile(PhysicsLayer.NPC, new Vector2(20f, entity.getPosition().y), + new Vector2(2, 2), ProjectileEffects.FIREBALL, false); + projectile.setPosition(entity.getPosition()); + projectile.setScale(1f, 1f); + ServiceLocator.getEntityService().register(projectile); } } diff --git a/source/core/src/main/com/csse3200/game/entities/factories/MobBossFactory.java b/source/core/src/main/com/csse3200/game/entities/factories/MobBossFactory.java index 049b12e02..11ae545e6 100644 --- a/source/core/src/main/com/csse3200/game/entities/factories/MobBossFactory.java +++ b/source/core/src/main/com/csse3200/game/entities/factories/MobBossFactory.java @@ -26,7 +26,7 @@ public class MobBossFactory { private static final NPCConfigs configs = FileLoader.readClass(NPCConfigs.class, "configs/Boss.json"); private static final int PRIORITY = 1; private static final int BOSS_MOB_AGRO_RANGE = 10; - private static final int DEMON_HEALTH = 5000; + private static final int DEMON_HEALTH = 500; private static final int DEMON_ATTACK = 0; // Create Demon Boss