v0.8.2: refactored the names/locations of methods relating to item price

This commit is contained in:
Evan Debenham 2020-07-17 19:13:24 -04:00
parent 48479d1dc4
commit dcdb254104
109 changed files with 149 additions and 171 deletions

View File

@ -154,7 +154,7 @@ public class Bones {
Artifact artifact = Reflection.newInstance(((Artifact)item).getClass()); Artifact artifact = Reflection.newInstance(((Artifact)item).getClass());
if (artifact == null){ if (artifact == null){
return new Gold(item.price()); return new Gold(item.value());
} }
artifact.cursed = true; artifact.cursed = true;
@ -163,7 +163,7 @@ public class Bones {
return artifact; return artifact;
} else { } else {
return new Gold(item.price()); return new Gold(item.value());
} }
} }

View File

@ -41,7 +41,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Combo; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Combo;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Drowsy; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Drowsy;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Foresight; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Foresight;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Fury; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Fury;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
@ -82,7 +81,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion; import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfMight; import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfMight;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfAccuracy; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfAccuracy;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEvasion; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEvasion;
@ -93,7 +91,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfMight;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfTenacity; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfTenacity;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfLivingEarth; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfLivingEarth;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfWarding; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfWarding;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow;
@ -1302,7 +1299,7 @@ public class Hero extends Char {
curAction = new HeroAction.PickUp( cell ); curAction = new HeroAction.PickUp( cell );
break; break;
case FOR_SALE: case FOR_SALE:
curAction = heap.size() == 1 && heap.peek().price() > 0 ? curAction = heap.size() == 1 && heap.peek().value() > 0 ?
new HeroAction.Buy( cell ) : new HeroAction.Buy( cell ) :
new HeroAction.PickUp( cell ); new HeroAction.PickUp( cell );
break; break;

View File

@ -93,6 +93,11 @@ public class Shopkeeper extends NPC {
public boolean reset() { public boolean reset() {
return true; return true;
} }
//shopkeepers are greedy!
public static int sellPrice(Item item){
return item.value() * 5 * (Dungeon.depth / 5 + 1);
}
public static WndBag sell() { public static WndBag sell() {
return GameScene.selectItem( itemSelector, WndBag.Mode.FOR_SALE, Messages.get(Shopkeeper.class, "sell")); return GameScene.selectItem( itemSelector, WndBag.Mode.FOR_SALE, Messages.get(Shopkeeper.class, "sell"));

View File

@ -128,7 +128,7 @@ public class Ankh extends Item {
} }
@Override @Override
public int price() { public int value() {
return 50 * quantity; return 50 * quantity;
} }
} }

View File

@ -23,17 +23,12 @@ package com.shatteredpixel.shatteredpixeldungeon.items;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Frost;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Wraith; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Wraith;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Shopkeeper;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Flare;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlameParticle;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
@ -43,10 +38,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.food.FrozenCarpaccio;
import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat; import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat;
import com.shatteredpixel.shatteredpixeldungeon.items.journal.DocumentPage; import com.shatteredpixel.shatteredpixeldungeon.items.journal.DocumentPage;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion; import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfWealth; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfWealth;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
@ -54,7 +47,6 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundlable; import com.watabou.utils.Bundlable;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.Random;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
@ -352,7 +344,7 @@ public class Heap implements Bundlable {
switch(type){ switch(type){
case FOR_SALE: case FOR_SALE:
Item i = peek(); Item i = peek();
return Messages.get(this, "for_sale", i.sellPrice(), i.toString()); return Messages.get(this, "for_sale", Shopkeeper.sellPrice(i), i.toString());
case CHEST: case CHEST:
case MIMIC: case MIMIC:
return Messages.get(this, "chest"); return Messages.get(this, "chest");

View File

@ -144,7 +144,7 @@ public class Honeypot extends Item {
} }
@Override @Override
public int price() { public int value() {
return 30 * quantity; return 30 * quantity;
} }
@ -242,7 +242,7 @@ public class Honeypot extends Item {
} }
@Override @Override
public int price() { public int value() {
return 5 * quantity; return 5 * quantity;
} }
} }

