v0.8.2: POS, SOU, & related items are now unique & immune to burn/freeze
This commit is contained in:
parent
554ef6ef20
commit
3db661770a
|
@ -98,8 +98,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 MysteryMeat){
|
||||
if (!i.unique && (i instanceof Scroll || i instanceof MysteryMeat)){
|
||||
burnable.add(i);
|
||||
}
|
||||
}
|
||||
|
@ -125,8 +124,7 @@ public class Burning extends Buff implements Hero.Doom {
|
|||
|
||||
Item item = ((Thief) target).item;
|
||||
|
||||
if (item instanceof Scroll &&
|
||||
!(item instanceof ScrollOfUpgrade)) {
|
||||
if (!item.unique && item instanceof Scroll) {
|
||||
target.sprite.emitter().burst( ElmoParticle.FACTORY, 6 );
|
||||
((Thief)target).item = null;
|
||||
} else if (item instanceof MysteryMeat) {
|
||||
|
|
|
@ -62,8 +62,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 MysteryMeat){
|
||||
if (!i.unique && (i instanceof Potion || 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)) {
|
||||
if (item instanceof Potion && !item.unique) {
|
||||
((Potion) ((Thief) target).item).shatter(target.pos);
|
||||
((Thief) target).item = null;
|
||||
} else if (item instanceof MysteryMeat){
|
||||
|
|
|
@ -745,9 +745,9 @@ public class Hero extends Char {
|
|||
//Do Nothing
|
||||
} else {
|
||||
|
||||
boolean important =
|
||||
(item instanceof ScrollOfUpgrade && ((Scroll)item).isKnown()) ||
|
||||
(item instanceof PotionOfStrength && ((Potion)item).isKnown());
|
||||
//TODO make all unique items important? or just POS / SOU?
|
||||
boolean important = item.unique && item.isIdentified() &&
|
||||
(item instanceof Scroll || item instanceof Potion);
|
||||
if (important) {
|
||||
GLog.p( Messages.get(this, "you_now_have", item.name()) );
|
||||
} else {
|
||||
|
|
|
@ -206,8 +206,7 @@ public class Heap implements Bundlable {
|
|||
boolean evaporated = false;
|
||||
|
||||
for (Item item : items.toArray( new Item[0] )) {
|
||||
if (item instanceof Scroll
|
||||
&& !(item instanceof ScrollOfUpgrade)) {
|
||||
if (item instanceof Scroll && !item.unique) {
|
||||
items.remove( item );
|
||||
burnt = true;
|
||||
} else if (item instanceof Dewdrop) {
|
||||
|
@ -308,7 +307,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)) {
|
||||
} else if (item instanceof Potion && !item.unique) {
|
||||
items.remove(item);
|
||||
((Potion) item).shatter(pos);
|
||||
frozen = true;
|
||||
|
|
|
@ -32,6 +32,8 @@ public class PotionOfStrength extends Potion {
|
|||
|
||||
{
|
||||
icon = ItemSpriteSheet.Icons.POTION_STRENGTH;
|
||||
|
||||
unique = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -39,6 +39,8 @@ public class ElixirOfMight extends Elixir {
|
|||
|
||||
{
|
||||
image = ItemSpriteSheet.ELIXIR_MIGHT;
|
||||
|
||||
unique = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -30,6 +30,8 @@ public class PotionOfAdrenalineSurge extends ExoticPotion {
|
|||
|
||||
{
|
||||
icon = ItemSpriteSheet.Icons.POTION_ARENSURGE;
|
||||
|
||||
unique = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -43,6 +43,8 @@ public class ScrollOfUpgrade extends InventoryScroll {
|
|||
{
|
||||
icon = ItemSpriteSheet.Icons.SCROLL_UPGRADE;
|
||||
mode = WndBag.Mode.UPGRADEABLE;
|
||||
|
||||
unique = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -40,6 +40,8 @@ public class ScrollOfEnchantment extends ExoticScroll {
|
|||
|
||||
{
|
||||
icon = ItemSpriteSheet.Icons.SCROLL_ENCHANT;
|
||||
|
||||
unique = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -38,6 +38,8 @@ public class MagicalInfusion extends InventorySpell {
|
|||
{
|
||||
mode = WndBag.Mode.UPGRADEABLE;
|
||||
image = ItemSpriteSheet.MAGIC_INFUSE;
|
||||
|
||||
unique = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -36,6 +36,8 @@ public class StoneOfEnchantment extends InventoryStone {
|
|||
{
|
||||
mode = WndBag.Mode.ENCHANTABLE;
|
||||
image = ItemSpriteSheet.STONE_ENCHANT;
|
||||
|
||||
unique = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -63,6 +63,8 @@ public class Rotberry extends Plant {
|
|||
image = ItemSpriteSheet.SEED_ROTBERRY;
|
||||
|
||||
plantClass = Rotberry.class;
|
||||
|
||||
unique = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user