diff --git a/core/src/main/assets/consumable_icons.png b/core/src/main/assets/consumable_icons.png index 901c5c544..f8cf8b1a5 100644 Binary files a/core/src/main/assets/consumable_icons.png and b/core/src/main/assets/consumable_icons.png differ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/SmokeScreen.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/SmokeScreen.java index c4552b510..8208311d2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/SmokeScreen.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/SmokeScreen.java @@ -48,7 +48,6 @@ public class SmokeScreen extends Blob { @Override public void use( BlobEmitter emitter ) { super.use( emitter ); - //TODO finalize VFX emitter.pour( Speck.factory( Speck.SMOKE ), 0.1f ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Barkskin.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Barkskin.java index 3c06db6e6..82cdc735a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Barkskin.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Barkskin.java @@ -76,7 +76,6 @@ public class Barkskin extends Buff { } @Override - //TODO public String desc() { return Messages.get(this, "desc", level, dispTurns(cooldown()+1)); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java index 8730de653..134b21240 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java @@ -39,7 +39,6 @@ public class Buff extends Actor { } //determines how the buff is announced when it is shown. - //FIXME should extend this to more buffs, want silent positive and silent negative? public enum buffType {POSITIVE, NEGATIVE, NEUTRAL}; public buffType type = buffType.NEUTRAL; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Charm.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Charm.java index cc04ce3e3..730dd0fcd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Charm.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Charm.java @@ -64,7 +64,6 @@ public class Charm extends FlavourBuff { } @Override - //TODO public String desc() { return Messages.get(this, "desc", dispTurns()); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java index 2defa2e18..b1724e4a3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java @@ -59,7 +59,6 @@ public class Terror extends FlavourBuff { } @Override - //TODO public String desc() { return Messages.get(this, "desc", dispTurns()); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java index 9a7a10142..b509e6646 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java @@ -40,7 +40,6 @@ import com.watabou.utils.Random; import java.util.ArrayList; -//TODO desc changes public class Succubus extends Mob { private static final int BLINK_DELAY = 5; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java index 6a3f216ce..f17b8c45a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java @@ -87,8 +87,7 @@ public class Armor extends EquipableItem { evasionFactor = eva; defenceFactor = df; } - - //TODO balance on this seems good, but needs testing. + public int evasionFactor(int level){ return Math.round((2 + level) * evasionFactor); } @@ -522,14 +521,8 @@ public class Armor extends EquipableItem { return glyph != null && (cursedKnown || !glyph.curse()) ? glyph.glowing() : null; } - //FIXME need to adjust glyphs given armor augmentation changes public static abstract class Glyph implements Bundlable { - private static final Class[] glyphs = new Class[]{ - Obfuscation.class, Swiftness.class, Viscosity.class, Potential.class, - Brimstone.class, Stone.class, Entanglement.class, Repulsion.class, Camouflage.class, Flow.class, - Affection.class, AntiMagic.class, Thorns.class }; - private static final Class[] common = new Class[]{ Obfuscation.class, Swiftness.class, Viscosity.class, Potential.class }; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/ExoticPotion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/ExoticPotion.java index dbaaeef43..dd922d259 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/ExoticPotion.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/ExoticPotion.java @@ -115,10 +115,15 @@ public class ExoticPotion extends Potion { } } - //TODO @Override + //20 gold more than its none-exotic equivalent public int price() { - return super.price(); + try { + return (exoToReg.get(getClass()).newInstance().price() + 20) * quantity; + } catch (Exception e){ + ShatteredPixelDungeon.reportException(e); + return 0; + } } public static class PotionToExotic extends Recipe{ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfSnapFreeze.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfSnapFreeze.java index cc942ced7..453df561e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfSnapFreeze.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfSnapFreeze.java @@ -57,7 +57,6 @@ public class PotionOfSnapFreeze extends ExoticPotion { Char ch = Actor.findChar( cell + offset); if (ch != null){ - //TODO balancing on this Buff.affect(ch, Roots.class, 10f); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java index fb5b9ace9..53eba9eaf 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java @@ -153,7 +153,7 @@ public abstract class Scroll extends Item { if (action.equals( AC_READ )) { if (hero.buff(MagicImmune.class) != null){ - GLog.w( Messages.get(this, "no_magic") ); //TODO + GLog.w( Messages.get(this, "no_magic") ); } else if (hero.buff( Blindness.class ) != null) { GLog.w( Messages.get(this, "blinded") ); } else if (hero.buff(UnstableSpellbook.bookRecharge.class) != null @@ -250,7 +250,6 @@ public abstract class Scroll extends Item { private static HashMap, Class> stones = new HashMap<>(); private static HashMap, Integer> amnts = new HashMap<>(); - //TODO add more stones as they are implemented static { stones.put(ScrollOfIdentify.class, StoneOfIntuition.class); amnts.put(ScrollOfIdentify.class, 3); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java index a85b53221..b95e8fce4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java @@ -27,8 +27,10 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.effects.Flare; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle; +import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; +import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -39,7 +41,7 @@ public class ScrollOfRemoveCurse extends InventoryScroll { { initials = 7; - mode = WndBag.Mode.UNIDED_OR_CURSED; + mode = WndBag.Mode.UNCURSABLE; } @Override @@ -104,6 +106,18 @@ public class ScrollOfRemoveCurse extends InventoryScroll { return procced; } + public static boolean uncursable( Item item ){ + if ((item instanceof EquipableItem || item instanceof Wand) && (!item.isIdentified() || item.cursed)){ + return true; + } else if (item instanceof Weapon){ + return ((Weapon)item).hasCurseEnchant(); + } else if (item instanceof Armor){ + return ((Armor)item).hasCurseGlyph(); + } else { + return false; + } + } + @Override public int price() { return isKnown() ? 30 * quantity : super.price(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ExoticScroll.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ExoticScroll.java index 7176cb48f..8f5b80817 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ExoticScroll.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ExoticScroll.java @@ -117,10 +117,15 @@ public abstract class ExoticScroll extends Scroll { } - //TODO @Override + //20 gold more than its none-exotic equivalent public int price() { - return super.price(); + try { + return (exoToReg.get(getClass()).newInstance().price() + 20) * quantity; + } catch (Exception e){ + ShatteredPixelDungeon.reportException(e); + return 0; + } } public static class ScrollToExotic extends Recipe { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfDetectCurse.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfDetectCurse.java index f807db50f..f9cb5db68 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfDetectCurse.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfDetectCurse.java @@ -21,7 +21,9 @@ package com.shatteredpixel.shatteredpixeldungeon.items.stones; +import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem; import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -30,7 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag; public class StoneOfDetectCurse extends InventoryStone { { - mode = WndBag.Mode.EQUIPMENT; + mode = WndBag.Mode.CURSE_DETECTABLE; image = ItemSpriteSheet.STONE_ODAL; } @@ -46,4 +48,10 @@ public class StoneOfDetectCurse extends InventoryStone { GLog.w( Messages.get(this, "not_cursed") ); } } + + public static boolean canDetectCurse(Item item){ + return !item.isIdentified() + && !item.cursedKnown + && (item instanceof EquipableItem || item instanceof Wand); + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java index 8fdac4eb9..a8ea8db2f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java @@ -74,7 +74,6 @@ import com.watabou.utils.Random; import java.util.HashMap; -//TODO final balancing decisions here public class WandOfCorruption extends Wand { { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java index 26b3e31fa..116dcfe10 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java @@ -39,9 +39,10 @@ import com.shatteredpixel.shatteredpixeldungeon.items.bags.VelvetPouch; import com.shatteredpixel.shatteredpixeldungeon.items.food.Food; import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTransmutation; +import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfDetectCurse; import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; -import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.Boomerang; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; @@ -67,7 +68,7 @@ public class WndBag extends WndTabbed { public static enum Mode { ALL, UNIDENTIFED, - UNIDED_OR_CURSED, + UNCURSABLE, UPGRADEABLE, QUICKSLOT, FOR_SALE, @@ -80,6 +81,7 @@ public class WndBag extends WndTabbed { POTION, SCROLL, UNIDED_POTION_OR_SCROLL, + CURSE_DETECTABLE, EQUIPMENT, TRANMSUTABLE, ALCHEMY @@ -391,7 +393,7 @@ public class WndBag extends WndTabbed { mode == Mode.FOR_SALE && !item.unique && (item.price() > 0) && (!item.isEquipped( Dungeon.hero ) || !item.cursed) || mode == Mode.UPGRADEABLE && item.isUpgradable() || mode == Mode.UNIDENTIFED && !item.isIdentified() || - mode == Mode.UNIDED_OR_CURSED && ((item instanceof EquipableItem || item instanceof Wand) && (!item.isIdentified() || item.cursed)) || + mode == Mode.UNCURSABLE && ScrollOfRemoveCurse.uncursable(item) || mode == Mode.QUICKSLOT && (item.defaultAction != null) || mode == Mode.WEAPON && (item instanceof MeleeWeapon || item instanceof Boomerang) || mode == Mode.ARMOR && (item instanceof Armor) || @@ -402,22 +404,12 @@ public class WndBag extends WndTabbed { mode == Mode.POTION && (item instanceof Potion) || mode == Mode.SCROLL && (item instanceof Scroll) || mode == Mode.UNIDED_POTION_OR_SCROLL && (!item.isIdentified() && (item instanceof Scroll || item instanceof Potion)) || + mode == Mode.CURSE_DETECTABLE && StoneOfDetectCurse.canDetectCurse(item) || mode == Mode.EQUIPMENT && (item instanceof EquipableItem) || mode == Mode.ALCHEMY && Recipe.usableInRecipe(item) || mode == Mode.TRANMSUTABLE && ScrollOfTransmutation.canTransmute(item) || mode == Mode.ALL ); - //extra logic for cursed weapons or armor - if (!active && mode == Mode.UNIDED_OR_CURSED){ - if (item instanceof Weapon){ - Weapon w = (Weapon) item; - enable(w.hasCurseEnchant()); - } - if (item instanceof Armor){ - Armor a = (Armor) item; - enable(a.hasCurseGlyph()); - } - } } } else { bg.color( NORMAL ); diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties index 4ba7b5391..65a312480 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties @@ -87,7 +87,7 @@ actors.buffs.burning.desc=Few things are more distressing than being engulfed in actors.buffs.charm.name=Charmed actors.buffs.charm.heromsg=You are charmed! -actors.buffs.charm.desc=A charm is manipulative magic that can make enemies temporarily adore eachother.\n\nCharacters affected by charm are unable to directly attack the enemy they are charmed by. Attacking other targets is still possible however.\n\nTurns of charm remaining: %s. +actors.buffs.charm.desc=A charm is manipulative magic that can make enemies temporarily adore eachother.\n\nCharacters affected by charm are unable to directly attack the enemy they are charmed by. Attacking other targets is still possible however. The shock of pain will lessen the duration of charm.\n\nTurns of charm remaining: %s. actors.buffs.chill.name=Chilled actors.buffs.chill.freezes=%s freezes! @@ -240,7 +240,7 @@ actors.buffs.stamina.name=Stamina actors.buffs.stamina.desc=You have unending stamina, allowing for faster movement!\n\nWhile under the effects of stamina you will run at +50%% speed, but will perform all other actions at normal speed.\n\nTurns of stamina remaining: %s. actors.buffs.terror.name=Terrified -actors.buffs.terror.desc=Terror is manipulative magic which forces its target into an uncontrollable panic.\n\nTerrified characters are forced to run away from their opponent, trying to put as many doors and walls between them as possible. The shock of pain is enough to break this effect, however.\n\nTurns of terror remaining: %s. +actors.buffs.terror.desc=Terror is manipulative magic which forces its target into an uncontrollable panic.\n\nTerrified characters are forced to run away from their opponent, trying to put as many doors and walls between them as possible. The shock of pain will lessen the duration of terror, however.\n\nTurns of terror remaining: %s. actors.buffs.toxicimbue.name=Imbued with Toxicity actors.buffs.toxicimbue.desc=You are imbued with poisonous energy!\n\nAs you move around toxic gas will constantly billow forth from you, damaging your enemies. You are immune to toxic gas and poison for the duration of the effect.\n\nTurns of toxic imbue remaining: %s. @@ -536,7 +536,7 @@ actors.mobs.statue.name=animated statue actors.mobs.statue.desc=You would think that it's just another one of this dungeon's ugly statues, but its red glowing eyes give it away.\n\nWhile the statue itself is made of stone, the _%s,_ it's wielding, looks real. actors.mobs.succubus.name=succubus -actors.mobs.succubus.desc=The succubi are demons that look like seductive (in a slightly gothic way) girls. Using its magic, the succubus can charm a hero, who will become unable to attack anything until the charm wears off. +actors.mobs.succubus.desc=The succubi are demons that look like seductive (in a slightly gothic way) girls. Using its magic, the succubus can charm a hero, who will become unable to attack anything until the charm wears off. When succubi attack a charmed hero, they will steal their life essence. actors.mobs.swarm.name=swarm of flies actors.mobs.swarm.def_verb=evaded 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 620257239..56aa654cb 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 @@ -753,7 +753,7 @@ items.scrolls.scrollofterror.name=scroll of terror items.scrolls.scrollofterror.none=The scroll emits a brilliant flash of red light. items.scrolls.scrollofterror.one=The scroll emits a brilliant flash of red light and the %s flees! items.scrolls.scrollofterror.many=The scroll emits a brilliant flash of red light and the monsters flee! -items.scrolls.scrollofterror.desc=A flash of red light will overwhelm all creatures in your field of view with terror, and they will turn and flee. Attacking a fleeing enemy will dispel the effect. +items.scrolls.scrollofterror.desc=A flash of red light will overwhelm all creatures in your field of view with terror, and they will turn and flee. Attacking a fleeing enemy will shorten the effect. items.scrolls.scrolloftransmutation.name=scroll of transmutation items.scrolls.scrolloftransmutation.inv_title=Transmute an item