View File

@ -438,13 +438,9 @@ public class Item implements Bundlable {
return this; return this;
} }
public int price() { public int value() {
return 0; return 0;
} }
public final int sellPrice(){
return price() * 5 * (Dungeon.depth / 5 + 1);
}
public Item virtual(){ public Item virtual(){
Item item = Reflection.newInstance(getClass()); Item item = Reflection.newInstance(getClass());

View File

@ -74,7 +74,7 @@ public class MerchantsBeacon extends Item {
} }
@Override @Override
public int price() { public int value() {
return 5 * quantity; return 5 * quantity;
} }

View File

@ -105,7 +105,7 @@ public class Stylus extends Item {
} }
@Override @Override
public int price() { public int value() {
return 30 * quantity; return 30 * quantity;
} }

View File

@ -84,7 +84,7 @@ public class Torch extends Item {
} }
@Override @Override
public int price() { public int value() {
return 8 * quantity; return 8 * quantity;
} }

View File

@ -513,7 +513,7 @@ public class Armor extends EquipableItem {
} }
@Override @Override
public int price() { public int value() {
if (seal != null) return 0; if (seal != null) return 0;
int price = 20 * tier; int price = 20 * tier;

View File

@ -174,7 +174,7 @@ abstract public class ClassArmor extends Armor {
} }
@Override @Override
public int price() { public int value() {
return 0; return 0;
} }

View File

@ -188,7 +188,7 @@ public class Artifact extends KindofMisc {
} }
@Override @Override
public int price() { public int value() {
int price = 100; int price = 100;
if (level() > 0) if (level() > 0)
price += 20*visiblyUpgraded(); price += 20*visiblyUpgraded();

View File

@ -168,7 +168,7 @@ public class CloakOfShadows extends Artifact {
} }
@Override @Override
public int price() { public int value() {
return 0; return 0;
} }

View File

@ -408,7 +408,7 @@ public class TimekeepersHourglass extends Artifact {
} }
@Override @Override
public int price() { public int value() {
return 20; return 20;
} }
} }

View File

@ -80,7 +80,7 @@ public class MagicalHolster extends Bag {
} }
@Override @Override
public int price() { public int value() {
return 60; return 60;
} }

View File

@ -48,7 +48,7 @@ public class PotionBandolier extends Bag {
} }
@Override @Override
public int price() { public int value() {
return 40; return 40;
} }

View File

@ -60,7 +60,7 @@ public class ScrollHolder extends Bag {
} }
@Override @Override
public int price() { public int value() {
return 40; return 40;
} }

View File

@ -51,7 +51,7 @@ public class VelvetPouch extends Bag {
} }
@Override @Override
public int price() { public int value() {
return 30; return 30;
} }

View File

@ -90,7 +90,7 @@ public class ArcaneBomb extends Bomb {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (20 + 50); return quantity * (20 + 50);
} }

View File

@ -228,7 +228,7 @@ public class Bomb extends Item {
} }
@Override @Override
public int price() { public int value() {
return 20 * quantity; return 20 * quantity;
} }

View File

@ -57,7 +57,7 @@ public class Firebomb extends Bomb {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (20 + 30); return quantity * (20 + 30);
} }

View File

@ -58,7 +58,7 @@ public class Flashbang extends Bomb {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (20 + 40); return quantity * (20 + 40);
} }

View File

@ -55,7 +55,7 @@ public class FrostBomb extends Bomb {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (20 + 30); return quantity * (20 + 30);
} }

View File

@ -77,7 +77,7 @@ public class HolyBomb extends Bomb {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (20 + 30); return quantity * (20 + 30);
} }

View File

@ -141,7 +141,7 @@ public class Noisemaker extends Bomb {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (20 + 40); return quantity * (20 + 40);
} }

View File

@ -117,7 +117,7 @@ public class RegrowthBomb extends Bomb {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (20 + 30); return quantity * (20 + 30);
} }

