v0.7.0: various fixes:

- searching incrementing hunger while floor is locked
- scrolls of mystical energy not resetting recharge buff
- sheep-ified shopkeepers not losing their stock
- unstable spellbook going to -1 charges
- typo in potion of cleansing desc
This commit is contained in:
Evan Debenham 2018-08-02 19:31:28 -04:00
parent ede9f4ca24
commit 651c02410f
6 changed files with 25 additions and 15 deletions

View File

@ -62,6 +62,10 @@ public class ArtifactRecharge extends Buff {
return true;
}
public void reset(){
left = 30;
}
@Override
public int icon() {
return BuffIndicator.RECHARGING;

View File

@ -1583,12 +1583,14 @@ public class Hero extends Char {
if (intentional) {
sprite.showStatus( CharSprite.DEFAULT, Messages.get(this, "search") );
sprite.operate( pos );
if (!Dungeon.level.locked) {
if (cursed) {
GLog.n(Messages.get(this, "search_distracted"));
buff(Hunger.class).reduceHunger(TIME_TO_SEARCH - (2 * HUNGER_FOR_SEARCH));
} else {
buff(Hunger.class).reduceHunger(TIME_TO_SEARCH - HUNGER_FOR_SEARCH);
}
}
spendAndNext(TIME_TO_SEARCH);
}

View File

@ -62,17 +62,21 @@ public class Shopkeeper extends NPC {
}
public void flee() {
destroy();
sprite.killAndErase();
CellEmitter.get( pos ).burst( ElmoParticle.FACTORY, 6 );
}
@Override
public void destroy() {
super.destroy();
for (Heap heap: Dungeon.level.heaps.values()) {
if (heap.type == Heap.Type.FOR_SALE) {
CellEmitter.get( heap.pos ).burst( ElmoParticle.FACTORY, 4 );
heap.destroy();
}
}
destroy();
sprite.killAndErase();
CellEmitter.get( pos ).burst( ElmoParticle.FACTORY, 6 );
}
@Override

View File

@ -127,8 +127,8 @@ public class UnstableSpellbook extends Artifact {
curItem = scroll;
curUser = hero;
//if this scroll hasn't been given to the book
if (!scrolls.contains(scroll.getClass())) {
//if there are changes left and the scroll has been given to the book
if (charge > 0 && !scrolls.contains(scroll.getClass())) {
final Scroll fScroll = scroll;
GameScene.show(new WndOptions(
Messages.get(this, "prompt"),

View File

@ -39,7 +39,7 @@ public class ScrollOfMysticalEnergy extends ExoticScroll {
public void doRead() {
//append buff
Buff.affect(curUser, ArtifactRecharge.class);
Buff.affect(curUser, ArtifactRecharge.class).reset();
Sample.INSTANCE.play( Assets.SND_READ );
Invisibility.dispel();

View File

@ -322,7 +322,7 @@ items.artifacts.unstablespellbook.unknown_scroll=You're not sure what type of sc
items.artifacts.unstablespellbook.desc=This Tome is in surprising good condition given its age. It fizzes and crackles as you move the pages, surging with unstable energy. If you read from this book, there's no telling what spell you might cast.
items.artifacts.unstablespellbook.desc_cursed=The cursed book has bound itself to you, it is inhibiting your ability to use most scrolls.
items.artifacts.unstablespellbook.desc_index=The book is incomplete. Its index is currently pointing to the following blank pages:
items.artifacts.unstablespellbook.desc_empowered=The scrolls that you've added to the book are glowing with power. Their magic seems stronger than it was before they were placed in the book.
items.artifacts.unstablespellbook.desc_empowered=The scrolls that you've added to the book are glowing with power. You will be able to choose the exotic version of these scroll's effects, but at the cost of an additional charge.
items.artifacts.unstablespellbook.read_empowered=The scroll you added to the spellbook surges with energy. You are able to channel either the regular, or exotic version of this scroll's effect.\n\nChoosing the exotic variant will cost 2 charges instead of 1.
@ -562,7 +562,7 @@ items.potions.exotic.potionofadrenalinesurge.name=potion of adrenaline surge
items.potions.exotic.potionofadrenalinesurge.desc=This powerful liquid will give you a greater boost of strength that withers after an extended period of time.
items.potions.exotic.potionofcleansing.name=potion of cleansing
items.potions.exotic.potionofcleansing.desc=This power reagent will completely neutralize all harmful effects on the drinker when quaffed. It can be thrown at a target to cleanse them as well.
items.potions.exotic.potionofcleansing.desc=This powerful reagent will completely neutralize all harmful effects on the drinker when quaffed. It can be thrown at a target to cleanse them as well.
items.potions.exotic.potionofcorrosivegas.name=potion of corrosive gas
items.potions.exotic.potionofcorrosivegas.desc=Uncorking or shattering this pressurized glass will cause its contents to explode into a deadly cloud of corrosive rust-colored gas. The gas is less concentrated however, and will not last for very long.