v0.7.0: bugfixes:

- mirror and prismatic images being able to dodge friendly darts
- friendly darts not working on fading prismatic images
- prismatic images always healing while a floor is locked
This commit is contained in:
Evan Debenham 2018-08-03 17:51:53 -04:00
parent a413691884
commit 405bfeb77c
4 changed files with 7 additions and 6 deletions
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors

View File

@ -178,7 +178,7 @@ public abstract class Char extends Actor {
public boolean attack( Char enemy ) {
if (enemy == null || !enemy.isAlive()) return false;
if (enemy == null) return false;
boolean visibleFight = Dungeon.level.heroFOV[pos] || Dungeon.level.heroFOV[enemy.pos];

View File

@ -85,7 +85,8 @@ public class PrismaticGuard extends Buff {
spend(TICK);
}
if (HP < maxHP()){
LockedFloor lock = target.buff(LockedFloor.class);
if (HP < maxHP() && (lock == null || lock.regenOn())){
HP += 0.1f;
}

View File

@ -43,7 +43,7 @@ public class MirrorImage extends NPC {
spriteClass = MirrorSprite.class;
HP = HT = 1;
defenseSkill = 0;
defenseSkill = 1;
alignment = Alignment.ALLY;
state = HUNTING;
@ -119,7 +119,7 @@ public class MirrorImage extends NPC {
int heroEvasion = hero.defenseSkill(enemy);
//if the hero has more/less evasion, 50% of it is applied
return (baseEvasion + heroEvasion) / 2;
return super.defenseSkill(enemy) * (baseEvasion + heroEvasion) / 2;
} else {
return 0;
}

View File

@ -46,7 +46,7 @@ public class PrismaticImage extends NPC {
spriteClass = PrismaticSprite.class;
HP = HT = 8;
defenseSkill = 0;
defenseSkill = 1;
alignment = Alignment.ALLY;
state = HUNTING;
@ -151,7 +151,7 @@ public class PrismaticImage extends NPC {
int heroEvasion = hero.defenseSkill(enemy);
//if the hero has more/less evasion, 50% of it is applied
return (baseEvasion + heroEvasion) / 2;
return super.defenseSkill(enemy) * (baseEvasion + heroEvasion) / 2;
} else {
return 0;
}