v0.8.2: Adjustments to blastwave and knockback effects:

- knockback effects now only close doors if they originate from a melee attack
- wand of blast wave base damage down to 1-3 from 1-5
- damage from knockback collision up to dist-2*dist, from dist/2-dist
- stun from knockback collision adjusted to 1+dist/2, from dist/2-dist
This commit is contained in:
Evan Debenham 2020-08-05 10:48:48 -04:00
parent 0d43ef0635
commit 2c4a880d67
4 changed files with 18 additions and 11 deletions

View File

@ -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();
}

View File

@ -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;

View File

@ -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);

View File

@ -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;