From 7e5774906e9da950384eebee4994462802290e74 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 8 Jul 2024 15:38:46 -0400 Subject: [PATCH] v2.5.0: mimic tooth now causes mimics to drop more loot --- core/src/main/assets/messages/items/items.properties | 4 ++-- .../shatteredpixeldungeon/actors/mobs/EbonyMimic.java | 9 ++++----- .../shatteredpixeldungeon/actors/mobs/Mimic.java | 5 +++++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index 7d5d54fe0..2fe4536bb 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -1333,8 +1333,8 @@ items.trinkets.eyeofnewt.stats_desc=At its current level this trinket will reduc items.trinkets.mimictooth.name=mimic tooth items.trinkets.mimictooth.desc=This large sharp tooth must have been pulled from a very unhappy mimic. It seems to be influencing the mimics of the dungeon, making them more frequent and dangerous. -items.trinkets.mimictooth.typical_stats_desc=Typically this trinket will make all kinds of mimic _%1$sx_ more common, will make mimics much more difficult to detect, and will give each floor a _%2$s%%_ chance to contain an ebony mimic. -items.trinkets.mimictooth.stats_desc=At its current level this trinket will make all kinds of mimic _%1$sx_ more common, will make mimics much more difficult to detect, and will give each floor a _%2$s%%_ chance to contain an ebony mimic. +items.trinkets.mimictooth.typical_stats_desc=Typically this trinket will make all kinds of mimic _%1$sx_ more common and much more difficult to detect, but will also increase the amount of loot they drop. Each dungeon floor will also have a _%2$s%%_ chance to contain an extra stealthy ebony mimic. +items.trinkets.mimictooth.stats_desc=At its current level this trinket will make all kinds of mimic _%1$sx_ more common and much more difficult to detect, but will also increase the amount of loot they drop. Each dungeon floor will also have a _%2$s%%_ chance to contain an extra stealthy ebony mimic. items.trinkets.mossyclump.name=mossy clump items.trinkets.mossyclump.desc=This clump of wet moss seems to hold onto its moisture no matter how hard you squeeze it. It seems to be magically tied to the dungeon itself, making grass and water more likely to appear. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/EbonyMimic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/EbonyMimic.java index a53473cb4..72bc2e9e4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/EbonyMimic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/EbonyMimic.java @@ -40,7 +40,6 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.MimicSprite; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.audio.Sample; -import com.watabou.utils.Random; public class EbonyMimic extends Mimic { @@ -103,10 +102,10 @@ public class EbonyMimic extends Mimic { @Override protected void generatePrize( boolean useDecks ) { super.generatePrize( useDecks ); - //add two extra random loot items + //add one extra random loot item, on top of the one granted by mimic tooth items.add(Generator.randomUsingDefaults()); - items.add(Generator.randomUsingDefaults()); - //all existing prize items are guaranteed uncursed, and have a 50% chance to be +1 if they were +0 + + //all existing prize items are guaranteed uncursed, and are always at least +1 for (Item i : items){ if (i instanceof EquipableItem || i instanceof Wand){ i.cursed = false; @@ -117,7 +116,7 @@ public class EbonyMimic extends Mimic { if (i instanceof Armor && ((Armor) i).hasCurseGlyph()){ ((Armor) i).inscribe(null); } - if (!(i instanceof MissileWeapon || i instanceof Artifact) && i.level() == 0 && Random.Int(2) == 0){ + if (!(i instanceof MissileWeapon || i instanceof Artifact) && i.level() == 0){ i.upgrade(); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java index 6c6e86132..06a4c8d01 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java @@ -348,6 +348,11 @@ public class Mimic extends Mob { } } while (reward == null || Challenges.isItemBlocked(reward)); items.add(reward); + + if (MimicTooth.stealthyMimics()){ + //add an extra random item if player has a mimic tooth + items.add(Generator.randomUsingDefaults()); + } } }