View File

@ -84,7 +84,7 @@ public class ShockBomb extends Bomb {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (20 + 30); return quantity * (20 + 30);
} }

View File

@ -80,7 +80,7 @@ public class ShrapnelBomb extends Bomb {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (20 + 100); return quantity * (20 + 100);
} }

View File

@ -66,7 +66,7 @@ public class WoollyBomb extends Bomb {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (20 + 30); return quantity * (20 + 30);
} }

View File

@ -119,7 +119,7 @@ public class Blandfruit extends Food {
} }
@Override @Override
public int price() { public int value() {
return 20 * quantity; return 20 * quantity;
} }

View File

@ -32,7 +32,7 @@ public class ChargrilledMeat extends Food {
} }
@Override @Override
public int price() { public int value() {
return 8 * quantity; return 8 * quantity;
} }

View File

@ -123,7 +123,7 @@ public class Food extends Item {
} }
@Override @Override
public int price() { public int value() {
return 10 * quantity; return 10 * quantity;
} }
} }

View File

@ -46,7 +46,7 @@ public class FrozenCarpaccio extends Food {
effect(hero); effect(hero);
} }
public int price() { public int value() {
return 10 * quantity; return 10 * quantity;
} }

View File

@ -44,7 +44,7 @@ public class MeatPie extends Food {
} }
@Override @Override
public int price() { public int value() {
return 40 * quantity; return 40 * quantity;
} }

View File

@ -48,7 +48,7 @@ public class MysteryMeat extends Food {
effect(hero); effect(hero);
} }
public int price() { public int value() {
return 5 * quantity; return 5 * quantity;
} }

View File

@ -129,7 +129,7 @@ public class Pasty extends Food {
} }
@Override @Override
public int price() { public int value() {
return 20 * quantity; return 20 * quantity;
} }
} }

View File

@ -32,7 +32,7 @@ public class SmallRation extends Food {
} }
@Override @Override
public int price() { public int value() {
return 10 * quantity; return 10 * quantity;
} }
} }

View File

@ -33,7 +33,7 @@ public class StewedMeat extends Food {
} }
@Override @Override
public int price() { public int value() {
return 8 * quantity; return 8 * quantity;
} }

View File

@ -76,7 +76,7 @@ public class AlchemicalCatalyst extends Potion {
} }
@Override @Override
public int price() { public int value() {
return 40 * quantity; return 40 * quantity;
} }

View File

@ -426,7 +426,7 @@ public class Potion extends Item {
} }
@Override @Override
public int price() { public int value() {
return 30 * quantity; return 30 * quantity;
} }

View File

@ -39,7 +39,7 @@ public class PotionOfExperience extends Potion {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 50 * quantity : super.price(); return isKnown() ? 50 * quantity : super.value();
} }
} }

View File

@ -57,7 +57,7 @@ public class PotionOfFrost extends Potion {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 30 * quantity : super.price(); return isKnown() ? 30 * quantity : super.value();
} }
} }

View File

@ -43,7 +43,7 @@ public class PotionOfHaste extends Potion {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 40 * quantity : super.price(); return isKnown() ? 40 * quantity : super.value();
} }
} }

View File

@ -68,7 +68,7 @@ public class PotionOfHealing extends Potion {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 30 * quantity : super.price(); return isKnown() ? 30 * quantity : super.value();
} }
} }

View File

@ -45,8 +45,8 @@ public class PotionOfInvisibility extends Potion {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 40 * quantity : super.price(); return isKnown() ? 40 * quantity : super.value();
} }
} }

View File

@ -62,7 +62,7 @@ public class PotionOfLevitation extends Potion {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 40 * quantity : super.price(); return isKnown() ? 40 * quantity : super.value();
} }
} }

View File

@ -57,7 +57,7 @@ public class PotionOfLiquidFlame extends Potion {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 30 * quantity : super.price(); return isKnown() ? 30 * quantity : super.value();
} }
} }

View File

