From c26e94f656e2273d2c29e96c7ce888dc149dc8c1 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 9 Apr 2020 19:25:58 -0400 Subject: [PATCH] v0.8.0: bugfixes / tweaks: - Fixed crash bugs - Fixed bees attacking bosses while they are invulnerable - Fixed DM-201s attacking the hero through walls - Fixed golems rarely teleporting to enclosed spaces - Fixed viscocity glyph not accounting for sniper shot - Fixed a typo in spirit bow description - Ripper demons now telegraph their leap even if they aren't visible - Updated gradle build tools version --- build.gradle | 2 +- .../shatteredpixeldungeon/actors/mobs/Bee.java | 1 + .../shatteredpixeldungeon/actors/mobs/DM201.java | 1 + .../shatteredpixeldungeon/actors/mobs/Golem.java | 2 +- .../shatteredpixeldungeon/actors/mobs/Mob.java | 2 +- .../shatteredpixeldungeon/actors/mobs/RipperDemon.java | 2 +- .../shatteredpixeldungeon/actors/mobs/YogDzewa.java | 2 ++ .../items/armor/glyphs/Viscosity.java | 10 ++++++++++ .../messages/items/items.properties | 2 +- 9 files changed, 19 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 662345250..b584ecf10 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.6.1' + classpath 'com.android.tools.build:gradle:3.6.2' } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bee.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bee.java index c0bd0ec43..8bac5dc41 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bee.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bee.java @@ -157,6 +157,7 @@ public class Bee extends Mob { if (!(mob == this) && Dungeon.level.distance(mob.pos, potPos) <= 3 && mob.alignment != Alignment.NEUTRAL + && !mob.isInvulnerable(getClass()) && !(alignment == Alignment.ALLY && mob.alignment == Alignment.ALLY)) { enemies.add(mob); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DM201.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DM201.java index d12eb5296..911886ec4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DM201.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DM201.java @@ -57,6 +57,7 @@ public class DM201 extends DM200 { GameScene.add(Blob.seed(pos, 0, CorrosiveGas.class)); if (state == HUNTING && enemy != null && enemySeen && threatened && !Dungeon.level.adjacent(pos, enemy.pos)){ + enemySeen = enemy != null && enemy.isAlive() && fieldOfView[enemy.pos] && enemy.invisible <= 0; if (sprite != null && (sprite.visible || enemy.sprite.visible)) { sprite.zap( enemy.pos ); return false; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Golem.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Golem.java index 7ab0bd773..e46a79fb1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Golem.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Golem.java @@ -103,7 +103,7 @@ public class Golem extends Mob { enemyTeleCooldown--; if (teleporting){ ((GolemSprite)sprite).teleParticles(false); - if (Actor.findChar(target) == null) { + if (Actor.findChar(target) == null && Dungeon.level.openSpace[target]) { ScrollOfTeleportation.appear(this, target); selfTeleCooldown = 30; } else { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java index d145d469a..e6c8d111d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java @@ -443,7 +443,7 @@ public abstract class Mob extends Char { //otherwise, check if other characters are forcing us to take a very slow route // and don't try to go around them yet in response, basically assume their blockage is temporary PathFinder.Path ignoreChars = Dungeon.findPath(this, target, Dungeon.level.passable, fieldOfView, false); - if (full == null || full.size() > 2*ignoreChars.size()){ + if (ignoreChars != null && (full == null || full.size() > 2*ignoreChars.size())){ //check if first cell of shorter path is valid. If it is, use new shorter path. Otherwise do nothing and wait. path = ignoreChars; if (!Dungeon.level.passable[ignoreChars.getFirst()] diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RipperDemon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RipperDemon.java index b6d32d28a..82e055d40 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RipperDemon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RipperDemon.java @@ -213,7 +213,7 @@ public class RipperDemon extends Mob { leapPos = targetPos; //don't want to overly punish players with slow move or attack speed spend(GameMath.gate(TICK, enemy.cooldown(), 3*TICK)); - if (Dungeon.level.heroFOV[pos]){ + if (Dungeon.level.heroFOV[pos] || Dungeon.level.heroFOV[leapPos]){ GLog.w(Messages.get(RipperDemon.this, "leap")); sprite.parent.addToBack(new TargetedCell(leapPos, 0xFF0000)); ((RipperSprite)sprite).leapPrep( leapPos ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogDzewa.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogDzewa.java index 541657cad..4f54768e1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogDzewa.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogDzewa.java @@ -282,6 +282,8 @@ public class YogDzewa extends Mob { super.damage( dmg, src ); int dmgTaken = preHP - HP; + if (phase == 0 || findFist() != null) return; + abilityCooldown -= dmgTaken/10f; summonCooldown -= dmgTaken/10f; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Viscosity.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Viscosity.java index 50753fbe6..793989ca4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Viscosity.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Viscosity.java @@ -25,8 +25,11 @@ import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor.Glyph; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; @@ -46,6 +49,13 @@ public class Viscosity extends Glyph { //should build in functionality for that, but this works for now int realDamage = damage - defender.drRoll(); + if (attacker instanceof Hero + && ((Hero) attacker).belongings.weapon instanceof MissileWeapon + && ((Hero) attacker).subClass == HeroSubClass.SNIPER + && !Dungeon.level.adjacent(attacker.pos, defender.pos)){ + realDamage = damage; + } + if (realDamage <= 0) { return 0; } diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties index 9aa205f52..bc8ee5664 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties @@ -1566,7 +1566,7 @@ items.weapon.spiritbow.name=spirit bow items.weapon.spiritbow.ac_shoot=SHOOT items.weapon.spiritbow.prompt=Choose a target items.weapon.spiritbow.stats=The bow cannot be directly upgraded, but will instead steadily grow stronger as you level up. At your current level, arrows shot from the bow will deal _%1$d-%2$d damage_ and require _%3$d strength_ to use properly. -items.weapon.spiritbow.desc=A bow made of out ancient magical wood. The bow's string and etchings glow with a pale blue light. When the string is pulled this bow will conjure a magical arrow which can be fired at an enemy. +items.weapon.spiritbow.desc=A bow made out of ancient magical wood. The bow's string and etchings glow with a pale blue light. When the string is pulled this bow will conjure a magical arrow which can be fired at an enemy. items.weapon.weapon.identify=You are now familiar enough with your weapon to identify it. items.weapon.weapon.too_heavy=Because of your inadequate strength this weapon will hinder your attack speed, accuracy, and ability to surprise attack.