From 7a464b0a29682a910224dd0ca8fd330a5ea20bd8 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 20 Dec 2023 14:09:07 -0500 Subject: [PATCH] v2.3.0: clarity improvements to the DM-300 fight: - removed ability use logspam - increased pylon spark speed by 50% - sparks are now more highly concentrated closer to the pylon --- .../assets/messages/actors/actors.properties | 3 --- .../assets/messages/levels/levels.properties | 2 +- .../actors/mobs/DM300.java | 4 ---- .../effects/particles/SparkParticle.java | 17 +++++++++++++++++ .../levels/CavesBossLevel.java | 19 +++++++++---------- 5 files changed, 27 insertions(+), 18 deletions(-) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 8e316566d..531727d7f 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -1148,8 +1148,6 @@ actors.mobs.dm201.desc=The dwarves briefly experimented with more heavily emphas actors.mobs.dm300.name=DM-300 actors.mobs.dm300.notice=UNAUTHORIZED PERSONNEL DETECTED! actors.mobs.dm300.shield=DM-300 pulls power from the exposed wires and shields itself! -actors.mobs.dm300.vent=DM-300 fires a jet of toxic exhaust! -actors.mobs.dm300.rocks=DM-300 slams the ground, loosening rocks from the ceiling! actors.mobs.dm300.charging=SUSTAINING DAMAGE! ACTIVATING POWER PYLON! actors.mobs.dm300.charging_hint=DM-300 is invulnerable while it is being energized by a pylon! actors.mobs.dm300.supercharged=DESTROY! DESTROY! DESTROY! @@ -1160,7 +1158,6 @@ actors.mobs.dm300.def_verb=blocked actors.mobs.dm300.defeated=CRITICAL DAMAGE! ATTEMPTING SHUTDO- actors.mobs.dm300.desc=The DM-300 is the largest and most powerful 'defense machine' that the dwarves ever built. Such an awesome machine is difficult to manufacture, so the dwarves only ever made a few to guard the entrances to their underground metropolis.\n\nIt is equipped with vents to jet its toxic exhaust fumes and a high power drill that it can use both to attack and disrupt the earth. DM-300 can also connect to an energy grid, further enhancing its power. actors.mobs.dm300.desc_supercharged=DM-300 is currently charged full of electrical energy. In this form DM-300 cannot be damaged and moves at double speed! Additionally, its drill now spins fast enough for it to _tunnel through solid rock,_ though it moves much more slowly when doing this.\n\nAttacking DM-300 directly is pointless while it is supercharged, but _something in the area must be providing it with this energy,_ destroying that may weaken it. -actors.mobs.dm300$fallingrocks.desc=Loose rocks are tumbling down from the ceiling here, it looks like its about to collapse! actors.mobs.dwarfking.name=King of Dwarves actors.mobs.dwarfking.notice=How dare you! You have no idea what you're interfering with! diff --git a/core/src/main/assets/messages/levels/levels.properties b/core/src/main/assets/messages/levels/levels.properties index 88c419739..07ccfcad6 100644 --- a/core/src/main/assets/messages/levels/levels.properties +++ b/core/src/main/assets/messages/levels/levels.properties @@ -152,7 +152,7 @@ levels.traps.worndarttrap.desc=A small dart-blower must be hidden nearby, activa ###levels levels.cavesbosslevel.wires_name=Exposed wiring levels.cavesbosslevel.wires_desc=The ground is partially dug up here, showing some large exposed wires. They must be connecting the various electrical machines together.\n\nThe wires must have some current running through them. If DM-300 steps here it may be able to draw power from them. -levels.cavesbosslevel.energy_desc=The ground here is sparking with electricity, and is harmful to step on. The sparks seem to be gravitating in a certain direction... perhaps they lead to the power source? +levels.cavesbosslevel.energy_desc=The ground here is sparking with electricity, and is harmful to step on. _The sparks seem to be gravitating in a certain direction..._ perhaps they lead to the power source? levels.cavesbosslevel.gate_name=Metal gate levels.cavesbosslevel.gate_desc=A large metal gate that blocks the path into the dwarven metropolis. The metal box in the center is producing a loud humming noise, it must be connected to the circuitry and machines nearby. Perhaps destroying DM-300 will open the gate? levels.cavesbosslevel.gate_desc_broken=The gate must have been connected to DM-300 in some way, as it exploded when DM-300 was defeated. Now only broken pieces remain. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DM300.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DM300.java index c3c71edcd..4b8ae77ea 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DM300.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DM300.java @@ -209,7 +209,6 @@ public class DM300 extends Mob { lastAbility = GAS; turnsSinceLastAbility = 0; - GLog.w(Messages.get(this, "vent")); if (sprite != null && (sprite.visible || enemy.sprite.visible)) { sprite.zap(enemy.pos); return false; @@ -223,7 +222,6 @@ public class DM300 extends Mob { } else if (enemy.paralysed <= 0) { lastAbility = ROCKS; turnsSinceLastAbility = 0; - GLog.w(Messages.get(this, "rocks")); if (sprite != null && (sprite.visible || enemy.sprite.visible)) { ((DM300Sprite)sprite).slam(enemy.pos); return false; @@ -259,7 +257,6 @@ public class DM300 extends Mob { abilityCooldown = Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); if (lastAbility == GAS) { - GLog.w(Messages.get(this, "vent")); if (sprite != null && (sprite.visible || enemy.sprite.visible)) { sprite.zap(enemy.pos); return false; @@ -269,7 +266,6 @@ public class DM300 extends Mob { return true; } } else { - GLog.w(Messages.get(this, "rocks")); if (sprite != null && (sprite.visible || enemy.sprite.visible)) { ((DM300Sprite)sprite).slam(enemy.pos); return false; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SparkParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SparkParticle.java index d9701e8db..9243a0799 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SparkParticle.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/SparkParticle.java @@ -21,6 +21,8 @@ package com.shatteredpixel.shatteredpixeldungeon.effects.particles; +import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; +import com.watabou.noosa.Visual; import com.watabou.noosa.particles.Emitter; import com.watabou.noosa.particles.Emitter.Factory; import com.watabou.noosa.particles.PixelParticle; @@ -79,6 +81,21 @@ public class SparkParticle extends PixelParticle { speed.set( 0, 0 ); } + public void resetAttracting( float x, float y, Visual attracting){ + reset(x, y); + + left = lifespan = Random.Float( 0.2f, 0.35f ); + + acc.set(0); + speed.set((attracting.x + attracting.width / 2f) - x, + (attracting.y + attracting.height / 2f) - y); + speed.normalize().scale(DungeonTilemap.SIZE * 3f); + + //offset the particles slightly so they don't go too far outside of the cell + this.x -= speed.x / 8f; + this.y -= speed.y / 8f; + } + public void setMaxSize( float value ){ size = value; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java index c0549aa81..5194e8cde 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java @@ -49,7 +49,6 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.PylonSprite; import com.shatteredpixel.shatteredpixeldungeon.tiles.CustomTilemap; -import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.Game; @@ -61,6 +60,7 @@ import com.watabou.noosa.audio.Sample; import com.watabou.noosa.particles.Emitter; import com.watabou.utils.Bundle; import com.watabou.utils.Callback; +import com.watabou.utils.GameMath; import com.watabou.utils.PathFinder; import com.watabou.utils.Point; import com.watabou.utils.Random; @@ -872,15 +872,14 @@ public class CavesBossLevel extends Level { } } - SparkParticle s = ((SparkParticle) emitter.recycle(SparkParticle.class)); - s.resetStatic(x, y); - s.speed.set((energySourceSprite.x + energySourceSprite.width/2f) - x, - (energySourceSprite.y + energySourceSprite.height/2f) - y); - s.speed.normalize().scale(DungeonTilemap.SIZE*2f); + float dist = (float)Math.max( Math.abs(energySourceSprite.x - x), Math.abs(energySourceSprite.y - y) ); + dist = GameMath.gate(0, dist-40, 320); + //more sparks closer up + if (Random.Float(360) > dist) { - //offset the particles slightly so they don't go too far outside of the cell - s.x -= s.speed.x/8f; - s.y -= s.speed.y/8f; + SparkParticle s = ((SparkParticle) emitter.recycle(SparkParticle.class)); + s.resetAttracting(x, y, energySourceSprite); + } } @Override @@ -898,7 +897,7 @@ public class CavesBossLevel extends Level { public void use( BlobEmitter emitter ) { super.use( emitter ); energySourceSprite = null; - emitter.pour(DIRECTED_SPARKS, 0.125f); + emitter.pour(DIRECTED_SPARKS, 0.08f); } }