v0.6.3: various bugfixes:

- new corruption logic now works with piranha and dwarf tokens
- wand of corruption can now apply to NPCs
- fixed being able to attempt assassination on NPCs
This commit is contained in:
Evan Debenham
2018-01-23 20:02:40 -05:00
parent d09c7e6067
commit 574c0cd29b
5 changed files with 11 additions and 8 deletions
@@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Rat; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Rat;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NPC;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Effects; import com.shatteredpixel.shatteredpixeldungeon.effects.Effects;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
@@ -233,7 +234,7 @@ public class Preparation extends Buff implements ActionIndicator.Action {
public void onSelect(Integer cell) { public void onSelect(Integer cell) {
if (cell == null) return; if (cell == null) return;
final Char enemy = Actor.findChar( cell ); final Char enemy = Actor.findChar( cell );
if (enemy == null || Dungeon.hero.isCharmedBy(enemy)){ if (enemy == null || Dungeon.hero.isCharmedBy(enemy) || enemy instanceof NPC){
GLog.w(Messages.get(Preparation.class, "no_target")); GLog.w(Messages.get(Preparation.class, "no_target"));
} else { } else {
@@ -62,10 +62,10 @@ public class Golem extends Mob {
} }
@Override @Override
public void die( Object cause ) { public void rollToDropLoot() {
Imp.Quest.process( this ); Imp.Quest.process( this );
super.die( cause ); super.rollToDropLoot();
} }
{ {
@@ -74,10 +74,10 @@ public class Monk extends Mob {
} }
@Override @Override
public void die( Object cause ) { public void rollToDropLoot() {
Imp.Quest.process( this ); Imp.Quest.process( this );
super.die( cause ); super.rollToDropLoot();
} }
private int hitsToDisarm = 0; private int hitsToDisarm = 0;
@@ -47,6 +47,9 @@ public class Piranha extends Mob {
EXP = 0; EXP = 0;
loot = MysteryMeat.class;
lootChance = 1f;
HUNTING = new Hunting(); HUNTING = new Hunting();
} }
@@ -86,7 +89,6 @@ public class Piranha extends Mob {
@Override @Override
public void die( Object cause ) { public void die( Object cause ) {
Dungeon.level.drop( new MysteryMeat(), pos ).sprite.drop();
super.die( cause ); super.die( cause );
Statistics.piranhasKilled++; Statistics.piranhasKilled++;
@@ -125,7 +125,7 @@ public class WandOfCorruption extends Wand {
if (ch != null){ if (ch != null){
if (!(ch instanceof Mob) || ch instanceof NPC){ if (!(ch instanceof Mob)){
return; return;
} }