v0.9.1: fixed various corruption issues, including:

- Mimics not dropping their loot if instantly corrupted
- Corrupted mobs being constantly alerted
- Attempting to corrupt immune mobs leading to a tracked kill
This commit is contained in:
Evan Debenham 2020-11-06 16:27:42 -05:00
parent fc319ad420
commit 39dea55d00
2 changed files with 15 additions and 14 deletions

View File

@ -627,7 +627,7 @@ public abstract class Mob extends Char {
if (state == SLEEPING) {
state = WANDERING;
}
if (state != HUNTING) {
if (state != HUNTING && !(src instanceof Corruption)) {
alerted = true;
}

View File

@ -231,12 +231,12 @@ public class WandOfCorruption extends Wand {
buff.detach();
}
}
if (enemy.alignment == Char.Alignment.ENEMY){
enemy.rollToDropLoot();
}
boolean droppingLoot = enemy.alignment != Char.Alignment.ALLY;
Buff.affect(enemy, Corruption.class);
if (enemy.buff(Corruption.class) != null){
if (droppingLoot) enemy.rollToDropLoot();
Statistics.enemiesSlain++;
Badges.validateMonstersSlain();
Statistics.qualifiedForNoKilling = false;
@ -246,6 +246,7 @@ public class WandOfCorruption extends Wand {
} else {
curUser.earnExp(0, enemy.getClass());
}
}
} else {
Buff.affect(enemy, Doom.class);
}