v0.7.0: added 2 new elixirs, 1 new brew, 2 new bombs.

one of the new elixirs is the old potion of might!
also adjusted balance on healing and holy bombs
This commit is contained in:
Evan Debenham 2018-09-06 21:08:45 -04:00
parent 1bbab016ac
commit fd4b0cf4ea
20 changed files with 446 additions and 55 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -139,6 +139,9 @@ public class ShatteredPixelDungeon extends Game {
com.watabou.utils.Bundle.addAlias(
com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution.class,
"com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfPsionicBlast" );
com.watabou.utils.Bundle.addAlias(
com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfMight.class,
"com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMight" );
}
@Override

View File

@ -31,11 +31,9 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Generator.Category;
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.rings.Ring;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicalInfusion;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
@ -210,7 +208,7 @@ public class WaterOfTransmutation extends WellWater {
}
private Scroll changeScroll( Scroll s ) {
if (s instanceof ScrollOfUpgrade || s instanceof ScrollOfMagicalInfusion) {
if (s instanceof ScrollOfUpgrade) {
return null;
@ -225,7 +223,7 @@ public class WaterOfTransmutation extends WellWater {
}
private Potion changePotion( Potion p ) {
if (p instanceof PotionOfStrength || p instanceof PotionOfMight) {
if (p instanceof PotionOfStrength) {
return null;

View File

@ -35,7 +35,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Brimstone;
import com.shatteredpixel.shatteredpixeldungeon.items.food.ChargrilledMeat;
import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicalInfusion;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
@ -106,7 +105,7 @@ public class Burning extends Buff implements Hero.Doom {
ArrayList<Item> burnable = new ArrayList<>();
//does not reach inside of containers
for (Item i : hero.belongings.backpack.items){
if ((i instanceof Scroll && !(i instanceof ScrollOfUpgrade || i instanceof ScrollOfMagicalInfusion))
if ((i instanceof Scroll && !(i instanceof ScrollOfUpgrade))
|| i instanceof MysteryMeat){
burnable.add(i);
}
@ -135,7 +134,7 @@ public class Burning extends Buff implements Hero.Doom {
Item item = ((Thief) target).item;
if (item instanceof Scroll &&
!(item instanceof ScrollOfUpgrade || item instanceof ScrollOfMagicalInfusion)) {
!(item instanceof ScrollOfUpgrade)) {
target.sprite.emitter().burst( ElmoParticle.FACTORY, 6 );
((Thief)target).item = null;
} else if (item instanceof MysteryMeat) {

View File

@ -29,7 +29,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.food.FrozenCarpaccio;
import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat;
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.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
@ -62,7 +61,7 @@ public class Frost extends FlavourBuff {
ArrayList<Item> freezable = new ArrayList<>();
//does not reach inside of containers
for (Item i : hero.belongings.backpack.items){
if ((i instanceof Potion && !(i instanceof PotionOfStrength || i instanceof PotionOfMight))
if ((i instanceof Potion && !(i instanceof PotionOfStrength))
|| i instanceof MysteryMeat){
freezable.add(i);
}
@ -85,7 +84,7 @@ public class Frost extends FlavourBuff {
Item item = ((Thief) target).item;
if (item instanceof Potion && !(item instanceof PotionOfStrength || item instanceof PotionOfMight)) {
if (item instanceof Potion && !(item instanceof PotionOfStrength)) {
((Potion) ((Thief) target).item).shatter(target.pos);
((Thief) target).item = null;
} else if (item instanceof MysteryMeat){

View File

@ -79,7 +79,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey;
import com.shatteredpixel.shatteredpixeldungeon.items.keys.Key;
import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey;
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.rings.RingOfEvasion;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfForce;
@ -89,7 +88,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfMight;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfTenacity;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicalInfusion;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Flail;
@ -718,8 +716,8 @@ public class Hero extends Char {
} else {
boolean important =
((item instanceof ScrollOfUpgrade || item instanceof ScrollOfMagicalInfusion) && ((Scroll)item).isKnown()) ||
((item instanceof PotionOfStrength || item instanceof PotionOfMight) && ((Potion)item).isKnown());
(item instanceof ScrollOfUpgrade && ((Scroll)item).isKnown()) ||
(item instanceof PotionOfStrength && ((Potion)item).isKnown());
if (important) {
GLog.p( Messages.get(this, "you_now_have", item.name()) );
} else {

View File

@ -43,11 +43,9 @@ import com.shatteredpixel.shatteredpixeldungeon.items.food.FrozenCarpaccio;
import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat;
import com.shatteredpixel.shatteredpixeldungeon.items.journal.DocumentPage;
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.rings.RingOfWealth;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicalInfusion;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
@ -237,7 +235,7 @@ public class Heap implements Bundlable {
for (Item item : items.toArray( new Item[0] )) {
if (item instanceof Scroll
&& !(item instanceof ScrollOfUpgrade || item instanceof ScrollOfMagicalInfusion)) {
&& !(item instanceof ScrollOfUpgrade)) {
items.remove( item );
burnt = true;
} else if (item instanceof Dewdrop) {
@ -335,8 +333,7 @@ public class Heap implements Bundlable {
if (item instanceof MysteryMeat) {
replace( item, FrozenCarpaccio.cook( (MysteryMeat)item ) );
frozen = true;
} else if (item instanceof Potion
&& !(item instanceof PotionOfStrength || item instanceof PotionOfMight)) {
} else if (item instanceof Potion && !(item instanceof PotionOfStrength)) {
items.remove(item);
((Potion) item).shatter(pos);
frozen = true;

View File

@ -29,14 +29,17 @@ import com.shatteredpixel.shatteredpixeldungeon.items.food.Feast;
import com.shatteredpixel.shatteredpixeldungeon.items.food.StewedMeat;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.brews.BlizzardBrew;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.brews.CausticBrew;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.brews.FrigidBrew;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.brews.FrostfireBrew;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.brews.InfernalBrew;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.brews.ShockingBrew;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.brews.WickedBrew;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfAquaticRejuvenation;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfDragonsBlood;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfEarthenPower;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfHoneyedHealing;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfMight;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfRestoration;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfToxicEssence;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfVitality;
@ -144,6 +147,7 @@ public abstract class Recipe {
private static Recipe[] oneIngredientRecipes = new Recipe[]{
new AlchemistsToolkit.upgradeKit(),
new Scroll.ScrollToStone(),
new ElixirOfMight.Recipe(),
new StewedMeat.oneMeat()
};
@ -151,18 +155,20 @@ public abstract class Recipe {
new Blandfruit.CookFruit(),
new TippedDart.TipDart(),
new Bomb.EnhanceBomb(),
new ElixirOfAquaticRejuvenation.Recipe(),
new ElixirOfDragonsBlood.Recipe(),
new ElixirOfEarthenPower.Recipe(),
new ElixirOfToxicEssence.Recipe(),
new ElixirOfHoneyedHealing.Recipe(),
new ElixirOfRestoration.Recipe(),
new ElixirOfToxicEssence.Recipe(),
new ElixirOfVitality.Recipe(),
new BlizzardBrew.Recipe(),
new CausticBrew.Recipe(),
new FrigidBrew.Recipe(),
new FrostfireBrew.Recipe(),
new WickedBrew.Recipe(),
new BlizzardBrew.Recipe(),
new InfernalBrew.Recipe(),
new ShockingBrew.Recipe(),
new WickedBrew.Recipe(),
new StewedMeat.twoMeat()
};

View File

@ -0,0 +1,82 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2015 Oleg Dolya
*
* Shattered Pixel Dungeon
* Copyright (C) 2014-2018 Evan Debenham
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.shatteredpixel.shatteredpixeldungeon.items.bombs;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.GooWarn;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.PathFinder;
import com.watabou.utils.Random;
public class ArcaneBomb extends Bomb {
{
//TODO visuals
image = ItemSpriteSheet.ARCANE_BOMB;
}
@Override
protected void onThrow(int cell) {
super.onThrow(cell);
if (fuse != null){
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), 2 );
for (int i = 0; i < PathFinder.distance.length; i++) {
if (PathFinder.distance[i] < Integer.MAX_VALUE)
GameScene.add(Blob.seed(i, 3, GooWarn.class));
}
}
}
@Override
public void explode(int cell) {
//We're blowing up, so no need for a fuse anymore.
this.fuse = null;
Sample.INSTANCE.play( Assets.SND_BURNING );
//no regular explosion damage
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), 2 );
for (int i = 0; i < PathFinder.distance.length; i++) {
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
if (Dungeon.level.heroFOV[i]) {
CellEmitter.get(i).burst(ElmoParticle.FACTORY, 10);
}
Char ch = Actor.findChar(i);
if (ch != null){
//1.5x regular bomb damage
int damage = Math.round(Random.NormalIntRange( Dungeon.depth+5, 10 + Dungeon.depth * 2 ) * 1.5f);
ch.damage(damage, this);
}
}
}
}
}

View File

@ -38,6 +38,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfFrost;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfInvisibility;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.GooBlob;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.MetalShard;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMirrorImage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
@ -303,22 +305,30 @@ public class Bomb extends Item {
validIngredients.put(PotionOfFrost.class, FrostBomb.class);
validIngredients.put(PotionOfHealing.class, HealingBomb.class);
validIngredients.put(PotionOfInvisibility.class, Flashbang.class);
validIngredients.put(ScrollOfRecharging.class, ShockBomb.class);
validIngredients.put(ScrollOfRemoveCurse.class, HolyBomb.class);
validIngredients.put(ScrollOfMirrorImage.class, WoollyBomb.class);
validIngredients.put(ScrollOfRage.class, Noisemaker.class);
validIngredients.put(GooBlob.class, ArcaneBomb.class);
validIngredients.put(MetalShard.class, ShrapnelBomb.class);
}
private static final HashMap<Class<?extends Bomb>, Integer> bombCosts = new HashMap<>();
static {
bombCosts.put(Firebomb.class, 2);
bombCosts.put(FrostBomb.class, 1);
bombCosts.put(HealingBomb.class, 5);
bombCosts.put(HealingBomb.class, 4);
bombCosts.put(Flashbang.class, 3);
bombCosts.put(ShockBomb.class, 3);
bombCosts.put(HolyBomb.class, 5);
bombCosts.put(HolyBomb.class, 4);
bombCosts.put(WoollyBomb.class, 1);
bombCosts.put(Noisemaker.class, 2);
bombCosts.put(ArcaneBomb.class, 6);
bombCosts.put(ShrapnelBomb.class, 6);
}
@Override

View File

@ -59,7 +59,10 @@ public class HolyBomb extends Bomb {
Buff.prolong(n, Blindness.class, 1f);
if (n.properties().contains(Char.Property.UNDEAD) || n.properties().contains(Char.Property.DEMONIC)){
n.sprite.emitter().start( ShadowParticle.UP, 0.05f, 10 );
n.damage(Random.NormalIntRange( Dungeon.depth+5, 10 + Dungeon.depth * 2 ), this);
//bomb deals an additional 67% damage to unholy enemies in a 5x5 range
int damage = Math.round(Random.NormalIntRange( Dungeon.depth+5, 10 + Dungeon.depth * 2 ) * 0.67f);
n.damage(damage, this);
}
}
}

View File

@ -0,0 +1,73 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2015 Oleg Dolya
*
* Shattered Pixel Dungeon
* Copyright (C) 2014-2018 Evan Debenham
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.shatteredpixel.shatteredpixeldungeon.items.bombs;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.BlastParticle;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.ShadowCaster;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Point;
import com.watabou.utils.Random;
public class ShrapnelBomb extends Bomb {
{
//TODO visuals
image = ItemSpriteSheet.SHRAPNEL_BOMB;
}
@Override
public void explode(int cell) {
//We're blowing up, so no need for a fuse anymore.
this.fuse = null;
Sample.INSTANCE.play( Assets.SND_BURNING );
//no regular explosion damage
boolean[] FOV = new boolean[Dungeon.level.length()];
Point c = Dungeon.level.cellToPoint(cell);
ShadowCaster.castShadow(c.x, c.y, FOV, 8);
for (int i = 0; i < FOV.length; i++) {
if (FOV[i]) {
if (Dungeon.level.heroFOV[i] && !Dungeon.level.solid[i]) {
//TODO better vfx?
CellEmitter.center( i ).burst( BlastParticle.FACTORY, 5 );
}
Char ch = Actor.findChar(i);
if (ch != null){
//regular bomb damage
int damage = Math.round(Random.NormalIntRange( Dungeon.depth+5, 10 + Dungeon.depth * 2 ));
damage -= ch.drRoll();
ch.damage(damage, this);
}
}
}
}
}

View File

@ -0,0 +1,68 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2015 Oleg Dolya
*
* Shattered Pixel Dungeon
* Copyright (C) 2014-2018 Evan Debenham
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.shatteredpixel.shatteredpixeldungeon.items.potions.brews;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
import com.shatteredpixel.shatteredpixeldungeon.effects.Splash;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfToxicGas;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.GooBlob;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.watabou.utils.PathFinder;
public class CausticBrew extends Brew {
{
//TODO finish visuals
image = ItemSpriteSheet.BREW_CAUSTIC;
}
@Override
public void shatter(int cell) {
for (int offset : PathFinder.NEIGHBOURS9){
Splash.at( cell + offset, 0x000000, 5);
Char ch = Actor.findChar(cell + offset);
if (ch != null){
Buff.affect(ch, Ooze.class);
}
}
}
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
{
inputs = new Class[]{PotionOfToxicGas.class, GooBlob.class};
inQuantity = new int[]{1, 1};
cost = 5;
output = CausticBrew.class;
outQuantity = 1;
}
}
}

View File

@ -0,0 +1,131 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2015 Oleg Dolya
*
* Shattered Pixel Dungeon
* Copyright (C) 2014-2018 Evan Debenham
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.GooBlob;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.watabou.noosa.Image;
import com.watabou.utils.Bundle;
public class ElixirOfAquaticRejuvenation extends Elixir {
{
//TODO finish visuals
image = ItemSpriteSheet.ELIXIR_AQUA;
}
@Override
public void apply(Hero hero) {
Buff.affect(hero, AquaHealing.class).set(hero.HT * 2);
}
public static class AquaHealing extends Buff {
{
type = buffType.POSITIVE;
announced = true;
}
private int left;
public void set( int amount ){
if (amount > left) left = amount;
}
@Override
public boolean act() {
if (Dungeon.level.water[target.pos] && target.HP < target.HT){
target.HP++;
target.sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 );
}
if (left-- <= 0){
detach();
} else {
spend(TICK);
if (left <= target.HT/4f){
BuffIndicator.refreshHero();
}
}
return true;
}
@Override
public int icon() {
return BuffIndicator.HEALING;
}
@Override
public void tintIcon(Image icon) {
FlavourBuff.greyIcon(icon, target.HT/4f, left);
}
@Override
public String toString() {
return Messages.get(this, "name");
}
@Override
public String desc() {
return Messages.get(this, "desc", left+1);
}
private static final String LEFT = "left";
@Override
public void storeInBundle( Bundle bundle ) {
super.storeInBundle( bundle );
bundle.put( LEFT, left );
}
@Override
public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle( bundle );
left = bundle.getInt( LEFT );
}
}
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
{
inputs = new Class[]{PotionOfHealing.class, GooBlob.class};
inQuantity = new int[]{1, 1};
cost = 3;
output = ElixirOfAquaticRejuvenation.class;
outQuantity = 1;
}
}
}

View File

@ -19,22 +19,20 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.shatteredpixel.shatteredpixeldungeon.items.potions;
package com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs;
import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
public class PotionOfMight extends Potion {
//TODO finish transitioning this item
public class ElixirOfMight extends Elixir {
{
initials = 12;
image = ItemSpriteSheet.POTION_AMBER;
image = ItemSpriteSheet.ELIXIR_MIGHT;
}
@Override
@ -51,12 +49,21 @@ public class PotionOfMight extends Potion {
}
@Override
public boolean isKnown() {
return true;
public int price() {
return 100 * quantity;
}
@Override
public int price() {
return isKnown() ? 100 * quantity : super.price();
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
{
inputs = new Class[]{PotionOfStrength.class};
inQuantity = new int[]{1};
cost = 12;
output = ElixirOfMight.class;
outQuantity = 1;
}
}
}

View File

@ -34,10 +34,9 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
public class ScrollOfMagicalInfusion extends InventoryScroll {
//TODO decide what to do with this one
//TODO transition to a spell
{
initials = 12;
mode = WndBag.Mode.ENCHANTABLE;
image = ItemSpriteSheet.SCROLL_ISAZ;
}

View File

@ -32,7 +32,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfInvisibility;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLevitation;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMight;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMindVision;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfParalyticGas;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfPurity;
@ -43,7 +42,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfLullaby;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicalInfusion;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMirrorImage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
@ -98,8 +96,7 @@ public class StoneOfIntuition extends InventoryStone {
PotionOfParalyticGas.class,
PotionOfPurity.class,
PotionOfStrength.class,
PotionOfToxicGas.class,
PotionOfMight.class
PotionOfToxicGas.class
};
public static Class[] scrolls = new Class[]{
@ -114,8 +111,7 @@ public class StoneOfIntuition extends InventoryStone {
ScrollOfTeleportation.class,
ScrollOfTerror.class,
ScrollOfTransmutation.class,
ScrollOfUpgrade.class,
ScrollOfMagicalInfusion.class
ScrollOfUpgrade.class
};
static Class curGuess = null;

View File

@ -142,6 +142,8 @@ public class ItemSpriteSheet {
public static final int HOLY_BOMB = BOMBS+7;
public static final int WOOLY_BOMB = BOMBS+8;
public static final int NOISEMAKER = BOMBS+9;
public static final int ARCANE_BOMB = BOMBS+10;
public static final int SHRAPNEL_BOMB = BOMBS+11;
static{
assignItemRect(BOMB, 10, 13);
@ -154,6 +156,8 @@ public class ItemSpriteSheet {
assignItemRect(HOLY_BOMB, 10, 13);
assignItemRect(WOOLY_BOMB, 10, 13);
assignItemRect(NOISEMAKER, 10, 13);
assignItemRect(ARCANE_BOMB, 10, 13);
assignItemRect(SHRAPNEL_BOMB, 10, 13);
}
@ -519,7 +523,8 @@ public class ItemSpriteSheet {
public static final int ELIXIR_DRAGON = ELIXIRS+0;
public static final int ELIXIR_TOXIC = ELIXIRS+1;
public static final int ELIXIR_EARTH = ELIXIRS+2;
public static final int ELIXIR_MIGHT = ELIXIRS+3;
public static final int ELIXIR_AQUA = ELIXIRS+4;
public static final int ELIXIR_RESTO = ELIXIRS+5;
public static final int ELIXIR_SURGE = ELIXIRS+6;
public static final int ELIXIR_HONEY = ELIXIRS+7;
@ -527,7 +532,8 @@ public class ItemSpriteSheet {
assignItemRect(ELIXIR_DRAGON, 10, 14);
assignItemRect(ELIXIR_TOXIC, 10, 14);
assignItemRect(ELIXIR_EARTH, 10, 14);
assignItemRect(ELIXIR_MIGHT, 10, 14);
assignItemRect(ELIXIR_AQUA, 10, 14);
assignItemRect(ELIXIR_RESTO, 10, 14);
assignItemRect(ELIXIR_SURGE, 10, 14);
assignItemRect(ELIXIR_HONEY, 10, 14);
@ -538,6 +544,7 @@ public class ItemSpriteSheet {
public static final int BREW_FRIGID = BREWS+1;
public static final int BREW_FROSTFIRE= BREWS+2;
public static final int BREW_CAUSTIC = BREWS+4;
public static final int BREW_INFERNAL = BREWS+5;
public static final int BREW_BLIZZARD = BREWS+6;
public static final int BREW_SHOCKING = BREWS+7;
@ -546,6 +553,7 @@ public class ItemSpriteSheet {
assignItemRect(BREW_FRIGID, 10, 14);
assignItemRect(BREW_FROSTFIRE, 10, 14);
assignItemRect(BREW_CAUSTIC, 10, 14);
assignItemRect(BREW_INFERNAL, 10, 14);
assignItemRect(BREW_BLIZZARD, 10, 14);
assignItemRect(BREW_SHOCKING, 10, 14);

View File

@ -351,6 +351,9 @@ items.bags.magicalholster.desc=This slim holster is made from some exotic animal
###bombs
items.bombs.arcanebomb.name=arcane bomb
items.bombs.arcanebomb.desc=This bomb has been imbued with arcane properties, and will explode into a powerful blast similar to Goo's pumped up attack.
items.bombs.bomb.name=bomb
items.bombs.bomb.ac_lightthrow=LIGHT & THROW
items.bombs.bomb.snuff_fuse=You quickly snuff the bomb's fuse.
@ -383,6 +386,9 @@ items.bombs.noisemaker.desc=This customized bomb will repeatedly make noise inst
items.bombs.shockbomb.name=shock bomb
items.bombs.shockbomb.desc=This bomb has been modified to unleash a storm of electricity around it when it explodes.
items.bombs.shrapnelbomb.name=shrapnel bomb
items.bombs.shrapnelbomb.desc=This bomb has been modified with scraps of DM-300's metal, which will fragment and fly everywhere when it explodes. You had better hide behind something when using it...
items.bombs.woollybomb.name=woolly bomb
items.bombs.woollybomb.desc=This customized bomb will create a field of magical sheep instead of exploding. These sheep will block movement and persist for some time.
@ -531,11 +537,6 @@ items.potions.potionoflevitation.desc=Drinking this curious liquid will cause yo
items.potions.potionofliquidflame.name=potion of liquid flame
items.potions.potionofliquidflame.desc=This flask contains an unstable compound which will burst violently into flame upon exposure to open air.
items.potions.potionofmight.name=potion of might
items.potions.potionofmight.msg_1=+1 str, +5 hp
items.potions.potionofmight.msg_2=Newfound strength surges through your body.
items.potions.potionofmight.desc=This powerful liquid will course through your muscles, permanently increasing your strength by one point and health by five points.
items.potions.potionofmindvision.name=potion of mind vision
items.potions.potionofmindvision.see_mobs=You can somehow feel the presence of other creatures' minds!
items.potions.potionofmindvision.see_none=You can somehow tell that you are alone on this level at the moment.
@ -560,6 +561,9 @@ items.potions.potionoftoxicgas.desc=Uncorking or shattering this pressurized gla
###brews
items.potions.brews.causticbrew.name=caustic brew
items.potions.brews.causticbrew.desc=This brew will spread corrosive ooze around the location it shatters in. Anything caught by the ooze will slowly melt if it can't wash it off in water.
items.potions.brews.blizzardbrew.name=blizzard brew
items.potions.brews.blizzardbrew.desc=When shattered, this brew will unleash a swirling blizzard which spreads like a gas.
@ -581,6 +585,11 @@ items.potions.brews.wickedbrew.desc=This brew combines the properties of a toxic
###elixirs
items.potions.elixirs.elixirofaquaticrejuvenation.name=elixir of aquatic rejuvenation
items.potions.elixirs.elixirofaquaticrejuvenation.desc=This elixir contains the remains of goo enhanced with a healing potion. While it will not provide immediate healing, it will slowly restore your health while you are standing in water.
items.potions.elixirs.elixirofaquaticrejuvenation$aquahealing.name=Aquatic Healing
items.potions.elixirs.elixirofaquaticrejuvenation$aquahealing.desc=You have temporarily gained restorative properties similar to that of Goo.\n\nWhile standing in water, you will recover a single point of health per turn.\n\nturns left: %d.
items.potions.elixirs.elixirofdragonsblood.name=elixir of dragon's blood
items.potions.elixirs.elixirofdragonsblood.desc=When consumed, this elixir will send fiery power coursing through the drinker's veins. This effect will make the drinker immune to fire, and allow them to set enemies aflame with physical attacks.
@ -590,6 +599,11 @@ items.potions.elixirs.elixirofearthenpower.desc=When consumed, this elixir will
items.potions.elixirs.elixirofhoneyedhealing.name=elixir of honeyed healing
items.potions.elixirs.elixirofhoneyedhealing.desc=This elixir combines healing with the sweetness of honey. When drank, it will satisfy a small amount of hunger, but it can also be thrown to heal an ally.\n\nCreatures with an affinity for honey might be pacified if this item is used on them.
items.potions.elixirs.elixirofmight.name=elixir of might
items.potions.elixirs.elixirofmight.msg_1=+1 str, +5 hp
items.potions.elixirs.elixirofmight.msg_2=Newfound strength surges through your body.
items.potions.elixirs.elixirofmight.desc=This powerful liquid will course through your muscles, permanently increasing your strength by one point and health by five points.
items.potions.elixirs.elixirofrestoration.name=elixir of restoration
items.potions.elixirs.elixirofrestoration.desc=This elixir combines the properties of a healing and cleansing potion. When consumed, the drinker will start to rapidly heal, and will be cleansed of all negative effects.

View File

@ -34,15 +34,15 @@ journal.document.alchemy_guide.energy.body=While the recipes we have discussed s
journal.document.alchemy_guide.food.title=Food Recipes
journal.document.alchemy_guide.food.body=Not all recipes involve magical potions or scrolls, some are more traditional.\n\nRaw meat can be stewed in an alchemy pot, and the pot's energy will cleanse the meat of disease. The more meat that is used at once, the greater the efficiency of the recipe.\n\nA raw blandfruit can be combined with a seed to create a cooked blandfruit. The cooked fruit will emulate whatever potion the seed corresponds to.\n\nA pasty, full ration, and a piece of meat (any type will do) can be combined to create a feast! Feasts provide an unparalleled culinary experience, but cost a fair amount of energy.
journal.document.alchemy_guide.bombs.title=Enhanced Bombs
journal.document.alchemy_guide.bombs.body=A standard black powder bomb can be mixed with a specific item to create an enhanced bomb. The amount of energy needed varies by the item used.\n\nThe following items can produce an enhanced bomb:\n- Potion of Liquid Flame\n- Potion of Frost\n- Potion of Healing\n- Potion of Invisibility\n- Scroll of Recharging\n- Scroll of Remove Curse\n- Scroll of Mirror Image\n- Scroll of Rage
journal.document.alchemy_guide.bombs.body=A standard black powder bomb can be mixed with a specific item to create an enhanced bomb. The amount of energy needed varies by the item used.\n\nThe following items can produce an enhanced bomb:\n- Potion of Liquid Flame\n- Potion of Frost\n- Potion of Healing\n- Potion of Invisibility\n- Scroll of Recharging\n- Scroll of Remove Curse\n- Scroll of Mirror Image\n- Scroll of Rage\n- Blob of Goo\n- Cursed Metal Shard
journal.document.alchemy_guide.combo_brews.title=Combination Brews
journal.document.alchemy_guide.combo_brews.body=Combination brews are the most simple form of brew, combining the effects of two harmful potions into one.\n\nA wicked brew is created by mixing a potion of toxic gas with a potion of paralytic gas.\n\nA frigid brew is created by mixing a potion of frost with a potion of storm clouds.\n\nA frostfire brew is created by mixing a potion of liquid flame with a potion of snap freeze.
journal.document.alchemy_guide.heal_elixirs.title=Healing Elixirs
journal.document.alchemy_guide.heal_elixirs.body=Healing elixirs are also quite simple, combining healing and another effect into one item.\n\nAn elixir of restoration is created by mixing a potion of healing with a potion of cleansing.\n\nAn elixir of vitality is created by mixing a potion of healing with a potion of shielding.\n\nAn elixir of honeyed healing is created by mixing a potion of healing with a shattered honeypot.
journal.document.alchemy_guide.heal_elixirs.body=Healing elixirs are also quite simple, combining healing and another effect into one item.\n\nAn elixir of restoration is created by mixing a potion of healing with a potion of cleansing.\n\nAn elixir of vitality is created by mixing a potion of healing with a potion of shielding.\n\nAn elixir of honeyed healing is created by mixing a potion of healing with a shattered honeypot.\n\nAn elixir of aquatic rejuvenation is created by mixing a potion of healing and a blob of goo.
journal.document.alchemy_guide.aoe_brews.title=Area of Effect Brews
journal.document.alchemy_guide.aoe_brews.body=Area of effect brews spread a harmful effect over a large area. They are more expensive than combination brews, but also more powerful.\n\nAn infernal brew is created by mixing a potion of dragon's breath and a potion of liquid flame.\n\nA blizzard brew is created by mixing a potion of snap freeze and a potion of frost.\n\nA shocking brew is created by mixing a potion of paralytic gas and a potion of storm clouds.
journal.document.alchemy_guide.aoe_brews.body=Area of effect brews spread a harmful effect over a large area. They are more expensive than combination brews, but also more powerful.\n\nAn infernal brew is created by mixing a potion of dragon's breath and a potion of liquid flame.\n\nA blizzard brew is created by mixing a potion of snap freeze and a potion of frost.\n\nA shocking brew is created by mixing a potion of paralytic gas and a potion of storm clouds.\n\nA caustic brew is created by mixing a potion of toxic gas and a blob of goo.
journal.document.alchemy_guide.imbue_elixirs.title=Imbuing Elixirs
journal.document.alchemy_guide.imbue_elixirs.body=Imbuing Elixirs will imbue the drinker with a unique power for a short time. They are more expensive than healing elixirs, but also more powerful.\n\nAn elixir of dragon's blood is created by mixing a potion of liquid flame and a potion of purity.\n\nAn elixir of toxic essence is created by mixing a potion of toxic gas and a potion of purity.\n\nAn elixir of earthen power is created by mixing a potion of paralytic gas and a potion of haste.
journal.document.alchemy_guide.imbue_elixirs.body=Imbuing Elixirs will imbue the drinker with a unique power for a short time. They are more expensive than healing elixirs, but also more powerful.\n\nAn elixir of dragon's blood is created by mixing a potion of liquid flame and a potion of purity.\n\nAn elixir of toxic essence is created by mixing a potion of toxic gas and a potion of purity.\n\nAn elixir of earthen power is created by mixing a potion of paralytic gas and a potion of haste.\n\nAn elixir of might is created by mixing a potion of strength and a large amount of alchemical energy.
journal.notes$landmark.well_of_health=well of health
journal.notes$landmark.well_of_awareness=well of awareness