@ -49,7 +49,7 @@ public class PotionOfMindVision extends Potion {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 30 * quantity : super.price(); return isKnown() ? 30 * quantity : super.value();
} }
} }

View File

@ -50,7 +50,7 @@ public class PotionOfParalyticGas extends Potion {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 40 * quantity : super.price(); return isKnown() ? 40 * quantity : super.value();
} }
} }

View File

@ -105,7 +105,7 @@ public class PotionOfPurity extends Potion {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 40 * quantity : super.price(); return isKnown() ? 40 * quantity : super.value();
} }
} }

View File

@ -48,7 +48,7 @@ public class PotionOfStrength extends Potion {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 50 * quantity : super.price(); return isKnown() ? 50 * quantity : super.value();
} }
} }

View File

@ -50,7 +50,7 @@ public class PotionOfToxicGas extends Potion {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 30 * quantity : super.price(); return isKnown() ? 30 * quantity : super.value();
} }
} }

View File

@ -49,7 +49,7 @@ public class BlizzardBrew extends Brew {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (30 + 40); return quantity * (30 + 40);
} }

View File

@ -64,7 +64,7 @@ public class CausticBrew extends Brew {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (30 + 50); return quantity * (30 + 50);
} }

View File

@ -52,7 +52,7 @@ public class InfernalBrew extends Brew {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (30 + 40); return quantity * (30 + 40);
} }

View File

@ -55,7 +55,7 @@ public class ShockingBrew extends Brew {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (40 + 40); return quantity * (40 + 40);
} }

View File

@ -49,7 +49,7 @@ public class ElixirOfAquaticRejuvenation extends Elixir {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (30 + 50); return quantity * (30 + 50);
} }

View File

@ -40,7 +40,7 @@ public class ElixirOfArcaneArmor extends Elixir {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (50 + 40); return quantity * (50 + 40);
} }

View File

@ -51,7 +51,7 @@ public class ElixirOfDragonsBlood extends Elixir {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (50 + 40); return quantity * (50 + 40);
} }

View File

@ -68,7 +68,7 @@ public class ElixirOfHoneyedHealing extends Elixir {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (30 + 5); return quantity * (30 + 5);
} }

View File

@ -48,7 +48,7 @@ public class ElixirOfIcyTouch extends Elixir {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (50 + 40); return quantity * (50 + 40);
} }

View File

@ -65,7 +65,7 @@ public class ElixirOfMight extends Elixir {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (50 + 40); return quantity * (50 + 40);
} }

View File

@ -48,7 +48,7 @@ public class ElixirOfToxicEssence extends Elixir {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients //prices of ingredients
return quantity * (30 + 40); return quantity * (30 + 40);
} }

View File

@ -117,8 +117,8 @@ public class ExoticPotion extends Potion {
@Override @Override
//20 gold more than its none-exotic equivalent //20 gold more than its none-exotic equivalent
public int price() { public int value() {
return (Reflection.newInstance(exoToReg.get(getClass())).price() + 20) * quantity; return (Reflection.newInstance(exoToReg.get(getClass())).value() + 20) * quantity;
} }
public static class PotionToExotic extends Recipe{ public static class PotionToExotic extends Recipe{

View File

@ -42,7 +42,7 @@ public class GooBlob extends Item {
} }
@Override @Override
public int price() { public int value() {
return quantity * 50; return quantity * 50;
} }
} }

View File

@ -42,7 +42,7 @@ public class MetalShard extends Item {
} }
@Override @Override
public int price() { public int value() {
return quantity * 100; return quantity * 100;
} }
} }

View File

@ -250,7 +250,7 @@ public class Ring extends KindofMisc {
} }
@Override @Override
public int price() { public int value() {
int price = 75; int price = 75;
if (cursed && cursedKnown) { if (cursed && cursedKnown) {
price /= 2; price /= 2;

View File

@ -257,7 +257,7 @@ public abstract class Scroll extends Item {
} }
@Override @Override
public int price() { public int value() {
return 30 * quantity; return 30 * quantity;
} }

View File

@ -73,7 +73,7 @@ public class ScrollOfIdentify extends InventoryScroll {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 30 * quantity : super.price(); return isKnown() ? 30 * quantity : super.value();
} }
} }

