diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index ce5e08231..6f4cdfc7e 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -1415,6 +1415,11 @@ items.trinkets.eyeofnewt.desc=This golden and black newt's eye is a common ingre items.trinkets.eyeofnewt.typical_stats_desc=Typically this trinket will reduce your vision range by _%1$s%%_, but will also grant you mind vision on enemies within _%2$d_ tiles. items.trinkets.eyeofnewt.stats_desc=At its current level this trinket will reduce your vision range by _%1$s%%_, but will also grant you mind vision on enemies within _%2$d_ tiles. +items.trinkets.ferrettuft.name=ferret tuft +items.trinkets.ferrettuft.desc=A tuft of silky white ferret fur, held together by a lime green ribbon tied into a bow. Ferrets are known for their agility, mischievousness, and lack of integrity. Some of that power seems to radiate from the trinket, enhancing the evasion of anything nearby. +items.trinkets.ferrettuft.typical_stats_desc=Typically this trinket will increase the evasion of all characters by _%1$d%%_. +items.trinkets.ferrettuft.stats_desc=At its current level this trinket will increase the evasion of all characters by _%1$d%%_. + 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 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. diff --git a/core/src/main/assets/sprites/items.png b/core/src/main/assets/sprites/items.png index 147a1516f..6a9bb3af3 100644 Binary files a/core/src/main/assets/sprites/items.png and b/core/src/main/assets/sprites/items.png differ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index a5a10c223..6885851f9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -120,6 +120,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportat import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfChallenge; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPsionicBlast; import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAggression; +import com.shatteredpixel.shatteredpixeldungeon.items.trinkets.FerretTuft; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFireblast; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFrost; @@ -662,6 +663,7 @@ public abstract class Char extends Actor { // + 3%/5% defRoll *= 1.01f + 0.02f*Dungeon.hero.pointsInTalent(Talent.BLESS); } + defRoll *= FerretTuft.evasionMultiplier(); return (acuRoll * accMulti) >= defRoll; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java index a61db1a36..da5cf0e70 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java @@ -113,6 +113,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.trinkets.ChaoticCenser; import com.shatteredpixel.shatteredpixeldungeon.items.trinkets.DimensionalSundial; import com.shatteredpixel.shatteredpixeldungeon.items.trinkets.ExoticCrystals; import com.shatteredpixel.shatteredpixeldungeon.items.trinkets.EyeOfNewt; +import com.shatteredpixel.shatteredpixeldungeon.items.trinkets.FerretTuft; import com.shatteredpixel.shatteredpixeldungeon.items.trinkets.MimicTooth; import com.shatteredpixel.shatteredpixeldungeon.items.trinkets.MossyClump; import com.shatteredpixel.shatteredpixeldungeon.items.trinkets.ParchmentScrap; @@ -588,9 +589,10 @@ public class Generator { SaltCube.class, VialOfBlood.class, ShardOfOblivion.class, - ChaoticCenser.class + ChaoticCenser.class, + FerretTuft.class }; - TRINKET.defaultProbs = new float[]{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + TRINKET.defaultProbs = new float[]{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; TRINKET.probs = TRINKET.defaultProbs.clone(); for (Category cat : Category.values()){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/trinkets/FerretTuft.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/trinkets/FerretTuft.java new file mode 100644 index 000000000..79e6db054 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/trinkets/FerretTuft.java @@ -0,0 +1,60 @@ +/* + * Pixel Dungeon + * Copyright (C) 2012-2015 Oleg Dolya + * + * Shattered Pixel Dungeon + * Copyright (C) 2014-2025 Evan Debenham + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + */ + +package com.shatteredpixel.shatteredpixeldungeon.items.trinkets; + +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; + +public class FerretTuft extends Trinket { + + { + image = ItemSpriteSheet.FERRET_TUFT; + } + + @Override + protected int upgradeEnergyCost() { + //6 -> 8(14) -> 10(24) -> 12(36) + return 6+2*level(); + } + + @Override + public String statsDesc() { + if (isIdentified()){ + return Messages.get(this, "stats_desc", Math.round(100 * (evasionMultiplier(buffedLvl())-1f))); + } else { + return Messages.get(this, "typical_stats_desc", Math.round(100 * (evasionMultiplier(0)-1f))); + } + } + + public static float evasionMultiplier(){ + return evasionMultiplier(trinketLevel(FerretTuft.class)); + } + + public static float evasionMultiplier(int level ){ + if (level <= -1){ + return 1; + } else { + return 1 + 0.1f*(level+1); + } + } + +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java index 57e00a425..0e7c383c8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java @@ -498,6 +498,7 @@ public class ItemSpriteSheet { public static final int BLOOD_VIAL = TRINKETS+12; public static final int OBLIVION_SHARD = TRINKETS+13; public static final int CHAOTIC_CENSER = TRINKETS+14; + public static final int FERRET_TUFT = TRINKETS+15; static{ assignItemRect(RAT_SKULL, 16, 11); assignItemRect(PARCHMENT_SCRAP, 10, 14); @@ -514,6 +515,7 @@ public class ItemSpriteSheet { assignItemRect(BLOOD_VIAL, 6, 15); assignItemRect(OBLIVION_SHARD, 7, 14); assignItemRect(CHAOTIC_CENSER, 13, 15); + assignItemRect(FERRET_TUFT, 16, 15); } private static final int SCROLLS = xy(1, 19); //16 slots