From 749a81793f9b6ce58e561b2afabc4bad2e708cf7 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 17 Jan 2020 16:52:37 -0500 Subject: [PATCH] v0.8.0: enemy balance tweaks: - guard accuracy reduced by ~15% - guard armor reduced by ~12% - necromancer evasion increased by ~18% - ripper demon spawn rate reduced by 20% - demon spawners now have 120 health, down from 150 - demon spawners now resist damage past 20, down from 25 - regular enemies are slightly less common in demon halls --- .../actors/mobs/DemonSpawner.java | 29 ++++++++++++++----- .../actors/mobs/Guard.java | 4 +-- .../actors/mobs/Necromancer.java | 2 +- .../levels/HallsLevel.java | 8 ++++- .../rooms/special/DemonSpawnerRoom.java | 3 +- 5 files changed, 34 insertions(+), 12 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java index 420a89415..3b8869cd6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java @@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.SpawnerSprite; +import com.watabou.utils.Bundle; import com.watabou.utils.PathFinder; import com.watabou.utils.Random; @@ -42,7 +43,7 @@ public class DemonSpawner extends Mob { { spriteClass = SpawnerSprite.class; - HP = HT = 150; + HP = HT = 120; defenseSkill = 0; EXP = 25; @@ -72,7 +73,7 @@ public class DemonSpawner extends Mob { return true; } - private float spawnCooldown = 50; + private float spawnCooldown = 60; @Override protected boolean act() { @@ -98,7 +99,7 @@ public class DemonSpawner extends Mob { Actor.addDelayed(new Pushing(spawn, pos, spawn.pos), -1); } - spawnCooldown += 50; + spawnCooldown += 60; } } return super.act(); @@ -106,15 +107,29 @@ public class DemonSpawner extends Mob { @Override public void damage(int dmg, Object src) { - if (dmg >= 25){ - //takes 25/26/27/28/29/30/31/32/33/34/35 dmg - // at 25/27/30/34/39/45/52/60/69/79/90 incoming dmg - dmg = 24 + (int)(Math.sqrt(8*(dmg - 24) + 1) - 1)/2; + if (dmg >= 20){ + //takes 20/21/22/23/24/25/26/27/28/29/30 dmg + // at 20/22/25/29/34/40/47/55/64/74/85 incoming dmg + dmg = 19 + (int)(Math.sqrt(8*(dmg - 19) + 1) - 1)/2; } spawnCooldown -= dmg; super.damage(dmg, src); } + public static final String SPAWN_COOLDOWN = "spawn_cooldown"; + + @Override + public void storeInBundle(Bundle bundle) { + super.storeInBundle(bundle); + bundle.put(SPAWN_COOLDOWN, spawnCooldown); + } + + @Override + public void restoreFromBundle(Bundle bundle) { + super.restoreFromBundle(bundle); + spawnCooldown = bundle.getFloat(SPAWN_COOLDOWN); + } + { immunities.add( Paralysis.class ); immunities.add( Amok.class ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java index a91643df7..1736ab57c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java @@ -115,12 +115,12 @@ public class Guard extends Mob { @Override public int attackSkill( Char target ) { - return 14; + return 12; } @Override public int drRoll() { - return Random.NormalIntRange(0, 8); + return Random.NormalIntRange(0, 7); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Necromancer.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Necromancer.java index d45e5bb72..a3f8c421c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Necromancer.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Necromancer.java @@ -50,7 +50,7 @@ public class Necromancer extends Mob { spriteClass = NecromancerSprite.class; HP = HT = 35; - defenseSkill = 11; + defenseSkill = 13; EXP = 7; maxLvl = 14; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/HallsLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/HallsLevel.java index b60dfaf47..c6f51340f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/HallsLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/HallsLevel.java @@ -76,7 +76,13 @@ public class HallsLevel extends RegularLevel { return rooms; } - + + @Override + public int nMobs() { + //remove one mob to account for ripper demon spawners + return super.nMobs()-1; + } + @Override protected int standardRooms() { //8 to 10, average 8.67 diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/DemonSpawnerRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/DemonSpawnerRoom.java index 49e8d24bb..3e0e6ee9b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/DemonSpawnerRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/DemonSpawnerRoom.java @@ -49,7 +49,8 @@ public class DemonSpawnerRoom extends SpecialRoom { spawner.pos = cx + cy * level.width(); level.mobs.add( spawner ); - int rippers = Random.IntRange(1, 2); + //2/3 chance for 1, 1/3 chance for 2 + int rippers = Random.chances( new float[]{0, 2, 1}); for (int i = 0; i < rippers; i++){ int pos;