v0.6.2: fixed bugs relating to corruption and awarding exp/kills

This commit is contained in:
Evan Debenham
2017-10-24 19:55:56 -04:00
parent 4af0cb4e93
commit a71488f6f5
2 changed files with 12 additions and 7 deletions
@@ -549,7 +549,6 @@ public abstract class Mob extends Char {
Statistics.enemiesSlain++;
Badges.validateMonstersSlain();
Statistics.qualifiedForNoKilling = false;
}
int exp = Dungeon.hero.lvl <= maxLvl ? EXP : 0;
if (exp > 0) {
@@ -558,6 +557,7 @@ public abstract class Mob extends Char {
}
}
}
}
@Override
public void die( Object cause ) {
@@ -22,7 +22,9 @@
package com.shatteredpixel.shatteredpixeldungeon.items.wands;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok;
@@ -209,10 +211,13 @@ public class WandOfCorruption extends Wand {
buff.detach();
}
Buff.affect(enemy, Corruption.class);
Statistics.enemiesSlain++;
Badges.validateMonstersSlain();
Statistics.qualifiedForNoKilling = false;
if (enemy.EXP > 0 && curUser.lvl <= enemy.maxLvl) {
curUser.sprite.showStatus(CharSprite.POSITIVE, Messages.get(enemy, "exp", enemy.EXP));
curUser.earnExp(enemy.EXP);
enemy.EXP = 0;
}
//TODO perhaps enemies should also drop loot here
} else {