diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Web.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Web.java index fd8ee8fe5..da6fbceed 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Web.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Web.java @@ -56,7 +56,13 @@ public class Web extends Blob { } } } - + + @Override + public void seed(Level level, int cell, int amount) { + super.seed(level, cell, amount); + level.solid[cell] = cur[cell] > 0 || (Terrain.flags[level.map[cell]] & Terrain.SOLID) != 0; + } + //affects characters as they step on it. See Level.OccupyCell and Level.PressCell public static void affectChar( Char ch ){ Buff.prolong( ch, Roots.class, 5f ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Brute.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Brute.java index 9bb3e651f..d6cdf05e1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Brute.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Brute.java @@ -77,7 +77,7 @@ public class Brute extends Mob { if (!hasRaged){ triggerEnrage(); } - return buff(BruteRage.class) != null; + return !buffs(BruteRage.class).isEmpty(); } } 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 a59cf8f23..3bca3d895 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 @@ -62,6 +62,11 @@ public class DemonSpawner extends Mob { return Random.NormalIntRange(0, 12); } + @Override + public void beckon(int cell) { + //do nothing + } + private float spawnCooldown = 50; @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shaman.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shaman.java index c06117542..16f85a610 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shaman.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shaman.java @@ -76,7 +76,6 @@ public abstract class Shaman extends Mob { // so loot chance looks like: 1/33, 1/100, 1/300, 1/900, etc. lootChance *= Math.pow(1/3f, Dungeon.LimitedDrops.SHAMAN_WAND.count); super.rollToDropLoot(); - super.rollToDropLoot(); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Spinner.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Spinner.java index 730fc6a03..3b16a92c6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Spinner.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Spinner.java @@ -122,6 +122,8 @@ public class Spinner extends Mob { } public int webPos(){ + + if (enemy == null) return -1; Ballistica b; //aims web in direction enemy is moving, or between self and enemy if they aren't moving @@ -151,7 +153,7 @@ public class Spinner extends Mob { public void shootWeb(){ int webPos = webPos(); - if (webPos != enemy.pos && webPos != -1){ + if (enemy != null && webPos != enemy.pos && webPos != -1){ int i; for ( i = 0; i < PathFinder.CIRCLE8.length; i++){ if ((enemy.pos + PathFinder.CIRCLE8[i]) == webPos){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java index 9b59c2c5a..7f79dd6c2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java @@ -155,9 +155,9 @@ public class WandOfCorruption extends Wand { //debuffs placed on the enemy reduce their resistance for (Buff buff : enemy.buffs()){ - if (MAJOR_DEBUFFS.containsKey(buff.getClass())) enemyResist *= MAJOR_DEBUFF_WEAKEN; - else if (MINOR_DEBUFFS.containsKey(buff.getClass())) enemyResist *= MINOR_DEBUFF_WEAKEN; - else if (buff.type == Buff.buffType.NEGATIVE) enemyResist *= MINOR_DEBUFF_WEAKEN; + if (MAJOR_DEBUFFS.containsKey(buff.getClass())) enemyResist *= (1f-MAJOR_DEBUFF_WEAKEN); + else if (MINOR_DEBUFFS.containsKey(buff.getClass())) enemyResist *= (1f-MINOR_DEBUFF_WEAKEN); + else if (buff.type == Buff.buffType.NEGATIVE) enemyResist *= (1f-MINOR_DEBUFF_WEAKEN); } //cannot re-corrupt or doom an enemy, so give them a major debuff instead diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/ForceCube.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/ForceCube.java index 498304158..667ca9945 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/ForceCube.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/ForceCube.java @@ -47,6 +47,11 @@ public class ForceCube extends MissileWeapon { @Override protected void onThrow(int cell) { + if (Dungeon.level.pit[cell]){ + super.onThrow(cell); + return; + } + Dungeon.level.pressCell(cell); ArrayList targets = new ArrayList<>(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java index 45362ac3f..a3c3c77a4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java @@ -181,9 +181,9 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip text = Messages.format( text, args ); } if (ch != null) { - FloatingText.show( x + width * 0.5f, y, ch.pos, text, color ); + FloatingText.show( x + width() * 0.5f, y, ch.pos, text, color ); } else { - FloatingText.show( x + width * 0.5f, y, text, color ); + FloatingText.show( x + width() * 0.5f, y, text, color ); } } }