v0.7.0: various bugfixes and improvements:

- adjusted 'snapped out of paralysis' message, should be better for translators
- mob names are now capitalized when they yell something
- scroll of enchantment window now cannot be tapped out of, and warns that cancel still uses the scroll

bugfixes:
- fixed transmuting with a full inventory destroying the result item
- stone of intuition now works correctly on exotic items
- fixed wand of corruption no longer applying debuffs to corrupted/doomed enemies
- fixed incorrect alchemical energy when two alchemy pots are in the same floor
- fixed issues when using two swiftthistle together
- fixed a visual bug with secret doors and chasms
This commit is contained in:
Evan Debenham 2018-08-25 23:37:09 -04:00
parent b1af13231e
commit d837b75f5f
12 changed files with 68 additions and 31 deletions

View File

@ -26,7 +26,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.utils.Bundle;
import com.watabou.utils.Random;
@ -57,10 +56,10 @@ public class Paralysis extends FlavourBuff {
}
resist.damage += damage;
if (Random.NormalIntRange(0, resist.damage) >= Random.NormalIntRange(0, target.HP)){
detach();
if (Dungeon.level.heroFOV[target.pos]) {
GLog.i( Messages.get(this, "out", target.name) );
target.sprite.showStatus(CharSprite.NEUTRAL, Messages.get(this, "out"));
}
detach();
}
}

View File

@ -674,7 +674,7 @@ public abstract class Mob extends Char {
}
public void yell( String str ) {
GLog.n( "%s: \"%s\" ", name, str );
GLog.n( "%s: \"%s\" ", Messages.titleCase(name), str );
}
//returns true when a mob sees the hero, and is currently targeting them.

View File

