diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewDM300.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewDM300.java index 82febdbff..fb0958d84 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewDM300.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewDM300.java @@ -370,7 +370,7 @@ public class NewDM300 extends Mob { if (Dungeon.level.adjacent(pos, target.pos)){ int oppositeAdjacent = target.pos + (target.pos - pos); Ballistica trajectory = new Ballistica(target.pos, oppositeAdjacent, Ballistica.MAGIC_BOLT); - WandOfBlastWave.throwChar(target, trajectory, 2, false); + WandOfBlastWave.throwChar(target, trajectory, 2, false, false); if (target == Dungeon.hero){ Dungeon.hero.interrupt(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Repulsion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Repulsion.java index 4c1bbbf56..d4a5e2c4d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Repulsion.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Repulsion.java @@ -42,7 +42,7 @@ public class Repulsion extends Armor.Glyph { if (Random.Int( level + 5 ) >= 4){ int oppositeHero = attacker.pos + (attacker.pos - defender.pos); Ballistica trajectory = new Ballistica(attacker.pos, oppositeHero, Ballistica.MAGIC_BOLT); - WandOfBlastWave.throwChar(attacker, trajectory, 2); + WandOfBlastWave.throwChar(attacker, trajectory, 2, true); } return damage; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java index 272091ff7..b6a2658b7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java @@ -61,7 +61,7 @@ public class WandOfBlastWave extends DamageWand { } public int max(int lvl){ - return 5+3*lvl; + return 3+3*lvl; } @Override @@ -87,7 +87,7 @@ public class WandOfBlastWave extends DamageWand { if (ch.isAlive() && ch.pos == bolt.collisionPos + i) { Ballistica trajectory = new Ballistica(ch.pos, ch.pos + i, Ballistica.MAGIC_BOLT); int strength = 1 + Math.round(buffedLvl() / 2f); - throwChar(ch, trajectory, strength); + throwChar(ch, trajectory, strength, false); } else if (ch == Dungeon.hero){ Dungeon.fail( getClass() ); GLog.n( Messages.get( this, "ondeath") ); @@ -104,7 +104,7 @@ public class WandOfBlastWave extends DamageWand { if (ch.isAlive() && bolt.path.size() > bolt.dist+1 && ch.pos == bolt.collisionPos) { Ballistica trajectory = new Ballistica(ch.pos, bolt.path.get(bolt.dist + 1), Ballistica.MAGIC_BOLT); int strength = buffedLvl() + 3; - throwChar(ch, trajectory, strength); + throwChar(ch, trajectory, strength, false); } } @@ -114,7 +114,13 @@ public class WandOfBlastWave extends DamageWand { throwChar(ch, trajectory, power, true); } - public static void throwChar(final Char ch, final Ballistica trajectory, int power, boolean collideDmg){ + public static void throwChar(final Char ch, final Ballistica trajectory, int power, + boolean closeDoors) { + throwChar(ch, trajectory, power, closeDoors, true); + } + + public static void throwChar(final Char ch, final Ballistica trajectory, int power, + boolean closeDoors, boolean collideDmg){ if (ch.properties().contains(Char.Property.BOSS)) { power /= 2; } @@ -161,10 +167,10 @@ public class WandOfBlastWave extends DamageWand { int oldPos = ch.pos; ch.pos = newPos; if (finalCollided && ch.isAlive()) { - ch.damage(Random.NormalIntRange((finalDist + 1) / 2, finalDist), this); - Paralysis.prolong(ch, Paralysis.class, Random.NormalIntRange((finalDist + 1) / 2, finalDist)); + ch.damage(Random.NormalIntRange(finalDist, 2*finalDist), this); + Paralysis.prolong(ch, Paralysis.class, 1 + finalDist/2f); } - if (Dungeon.level.map[oldPos] == Terrain.OPEN_DOOR){ + if (closeDoors && Dungeon.level.map[oldPos] == Terrain.OPEN_DOOR){ Door.leave(oldPos); } Dungeon.level.occupyCell(ch); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Elastic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Elastic.java index 3fb76a31d..e91e76242 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Elastic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Elastic.java @@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.watabou.utils.Random; @@ -39,13 +40,13 @@ public class Elastic extends Weapon.Enchantment { // lvl 2 - 43% int level = Math.max( 0, weapon.buffedLvl() ); - if (Random.Int( level + 5 ) >= 4) { + if (Random.Int( level + 500 ) >= 4) { //trace a ballistica to our target (which will also extend past them Ballistica trajectory = new Ballistica(attacker.pos, defender.pos, Ballistica.STOP_TARGET); //trim it to just be the part that goes past them trajectory = new Ballistica(trajectory.collisionPos, trajectory.path.get(trajectory.path.size()-1), Ballistica.PROJECTILE); //knock them back along that ballistica - WandOfBlastWave.throwChar(defender, trajectory, 2); + WandOfBlastWave.throwChar(defender, trajectory, 2, !(weapon instanceof MissileWeapon)); } return damage;