View File

@ -74,7 +74,7 @@ public class ScrollOfLullaby extends Scroll {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 40 * quantity : super.price(); return isKnown() ? 40 * quantity : super.value();
} }
} }

View File

@ -98,8 +98,8 @@ public class ScrollOfMagicMapping extends Scroll {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 40 * quantity : super.price(); return isKnown() ? 40 * quantity : super.value();
} }
public static void discover( int cell ) { public static void discover( int cell ) {

View File

@ -167,7 +167,7 @@ public class ScrollOfMirrorImage extends Scroll {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 30 * quantity : super.price(); return isKnown() ? 30 * quantity : super.value();
} }
} }

View File

@ -27,10 +27,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
@ -80,7 +78,7 @@ public class ScrollOfRage extends Scroll {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 40 * quantity : super.price(); return isKnown() ? 40 * quantity : super.value();
} }
} }

View File

@ -26,7 +26,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite; import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.EnergyParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.EnergyParticle;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
@ -68,7 +67,7 @@ public class ScrollOfRecharging extends Scroll {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 30 * quantity : super.price(); return isKnown() ? 30 * quantity : super.value();
} }
} }

View File

@ -129,7 +129,7 @@ public class ScrollOfRemoveCurse extends InventoryScroll {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 30 * quantity : super.price(); return isKnown() ? 30 * quantity : super.value();
} }
} }

View File

@ -93,7 +93,7 @@ public class ScrollOfRetribution extends Scroll {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 40 * quantity : super.price(); return isKnown() ? 40 * quantity : super.value();
} }
} }

View File

@ -241,7 +241,7 @@ public class ScrollOfTeleportation extends Scroll {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 30 * quantity : super.price(); return isKnown() ? 30 * quantity : super.value();
} }
} }

View File

@ -91,7 +91,7 @@ public class ScrollOfTerror extends Scroll {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 40 * quantity : super.price(); return isKnown() ? 40 * quantity : super.value();
} }
} }

View File

@ -273,7 +273,7 @@ public class ScrollOfTransmutation extends InventoryScroll {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 50 * quantity : super.price(); return isKnown() ? 50 * quantity : super.value();
} }
} }

View File

@ -128,7 +128,7 @@ public class ScrollOfUpgrade extends InventoryScroll {
} }
@Override @Override
public int price() { public int value() {
return isKnown() ? 50 * quantity : super.price(); return isKnown() ? 50 * quantity : super.value();
} }
} }

View File

@ -117,8 +117,8 @@ public abstract class ExoticScroll extends Scroll {
@Override @Override
//20 gold more than its none-exotic equivalent //20 gold more than its none-exotic equivalent
public int price() { public int value() {
return (Reflection.newInstance(exoToReg.get(getClass())).price() + 20) * quantity; return (Reflection.newInstance(exoToReg.get(getClass())).value() + 20) * quantity;
} }
public static class ScrollToExotic extends Recipe { public static class ScrollToExotic extends Recipe {

View File

@ -58,7 +58,7 @@ public class Alchemize extends Spell implements AlchemyScene.AlchemyProvider {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients, divided by output quantity //prices of ingredients, divided by output quantity
return Math.round(quantity * ((40 + 40) / 4f)); return Math.round(quantity * ((40 + 40) / 4f));
} }

View File

@ -64,7 +64,7 @@ public class AquaBlast extends TargetedSpell {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients, divided by output quantity //prices of ingredients, divided by output quantity
return Math.round(quantity * ((60 + 40) / 12f)); return Math.round(quantity * ((60 + 40) / 12f));
} }

View File

@ -79,7 +79,7 @@ public class ArcaneCatalyst extends Spell {
} }
@Override @Override
public int price() { public int value() {
return 40 * quantity; return 40 * quantity;
} }

View File

