diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java index 03bde5034..4e3c8c07f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java @@ -66,7 +66,7 @@ public class CloakOfShadows extends Artifact { @Override public ArrayList actions( Hero hero ) { ArrayList actions = super.actions( hero ); - if (isEquipped( hero ) && charge > 1) + if (isEquipped( hero ) && !cursed && charge > 1) actions.add(AC_STEALTH); return actions; } @@ -80,6 +80,7 @@ public class CloakOfShadows extends Artifact { if (!stealthed){ if (!isEquipped(hero)) GLog.i( Messages.get(Artifact.class, "need_to_equip") ); + else if (cursed) GLog.i( Messages.get(this, "cursed") ); else if (charge <= 0) GLog.i( Messages.get(this, "no_charge") ); else { stealthed = true; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java index b06bd2e1b..183286e0a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java @@ -55,15 +55,23 @@ public class MasterThievesArmband extends Artifact { public String desc() { String desc = super.desc(); - if ( isEquipped (Dungeon.hero) ) - desc += "\n\n" + Messages.get(this, "desc_worn"); + if ( isEquipped (Dungeon.hero) ){ + if (cursed){ + desc += "\n\n" + Messages.get(this, "desc_cursed"); + } else { + desc += "\n\n" + Messages.get(this, "desc_worn"); + } + } + return desc; } public class Thievery extends ArtifactBuff{ public void collect(int gold){ - charge += gold/2; + if (!cursed) { + charge += gold/2; + } } @Override @@ -71,7 +79,22 @@ public class MasterThievesArmband extends Artifact { charge *= 0.95; super.detach(); } - + + @Override + public boolean act() { + if (cursed) { + + if (Dungeon.gold > 0 && Random.Int(6) == 0){ + Dungeon.gold--; + } + + spend(TICK); + return true; + } else { + return super.act(); + } + } + public boolean steal(int value){ if (value <= charge){ charge -= value; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTradeItem.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTradeItem.java index 55f6ca74f..52bff896b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTradeItem.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTradeItem.java @@ -137,7 +137,7 @@ public class WndTradeItem extends Window { }; final MasterThievesArmband.Thievery thievery = Dungeon.hero.buff(MasterThievesArmband.Thievery.class); - if (thievery != null) { + if (thievery != null && !thievery.isCursed()) { final float chance = thievery.stealChance(price); RedButton btnSteal = new RedButton( Messages.get(this, "steal", Math.min(100, (int)(chance*100)))) { @Override diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties index 0c5fcd584..97a5eaa54 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties @@ -176,6 +176,7 @@ items.artifacts.chaliceofblood.desc_3=The chalice is filled to the brim with you items.artifacts.cloakofshadows.name=cloak of shadows items.artifacts.cloakofshadows.ac_stealth=STEALTH items.artifacts.cloakofshadows.cooldown=Your cloak needs %d more rounds to re-energize. +items.artifacts.cloakofshadows.cursed=You cannot use a cursed cloak. items.artifacts.cloakofshadows.no_charge=Your cloak hasn't recharged enough to be usable yet. items.artifacts.cloakofshadows.desc=A priceless magical cloak, stolen from the royal armory many years ago by the Rogue. When worn, it can be used to turn completely invisible for a short time.\n\nThe more the cloak is used, the stronger it will become, allowing the Rogue to become invisible more frequently and for longer durations. items.artifacts.cloakofshadows$cloakstealth.no_charge=Your cloak has run out of energy. @@ -261,6 +262,7 @@ items.artifacts.lloydsbeacon.desc_set=This beacon was set somewhere on the level items.artifacts.masterthievesarmband.name=master thieves' armband items.artifacts.masterthievesarmband.desc=This purple velvet armband bears the mark of a master thief. This doesn't belong to you, but it probably didn't belong to its last user either. +items.artifacts.masterthievesarmband.desc_cursed=The cursed armband is bound to your wrist, and somehow your pouch of gold seems to be slowly getting lighter... items.artifacts.masterthievesarmband.desc_worn=With the armband around your wrist, every piece of gold you find makes you desire other people's property more. Perhaps it wouldn't be too hard to steal from a shop... items.artifacts.sandalsofnature.name=sandals of nature