v0.6.3: ally mobs can no longer dodge attacks from the hero

This commit is contained in:
Evan Debenham 2018-02-13 16:39:27 -05:00
parent 2e20a30e82
commit 8514176cd8
2 changed files with 5 additions and 3 deletions

View File

@ -466,7 +466,9 @@ public abstract class Mob extends Char {
@Override @Override
public int defenseSkill( Char enemy ) { public int defenseSkill( Char enemy ) {
boolean seen = enemySeen || (enemy == Dungeon.hero && !Dungeon.hero.canSurpriseAttack()); boolean seen = enemySeen || (enemy == Dungeon.hero && !Dungeon.hero.canSurpriseAttack());
if (seen && paralysed == 0) { if ( seen
&& paralysed == 0
&& !(alignment == Alignment.ALLY && enemy == Dungeon.hero)) {
int defenseSkill = this.defenseSkill; int defenseSkill = this.defenseSkill;
defenseSkill *= RingOfAccuracy.enemyEvasionMultiplier( enemy ); defenseSkill *= RingOfAccuracy.enemyEvasionMultiplier( enemy );
return defenseSkill; return defenseSkill;

View File

@ -566,7 +566,7 @@ public class DriedRose extends Artifact {
public int defenseSkill(Char enemy) { public int defenseSkill(Char enemy) {
int defense = super.defenseSkill(enemy); int defense = super.defenseSkill(enemy);
if (rose != null && rose.armor != null && rose.armor.hasGlyph(Swiftness.class)){ if (defense != 0 && rose != null && rose.armor != null && rose.armor.hasGlyph(Swiftness.class)){
defense += 5 + rose.armor.level()*1.5f; defense += 5 + rose.armor.level()*1.5f;
} }