v0.7.0: implemented 3 brews
This commit is contained in:
parent
eece33925e
commit
a98f85f8b6
Binary file not shown.
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
@ -27,6 +27,9 @@ import com.shatteredpixel.shatteredpixeldungeon.items.food.Blandfruit;
|
|||
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.FrigidBrew;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.brews.FrostfireBrew;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.brews.WickedBrew;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfDragonsBlood;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfEarthenPower;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfToxicEssence;
|
||||
|
@ -142,6 +145,9 @@ public abstract class Recipe {
|
|||
new ElixirOfDragonsBlood.Recipe(),
|
||||
new ElixirOfEarthenPower.Recipe(),
|
||||
new ElixirOfToxicEssence.Recipe(),
|
||||
new FrigidBrew.Recipe(),
|
||||
new FrostfireBrew.Recipe(),
|
||||
new WickedBrew.Recipe(),
|
||||
new StewedMeat.twoMeat()
|
||||
};
|
||||
|
||||
|
|
|
@ -132,6 +132,8 @@ public class Potion extends Item {
|
|||
mustThrowPots.add(PotionOfSnapFreeze.class);
|
||||
mustThrowPots.add(PotionOfShroudingFog.class);
|
||||
mustThrowPots.add(PotionOfStormClouds.class);
|
||||
|
||||
//also all brews, hardcoded
|
||||
}
|
||||
|
||||
private static final HashSet<Class<?extends Potion>> canThrowPots = new HashSet<>();
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* 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.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public abstract class Brew extends Potion {
|
||||
|
||||
@Override
|
||||
public ArrayList<String> actions(Hero hero) {
|
||||
ArrayList<String> actions = super.actions( hero );
|
||||
actions.remove( AC_DRINK );
|
||||
return actions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAction() {
|
||||
defaultAction = AC_THROW;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void doThrow(Hero hero) {
|
||||
//identical to Item.doThrow
|
||||
GameScene.selectCell( thrower );
|
||||
}
|
||||
|
||||
@Override
|
||||
public abstract void shatter( int cell );
|
||||
|
||||
@Override
|
||||
public boolean isKnown() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* 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.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Freezing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StormCloud;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfFrost;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfStormClouds;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.PathFinder;
|
||||
|
||||
public class FrigidBrew extends Brew {
|
||||
|
||||
{
|
||||
image = ItemSpriteSheet.BREW_FRIGID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shatter(int cell) {
|
||||
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
splash( cell );
|
||||
Sample.INSTANCE.play( Assets.SND_SHATTER );
|
||||
}
|
||||
|
||||
for (int offset : PathFinder.NEIGHBOURS9){
|
||||
if (!Dungeon.level.solid[cell+offset]) {
|
||||
GameScene.add(Blob.seed(cell + offset, 10, Freezing.class));
|
||||
}
|
||||
}
|
||||
GameScene.add( Blob.seed( cell, 1000, StormCloud.class ) );
|
||||
}
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
|
||||
|
||||
{
|
||||
inputs = new Class[]{PotionOfFrost.class, PotionOfStormClouds.class};
|
||||
inQuantity = new int[]{1, 1};
|
||||
|
||||
cost = 2;
|
||||
|
||||
output = FrigidBrew.class;
|
||||
outQuantity = 1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* 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.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.Fire;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Freezing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfSnapFreeze;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.PathFinder;
|
||||
|
||||
public class FrostfireBrew extends Brew {
|
||||
|
||||
{
|
||||
image = ItemSpriteSheet.BREW_FROSTFIRE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shatter(int cell) {
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
setKnown();
|
||||
|
||||
splash( cell );
|
||||
Sample.INSTANCE.play( Assets.SND_SHATTER );
|
||||
}
|
||||
|
||||
Fire fire = (Fire)Dungeon.level.blobs.get( Fire.class );
|
||||
|
||||
for (int offset : PathFinder.NEIGHBOURS9){
|
||||
if (!Dungeon.level.solid[cell+offset]) {
|
||||
|
||||
Freezing.affect( cell + offset, fire );
|
||||
|
||||
Char ch = Actor.findChar( cell + offset);
|
||||
if (ch != null){
|
||||
Buff.affect(ch, Roots.class, 10f);
|
||||
}
|
||||
GameScene.add(Blob.seed(cell + offset, 10, Fire.class));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
|
||||
|
||||
{
|
||||
inputs = new Class[]{PotionOfSnapFreeze.class, PotionOfLiquidFlame.class};
|
||||
inQuantity = new int[]{1, 1};
|
||||
|
||||
cost = 3;
|
||||
|
||||
output = FrostfireBrew.class;
|
||||
outQuantity = 1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* 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.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ParalyticGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfParalyticGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfToxicGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
|
||||
public class WickedBrew extends Brew {
|
||||
|
||||
{
|
||||
image = ItemSpriteSheet.BREW_WICKED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shatter(int cell) {
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
splash( cell );
|
||||
Sample.INSTANCE.play( Assets.SND_SHATTER );
|
||||
}
|
||||
GameScene.add( Blob.seed( cell, 1000, ToxicGas.class ) );
|
||||
GameScene.add( Blob.seed( cell, 1000, ParalyticGas.class ) );
|
||||
}
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
|
||||
|
||||
{
|
||||
inputs = new Class[]{PotionOfToxicGas.class, PotionOfParalyticGas.class};
|
||||
inQuantity = new int[]{1, 1};
|
||||
|
||||
cost = 1;
|
||||
|
||||
output = WickedBrew.class;
|
||||
outQuantity = 1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -525,6 +525,17 @@ public class ItemSpriteSheet {
|
|||
assignItemRect(ELIXIR_EARTH, 10, 14);
|
||||
}
|
||||
|
||||
private static final int BREWS = xy(1, 26); //16 slots
|
||||
public static final int BREW_WICKED = BREWS+0;
|
||||
public static final int BREW_FRIGID = BREWS+1;
|
||||
public static final int BREW_FROSTFIRE= BREWS+2;
|
||||
static{
|
||||
assignItemRect(BREW_WICKED, 10, 14);
|
||||
assignItemRect(BREW_FRIGID, 10, 14);
|
||||
assignItemRect(BREW_FROSTFIRE, 10, 14);
|
||||
}
|
||||
//16 free slots
|
||||
|
||||
private static final int FOOD = xy(1, 28); //16 slots
|
||||
public static final int MEAT = FOOD+0;
|
||||
public static final int STEAK = FOOD+1;
|
||||
|
|
|
@ -552,6 +552,18 @@ items.potions.potionoftoxicgas.desc=Uncorking or shattering this pressurized gla
|
|||
|
||||
|
||||
|
||||
###brews
|
||||
items.potions.brews.frigidbrew.name=frigid brew
|
||||
items.potions.brews.frigidbrew.desc=TODO
|
||||
|
||||
items.potions.brews.frostfirebrew.name=frostfire brew
|
||||
items.potions.brews.frostfirebrew.desc=TODO
|
||||
|
||||
items.potions.brews.wickedbrew.name=wicked brew
|
||||
items.potions.brews.wickedbrew.desc=TODO
|
||||
|
||||
|
||||
|
||||
###elixirs
|
||||
items.potions.elixirs.elixirofdragonsblood.name=elixir of dragon's blood
|
||||
items.potions.elixirs.elixirofdragonsblood.desc=TODO
|
||||
|
|
Loading…
Reference in New Issue
Block a user