@ -29,8 +29,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMight;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.ExoticPotion;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ExoticScroll;
@ -96,7 +94,9 @@ public class ScrollOfTransmutation extends InventoryScroll {
((EquipableItem)result).doEquip(Dungeon.hero);
} else {
item.detach(Dungeon.hero.belongings.backpack);
result.collect();
if (!result.collect()){
Dungeon.level.drop(result, curUser.pos).sprite.drop();
}
}
if (result.isIdentified()){
Catalog.setSeen(result.getClass());

View File

@ -60,7 +60,9 @@ public class ScrollOfEnchantment extends ExoticScroll {
enchants[2] = Weapon.Enchantment.random( existing, enchants[0].getClass(), enchants[1].getClass());
GameScene.show(new WndOptions(Messages.titleCase(ScrollOfEnchantment.this.name()),
Messages.get(ScrollOfEnchantment.class, "weapon"),
Messages.get(ScrollOfEnchantment.class, "weapon") +
"\n\n" +
Messages.get(ScrollOfEnchantment.class, "cancel_warn"),
enchants[0].name(),
enchants[1].name(),
enchants[2].name(),
@ -78,6 +80,11 @@ public class ScrollOfEnchantment extends ExoticScroll {
Enchanting.show(curUser, item);
}
}
@Override
public void onBackPressed() {
//do nothing, reader has to cancel
}
});
} else if (item instanceof Armor) {
@ -90,7 +97,9 @@ public class ScrollOfEnchantment extends ExoticScroll {
glyphs[2] = Armor.Glyph.random( existing, glyphs[0].getClass(), glyphs[1].getClass());
GameScene.show(new WndOptions(Messages.titleCase(ScrollOfEnchantment.this.name()),
Messages.get(ScrollOfEnchantment.class, "armor"),
Messages.get(ScrollOfEnchantment.class, "armor") +
"\n\n" +
Messages.get(ScrollOfEnchantment.class, "cancel_warn"),
glyphs[0].name(),
glyphs[1].name(),
glyphs[2].name(),
@ -108,6 +117,11 @@ public class ScrollOfEnchantment extends ExoticScroll {
Enchanting.show(curUser, item);
}
}
@Override
public void onBackPressed() {
//do nothing, reader has to cancel
}
});
} else {
//TODO if this can ever be found un-IDed, need logic for that

View File

@ -38,6 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfParalyticG
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfPurity;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfToxicGas;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.ExoticPotion;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfLullaby;
@ -52,6 +53,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportat
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTerror;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTransmutation;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ExoticScroll;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
@ -167,15 +169,42 @@ public class StoneOfIntuition extends InventoryStone {
HashSet<Class<?extends Item>> unIDed = new HashSet<>();
final Class[] all;
final int row;
if (item.isIdentified()){
hide();
return;
} else if (item instanceof Potion){
unIDed.addAll(Potion.getUnknown());
all = potions;
all = potions.clone();
if (item instanceof ExoticPotion){
row = 8;
for (int i = 0; i < all.length; i++){
all[i] = ExoticPotion.regToExo.get(all[i]);
}
HashSet<Class<?extends Item>> exoUID = new HashSet<>();
for (Class<?extends Item> i : unIDed){
exoUID.add(ExoticPotion.regToExo.get(i));
}
unIDed = exoUID;
} else {
row = 0;
}
} else if (item instanceof Scroll){
unIDed.addAll(Scroll.getUnknown());
all = scrolls;
all = scrolls.clone();
if (item instanceof ExoticScroll){
row = 24;
for (int i = 0; i < all.length; i++){
all[i] = ExoticScroll.regToExo.get(all[i]);
}
HashSet<Class<?extends Item>> exoUID = new HashSet<>();
for (Class<?extends Item> i : unIDed){
exoUID.add(ExoticScroll.regToExo.get(i));
}
unIDed = exoUID;
} else {
row = 16;
}
} else {
hide();
return;
@ -206,7 +235,7 @@ public class StoneOfIntuition extends InventoryStone {
super.onClick();
}
};
Image im = new Image(Assets.CONS_ICONS, 7*i, all == potions ? 0 : 16, 7, 8);
Image im = new Image(Assets.CONS_ICONS, 7*i, row, 7, 8);
im.scale.set(2f);
btn.icon(im);
btn.setRect(left + placed*BTN_SIZE, top, BTN_SIZE, BTN_SIZE);

View File

@ -161,7 +161,7 @@ public class WandOfCorruption extends Wand {
//cannot re-corrupt or doom an enemy, so give them a major debuff instead
if(enemy.buff(Corruption.class) != null || enemy.buff(Doom.class) != null){
enemyResist = corruptingPower*.99f;
corruptingPower = enemyResist - 0.001f;
}
if (corruptingPower > enemyResist){

View File

@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.secret;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Alchemy;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfFrost;
@ -70,9 +71,7 @@ public class SecretLaboratoryRoom extends SecretRoom {
Point pot = center();
Painter.set( level, pot, Terrain.ALCHEMY );
Alchemy alchemy = new Alchemy();
alchemy.seed( level, pot.x + level.width() * pot.y, 1+Random.NormalIntRange(20, 30) );
level.blobs.put( Alchemy.class, alchemy );
Blob.seed( pot.x + level.width() * pot.y, 1+Random.NormalIntRange(20, 30), Alchemy.class, level );
int n = Random.IntRange( 2, 3 );
HashMap<Class<? extends Potion>, Float> chances = new HashMap<>(potionChances);

View File

@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Alchemy;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.journal.AlchemyPage;
@ -60,10 +61,8 @@ public class LaboratoryRoom extends SpecialRoom {
}
Painter.set( level, pot, Terrain.ALCHEMY );
Alchemy alchemy = new Alchemy();
int chapter = 1 + Dungeon.depth/5;
alchemy.seed( level, pot.x + level.width() * pot.y, 1 + chapter*10 + Random.NormalIntRange(0, 10) );
level.blobs.put( Alchemy.class, alchemy );
Blob.seed( pot.x + level.width() * pot.y, 1 + chapter*10 + Random.NormalIntRange(0, 10), Alchemy.class, level );
int n = Random.NormalIntRange( 2, 3 );
for (int i=0; i < n; i++) {

View File

@ -42,7 +42,7 @@ public class Swiftthistle extends Plant {
public void activate() {
Char ch = Actor.findChar(pos);
if (ch == Dungeon.hero) {
Buff.affect(ch, TimeBubble.class);
Buff.affect(ch, TimeBubble.class).reset();
}
}
@ -56,7 +56,7 @@ public class Swiftthistle extends Plant {
public static class TimeBubble extends Buff {
private float left = 6f;
private float left;
private int pos;
{
@ -74,14 +74,9 @@ public class Swiftthistle extends Plant {
if (left < 4) FlavourBuff.greyIcon(icon, 4f, left);
}
@Override
public boolean attachTo(Char target) {
if (super.attachTo(target)){
pos = target.pos;
return true;
} else {
return false;
}
public void reset(){
pos = target.pos;
left = 6f;
}
public void processTime( float time ){

View File

@ -144,6 +144,7 @@ public class DungeonTileSheet {
chasmStitcheable.put( Terrain.DOOR, CHASM_WALL );
chasmStitcheable.put( Terrain.OPEN_DOOR, CHASM_WALL );
chasmStitcheable.put( Terrain.LOCKED_DOOR, CHASM_WALL );
chasmStitcheable.put( Terrain.SECRET_DOOR, CHASM_WALL );
chasmStitcheable.put( Terrain.WALL_DECO, CHASM_WALL );
//water

View File

@ -202,8 +202,8 @@ actors.buffs.ooze.desc=This sticky acid clings to flesh, slowly melting it away.
actors.buffs.paralysis.name=Paralysed
actors.buffs.paralysis.heromsg=You are paralysed!
actors.buffs.paralysis.out=The pain snaps %s out of paralysis.
actors.buffs.paralysis.desc=Oftentimes the worst thing to do is nothing at all.\n\nParalysis completely halts all actions, forcing the target to wait until the effect wears off. The pain from taking damage can also cause characters to snap out of paralysis.\n\nTurns of paralysis remaining: %s.
actors.buffs.paralysis.out=resisted paralysis
actors.buffs.paralysis.desc=Oftentimes the worst thing to do is nothing at all.\n\nParalysis completely halts all actions, forcing the target to wait until the effect wears off. The pain from taking damage can cause characters to resist paralysis, breaking them out of the effect.\n\nTurns of paralysis remaining: %s.
actors.buffs.poison.name=Poisoned
actors.buffs.poison.heromsg=You are poisoned!

View File

@ -855,6 +855,7 @@ items.scrolls.exotic.scrollofenchantment.name=scroll of enchantment
items.scrolls.exotic.scrollofenchantment.inv_title=Enchant an item
items.scrolls.exotic.scrollofenchantment.weapon=Select an enchantment to apply to your weapon.
items.scrolls.exotic.scrollofenchantment.armor=Select a glyph to apply to your armor.
items.scrolls.exotic.scrollofenchantment.cancel_warn=Cancelling with still consume the scroll.
items.scrolls.exotic.scrollofenchantment.cancel=cancel
items.scrolls.exotic.scrollofenchantment.desc=This scroll will infuse a weapon or armor with powerful magical energy. The reader even has some degree of control over which magic is imbued.