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:
@@ -178,7 +178,7 @@ public abstract class Char extends Actor {
|
|||||||
|
|
||||||
public boolean attack( Char enemy ) {
|
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];
|
boolean visibleFight = Dungeon.level.heroFOV[pos] || Dungeon.level.heroFOV[enemy.pos];
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -85,7 +85,8 @@ public class PrismaticGuard extends Buff {
|
|||||||
spend(TICK);
|
spend(TICK);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HP < maxHP()){
|
LockedFloor lock = target.buff(LockedFloor.class);
|
||||||
|
if (HP < maxHP() && (lock == null || lock.regenOn())){
|
||||||
HP += 0.1f;
|
HP += 0.1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -43,7 +43,7 @@ public class MirrorImage extends NPC {
|
|||||||
spriteClass = MirrorSprite.class;
|
spriteClass = MirrorSprite.class;
|
||||||
|
|
||||||
HP = HT = 1;
|
HP = HT = 1;
|
||||||
defenseSkill = 0;
|
defenseSkill = 1;
|
||||||
|
|
||||||
alignment = Alignment.ALLY;
|
alignment = Alignment.ALLY;
|
||||||
state = HUNTING;
|
state = HUNTING;
|
||||||
@@ -119,7 +119,7 @@ public class MirrorImage extends NPC {
|
|||||||
int heroEvasion = hero.defenseSkill(enemy);
|
int heroEvasion = hero.defenseSkill(enemy);
|
||||||
|
|
||||||
//if the hero has more/less evasion, 50% of it is applied
|
//if the hero has more/less evasion, 50% of it is applied
|
||||||
return (baseEvasion + heroEvasion) / 2;
|
return super.defenseSkill(enemy) * (baseEvasion + heroEvasion) / 2;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -46,7 +46,7 @@ public class PrismaticImage extends NPC {
|
|||||||
spriteClass = PrismaticSprite.class;
|
spriteClass = PrismaticSprite.class;
|
||||||
|
|
||||||
HP = HT = 8;
|
HP = HT = 8;
|
||||||
defenseSkill = 0;
|
defenseSkill = 1;
|
||||||
|
|
||||||
alignment = Alignment.ALLY;
|
alignment = Alignment.ALLY;
|
||||||
state = HUNTING;
|
state = HUNTING;
|
||||||
@@ -151,7 +151,7 @@ public class PrismaticImage extends NPC {
|
|||||||
int heroEvasion = hero.defenseSkill(enemy);
|
int heroEvasion = hero.defenseSkill(enemy);
|
||||||
|
|
||||||
//if the hero has more/less evasion, 50% of it is applied
|
//if the hero has more/less evasion, 50% of it is applied
|
||||||
return (baseEvasion + heroEvasion) / 2;
|
return super.defenseSkill(enemy) * (baseEvasion + heroEvasion) / 2;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user