diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/Ratmogrify.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/Ratmogrify.java index 9d544656e..76a5f22c7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/Ratmogrify.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/Ratmogrify.java @@ -40,6 +40,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.MasterThievesArmband; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation; +import com.shatteredpixel.shatteredpixeldungeon.journal.Bestiary; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.RatSprite; @@ -266,6 +267,8 @@ public class Ratmogrify extends ArmorAbility { allied = true; alignment = Alignment.ALLY; timeLeft = Float.POSITIVE_INFINITY; + Bestiary.setSeen(original.getClass()); + Bestiary.countEncounter(original.getClass()); } public int attackSkill(Char target) { @@ -296,6 +299,15 @@ public class Ratmogrify extends ArmorAbility { original.rollToDropLoot(); } + @Override + public void destroy() { + super.destroy(); + if (alignment == Alignment.ENEMY) { + Bestiary.setSeen(original.getClass()); + Bestiary.countEncounter(original.getClass()); + } + } + @Override public String name() { return Messages.get(this, "name", original.name());