@ -187,7 +187,7 @@ public class BeaconOfReturning extends Spell {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients, divided by output quantity //prices of ingredients, divided by output quantity
return Math.round(quantity * ((50 + 40) / 5f)); return Math.round(quantity * ((50 + 40) / 5f));
} }

View File

@ -78,7 +78,7 @@ public class CurseInfusion extends InventorySpell {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients, divided by output quantity //prices of ingredients, divided by output quantity
return Math.round(quantity * ((30 + 100) / 3f)); return Math.round(quantity * ((30 + 100) / 3f));
} }

View File

@ -57,7 +57,7 @@ public class FeatherFall extends Spell {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients, divided by output quantity //prices of ingredients, divided by output quantity
return Math.round(quantity * ((30 + 40) / 2f)); return Math.round(quantity * ((30 + 40) / 2f));
} }

View File

@ -62,7 +62,7 @@ public class MagicalInfusion extends InventorySpell {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients, divided by output quantity //prices of ingredients, divided by output quantity
return Math.round(quantity * ((50 + 40) / 1f)); return Math.round(quantity * ((50 + 40) / 1f));
} }

View File

@ -62,7 +62,7 @@ public class MagicalPorter extends InventorySpell {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients, divided by output quantity //prices of ingredients, divided by output quantity
return Math.round(quantity * ((5 + 40) / 8f)); return Math.round(quantity * ((5 + 40) / 8f));
} }

View File

@ -76,7 +76,7 @@ public class PhaseShift extends TargetedSpell {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients, divided by output quantity //prices of ingredients, divided by output quantity
return Math.round(quantity * ((30 + 40) / 8f)); return Math.round(quantity * ((30 + 40) / 8f));
} }

View File

@ -113,7 +113,7 @@ public class ReclaimTrap extends TargetedSpell {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients, divided by output quantity //prices of ingredients, divided by output quantity
return Math.round(quantity * ((40 + 100) / 3f)); return Math.round(quantity * ((40 + 100) / 3f));
} }

View File

@ -84,7 +84,7 @@ public class Recycle extends InventorySpell {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients, divided by output quantity //prices of ingredients, divided by output quantity
return Math.round(quantity * ((50 + 40) / 8f)); return Math.round(quantity * ((50 + 40) / 8f));
} }

View File

@ -74,7 +74,7 @@ public class WildEnergy extends TargetedSpell {
} }
@Override @Override
public int price() { public int value() {
//prices of ingredients, divided by output quantity //prices of ingredients, divided by output quantity
return Math.round(quantity * ((50 + 100) / 5f)); return Math.round(quantity * ((50 + 100) / 5f));
} }

View File

@ -54,7 +54,7 @@ public abstract class Runestone extends Item {
} }
@Override @Override
public int price() { public int value() {
return 10 * quantity; return 10 * quantity;
} }

View File

@ -65,7 +65,7 @@ public class StoneOfAugmentation extends InventoryStone {
} }
@Override @Override
public int price() { public int value() {
return 30 * quantity; return 30 * quantity;
} }

View File

@ -67,7 +67,7 @@ public class StoneOfEnchantment extends InventoryStone {
} }
@Override @Override
public int price() { public int value() {
return 30 * quantity; return 30 * quantity;
} }
} }

View File

@ -366,7 +366,7 @@ public abstract class Wand extends Item {
} }
@Override @Override
public int price() { public int value() {
int price = 75; int price = 75;
if (cursed && cursedKnown) { if (cursed && cursedKnown) {
price /= 2; price /= 2;

View File

@ -309,7 +309,7 @@ public class MagesStaff extends MeleeWeapon {
} }
@Override @Override
public int price() { public int value() {
return 0; return 0;
} }

View File

@ -117,7 +117,7 @@ public class MeleeWeapon extends Weapon {
} }
@Override @Override
public int price() { public int value() {
int price = 20 * tier; int price = 20 * tier;
if (hasGoodEnchant()) { if (hasGoodEnchant()) {
price *= 1.5; price *= 1.5;

Some files were not shown because too many files have changed in this diff Show More