v0.7.0: addressed a variety of TODOs

This commit is contained in:
Evan Debenham 2018-07-25 00:00:08 -04:00
parent 66d40e3ace
commit f8dfd11a8d
18 changed files with 50 additions and 42 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -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 );
}

View File

@ -76,7 +76,6 @@ public class Barkskin extends Buff {
}
@Override
//TODO
public String desc() {
return Messages.get(this, "desc", level, dispTurns(cooldown()+1));
}

View File

@ -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;

View File

@ -64,7 +64,6 @@ public class Charm extends FlavourBuff {
}
@Override
//TODO
public String desc() {
return Messages.get(this, "desc", dispTurns());
}

View File

@ -59,7 +59,6 @@ public class Terror extends FlavourBuff {
}
@Override
//TODO
public String desc() {
return Messages.get(this, "desc", dispTurns());
}

View File

@ -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;

View File

@ -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 };

View File

@ -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{

View File

@ -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);
}

View File

@ -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<?extends Scroll>, Class<?extends Runestone>> stones = new HashMap<>();
private static HashMap<Class<?extends Scroll>, Integer> amnts = new HashMap<>();
//TODO add more stones as they are implemented
static {
stones.put(ScrollOfIdentify.class, StoneOfIntuition.class);
amnts.put(ScrollOfIdentify.class, 3);

View File

@ -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();

View File

@ -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 {

View File

@ -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);
}
}

View File

@ -74,7 +74,6 @@ import com.watabou.utils.Random;
import java.util.HashMap;
//TODO final balancing decisions here
public class WandOfCorruption extends Wand {
{

View File

@ -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 );

View File

@ -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

View File

@ -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