v0.8.2: Fixed various smaller issues:
- Bees refusing to retarget when target is invulnerable - Potion splashes cleaning fire/ooze from enemies - Blast wave attempting to throw enemies that move after being damaged - Corrupting enchant attempting to corrupt dead enemies - Magic missile charge buff not visually applying to the mage's staff - Specific cases where using an item wouldn't cancel the current cell selector - Large enemies rarely appearing in enclosed spaces due to levelgen - Lotus vfx persisting after the sprite is destroyed in rare case
This commit is contained in:
parent
0b568f5a58
commit
3dae7bf2cf
|
@ -149,7 +149,8 @@ public class Bee extends Mob {
|
|||
//try to find a new enemy in these circumstances
|
||||
if (enemy == null || !enemy.isAlive() || !Actor.chars().contains(enemy) || state == WANDERING
|
||||
|| Dungeon.level.distance(enemy.pos, potPos) > 3
|
||||
|| (alignment == Alignment.ALLY && enemy.alignment == Alignment.ALLY)){
|
||||
|| (alignment == Alignment.ALLY && enemy.alignment == Alignment.ALLY)
|
||||
|| (buff( Amok.class ) == null && enemy.isInvulnerable(getClass()))){
|
||||
|
||||
//find all mobs near the pot
|
||||
HashSet<Char> enemies = new HashSet<>();
|
||||
|
|
|
@ -130,7 +130,8 @@ public class Item implements Bundlable {
|
|||
}
|
||||
|
||||
public void execute( Hero hero, String action ) {
|
||||
|
||||
|
||||
GameScene.cancel();
|
||||
curUser = hero;
|
||||
curItem = this;
|
||||
|
||||
|
|
|
@ -416,7 +416,7 @@ public class Potion extends Item {
|
|||
final int color = splashColor();
|
||||
|
||||
Char ch = Actor.findChar(cell);
|
||||
if (ch != null) {
|
||||
if (ch != null && ch.alignment == Char.Alignment.ALLY) {
|
||||
Buff.detach(ch, Burning.class);
|
||||
Buff.detach(ch, Ooze.class);
|
||||
Splash.at( ch.sprite.center(), color, 5 );
|
||||
|
|
|
@ -84,7 +84,7 @@ public class WandOfBlastWave extends DamageWand {
|
|||
processSoulMark(ch, chargesPerCast());
|
||||
if (ch.alignment != Char.Alignment.ALLY) ch.damage(damageRoll(), this);
|
||||
|
||||
if (ch.isAlive()) {
|
||||
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);
|
||||
|
@ -101,7 +101,7 @@ public class WandOfBlastWave extends DamageWand {
|
|||
processSoulMark(ch, chargesPerCast());
|
||||
ch.damage(damageRoll(), this);
|
||||
|
||||
if (ch.isAlive() && bolt.path.size() > bolt.dist+1) {
|
||||
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);
|
||||
|
|
|
@ -43,16 +43,17 @@ public class Corrupting extends Weapon.Enchantment {
|
|||
|
||||
@Override
|
||||
public int proc(Weapon weapon, Char attacker, Char defender, int damage) {
|
||||
if (defender.buff(Corruption.class) != null || !(defender instanceof Mob)) return damage;
|
||||
|
||||
int level = Math.max( 0, weapon.buffedLvl() );
|
||||
|
||||
// lvl 0 - 20%
|
||||
// lvl 1 ~ 23%
|
||||
// lvl 2 ~ 26%
|
||||
if (damage >= defender.HP
|
||||
&& Random.Int( level + 25 ) >= 20
|
||||
&& !defender.isImmune(Corruption.class)
|
||||
&& Random.Int( level + 25 ) >= 20){
|
||||
&& defender.buff(Corruption.class) == null
|
||||
&& defender instanceof Mob
|
||||
&& defender.isAlive()){
|
||||
|
||||
Mob enemy = (Mob) defender;
|
||||
Hero hero = (attacker instanceof Hero) ? (Hero) attacker : Dungeon.hero;
|
||||
|
|
|
@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
|
||||
|
@ -36,6 +37,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfCorrosion;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfCorruption;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfDisintegration;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfLivingEarth;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfMagicMissile;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfRegrowth;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
|
@ -134,6 +136,18 @@ public class MagesStaff extends MeleeWeapon {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int buffedLvl() {
|
||||
int lvl = super.buffedLvl();
|
||||
if (curUser != null && !(wand instanceof WandOfMagicMissile)) {
|
||||
WandOfMagicMissile.MagicCharge buff = curUser.buff(WandOfMagicMissile.MagicCharge.class);
|
||||
if (buff != null && buff.level() > lvl){
|
||||
return buff.level();
|
||||
}
|
||||
}
|
||||
return lvl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int proc(Char attacker, Char defender, int damage) {
|
||||
if (wand != null &&
|
||||
|
|
|
@ -195,7 +195,8 @@ public abstract class RegularLevel extends Level {
|
|||
do {
|
||||
mob.pos = pointToCell(roomToSpawn.random());
|
||||
tries--;
|
||||
} while (tries >= 0 && (findMob(mob.pos) != null || !passable[mob.pos] || mob.pos == exit));
|
||||
} while (tries >= 0 && (findMob(mob.pos) != null || !passable[mob.pos] || mob.pos == exit
|
||||
|| (!openSpace[mob.pos] && mob.properties().contains(Char.Property.LARGE))));
|
||||
|
||||
if (tries >= 0) {
|
||||
mobsToSpawn--;
|
||||
|
@ -209,7 +210,8 @@ public abstract class RegularLevel extends Level {
|
|||
do {
|
||||
mob.pos = pointToCell(roomToSpawn.random());
|
||||
tries--;
|
||||
} while (tries >= 0 && findMob(mob.pos) != null || !passable[mob.pos] || mob.pos == exit);
|
||||
} while (tries >= 0 && findMob(mob.pos) != null || !passable[mob.pos] || mob.pos == exit
|
||||
|| (!openSpace[mob.pos] && mob.properties().contains(Char.Property.LARGE)));
|
||||
|
||||
if (tries >= 0) {
|
||||
mobsToSpawn--;
|
||||
|
|
|
@ -1025,7 +1025,7 @@ public class GameScene extends PixelScene {
|
|||
return wnd;
|
||||
}
|
||||
|
||||
static boolean cancel() {
|
||||
public static boolean cancel() {
|
||||
if (Dungeon.hero != null && (Dungeon.hero.curAction != null || Dungeon.hero.resting)) {
|
||||
|
||||
Dungeon.hero.curAction = null;
|
||||
|
|
|
@ -108,4 +108,16 @@ public class LotusSprite extends MobSprite {
|
|||
grassVfx = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void kill() {
|
||||
super.kill();
|
||||
|
||||
if (grassVfx != null){
|
||||
for (Emitter e : grassVfx){
|
||||
e.on = false;
|
||||
}
|
||||
grassVfx = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user