v0.7.0: extended consumable icon functionality, some icons are WIP
This commit is contained in:
parent
e436fd0ffa
commit
10143f15e0
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1.2 KiB |
|
@ -26,9 +26,11 @@ import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.UnstableSpellbook;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.PotionBandolier;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.ScrollHolder;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.VelvetPouch;
|
||||
|
@ -36,6 +38,18 @@ import com.shatteredpixel.shatteredpixeldungeon.items.food.Food;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.food.SmallRation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMindVision;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfAdrenalineSurge;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfCleansing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfCorrosiveGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfDragonsBreath;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfEarthenArmor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfHolyFuror;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfMagicalSight;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfShielding;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfShroudingFog;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfSnapFreeze;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfStamina;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfStormClouds;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfMagicMissile;
|
||||
|
@ -101,6 +115,17 @@ public enum HeroClass {
|
|||
new SmallRation().collect();
|
||||
}
|
||||
|
||||
new UnstableSpellbook().identify().collect();
|
||||
|
||||
/*new Firebomb().collect();
|
||||
new Flashbang().collect();
|
||||
new FrostBomb().collect();
|
||||
new HealingBomb().collect();
|
||||
new HolyBomb().collect();
|
||||
new Noisemaker().collect();
|
||||
new ShockBomb().collect();
|
||||
new WoollyBomb().collect();*/
|
||||
|
||||
}
|
||||
|
||||
public Badges.Badge masteryBadge() {
|
||||
|
@ -130,6 +155,23 @@ public enum HeroClass {
|
|||
new PotionBandolier().collect();
|
||||
Dungeon.LimitedDrops.POTION_BANDOLIER.drop();
|
||||
new PotionOfHealing().identify();
|
||||
|
||||
for (int j = 0; j < 100; j++){
|
||||
Generator.random(Generator.Category.POTION).identify().collect();
|
||||
}
|
||||
|
||||
new PotionOfAdrenalineSurge().quantity(5).identify().collect();
|
||||
new PotionOfCleansing().quantity(5).identify().collect();
|
||||
new PotionOfCorrosiveGas().quantity(5).identify().collect();
|
||||
new PotionOfDragonsBreath().quantity(5).identify().collect();
|
||||
new PotionOfEarthenArmor().quantity(5).identify().collect();
|
||||
new PotionOfHolyFuror().quantity(5).identify().collect();
|
||||
new PotionOfMagicalSight().quantity(5).identify().collect();
|
||||
new PotionOfShielding().quantity(5).identify().collect();
|
||||
new PotionOfShroudingFog().quantity(5).identify().collect();
|
||||
new PotionOfSnapFreeze().quantity(5).identify().collect();
|
||||
new PotionOfStamina().quantity(5).identify().collect();
|
||||
new PotionOfStormClouds().quantity(5).identify().collect();
|
||||
}
|
||||
|
||||
private static void initMage( Hero hero ) {
|
||||
|
|
|
@ -27,6 +27,10 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
|||
|
||||
public class PotionOfAdrenalineSurge extends ExoticPotion {
|
||||
|
||||
{
|
||||
initials = 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Hero hero) {
|
||||
setKnown();
|
||||
|
|
|
@ -33,6 +33,10 @@ import com.watabou.noosa.audio.Sample;
|
|||
|
||||
public class PotionOfCleansing extends ExoticPotion {
|
||||
|
||||
{
|
||||
initials = 9;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply( Hero hero ) {
|
||||
setKnown();
|
||||
|
|
|
@ -30,6 +30,10 @@ import com.watabou.noosa.audio.Sample;
|
|||
|
||||
public class PotionOfCorrosiveGas extends ExoticPotion {
|
||||
|
||||
{
|
||||
initials = 11;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shatter( int cell ) {
|
||||
|
||||
|
|
|
@ -43,6 +43,10 @@ import java.util.HashSet;
|
|||
|
||||
public class PotionOfDragonsBreath extends ExoticPotion {
|
||||
|
||||
{
|
||||
initials = 6;
|
||||
}
|
||||
|
||||
//a lot of this is copy-paste from wand of fireblast
|
||||
|
||||
//the actual affected cells
|
||||
|
|
|
@ -27,6 +27,10 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
|||
|
||||
public class PotionOfEarthenArmor extends ExoticPotion {
|
||||
|
||||
{
|
||||
initials = 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply( Hero hero ) {
|
||||
setKnown();
|
||||
|
|
|
@ -27,6 +27,10 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
|||
|
||||
public class PotionOfHolyFuror extends ExoticPotion {
|
||||
|
||||
{
|
||||
initials = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply( Hero hero ) {
|
||||
setKnown();
|
||||
|
|
|
@ -28,6 +28,10 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
|||
|
||||
public class PotionOfMagicalSight extends ExoticPotion {
|
||||
|
||||
{
|
||||
initials = 7;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Hero hero) {
|
||||
setKnown();
|
||||
|
|
|
@ -27,6 +27,10 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
|||
|
||||
public class PotionOfShielding extends ExoticPotion {
|
||||
|
||||
{
|
||||
initials = 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Hero hero) {
|
||||
setKnown();
|
||||
|
|
|
@ -30,6 +30,10 @@ import com.watabou.noosa.audio.Sample;
|
|||
|
||||
public class PotionOfShroudingFog extends ExoticPotion {
|
||||
|
||||
{
|
||||
initials = 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shatter( int cell ) {
|
||||
|
||||
|
|
|
@ -34,6 +34,10 @@ import com.watabou.utils.PathFinder;
|
|||
|
||||
public class PotionOfSnapFreeze extends ExoticPotion {
|
||||
|
||||
{
|
||||
initials = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shatter(int cell) {
|
||||
|
||||
|
|
|
@ -27,6 +27,10 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
|||
|
||||
public class PotionOfStamina extends ExoticPotion {
|
||||
|
||||
{
|
||||
initials = 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Hero hero) {
|
||||
setKnown();
|
||||
|
|
|
@ -30,6 +30,10 @@ import com.watabou.noosa.audio.Sample;
|
|||
|
||||
public class PotionOfStormClouds extends ExoticPotion {
|
||||
|
||||
{
|
||||
initials = 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shatter(int cell) {
|
||||
|
||||
|
|
|
@ -32,6 +32,10 @@ import com.watabou.noosa.audio.Sample;
|
|||
|
||||
public class ScrollOfAffection extends ExoticScroll {
|
||||
|
||||
{
|
||||
initials = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRead() {
|
||||
|
||||
|
|
|
@ -26,6 +26,11 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
|
||||
|
||||
public class ScrollOfAntiMagic extends ExoticScroll {
|
||||
|
||||
{
|
||||
initials = 7;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRead() {
|
||||
|
||||
|
|
|
@ -33,6 +33,9 @@ import com.watabou.noosa.audio.Sample;
|
|||
|
||||
public class ScrollOfConfusion extends ExoticScroll {
|
||||
|
||||
{
|
||||
initials = 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRead() {
|
||||
|
|
|
@ -31,6 +31,10 @@ import com.watabou.noosa.Game;
|
|||
|
||||
public class ScrollOfDistortion extends ExoticScroll {
|
||||
|
||||
{
|
||||
initials = 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRead() {
|
||||
//FIXME this doesn't handle various edge-cases. especially as it can trigger in boss rooms!
|
||||
|
|
|
@ -30,6 +30,11 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
|
||||
|
||||
public class ScrollOfEnchantment extends ExoticScroll {
|
||||
|
||||
{
|
||||
initials = 11;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRead() {
|
||||
setKnown();
|
||||
|
|
|
@ -35,6 +35,11 @@ import com.watabou.utils.Random;
|
|||
import java.util.HashSet;
|
||||
|
||||
public class ScrollOfForesight extends ExoticScroll {
|
||||
|
||||
{
|
||||
initials = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRead() {
|
||||
|
||||
|
|
|
@ -31,6 +31,11 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Flare;
|
|||
import com.watabou.noosa.audio.Sample;
|
||||
|
||||
public class ScrollOfPetrification extends ExoticScroll {
|
||||
|
||||
{
|
||||
initials = 9;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRead() {
|
||||
new Flare( 5, 32 ).color( 0xFF0000, true ).show( curUser.sprite, 2f );
|
||||
|
|
|
@ -28,7 +28,9 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
|||
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.exotic.ExoticPotion;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ExoticScroll;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
|
@ -248,7 +250,20 @@ public class ItemSlot extends Button {
|
|||
if (iconInt != null && iconVisible) {
|
||||
bottomRightIcon = new Image(Assets.CONS_ICONS);
|
||||
int left = iconInt*7;
|
||||
int top = item instanceof Potion ? 0 : 8;
|
||||
int top;
|
||||
if (item instanceof Potion){
|
||||
if (item instanceof ExoticPotion){
|
||||
top = 8;
|
||||
} else {
|
||||
top = 0;
|
||||
}
|
||||
} else {
|
||||
if (item instanceof ExoticScroll){
|
||||
top = 24;
|
||||
} else {
|
||||
top = 16;
|
||||
}
|
||||
}
|
||||
bottomRightIcon.frame(left, top, 7, 8);
|
||||
add(bottomRightIcon);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user